diff --git a/Generator/Types/ClassDef.cs b/Generator/Types/ClassDef.cs index b335cb4..69a8ddc 100644 --- a/Generator/Types/ClassDef.cs +++ b/Generator/Types/ClassDef.cs @@ -56,11 +56,11 @@ public override void CollectDependencies() foreach (var m in factoryMethods) { - methodWrappers.Add(new ClassMethodDef(m, this)); + methodWrappers.Add(new ClassMethodDef(m, this, true)); } foreach (var m in staticMethods) { - methodWrappers.Add(new ClassMethodDef(m, this)); + methodWrappers.Add(new ClassMethodDef(m, this, false)); } // fix name clashes in method wrappers (caused by overloads from different interfaces) diff --git a/Generator/Types/ClassMethodDef.cs b/Generator/Types/ClassMethodDef.cs index 9778e2e..66551a0 100644 --- a/Generator/Types/ClassMethodDef.cs +++ b/Generator/Types/ClassMethodDef.cs @@ -54,7 +54,7 @@ public IEnumerable ForeignAssemblyDependencies } } - public ClassMethodDef(MethodDef method, ClassDef containingClass) + public ClassMethodDef(MethodDef method, ClassDef containingClass, bool isFactory) { WrappedMethod = method; ContainingClass = containingClass; @@ -62,7 +62,7 @@ public ClassMethodDef(MethodDef method, ClassDef containingClass) AddDependency(method.DeclaringType); inputParameters = WrappedMethod.Details.MakeInputParameters(Generator, this); - outType = WrappedMethod.Details.MakeOutType(Generator, this); + outType = WrappedMethod.Details.MakeOutType(Generator, this, isFactory); } public void FixupName(string suffix) @@ -76,9 +76,9 @@ public string Emit() var dependsOnAssemblies = new List(ForeignAssemblyDependencies.GroupBy(t => t.Module.Assembly.Name.Name).Select(g => g.Key)); var features = new FeatureConditions(dependsOnAssemblies); - return $@"{ features.GetAttribute() }#[inline] pub fn { Name }({ String.Join(", ", inputParameters) }) -> Result<{ outType }> {{ unsafe {{ + return $@"{ features.GetAttribute() }#[inline] pub fn { Name }({ String.Join(", ", inputParameters) }) -> Result<{ outType }> {{ >::get_activation_factory().{ m.Details.WrappedName }({ String.Join(", ", m.Details.InputParameterNames) }) - }}}}"; + }}"; } public void AddDependency(TypeDef other) diff --git a/Generator/Types/InterfaceDef.cs b/Generator/Types/InterfaceDef.cs index 6de63de..9d6cc7f 100644 --- a/Generator/Types/InterfaceDef.cs +++ b/Generator/Types/InterfaceDef.cs @@ -7,6 +7,14 @@ namespace Generator.Types { + public enum InterfaceKind + { + Unidentified, + Factory, + Statics, + Instance + } + public class InterfaceDef : TypeDef { public override TypeKind Kind @@ -18,8 +26,8 @@ public override TypeKind Kind } public bool IsDelegate { get; private set; } + public InterfaceKind InterfaceKind { get; private set; } - private bool isFactoryOrStatic; private List methods; public override IEnumerable Methods { @@ -49,7 +57,7 @@ public override void CollectDependencies() exclusiveToType = exclusiveTo.ConstructorArguments[0].Value as TypeDefinition; } - isFactoryOrStatic = IsFactoryOrStatic(Generator, this, exclusiveToType); + InterfaceKind = GetInterfaceKind(Generator, this, exclusiveToType); rawMethodDeclarations = methods.Select(m => m.GetRawDeclaration()).ToList(); wrapperMethodDeclarations = methods.Select(m => m.GetWrapperDefinition()).ToList(); @@ -76,7 +84,7 @@ public override void Emit() genericWithBounds = "<" + String.Join(", ", t.GenericParameters.Select(p => p.Name + ": RtType")) + ">"; } - string prependStatic = isFactoryOrStatic ? "static " : ""; + string prependStatic = (InterfaceKind == InterfaceKind.Factory || InterfaceKind == InterfaceKind.Statics) ? "static " : ""; var rawMethodDeclarationsWithFeatures = new List(); var lastFeatureAttr = definitionFeatureConditions.LastOrDefault()?.GetAttribute(); @@ -122,7 +130,7 @@ public override void Emit() } } - private bool IsFactoryOrStatic(Generator gen, TypeDef t, TypeDefinition exclusiveToType) + private InterfaceKind GetInterfaceKind(Generator gen, TypeDef t, TypeDefinition exclusiveToType) { var trimmedName = t.Name.TrimEnd('1', '2', '3', '4', '5', '6', '7', '8', '9'); var guessedFromName = trimmedName.EndsWith("Factory") || trimmedName.EndsWith("Statics"); @@ -149,7 +157,12 @@ private bool IsFactoryOrStatic(Generator gen, TypeDef t, TypeDefinition exclusiv } } - return candidates.Any(c => c.GetFactoryTypes().Contains(t.Type) || c.GetStaticTypes().Contains(t.Type)); + if (candidates.Any(c => c.GetFactoryTypes().Contains(t.Type))) + return InterfaceKind.Factory; + else if (candidates.Any(c => c.GetStaticTypes().Contains(t.Type))) + return InterfaceKind.Statics; + else + return InterfaceKind.Instance; } } } diff --git a/Generator/Types/MethodDef.cs b/Generator/Types/MethodDef.cs index a28d29c..b4c27f5 100644 --- a/Generator/Types/MethodDef.cs +++ b/Generator/Types/MethodDef.cs @@ -13,29 +13,121 @@ public class MethodDetailsCache public string RawName; public string[] InputParameterNames; public Tuple[] InputParameterTypes; - public TypeReference[] OutTypes; - public string WrapperBody; + public Tuple[] OutTypes; + public string GetManyParameterName; + public List> Output; public string[] MakeInputParameters(Generator generator, ITypeRequestSource source) { return InputParameterNames.Zip(InputParameterTypes, (name, t) => name + ": " + TypeHelpers.GetInputTypeName(generator, source, t.Item1, t.Item2)).ToArray(); } - public string MakeOutType(Generator generator, ITypeRequestSource source) + public string MakeOutType(Generator generator, ITypeRequestSource source, bool isFactoryMethod) { - string outType = String.Join(", ", OutTypes.Select(o => TypeHelpers.GetTypeName(generator, source, o, TypeUsage.Out))); + string outType = String.Join(", ", OutTypes.Select(o => TypeHelpers.GetTypeName(generator, source, o.Item1, (o.Item2 || isFactoryMethod) ? TypeUsage.OutNonNull : TypeUsage.Out))); if (OutTypes.Count() != 1) { outType = "(" + outType + ")"; // also works for count == 0 (empty tuple) } return outType; } + + public string MakeWrapperBody(MethodDefinition def, bool isFactoryMethod) + { + var rawName = RawName; + bool isGetMany = GetManyParameterName != null; + var getManyPname = GetManyParameterName; + var output = Output; + + var rawParams = new List { "self as *const _ as *mut _" }; + foreach (var p in def.Parameters) + { + var pname = NameHelpers.PreventKeywords(NameHelpers.FirstToLower(p.Name)); + if (p.ParameterType.IsByReference) + { + if (((ByReferenceType)p.ParameterType).ElementType.IsArray) + { + rawParams.Add("&mut " + pname + "Size"); + } + + // output parameter + rawParams.Add("&mut " + pname); + } + else + { + // input parameter + if (p.ParameterType.IsArray) + { + if (p.IsOut) + { + if (isGetMany) + { + rawParams.Add(pname + ".capacity() as u32"); + rawParams.Add(pname + ".as_mut_ptr() as *mut T::Abi"); + } + else + { + rawParams.Add(pname + ".len() as u32"); + rawParams.Add(pname + ".as_mut_ptr() as *mut _"); + } + } + else + { + rawParams.Add(pname + ".len() as u32"); + rawParams.Add(pname + ".as_ptr() as *mut _"); + } + } + else + { + rawParams.Add(TypeHelpers.UnwrapInputParameter(pname, p.ParameterType)); + } + } + } + + if (def.ReturnType.FullName != "System.Void") + { + if (def.ReturnType.IsArray) + { + rawParams.Add("&mut outSize"); + } + rawParams.Add("&mut out"); + } + + var outInit = String.Join(" ", output.SelectMany(o => TypeHelpers.CreateUninitializedOutputs(o.Item1, o.Item2))); + if (outInit != "") outInit = "\r\n " + outInit; + + var outWrap = String.Join(", ", output.Select(o => TypeHelpers.WrapOutputParameter(o.Item1, o.Item2, isFactoryMethod || o.Item3))); + if (output.Count != 1) + { + outWrap = "(" + outWrap + ")"; // also works for count == 0 (empty tuple) + } + outWrap = "Ok(" + outWrap + ")"; + + if (isGetMany) + { + outInit = $"\r\n debug_assert!({ getManyPname }.capacity() > 0, \"capacity of `{ getManyPname }` must not be 0 (use Vec::with_capacity)\"); { getManyPname }.clear();{ outInit }"; + outWrap = $"{ getManyPname }.set_len(out as usize); Ok(())"; + } + + return outInit + $@" + let hr = ((*self.lpVtbl).{ rawName })({ String.Join(", ", rawParams) }); + if hr == S_OK {{ { outWrap } }} else {{ err(hr) }}"; + } } public class MethodDef : ITypeRequestSource { public TypeDef DeclaringType { get; private set; } public MethodDefinition Method { get; private set; } + public bool IsFactoryMethod + { + get + { + var kind = ((InterfaceDef)DeclaringType).InterfaceKind; + if (kind == InterfaceKind.Unidentified) { throw new InvalidOperationException(); } + return kind == InterfaceKind.Factory; + } + } public Module Module { @@ -120,10 +212,10 @@ public string GetWrapperName(string rawName) public string GetWrapperDefinition() { var inputParameters = Details.MakeInputParameters(DeclaringType.Generator, this); - var outType = Details.MakeOutType(DeclaringType.Generator, this); + var outType = Details.MakeOutType(DeclaringType.Generator, this, IsFactoryMethod); - return $@"#[inline] pub unsafe fn { Details.WrappedName }({ String.Join(", ", new string[] { "&self" }.Concat(inputParameters)) }) -> Result<{ outType }> {{{ Details.WrapperBody } - }}"; + return $@"#[inline] pub fn { Details.WrappedName }({ String.Join(", ", new string[] { "&self" }.Concat(inputParameters)) }) -> Result<{ outType }> {{ unsafe {{ { Details.MakeWrapperBody(Method, IsFactoryMethod) } + }}}}"; } private MethodDetailsCache InitializeDetailsCache() @@ -139,7 +231,7 @@ private MethodDetailsCache InitializeDetailsCache() // It uses the __RPC__out_ecount_part(capacity, *actual) annotation in the C headers. For the wrapper we use a &mut Vec<> buffer. var input = new List>(); - var output = new List>(); + var output = new List>(); foreach (var p in Method.Parameters) { @@ -148,7 +240,7 @@ private MethodDetailsCache InitializeDetailsCache() { Assert(p.IsOut); var realType = ((ByReferenceType)p.ParameterType).ElementType; - output.Add(Tuple.Create(pname, realType)); + output.Add(Tuple.Create(pname, realType, false)); } else { @@ -182,17 +274,18 @@ private MethodDetailsCache InitializeDetailsCache() if (Method.ReturnType.FullName != "System.Void") { // this makes the actual return value the last in the tuple (if multiple) - output.Add(Tuple.Create("out", Method.ReturnType)); + output.Add(Tuple.Create("out", Method.ReturnType, TypeHelpers.IsReturnTypeNonNull(Method.ReturnType, DeclaringType.Generator))); } - var outTypes = output.Select(o => o.Item2).ToArray(); + // TODO: second tuple element should be true for some method's return value + var outTypes = output.Select(o => Tuple.Create(o.Item2, o.Item3)).ToArray(); if (isGetMany) { - outTypes = new TypeReference[] { }; // GetMany has no return value + outTypes = new Tuple[] { }; // GetMany has no return value } - + return new MethodDetailsCache { @@ -201,87 +294,11 @@ private MethodDetailsCache InitializeDetailsCache() InputParameterNames = input.Select(i => i.Item1).ToArray(), InputParameterTypes = input.Select(i => Tuple.Create(i.Item2, i.Item3)).ToArray(), OutTypes = outTypes.ToArray(), - WrapperBody = GetWrapperBody(rawName, isGetMany, getManyPname, output) + GetManyParameterName = isGetMany ? getManyPname : null, + Output = output }; } - private string GetWrapperBody(string rawName, bool isGetMany, string getManyPname, List> output) - { - var rawParams = new List { "self as *const _ as *mut _" }; - foreach (var p in Method.Parameters) - { - var pname = NameHelpers.PreventKeywords(NameHelpers.FirstToLower(p.Name)); - if (p.ParameterType.IsByReference) - { - if (((ByReferenceType)p.ParameterType).ElementType.IsArray) - { - rawParams.Add("&mut " + pname + "Size"); - } - - // output parameter - rawParams.Add("&mut " + pname); - } - else - { - // input parameter - if (p.ParameterType.IsArray) - { - if (p.IsOut) - { - if (isGetMany) - { - rawParams.Add(pname + ".capacity() as u32"); - rawParams.Add(pname + ".as_mut_ptr() as *mut T::Abi"); - } - else - { - rawParams.Add(pname + ".len() as u32"); - rawParams.Add(pname + ".as_mut_ptr() as *mut _"); - } - } - else - { - rawParams.Add(pname + ".len() as u32"); - rawParams.Add(pname + ".as_ptr() as *mut _"); - } - } - else - { - rawParams.Add(TypeHelpers.UnwrapInputParameter(pname, p.ParameterType)); - } - } - } - - if (Method.ReturnType.FullName != "System.Void") - { - if (Method.ReturnType.IsArray) - { - rawParams.Add("&mut outSize"); - } - rawParams.Add("&mut out"); - } - - var outInit = String.Join(" ", output.SelectMany(o => TypeHelpers.CreateUninitializedOutputs(o.Item1, o.Item2))); - if (outInit != "") outInit = "\r\n " + outInit; - - var outWrap = String.Join(", ", output.Select(o => TypeHelpers.WrapOutputParameter(o.Item1, o.Item2))); - if (output.Count != 1) - { - outWrap = "(" + outWrap + ")"; // also works for count == 0 (empty tuple) - } - outWrap = "Ok(" + outWrap + ")"; - - if (isGetMany) - { - outInit = $"\r\n debug_assert!({ getManyPname }.capacity() > 0, \"capacity of `{ getManyPname }` must not be 0 (use Vec::with_capacity)\"); { getManyPname }.clear();{ outInit }"; - outWrap = $"{ getManyPname }.set_len(out as usize); Ok(())"; - } - - return outInit + $@" - let hr = ((*self.lpVtbl).{ rawName })({ String.Join(", ", rawParams) }); - if hr == S_OK {{ { outWrap } }} else {{ err(hr) }}"; - } - public string GetRawDeclaration() { var name = GetRawName(); diff --git a/Generator/Types/TypeDef.cs b/Generator/Types/TypeDef.cs index b7afc43..1ed8dc7 100644 --- a/Generator/Types/TypeDef.cs +++ b/Generator/Types/TypeDef.cs @@ -205,7 +205,17 @@ public string GetPath(Module requestingModule) } else { - name = $"::rt::gen::{ Module.Path }::{ Name }"; + if (Module.Path.StartsWith("windows::foundation")) + { + var shortened = Module.Path.Substring("windows::foundation".Length); + if (shortened.Length > 0) + shortened = shortened.Substring(2) + "::"; + name = $"foundation::{ shortened }{ Name }"; + } + else + { + name = $"::rt::gen::{ Module.Path }::{ Name }"; + } var relative = $"{ Module.GetRelativePath(requestingModule) }::{ Name }"; if (relative.Length < name.Length) name = relative; diff --git a/Generator/Types/TypeHelpers.cs b/Generator/Types/TypeHelpers.cs index c17d06f..8903f32 100644 --- a/Generator/Types/TypeHelpers.cs +++ b/Generator/Types/TypeHelpers.cs @@ -46,6 +46,7 @@ public static string GetTypeName(Generator gen, ITypeRequestSource source, TypeR case TypeUsage.Raw: return $"{ t.Name }::Abi"; case TypeUsage.In: return $"&{ t.Name }::In"; case TypeUsage.Out: return $"{ t.Name }::Out"; + case TypeUsage.OutNonNull: return $"{ t.Name }::OutNonNull"; case TypeUsage.GenericArg: return t.Name; default: throw new NotSupportedException(); } @@ -93,7 +94,7 @@ private static string GetElementTypeName(Generator gen, ITypeRequestSource sourc case TypeUsage.Raw: return "*mut IInspectable"; case TypeUsage.GenericArg: return "IInspectable"; case TypeUsage.In: return "&IInspectable"; - case TypeUsage.Out: return "ComPtr"; + case TypeUsage.Out: return "Option>"; default: throw new InvalidOperationException(); } } @@ -171,6 +172,10 @@ private static string GetElementTypeName(Generator gen, ITypeRequestSource sourc name = $"*mut { name }"; } else if (usage == TypeUsage.Out) + { + name = $"Option>"; + } + else if (usage == TypeUsage.OutNonNull) { name = $"ComPtr<{ name }>"; } @@ -190,7 +195,7 @@ public static string GetInputTypeName(Generator gen, ITypeRequestSource source, case InputKind.MutSlice: Assert(t.IsValueType); return $"&mut [{ GetTypeName(gen, source, t, TypeUsage.In) }]"; - case InputKind.VecBuffer: return $"&mut Vec<{ GetTypeName(gen, source, t, TypeUsage.Out) }>"; + case InputKind.VecBuffer: return $"&mut Vec<{ GetTypeName(gen, source, t, TypeUsage.OutNonNull) }>"; default: throw new InvalidOperationException(); } } @@ -316,8 +321,10 @@ public static string CreateUninitializedOutput(TypeReference t) } } - public static string WrapOutputParameter(string name, TypeReference t) + public static string WrapOutputParameter(string name, TypeReference t, bool isNonNull) { + string wrapFn = isNonNull ? "ComPtr::wrap" : "ComPtr::wrap_optional"; + if (t.IsGenericParameter) { return $"{ t.Name }::wrap({ name })"; @@ -336,7 +343,7 @@ public static string WrapOutputParameter(string name, TypeReference t) } else if (t.FullName == "System.Object") { - return $"ComPtr::wrap({ name })"; + return $"{ wrapFn }({ name })"; } else if (t.FullName == "System.Guid") { @@ -368,7 +375,7 @@ public static string WrapOutputParameter(string name, TypeReference t) } else // reference type { - return $"ComPtr::wrap({ name })"; + return $"{ wrapFn }({ name })"; } } @@ -376,12 +383,45 @@ public static TypeReference GetDefaultInterface(TypeDefinition type) { return type.Interfaces.Single(i => i.CustomAttributes.Any(a => a.AttributeType.Name == "DefaultAttribute")).InterfaceType; } + + public static bool IsReturnTypeNonNull(TypeReference t, Generator gen) + { + var nonNullReturnTypes = new string[] + { + "Windows.Foundation.IAsyncAction", + "Windows.Foundation.IAsyncActionWithProgress`1", + "Windows.Foundation.IAsyncOperation`1", + "Windows.Foundation.IAsyncOperationWithProgress`2" + }; + + if (nonNullReturnTypes.Contains(t.GetElementType().FullName)) + return true; + + if (t.IsGenericParameter || t.IsArray || t.IsValueType || t.IsPrimitive || + t.FullName == "System.String" || t.FullName == "System.Object" || t.FullName == "System.Guid") + { + return false; + } + else + { + // we mark class types as non-null if their default interface is non-null + var def = gen.GetTypeDefinition(t); + if (def.Kind == TypeKind.Class) + { + var defaultInterface = TypeHelpers.GetDefaultInterface(def.Type); + return nonNullReturnTypes.Contains(defaultInterface.GetElementType().FullName); + } + else + return false; + } + } } public enum TypeUsage { In, Out, + OutNonNull, Raw, Alias, GenericArg, diff --git a/examples/hexdump.rs b/examples/hexdump.rs index 2dbe48c..dc74251 100644 --- a/examples/hexdump.rs +++ b/examples/hexdump.rs @@ -19,16 +19,16 @@ fn main() { const BYTES_PER_ROW: usize = 24; const CHUNK_SIZE: usize = 4096; -fn run() { unsafe { +fn run() { // Use the current executable as source file (because we know that will exist). let exe_path = ::std::env::current_exe().expect("current_exe failed"); let exe_path_str = exe_path.to_str().expect("invalid unicode path"); - let file = StorageFile::get_file_from_path_async(&*FastHString::new(&exe_path_str)).unwrap().blocking_get().expect("get_file_from_path_async failed"); + let file = StorageFile::get_file_from_path_async(&*FastHString::new(&exe_path_str)).unwrap().blocking_get().expect("get_file_from_path_async failed").unwrap(); println!("Dumping file: {}", file.query_interface::().unwrap().get_path().unwrap()); // Open a sequential-access stream over the file. - let input_stream = file.query_interface::().unwrap().open_sequential_read_async().unwrap().blocking_get().unwrap(); + let input_stream = file.query_interface::().unwrap().open_sequential_read_async().unwrap().blocking_get().unwrap().unwrap(); // Pass the input stream to the DataReader. let data_reader = streams::DataReader::create_data_reader(&input_stream).unwrap(); let mut curr_chunk = 0; @@ -70,7 +70,7 @@ fn run() { unsafe { data_reader.query_interface::().unwrap().close().unwrap(); input_stream.query_interface::().unwrap().close().unwrap(); -} } +} fn print_row(bytes: &[u8], curr_byte: usize) { // Format the address of byte i to have 8 hexadecimal digits and add the address diff --git a/examples/test.rs b/examples/test.rs index 65683f2..1f063fd 100644 --- a/examples/test.rs +++ b/examples/test.rs @@ -19,7 +19,7 @@ fn run() { let base = FastHString::new("https://github.com"); let relative = FastHString::new("contextfree/winrt-rust"); let uri = Uri::create_with_relative_uri(&base, &relative).unwrap(); - let to_string = unsafe { uri.query_interface::().unwrap().to_string().unwrap() }; + let to_string = uri.query_interface::().unwrap().to_string().unwrap(); println!("{} -> {}", uri.get_runtime_class_name(), to_string); println!("TrustLevel: {:?}", uri.get_trust_level()); println!("GetIids:"); @@ -75,20 +75,21 @@ fn run() { let unknown = asi.query_interface::().unwrap(); println!("IAsyncInfo: {:p}, Iasync_operation: {:p}, IUnknown: {:p}", asi, async_op, unknown); - let id = unsafe { asi.get_id().unwrap() }; + let id = asi.get_id().unwrap(); println!("id: {:?}", id); - let status = unsafe { asi.get_status().unwrap() }; + let status = asi.get_status().unwrap(); println!("status: {:?}", status); - let device_information_collection = async_op.blocking_get().unwrap(); + let device_information_collection = async_op.blocking_get().unwrap().unwrap(); println!("CLS: {}", device_information_collection.get_runtime_class_name()); - let count = unsafe { device_information_collection.get_size().unwrap() }; + let count = device_information_collection.get_size().unwrap(); println!("Device Count: {}", count); let mut remember = None; let mut i = 0; for current in device_information_collection.into_iter() { - let device_name = unsafe { current.get_name().unwrap() }; + let current = current.expect("current was null"); + let device_name = 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 @@ -99,9 +100,9 @@ fn run() { assert_eq!(i, count); let mut buffer = Vec::with_capacity(2000); - unsafe { device_information_collection.get_many(0, &mut buffer).unwrap() }; - for (b, i) in buffer.iter_mut().zip(0..) { - let device_name = unsafe { b.get_name().unwrap() }; + device_information_collection.get_many(0, &mut buffer).unwrap(); + for (b, i) in buffer.iter().zip(0..) { + let device_name = b.get_name().unwrap(); println!("Device Name ({}): {}", i, device_name); } let len = buffer.len(); @@ -109,51 +110,51 @@ fn run() { println!("Freed result of GetMany ({} values).", len); if let Some(mut r) = remember { - let (index, found) = unsafe { device_information_collection.index_of(&mut r).unwrap() }; + let (index, found) = device_information_collection.index_of(&mut r).unwrap(); println!("Found remembered value: {} (index: {})", found, index); } - match unsafe { device_information_collection.get_at(count + 42) } { + match 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") }; let array = &mut [true, false, false, true]; - let boxed_array = PropertyValue::create_boolean_array(array); - let boxed_array = boxed_array.unwrap().query_interface::().unwrap(); - assert_eq!(unsafe { boxed_array.get_type().unwrap() }, PropertyType::BooleanArray); + let boxed_array = PropertyValue::create_boolean_array(array).unwrap().unwrap(); + let boxed_array = boxed_array.query_interface::().unwrap(); + assert_eq!(boxed_array.get_type().unwrap(), PropertyType::BooleanArray); let boxed_array = boxed_array.query_interface::>().unwrap(); - let returned_array = unsafe { boxed_array.get_value().unwrap() }; + let returned_array = boxed_array.get_value().unwrap(); println!("{:?} = {:?}", array, &returned_array[..]); assert_eq!(array, &returned_array[..]); let str1 = FastHString::new("foo"); let str2 = FastHString::new("bar"); let array = &mut [&*str1, &*str2, &*str1, &*str2]; - let boxed_array = PropertyValue::create_string_array(array); - let boxed_array = boxed_array.unwrap().query_interface::().unwrap(); - assert_eq!(unsafe { boxed_array.get_type().unwrap() }, PropertyType::StringArray); + let boxed_array = PropertyValue::create_string_array(array).unwrap().unwrap(); + let boxed_array = boxed_array.query_interface::().unwrap(); + assert_eq!(boxed_array.get_type().unwrap(), PropertyType::StringArray); let boxed_array = boxed_array.query_interface::>().unwrap(); - let returned_array = unsafe { boxed_array.get_value().unwrap() }; + let returned_array = boxed_array.get_value().unwrap(); assert_eq!(array.len(), returned_array.len()); for i in 0..array.len() { assert!(returned_array[i] == (if i % 2 == 0 { &str1 } else { &str2 })); } // TODO: test array interface objects (also see if ComArray drops contents correctly) - let status = unsafe { asi.get_status().unwrap() }; + let status = asi.get_status().unwrap(); println!("status: {:?}", status); - assert!(unsafe { asi.close().is_ok() }); + assert!(asi.close().is_ok()); // Walk directories up to root let exe_path = ::std::env::current_exe().expect("current_exe failed"); let exe_path_str = exe_path.to_str().expect("invalid unicode path"); - let file = StorageFile::get_file_from_path_async(&*FastHString::new(&exe_path_str)).unwrap().blocking_get().expect("get_file_from_path_async failed"); - println!("File: {}", unsafe { file.query_interface::().unwrap().get_path().unwrap() }); + let file = StorageFile::get_file_from_path_async(&*FastHString::new(&exe_path_str)).unwrap().blocking_get().expect("get_file_from_path_async failed").unwrap(); + println!("File: {}", file.query_interface::().unwrap().get_path().unwrap()); /*let mut parent = file.query_interface::().unwrap(); loop { - parent = parent.query_interface::().unwrap().get_parent_async().unwrap().blocking_get().unwrap().query_interface::().unwrap(); + parent = parent.query_interface::().unwrap().get_parent_async().unwrap().blocking_get().unwrap().unwrap().query_interface::().unwrap(); println!("Parent: {}", parent.get_path().unwrap()); // ... until parent == null, but this currently does not work because we don't support methods returning null }*/ diff --git a/examples/toast_notify.rs b/examples/toast_notify.rs index f42a492..fda28d9 100644 --- a/examples/toast_notify.rs +++ b/examples/toast_notify.rs @@ -15,15 +15,15 @@ fn main() { rt.uninit(); } -fn run() { unsafe { +fn run() { // Get a toast XML template - let toast_xml = ToastNotificationManager::get_template_content(ToastTemplateType::ToastText02).unwrap(); + let toast_xml = ToastNotificationManager::get_template_content(ToastTemplateType::ToastText02).unwrap().unwrap(); // Fill in the text elements - let toast_text_elements = toast_xml.get_elements_by_tag_name(&FastHString::new("text")).unwrap(); + let toast_text_elements = toast_xml.get_elements_by_tag_name(&FastHString::new("text")).unwrap().unwrap(); - toast_text_elements.item(0).unwrap().append_child(&*toast_xml.create_text_node(&FastHString::new("Hello from Rust!")).unwrap().query_interface::().unwrap()).unwrap(); - toast_text_elements.item(1).unwrap().append_child(&*toast_xml.create_text_node(&FastHString::new("This is some more text.")).unwrap().query_interface::().unwrap()).unwrap(); + toast_text_elements.item(0).unwrap().unwrap().append_child(&*toast_xml.create_text_node(&FastHString::new("Hello from Rust!")).unwrap().unwrap().query_interface::().unwrap()).unwrap(); + toast_text_elements.item(1).unwrap().unwrap().append_child(&*toast_xml.create_text_node(&FastHString::new("This is some more text.")).unwrap().unwrap().query_interface::().unwrap()).unwrap(); // could use the following to get the XML code for the notification //println!("{}", toast_xml.query_interface::().unwrap().get_xml().unwrap()); @@ -32,5 +32,5 @@ fn run() { unsafe { let toast = ToastNotification::create_toast_notification(&*toast_xml).unwrap(); // Show the toast. Use PowerShell's App ID to circumvent the need to register one (this is only an example!). - ToastNotificationManager::create_toast_notifier_with_id(&FastHString::new("{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\\WindowsPowerShell\\v1.0\\powershell.exe")).unwrap().show(&*toast).unwrap(); -}} + ToastNotificationManager::create_toast_notifier_with_id(&FastHString::new("{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\\WindowsPowerShell\\v1.0\\powershell.exe")).unwrap().unwrap().show(&*toast).unwrap(); +} diff --git a/src/comptr.rs b/src/comptr.rs index f884a39..fefd1a4 100644 --- a/src/comptr.rs +++ b/src/comptr.rs @@ -51,6 +51,18 @@ impl ComPtr { ComPtr(ptr) } + /// Creates an optional `ComPtr` to wrap a raw pointer that may be null. + /// It takes ownership over the pointer which means it does __not__ call `AddRef`. + /// `T` __must__ be a COM interface that inherits from `IUnknown`. + #[inline] + pub unsafe fn wrap_optional(ptr: *mut T) -> Option> { // TODO: Add T: ComInterface bound + if ptr.is_null() { + None + } else { + Some(ComPtr(ptr)) + } + } + /// Returns the underlying WinRT object as a reference to an `IInspectable` object. #[inline] fn as_inspectable(&self) -> &mut IInspectable where T: RtInterface { @@ -161,16 +173,16 @@ impl ComArray where T: ::RtType { } impl Deref for ComArray where T: ::RtType { - type Target = [T::Out]; + type Target = [T::OutNonNull]; #[inline] - fn deref(&self) -> &[T::Out] { - unsafe { ::std::slice::from_raw_parts(self.first as *mut T::Out, self.size as usize) } + fn deref(&self) -> &[T::OutNonNull] { + unsafe { ::std::slice::from_raw_parts(self.first as *mut T::OutNonNull, self.size as usize) } } } impl DerefMut for ComArray where T: ::RtType { #[inline] - fn deref_mut(&mut self) -> &mut [T::Out] { - unsafe { ::std::slice::from_raw_parts_mut(self.first as *mut T::Out, self.size as usize) } + fn deref_mut(&mut self) -> &mut [T::OutNonNull] { + unsafe { ::std::slice::from_raw_parts_mut(self.first as *mut T::OutNonNull, self.size as usize) } } } diff --git a/src/lib.rs b/src/lib.rs index 5282790..fb58339 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -87,6 +87,7 @@ mod prelude { pub use ::std::ptr::null_mut; pub use ::std::mem::zeroed; pub use ::guid::Guid; + pub use ::rt::gen::windows::foundation; #[inline] pub fn err(hr: ::result::HRESULT) -> ::result::Result { diff --git a/src/rt/async.rs b/src/rt/async.rs index d189b48..2b27cbd 100644 --- a/src/rt/async.rs +++ b/src/rt/async.rs @@ -40,7 +40,7 @@ macro_rules! impl_blocking_wait { #[inline] fn blocking_wait(&self) { let info = ::comptr::query_interface::<_, IAsyncInfo>(self).expect("query_interface failed"); - let status = unsafe { info.get_status().expect("get_status failed") }; + let status = info.get_status().expect("get_status failed"); if status == ::langcompat::ASYNC_STATUS_COMPLETED { return; @@ -56,7 +56,7 @@ macro_rules! impl_blocking_wait { cvar.notify_one(); Ok(()) }); - unsafe { self.set_completed(&handler).expect("set_completed failed") }; + self.set_completed(&handler).expect("set_completed failed"); // local reference to `handler` is dropped here -> Release() is called } @@ -94,7 +94,7 @@ impl RtAsyncOperation for IAsyncOperation #[inline] fn get_results(&self) -> Result { - unsafe { self.get_results() } + self.get_results() } } @@ -111,6 +111,6 @@ impl RtAsyncOperation for IAsyncOperat #[inline] fn get_results(&self) -> Result { - unsafe { self.get_results() } + self.get_results() } } \ No newline at end of file diff --git a/src/rt/gen/windows/applicationmodel.rs b/src/rt/gen/windows/applicationmodel.rs index bc9b38d..a0d4f01 100644 --- a/src/rt/gen/windows/applicationmodel.rs +++ b/src/rt/gen/windows/applicationmodel.rs @@ -3,24 +3,24 @@ DEFINE_IID!(IID_IAppDisplayInfo, 451612931, 58580, 16810, 164, 246, 196, 162, 11 RT_INTERFACE!{interface IAppDisplayInfo(IAppDisplayInfoVtbl): IInspectable(IInspectableVtbl) [IID_IAppDisplayInfo] { fn get_DisplayName(&self, out: *mut HSTRING) -> HRESULT, fn get_Description(&self, out: *mut HSTRING) -> HRESULT, - #[cfg(feature="windows-storage")] fn GetLogo(&self, size: super::foundation::Size, out: *mut *mut super::storage::streams::RandomAccessStreamReference) -> HRESULT + #[cfg(feature="windows-storage")] fn GetLogo(&self, size: foundation::Size, out: *mut *mut super::storage::streams::RandomAccessStreamReference) -> HRESULT }} impl IAppDisplayInfo { - #[inline] pub unsafe fn get_display_name(&self) -> Result { + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_description(&self) -> Result { + }} + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self 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 get_logo(&self, size: super::foundation::Size) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_logo(&self, size: foundation::Size) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetLogo)(self as *const _ as *mut _, size, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppDisplayInfo: IAppDisplayInfo} DEFINE_IID!(IID_IAppInfo, 3481229747, 27145, 19944, 166, 192, 87, 146, 213, 104, 128, 209); @@ -31,38 +31,38 @@ RT_INTERFACE!{interface IAppInfo(IAppInfoVtbl): IInspectable(IInspectableVtbl) [ fn get_PackageFamilyName(&self, out: *mut HSTRING) -> HRESULT }} impl IAppInfo { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_user_model_id(&self) -> Result { + }} + #[inline] pub fn get_app_user_model_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppUserModelId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_info(&self) -> Result> { + }} + #[inline] pub fn get_display_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_package_family_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_package_family_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PackageFamilyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class AppInfo: IAppInfo} RT_CLASS!{static class DesignMode} impl RtActivatable for DesignMode {} impl RtActivatable for DesignMode {} impl DesignMode { - #[inline] pub fn get_design_mode_enabled() -> Result { unsafe { + #[inline] pub fn get_design_mode_enabled() -> Result { >::get_activation_factory().get_design_mode_enabled() - }} - #[inline] pub fn get_design_mode2_enabled() -> Result { unsafe { + } + #[inline] pub fn get_design_mode2_enabled() -> Result { >::get_activation_factory().get_design_mode2_enabled() - }} + } } DEFINE_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]) [CLSID_DesignMode]); DEFINE_IID!(IID_IDesignModeStatics, 741905356, 63514, 20090, 184, 87, 118, 168, 8, 135, 225, 133); @@ -70,91 +70,91 @@ RT_INTERFACE!{static interface IDesignModeStatics(IDesignModeStaticsVtbl): IInsp fn get_DesignModeEnabled(&self, out: *mut bool) -> HRESULT }} impl IDesignModeStatics { - #[inline] pub unsafe fn get_design_mode_enabled(&self) -> Result { + #[inline] pub fn get_design_mode_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DesignModeEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IDesignModeStatics2, 2161082679, 45156, 18520, 190, 200, 62, 186, 34, 53, 117, 53); RT_INTERFACE!{static interface IDesignModeStatics2(IDesignModeStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IDesignModeStatics2] { fn get_DesignMode2Enabled(&self, out: *mut bool) -> HRESULT }} impl IDesignModeStatics2 { - #[inline] pub unsafe fn get_design_mode2_enabled(&self) -> Result { + #[inline] pub fn get_design_mode2_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DesignMode2Enabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IEnteredBackgroundEventArgs { - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class EnteredBackgroundEventArgs: IEnteredBackgroundEventArgs} RT_CLASS!{static class FullTrustProcessLauncher} impl RtActivatable for FullTrustProcessLauncher {} impl FullTrustProcessLauncher { - #[inline] pub fn launch_full_trust_process_for_current_app_async() -> Result> { unsafe { + #[inline] pub fn launch_full_trust_process_for_current_app_async() -> Result> { >::get_activation_factory().launch_full_trust_process_for_current_app_async() - }} - #[inline] pub fn launch_full_trust_process_for_current_app_with_parameters_async(parameterGroupId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn launch_full_trust_process_for_current_app_with_parameters_async(parameterGroupId: &HStringArg) -> Result> { >::get_activation_factory().launch_full_trust_process_for_current_app_with_parameters_async(parameterGroupId) - }} - #[inline] pub fn launch_full_trust_process_for_app_async(fullTrustPackageRelativeAppId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn launch_full_trust_process_for_app_async(fullTrustPackageRelativeAppId: &HStringArg) -> Result> { >::get_activation_factory().launch_full_trust_process_for_app_async(fullTrustPackageRelativeAppId) - }} - #[inline] pub fn launch_full_trust_process_for_app_with_parameters_async(fullTrustPackageRelativeAppId: &HStringArg, parameterGroupId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn launch_full_trust_process_for_app_with_parameters_async(fullTrustPackageRelativeAppId: &HStringArg, parameterGroupId: &HStringArg) -> Result> { >::get_activation_factory().launch_full_trust_process_for_app_with_parameters_async(fullTrustPackageRelativeAppId, parameterGroupId) - }} + } } DEFINE_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]) [CLSID_FullTrustProcessLauncher]); 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(&self, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn LaunchFullTrustProcessForCurrentAppWithParametersAsync(&self, parameterGroupId: HSTRING, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn LaunchFullTrustProcessForAppAsync(&self, fullTrustPackageRelativeAppId: HSTRING, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn LaunchFullTrustProcessForAppWithParametersAsync(&self, fullTrustPackageRelativeAppId: HSTRING, parameterGroupId: HSTRING, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT + fn LaunchFullTrustProcessForCurrentAppAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn LaunchFullTrustProcessForCurrentAppWithParametersAsync(&self, parameterGroupId: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn LaunchFullTrustProcessForAppAsync(&self, fullTrustPackageRelativeAppId: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn LaunchFullTrustProcessForAppWithParametersAsync(&self, fullTrustPackageRelativeAppId: HSTRING, parameterGroupId: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IFullTrustProcessLauncherStatics { - #[inline] pub unsafe fn launch_full_trust_process_for_current_app_async(&self) -> Result> { + #[inline] pub fn launch_full_trust_process_for_current_app_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LaunchFullTrustProcessForCurrentAppAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn launch_full_trust_process_for_current_app_with_parameters_async(&self, parameterGroupId: &HStringArg) -> Result> { + }} + #[inline] pub fn launch_full_trust_process_for_current_app_with_parameters_async(&self, parameterGroupId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LaunchFullTrustProcessForCurrentAppWithParametersAsync)(self as *const _ as *mut _, parameterGroupId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn launch_full_trust_process_for_app_async(&self, fullTrustPackageRelativeAppId: &HStringArg) -> Result> { + }} + #[inline] pub fn launch_full_trust_process_for_app_async(&self, fullTrustPackageRelativeAppId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LaunchFullTrustProcessForAppAsync)(self as *const _ as *mut _, fullTrustPackageRelativeAppId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn launch_full_trust_process_for_app_with_parameters_async(&self, fullTrustPackageRelativeAppId: &HStringArg, parameterGroupId: &HStringArg) -> Result> { + }} + #[inline] pub fn launch_full_trust_process_for_app_with_parameters_async(&self, fullTrustPackageRelativeAppId: &HStringArg, parameterGroupId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LaunchFullTrustProcessForAppWithParametersAsync)(self as *const _ as *mut _, fullTrustPackageRelativeAppId.get(), parameterGroupId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl ILeavingBackgroundEventArgs { - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class LeavingBackgroundEventArgs: ILeavingBackgroundEventArgs} DEFINE_IID!(IID_IPackage, 373061935, 48501, 16700, 191, 35, 177, 254, 123, 149, 216, 37); @@ -163,36 +163,36 @@ RT_INTERFACE!{interface IPackage(IPackageVtbl): IInspectable(IInspectableVtbl) [ #[cfg(not(feature="windows-storage"))] fn __Dummy1(&self) -> (), #[cfg(feature="windows-storage")] fn get_InstalledLocation(&self, out: *mut *mut super::storage::StorageFolder) -> HRESULT, fn get_IsFramework(&self, out: *mut bool) -> HRESULT, - fn get_Dependencies(&self, out: *mut *mut super::foundation::collections::IVectorView) -> HRESULT + fn get_Dependencies(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IPackage { - #[inline] pub unsafe fn get_id(&self) -> Result> { + #[inline] pub fn get_id(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self 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_installed_location(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_installed_location(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InstalledLocation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_framework(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_framework(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsFramework)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_dependencies(&self) -> Result>> { + }} + #[inline] pub fn get_dependencies(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Dependencies)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class Package: IPackage} impl RtActivatable for Package {} impl Package { - #[inline] pub fn get_current() -> Result> { unsafe { + #[inline] pub fn get_current() -> Result>> { >::get_activation_factory().get_current() - }} + } } DEFINE_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]) [CLSID_Package]); DEFINE_IID!(IID_IPackage2, 2791387062, 30344, 19150, 149, 251, 53, 149, 56, 231, 170, 1); @@ -200,267 +200,267 @@ RT_INTERFACE!{interface IPackage2(IPackage2Vtbl): IInspectable(IInspectableVtbl) fn get_DisplayName(&self, out: *mut HSTRING) -> HRESULT, fn get_PublisherDisplayName(&self, out: *mut HSTRING) -> HRESULT, fn get_Description(&self, out: *mut HSTRING) -> HRESULT, - fn get_Logo(&self, out: *mut *mut super::foundation::Uri) -> HRESULT, + fn get_Logo(&self, out: *mut *mut foundation::Uri) -> HRESULT, fn get_IsResourcePackage(&self, out: *mut bool) -> HRESULT, fn get_IsBundle(&self, out: *mut bool) -> HRESULT, fn get_IsDevelopmentMode(&self, out: *mut bool) -> HRESULT }} impl IPackage2 { - #[inline] pub unsafe fn get_display_name(&self) -> Result { + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_publisher_display_name(&self) -> Result { + }} + #[inline] pub fn get_publisher_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PublisherDisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_description(&self) -> Result { + }} + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_logo(&self) -> Result> { + }} + #[inline] pub fn get_logo(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Logo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_resource_package(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_resource_package(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsResourcePackage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_bundle(&self) -> Result { + }} + #[inline] pub fn get_is_bundle(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsBundle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_development_mode(&self) -> Result { + }} + #[inline] pub fn get_is_development_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDevelopmentMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut PackageStatus) -> HRESULT, - fn get_InstalledDate(&self, out: *mut super::foundation::DateTime) -> HRESULT, - fn GetAppListEntriesAsync(&self, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT + fn get_InstalledDate(&self, out: *mut foundation::DateTime) -> HRESULT, + fn GetAppListEntriesAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IPackage3 { - #[inline] pub unsafe fn get_status(&self) -> Result> { + #[inline] pub fn get_status(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_installed_date(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_installed_date(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InstalledDate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_list_entries_async(&self) -> Result>>> { + }} + #[inline] pub fn get_app_list_entries_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAppListEntriesAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } 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(&self, out: *mut PackageSignatureKind) -> HRESULT, fn get_IsOptional(&self, out: *mut bool) -> HRESULT, - fn VerifyContentIntegrityAsync(&self, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + fn VerifyContentIntegrityAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IPackage4 { - #[inline] pub unsafe fn get_signature_kind(&self) -> Result { + #[inline] pub fn get_signature_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SignatureKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_optional(&self) -> Result { + }} + #[inline] pub fn get_is_optional(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsOptional)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn verify_content_integrity_async(&self) -> Result>> { + }} + #[inline] pub fn verify_content_integrity_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).VerifyContentIntegrityAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IPackage5, 243543508, 55724, 17901, 154, 30, 116, 206, 5, 107, 38, 53); RT_INTERFACE!{interface IPackage5(IPackage5Vtbl): IInspectable(IInspectableVtbl) [IID_IPackage5] { - fn GetContentGroupsAsync(&self, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, - fn GetContentGroupAsync(&self, name: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn StageContentGroupsAsync(&self, names: *mut super::foundation::collections::IIterable, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, - fn StageContentGroupsWithPriorityAsync(&self, names: *mut super::foundation::collections::IIterable, moveToHeadOfQueue: bool, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, - fn SetInUseAsync(&self, inUse: bool, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + fn GetContentGroupsAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetContentGroupAsync(&self, name: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn StageContentGroupsAsync(&self, names: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn StageContentGroupsWithPriorityAsync(&self, names: *mut foundation::collections::IIterable, moveToHeadOfQueue: bool, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn SetInUseAsync(&self, inUse: bool, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IPackage5 { - #[inline] pub unsafe fn get_content_groups_async(&self) -> Result>>> { + #[inline] pub fn get_content_groups_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetContentGroupsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_content_group_async(&self, name: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_content_group_async(&self, name: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetContentGroupAsync)(self as *const _ as *mut _, name.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn stage_content_groups_async(&self, names: &super::foundation::collections::IIterable) -> Result>>> { + }} + #[inline] pub fn stage_content_groups_async(&self, names: &foundation::collections::IIterable) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StageContentGroupsAsync)(self as *const _ as *mut _, names as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn stage_content_groups_with_priority_async(&self, names: &super::foundation::collections::IIterable, moveToHeadOfQueue: bool) -> Result>>> { + }} + #[inline] pub fn stage_content_groups_with_priority_async(&self, names: &foundation::collections::IIterable, moveToHeadOfQueue: bool) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StageContentGroupsWithPriorityAsync)(self as *const _ as *mut _, names as *const _ as *mut _, moveToHeadOfQueue, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_in_use_async(&self, inUse: bool) -> Result>> { + }} + #[inline] pub fn set_in_use_async(&self, inUse: bool) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetInUseAsync)(self as *const _ as *mut _, inUse, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PackageStaging(&self, token: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PackageInstalling(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PackageInstalling(&self, token: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PackageUpdating(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PackageUpdating(&self, token: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PackageUninstalling(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PackageUninstalling(&self, token: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PackageStatusChanged(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PackageStatusChanged(&self, token: super::foundation::EventRegistrationToken) -> HRESULT + fn add_PackageStaging(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PackageStaging(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PackageInstalling(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PackageInstalling(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PackageUpdating(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PackageUpdating(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PackageUninstalling(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PackageUninstalling(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PackageStatusChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PackageStatusChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IPackageCatalog { - #[inline] pub unsafe fn add_package_staging(&self, handler: &super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_package_staging(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PackageStaging)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_package_staging(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_package_staging(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PackageStaging)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_package_installing(&self, handler: &super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_package_installing(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PackageInstalling)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_package_installing(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_package_installing(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PackageInstalling)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_package_updating(&self, handler: &super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_package_updating(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PackageUpdating)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_package_updating(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_package_updating(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PackageUpdating)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_package_uninstalling(&self, handler: &super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_package_uninstalling(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PackageUninstalling)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_package_uninstalling(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_package_uninstalling(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PackageUninstalling)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_package_status_changed(&self, handler: &super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_package_status_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PackageStatusChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_package_status_changed(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_package_status_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PackageStatusChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PackageCatalog: IPackageCatalog} impl RtActivatable for PackageCatalog {} impl PackageCatalog { - #[inline] pub fn open_for_current_package() -> Result> { unsafe { + #[inline] pub fn open_for_current_package() -> Result>> { >::get_activation_factory().open_for_current_package() - }} - #[inline] pub fn open_for_current_user() -> Result> { unsafe { + } + #[inline] pub fn open_for_current_user() -> Result>> { >::get_activation_factory().open_for_current_user() - }} + } } DEFINE_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]) [CLSID_PackageCatalog]); DEFINE_IID!(IID_IPackageCatalog2, 2527464502, 36855, 17220, 182, 191, 238, 100, 194, 32, 126, 210); RT_INTERFACE!{interface IPackageCatalog2(IPackageCatalog2Vtbl): IInspectable(IInspectableVtbl) [IID_IPackageCatalog2] { - fn add_PackageContentGroupStaging(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PackageContentGroupStaging(&self, token: super::foundation::EventRegistrationToken) -> HRESULT, - fn AddOptionalPackageAsync(&self, optionalPackageFamilyName: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + fn add_PackageContentGroupStaging(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PackageContentGroupStaging(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn AddOptionalPackageAsync(&self, optionalPackageFamilyName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IPackageCatalog2 { - #[inline] pub unsafe fn add_package_content_group_staging(&self, handler: &super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_package_content_group_staging(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PackageContentGroupStaging)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_package_content_group_staging(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_package_content_group_staging(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PackageContentGroupStaging)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_optional_package_async(&self, optionalPackageFamilyName: &HStringArg) -> Result>> { + }} + #[inline] pub fn add_optional_package_async(&self, optionalPackageFamilyName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AddOptionalPackageAsync)(self as *const _ as *mut _, optionalPackageFamilyName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IPackageCatalog3, 2531089544, 34871, 17401, 144, 21, 3, 52, 52, 186, 20, 243); RT_INTERFACE!{interface IPackageCatalog3(IPackageCatalog3Vtbl): IInspectable(IInspectableVtbl) [IID_IPackageCatalog3] { - fn RemoveOptionalPackagesAsync(&self, optionalPackageFamilyNames: *mut super::foundation::collections::IIterable, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + fn RemoveOptionalPackagesAsync(&self, optionalPackageFamilyNames: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IPackageCatalog3 { - #[inline] pub unsafe fn remove_optional_packages_async(&self, optionalPackageFamilyNames: &super::foundation::collections::IIterable) -> Result>> { + #[inline] pub fn remove_optional_packages_async(&self, optionalPackageFamilyNames: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RemoveOptionalPackagesAsync)(self as *const _ as *mut _, optionalPackageFamilyNames as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IPackageCatalogAddOptionalPackageResult, 1005653204, 46303, 18355, 169, 99, 226, 250, 131, 47, 125, 211); RT_INTERFACE!{interface IPackageCatalogAddOptionalPackageResult(IPackageCatalogAddOptionalPackageResultVtbl): IInspectable(IInspectableVtbl) [IID_IPackageCatalogAddOptionalPackageResult] { fn get_Package(&self, out: *mut *mut Package) -> HRESULT, - fn get_ExtendedError(&self, out: *mut super::foundation::HResult) -> HRESULT + fn get_ExtendedError(&self, out: *mut foundation::HResult) -> HRESULT }} impl IPackageCatalogAddOptionalPackageResult { - #[inline] pub unsafe fn get_package(&self) -> Result> { + #[inline] pub fn get_package(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Package)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_error(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_extended_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PackageCatalogAddOptionalPackageResult: IPackageCatalogAddOptionalPackageResult} DEFINE_IID!(IID_IPackageCatalogRemoveOptionalPackagesResult, 701692283, 55668, 20068, 147, 89, 34, 202, 223, 215, 152, 40); RT_INTERFACE!{interface IPackageCatalogRemoveOptionalPackagesResult(IPackageCatalogRemoveOptionalPackagesResultVtbl): IInspectable(IInspectableVtbl) [IID_IPackageCatalogRemoveOptionalPackagesResult] { - fn get_PackagesRemoved(&self, out: *mut *mut super::foundation::collections::IVectorView) -> HRESULT, - fn get_ExtendedError(&self, out: *mut super::foundation::HResult) -> HRESULT + fn get_PackagesRemoved(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_ExtendedError(&self, out: *mut foundation::HResult) -> HRESULT }} impl IPackageCatalogRemoveOptionalPackagesResult { - #[inline] pub unsafe fn get_packages_removed(&self) -> Result>> { + #[inline] pub fn get_packages_removed(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PackagesRemoved)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_error(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_extended_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PackageCatalogRemoveOptionalPackagesResult: IPackageCatalogRemoveOptionalPackagesResult} DEFINE_IID!(IID_IPackageCatalogStatics, 2710345366, 58971, 17972, 186, 33, 94, 99, 235, 114, 68, 167); @@ -469,16 +469,16 @@ RT_INTERFACE!{static interface IPackageCatalogStatics(IPackageCatalogStaticsVtbl fn OpenForCurrentUser(&self, out: *mut *mut PackageCatalog) -> HRESULT }} impl IPackageCatalogStatics { - #[inline] pub unsafe fn open_for_current_package(&self) -> Result> { + #[inline] pub fn open_for_current_package(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenForCurrentPackage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn open_for_current_user(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn open_for_current_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenForCurrentUser)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IPackageContentGroup, 2405591389, 4618, 18328, 181, 225, 88, 0, 221, 168, 242, 225); RT_INTERFACE!{interface IPackageContentGroup(IPackageContentGroupVtbl): IInspectable(IInspectableVtbl) [IID_IPackageContentGroup] { @@ -488,33 +488,33 @@ RT_INTERFACE!{interface IPackageContentGroup(IPackageContentGroupVtbl): IInspect fn get_IsRequired(&self, out: *mut bool) -> HRESULT }} impl IPackageContentGroup { - #[inline] pub unsafe fn get_package(&self) -> Result> { + #[inline] pub fn get_package(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Package)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_state(&self) -> Result { + }} + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_required(&self) -> Result { + }} + #[inline] pub fn get_is_required(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsRequired)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PackageContentGroup: IPackageContentGroup} impl RtActivatable for PackageContentGroup {} impl PackageContentGroup { - #[inline] pub fn get_required_group_name() -> Result { unsafe { + #[inline] pub fn get_required_group_name() -> Result { >::get_activation_factory().get_required_group_name() - }} + } } DEFINE_CLSID!(PackageContentGroup(&[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,111,110,116,101,110,116,71,114,111,117,112,0]) [CLSID_PackageContentGroup]); DEFINE_IID!(IID_IPackageContentGroupStagingEventArgs, 1031520894, 28455, 17516, 152, 110, 212, 115, 61, 77, 145, 19); @@ -523,46 +523,46 @@ RT_INTERFACE!{interface IPackageContentGroupStagingEventArgs(IPackageContentGrou fn get_Package(&self, out: *mut *mut Package) -> HRESULT, fn get_Progress(&self, out: *mut f64) -> HRESULT, fn get_IsComplete(&self, out: *mut bool) -> HRESULT, - fn get_ErrorCode(&self, out: *mut super::foundation::HResult) -> HRESULT, + fn get_ErrorCode(&self, out: *mut foundation::HResult) -> HRESULT, fn get_ContentGroupName(&self, out: *mut HSTRING) -> HRESULT, fn get_IsContentGroupRequired(&self, out: *mut bool) -> HRESULT }} impl IPackageContentGroupStagingEventArgs { - #[inline] pub unsafe fn get_activity_id(&self) -> Result { + #[inline] pub fn get_activity_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ActivityId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_package(&self) -> Result> { + }} + #[inline] pub fn get_package(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Package)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_progress(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_progress(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Progress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_complete(&self) -> Result { + }} + #[inline] pub fn get_is_complete(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsComplete)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_error_code(&self) -> Result { + }} + #[inline] pub fn get_error_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ErrorCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_content_group_name(&self) -> Result { + }} + #[inline] pub fn get_content_group_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContentGroupName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_content_group_required(&self) -> Result { + }} + #[inline] pub fn get_is_content_group_required(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsContentGroupRequired)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PackageContentGroupStagingEventArgs: IPackageContentGroupStagingEventArgs} RT_ENUM! { enum PackageContentGroupState: i32 { @@ -573,11 +573,11 @@ RT_INTERFACE!{static interface IPackageContentGroupStatics(IPackageContentGroupS fn get_RequiredGroupName(&self, out: *mut HSTRING) -> HRESULT }} impl IPackageContentGroupStatics { - #[inline] pub unsafe fn get_required_group_name(&self) -> Result { + #[inline] pub fn get_required_group_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RequiredGroupName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IPackageId, 450586206, 14279, 18320, 153, 128, 221, 122, 231, 78, 139, 178); RT_INTERFACE!{interface IPackageId(IPackageIdVtbl): IInspectable(IInspectableVtbl) [IID_IPackageId] { @@ -592,46 +592,46 @@ RT_INTERFACE!{interface IPackageId(IPackageIdVtbl): IInspectable(IInspectableVtb fn get_FamilyName(&self, out: *mut HSTRING) -> HRESULT }} impl IPackageId { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_version(&self) -> Result { + }} + #[inline] pub fn get_version(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Version)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_architecture(&self) -> Result { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_architecture(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Architecture)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_resource_id(&self) -> Result { + }} + #[inline] pub fn get_resource_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResourceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_publisher(&self) -> Result { + }} + #[inline] pub fn get_publisher(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Publisher)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_publisher_id(&self) -> Result { + }} + #[inline] pub fn get_publisher_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PublisherId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_full_name(&self) -> Result { + }} + #[inline] pub fn get_full_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FullName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_family_name(&self) -> Result { + }} + #[inline] pub fn get_family_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FamilyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PackageId: IPackageId} DEFINE_IID!(IID_IPackageIdWithMetadata, 1079474812, 3230, 17469, 144, 116, 133, 95, 92, 224, 160, 141); @@ -640,16 +640,16 @@ RT_INTERFACE!{interface IPackageIdWithMetadata(IPackageIdWithMetadataVtbl): IIns fn get_Author(&self, out: *mut HSTRING) -> HRESULT }} impl IPackageIdWithMetadata { - #[inline] pub unsafe fn get_product_id(&self) -> Result { + #[inline] pub fn get_product_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProductId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_author(&self) -> Result { + }} + #[inline] pub fn get_author(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Author)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IPackageInstallingEventArgs, 2540969655, 43898, 16410, 139, 97, 235, 14, 127, 175, 242, 55); RT_INTERFACE!{interface IPackageInstallingEventArgs(IPackageInstallingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPackageInstallingEventArgs] { @@ -657,34 +657,34 @@ RT_INTERFACE!{interface IPackageInstallingEventArgs(IPackageInstallingEventArgsV fn get_Package(&self, out: *mut *mut Package) -> HRESULT, fn get_Progress(&self, out: *mut f64) -> HRESULT, fn get_IsComplete(&self, out: *mut bool) -> HRESULT, - fn get_ErrorCode(&self, out: *mut super::foundation::HResult) -> HRESULT + fn get_ErrorCode(&self, out: *mut foundation::HResult) -> HRESULT }} impl IPackageInstallingEventArgs { - #[inline] pub unsafe fn get_activity_id(&self) -> Result { + #[inline] pub fn get_activity_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ActivityId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_package(&self) -> Result> { + }} + #[inline] pub fn get_package(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Package)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_progress(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_progress(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Progress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_complete(&self) -> Result { + }} + #[inline] pub fn get_is_complete(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsComplete)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_error_code(&self) -> Result { + }} + #[inline] pub fn get_error_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ErrorCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PackageInstallingEventArgs: IPackageInstallingEventArgs} RT_ENUM! { enum PackageSignatureKind: i32 { @@ -696,34 +696,34 @@ RT_INTERFACE!{interface IPackageStagingEventArgs(IPackageStagingEventArgsVtbl): fn get_Package(&self, out: *mut *mut Package) -> HRESULT, fn get_Progress(&self, out: *mut f64) -> HRESULT, fn get_IsComplete(&self, out: *mut bool) -> HRESULT, - fn get_ErrorCode(&self, out: *mut super::foundation::HResult) -> HRESULT + fn get_ErrorCode(&self, out: *mut foundation::HResult) -> HRESULT }} impl IPackageStagingEventArgs { - #[inline] pub unsafe fn get_activity_id(&self) -> Result { + #[inline] pub fn get_activity_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ActivityId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_package(&self) -> Result> { + }} + #[inline] pub fn get_package(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Package)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_progress(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_progress(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Progress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_complete(&self) -> Result { + }} + #[inline] pub fn get_is_complete(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsComplete)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_error_code(&self) -> Result { + }} + #[inline] pub fn get_error_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ErrorCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PackageStagingEventArgs: IPackageStagingEventArgs} DEFINE_IID!(IID_IPackageStatics, 1314081759, 10592, 18552, 151, 164, 150, 36, 222, 183, 47, 45); @@ -731,11 +731,11 @@ RT_INTERFACE!{static interface IPackageStatics(IPackageStaticsVtbl): IInspectabl fn get_Current(&self, out: *mut *mut Package) -> HRESULT }} impl IPackageStatics { - #[inline] pub unsafe fn get_current(&self) -> Result> { + #[inline] pub fn get_current(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Current)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IPackageStatus, 1608994673, 41829, 19465, 160, 45, 4, 109, 82, 94, 161, 218); RT_INTERFACE!{interface IPackageStatus(IPackageStatusVtbl): IInspectable(IInspectableVtbl) [IID_IPackageStatus] { @@ -753,66 +753,66 @@ RT_INTERFACE!{interface IPackageStatus(IPackageStatusVtbl): IInspectable(IInspec fn get_DeploymentInProgress(&self, out: *mut bool) -> HRESULT }} impl IPackageStatus { - #[inline] pub unsafe fn verify_is_ok(&self) -> Result { + #[inline] pub fn verify_is_ok(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).VerifyIsOK)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_not_available(&self) -> Result { + }} + #[inline] pub fn get_not_available(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NotAvailable)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_package_offline(&self) -> Result { + }} + #[inline] pub fn get_package_offline(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PackageOffline)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_data_offline(&self) -> Result { + }} + #[inline] pub fn get_data_offline(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DataOffline)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_disabled(&self) -> Result { + }} + #[inline] pub fn get_disabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Disabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_needs_remediation(&self) -> Result { + }} + #[inline] pub fn get_needs_remediation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NeedsRemediation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_license_issue(&self) -> Result { + }} + #[inline] pub fn get_license_issue(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LicenseIssue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_modified(&self) -> Result { + }} + #[inline] pub fn get_modified(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Modified)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_tampered(&self) -> Result { + }} + #[inline] pub fn get_tampered(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Tampered)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_dependency_issue(&self) -> Result { + }} + #[inline] pub fn get_dependency_issue(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DependencyIssue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_servicing(&self) -> Result { + }} + #[inline] pub fn get_servicing(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Servicing)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_deployment_in_progress(&self) -> Result { + }} + #[inline] pub fn get_deployment_in_progress(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DeploymentInProgress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PackageStatus: IPackageStatus} DEFINE_IID!(IID_IPackageStatus2, 4096326291, 31830, 18530, 172, 250, 171, 174, 220, 192, 105, 77); @@ -820,22 +820,22 @@ RT_INTERFACE!{interface IPackageStatus2(IPackageStatus2Vtbl): IInspectable(IInsp fn get_IsPartiallyStaged(&self, out: *mut bool) -> HRESULT }} impl IPackageStatus2 { - #[inline] pub unsafe fn get_is_partially_staged(&self) -> Result { + #[inline] pub fn get_is_partially_staged(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPartiallyStaged)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut Package) -> HRESULT }} impl IPackageStatusChangedEventArgs { - #[inline] pub unsafe fn get_package(&self) -> Result> { + #[inline] pub fn get_package(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Package)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PackageStatusChangedEventArgs: IPackageStatusChangedEventArgs} DEFINE_IID!(IID_IPackageUninstallingEventArgs, 1145285202, 43810, 17613, 130, 187, 78, 201, 184, 39, 54, 122); @@ -844,34 +844,34 @@ RT_INTERFACE!{interface IPackageUninstallingEventArgs(IPackageUninstallingEventA fn get_Package(&self, out: *mut *mut Package) -> HRESULT, fn get_Progress(&self, out: *mut f64) -> HRESULT, fn get_IsComplete(&self, out: *mut bool) -> HRESULT, - fn get_ErrorCode(&self, out: *mut super::foundation::HResult) -> HRESULT + fn get_ErrorCode(&self, out: *mut foundation::HResult) -> HRESULT }} impl IPackageUninstallingEventArgs { - #[inline] pub unsafe fn get_activity_id(&self) -> Result { + #[inline] pub fn get_activity_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ActivityId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_package(&self) -> Result> { + }} + #[inline] pub fn get_package(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Package)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_progress(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_progress(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Progress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_complete(&self) -> Result { + }} + #[inline] pub fn get_is_complete(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsComplete)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_error_code(&self) -> Result { + }} + #[inline] pub fn get_error_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ErrorCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PackageUninstallingEventArgs: IPackageUninstallingEventArgs} DEFINE_IID!(IID_IPackageUpdatingEventArgs, 3447407144, 64884, 17470, 177, 20, 35, 230, 119, 176, 232, 111); @@ -881,39 +881,39 @@ RT_INTERFACE!{interface IPackageUpdatingEventArgs(IPackageUpdatingEventArgsVtbl) fn get_TargetPackage(&self, out: *mut *mut Package) -> HRESULT, fn get_Progress(&self, out: *mut f64) -> HRESULT, fn get_IsComplete(&self, out: *mut bool) -> HRESULT, - fn get_ErrorCode(&self, out: *mut super::foundation::HResult) -> HRESULT + fn get_ErrorCode(&self, out: *mut foundation::HResult) -> HRESULT }} impl IPackageUpdatingEventArgs { - #[inline] pub unsafe fn get_activity_id(&self) -> Result { + #[inline] pub fn get_activity_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ActivityId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_source_package(&self) -> Result> { + }} + #[inline] pub fn get_source_package(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SourcePackage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_target_package(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_target_package(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TargetPackage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_progress(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_progress(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Progress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_complete(&self) -> Result { + }} + #[inline] pub fn get_is_complete(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsComplete)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_error_code(&self) -> Result { + }} + #[inline] pub fn get_error_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ErrorCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PackageUpdatingEventArgs: IPackageUpdatingEventArgs} RT_STRUCT! { struct PackageVersion { @@ -921,63 +921,63 @@ RT_STRUCT! { struct PackageVersion { }} 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(&self, out: *mut super::foundation::DateTime) -> HRESULT, + fn get_InstallDate(&self, out: *mut foundation::DateTime) -> HRESULT, fn GetThumbnailToken(&self, out: *mut HSTRING) -> HRESULT, fn Launch(&self, parameters: HSTRING) -> HRESULT }} impl IPackageWithMetadata { - #[inline] pub unsafe fn get_install_date(&self) -> Result { + #[inline] pub fn get_install_date(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InstallDate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_thumbnail_token(&self) -> Result { + }} + #[inline] pub fn get_thumbnail_token(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetThumbnailToken)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn launch(&self, parameters: &HStringArg) -> Result<()> { + }} + #[inline] pub fn launch(&self, parameters: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Launch)(self as *const _ as *mut _, parameters.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn RequestEnableAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn Disable(&self) -> HRESULT, fn get_State(&self, out: *mut StartupTaskState) -> HRESULT, fn get_TaskId(&self, out: *mut HSTRING) -> HRESULT }} impl IStartupTask { - #[inline] pub unsafe fn request_enable_async(&self) -> Result>> { + #[inline] pub fn request_enable_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestEnableAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn disable(&self) -> Result<()> { + }} + #[inline] pub fn disable(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Disable)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_state(&self) -> Result { + }} + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_task_id(&self) -> Result { + }} + #[inline] pub fn get_task_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TaskId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class StartupTask: IStartupTask} impl RtActivatable for StartupTask {} impl StartupTask { - #[inline] pub fn get_for_current_package_async() -> Result>>> { unsafe { + #[inline] pub fn get_for_current_package_async() -> Result>>> { >::get_activation_factory().get_for_current_package_async() - }} - #[inline] pub fn get_async(taskId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn get_async(taskId: &HStringArg) -> Result>> { >::get_activation_factory().get_async(taskId) - }} + } } DEFINE_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]) [CLSID_StartupTask]); RT_ENUM! { enum StartupTaskState: i32 { @@ -985,30 +985,30 @@ RT_ENUM! { enum StartupTaskState: i32 { }} 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(&self, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, - fn GetAsync(&self, taskId: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + fn GetForCurrentPackageAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetAsync(&self, taskId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IStartupTaskStatics { - #[inline] pub unsafe fn get_for_current_package_async(&self) -> Result>>> { + #[inline] pub fn get_for_current_package_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentPackageAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_async(&self, taskId: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_async(&self, taskId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAsync)(self as *const _ as *mut _, taskId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self) -> HRESULT }} impl ISuspendingDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SuspendingDeferral: ISuspendingDeferral} DEFINE_IID!(IID_ISuspendingEventArgs, 2516982789, 11706, 19720, 176, 189, 43, 48, 161, 49, 198, 170); @@ -1016,29 +1016,29 @@ RT_INTERFACE!{interface ISuspendingEventArgs(ISuspendingEventArgsVtbl): IInspect fn get_SuspendingOperation(&self, out: *mut *mut SuspendingOperation) -> HRESULT }} impl ISuspendingEventArgs { - #[inline] pub unsafe fn get_suspending_operation(&self) -> Result> { + #[inline] pub fn get_suspending_operation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SuspendingOperation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SuspendingEventArgs: ISuspendingEventArgs} 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(&self, out: *mut *mut SuspendingDeferral) -> HRESULT, - fn get_Deadline(&self, out: *mut super::foundation::DateTime) -> HRESULT + fn get_Deadline(&self, out: *mut foundation::DateTime) -> HRESULT }} impl ISuspendingOperation { - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deadline(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deadline(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Deadline)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SuspendingOperation: ISuspendingOperation} pub mod calls { // Windows.ApplicationModel.Calls @@ -1048,11 +1048,11 @@ RT_INTERFACE!{interface ICallAnswerEventArgs(ICallAnswerEventArgsVtbl): IInspect fn get_AcceptedMedia(&self, out: *mut VoipPhoneCallMedia) -> HRESULT }} impl ICallAnswerEventArgs { - #[inline] pub unsafe fn get_accepted_media(&self) -> Result { + #[inline] pub fn get_accepted_media(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AcceptedMedia)(self as *const _ as *mut _, &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); @@ -1060,11 +1060,11 @@ RT_INTERFACE!{interface ICallRejectEventArgs(ICallRejectEventArgsVtbl): IInspect fn get_RejectReason(&self, out: *mut VoipPhoneCallRejectReason) -> HRESULT }} impl ICallRejectEventArgs { - #[inline] pub unsafe fn get_reject_reason(&self) -> Result { + #[inline] pub fn get_reject_reason(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RejectReason)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class CallRejectEventArgs: ICallRejectEventArgs} DEFINE_IID!(IID_ICallStateChangeEventArgs, 3937547422, 26357, 18425, 159, 181, 69, 156, 81, 152, 199, 32); @@ -1072,11 +1072,11 @@ RT_INTERFACE!{interface ICallStateChangeEventArgs(ICallStateChangeEventArgsVtbl) fn get_State(&self, out: *mut VoipPhoneCallState) -> HRESULT }} impl ICallStateChangeEventArgs { - #[inline] pub unsafe fn get_state(&self) -> Result { + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class CallStateChangeEventArgs: ICallStateChangeEventArgs} DEFINE_IID!(IID_ILockScreenCallEndCallDeferral, 769125645, 39149, 16449, 150, 50, 80, 255, 129, 43, 119, 63); @@ -1084,72 +1084,72 @@ RT_INTERFACE!{interface ILockScreenCallEndCallDeferral(ILockScreenCallEndCallDef fn Complete(&self) -> HRESULT }} impl ILockScreenCallEndCallDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class LockScreenCallEndCallDeferral: ILockScreenCallEndCallDeferral} 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(&self, out: *mut *mut LockScreenCallEndCallDeferral) -> HRESULT, - fn get_Deadline(&self, out: *mut super::super::foundation::DateTime) -> HRESULT + fn get_Deadline(&self, out: *mut foundation::DateTime) -> HRESULT }} impl ILockScreenCallEndRequestedEventArgs { - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deadline(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deadline(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Deadline)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class LockScreenCallEndRequestedEventArgs: ILockScreenCallEndRequestedEventArgs} 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(&self) -> HRESULT, - fn add_EndRequested(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_EndRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Closed(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Closed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_EndRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_EndRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Closed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Closed(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_CallTitle(&self, out: *mut HSTRING) -> HRESULT, fn put_CallTitle(&self, value: HSTRING) -> HRESULT }} impl ILockScreenCallUI { - #[inline] pub unsafe fn dismiss(&self) -> Result<()> { + #[inline] pub fn dismiss(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Dismiss)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_end_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_end_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_EndRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_end_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_end_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_EndRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_closed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_closed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Closed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_closed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_closed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Closed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_call_title(&self) -> Result { + }} + #[inline] pub fn get_call_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CallTitle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_call_title(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_call_title(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CallTitle)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class LockScreenCallUI: ILockScreenCallUI} DEFINE_IID!(IID_IMuteChangeEventArgs, 2240143705, 3137, 17196, 129, 77, 197, 241, 253, 245, 48, 190); @@ -1157,11 +1157,11 @@ RT_INTERFACE!{interface IMuteChangeEventArgs(IMuteChangeEventArgsVtbl): IInspect fn get_Muted(&self, out: *mut bool) -> HRESULT }} impl IMuteChangeEventArgs { - #[inline] pub unsafe fn get_muted(&self) -> Result { + #[inline] pub fn get_muted(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Muted)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MuteChangeEventArgs: IMuteChangeEventArgs} DEFINE_IID!(IID_IPhoneCallHistoryEntry, 4205895977, 12964, 19333, 131, 209, 249, 13, 140, 35, 168, 87); @@ -1169,8 +1169,8 @@ RT_INTERFACE!{interface IPhoneCallHistoryEntry(IPhoneCallHistoryEntryVtbl): IIns fn get_Id(&self, out: *mut HSTRING) -> HRESULT, fn get_Address(&self, out: *mut *mut PhoneCallHistoryEntryAddress) -> HRESULT, fn put_Address(&self, value: *mut PhoneCallHistoryEntryAddress) -> HRESULT, - fn get_Duration(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_Duration(&self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_Duration(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_Duration(&self, value: *mut foundation::IReference) -> HRESULT, fn get_IsCallerIdBlocked(&self, out: *mut bool) -> HRESULT, fn put_IsCallerIdBlocked(&self, value: bool) -> HRESULT, fn get_IsEmergency(&self, out: *mut bool) -> HRESULT, @@ -1198,164 +1198,164 @@ RT_INTERFACE!{interface IPhoneCallHistoryEntry(IPhoneCallHistoryEntryVtbl): IIns fn put_SourceId(&self, value: HSTRING) -> HRESULT, fn get_SourceIdKind(&self, out: *mut PhoneCallHistorySourceIdKind) -> HRESULT, fn put_SourceIdKind(&self, value: PhoneCallHistorySourceIdKind) -> HRESULT, - fn get_StartTime(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn put_StartTime(&self, value: super::super::foundation::DateTime) -> HRESULT + fn get_StartTime(&self, out: *mut foundation::DateTime) -> HRESULT, + fn put_StartTime(&self, value: foundation::DateTime) -> HRESULT }} impl IPhoneCallHistoryEntry { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_address(&self) -> Result> { + }} + #[inline] pub fn get_address(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Address)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_address(&self, value: &PhoneCallHistoryEntryAddress) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_address(&self, value: &PhoneCallHistoryEntryAddress) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Address)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_duration(&self) -> Result>> { + }} + #[inline] pub fn get_duration(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Duration)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_duration(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_duration(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Duration)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_caller_id_blocked(&self) -> Result { + }} + #[inline] pub fn get_is_caller_id_blocked(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCallerIdBlocked)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_caller_id_blocked(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_caller_id_blocked(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsCallerIdBlocked)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_emergency(&self) -> Result { + }} + #[inline] pub fn get_is_emergency(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsEmergency)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_emergency(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_emergency(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsEmergency)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_incoming(&self) -> Result { + }} + #[inline] pub fn get_is_incoming(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsIncoming)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_incoming(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_incoming(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsIncoming)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_missed(&self) -> Result { + }} + #[inline] pub fn get_is_missed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsMissed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_missed(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_missed(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsMissed)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_ringing(&self) -> Result { + }} + #[inline] pub fn get_is_ringing(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsRinging)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_ringing(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_ringing(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsRinging)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_seen(&self) -> Result { + }} + #[inline] pub fn get_is_seen(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSeen)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_seen(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_seen(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsSeen)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_suppressed(&self) -> Result { + }} + #[inline] pub fn get_is_suppressed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSuppressed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_suppressed(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_suppressed(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsSuppressed)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_voicemail(&self) -> Result { + }} + #[inline] pub fn get_is_voicemail(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsVoicemail)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_voicemail(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_voicemail(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsVoicemail)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_media(&self) -> Result { + }} + #[inline] pub fn get_media(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Media)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_media(&self, value: PhoneCallHistoryEntryMedia) -> Result<()> { + }} + #[inline] pub fn set_media(&self, value: PhoneCallHistoryEntryMedia) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Media)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_other_app_read_access(&self) -> Result { + }} + #[inline] pub fn get_other_app_read_access(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OtherAppReadAccess)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_other_app_read_access(&self, value: PhoneCallHistoryEntryOtherAppReadAccess) -> Result<()> { + }} + #[inline] pub fn set_other_app_read_access(&self, value: PhoneCallHistoryEntryOtherAppReadAccess) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OtherAppReadAccess)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_id(&self) -> Result { + }} + #[inline] pub fn get_remote_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_remote_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_remote_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RemoteId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_source_display_name(&self) -> Result { + }} + #[inline] pub fn get_source_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SourceDisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_source_id(&self) -> Result { + }} + #[inline] pub fn get_source_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SourceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_source_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_source_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SourceId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_source_id_kind(&self) -> Result { + }} + #[inline] pub fn get_source_id_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SourceIdKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_source_id_kind(&self, value: PhoneCallHistorySourceIdKind) -> Result<()> { + }} + #[inline] pub fn set_source_id_kind(&self, value: PhoneCallHistorySourceIdKind) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SourceIdKind)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_start_time(&self) -> Result { + }} + #[inline] pub fn get_start_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StartTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_start_time(&self, value: super::super::foundation::DateTime) -> Result<()> { + }} + #[inline] pub fn set_start_time(&self, value: foundation::DateTime) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StartTime)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PhoneCallHistoryEntry: IPhoneCallHistoryEntry} impl RtActivatable for PhoneCallHistoryEntry {} @@ -1372,50 +1372,50 @@ RT_INTERFACE!{interface IPhoneCallHistoryEntryAddress(IPhoneCallHistoryEntryAddr fn put_RawAddressKind(&self, value: PhoneCallHistoryEntryRawAddressKind) -> HRESULT }} impl IPhoneCallHistoryEntryAddress { - #[inline] pub unsafe fn get_contact_id(&self) -> Result { + #[inline] pub fn get_contact_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContactId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_contact_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_contact_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ContactId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_display_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_raw_address(&self) -> Result { + }} + #[inline] pub fn get_raw_address(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RawAddress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_raw_address(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_raw_address(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RawAddress)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_raw_address_kind(&self) -> Result { + }} + #[inline] pub fn get_raw_address_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RawAddressKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_raw_address_kind(&self, value: PhoneCallHistoryEntryRawAddressKind) -> Result<()> { + }} + #[inline] pub fn set_raw_address_kind(&self, value: PhoneCallHistoryEntryRawAddressKind) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RawAddressKind)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PhoneCallHistoryEntryAddress: IPhoneCallHistoryEntryAddress} impl RtActivatable for PhoneCallHistoryEntryAddress {} impl RtActivatable for PhoneCallHistoryEntryAddress {} impl PhoneCallHistoryEntryAddress { - #[inline] pub fn create(rawAddress: &HStringArg, rawAddressKind: PhoneCallHistoryEntryRawAddressKind) -> Result> { unsafe { + #[inline] pub fn create(rawAddress: &HStringArg, rawAddressKind: PhoneCallHistoryEntryRawAddressKind) -> Result> { >::get_activation_factory().create(rawAddress, rawAddressKind) - }} + } } DEFINE_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]) [CLSID_PhoneCallHistoryEntryAddress]); DEFINE_IID!(IID_IPhoneCallHistoryEntryAddressFactory, 4212108730, 51184, 19382, 159, 107, 186, 93, 115, 32, 154, 202); @@ -1423,11 +1423,11 @@ RT_INTERFACE!{static interface IPhoneCallHistoryEntryAddressFactory(IPhoneCallHi fn Create(&self, rawAddress: HSTRING, rawAddressKind: PhoneCallHistoryEntryRawAddressKind, out: *mut *mut PhoneCallHistoryEntryAddress) -> HRESULT }} impl IPhoneCallHistoryEntryAddressFactory { - #[inline] pub unsafe fn create(&self, rawAddress: &HStringArg, rawAddressKind: PhoneCallHistoryEntryRawAddressKind) -> Result> { + #[inline] pub fn create(&self, rawAddress: &HStringArg, rawAddressKind: PhoneCallHistoryEntryRawAddressKind) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, rawAddress.get(), rawAddressKind, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum PhoneCallHistoryEntryMedia: i32 { Audio (PhoneCallHistoryEntryMedia_Audio) = 0, Video (PhoneCallHistoryEntryMedia_Video) = 1, @@ -1442,23 +1442,23 @@ DEFINE_IID!(IID_IPhoneCallHistoryEntryQueryOptions, 2623529308, 35821, 16586, 17 RT_INTERFACE!{interface IPhoneCallHistoryEntryQueryOptions(IPhoneCallHistoryEntryQueryOptionsVtbl): IInspectable(IInspectableVtbl) [IID_IPhoneCallHistoryEntryQueryOptions] { fn get_DesiredMedia(&self, out: *mut PhoneCallHistoryEntryQueryDesiredMedia) -> HRESULT, fn put_DesiredMedia(&self, value: PhoneCallHistoryEntryQueryDesiredMedia) -> HRESULT, - fn get_SourceIds(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_SourceIds(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IPhoneCallHistoryEntryQueryOptions { - #[inline] pub unsafe fn get_desired_media(&self) -> Result { + #[inline] pub fn get_desired_media(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DesiredMedia)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_desired_media(&self, value: PhoneCallHistoryEntryQueryDesiredMedia) -> Result<()> { + }} + #[inline] pub fn set_desired_media(&self, value: PhoneCallHistoryEntryQueryDesiredMedia) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DesiredMedia)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_source_ids(&self) -> Result>> { + }} + #[inline] pub fn get_source_ids(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SourceIds)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PhoneCallHistoryEntryQueryOptions: IPhoneCallHistoryEntryQueryOptions} impl RtActivatable for PhoneCallHistoryEntryQueryOptions {} @@ -1468,147 +1468,147 @@ RT_ENUM! { enum PhoneCallHistoryEntryRawAddressKind: i32 { }} 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn ReadBatchAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IPhoneCallHistoryEntryReader { - #[inline] pub unsafe fn read_batch_async(&self) -> Result>>> { + #[inline] pub fn read_batch_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadBatchAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PhoneCallHistoryEntryReader: IPhoneCallHistoryEntryReader} RT_CLASS!{static class PhoneCallHistoryManager} impl RtActivatable for PhoneCallHistoryManager {} impl RtActivatable for PhoneCallHistoryManager {} impl PhoneCallHistoryManager { - #[inline] pub fn request_store_async(accessType: PhoneCallHistoryStoreAccessType) -> Result>> { unsafe { + #[inline] pub fn request_store_async(accessType: PhoneCallHistoryStoreAccessType) -> Result>> { >::get_activation_factory().request_store_async(accessType) - }} - #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::super::system::User) -> Result> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::super::system::User) -> Result>> { >::get_activation_factory().get_for_user(user) - }} + } } DEFINE_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]) [CLSID_PhoneCallHistoryManager]); 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(&self, accessType: PhoneCallHistoryStoreAccessType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestStoreAsync(&self, accessType: PhoneCallHistoryStoreAccessType, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(feature="windows-system")] fn get_User(&self, out: *mut *mut super::super::system::User) -> HRESULT }} impl IPhoneCallHistoryManagerForUser { - #[inline] pub unsafe fn request_store_async(&self, accessType: PhoneCallHistoryStoreAccessType) -> Result>> { + #[inline] pub fn request_store_async(&self, accessType: PhoneCallHistoryStoreAccessType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestStoreAsync)(self as *const _ as *mut _, accessType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_user(&self) -> Result> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_User)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PhoneCallHistoryManagerForUser: IPhoneCallHistoryManagerForUser} 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(&self, accessType: PhoneCallHistoryStoreAccessType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn RequestStoreAsync(&self, accessType: PhoneCallHistoryStoreAccessType, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IPhoneCallHistoryManagerStatics { - #[inline] pub unsafe fn request_store_async(&self, accessType: PhoneCallHistoryStoreAccessType) -> Result>> { + #[inline] pub fn request_store_async(&self, accessType: PhoneCallHistoryStoreAccessType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestStoreAsync)(self as *const _ as *mut _, accessType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, user: *mut super::super::system::User, out: *mut *mut PhoneCallHistoryManagerForUser) -> HRESULT }} impl IPhoneCallHistoryManagerStatics2 { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_for_user(&self, user: &super::super::system::User) -> Result> { + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(&self, user: &super::super::system::User) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForUser)(self as *const _ as *mut _, user as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum PhoneCallHistorySourceIdKind: i32 { CellularPhoneLineId (PhoneCallHistorySourceIdKind_CellularPhoneLineId) = 0, PackageFamilyName (PhoneCallHistorySourceIdKind_PackageFamilyName) = 1, }} 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(&self, callHistoryEntryId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetEntryAsync(&self, callHistoryEntryId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetEntryReader(&self, out: *mut *mut PhoneCallHistoryEntryReader) -> HRESULT, fn GetEntryReaderWithOptions(&self, queryOptions: *mut PhoneCallHistoryEntryQueryOptions, out: *mut *mut PhoneCallHistoryEntryReader) -> HRESULT, - fn SaveEntryAsync(&self, callHistoryEntry: *mut PhoneCallHistoryEntry, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn DeleteEntryAsync(&self, callHistoryEntry: *mut PhoneCallHistoryEntry, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn DeleteEntriesAsync(&self, callHistoryEntries: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn MarkEntryAsSeenAsync(&self, callHistoryEntry: *mut PhoneCallHistoryEntry, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn MarkEntriesAsSeenAsync(&self, callHistoryEntries: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn GetUnseenCountAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn MarkAllAsSeenAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn GetSourcesUnseenCountAsync(&self, sourceIds: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn MarkSourcesAsSeenAsync(&self, sourceIds: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn SaveEntryAsync(&self, callHistoryEntry: *mut PhoneCallHistoryEntry, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn DeleteEntryAsync(&self, callHistoryEntry: *mut PhoneCallHistoryEntry, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn DeleteEntriesAsync(&self, callHistoryEntries: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn MarkEntryAsSeenAsync(&self, callHistoryEntry: *mut PhoneCallHistoryEntry, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn MarkEntriesAsSeenAsync(&self, callHistoryEntries: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn GetUnseenCountAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn MarkAllAsSeenAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn GetSourcesUnseenCountAsync(&self, sourceIds: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn MarkSourcesAsSeenAsync(&self, sourceIds: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IPhoneCallHistoryStore { - #[inline] pub unsafe fn get_entry_async(&self, callHistoryEntryId: &HStringArg) -> Result>> { + #[inline] pub fn get_entry_async(&self, callHistoryEntryId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetEntryAsync)(self as *const _ as *mut _, callHistoryEntryId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_entry_reader(&self) -> Result> { + }} + #[inline] pub fn get_entry_reader(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetEntryReader)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_entry_reader_with_options(&self, queryOptions: &PhoneCallHistoryEntryQueryOptions) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_entry_reader_with_options(&self, queryOptions: &PhoneCallHistoryEntryQueryOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetEntryReaderWithOptions)(self as *const _ as *mut _, queryOptions as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn save_entry_async(&self, callHistoryEntry: &PhoneCallHistoryEntry) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn save_entry_async(&self, callHistoryEntry: &PhoneCallHistoryEntry) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveEntryAsync)(self as *const _ as *mut _, callHistoryEntry as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete_entry_async(&self, callHistoryEntry: &PhoneCallHistoryEntry) -> Result> { + }} + #[inline] pub fn delete_entry_async(&self, callHistoryEntry: &PhoneCallHistoryEntry) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteEntryAsync)(self as *const _ as *mut _, callHistoryEntry as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete_entries_async(&self, callHistoryEntries: &super::super::foundation::collections::IIterable) -> Result> { + }} + #[inline] pub fn delete_entries_async(&self, callHistoryEntries: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteEntriesAsync)(self as *const _ as *mut _, callHistoryEntries as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn mark_entry_as_seen_async(&self, callHistoryEntry: &PhoneCallHistoryEntry) -> Result> { + }} + #[inline] pub fn mark_entry_as_seen_async(&self, callHistoryEntry: &PhoneCallHistoryEntry) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MarkEntryAsSeenAsync)(self as *const _ as *mut _, callHistoryEntry as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn mark_entries_as_seen_async(&self, callHistoryEntries: &super::super::foundation::collections::IIterable) -> Result> { + }} + #[inline] pub fn mark_entries_as_seen_async(&self, callHistoryEntries: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MarkEntriesAsSeenAsync)(self as *const _ as *mut _, 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(&self) -> Result>> { + }} + #[inline] pub fn get_unseen_count_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetUnseenCountAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn mark_all_as_seen_async(&self) -> Result> { + }} + #[inline] pub fn mark_all_as_seen_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MarkAllAsSeenAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sources_unseen_count_async(&self, sourceIds: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn get_sources_unseen_count_async(&self, sourceIds: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSourcesUnseenCountAsync)(self as *const _ as *mut _, 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(&self, sourceIds: &super::super::foundation::collections::IIterable) -> Result> { + }} + #[inline] pub fn mark_sources_as_seen_async(&self, sourceIds: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MarkSourcesAsSeenAsync)(self as *const _ as *mut _, sourceIds as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PhoneCallHistoryStore: IPhoneCallHistoryStore} RT_ENUM! { enum PhoneCallHistoryStoreAccessType: i32 { @@ -1616,76 +1616,76 @@ RT_ENUM! { enum PhoneCallHistoryStoreAccessType: i32 { }} 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(&self, taskEntryPoint: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_MuteStateChanged(&self, muteChangeHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_MuteStateChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn RequestNewIncomingCall(&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 ReserveCallResourcesAsync(&self, taskEntryPoint: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_MuteStateChanged(&self, muteChangeHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_MuteStateChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn RequestNewIncomingCall(&self, context: HSTRING, contactName: HSTRING, contactNumber: HSTRING, contactImage: *mut foundation::Uri, serviceName: HSTRING, brandingImage: *mut foundation::Uri, callDetails: HSTRING, ringtone: *mut foundation::Uri, media: VoipPhoneCallMedia, ringTimeout: foundation::TimeSpan, out: *mut *mut VoipPhoneCall) -> HRESULT, fn RequestNewOutgoingCall(&self, context: HSTRING, contactName: HSTRING, serviceName: HSTRING, media: VoipPhoneCallMedia, out: *mut *mut VoipPhoneCall) -> HRESULT, fn NotifyMuted(&self) -> HRESULT, fn NotifyUnmuted(&self) -> HRESULT, fn RequestOutgoingUpgradeToVideoCall(&self, callUpgradeGuid: Guid, context: HSTRING, contactName: HSTRING, serviceName: HSTRING, out: *mut *mut VoipPhoneCall) -> HRESULT, - fn RequestIncomingUpgradeToVideoCall(&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 RequestIncomingUpgradeToVideoCall(&self, context: HSTRING, contactName: HSTRING, contactNumber: HSTRING, contactImage: *mut foundation::Uri, serviceName: HSTRING, brandingImage: *mut foundation::Uri, callDetails: HSTRING, ringtone: *mut foundation::Uri, ringTimeout: foundation::TimeSpan, out: *mut *mut VoipPhoneCall) -> HRESULT, fn TerminateCellularCall(&self, callUpgradeGuid: Guid) -> HRESULT, fn CancelUpgrade(&self, callUpgradeGuid: Guid) -> HRESULT }} impl IVoipCallCoordinator { - #[inline] pub unsafe fn reserve_call_resources_async(&self, taskEntryPoint: &HStringArg) -> Result>> { + #[inline] pub fn reserve_call_resources_async(&self, taskEntryPoint: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReserveCallResourcesAsync)(self as *const _ as *mut _, taskEntryPoint.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_mute_state_changed(&self, muteChangeHandler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_mute_state_changed(&self, muteChangeHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_MuteStateChanged)(self as *const _ as *mut _, muteChangeHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_mute_state_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_mute_state_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_MuteStateChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn request_new_incoming_call(&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> { + }} + #[inline] pub fn request_new_incoming_call(&self, context: &HStringArg, contactName: &HStringArg, contactNumber: &HStringArg, contactImage: &foundation::Uri, serviceName: &HStringArg, brandingImage: &foundation::Uri, callDetails: &HStringArg, ringtone: &foundation::Uri, media: VoipPhoneCallMedia, ringTimeout: foundation::TimeSpan) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestNewIncomingCall)(self as *const _ as *mut _, 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 request_new_outgoing_call(&self, context: &HStringArg, contactName: &HStringArg, serviceName: &HStringArg, media: VoipPhoneCallMedia) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn request_new_outgoing_call(&self, context: &HStringArg, contactName: &HStringArg, serviceName: &HStringArg, media: VoipPhoneCallMedia) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestNewOutgoingCall)(self as *const _ as *mut _, context.get(), contactName.get(), serviceName.get(), media, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn notify_muted(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn notify_muted(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).NotifyMuted)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn notify_unmuted(&self) -> Result<()> { + }} + #[inline] pub fn notify_unmuted(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).NotifyUnmuted)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn request_outgoing_upgrade_to_video_call(&self, callUpgradeGuid: Guid, context: &HStringArg, contactName: &HStringArg, serviceName: &HStringArg) -> Result> { + }} + #[inline] pub fn request_outgoing_upgrade_to_video_call(&self, callUpgradeGuid: Guid, context: &HStringArg, contactName: &HStringArg, serviceName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestOutgoingUpgradeToVideoCall)(self as *const _ as *mut _, callUpgradeGuid, context.get(), contactName.get(), serviceName.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_incoming_upgrade_to_video_call(&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> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn request_incoming_upgrade_to_video_call(&self, context: &HStringArg, contactName: &HStringArg, contactNumber: &HStringArg, contactImage: &foundation::Uri, serviceName: &HStringArg, brandingImage: &foundation::Uri, callDetails: &HStringArg, ringtone: &foundation::Uri, ringTimeout: foundation::TimeSpan) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestIncomingUpgradeToVideoCall)(self as *const _ as *mut _, 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(&self, callUpgradeGuid: Guid) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn terminate_cellular_call(&self, callUpgradeGuid: Guid) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).TerminateCellularCall)(self as *const _ as *mut _, callUpgradeGuid); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn cancel_upgrade(&self, callUpgradeGuid: Guid) -> Result<()> { + }} + #[inline] pub fn cancel_upgrade(&self, callUpgradeGuid: Guid) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).CancelUpgrade)(self as *const _ as *mut _, callUpgradeGuid); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class VoipCallCoordinator: IVoipCallCoordinator} impl RtActivatable for VoipCallCoordinator {} impl VoipCallCoordinator { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} + } } DEFINE_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]) [CLSID_VoipCallCoordinator]); DEFINE_IID!(IID_IVoipCallCoordinator2, 3199511027, 50948, 16948, 137, 206, 232, 140, 192, 210, 143, 190); @@ -1693,135 +1693,135 @@ RT_INTERFACE!{interface IVoipCallCoordinator2(IVoipCallCoordinator2Vtbl): IInspe fn SetupNewAcceptedCall(&self, context: HSTRING, contactName: HSTRING, contactNumber: HSTRING, serviceName: HSTRING, media: VoipPhoneCallMedia, out: *mut *mut VoipPhoneCall) -> HRESULT }} impl IVoipCallCoordinator2 { - #[inline] pub unsafe fn setup_new_accepted_call(&self, context: &HStringArg, contactName: &HStringArg, contactNumber: &HStringArg, serviceName: &HStringArg, media: VoipPhoneCallMedia) -> Result> { + #[inline] pub fn setup_new_accepted_call(&self, context: &HStringArg, contactName: &HStringArg, contactNumber: &HStringArg, serviceName: &HStringArg, media: VoipPhoneCallMedia) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetupNewAcceptedCall)(self as *const _ as *mut _, context.get(), contactName.get(), contactNumber.get(), serviceName.get(), media, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut *mut VoipCallCoordinator) -> HRESULT }} impl IVoipCallCoordinatorStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_EndRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_HoldRequested(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_HoldRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ResumeRequested(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ResumeRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_AnswerRequested(&self, acceptHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AnswerRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_RejectRequested(&self, rejectHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RejectRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_EndRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_EndRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_HoldRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_HoldRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ResumeRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ResumeRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_AnswerRequested(&self, acceptHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AnswerRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_RejectRequested(&self, rejectHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RejectRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn NotifyCallHeld(&self) -> HRESULT, fn NotifyCallActive(&self) -> HRESULT, fn NotifyCallEnded(&self) -> HRESULT, fn get_ContactName(&self, out: *mut HSTRING) -> HRESULT, fn put_ContactName(&self, value: HSTRING) -> HRESULT, - fn get_StartTime(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn put_StartTime(&self, value: super::super::foundation::DateTime) -> HRESULT, + fn get_StartTime(&self, out: *mut foundation::DateTime) -> HRESULT, + fn put_StartTime(&self, value: foundation::DateTime) -> HRESULT, fn get_CallMedia(&self, out: *mut VoipPhoneCallMedia) -> HRESULT, fn put_CallMedia(&self, value: VoipPhoneCallMedia) -> HRESULT, fn NotifyCallReady(&self) -> HRESULT }} impl IVoipPhoneCall { - #[inline] pub unsafe fn add_end_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_end_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_EndRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_end_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_end_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_EndRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_hold_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_hold_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_HoldRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_hold_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_hold_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_HoldRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_resume_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_resume_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ResumeRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_resume_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_resume_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ResumeRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_answer_requested(&self, acceptHandler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_answer_requested(&self, acceptHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AnswerRequested)(self as *const _ as *mut _, acceptHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_answer_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_answer_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AnswerRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_reject_requested(&self, rejectHandler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_reject_requested(&self, rejectHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RejectRequested)(self as *const _ as *mut _, rejectHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_reject_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_reject_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RejectRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn notify_call_held(&self) -> Result<()> { + }} + #[inline] pub fn notify_call_held(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).NotifyCallHeld)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn notify_call_active(&self) -> Result<()> { + }} + #[inline] pub fn notify_call_active(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).NotifyCallActive)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn notify_call_ended(&self) -> Result<()> { + }} + #[inline] pub fn notify_call_ended(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).NotifyCallEnded)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_contact_name(&self) -> Result { + }} + #[inline] pub fn get_contact_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContactName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_contact_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_contact_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ContactName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_start_time(&self) -> Result { + }} + #[inline] pub fn get_start_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StartTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_start_time(&self, value: super::super::foundation::DateTime) -> Result<()> { + }} + #[inline] pub fn set_start_time(&self, value: foundation::DateTime) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StartTime)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_call_media(&self) -> Result { + }} + #[inline] pub fn get_call_media(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CallMedia)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_call_media(&self, value: VoipPhoneCallMedia) -> Result<()> { + }} + #[inline] pub fn set_call_media(&self, value: VoipPhoneCallMedia) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CallMedia)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn notify_call_ready(&self) -> Result<()> { + }} + #[inline] pub fn notify_call_ready(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).NotifyCallReady)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class VoipPhoneCall: IVoipPhoneCall} DEFINE_IID!(IID_IVoipPhoneCall2, 1947944673, 9311, 16883, 147, 153, 49, 65, 210, 91, 82, 227); @@ -1829,10 +1829,10 @@ RT_INTERFACE!{interface IVoipPhoneCall2(IVoipPhoneCall2Vtbl): IInspectable(IInsp fn TryShowAppUI(&self) -> HRESULT }} impl IVoipPhoneCall2 { - #[inline] pub unsafe fn try_show_app_ui(&self) -> Result<()> { + #[inline] pub fn try_show_app_ui(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).TryShowAppUI)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum VoipPhoneCallMedia: u32 { None (VoipPhoneCallMedia_None) = 0, Audio (VoipPhoneCallMedia_Audio) = 1, Video (VoipPhoneCallMedia_Video) = 2, @@ -1858,21 +1858,21 @@ RT_INTERFACE!{interface IPhoneCallBlockedTriggerDetails(IPhoneCallBlockedTrigger fn get_CallBlockedReason(&self, out: *mut PhoneCallBlockedReason) -> HRESULT }} impl IPhoneCallBlockedTriggerDetails { - #[inline] pub unsafe fn get_phone_number(&self) -> Result { + #[inline] pub fn get_phone_number(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PhoneNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_line_id(&self) -> Result { + }} + #[inline] pub fn get_line_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LineId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_call_blocked_reason(&self) -> Result { + }} + #[inline] pub fn get_call_blocked_reason(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CallBlockedReason)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PhoneCallBlockedTriggerDetails: IPhoneCallBlockedTriggerDetails} DEFINE_IID!(IID_IPhoneCallOriginDataRequestTriggerDetails, 1855675199, 50507, 20098, 76, 201, 227, 41, 164, 24, 69, 146); @@ -1881,16 +1881,16 @@ RT_INTERFACE!{interface IPhoneCallOriginDataRequestTriggerDetails(IPhoneCallOrig fn get_PhoneNumber(&self, out: *mut HSTRING) -> HRESULT }} impl IPhoneCallOriginDataRequestTriggerDetails { - #[inline] pub unsafe fn get_request_id(&self) -> Result { + #[inline] pub fn get_request_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RequestId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_phone_number(&self) -> Result { + }} + #[inline] pub fn get_phone_number(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PhoneNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PhoneCallOriginDataRequestTriggerDetails: IPhoneCallOriginDataRequestTriggerDetails} DEFINE_IID!(IID_IPhoneLineChangedTriggerDetails, 3335725543, 53533, 16600, 178, 183, 228, 10, 1, 214, 98, 73); @@ -1900,21 +1900,21 @@ RT_INTERFACE!{interface IPhoneLineChangedTriggerDetails(IPhoneLineChangedTrigger fn HasLinePropertyChanged(&self, lineProperty: PhoneLineProperties, out: *mut bool) -> HRESULT }} impl IPhoneLineChangedTriggerDetails { - #[inline] pub unsafe fn get_line_id(&self) -> Result { + #[inline] pub fn get_line_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LineId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_change_type(&self) -> Result { + }} + #[inline] pub fn get_change_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ChangeType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn has_line_property_changed(&self, lineProperty: PhoneLineProperties) -> Result { + }} + #[inline] pub fn has_line_property_changed(&self, lineProperty: PhoneLineProperties) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).HasLinePropertyChanged)(self as *const _ as *mut _, lineProperty, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PhoneLineChangedTriggerDetails: IPhoneLineChangedTriggerDetails} RT_ENUM! { enum PhoneLineChangeKind: i32 { @@ -1930,21 +1930,21 @@ RT_INTERFACE!{interface IPhoneNewVoicemailMessageTriggerDetails(IPhoneNewVoicema fn get_OperatorMessage(&self, out: *mut HSTRING) -> HRESULT }} impl IPhoneNewVoicemailMessageTriggerDetails { - #[inline] pub unsafe fn get_line_id(&self) -> Result { + #[inline] pub fn get_line_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LineId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_voicemail_count(&self) -> Result { + }} + #[inline] pub fn get_voicemail_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VoicemailCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_operator_message(&self) -> Result { + }} + #[inline] pub fn get_operator_message(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OperatorMessage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PhoneNewVoicemailMessageTriggerDetails: IPhoneNewVoicemailMessageTriggerDetails} RT_ENUM! { enum PhoneTriggerType: i32 { @@ -1959,62 +1959,62 @@ RT_INTERFACE!{interface ISocialFeedChildItem(ISocialFeedChildItemVtbl): IInspect fn get_Author(&self, out: *mut *mut SocialUserInfo) -> HRESULT, fn get_PrimaryContent(&self, out: *mut *mut SocialFeedContent) -> HRESULT, fn get_SecondaryContent(&self, out: *mut *mut SocialFeedContent) -> HRESULT, - fn get_Timestamp(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn put_Timestamp(&self, value: super::super::foundation::DateTime) -> HRESULT, - fn get_TargetUri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_TargetUri(&self, value: *mut super::super::foundation::Uri) -> HRESULT, - fn get_Thumbnails(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT, + fn put_Timestamp(&self, value: foundation::DateTime) -> HRESULT, + fn get_TargetUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_TargetUri(&self, value: *mut foundation::Uri) -> HRESULT, + fn get_Thumbnails(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_SharedItem(&self, out: *mut *mut SocialFeedSharedItem) -> HRESULT, fn put_SharedItem(&self, value: *mut SocialFeedSharedItem) -> HRESULT }} impl ISocialFeedChildItem { - #[inline] pub unsafe fn get_author(&self) -> Result> { + #[inline] pub fn get_author(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Author)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_primary_content(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_primary_content(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PrimaryContent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_secondary_content(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_secondary_content(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SecondaryContent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_timestamp(&self, value: super::super::foundation::DateTime) -> Result<()> { + }} + #[inline] pub fn set_timestamp(&self, value: foundation::DateTime) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Timestamp)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_target_uri(&self) -> Result> { + }} + #[inline] pub fn get_target_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TargetUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_target_uri(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_target_uri(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TargetUri)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_thumbnails(&self) -> Result>> { + }} + #[inline] pub fn get_thumbnails(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Thumbnails)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_shared_item(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_shared_item(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SharedItem)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_shared_item(&self, value: &SocialFeedSharedItem) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_shared_item(&self, value: &SocialFeedSharedItem) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SharedItem)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SocialFeedChildItem: ISocialFeedChildItem} impl RtActivatable for SocialFeedChildItem {} @@ -2025,37 +2025,37 @@ RT_INTERFACE!{interface ISocialFeedContent(ISocialFeedContentVtbl): IInspectable fn put_Title(&self, value: HSTRING) -> HRESULT, fn get_Message(&self, out: *mut HSTRING) -> HRESULT, fn put_Message(&self, value: HSTRING) -> HRESULT, - fn get_TargetUri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_TargetUri(&self, value: *mut super::super::foundation::Uri) -> HRESULT + fn get_TargetUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_TargetUri(&self, value: *mut foundation::Uri) -> HRESULT }} impl ISocialFeedContent { - #[inline] pub unsafe fn get_title(&self) -> Result { + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_title(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_title(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Title)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_message(&self) -> Result { + }} + #[inline] pub fn get_message(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Message)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_message(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_message(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Message)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_target_uri(&self) -> Result> { + }} + #[inline] pub fn get_target_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TargetUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_target_uri(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_target_uri(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TargetUri)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SocialFeedContent: ISocialFeedContent} DEFINE_IID!(IID_ISocialFeedItem, 1326682795, 8050, 19763, 182, 149, 222, 62, 29, 182, 3, 23); @@ -2063,11 +2063,11 @@ RT_INTERFACE!{interface ISocialFeedItem(ISocialFeedItemVtbl): IInspectable(IInsp fn get_Author(&self, out: *mut *mut SocialUserInfo) -> HRESULT, fn get_PrimaryContent(&self, out: *mut *mut SocialFeedContent) -> HRESULT, fn get_SecondaryContent(&self, out: *mut *mut SocialFeedContent) -> HRESULT, - fn get_Timestamp(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn put_Timestamp(&self, value: super::super::foundation::DateTime) -> HRESULT, - fn get_TargetUri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_TargetUri(&self, value: *mut super::super::foundation::Uri) -> HRESULT, - fn get_Thumbnails(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT, + fn put_Timestamp(&self, value: foundation::DateTime) -> HRESULT, + fn get_TargetUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_TargetUri(&self, value: *mut foundation::Uri) -> HRESULT, + fn get_Thumbnails(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_SharedItem(&self, out: *mut *mut SocialFeedSharedItem) -> HRESULT, fn put_SharedItem(&self, value: *mut SocialFeedSharedItem) -> HRESULT, fn get_BadgeStyle(&self, out: *mut SocialItemBadgeStyle) -> HRESULT, @@ -2082,98 +2082,98 @@ RT_INTERFACE!{interface ISocialFeedItem(ISocialFeedItemVtbl): IInspectable(IInsp fn put_Style(&self, value: SocialFeedItemStyle) -> HRESULT }} impl ISocialFeedItem { - #[inline] pub unsafe fn get_author(&self) -> Result> { + #[inline] pub fn get_author(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Author)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_primary_content(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_primary_content(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PrimaryContent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_secondary_content(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_secondary_content(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SecondaryContent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_timestamp(&self, value: super::super::foundation::DateTime) -> Result<()> { + }} + #[inline] pub fn set_timestamp(&self, value: foundation::DateTime) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Timestamp)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_target_uri(&self) -> Result> { + }} + #[inline] pub fn get_target_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TargetUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_target_uri(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_target_uri(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TargetUri)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_thumbnails(&self) -> Result>> { + }} + #[inline] pub fn get_thumbnails(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Thumbnails)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_shared_item(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_shared_item(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SharedItem)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_shared_item(&self, value: &SocialFeedSharedItem) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_shared_item(&self, value: &SocialFeedSharedItem) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SharedItem)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_badge_style(&self) -> Result { + }} + #[inline] pub fn get_badge_style(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BadgeStyle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_badge_style(&self, value: SocialItemBadgeStyle) -> Result<()> { + }} + #[inline] pub fn set_badge_style(&self, value: SocialItemBadgeStyle) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BadgeStyle)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_badge_count_value(&self) -> Result { + }} + #[inline] pub fn get_badge_count_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BadgeCountValue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_badge_count_value(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_badge_count_value(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BadgeCountValue)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_id(&self) -> Result { + }} + #[inline] pub fn get_remote_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_remote_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_remote_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RemoteId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_child_item(&self) -> Result> { + }} + #[inline] pub fn get_child_item(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ChildItem)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_child_item(&self, value: &SocialFeedChildItem) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_child_item(&self, value: &SocialFeedChildItem) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ChildItem)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_style(&self) -> Result { + }} + #[inline] pub fn get_style(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Style)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_style(&self, value: SocialFeedItemStyle) -> Result<()> { + }} + #[inline] pub fn set_style(&self, value: SocialFeedItemStyle) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Style)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SocialFeedItem: ISocialFeedItem} impl RtActivatable for SocialFeedItem {} @@ -2186,58 +2186,58 @@ RT_ENUM! { enum SocialFeedKind: i32 { }} 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(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_OriginalSource(&self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_OriginalSource(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_OriginalSource(&self, value: *mut foundation::Uri) -> HRESULT, fn get_Content(&self, out: *mut *mut SocialFeedContent) -> HRESULT, - fn get_Timestamp(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn put_Timestamp(&self, value: super::super::foundation::DateTime) -> HRESULT, - fn get_TargetUri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_TargetUri(&self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT, + fn put_Timestamp(&self, value: foundation::DateTime) -> HRESULT, + fn get_TargetUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_TargetUri(&self, value: *mut foundation::Uri) -> HRESULT, fn put_Thumbnail(&self, value: *mut SocialItemThumbnail) -> HRESULT, fn get_Thumbnail(&self, out: *mut *mut SocialItemThumbnail) -> HRESULT }} impl ISocialFeedSharedItem { - #[inline] pub unsafe fn get_original_source(&self) -> Result> { + #[inline] pub fn get_original_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OriginalSource)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_original_source(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_original_source(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OriginalSource)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_content(&self) -> Result> { + }} + #[inline] pub fn get_content(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Content)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_timestamp(&self, value: super::super::foundation::DateTime) -> Result<()> { + }} + #[inline] pub fn set_timestamp(&self, value: foundation::DateTime) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Timestamp)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_target_uri(&self) -> Result> { + }} + #[inline] pub fn get_target_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TargetUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_target_uri(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_target_uri(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TargetUri)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_thumbnail(&self, value: &SocialItemThumbnail) -> Result<()> { + }} + #[inline] pub fn set_thumbnail(&self, value: &SocialItemThumbnail) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Thumbnail)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_thumbnail(&self) -> Result> { + }} + #[inline] pub fn get_thumbnail(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Thumbnail)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SocialFeedSharedItem: ISocialFeedSharedItem} impl RtActivatable for SocialFeedSharedItem {} @@ -2250,49 +2250,49 @@ RT_ENUM! { enum SocialItemBadgeStyle: i32 { }} 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(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_TargetUri(&self, value: *mut super::super::foundation::Uri) -> HRESULT, - fn get_ImageUri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_ImageUri(&self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_TargetUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_TargetUri(&self, value: *mut foundation::Uri) -> HRESULT, + fn get_ImageUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_ImageUri(&self, value: *mut foundation::Uri) -> HRESULT, #[cfg(not(feature="windows-graphics"))] fn __Dummy4(&self) -> (), #[cfg(feature="windows-graphics")] fn get_BitmapSize(&self, out: *mut super::super::graphics::imaging::BitmapSize) -> HRESULT, #[cfg(not(feature="windows-graphics"))] fn __Dummy5(&self) -> (), #[cfg(feature="windows-graphics")] fn put_BitmapSize(&self, value: super::super::graphics::imaging::BitmapSize) -> HRESULT, - #[cfg(feature="windows-storage")] fn SetImageAsync(&self, image: *mut super::super::storage::streams::IInputStream, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + #[cfg(feature="windows-storage")] fn SetImageAsync(&self, image: *mut super::super::storage::streams::IInputStream, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl ISocialItemThumbnail { - #[inline] pub unsafe fn get_target_uri(&self) -> Result> { + #[inline] pub fn get_target_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TargetUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_target_uri(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_target_uri(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TargetUri)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_image_uri(&self) -> Result> { + }} + #[inline] pub fn get_image_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ImageUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_image_uri(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_image_uri(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ImageUri)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn get_bitmap_size(&self) -> Result { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_bitmap_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BitmapSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn set_bitmap_size(&self, value: super::super::graphics::imaging::BitmapSize) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn set_bitmap_size(&self, value: super::super::graphics::imaging::BitmapSize) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BitmapSize)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn set_image_async(&self, image: &super::super::storage::streams::IInputStream) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_image_async(&self, image: &super::super::storage::streams::IInputStream) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetImageAsync)(self as *const _ as *mut _, image as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class SocialItemThumbnail: ISocialItemThumbnail} impl RtActivatable for SocialItemThumbnail {} @@ -2305,46 +2305,46 @@ RT_INTERFACE!{interface ISocialUserInfo(ISocialUserInfoVtbl): IInspectable(IInsp fn put_UserName(&self, value: HSTRING) -> HRESULT, fn get_RemoteId(&self, out: *mut HSTRING) -> HRESULT, fn put_RemoteId(&self, value: HSTRING) -> HRESULT, - fn get_TargetUri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_TargetUri(&self, value: *mut super::super::foundation::Uri) -> HRESULT + fn get_TargetUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_TargetUri(&self, value: *mut foundation::Uri) -> HRESULT }} impl ISocialUserInfo { - #[inline] pub unsafe fn get_display_name(&self) -> Result { + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_display_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_user_name(&self) -> Result { + }} + #[inline] pub fn get_user_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UserName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_user_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_user_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_UserName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_id(&self) -> Result { + }} + #[inline] pub fn get_remote_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_remote_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_remote_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RemoteId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_target_uri(&self) -> Result> { + }} + #[inline] pub fn get_target_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TargetUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_target_uri(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_target_uri(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TargetUri)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SocialUserInfo: ISocialUserInfo} pub mod provider { // Windows.ApplicationModel.SocialInfo.Provider @@ -2353,150 +2353,150 @@ DEFINE_IID!(IID_ISocialDashboardItemUpdater, 1021222345, 18432, 18125, 134, 155, RT_INTERFACE!{interface ISocialDashboardItemUpdater(ISocialDashboardItemUpdaterVtbl): IInspectable(IInspectableVtbl) [IID_ISocialDashboardItemUpdater] { fn get_OwnerRemoteId(&self, out: *mut HSTRING) -> HRESULT, fn get_Content(&self, out: *mut *mut super::SocialFeedContent) -> HRESULT, - fn get_Timestamp(&self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, - fn put_Timestamp(&self, value: ::rt::gen::windows::foundation::DateTime) -> HRESULT, + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT, + fn put_Timestamp(&self, value: foundation::DateTime) -> HRESULT, fn put_Thumbnail(&self, value: *mut super::SocialItemThumbnail) -> HRESULT, fn get_Thumbnail(&self, out: *mut *mut super::SocialItemThumbnail) -> HRESULT, - fn CommitAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn get_TargetUri(&self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, - fn put_TargetUri(&self, value: *mut ::rt::gen::windows::foundation::Uri) -> HRESULT + fn CommitAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn get_TargetUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_TargetUri(&self, value: *mut foundation::Uri) -> HRESULT }} impl ISocialDashboardItemUpdater { - #[inline] pub unsafe fn get_owner_remote_id(&self) -> Result { + #[inline] pub fn get_owner_remote_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OwnerRemoteId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_content(&self) -> Result> { + }} + #[inline] pub fn get_content(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Content)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_timestamp(&self) -> Result<::rt::gen::windows::foundation::DateTime> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_timestamp(&self, value: ::rt::gen::windows::foundation::DateTime) -> Result<()> { + }} + #[inline] pub fn set_timestamp(&self, value: foundation::DateTime) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Timestamp)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_thumbnail(&self, value: &super::SocialItemThumbnail) -> Result<()> { + }} + #[inline] pub fn set_thumbnail(&self, value: &super::SocialItemThumbnail) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Thumbnail)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_thumbnail(&self) -> Result> { + }} + #[inline] pub fn get_thumbnail(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Thumbnail)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn commit_async(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn commit_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CommitAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_target_uri(&self) -> Result> { + }} + #[inline] pub fn get_target_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TargetUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_target_uri(&self, value: &::rt::gen::windows::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_target_uri(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TargetUri)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SocialDashboardItemUpdater: ISocialDashboardItemUpdater} 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(&self, out: *mut HSTRING) -> HRESULT, fn get_Kind(&self, out: *mut super::SocialFeedKind) -> HRESULT, - fn get_Items(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, - fn CommitAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn get_Items(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn CommitAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl ISocialFeedUpdater { - #[inline] pub unsafe fn get_owner_remote_id(&self) -> Result { + #[inline] pub fn get_owner_remote_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OwnerRemoteId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_kind(&self) -> Result { + }} + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_items(&self) -> Result>> { + }} + #[inline] pub fn get_items(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Items)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn commit_async(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn commit_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CommitAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class SocialFeedUpdater: ISocialFeedUpdater} RT_CLASS!{static class SocialInfoProviderManager} impl RtActivatable for SocialInfoProviderManager {} impl SocialInfoProviderManager { - #[inline] pub fn create_social_feed_updater_async(kind: super::SocialFeedKind, mode: super::SocialFeedUpdateMode, ownerRemoteId: &HStringArg) -> Result>> { unsafe { + #[inline] pub fn create_social_feed_updater_async(kind: super::SocialFeedKind, mode: super::SocialFeedUpdateMode, ownerRemoteId: &HStringArg) -> Result>> { >::get_activation_factory().create_social_feed_updater_async(kind, mode, ownerRemoteId) - }} - #[inline] pub fn create_dashboard_item_updater_async(ownerRemoteId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn create_dashboard_item_updater_async(ownerRemoteId: &HStringArg) -> Result>> { >::get_activation_factory().create_dashboard_item_updater_async(ownerRemoteId) - }} - #[inline] pub fn update_badge_count_value(itemRemoteId: &HStringArg, newCount: i32) -> Result<()> { unsafe { + } + #[inline] pub fn update_badge_count_value(itemRemoteId: &HStringArg, newCount: i32) -> Result<()> { >::get_activation_factory().update_badge_count_value(itemRemoteId, newCount) - }} - #[inline] pub fn report_new_content_available(contactRemoteId: &HStringArg, kind: super::SocialFeedKind) -> Result<()> { unsafe { + } + #[inline] pub fn report_new_content_available(contactRemoteId: &HStringArg, kind: super::SocialFeedKind) -> Result<()> { >::get_activation_factory().report_new_content_available(contactRemoteId, kind) - }} - #[inline] pub fn provision_async() -> Result>> { unsafe { + } + #[inline] pub fn provision_async() -> Result>> { >::get_activation_factory().provision_async() - }} - #[inline] pub fn deprovision_async() -> Result> { unsafe { + } + #[inline] pub fn deprovision_async() -> Result> { >::get_activation_factory().deprovision_async() - }} + } } DEFINE_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]) [CLSID_SocialInfoProviderManager]); 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(&self, kind: super::SocialFeedKind, mode: super::SocialFeedUpdateMode, ownerRemoteId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn CreateDashboardItemUpdaterAsync(&self, ownerRemoteId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn CreateSocialFeedUpdaterAsync(&self, kind: super::SocialFeedKind, mode: super::SocialFeedUpdateMode, ownerRemoteId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreateDashboardItemUpdaterAsync(&self, ownerRemoteId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn UpdateBadgeCountValue(&self, itemRemoteId: HSTRING, newCount: i32) -> HRESULT, fn ReportNewContentAvailable(&self, contactRemoteId: HSTRING, kind: super::SocialFeedKind) -> HRESULT, - fn ProvisionAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn DeprovisionAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn ProvisionAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn DeprovisionAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl ISocialInfoProviderManagerStatics { - #[inline] pub unsafe fn create_social_feed_updater_async(&self, kind: super::SocialFeedKind, mode: super::SocialFeedUpdateMode, ownerRemoteId: &HStringArg) -> Result>> { + #[inline] pub fn create_social_feed_updater_async(&self, kind: super::SocialFeedKind, mode: super::SocialFeedUpdateMode, ownerRemoteId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateSocialFeedUpdaterAsync)(self as *const _ as *mut _, 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(&self, ownerRemoteId: &HStringArg) -> Result>> { + }} + #[inline] pub fn create_dashboard_item_updater_async(&self, ownerRemoteId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDashboardItemUpdaterAsync)(self as *const _ as *mut _, ownerRemoteId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn update_badge_count_value(&self, itemRemoteId: &HStringArg, newCount: i32) -> Result<()> { + }} + #[inline] pub fn update_badge_count_value(&self, itemRemoteId: &HStringArg, newCount: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).UpdateBadgeCountValue)(self as *const _ as *mut _, itemRemoteId.get(), newCount); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn report_new_content_available(&self, contactRemoteId: &HStringArg, kind: super::SocialFeedKind) -> Result<()> { + }} + #[inline] pub fn report_new_content_available(&self, contactRemoteId: &HStringArg, kind: super::SocialFeedKind) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportNewContentAvailable)(self as *const _ as *mut _, contactRemoteId.get(), kind); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn provision_async(&self) -> Result>> { + }} + #[inline] pub fn provision_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ProvisionAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn deprovision_async(&self) -> Result> { + }} + #[inline] pub fn deprovision_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeprovisionAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } } // Windows.ApplicationModel.SocialInfo.Provider } // Windows.ApplicationModel.SocialInfo @@ -2507,40 +2507,40 @@ RT_INTERFACE!{interface ILocalContentSuggestionSettings(ILocalContentSuggestionS fn put_Enabled(&self, value: bool) -> HRESULT, fn get_Enabled(&self, out: *mut bool) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy2(&self) -> (), - #[cfg(feature="windows-storage")] fn get_Locations(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + #[cfg(feature="windows-storage")] fn get_Locations(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn put_AqsFilter(&self, value: HSTRING) -> HRESULT, fn get_AqsFilter(&self, out: *mut HSTRING) -> HRESULT, - fn get_PropertiesToMatch(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_PropertiesToMatch(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl ILocalContentSuggestionSettings { - #[inline] pub unsafe fn set_enabled(&self, value: bool) -> Result<()> { + #[inline] pub fn set_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Enabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_enabled(&self) -> Result { + }} + #[inline] pub fn get_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Enabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_locations(&self) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_locations(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Locations)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_aqs_filter(&self, value: &HStringArg) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_aqs_filter(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AqsFilter)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_aqs_filter(&self) -> Result { + }} + #[inline] pub fn get_aqs_filter(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AqsFilter)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties_to_match(&self) -> Result>> { + }} + #[inline] pub fn get_properties_to_match(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PropertiesToMatch)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class LocalContentSuggestionSettings: ILocalContentSuggestionSettings} impl RtActivatable for LocalContentSuggestionSettings {} @@ -2556,16 +2556,16 @@ RT_INTERFACE!{interface ISearchPane(ISearchPaneVtbl): IInspectable(IInspectableV fn get_QueryText(&self, out: *mut HSTRING) -> HRESULT, fn get_Language(&self, out: *mut HSTRING) -> HRESULT, fn get_Visible(&self, out: *mut bool) -> HRESULT, - fn add_VisibilityChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_VisibilityChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_QueryChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_QueryChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_SuggestionsRequested(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SuggestionsRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_QuerySubmitted(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_QuerySubmitted(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ResultSuggestionChosen(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ResultSuggestionChosen(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_VisibilityChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_VisibilityChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_QueryChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_QueryChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_SuggestionsRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SuggestionsRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_QuerySubmitted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_QuerySubmitted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ResultSuggestionChosen(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ResultSuggestionChosen(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn SetLocalContentSuggestionSettings(&self, settings: *mut LocalContentSuggestionSettings) -> HRESULT, fn ShowOverloadDefault(&self) -> HRESULT, fn ShowOverloadWithQuery(&self, query: HSTRING) -> HRESULT, @@ -2574,130 +2574,130 @@ RT_INTERFACE!{interface ISearchPane(ISearchPaneVtbl): IInspectable(IInspectableV fn TrySetQueryText(&self, query: HSTRING, out: *mut bool) -> HRESULT }} impl ISearchPane { - #[inline] pub unsafe fn set_search_history_enabled(&self, value: bool) -> Result<()> { + #[inline] pub fn set_search_history_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SearchHistoryEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_search_history_enabled(&self) -> Result { + }} + #[inline] pub fn get_search_history_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SearchHistoryEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_search_history_context(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_search_history_context(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SearchHistoryContext)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_search_history_context(&self) -> Result { + }} + #[inline] pub fn get_search_history_context(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SearchHistoryContext)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_placeholder_text(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_placeholder_text(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PlaceholderText)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_placeholder_text(&self) -> Result { + }} + #[inline] pub fn get_placeholder_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PlaceholderText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_query_text(&self) -> Result { + }} + #[inline] pub fn get_query_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_QueryText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_language(&self) -> Result { + }} + #[inline] pub fn get_language(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Language)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_visible(&self) -> Result { + }} + #[inline] pub fn get_visible(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Visible)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_visibility_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_visibility_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_VisibilityChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_visibility_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_visibility_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_VisibilityChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_query_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_query_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_QueryChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_query_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_query_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_QueryChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_suggestions_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_suggestions_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SuggestionsRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_suggestions_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_suggestions_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SuggestionsRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_query_submitted(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_query_submitted(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_QuerySubmitted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_query_submitted(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_query_submitted(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_QuerySubmitted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_result_suggestion_chosen(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_result_suggestion_chosen(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ResultSuggestionChosen)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_result_suggestion_chosen(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_result_suggestion_chosen(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ResultSuggestionChosen)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_local_content_suggestion_settings(&self, settings: &LocalContentSuggestionSettings) -> Result<()> { + }} + #[inline] pub fn set_local_content_suggestion_settings(&self, settings: &LocalContentSuggestionSettings) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetLocalContentSuggestionSettings)(self as *const _ as *mut _, settings as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn show_overload_default(&self) -> Result<()> { + }} + #[inline] pub fn show_overload_default(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ShowOverloadDefault)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn show_overload_with_query(&self, query: &HStringArg) -> Result<()> { + }} + #[inline] pub fn show_overload_with_query(&self, query: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ShowOverloadWithQuery)(self as *const _ as *mut _, query.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_show_on_keyboard_input(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_show_on_keyboard_input(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ShowOnKeyboardInput)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_show_on_keyboard_input(&self) -> Result { + }} + #[inline] pub fn get_show_on_keyboard_input(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ShowOnKeyboardInput)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn try_set_query_text(&self, query: &HStringArg) -> Result { + }} + #[inline] pub fn try_set_query_text(&self, query: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TrySetQueryText)(self as *const _ as *mut _, query.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SearchPane: ISearchPane} impl RtActivatable for SearchPane {} impl RtActivatable for SearchPane {} impl SearchPane { - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} - #[inline] pub fn hide_this_application() -> Result<()> { unsafe { + } + #[inline] pub fn hide_this_application() -> Result<()> { >::get_activation_factory().hide_this_application() - }} + } } DEFINE_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]) [CLSID_SearchPane]); DEFINE_IID!(IID_ISearchPaneQueryChangedEventArgs, 1007046633, 9041, 16968, 165, 41, 113, 16, 244, 100, 167, 133); @@ -2707,45 +2707,45 @@ RT_INTERFACE!{interface ISearchPaneQueryChangedEventArgs(ISearchPaneQueryChanged fn get_LinguisticDetails(&self, out: *mut *mut SearchPaneQueryLinguisticDetails) -> HRESULT }} impl ISearchPaneQueryChangedEventArgs { - #[inline] pub unsafe fn get_query_text(&self) -> Result { + #[inline] pub fn get_query_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_QueryText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_language(&self) -> Result { + }} + #[inline] pub fn get_language(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Language)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_linguistic_details(&self) -> Result> { + }} + #[inline] pub fn get_linguistic_details(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LinguisticDetails)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SearchPaneQueryChangedEventArgs: ISearchPaneQueryChangedEventArgs} 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_QueryTextAlternatives(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_QueryTextCompositionStart(&self, out: *mut u32) -> HRESULT, fn get_QueryTextCompositionLength(&self, out: *mut u32) -> HRESULT }} impl ISearchPaneQueryLinguisticDetails { - #[inline] pub unsafe fn get_query_text_alternatives(&self) -> Result>> { + #[inline] pub fn get_query_text_alternatives(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_QueryTextAlternatives)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_query_text_composition_start(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_query_text_composition_start(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_QueryTextCompositionStart)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_query_text_composition_length(&self) -> Result { + }} + #[inline] pub fn get_query_text_composition_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_QueryTextCompositionLength)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SearchPaneQueryLinguisticDetails: ISearchPaneQueryLinguisticDetails} DEFINE_IID!(IID_ISearchPaneQuerySubmittedEventArgs, 339453180, 59845, 18230, 145, 178, 232, 235, 156, 184, 131, 86); @@ -2754,16 +2754,16 @@ RT_INTERFACE!{interface ISearchPaneQuerySubmittedEventArgs(ISearchPaneQuerySubmi fn get_Language(&self, out: *mut HSTRING) -> HRESULT }} impl ISearchPaneQuerySubmittedEventArgs { - #[inline] pub unsafe fn get_query_text(&self) -> Result { + #[inline] pub fn get_query_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_QueryText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_language(&self) -> Result { + }} + #[inline] pub fn get_language(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Language)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class SearchPaneQuerySubmittedEventArgs: ISearchPaneQuerySubmittedEventArgs} DEFINE_IID!(IID_ISearchPaneQuerySubmittedEventArgsWithLinguisticDetails, 1175229157, 19506, 17720, 164, 212, 182, 180, 64, 13, 20, 15); @@ -2771,22 +2771,22 @@ RT_INTERFACE!{interface ISearchPaneQuerySubmittedEventArgsWithLinguisticDetails( fn get_LinguisticDetails(&self, out: *mut *mut SearchPaneQueryLinguisticDetails) -> HRESULT }} impl ISearchPaneQuerySubmittedEventArgsWithLinguisticDetails { - #[inline] pub unsafe fn get_linguistic_details(&self) -> Result> { + #[inline] pub fn get_linguistic_details(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LinguisticDetails)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut HSTRING) -> HRESULT }} impl ISearchPaneResultSuggestionChosenEventArgs { - #[inline] pub unsafe fn get_tag(&self) -> Result { + #[inline] pub fn get_tag(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Tag)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class SearchPaneResultSuggestionChosenEventArgs: ISearchPaneResultSuggestionChosenEventArgs} DEFINE_IID!(IID_ISearchPaneStatics, 2507320817, 36637, 18463, 161, 91, 198, 22, 85, 241, 106, 14); @@ -2794,21 +2794,21 @@ RT_INTERFACE!{static interface ISearchPaneStatics(ISearchPaneStaticsVtbl): IInsp fn GetForCurrentView(&self, out: *mut *mut SearchPane) -> HRESULT }} impl ISearchPaneStatics { - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self) -> HRESULT }} impl ISearchPaneStaticsWithHideThisApplication { - #[inline] pub unsafe fn hide_this_application(&self) -> Result<()> { + #[inline] pub fn hide_this_application(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).HideThisApplication)(self as *const _ as *mut _); 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] { @@ -2817,21 +2817,21 @@ RT_INTERFACE!{interface ISearchPaneSuggestionsRequest(ISearchPaneSuggestionsRequ fn GetDeferral(&self, out: *mut *mut SearchPaneSuggestionsRequestDeferral) -> HRESULT }} impl ISearchPaneSuggestionsRequest { - #[inline] pub unsafe fn get_is_canceled(&self) -> Result { + #[inline] pub fn get_is_canceled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCanceled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_search_suggestion_collection(&self) -> Result> { + }} + #[inline] pub fn get_search_suggestion_collection(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SearchSuggestionCollection)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SearchPaneSuggestionsRequest: ISearchPaneSuggestionsRequest} DEFINE_IID!(IID_ISearchPaneSuggestionsRequestDeferral, 2697988599, 34632, 20194, 173, 68, 175, 166, 190, 153, 124, 81); @@ -2839,10 +2839,10 @@ RT_INTERFACE!{interface ISearchPaneSuggestionsRequestDeferral(ISearchPaneSuggest fn Complete(&self) -> HRESULT }} impl ISearchPaneSuggestionsRequestDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SearchPaneSuggestionsRequestDeferral: ISearchPaneSuggestionsRequestDeferral} DEFINE_IID!(IID_ISearchPaneSuggestionsRequestedEventArgs, 3365636655, 44118, 17504, 141, 47, 128, 2, 59, 236, 79, 197); @@ -2850,11 +2850,11 @@ RT_INTERFACE!{interface ISearchPaneSuggestionsRequestedEventArgs(ISearchPaneSugg fn get_Request(&self, out: *mut *mut SearchPaneSuggestionsRequest) -> HRESULT }} impl ISearchPaneSuggestionsRequestedEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SearchPaneSuggestionsRequestedEventArgs: ISearchPaneSuggestionsRequestedEventArgs} DEFINE_IID!(IID_ISearchPaneVisibilityChangedEventArgs, 1011691590, 44107, 18930, 151, 214, 2, 14, 97, 130, 203, 156); @@ -2862,86 +2862,86 @@ RT_INTERFACE!{interface ISearchPaneVisibilityChangedEventArgs(ISearchPaneVisibil fn get_Visible(&self, out: *mut bool) -> HRESULT }} impl ISearchPaneVisibilityChangedEventArgs { - #[inline] pub unsafe fn get_visible(&self) -> Result { + #[inline] pub fn get_visible(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Visible)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SearchPaneVisibilityChangedEventArgs: ISearchPaneVisibilityChangedEventArgs} 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_QueryTextAlternatives(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_QueryTextCompositionStart(&self, out: *mut u32) -> HRESULT, fn get_QueryTextCompositionLength(&self, out: *mut u32) -> HRESULT }} impl ISearchQueryLinguisticDetails { - #[inline] pub unsafe fn get_query_text_alternatives(&self) -> Result>> { + #[inline] pub fn get_query_text_alternatives(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_QueryTextAlternatives)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_query_text_composition_start(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_query_text_composition_start(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_QueryTextCompositionStart)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_query_text_composition_length(&self) -> Result { + }} + #[inline] pub fn get_query_text_composition_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_QueryTextCompositionLength)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SearchQueryLinguisticDetails: ISearchQueryLinguisticDetails} impl RtActivatable for SearchQueryLinguisticDetails {} impl SearchQueryLinguisticDetails { - #[inline] pub fn create_instance(queryTextAlternatives: &super::super::foundation::collections::IIterable, queryTextCompositionStart: u32, queryTextCompositionLength: u32) -> Result> { unsafe { + #[inline] pub fn create_instance(queryTextAlternatives: &foundation::collections::IIterable, queryTextCompositionStart: u32, queryTextCompositionLength: u32) -> Result> { >::get_activation_factory().create_instance(queryTextAlternatives, queryTextCompositionStart, queryTextCompositionLength) - }} + } } DEFINE_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]) [CLSID_SearchQueryLinguisticDetails]); 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(&self, queryTextAlternatives: *mut super::super::foundation::collections::IIterable, queryTextCompositionStart: u32, queryTextCompositionLength: u32, out: *mut *mut SearchQueryLinguisticDetails) -> HRESULT + fn CreateInstance(&self, queryTextAlternatives: *mut foundation::collections::IIterable, queryTextCompositionStart: u32, queryTextCompositionLength: u32, out: *mut *mut SearchQueryLinguisticDetails) -> HRESULT }} impl ISearchQueryLinguisticDetailsFactory { - #[inline] pub unsafe fn create_instance(&self, queryTextAlternatives: &super::super::foundation::collections::IIterable, queryTextCompositionStart: u32, queryTextCompositionLength: u32) -> Result> { + #[inline] pub fn create_instance(&self, queryTextAlternatives: &foundation::collections::IIterable, queryTextCompositionStart: u32, queryTextCompositionLength: u32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self as *const _ as *mut _, queryTextAlternatives as *const _ as *mut _, queryTextCompositionStart, queryTextCompositionLength, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut u32) -> HRESULT, fn AppendQuerySuggestion(&self, text: HSTRING) -> HRESULT, - fn AppendQuerySuggestions(&self, suggestions: *mut super::super::foundation::collections::IIterable) -> HRESULT, + fn AppendQuerySuggestions(&self, suggestions: *mut foundation::collections::IIterable) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy3(&self) -> (), #[cfg(feature="windows-storage")] fn AppendResultSuggestion(&self, text: HSTRING, detailText: HSTRING, tag: HSTRING, image: *mut super::super::storage::streams::IRandomAccessStreamReference, imageAlternateText: HSTRING) -> HRESULT, fn AppendSearchSeparator(&self, label: HSTRING) -> HRESULT }} impl ISearchSuggestionCollection { - #[inline] pub unsafe fn get_size(&self) -> Result { + #[inline] pub fn get_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Size)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn append_query_suggestion(&self, text: &HStringArg) -> Result<()> { + }} + #[inline] pub fn append_query_suggestion(&self, text: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AppendQuerySuggestion)(self as *const _ as *mut _, text.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn append_query_suggestions(&self, suggestions: &super::super::foundation::collections::IIterable) -> Result<()> { + }} + #[inline] pub fn append_query_suggestions(&self, suggestions: &foundation::collections::IIterable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AppendQuerySuggestions)(self as *const _ as *mut _, suggestions as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn append_result_suggestion(&self, text: &HStringArg, detailText: &HStringArg, tag: &HStringArg, image: &super::super::storage::streams::IRandomAccessStreamReference, imageAlternateText: &HStringArg) -> Result<()> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn append_result_suggestion(&self, text: &HStringArg, detailText: &HStringArg, tag: &HStringArg, image: &super::super::storage::streams::IRandomAccessStreamReference, imageAlternateText: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AppendResultSuggestion)(self as *const _ as *mut _, 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(&self, label: &HStringArg) -> Result<()> { + }} + #[inline] pub fn append_search_separator(&self, label: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AppendSearchSeparator)(self as *const _ as *mut _, label.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SearchSuggestionCollection: ISearchSuggestionCollection} DEFINE_IID!(IID_ISearchSuggestionsRequest, 1313744551, 17637, 16441, 144, 153, 96, 0, 234, 209, 240, 198); @@ -2951,21 +2951,21 @@ RT_INTERFACE!{interface ISearchSuggestionsRequest(ISearchSuggestionsRequestVtbl) fn GetDeferral(&self, out: *mut *mut SearchSuggestionsRequestDeferral) -> HRESULT }} impl ISearchSuggestionsRequest { - #[inline] pub unsafe fn get_is_canceled(&self) -> Result { + #[inline] pub fn get_is_canceled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCanceled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_search_suggestion_collection(&self) -> Result> { + }} + #[inline] pub fn get_search_suggestion_collection(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SearchSuggestionCollection)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SearchSuggestionsRequest: ISearchSuggestionsRequest} DEFINE_IID!(IID_ISearchSuggestionsRequestDeferral, 3071645865, 49253, 17773, 168, 69, 30, 204, 236, 93, 194, 139); @@ -2973,10 +2973,10 @@ RT_INTERFACE!{interface ISearchSuggestionsRequestDeferral(ISearchSuggestionsRequ fn Complete(&self) -> HRESULT }} impl ISearchSuggestionsRequestDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SearchSuggestionsRequestDeferral: ISearchSuggestionsRequestDeferral} pub mod core { // Windows.ApplicationModel.Search.Core @@ -2997,36 +2997,36 @@ RT_INTERFACE!{interface ISearchSuggestion(ISearchSuggestionVtbl): IInspectable(I fn get_ImageAlternateText(&self, out: *mut HSTRING) -> HRESULT }} impl ISearchSuggestion { - #[inline] pub unsafe fn get_kind(&self) -> Result { + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_text(&self) -> Result { + }} + #[inline] pub fn get_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Text)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_tag(&self) -> Result { + }} + #[inline] pub fn get_tag(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Tag)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_detail_text(&self) -> Result { + }} + #[inline] pub fn get_detail_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DetailText)(self 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 get_image(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_image(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Image)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_image_alternate_text(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_image_alternate_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ImageAlternateText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class SearchSuggestion: ISearchSuggestion} RT_ENUM! { enum SearchSuggestionKind: i32 { @@ -3042,85 +3042,85 @@ RT_INTERFACE!{interface ISearchSuggestionManager(ISearchSuggestionManagerVtbl): fn SetQuery(&self, queryText: HSTRING) -> HRESULT, fn SetQueryWithLanguage(&self, queryText: HSTRING, language: HSTRING) -> HRESULT, fn SetQueryWithSearchQueryLinguisticDetails(&self, queryText: HSTRING, language: HSTRING, linguisticDetails: *mut super::SearchQueryLinguisticDetails) -> HRESULT, - fn get_Suggestions(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IObservableVector) -> HRESULT, + fn get_Suggestions(&self, out: *mut *mut foundation::collections::IObservableVector) -> HRESULT, fn AddToHistory(&self, queryText: HSTRING) -> HRESULT, fn AddToHistoryWithLanguage(&self, queryText: HSTRING, language: HSTRING) -> HRESULT, fn ClearHistory(&self) -> HRESULT, - fn add_SuggestionsRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SuggestionsRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_RequestingFocusOnKeyboardInput(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RequestingFocusOnKeyboardInput(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn add_SuggestionsRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SuggestionsRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_RequestingFocusOnKeyboardInput(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RequestingFocusOnKeyboardInput(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl ISearchSuggestionManager { - #[inline] pub unsafe fn get_search_history_enabled(&self) -> Result { + #[inline] pub fn get_search_history_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SearchHistoryEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_search_history_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_search_history_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SearchHistoryEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_search_history_context(&self) -> Result { + }} + #[inline] pub fn get_search_history_context(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SearchHistoryContext)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_search_history_context(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_search_history_context(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SearchHistoryContext)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_local_content_suggestion_settings(&self, settings: &super::LocalContentSuggestionSettings) -> Result<()> { + }} + #[inline] pub fn set_local_content_suggestion_settings(&self, settings: &super::LocalContentSuggestionSettings) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetLocalContentSuggestionSettings)(self as *const _ as *mut _, settings as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_query(&self, queryText: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_query(&self, queryText: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetQuery)(self as *const _ as *mut _, queryText.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_query_with_language(&self, queryText: &HStringArg, language: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_query_with_language(&self, queryText: &HStringArg, language: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetQueryWithLanguage)(self as *const _ as *mut _, queryText.get(), language.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_query_with_search_query_linguistic_details(&self, queryText: &HStringArg, language: &HStringArg, linguisticDetails: &super::SearchQueryLinguisticDetails) -> Result<()> { + }} + #[inline] pub fn set_query_with_search_query_linguistic_details(&self, queryText: &HStringArg, language: &HStringArg, linguisticDetails: &super::SearchQueryLinguisticDetails) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetQueryWithSearchQueryLinguisticDetails)(self as *const _ as *mut _, queryText.get(), language.get(), linguisticDetails as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_suggestions(&self) -> Result>> { + }} + #[inline] pub fn get_suggestions(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Suggestions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_to_history(&self, queryText: &HStringArg) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_to_history(&self, queryText: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddToHistory)(self as *const _ as *mut _, queryText.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_to_history_with_language(&self, queryText: &HStringArg, language: &HStringArg) -> Result<()> { + }} + #[inline] pub fn add_to_history_with_language(&self, queryText: &HStringArg, language: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddToHistoryWithLanguage)(self as *const _ as *mut _, queryText.get(), language.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn clear_history(&self) -> Result<()> { + }} + #[inline] pub fn clear_history(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ClearHistory)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_suggestions_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_suggestions_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SuggestionsRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_suggestions_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_suggestions_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SuggestionsRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_requesting_focus_on_keyboard_input(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_requesting_focus_on_keyboard_input(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RequestingFocusOnKeyboardInput)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_requesting_focus_on_keyboard_input(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_requesting_focus_on_keyboard_input(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RequestingFocusOnKeyboardInput)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SearchSuggestionManager: ISearchSuggestionManager} impl RtActivatable for SearchSuggestionManager {} @@ -3133,26 +3133,26 @@ RT_INTERFACE!{interface ISearchSuggestionsRequestedEventArgs(ISearchSuggestionsR fn get_Request(&self, out: *mut *mut super::SearchSuggestionsRequest) -> HRESULT }} impl ISearchSuggestionsRequestedEventArgs { - #[inline] pub unsafe fn get_query_text(&self) -> Result { + #[inline] pub fn get_query_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_QueryText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_language(&self) -> Result { + }} + #[inline] pub fn get_language(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Language)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_linguistic_details(&self) -> Result> { + }} + #[inline] pub fn get_linguistic_details(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LinguisticDetails)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_request(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SearchSuggestionsRequestedEventArgs: ISearchSuggestionsRequestedEventArgs} } // Windows.ApplicationModel.Search.Core @@ -3162,40 +3162,40 @@ use ::prelude::*; 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(&self) -> (), - #[cfg(feature="windows-devices")] fn get_SubscribedActivities(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + #[cfg(feature="windows-devices")] fn get_SubscribedActivities(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_ReportInterval(&self, out: *mut u32) -> HRESULT, #[cfg(not(feature="windows-devices"))] fn __Dummy2(&self) -> (), - #[cfg(feature="windows-devices")] fn get_SupportedActivities(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + #[cfg(feature="windows-devices")] fn get_SupportedActivities(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_MinimumReportInterval(&self, out: *mut u32) -> HRESULT }} impl IActivitySensorTrigger { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_subscribed_activities(&self) -> Result>> { + #[cfg(feature="windows-devices")] #[inline] pub fn get_subscribed_activities(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SubscribedActivities)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_interval(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_report_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReportInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_supported_activities(&self) -> Result>> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_supported_activities(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedActivities)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_minimum_report_interval(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_minimum_report_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ActivitySensorTrigger: IActivitySensorTrigger} impl RtActivatable for ActivitySensorTrigger {} impl ActivitySensorTrigger { - #[inline] pub fn create(reportIntervalInMilliseconds: u32) -> Result> { unsafe { + #[inline] pub fn create(reportIntervalInMilliseconds: u32) -> Result> { >::get_activation_factory().create(reportIntervalInMilliseconds) - }} + } } DEFINE_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]) [CLSID_ActivitySensorTrigger]); DEFINE_IID!(IID_IActivitySensorTriggerFactory, 2804322755, 14391, 17655, 131, 27, 1, 50, 204, 135, 43, 195); @@ -3203,11 +3203,11 @@ RT_INTERFACE!{static interface IActivitySensorTriggerFactory(IActivitySensorTrig fn Create(&self, reportIntervalInMilliseconds: u32, out: *mut *mut ActivitySensorTrigger) -> HRESULT }} impl IActivitySensorTriggerFactory { - #[inline] pub unsafe fn create(&self, reportIntervalInMilliseconds: u32) -> Result> { + #[inline] pub fn create(&self, reportIntervalInMilliseconds: u32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, reportIntervalInMilliseconds, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum AlarmAccessStatus: i32 { Unspecified (AlarmAccessStatus_Unspecified) = 0, AllowedWithWakeupCapability (AlarmAccessStatus_AllowedWithWakeupCapability) = 1, AllowedWithoutWakeupCapability (AlarmAccessStatus_AllowedWithoutWakeupCapability) = 2, Denied (AlarmAccessStatus_Denied) = 3, @@ -3215,30 +3215,30 @@ RT_ENUM! { enum AlarmAccessStatus: i32 { RT_CLASS!{static class AlarmApplicationManager} impl RtActivatable for AlarmApplicationManager {} impl AlarmApplicationManager { - #[inline] pub fn request_access_async() -> Result>> { unsafe { + #[inline] pub fn request_access_async() -> Result>> { >::get_activation_factory().request_access_async() - }} - #[inline] pub fn get_access_status() -> Result { unsafe { + } + #[inline] pub fn get_access_status() -> Result { >::get_activation_factory().get_access_status() - }} + } } DEFINE_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]) [CLSID_AlarmApplicationManager]); 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestAccessAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetAccessStatus(&self, out: *mut AlarmAccessStatus) -> HRESULT }} impl IAlarmApplicationManagerStatics { - #[inline] pub unsafe fn request_access_async(&self) -> Result>> { + #[inline] pub fn request_access_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_access_status(&self) -> Result { + }} + #[inline] pub fn get_access_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetAccessStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IAppBroadcastTrigger, 1960113302, 36151, 17644, 148, 129, 42, 11, 152, 84, 235, 72); RT_INTERFACE!{interface IAppBroadcastTrigger(IAppBroadcastTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IAppBroadcastTrigger] { @@ -3246,22 +3246,22 @@ RT_INTERFACE!{interface IAppBroadcastTrigger(IAppBroadcastTriggerVtbl): IInspect fn get_ProviderInfo(&self, out: *mut *mut AppBroadcastTriggerProviderInfo) -> HRESULT }} impl IAppBroadcastTrigger { - #[inline] pub unsafe fn set_provider_info(&self, value: &AppBroadcastTriggerProviderInfo) -> Result<()> { + #[inline] pub fn set_provider_info(&self, value: &AppBroadcastTriggerProviderInfo) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ProviderInfo)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_provider_info(&self) -> Result> { + }} + #[inline] pub fn get_provider_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProviderInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppBroadcastTrigger: IAppBroadcastTrigger} impl RtActivatable for AppBroadcastTrigger {} impl AppBroadcastTrigger { - #[inline] pub fn create_app_broadcast_trigger(providerKey: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_app_broadcast_trigger(providerKey: &HStringArg) -> Result> { >::get_activation_factory().create_app_broadcast_trigger(providerKey) - }} + } } DEFINE_CLSID!(AppBroadcastTrigger(&[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,112,112,66,114,111,97,100,99,97,115,116,84,114,105,103,103,101,114,0]) [CLSID_AppBroadcastTrigger]); DEFINE_IID!(IID_IAppBroadcastTriggerFactory, 671850308, 8948, 17944, 160, 46, 231, 228, 17, 235, 114, 56); @@ -3269,11 +3269,11 @@ RT_INTERFACE!{static interface IAppBroadcastTriggerFactory(IAppBroadcastTriggerF fn CreateAppBroadcastTrigger(&self, providerKey: HSTRING, out: *mut *mut AppBroadcastTrigger) -> HRESULT }} impl IAppBroadcastTriggerFactory { - #[inline] pub unsafe fn create_app_broadcast_trigger(&self, providerKey: &HStringArg) -> Result> { + #[inline] pub fn create_app_broadcast_trigger(&self, providerKey: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAppBroadcastTrigger)(self as *const _ as *mut _, providerKey.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IAppBroadcastTriggerProviderInfo, 4061738285, 40424, 17440, 156, 226, 94, 255, 143, 23, 55, 107); RT_INTERFACE!{interface IAppBroadcastTriggerProviderInfo(IAppBroadcastTriggerProviderInfoVtbl): IInspectable(IInspectableVtbl) [IID_IAppBroadcastTriggerProviderInfo] { @@ -3281,8 +3281,8 @@ RT_INTERFACE!{interface IAppBroadcastTriggerProviderInfo(IAppBroadcastTriggerPro fn get_DisplayNameResource(&self, out: *mut HSTRING) -> HRESULT, fn put_LogoResource(&self, value: HSTRING) -> HRESULT, fn get_LogoResource(&self, out: *mut HSTRING) -> HRESULT, - fn put_VideoKeyFrameInterval(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_VideoKeyFrameInterval(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_VideoKeyFrameInterval(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_VideoKeyFrameInterval(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn put_MaxVideoBitrate(&self, value: u32) -> HRESULT, fn get_MaxVideoBitrate(&self, out: *mut u32) -> HRESULT, fn put_MaxVideoWidth(&self, value: u32) -> HRESULT, @@ -3291,92 +3291,92 @@ RT_INTERFACE!{interface IAppBroadcastTriggerProviderInfo(IAppBroadcastTriggerPro fn get_MaxVideoHeight(&self, out: *mut u32) -> HRESULT }} impl IAppBroadcastTriggerProviderInfo { - #[inline] pub unsafe fn set_display_name_resource(&self, value: &HStringArg) -> Result<()> { + #[inline] pub fn set_display_name_resource(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayNameResource)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name_resource(&self) -> Result { + }} + #[inline] pub fn get_display_name_resource(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayNameResource)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_logo_resource(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_logo_resource(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LogoResource)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_logo_resource(&self) -> Result { + }} + #[inline] pub fn get_logo_resource(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LogoResource)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_video_key_frame_interval(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_video_key_frame_interval(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_VideoKeyFrameInterval)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_key_frame_interval(&self) -> Result { + }} + #[inline] pub fn get_video_key_frame_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VideoKeyFrameInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_video_bitrate(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_max_video_bitrate(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxVideoBitrate)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_video_bitrate(&self) -> Result { + }} + #[inline] pub fn get_max_video_bitrate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxVideoBitrate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_video_width(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_max_video_width(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxVideoWidth)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_video_width(&self) -> Result { + }} + #[inline] pub fn get_max_video_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxVideoWidth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_video_height(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_max_video_height(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxVideoHeight)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_video_height(&self) -> Result { + }} + #[inline] pub fn get_max_video_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxVideoHeight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppBroadcastTriggerProviderInfo: IAppBroadcastTriggerProviderInfo} 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestAsyncWithArguments(&self, arguments: *mut super::super::foundation::collections::ValueSet, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn RequestAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestAsyncWithArguments(&self, arguments: *mut foundation::collections::ValueSet, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IApplicationTrigger { - #[inline] pub unsafe fn request_async(&self) -> Result>> { + #[inline] pub fn request_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_async_with_arguments(&self, arguments: &super::super::foundation::collections::ValueSet) -> Result>> { + }} + #[inline] pub fn request_async_with_arguments(&self, arguments: &foundation::collections::ValueSet) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAsyncWithArguments)(self as *const _ as *mut _, arguments as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ApplicationTrigger: IApplicationTrigger} impl RtActivatable for ApplicationTrigger {} DEFINE_CLSID!(ApplicationTrigger(&[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,112,112,108,105,99,97,116,105,111,110,84,114,105,103,103,101,114,0]) [CLSID_ApplicationTrigger]); 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(&self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT + fn get_Arguments(&self, out: *mut *mut foundation::collections::ValueSet) -> HRESULT }} impl IApplicationTriggerDetails { - #[inline] pub unsafe fn get_arguments(&self) -> Result> { + #[inline] pub fn get_arguments(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Arguments)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ApplicationTriggerDetails: IApplicationTriggerDetails} RT_ENUM! { enum ApplicationTriggerResult: i32 { @@ -3399,74 +3399,74 @@ RT_INTERFACE!{interface IBackgroundCondition(IBackgroundConditionVtbl): IInspect RT_CLASS!{static class BackgroundExecutionManager} impl RtActivatable for BackgroundExecutionManager {} impl BackgroundExecutionManager { - #[inline] pub fn request_access_async() -> Result>> { unsafe { + #[inline] pub fn request_access_async() -> Result>> { >::get_activation_factory().request_access_async() - }} - #[inline] pub fn request_access_for_application_async(applicationId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn request_access_for_application_async(applicationId: &HStringArg) -> Result>> { >::get_activation_factory().request_access_for_application_async(applicationId) - }} - #[inline] pub fn remove_access() -> Result<()> { unsafe { + } + #[inline] pub fn remove_access() -> Result<()> { >::get_activation_factory().remove_access() - }} - #[inline] pub fn remove_access_for_application(applicationId: &HStringArg) -> Result<()> { unsafe { + } + #[inline] pub fn remove_access_for_application(applicationId: &HStringArg) -> Result<()> { >::get_activation_factory().remove_access_for_application(applicationId) - }} - #[inline] pub fn get_access_status() -> Result { unsafe { + } + #[inline] pub fn get_access_status() -> Result { >::get_activation_factory().get_access_status() - }} - #[inline] pub fn get_access_status_for_application(applicationId: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn get_access_status_for_application(applicationId: &HStringArg) -> Result { >::get_activation_factory().get_access_status_for_application(applicationId) - }} + } } DEFINE_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]) [CLSID_BackgroundExecutionManager]); 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestAccessForApplicationAsync(&self, applicationId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestAccessAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestAccessForApplicationAsync(&self, applicationId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn RemoveAccess(&self) -> HRESULT, fn RemoveAccessForApplication(&self, applicationId: HSTRING) -> HRESULT, fn GetAccessStatus(&self, out: *mut BackgroundAccessStatus) -> HRESULT, fn GetAccessStatusForApplication(&self, applicationId: HSTRING, out: *mut BackgroundAccessStatus) -> HRESULT }} impl IBackgroundExecutionManagerStatics { - #[inline] pub unsafe fn request_access_async(&self) -> Result>> { + #[inline] pub fn request_access_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_access_for_application_async(&self, applicationId: &HStringArg) -> Result>> { + }} + #[inline] pub fn request_access_for_application_async(&self, applicationId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessForApplicationAsync)(self as *const _ as *mut _, applicationId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn remove_access(&self) -> Result<()> { + }} + #[inline] pub fn remove_access(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveAccess)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove_access_for_application(&self, applicationId: &HStringArg) -> Result<()> { + }} + #[inline] pub fn remove_access_for_application(&self, applicationId: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveAccessForApplication)(self as *const _ as *mut _, applicationId.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_access_status(&self) -> Result { + }} + #[inline] pub fn get_access_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetAccessStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_access_status_for_application(&self, applicationId: &HStringArg) -> Result { + }} + #[inline] pub fn get_access_status_for_application(&self, applicationId: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetAccessStatusForApplication)(self as *const _ as *mut _, applicationId.get(), &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(&self, taskInstance: *mut IBackgroundTaskInstance) -> HRESULT }} impl IBackgroundTask { - #[inline] pub unsafe fn run(&self, taskInstance: &IBackgroundTaskInstance) -> Result<()> { + #[inline] pub fn run(&self, taskInstance: &IBackgroundTaskInstance) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Run)(self as *const _ as *mut _, taskInstance as *const _ as *mut _); if hr == S_OK { Ok(()) } 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] { @@ -3479,37 +3479,37 @@ RT_INTERFACE!{interface IBackgroundTaskBuilder(IBackgroundTaskBuilderVtbl): IIns fn Register(&self, out: *mut *mut BackgroundTaskRegistration) -> HRESULT }} impl IBackgroundTaskBuilder { - #[inline] pub unsafe fn set_task_entry_point(&self, value: &HStringArg) -> Result<()> { + #[inline] pub fn set_task_entry_point(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TaskEntryPoint)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_task_entry_point(&self) -> Result { + }} + #[inline] pub fn get_task_entry_point(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TaskEntryPoint)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_trigger(&self, trigger: &IBackgroundTrigger) -> Result<()> { + }} + #[inline] pub fn set_trigger(&self, trigger: &IBackgroundTrigger) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetTrigger)(self as *const _ as *mut _, trigger as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_condition(&self, condition: &IBackgroundCondition) -> Result<()> { + }} + #[inline] pub fn add_condition(&self, condition: &IBackgroundCondition) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddCondition)(self as *const _ as *mut _, condition as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Name)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_name(&self) -> Result { + }} + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn register(&self) -> Result> { + }} + #[inline] pub fn register(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Register)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class BackgroundTaskBuilder: IBackgroundTaskBuilder} impl RtActivatable for BackgroundTaskBuilder {} @@ -3520,15 +3520,15 @@ RT_INTERFACE!{interface IBackgroundTaskBuilder2(IBackgroundTaskBuilder2Vtbl): II fn get_CancelOnConditionLoss(&self, out: *mut bool) -> HRESULT }} impl IBackgroundTaskBuilder2 { - #[inline] pub unsafe fn set_cancel_on_condition_loss(&self, value: bool) -> Result<()> { + #[inline] pub fn set_cancel_on_condition_loss(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CancelOnConditionLoss)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_cancel_on_condition_loss(&self) -> Result { + }} + #[inline] pub fn get_cancel_on_condition_loss(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CancelOnConditionLoss)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IBackgroundTaskBuilder3, 684150602, 35753, 19465, 162, 79, 25, 104, 62, 44, 146, 76); RT_INTERFACE!{interface IBackgroundTaskBuilder3(IBackgroundTaskBuilder3Vtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundTaskBuilder3] { @@ -3536,15 +3536,15 @@ RT_INTERFACE!{interface IBackgroundTaskBuilder3(IBackgroundTaskBuilder3Vtbl): II fn get_IsNetworkRequested(&self, out: *mut bool) -> HRESULT }} impl IBackgroundTaskBuilder3 { - #[inline] pub unsafe fn set_is_network_requested(&self, value: bool) -> Result<()> { + #[inline] pub fn set_is_network_requested(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsNetworkRequested)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_network_requested(&self) -> Result { + }} + #[inline] pub fn get_is_network_requested(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsNetworkRequested)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IBackgroundTaskBuilder4, 1196811554, 52130, 20021, 189, 22, 166, 218, 127, 28, 25, 170); RT_INTERFACE!{interface IBackgroundTaskBuilder4(IBackgroundTaskBuilder4Vtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundTaskBuilder4] { @@ -3552,25 +3552,25 @@ RT_INTERFACE!{interface IBackgroundTaskBuilder4(IBackgroundTaskBuilder4Vtbl): II fn put_TaskGroup(&self, value: *mut BackgroundTaskRegistrationGroup) -> HRESULT }} impl IBackgroundTaskBuilder4 { - #[inline] pub unsafe fn get_task_group(&self) -> Result> { + #[inline] pub fn get_task_group(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TaskGroup)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_task_group(&self, value: &BackgroundTaskRegistrationGroup) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_task_group(&self, value: &BackgroundTaskRegistrationGroup) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TaskGroup)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, sender: *mut IBackgroundTaskInstance, reason: BackgroundTaskCancellationReason) -> HRESULT }} impl BackgroundTaskCanceledEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &IBackgroundTaskInstance, reason: BackgroundTaskCancellationReason) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &IBackgroundTaskInstance, reason: BackgroundTaskCancellationReason) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, reason); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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, @@ -3581,15 +3581,15 @@ RT_INTERFACE!{interface IBackgroundTaskCompletedEventArgs(IBackgroundTaskComplet fn CheckResult(&self) -> HRESULT }} impl IBackgroundTaskCompletedEventArgs { - #[inline] pub unsafe fn get_instance_id(&self) -> Result { + #[inline] pub fn get_instance_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InstanceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn check_result(&self) -> Result<()> { + }} + #[inline] pub fn check_result(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).CheckResult)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class BackgroundTaskCompletedEventArgs: IBackgroundTaskCompletedEventArgs} DEFINE_IID!(IID_BackgroundTaskCompletedEventHandler, 1530456361, 41094, 18087, 166, 120, 67, 145, 53, 130, 43, 207); @@ -3597,20 +3597,20 @@ RT_DELEGATE!{delegate BackgroundTaskCompletedEventHandler(BackgroundTaskComplete fn Invoke(&self, sender: *mut BackgroundTaskRegistration, args: *mut BackgroundTaskCompletedEventArgs) -> HRESULT }} impl BackgroundTaskCompletedEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &BackgroundTaskRegistration, args: &BackgroundTaskCompletedEventArgs) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &BackgroundTaskRegistration, args: &BackgroundTaskCompletedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, args as *const _ as *mut _); if hr == S_OK { Ok(()) } 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(&self) -> HRESULT }} impl IBackgroundTaskDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class BackgroundTaskDeferral: IBackgroundTaskDeferral} DEFINE_IID!(IID_IBackgroundTaskInstance, 2254166650, 8664, 17779, 143, 50, 146, 138, 27, 6, 65, 246); @@ -3620,77 +3620,77 @@ RT_INTERFACE!{interface IBackgroundTaskInstance(IBackgroundTaskInstanceVtbl): II fn get_Progress(&self, out: *mut u32) -> HRESULT, fn put_Progress(&self, value: u32) -> HRESULT, fn get_TriggerDetails(&self, out: *mut *mut IInspectable) -> HRESULT, - fn add_Canceled(&self, cancelHandler: *mut BackgroundTaskCanceledEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Canceled(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Canceled(&self, cancelHandler: *mut BackgroundTaskCanceledEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Canceled(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, fn get_SuspendedCount(&self, out: *mut u32) -> HRESULT, fn GetDeferral(&self, out: *mut *mut BackgroundTaskDeferral) -> HRESULT }} impl IBackgroundTaskInstance { - #[inline] pub unsafe fn get_instance_id(&self) -> Result { + #[inline] pub fn get_instance_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InstanceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_task(&self) -> Result> { + }} + #[inline] pub fn get_task(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Task)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_progress(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_progress(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Progress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_progress(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_progress(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Progress)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_trigger_details(&self) -> Result> { + }} + #[inline] pub fn get_trigger_details(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TriggerDetails)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_canceled(&self, cancelHandler: &BackgroundTaskCanceledEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_canceled(&self, cancelHandler: &BackgroundTaskCanceledEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Canceled)(self as *const _ as *mut _, cancelHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_canceled(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_canceled(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Canceled)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_suspended_count(&self) -> Result { + }} + #[inline] pub fn get_suspended_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SuspendedCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, counter: BackgroundTaskThrottleCounter, out: *mut u32) -> HRESULT }} impl IBackgroundTaskInstance2 { - #[inline] pub unsafe fn get_throttle_count(&self, counter: BackgroundTaskThrottleCounter) -> Result { + #[inline] pub fn get_throttle_count(&self, counter: BackgroundTaskThrottleCounter) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetThrottleCount)(self as *const _ as *mut _, counter, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::super::system::User) -> HRESULT }} impl IBackgroundTaskInstance4 { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_user(&self) -> Result> { + #[cfg(feature="windows-system")] #[inline] pub fn get_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_User)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } 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] { @@ -3698,16 +3698,16 @@ RT_INTERFACE!{interface IBackgroundTaskProgressEventArgs(IBackgroundTaskProgress fn get_Progress(&self, out: *mut u32) -> HRESULT }} impl IBackgroundTaskProgressEventArgs { - #[inline] pub unsafe fn get_instance_id(&self) -> Result { + #[inline] pub fn get_instance_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InstanceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_progress(&self) -> Result { + }} + #[inline] pub fn get_progress(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Progress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class BackgroundTaskProgressEventArgs: IBackgroundTaskProgressEventArgs} DEFINE_IID!(IID_BackgroundTaskProgressEventHandler, 1189111868, 35464, 19609, 128, 76, 118, 137, 127, 98, 119, 166); @@ -3715,68 +3715,68 @@ RT_DELEGATE!{delegate BackgroundTaskProgressEventHandler(BackgroundTaskProgressE fn Invoke(&self, sender: *mut BackgroundTaskRegistration, args: *mut BackgroundTaskProgressEventArgs) -> HRESULT }} impl BackgroundTaskProgressEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &BackgroundTaskRegistration, args: &BackgroundTaskProgressEventArgs) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &BackgroundTaskRegistration, args: &BackgroundTaskProgressEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, args as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut Guid) -> HRESULT, fn get_Name(&self, out: *mut HSTRING) -> HRESULT, - fn add_Progress(&self, handler: *mut BackgroundTaskProgressEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Progress(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Completed(&self, handler: *mut BackgroundTaskCompletedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Completed(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Progress(&self, handler: *mut BackgroundTaskProgressEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Progress(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_Completed(&self, handler: *mut BackgroundTaskCompletedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Completed(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, fn Unregister(&self, cancelTask: bool) -> HRESULT }} impl IBackgroundTaskRegistration { - #[inline] pub unsafe fn get_task_id(&self) -> Result { + #[inline] pub fn get_task_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TaskId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_name(&self) -> Result { + }} + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_progress(&self, handler: &BackgroundTaskProgressEventHandler) -> Result { + }} + #[inline] pub fn add_progress(&self, handler: &BackgroundTaskProgressEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Progress)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_progress(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_progress(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Progress)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_completed(&self, handler: &BackgroundTaskCompletedEventHandler) -> Result { + }} + #[inline] pub fn add_completed(&self, handler: &BackgroundTaskCompletedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Completed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_completed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_completed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Completed)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn unregister(&self, cancelTask: bool) -> Result<()> { + }} + #[inline] pub fn unregister(&self, cancelTask: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Unregister)(self as *const _ as *mut _, cancelTask); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class BackgroundTaskRegistration: IBackgroundTaskRegistration} impl RtActivatable for BackgroundTaskRegistration {} impl RtActivatable for BackgroundTaskRegistration {} impl BackgroundTaskRegistration { - #[inline] pub fn get_all_tasks() -> Result>> { unsafe { + #[inline] pub fn get_all_tasks() -> Result>>> { >::get_activation_factory().get_all_tasks() - }} - #[inline] pub fn get_all_task_groups() -> Result>> { unsafe { + } + #[inline] pub fn get_all_task_groups() -> Result>>> { >::get_activation_factory().get_all_task_groups() - }} - #[inline] pub fn get_task_group(groupId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn get_task_group(groupId: &HStringArg) -> Result>> { >::get_activation_factory().get_task_group(groupId) - }} + } } DEFINE_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]) [CLSID_BackgroundTaskRegistration]); DEFINE_IID!(IID_IBackgroundTaskRegistration2, 1631110915, 48006, 16658, 175, 195, 127, 147, 155, 22, 110, 59); @@ -3784,66 +3784,66 @@ RT_INTERFACE!{interface IBackgroundTaskRegistration2(IBackgroundTaskRegistration fn get_Trigger(&self, out: *mut *mut IBackgroundTrigger) -> HRESULT }} impl IBackgroundTaskRegistration2 { - #[inline] pub unsafe fn get_trigger(&self) -> Result> { + #[inline] pub fn get_trigger(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Trigger)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IBackgroundTaskRegistration3, 4264788373, 37923, 19851, 131, 13, 177, 221, 44, 123, 173, 213); RT_INTERFACE!{interface IBackgroundTaskRegistration3(IBackgroundTaskRegistration3Vtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundTaskRegistration3] { fn get_TaskGroup(&self, out: *mut *mut BackgroundTaskRegistrationGroup) -> HRESULT }} impl IBackgroundTaskRegistration3 { - #[inline] pub unsafe fn get_task_group(&self) -> Result> { + #[inline] pub fn get_task_group(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TaskGroup)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IBackgroundTaskRegistrationGroup, 716280218, 34587, 16743, 138, 118, 5, 92, 214, 123, 91, 35); RT_INTERFACE!{interface IBackgroundTaskRegistrationGroup(IBackgroundTaskRegistrationGroupVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundTaskRegistrationGroup] { fn get_Id(&self, out: *mut HSTRING) -> HRESULT, fn get_Name(&self, out: *mut HSTRING) -> HRESULT, - fn add_BackgroundActivated(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_BackgroundActivated(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_AllTasks(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT + fn add_BackgroundActivated(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_BackgroundActivated(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn get_AllTasks(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT }} impl IBackgroundTaskRegistrationGroup { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_name(&self) -> Result { + }} + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_background_activated(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_background_activated(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_BackgroundActivated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_background_activated(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_background_activated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_BackgroundActivated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_all_tasks(&self) -> Result>> { + }} + #[inline] pub fn get_all_tasks(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AllTasks)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class BackgroundTaskRegistrationGroup: IBackgroundTaskRegistrationGroup} impl RtActivatable for BackgroundTaskRegistrationGroup {} impl BackgroundTaskRegistrationGroup { - #[inline] pub fn create(id: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(id: &HStringArg) -> Result> { >::get_activation_factory().create(id) - }} - #[inline] pub fn create_with_name(id: &HStringArg, name: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_with_name(id: &HStringArg, name: &HStringArg) -> Result> { >::get_activation_factory().create_with_name(id, name) - }} + } } DEFINE_CLSID!(BackgroundTaskRegistrationGroup(&[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,71,114,111,117,112,0]) [CLSID_BackgroundTaskRegistrationGroup]); DEFINE_IID!(IID_IBackgroundTaskRegistrationGroupFactory, 2212047721, 17615, 17969, 151, 64, 3, 199, 216, 116, 27, 197); @@ -3852,44 +3852,44 @@ RT_INTERFACE!{static interface IBackgroundTaskRegistrationGroupFactory(IBackgrou fn CreateWithName(&self, id: HSTRING, name: HSTRING, out: *mut *mut BackgroundTaskRegistrationGroup) -> HRESULT }} impl IBackgroundTaskRegistrationGroupFactory { - #[inline] pub unsafe fn create(&self, id: &HStringArg) -> Result> { + #[inline] pub fn create(&self, id: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, id.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_name(&self, id: &HStringArg, name: &HStringArg) -> Result> { + }} + #[inline] pub fn create_with_name(&self, id: &HStringArg, name: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithName)(self as *const _ as *mut _, id.get(), name.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(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(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT + fn get_AllTasks(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT }} impl IBackgroundTaskRegistrationStatics { - #[inline] pub unsafe fn get_all_tasks(&self) -> Result>> { + #[inline] pub fn get_all_tasks(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AllTasks)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IBackgroundTaskRegistrationStatics2, 390817566, 45581, 20393, 173, 154, 233, 58, 214, 199, 30, 1); RT_INTERFACE!{static interface IBackgroundTaskRegistrationStatics2(IBackgroundTaskRegistrationStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundTaskRegistrationStatics2] { - fn get_AllTaskGroups(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, + fn get_AllTaskGroups(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT, fn GetTaskGroup(&self, groupId: HSTRING, out: *mut *mut BackgroundTaskRegistrationGroup) -> HRESULT }} impl IBackgroundTaskRegistrationStatics2 { - #[inline] pub unsafe fn get_all_task_groups(&self) -> Result>> { + #[inline] pub fn get_all_task_groups(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AllTaskGroups)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_task_group(&self, groupId: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_task_group(&self, groupId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetTaskGroup)(self as *const _ as *mut _, groupId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum BackgroundTaskThrottleCounter: i32 { All (BackgroundTaskThrottleCounter_All) = 0, Cpu (BackgroundTaskThrottleCounter_Cpu) = 1, Network (BackgroundTaskThrottleCounter_Network) = 2, @@ -3901,9 +3901,9 @@ RT_INTERFACE!{interface IBackgroundTrigger(IBackgroundTriggerVtbl): IInspectable RT_CLASS!{static class BackgroundWorkCost} impl RtActivatable for BackgroundWorkCost {} impl BackgroundWorkCost { - #[inline] pub fn get_current_background_work_cost() -> Result { unsafe { + #[inline] pub fn get_current_background_work_cost() -> Result { >::get_activation_factory().get_current_background_work_cost() - }} + } } DEFINE_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]) [CLSID_BackgroundWorkCost]); DEFINE_IID!(IID_IBackgroundWorkCostStatics, 3342902882, 49936, 19330, 179, 227, 59, 207, 185, 228, 199, 125); @@ -3911,11 +3911,11 @@ RT_INTERFACE!{static interface IBackgroundWorkCostStatics(IBackgroundWorkCostSta fn get_CurrentBackgroundWorkCost(&self, out: *mut BackgroundWorkCostValue) -> HRESULT }} impl IBackgroundWorkCostStatics { - #[inline] pub unsafe fn get_current_background_work_cost(&self) -> Result { + #[inline] pub fn get_current_background_work_cost(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CurrentBackgroundWorkCost)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum BackgroundWorkCostValue: i32 { Low (BackgroundWorkCostValue_Low) = 0, Medium (BackgroundWorkCostValue_Medium) = 1, High (BackgroundWorkCostValue_High) = 2, @@ -3925,65 +3925,65 @@ RT_INTERFACE!{interface IBluetoothLEAdvertisementPublisherTrigger(IBluetoothLEAd #[cfg(feature="windows-devices")] fn get_Advertisement(&self, out: *mut *mut super::super::devices::bluetooth::advertisement::BluetoothLEAdvertisement) -> HRESULT }} impl IBluetoothLEAdvertisementPublisherTrigger { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_advertisement(&self) -> Result> { + #[cfg(feature="windows-devices")] #[inline] pub fn get_advertisement(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Advertisement)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class BluetoothLEAdvertisementPublisherTrigger: IBluetoothLEAdvertisementPublisherTrigger} impl RtActivatable for BluetoothLEAdvertisementPublisherTrigger {} DEFINE_CLSID!(BluetoothLEAdvertisementPublisherTrigger(&[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,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,84,114,105,103,103,101,114,0]) [CLSID_BluetoothLEAdvertisementPublisherTrigger]); 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(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn get_MaxSamplingInterval(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn get_MinOutOfRangeTimeout(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn get_MaxOutOfRangeTimeout(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_MinSamplingInterval(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_MaxSamplingInterval(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_MinOutOfRangeTimeout(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_MaxOutOfRangeTimeout(&self, out: *mut foundation::TimeSpan) -> HRESULT, #[cfg(feature="windows-devices")] fn get_SignalStrengthFilter(&self, out: *mut *mut super::super::devices::bluetooth::BluetoothSignalStrengthFilter) -> HRESULT, #[cfg(feature="windows-devices")] fn put_SignalStrengthFilter(&self, value: *mut super::super::devices::bluetooth::BluetoothSignalStrengthFilter) -> HRESULT, #[cfg(feature="windows-devices")] fn get_AdvertisementFilter(&self, out: *mut *mut super::super::devices::bluetooth::advertisement::BluetoothLEAdvertisementFilter) -> HRESULT, #[cfg(feature="windows-devices")] fn put_AdvertisementFilter(&self, value: *mut super::super::devices::bluetooth::advertisement::BluetoothLEAdvertisementFilter) -> HRESULT }} impl IBluetoothLEAdvertisementWatcherTrigger { - #[inline] pub unsafe fn get_min_sampling_interval(&self) -> Result { + #[inline] pub fn get_min_sampling_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinSamplingInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_sampling_interval(&self) -> Result { + }} + #[inline] pub fn get_max_sampling_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxSamplingInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_out_of_range_timeout(&self) -> Result { + }} + #[inline] pub fn get_min_out_of_range_timeout(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinOutOfRangeTimeout)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_out_of_range_timeout(&self) -> Result { + }} + #[inline] pub fn get_max_out_of_range_timeout(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxOutOfRangeTimeout)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_signal_strength_filter(&self) -> Result> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_signal_strength_filter(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SignalStrengthFilter)(self 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_signal_strength_filter(&self, value: &super::super::devices::bluetooth::BluetoothSignalStrengthFilter) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-devices")] #[inline] pub fn set_signal_strength_filter(&self, value: &super::super::devices::bluetooth::BluetoothSignalStrengthFilter) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SignalStrengthFilter)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_advertisement_filter(&self) -> Result> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_advertisement_filter(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AdvertisementFilter)(self 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_advertisement_filter(&self, value: &super::super::devices::bluetooth::advertisement::BluetoothLEAdvertisementFilter) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-devices")] #[inline] pub fn set_advertisement_filter(&self, value: &super::super::devices::bluetooth::advertisement::BluetoothLEAdvertisementFilter) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AdvertisementFilter)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class BluetoothLEAdvertisementWatcherTrigger: IBluetoothLEAdvertisementWatcherTrigger} impl RtActivatable for BluetoothLEAdvertisementWatcherTrigger {} @@ -4004,21 +4004,21 @@ RT_INTERFACE!{interface ICachedFileUpdaterTriggerDetails(ICachedFileUpdaterTrigg fn get_CanRequestUserInput(&self, out: *mut bool) -> HRESULT }} impl ICachedFileUpdaterTriggerDetails { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_update_target(&self) -> Result { + #[cfg(feature="windows-storage")] #[inline] pub fn get_update_target(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UpdateTarget)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_update_request(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_update_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UpdateRequest)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_request_user_input(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_can_request_user_input(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanRequestUserInput)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class CachedFileUpdaterTriggerDetails: ICachedFileUpdaterTriggerDetails} DEFINE_IID!(IID_IChatMessageNotificationTrigger, 1362838463, 7488, 23645, 120, 245, 201, 35, 254, 227, 115, 158); @@ -4044,34 +4044,34 @@ impl RtActivatable for ContactStoreNotificationTrigger {} DEFINE_CLSID!(ContactStoreNotificationTrigger(&[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,97,99,116,83,116,111,114,101,78,111,116,105,102,105,99,97,116,105,111,110,84,114,105,103,103,101,114,0]) [CLSID_ContactStoreNotificationTrigger]); 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(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + fn get_WaitInterval(&self, out: *mut foundation::TimeSpan) -> HRESULT }} impl IContentPrefetchTrigger { - #[inline] pub unsafe fn get_wait_interval(&self) -> Result { + #[inline] pub fn get_wait_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_WaitInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ContentPrefetchTrigger: IContentPrefetchTrigger} impl RtActivatable for ContentPrefetchTrigger {} impl RtActivatable for ContentPrefetchTrigger {} impl ContentPrefetchTrigger { - #[inline] pub fn create(waitInterval: super::super::foundation::TimeSpan) -> Result> { unsafe { + #[inline] pub fn create(waitInterval: foundation::TimeSpan) -> Result> { >::get_activation_factory().create(waitInterval) - }} + } } DEFINE_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]) [CLSID_ContentPrefetchTrigger]); 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(&self, waitInterval: super::super::foundation::TimeSpan, out: *mut *mut ContentPrefetchTrigger) -> HRESULT + fn Create(&self, waitInterval: foundation::TimeSpan, out: *mut *mut ContentPrefetchTrigger) -> HRESULT }} impl IContentPrefetchTriggerFactory { - #[inline] pub unsafe fn create(&self, waitInterval: super::super::foundation::TimeSpan) -> Result> { + #[inline] pub fn create(&self, waitInterval: foundation::TimeSpan) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, waitInterval, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IDeviceConnectionChangeTrigger, 2424790628, 15581, 20219, 171, 28, 91, 59, 106, 96, 206, 52); RT_INTERFACE!{interface IDeviceConnectionChangeTrigger(IDeviceConnectionChangeTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceConnectionChangeTrigger] { @@ -4081,44 +4081,44 @@ RT_INTERFACE!{interface IDeviceConnectionChangeTrigger(IDeviceConnectionChangeTr fn put_MaintainConnection(&self, value: bool) -> HRESULT }} impl IDeviceConnectionChangeTrigger { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_maintain_connection(&self) -> Result { + }} + #[inline] pub fn get_can_maintain_connection(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanMaintainConnection)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_maintain_connection(&self) -> Result { + }} + #[inline] pub fn get_maintain_connection(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaintainConnection)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_maintain_connection(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_maintain_connection(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaintainConnection)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DeviceConnectionChangeTrigger: IDeviceConnectionChangeTrigger} impl RtActivatable for DeviceConnectionChangeTrigger {} impl DeviceConnectionChangeTrigger { - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} + } } DEFINE_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]) [CLSID_DeviceConnectionChangeTrigger]); 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(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IDeviceConnectionChangeTriggerStatics { - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IDeviceManufacturerNotificationTrigger, 2166852277, 16811, 5850, 134, 194, 127, 123, 240, 145, 47, 91); RT_INTERFACE!{interface IDeviceManufacturerNotificationTrigger(IDeviceManufacturerNotificationTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceManufacturerNotificationTrigger] { @@ -4126,23 +4126,23 @@ RT_INTERFACE!{interface IDeviceManufacturerNotificationTrigger(IDeviceManufactur fn get_OneShot(&self, out: *mut bool) -> HRESULT }} impl IDeviceManufacturerNotificationTrigger { - #[inline] pub unsafe fn get_trigger_qualifier(&self) -> Result { + #[inline] pub fn get_trigger_qualifier(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TriggerQualifier)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_one_shot(&self) -> Result { + }} + #[inline] pub fn get_one_shot(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OneShot)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class DeviceManufacturerNotificationTrigger: IDeviceManufacturerNotificationTrigger} impl RtActivatable for DeviceManufacturerNotificationTrigger {} impl DeviceManufacturerNotificationTrigger { - #[inline] pub fn create(triggerQualifier: &HStringArg, oneShot: bool) -> Result> { unsafe { + #[inline] pub fn create(triggerQualifier: &HStringArg, oneShot: bool) -> Result> { >::get_activation_factory().create(triggerQualifier, oneShot) - }} + } } DEFINE_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]) [CLSID_DeviceManufacturerNotificationTrigger]); DEFINE_IID!(IID_IDeviceManufacturerNotificationTriggerFactory, 2035670645, 9659, 16723, 161, 162, 48, 41, 252, 171, 182, 82); @@ -4150,28 +4150,28 @@ RT_INTERFACE!{static interface IDeviceManufacturerNotificationTriggerFactory(IDe fn Create(&self, triggerQualifier: HSTRING, oneShot: bool, out: *mut *mut DeviceManufacturerNotificationTrigger) -> HRESULT }} impl IDeviceManufacturerNotificationTriggerFactory { - #[inline] pub unsafe fn create(&self, triggerQualifier: &HStringArg, oneShot: bool) -> Result> { + #[inline] pub fn create(&self, triggerQualifier: &HStringArg, oneShot: bool) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, triggerQualifier.get(), oneShot, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, deviceId: HSTRING, expectedDuration: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestAsyncWithArguments(&self, deviceId: HSTRING, expectedDuration: super::super::foundation::TimeSpan, arguments: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn RequestAsyncSimple(&self, deviceId: HSTRING, expectedDuration: foundation::TimeSpan, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestAsyncWithArguments(&self, deviceId: HSTRING, expectedDuration: foundation::TimeSpan, arguments: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IDeviceServicingTrigger { - #[inline] pub unsafe fn request_async_simple(&self, deviceId: &HStringArg, expectedDuration: super::super::foundation::TimeSpan) -> Result>> { + #[inline] pub fn request_async_simple(&self, deviceId: &HStringArg, expectedDuration: foundation::TimeSpan) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAsyncSimple)(self as *const _ as *mut _, deviceId.get(), expectedDuration, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_async_with_arguments(&self, deviceId: &HStringArg, expectedDuration: super::super::foundation::TimeSpan, arguments: &HStringArg) -> Result>> { + }} + #[inline] pub fn request_async_with_arguments(&self, deviceId: &HStringArg, expectedDuration: foundation::TimeSpan, arguments: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAsyncWithArguments)(self as *const _ as *mut _, deviceId.get(), expectedDuration, arguments.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class DeviceServicingTrigger: IDeviceServicingTrigger} impl RtActivatable for DeviceServicingTrigger {} @@ -4181,20 +4181,20 @@ RT_ENUM! { enum DeviceTriggerResult: i32 { }} 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(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestAsyncWithArguments(&self, deviceId: HSTRING, arguments: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn RequestAsyncSimple(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestAsyncWithArguments(&self, deviceId: HSTRING, arguments: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IDeviceUseTrigger { - #[inline] pub unsafe fn request_async_simple(&self, deviceId: &HStringArg) -> Result>> { + #[inline] pub fn request_async_simple(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAsyncSimple)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_async_with_arguments(&self, deviceId: &HStringArg, arguments: &HStringArg) -> Result>> { + }} + #[inline] pub fn request_async_with_arguments(&self, deviceId: &HStringArg, arguments: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAsyncWithArguments)(self as *const _ as *mut _, deviceId.get(), arguments.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class DeviceUseTrigger: IDeviceUseTrigger} impl RtActivatable for DeviceUseTrigger {} @@ -4216,22 +4216,22 @@ RT_INTERFACE!{interface IGattCharacteristicNotificationTrigger(IGattCharacterist #[cfg(feature="windows-devices")] fn get_Characteristic(&self, out: *mut *mut super::super::devices::bluetooth::genericattributeprofile::GattCharacteristic) -> HRESULT }} impl IGattCharacteristicNotificationTrigger { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_characteristic(&self) -> Result> { + #[cfg(feature="windows-devices")] #[inline] pub fn get_characteristic(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Characteristic)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class GattCharacteristicNotificationTrigger: IGattCharacteristicNotificationTrigger} impl RtActivatable for GattCharacteristicNotificationTrigger {} impl RtActivatable for GattCharacteristicNotificationTrigger {} impl GattCharacteristicNotificationTrigger { - #[cfg(feature="windows-devices")] #[inline] pub fn create(characteristic: &super::super::devices::bluetooth::genericattributeprofile::GattCharacteristic) -> Result> { unsafe { + #[cfg(feature="windows-devices")] #[inline] pub fn create(characteristic: &super::super::devices::bluetooth::genericattributeprofile::GattCharacteristic) -> Result> { >::get_activation_factory().create(characteristic) - }} - #[cfg(feature="windows-devices")] #[inline] pub fn create_with_event_triggering_mode(characteristic: &super::super::devices::bluetooth::genericattributeprofile::GattCharacteristic, eventTriggeringMode: super::super::devices::bluetooth::background::BluetoothEventTriggeringMode) -> Result> { unsafe { + } + #[cfg(feature="windows-devices")] #[inline] pub fn create_with_event_triggering_mode(characteristic: &super::super::devices::bluetooth::genericattributeprofile::GattCharacteristic, eventTriggeringMode: super::super::devices::bluetooth::background::BluetoothEventTriggeringMode) -> Result> { >::get_activation_factory().create_with_event_triggering_mode(characteristic, eventTriggeringMode) - }} + } } DEFINE_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]) [CLSID_GattCharacteristicNotificationTrigger]); DEFINE_IID!(IID_IGattCharacteristicNotificationTrigger2, 2468520644, 44558, 17138, 178, 140, 245, 19, 114, 230, 146, 69); @@ -4239,33 +4239,33 @@ RT_INTERFACE!{interface IGattCharacteristicNotificationTrigger2(IGattCharacteris #[cfg(feature="windows-devices")] fn get_EventTriggeringMode(&self, out: *mut super::super::devices::bluetooth::background::BluetoothEventTriggeringMode) -> HRESULT }} impl IGattCharacteristicNotificationTrigger2 { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_event_triggering_mode(&self) -> Result { + #[cfg(feature="windows-devices")] #[inline] pub fn get_event_triggering_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EventTriggeringMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, characteristic: *mut super::super::devices::bluetooth::genericattributeprofile::GattCharacteristic, out: *mut *mut GattCharacteristicNotificationTrigger) -> HRESULT }} impl IGattCharacteristicNotificationTriggerFactory { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn create(&self, characteristic: &super::super::devices::bluetooth::genericattributeprofile::GattCharacteristic) -> Result> { + #[cfg(feature="windows-devices")] #[inline] pub fn create(&self, characteristic: &super::super::devices::bluetooth::genericattributeprofile::GattCharacteristic) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, characteristic as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IGattCharacteristicNotificationTriggerFactory2, 1503193375, 35411, 20127, 163, 44, 35, 205, 51, 102, 76, 238); RT_INTERFACE!{static interface IGattCharacteristicNotificationTriggerFactory2(IGattCharacteristicNotificationTriggerFactory2Vtbl): IInspectable(IInspectableVtbl) [IID_IGattCharacteristicNotificationTriggerFactory2] { #[cfg(feature="windows-devices")] fn CreateWithEventTriggeringMode(&self, characteristic: *mut super::super::devices::bluetooth::genericattributeprofile::GattCharacteristic, eventTriggeringMode: super::super::devices::bluetooth::background::BluetoothEventTriggeringMode, out: *mut *mut GattCharacteristicNotificationTrigger) -> HRESULT }} impl IGattCharacteristicNotificationTriggerFactory2 { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn create_with_event_triggering_mode(&self, characteristic: &super::super::devices::bluetooth::genericattributeprofile::GattCharacteristic, eventTriggeringMode: super::super::devices::bluetooth::background::BluetoothEventTriggeringMode) -> Result> { + #[cfg(feature="windows-devices")] #[inline] pub fn create_with_event_triggering_mode(&self, characteristic: &super::super::devices::bluetooth::genericattributeprofile::GattCharacteristic, eventTriggeringMode: super::super::devices::bluetooth::background::BluetoothEventTriggeringMode) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithEventTriggeringMode)(self as *const _ as *mut _, characteristic as *const _ as *mut _, eventTriggeringMode, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IGattServiceProviderTrigger, 3720782825, 5463, 19416, 133, 66, 70, 138, 160, 198, 150, 246); RT_INTERFACE!{interface IGattServiceProviderTrigger(IGattServiceProviderTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IGattServiceProviderTrigger] { @@ -4275,32 +4275,32 @@ RT_INTERFACE!{interface IGattServiceProviderTrigger(IGattServiceProviderTriggerV #[cfg(feature="windows-devices")] fn get_AdvertisingParameters(&self, out: *mut *mut super::super::devices::bluetooth::genericattributeprofile::GattServiceProviderAdvertisingParameters) -> HRESULT }} impl IGattServiceProviderTrigger { - #[inline] pub unsafe fn get_trigger_id(&self) -> Result { + #[inline] pub fn get_trigger_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TriggerId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_service(&self) -> Result> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_service(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Service)(self 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_advertising_parameters(&self, value: &super::super::devices::bluetooth::genericattributeprofile::GattServiceProviderAdvertisingParameters) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-devices")] #[inline] pub fn set_advertising_parameters(&self, value: &super::super::devices::bluetooth::genericattributeprofile::GattServiceProviderAdvertisingParameters) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AdvertisingParameters)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_advertising_parameters(&self) -> Result> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_advertising_parameters(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AdvertisingParameters)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class GattServiceProviderTrigger: IGattServiceProviderTrigger} impl RtActivatable for GattServiceProviderTrigger {} impl GattServiceProviderTrigger { - #[inline] pub fn create_async(triggerId: &HStringArg, serviceUuid: Guid) -> Result>> { unsafe { + #[inline] pub fn create_async(triggerId: &HStringArg, serviceUuid: Guid) -> Result>> { >::get_activation_factory().create_async(triggerId, serviceUuid) - }} + } } DEFINE_CLSID!(GattServiceProviderTrigger(&[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,83,101,114,118,105,99,101,80,114,111,118,105,100,101,114,84,114,105,103,103,101,114,0]) [CLSID_GattServiceProviderTrigger]); DEFINE_IID!(IID_IGattServiceProviderTriggerResult, 1011257777, 45464, 20100, 186, 212, 207, 74, 210, 153, 237, 58); @@ -4309,28 +4309,28 @@ RT_INTERFACE!{interface IGattServiceProviderTriggerResult(IGattServiceProviderTr #[cfg(feature="windows-devices")] fn get_Error(&self, out: *mut super::super::devices::bluetooth::BluetoothError) -> HRESULT }} impl IGattServiceProviderTriggerResult { - #[inline] pub unsafe fn get_trigger(&self) -> Result> { + #[inline] pub fn get_trigger(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Trigger)(self 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_error(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Error)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class GattServiceProviderTriggerResult: IGattServiceProviderTriggerResult} DEFINE_IID!(IID_IGattServiceProviderTriggerStatics, 3021185898, 58004, 17809, 165, 166, 100, 137, 26, 130, 129, 83); RT_INTERFACE!{static interface IGattServiceProviderTriggerStatics(IGattServiceProviderTriggerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGattServiceProviderTriggerStatics] { - fn CreateAsync(&self, triggerId: HSTRING, serviceUuid: Guid, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn CreateAsync(&self, triggerId: HSTRING, serviceUuid: Guid, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IGattServiceProviderTriggerStatics { - #[inline] pub unsafe fn create_async(&self, triggerId: &HStringArg, serviceUuid: Guid) -> Result>> { + #[inline] pub fn create_async(&self, triggerId: &HStringArg, serviceUuid: Guid) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAsync)(self as *const _ as *mut _, triggerId.get(), serviceUuid, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IGeovisitTrigger, 1209593258, 1249, 16679, 154, 76, 25, 53, 27, 138, 128, 164); RT_INTERFACE!{interface IGeovisitTrigger(IGeovisitTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IGeovisitTrigger] { @@ -4338,15 +4338,15 @@ RT_INTERFACE!{interface IGeovisitTrigger(IGeovisitTriggerVtbl): IInspectable(IIn #[cfg(feature="windows-devices")] fn put_MonitoringScope(&self, value: super::super::devices::geolocation::VisitMonitoringScope) -> HRESULT }} impl IGeovisitTrigger { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_monitoring_scope(&self) -> Result { + #[cfg(feature="windows-devices")] #[inline] pub fn get_monitoring_scope(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MonitoringScope)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn set_monitoring_scope(&self, value: super::super::devices::geolocation::VisitMonitoringScope) -> Result<()> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn set_monitoring_scope(&self, value: super::super::devices::geolocation::VisitMonitoringScope) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MonitoringScope)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class GeovisitTrigger: IGeovisitTrigger} impl RtActivatable for GeovisitTrigger {} @@ -4356,18 +4356,18 @@ RT_INTERFACE!{interface ILocationTrigger(ILocationTriggerVtbl): IInspectable(IIn fn get_TriggerType(&self, out: *mut LocationTriggerType) -> HRESULT }} impl ILocationTrigger { - #[inline] pub unsafe fn get_trigger_type(&self) -> Result { + #[inline] pub fn get_trigger_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TriggerType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class LocationTrigger: ILocationTrigger} impl RtActivatable for LocationTrigger {} impl LocationTrigger { - #[inline] pub fn create(triggerType: LocationTriggerType) -> Result> { unsafe { + #[inline] pub fn create(triggerType: LocationTriggerType) -> Result> { >::get_activation_factory().create(triggerType) - }} + } } DEFINE_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]) [CLSID_LocationTrigger]); DEFINE_IID!(IID_ILocationTriggerFactory, 285653767, 65385, 19977, 170, 139, 19, 132, 234, 71, 94, 152); @@ -4375,11 +4375,11 @@ RT_INTERFACE!{static interface ILocationTriggerFactory(ILocationTriggerFactoryVt fn Create(&self, triggerType: LocationTriggerType, out: *mut *mut LocationTrigger) -> HRESULT }} impl ILocationTriggerFactory { - #[inline] pub unsafe fn create(&self, triggerType: LocationTriggerType) -> Result> { + #[inline] pub fn create(&self, triggerType: LocationTriggerType) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, triggerType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum LocationTriggerType: i32 { Geofence (LocationTriggerType_Geofence) = 0, @@ -4390,23 +4390,23 @@ RT_INTERFACE!{interface IMaintenanceTrigger(IMaintenanceTriggerVtbl): IInspectab fn get_OneShot(&self, out: *mut bool) -> HRESULT }} impl IMaintenanceTrigger { - #[inline] pub unsafe fn get_freshness_time(&self) -> Result { + #[inline] pub fn get_freshness_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FreshnessTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_one_shot(&self) -> Result { + }} + #[inline] pub fn get_one_shot(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OneShot)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MaintenanceTrigger: IMaintenanceTrigger} impl RtActivatable for MaintenanceTrigger {} impl MaintenanceTrigger { - #[inline] pub fn create(freshnessTime: u32, oneShot: bool) -> Result> { unsafe { + #[inline] pub fn create(freshnessTime: u32, oneShot: bool) -> Result> { >::get_activation_factory().create(freshnessTime, oneShot) - }} + } } DEFINE_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]) [CLSID_MaintenanceTrigger]); DEFINE_IID!(IID_IMaintenanceTriggerFactory, 1262345006, 38877, 17961, 136, 176, 176, 108, 249, 72, 42, 229); @@ -4414,28 +4414,28 @@ RT_INTERFACE!{static interface IMaintenanceTriggerFactory(IMaintenanceTriggerFac fn Create(&self, freshnessTime: u32, oneShot: bool, out: *mut *mut MaintenanceTrigger) -> HRESULT }} impl IMaintenanceTriggerFactory { - #[inline] pub unsafe fn create(&self, freshnessTime: u32, oneShot: bool) -> Result> { + #[inline] pub fn create(&self, freshnessTime: u32, oneShot: bool) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, freshnessTime, oneShot, &mut out); if hr == S_OK { Ok(ComPtr::wrap(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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestAsyncWithArguments(&self, arguments: *mut super::super::foundation::collections::ValueSet, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn RequestAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestAsyncWithArguments(&self, arguments: *mut foundation::collections::ValueSet, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IMediaProcessingTrigger { - #[inline] pub unsafe fn request_async(&self) -> Result>> { + #[inline] pub fn request_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_async_with_arguments(&self, arguments: &super::super::foundation::collections::ValueSet) -> Result>> { + }} + #[inline] pub fn request_async_with_arguments(&self, arguments: &foundation::collections::ValueSet) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAsyncWithArguments)(self as *const _ as *mut _, arguments as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class MediaProcessingTrigger: IMediaProcessingTrigger} impl RtActivatable for MediaProcessingTrigger {} @@ -4467,18 +4467,18 @@ RT_INTERFACE!{interface INetworkOperatorNotificationTrigger(INetworkOperatorNoti fn get_NetworkAccountId(&self, out: *mut HSTRING) -> HRESULT }} impl INetworkOperatorNotificationTrigger { - #[inline] pub unsafe fn get_network_account_id(&self) -> Result { + #[inline] pub fn get_network_account_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NetworkAccountId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class NetworkOperatorNotificationTrigger: INetworkOperatorNotificationTrigger} impl RtActivatable for NetworkOperatorNotificationTrigger {} impl NetworkOperatorNotificationTrigger { - #[inline] pub fn create(networkAccountId: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(networkAccountId: &HStringArg) -> Result> { >::get_activation_factory().create(networkAccountId) - }} + } } DEFINE_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]) [CLSID_NetworkOperatorNotificationTrigger]); DEFINE_IID!(IID_INetworkOperatorNotificationTriggerFactory, 170016256, 10199, 17235, 173, 185, 146, 101, 170, 234, 87, 157); @@ -4486,11 +4486,11 @@ RT_INTERFACE!{static interface INetworkOperatorNotificationTriggerFactory(INetwo fn Create(&self, networkAccountId: HSTRING, out: *mut *mut NetworkOperatorNotificationTrigger) -> HRESULT }} impl INetworkOperatorNotificationTriggerFactory { - #[inline] pub unsafe fn create(&self, networkAccountId: &HStringArg) -> Result> { + #[inline] pub fn create(&self, networkAccountId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, networkAccountId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PaymentAppCanMakePaymentTrigger: IBackgroundTrigger} impl RtActivatable for PaymentAppCanMakePaymentTrigger {} @@ -4501,23 +4501,23 @@ RT_INTERFACE!{interface IPhoneTrigger(IPhoneTriggerVtbl): IInspectable(IInspecta fn get_TriggerType(&self, out: *mut super::calls::background::PhoneTriggerType) -> HRESULT }} impl IPhoneTrigger { - #[inline] pub unsafe fn get_one_shot(&self) -> Result { + #[inline] pub fn get_one_shot(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OneShot)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_trigger_type(&self) -> Result { + }} + #[inline] pub fn get_trigger_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TriggerType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PhoneTrigger: IPhoneTrigger} impl RtActivatable for PhoneTrigger {} impl PhoneTrigger { - #[inline] pub fn create(type_: super::calls::background::PhoneTriggerType, oneShot: bool) -> Result> { unsafe { + #[inline] pub fn create(type_: super::calls::background::PhoneTriggerType, oneShot: bool) -> Result> { >::get_activation_factory().create(type_, oneShot) - }} + } } DEFINE_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]) [CLSID_PhoneTrigger]); DEFINE_IID!(IID_IPhoneTriggerFactory, 2698591450, 24513, 18683, 165, 70, 50, 38, 32, 64, 21, 123); @@ -4525,19 +4525,19 @@ RT_INTERFACE!{static interface IPhoneTriggerFactory(IPhoneTriggerFactoryVtbl): I fn Create(&self, type_: super::calls::background::PhoneTriggerType, oneShot: bool, out: *mut *mut PhoneTrigger) -> HRESULT }} impl IPhoneTriggerFactory { - #[inline] pub unsafe fn create(&self, type_: super::calls::background::PhoneTriggerType, oneShot: bool) -> Result> { + #[inline] pub fn create(&self, type_: super::calls::background::PhoneTriggerType, oneShot: bool) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, type_, oneShot, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PushNotificationTrigger: IBackgroundTrigger} impl RtActivatable for PushNotificationTrigger {} impl RtActivatable for PushNotificationTrigger {} impl PushNotificationTrigger { - #[inline] pub fn create(applicationId: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(applicationId: &HStringArg) -> Result> { >::get_activation_factory().create(applicationId) - }} + } } DEFINE_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]) [CLSID_PushNotificationTrigger]); DEFINE_IID!(IID_IPushNotificationTriggerFactory, 1842933019, 17806, 20418, 188, 46, 213, 102, 79, 119, 237, 25); @@ -4545,11 +4545,11 @@ RT_INTERFACE!{static interface IPushNotificationTriggerFactory(IPushNotification fn Create(&self, applicationId: HSTRING, out: *mut *mut PushNotificationTrigger) -> HRESULT }} impl IPushNotificationTriggerFactory { - #[inline] pub unsafe fn create(&self, applicationId: &HStringArg) -> Result> { + #[inline] pub fn create(&self, applicationId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, applicationId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IRcsEndUserMessageAvailableTrigger, 2557283690, 45814, 18047, 169, 120, 164, 64, 145, 193, 26, 102); RT_INTERFACE!{interface IRcsEndUserMessageAvailableTrigger(IRcsEndUserMessageAvailableTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IRcsEndUserMessageAvailableTrigger] { @@ -4572,43 +4572,43 @@ RT_INTERFACE!{interface IRfcommConnectionTrigger(IRfcommConnectionTriggerVtbl): #[cfg(feature="windows-networking")] fn put_RemoteHostName(&self, value: *mut super::super::networking::HostName) -> HRESULT }} impl IRfcommConnectionTrigger { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_inbound_connection(&self) -> Result> { + #[cfg(feature="windows-devices")] #[inline] pub fn get_inbound_connection(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InboundConnection)(self 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_outbound_connection(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_outbound_connection(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OutboundConnection)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_allow_multiple_connections(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_allow_multiple_connections(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AllowMultipleConnections)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_allow_multiple_connections(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_allow_multiple_connections(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AllowMultipleConnections)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-networking")] #[inline] pub unsafe fn get_protection_level(&self) -> Result { + }} + #[cfg(feature="windows-networking")] #[inline] pub fn get_protection_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProtectionLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-networking")] #[inline] pub unsafe fn set_protection_level(&self, value: super::super::networking::sockets::SocketProtectionLevel) -> Result<()> { + }} + #[cfg(feature="windows-networking")] #[inline] pub fn set_protection_level(&self, value: super::super::networking::sockets::SocketProtectionLevel) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ProtectionLevel)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-networking")] #[inline] pub unsafe fn get_remote_host_name(&self) -> Result> { + }} + #[cfg(feature="windows-networking")] #[inline] pub fn get_remote_host_name(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteHostName)(self 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 set_remote_host_name(&self, value: &super::super::networking::HostName) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-networking")] #[inline] pub fn set_remote_host_name(&self, value: &super::super::networking::HostName) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RemoteHostName)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class RfcommConnectionTrigger: IRfcommConnectionTrigger} impl RtActivatable for RfcommConnectionTrigger {} @@ -4627,9 +4627,9 @@ RT_INTERFACE!{interface ISensorDataThresholdTrigger(ISensorDataThresholdTriggerV RT_CLASS!{class SensorDataThresholdTrigger: ISensorDataThresholdTrigger} impl RtActivatable for SensorDataThresholdTrigger {} impl SensorDataThresholdTrigger { - #[cfg(feature="windows-devices")] #[inline] pub fn create(threshold: &super::super::devices::sensors::ISensorDataThreshold) -> Result> { unsafe { + #[cfg(feature="windows-devices")] #[inline] pub fn create(threshold: &super::super::devices::sensors::ISensorDataThreshold) -> Result> { >::get_activation_factory().create(threshold) - }} + } } DEFINE_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]) [CLSID_SensorDataThresholdTrigger]); DEFINE_IID!(IID_ISensorDataThresholdTriggerFactory, 2451564149, 32240, 19875, 151, 179, 229, 68, 238, 133, 127, 230); @@ -4637,29 +4637,29 @@ RT_INTERFACE!{static interface ISensorDataThresholdTriggerFactory(ISensorDataThr #[cfg(feature="windows-devices")] fn Create(&self, threshold: *mut super::super::devices::sensors::ISensorDataThreshold, out: *mut *mut SensorDataThresholdTrigger) -> HRESULT }} impl ISensorDataThresholdTriggerFactory { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn create(&self, threshold: &super::super::devices::sensors::ISensorDataThreshold) -> Result> { + #[cfg(feature="windows-devices")] #[inline] pub fn create(&self, threshold: &super::super::devices::sensors::ISensorDataThreshold) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, threshold as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ISmartCardTrigger, 4114335148, 33994, 18802, 140, 233, 229, 143, 151, 179, 122, 80); RT_INTERFACE!{interface ISmartCardTrigger(ISmartCardTriggerVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardTrigger] { #[cfg(feature="windows-devices")] fn get_TriggerType(&self, out: *mut super::super::devices::smartcards::SmartCardTriggerType) -> HRESULT }} impl ISmartCardTrigger { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_trigger_type(&self) -> Result { + #[cfg(feature="windows-devices")] #[inline] pub fn get_trigger_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TriggerType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SmartCardTrigger: ISmartCardTrigger} impl RtActivatable for SmartCardTrigger {} impl SmartCardTrigger { - #[cfg(feature="windows-devices")] #[inline] pub fn create(triggerType: super::super::devices::smartcards::SmartCardTriggerType) -> Result> { unsafe { + #[cfg(feature="windows-devices")] #[inline] pub fn create(triggerType: super::super::devices::smartcards::SmartCardTriggerType) -> Result> { >::get_activation_factory().create(triggerType) - }} + } } DEFINE_CLSID!(SmartCardTrigger(&[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,97,114,116,67,97,114,100,84,114,105,103,103,101,114,0]) [CLSID_SmartCardTrigger]); DEFINE_IID!(IID_ISmartCardTriggerFactory, 1673483459, 35265, 19968, 169, 211, 151, 198, 41, 38, 157, 173); @@ -4667,18 +4667,18 @@ RT_INTERFACE!{static interface ISmartCardTriggerFactory(ISmartCardTriggerFactory #[cfg(feature="windows-devices")] fn Create(&self, triggerType: super::super::devices::smartcards::SmartCardTriggerType, out: *mut *mut SmartCardTrigger) -> HRESULT }} impl ISmartCardTriggerFactory { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn create(&self, triggerType: super::super::devices::smartcards::SmartCardTriggerType) -> Result> { + #[cfg(feature="windows-devices")] #[inline] pub fn create(&self, triggerType: super::super::devices::smartcards::SmartCardTriggerType) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, triggerType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class SmsMessageReceivedTrigger: IBackgroundTrigger} impl RtActivatable for SmsMessageReceivedTrigger {} impl SmsMessageReceivedTrigger { - #[cfg(feature="windows-devices")] #[inline] pub fn create(filterRules: &super::super::devices::sms::SmsFilterRules) -> Result> { unsafe { + #[cfg(feature="windows-devices")] #[inline] pub fn create(filterRules: &super::super::devices::sms::SmsFilterRules) -> Result> { >::get_activation_factory().create(filterRules) - }} + } } DEFINE_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]) [CLSID_SmsMessageReceivedTrigger]); DEFINE_IID!(IID_ISmsMessageReceivedTriggerFactory, 3929725128, 27556, 19122, 141, 33, 188, 107, 9, 199, 117, 100); @@ -4686,22 +4686,22 @@ RT_INTERFACE!{static interface ISmsMessageReceivedTriggerFactory(ISmsMessageRece #[cfg(feature="windows-devices")] fn Create(&self, filterRules: *mut super::super::devices::sms::SmsFilterRules, out: *mut *mut SmsMessageReceivedTrigger) -> HRESULT }} impl ISmsMessageReceivedTriggerFactory { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn create(&self, filterRules: &super::super::devices::sms::SmsFilterRules) -> Result> { + #[cfg(feature="windows-devices")] #[inline] pub fn create(&self, filterRules: &super::super::devices::sms::SmsFilterRules) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, filterRules as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut bool) -> HRESULT }} impl ISocketActivityTrigger { - #[inline] pub unsafe fn get_is_wake_from_low_power_supported(&self) -> Result { + #[inline] pub fn get_is_wake_from_low_power_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsWakeFromLowPowerSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SocketActivityTrigger: IBackgroundTrigger} impl RtActivatable for SocketActivityTrigger {} @@ -4713,48 +4713,48 @@ RT_INTERFACE!{interface IStorageLibraryContentChangedTrigger(IStorageLibraryCont RT_CLASS!{class StorageLibraryContentChangedTrigger: IStorageLibraryContentChangedTrigger} impl RtActivatable for StorageLibraryContentChangedTrigger {} impl StorageLibraryContentChangedTrigger { - #[cfg(feature="windows-storage")] #[inline] pub fn create(storageLibrary: &super::super::storage::StorageLibrary) -> Result> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn create(storageLibrary: &super::super::storage::StorageLibrary) -> Result>> { >::get_activation_factory().create(storageLibrary) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn create_from_libraries(storageLibraries: &super::super::foundation::collections::IIterable) -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_libraries(storageLibraries: &foundation::collections::IIterable) -> Result>> { >::get_activation_factory().create_from_libraries(storageLibraries) - }} + } } DEFINE_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]) [CLSID_StorageLibraryContentChangedTrigger]); 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(&self, storageLibrary: *mut super::super::storage::StorageLibrary, out: *mut *mut StorageLibraryContentChangedTrigger) -> HRESULT, - #[cfg(feature="windows-storage")] fn CreateFromLibraries(&self, storageLibraries: *mut super::super::foundation::collections::IIterable, out: *mut *mut StorageLibraryContentChangedTrigger) -> HRESULT + #[cfg(feature="windows-storage")] fn CreateFromLibraries(&self, storageLibraries: *mut foundation::collections::IIterable, out: *mut *mut StorageLibraryContentChangedTrigger) -> HRESULT }} impl IStorageLibraryContentChangedTriggerStatics { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn create(&self, storageLibrary: &super::super::storage::StorageLibrary) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn create(&self, storageLibrary: &super::super::storage::StorageLibrary) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, 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(&self, storageLibraries: &super::super::foundation::collections::IIterable) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_libraries(&self, storageLibraries: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromLibraries)(self as *const _ as *mut _, storageLibraries as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut SystemConditionType) -> HRESULT }} impl ISystemCondition { - #[inline] pub unsafe fn get_condition_type(&self) -> Result { + #[inline] pub fn get_condition_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ConditionType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SystemCondition: ISystemCondition} impl RtActivatable for SystemCondition {} impl SystemCondition { - #[inline] pub fn create(conditionType: SystemConditionType) -> Result> { unsafe { + #[inline] pub fn create(conditionType: SystemConditionType) -> Result> { >::get_activation_factory().create(conditionType) - }} + } } DEFINE_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]) [CLSID_SystemCondition]); DEFINE_IID!(IID_ISystemConditionFactory, 3530150385, 1447, 18862, 135, 215, 22, 178, 184, 185, 165, 83); @@ -4762,11 +4762,11 @@ RT_INTERFACE!{static interface ISystemConditionFactory(ISystemConditionFactoryVt fn Create(&self, conditionType: SystemConditionType, out: *mut *mut SystemCondition) -> HRESULT }} impl ISystemConditionFactory { - #[inline] pub unsafe fn create(&self, conditionType: SystemConditionType) -> Result> { + #[inline] pub fn create(&self, conditionType: SystemConditionType) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, conditionType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -4777,23 +4777,23 @@ RT_INTERFACE!{interface ISystemTrigger(ISystemTriggerVtbl): IInspectable(IInspec fn get_TriggerType(&self, out: *mut SystemTriggerType) -> HRESULT }} impl ISystemTrigger { - #[inline] pub unsafe fn get_one_shot(&self) -> Result { + #[inline] pub fn get_one_shot(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OneShot)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_trigger_type(&self) -> Result { + }} + #[inline] pub fn get_trigger_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TriggerType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SystemTrigger: ISystemTrigger} impl RtActivatable for SystemTrigger {} impl SystemTrigger { - #[inline] pub fn create(triggerType: SystemTriggerType, oneShot: bool) -> Result> { unsafe { + #[inline] pub fn create(triggerType: SystemTriggerType, oneShot: bool) -> Result> { >::get_activation_factory().create(triggerType, oneShot) - }} + } } DEFINE_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]) [CLSID_SystemTrigger]); DEFINE_IID!(IID_ISystemTriggerFactory, 3892585428, 34705, 17785, 129, 38, 135, 236, 138, 170, 64, 122); @@ -4801,11 +4801,11 @@ RT_INTERFACE!{static interface ISystemTriggerFactory(ISystemTriggerFactoryVtbl): fn Create(&self, triggerType: SystemTriggerType, oneShot: bool, out: *mut *mut SystemTrigger) -> HRESULT }} impl ISystemTriggerFactory { - #[inline] pub unsafe fn create(&self, triggerType: SystemTriggerType, oneShot: bool) -> Result> { + #[inline] pub fn create(&self, triggerType: SystemTriggerType, oneShot: bool) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, triggerType, oneShot, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -4816,23 +4816,23 @@ RT_INTERFACE!{interface ITimeTrigger(ITimeTriggerVtbl): IInspectable(IInspectabl fn get_OneShot(&self, out: *mut bool) -> HRESULT }} impl ITimeTrigger { - #[inline] pub unsafe fn get_freshness_time(&self) -> Result { + #[inline] pub fn get_freshness_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FreshnessTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_one_shot(&self) -> Result { + }} + #[inline] pub fn get_one_shot(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OneShot)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class TimeTrigger: ITimeTrigger} impl RtActivatable for TimeTrigger {} impl TimeTrigger { - #[inline] pub fn create(freshnessTime: u32, oneShot: bool) -> Result> { unsafe { + #[inline] pub fn create(freshnessTime: u32, oneShot: bool) -> Result> { >::get_activation_factory().create(freshnessTime, oneShot) - }} + } } DEFINE_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]) [CLSID_TimeTrigger]); DEFINE_IID!(IID_ITimeTriggerFactory, 952533758, 39764, 17894, 178, 243, 38, 155, 135, 166, 247, 52); @@ -4840,19 +4840,19 @@ RT_INTERFACE!{static interface ITimeTriggerFactory(ITimeTriggerFactoryVtbl): IIn fn Create(&self, freshnessTime: u32, oneShot: bool, out: *mut *mut TimeTrigger) -> HRESULT }} impl ITimeTriggerFactory { - #[inline] pub unsafe fn create(&self, freshnessTime: u32, oneShot: bool) -> Result> { + #[inline] pub fn create(&self, freshnessTime: u32, oneShot: bool) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, freshnessTime, oneShot, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ToastNotificationActionTrigger: IBackgroundTrigger} impl RtActivatable for ToastNotificationActionTrigger {} impl RtActivatable for ToastNotificationActionTrigger {} impl ToastNotificationActionTrigger { - #[inline] pub fn create(applicationId: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(applicationId: &HStringArg) -> Result> { >::get_activation_factory().create(applicationId) - }} + } } DEFINE_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]) [CLSID_ToastNotificationActionTrigger]); DEFINE_IID!(IID_IToastNotificationActionTriggerFactory, 2963143719, 25728, 17225, 129, 37, 151, 179, 239, 170, 10, 58); @@ -4860,19 +4860,19 @@ RT_INTERFACE!{static interface IToastNotificationActionTriggerFactory(IToastNoti fn Create(&self, applicationId: HSTRING, out: *mut *mut ToastNotificationActionTrigger) -> HRESULT }} impl IToastNotificationActionTriggerFactory { - #[inline] pub unsafe fn create(&self, applicationId: &HStringArg) -> Result> { + #[inline] pub fn create(&self, applicationId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, applicationId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ToastNotificationHistoryChangedTrigger: IBackgroundTrigger} impl RtActivatable for ToastNotificationHistoryChangedTrigger {} impl RtActivatable for ToastNotificationHistoryChangedTrigger {} impl ToastNotificationHistoryChangedTrigger { - #[inline] pub fn create(applicationId: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(applicationId: &HStringArg) -> Result> { >::get_activation_factory().create(applicationId) - }} + } } DEFINE_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]) [CLSID_ToastNotificationHistoryChangedTrigger]); DEFINE_IID!(IID_IToastNotificationHistoryChangedTriggerFactory, 2177301165, 34711, 18309, 129, 180, 176, 204, 203, 115, 209, 217); @@ -4880,18 +4880,18 @@ RT_INTERFACE!{static interface IToastNotificationHistoryChangedTriggerFactory(IT fn Create(&self, applicationId: HSTRING, out: *mut *mut ToastNotificationHistoryChangedTrigger) -> HRESULT }} impl IToastNotificationHistoryChangedTriggerFactory { - #[inline] pub unsafe fn create(&self, applicationId: &HStringArg) -> Result> { + #[inline] pub fn create(&self, applicationId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, applicationId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class UserNotificationChangedTrigger: IBackgroundTrigger} impl RtActivatable for UserNotificationChangedTrigger {} impl UserNotificationChangedTrigger { - #[cfg(feature="windows-ui")] #[inline] pub fn create(notificationKinds: super::super::ui::notifications::NotificationKinds) -> Result> { unsafe { + #[cfg(feature="windows-ui")] #[inline] pub fn create(notificationKinds: super::super::ui::notifications::NotificationKinds) -> Result> { >::get_activation_factory().create(notificationKinds) - }} + } } DEFINE_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]) [CLSID_UserNotificationChangedTrigger]); DEFINE_IID!(IID_IUserNotificationChangedTriggerFactory, 3402908524, 27051, 19992, 164, 138, 94, 210, 172, 67, 89, 87); @@ -4899,11 +4899,11 @@ RT_INTERFACE!{static interface IUserNotificationChangedTriggerFactory(IUserNotif #[cfg(feature="windows-ui")] fn Create(&self, notificationKinds: super::super::ui::notifications::NotificationKinds, out: *mut *mut UserNotificationChangedTrigger) -> HRESULT }} impl IUserNotificationChangedTriggerFactory { - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn create(&self, notificationKinds: super::super::ui::notifications::NotificationKinds) -> Result> { + #[cfg(feature="windows-ui")] #[inline] pub fn create(&self, notificationKinds: super::super::ui::notifications::NotificationKinds) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, notificationKinds, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } } // Windows.ApplicationModel.Background pub mod core { // Windows.ApplicationModel.Core @@ -4911,19 +4911,19 @@ 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(&self, out: *mut *mut super::AppDisplayInfo) -> HRESULT, - fn LaunchAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn LaunchAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IAppListEntry { - #[inline] pub unsafe fn get_display_info(&self) -> Result> { + #[inline] pub fn get_display_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn launch_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn launch_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LaunchAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class AppListEntry: IAppListEntry} DEFINE_IID!(IID_IAppListEntry2, 3500546221, 48949, 17068, 172, 6, 134, 238, 235, 65, 208, 75); @@ -4931,11 +4931,11 @@ RT_INTERFACE!{interface IAppListEntry2(IAppListEntry2Vtbl): IInspectable(IInspec fn get_AppUserModelId(&self, out: *mut HSTRING) -> HRESULT }} impl IAppListEntry2 { - #[inline] pub unsafe fn get_app_user_model_id(&self) -> Result { + #[inline] pub fn get_app_user_model_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppUserModelId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum AppRestartFailureReason: i32 { RestartPending (AppRestartFailureReason_RestartPending) = 0, NotInForeground (AppRestartFailureReason_NotInForeground) = 1, InvalidUser (AppRestartFailureReason_InvalidUser) = 2, Other (AppRestartFailureReason_Other) = 3, @@ -4943,57 +4943,57 @@ RT_ENUM! { enum AppRestartFailureReason: i32 { 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(&self, out: *mut HSTRING) -> HRESULT, - fn add_Suspending(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Suspending(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Resuming(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Resuming(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::IPropertySet) -> HRESULT, + fn add_Suspending(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Suspending(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Resuming(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Resuming(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn get_Properties(&self, out: *mut *mut foundation::collections::IPropertySet) -> HRESULT, fn GetCurrentView(&self, out: *mut *mut CoreApplicationView) -> HRESULT, fn Run(&self, viewSource: *mut IFrameworkViewSource) -> HRESULT, - fn RunWithActivationFactories(&self, activationFactoryCallback: *mut super::super::foundation::IGetActivationFactory) -> HRESULT + fn RunWithActivationFactories(&self, activationFactoryCallback: *mut foundation::IGetActivationFactory) -> HRESULT }} impl ICoreApplication { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_suspending(&self, handler: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_suspending(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Suspending)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_suspending(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_suspending(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Suspending)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_resuming(&self, handler: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_resuming(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Resuming)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_resuming(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_resuming(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Resuming)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result> { + }} + #[inline] pub fn get_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_view(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn run(&self, viewSource: &IFrameworkViewSource) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn run(&self, viewSource: &IFrameworkViewSource) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Run)(self as *const _ as *mut _, viewSource as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn run_with_activation_factories(&self, activationFactoryCallback: &super::super::foundation::IGetActivationFactory) -> Result<()> { + }} + #[inline] pub fn run_with_activation_factories(&self, activationFactoryCallback: &foundation::IGetActivationFactory) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RunWithActivationFactories)(self as *const _ as *mut _, activationFactoryCallback as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{static class CoreApplication} impl RtActivatable for CoreApplication {} @@ -5006,194 +5006,194 @@ impl RtActivatable for CoreApplication {} impl RtActivatable for CoreApplication {} impl RtActivatable for CoreApplication {} impl CoreApplication { - #[inline] pub fn get_id() -> Result { unsafe { + #[inline] pub fn get_id() -> Result { >::get_activation_factory().get_id() - }} - #[inline] pub fn add_suspending(handler: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_suspending(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_suspending(handler) - }} - #[inline] pub fn remove_suspending(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_suspending(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_suspending(token) - }} - #[inline] pub fn add_resuming(handler: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_resuming(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_resuming(handler) - }} - #[inline] pub fn remove_resuming(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_resuming(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_resuming(token) - }} - #[inline] pub fn get_properties() -> Result> { unsafe { + } + #[inline] pub fn get_properties() -> Result>> { >::get_activation_factory().get_properties() - }} - #[inline] pub fn get_current_view() -> Result> { unsafe { + } + #[inline] pub fn get_current_view() -> Result>> { >::get_activation_factory().get_current_view() - }} - #[inline] pub fn run(viewSource: &IFrameworkViewSource) -> Result<()> { unsafe { + } + #[inline] pub fn run(viewSource: &IFrameworkViewSource) -> Result<()> { >::get_activation_factory().run(viewSource) - }} - #[inline] pub fn run_with_activation_factories(activationFactoryCallback: &super::super::foundation::IGetActivationFactory) -> Result<()> { unsafe { + } + #[inline] pub fn run_with_activation_factories(activationFactoryCallback: &foundation::IGetActivationFactory) -> Result<()> { >::get_activation_factory().run_with_activation_factories(activationFactoryCallback) - }} - #[inline] pub fn add_background_activated(handler: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_background_activated(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_background_activated(handler) - }} - #[inline] pub fn remove_background_activated(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_background_activated(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_background_activated(token) - }} - #[inline] pub fn add_leaving_background(handler: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_leaving_background(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_leaving_background(handler) - }} - #[inline] pub fn remove_leaving_background(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_leaving_background(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_leaving_background(token) - }} - #[inline] pub fn add_entered_background(handler: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_entered_background(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_entered_background(handler) - }} - #[inline] pub fn remove_entered_background(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_entered_background(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_entered_background(token) - }} - #[inline] pub fn enable_prelaunch(value: bool) -> Result<()> { unsafe { + } + #[inline] pub fn enable_prelaunch(value: bool) -> Result<()> { >::get_activation_factory().enable_prelaunch(value) - }} - #[inline] pub fn request_restart_async(launchArguments: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn request_restart_async(launchArguments: &HStringArg) -> Result>> { >::get_activation_factory().request_restart_async(launchArguments) - }} - #[cfg(feature="windows-system")] #[inline] pub fn request_restart_for_user_async(user: &super::super::system::User, launchArguments: &HStringArg) -> Result>> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn request_restart_for_user_async(user: &super::super::system::User, launchArguments: &HStringArg) -> Result>> { >::get_activation_factory().request_restart_for_user_async(user, launchArguments) - }} - #[inline] pub fn exit() -> Result<()> { unsafe { + } + #[inline] pub fn exit() -> Result<()> { >::get_activation_factory().exit() - }} - #[inline] pub fn add_exiting(handler: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_exiting(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_exiting(handler) - }} - #[inline] pub fn remove_exiting(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_exiting(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_exiting(token) - }} - #[inline] pub fn add_unhandled_error_detected(handler: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_unhandled_error_detected(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_unhandled_error_detected(handler) - }} - #[inline] pub fn remove_unhandled_error_detected(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_unhandled_error_detected(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_unhandled_error_detected(token) - }} - #[inline] pub fn increment_application_use_count() -> Result<()> { unsafe { + } + #[inline] pub fn increment_application_use_count() -> Result<()> { >::get_activation_factory().increment_application_use_count() - }} - #[inline] pub fn decrement_application_use_count() -> Result<()> { unsafe { + } + #[inline] pub fn decrement_application_use_count() -> Result<()> { >::get_activation_factory().decrement_application_use_count() - }} - #[inline] pub fn get_views() -> Result>> { unsafe { + } + #[inline] pub fn get_views() -> Result>>> { >::get_activation_factory().get_views() - }} - #[inline] pub fn create_new_view(runtimeType: &HStringArg, entryPoint: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_new_view(runtimeType: &HStringArg, entryPoint: &HStringArg) -> Result>> { >::get_activation_factory().create_new_view(runtimeType, entryPoint) - }} - #[inline] pub fn get_main_view() -> Result> { unsafe { + } + #[inline] pub fn get_main_view() -> Result>> { >::get_activation_factory().get_main_view() - }} - #[inline] pub fn create_new_view_from_main_view() -> Result> { unsafe { + } + #[inline] pub fn create_new_view_from_main_view() -> Result>> { >::get_activation_factory().create_new_view_from_main_view() - }} - #[inline] pub fn create_new_view_with_view_source(viewSource: &IFrameworkViewSource) -> Result> { unsafe { + } + #[inline] pub fn create_new_view_with_view_source(viewSource: &IFrameworkViewSource) -> Result>> { >::get_activation_factory().create_new_view_with_view_source(viewSource) - }} + } } DEFINE_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]) [CLSID_CoreApplication]); 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(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_BackgroundActivated(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_LeavingBackground(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_LeavingBackground(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_EnteredBackground(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_EnteredBackground(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_BackgroundActivated(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_BackgroundActivated(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_LeavingBackground(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_LeavingBackground(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_EnteredBackground(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnteredBackground(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn EnablePrelaunch(&self, value: bool) -> HRESULT }} impl ICoreApplication2 { - #[inline] pub unsafe fn add_background_activated(&self, handler: &super::super::foundation::EventHandler) -> Result { + #[inline] pub fn add_background_activated(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_BackgroundActivated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_background_activated(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_background_activated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_BackgroundActivated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_leaving_background(&self, handler: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_leaving_background(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_LeavingBackground)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_leaving_background(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_leaving_background(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_LeavingBackground)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_entered_background(&self, handler: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_entered_background(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_EnteredBackground)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_entered_background(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_entered_background(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_EnteredBackground)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn enable_prelaunch(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn enable_prelaunch(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).EnablePrelaunch)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ICoreApplication3, 4276882745, 22923, 17671, 138, 103, 119, 38, 50, 88, 10, 87); RT_INTERFACE!{static interface ICoreApplication3(ICoreApplication3Vtbl): IInspectable(IInspectableVtbl) [IID_ICoreApplication3] { - fn RequestRestartAsync(&self, launchArguments: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-system")] fn RequestRestartForUserAsync(&self, user: *mut super::super::system::User, launchArguments: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn RequestRestartAsync(&self, launchArguments: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-system")] fn RequestRestartForUserAsync(&self, user: *mut super::super::system::User, launchArguments: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ICoreApplication3 { - #[inline] pub unsafe fn request_restart_async(&self, launchArguments: &HStringArg) -> Result>> { + #[inline] pub fn request_restart_async(&self, launchArguments: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestRestartAsync)(self as *const _ as *mut _, launchArguments.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn request_restart_for_user_async(&self, user: &super::super::system::User, launchArguments: &HStringArg) -> Result>> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn request_restart_for_user_async(&self, user: &super::super::system::User, launchArguments: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestRestartForUserAsync)(self as *const _ as *mut _, user as *const _ as *mut _, launchArguments.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } 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(&self) -> HRESULT, - fn add_Exiting(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Exiting(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_Exiting(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Exiting(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl ICoreApplicationExit { - #[inline] pub unsafe fn exit(&self) -> Result<()> { + #[inline] pub fn exit(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Exit)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_exiting(&self, handler: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_exiting(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Exiting)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_exiting(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_exiting(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Exiting)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_UnhandledErrorDetected(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_UnhandledErrorDetected(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_UnhandledErrorDetected(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl ICoreApplicationUnhandledError { - #[inline] pub unsafe fn add_unhandled_error_detected(&self, handler: &super::super::foundation::EventHandler) -> Result { + #[inline] pub fn add_unhandled_error_detected(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_UnhandledErrorDetected)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_unhandled_error_detected(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_unhandled_error_detected(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_UnhandledErrorDetected)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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] { @@ -5201,49 +5201,49 @@ RT_INTERFACE!{static interface ICoreApplicationUseCount(ICoreApplicationUseCount fn DecrementApplicationUseCount(&self) -> HRESULT }} impl ICoreApplicationUseCount { - #[inline] pub unsafe fn increment_application_use_count(&self) -> Result<()> { + #[inline] pub fn increment_application_use_count(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).IncrementApplicationUseCount)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn decrement_application_use_count(&self) -> Result<()> { + }} + #[inline] pub fn decrement_application_use_count(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).DecrementApplicationUseCount)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self) -> (), #[cfg(feature="windows-ui")] fn get_CoreWindow(&self, out: *mut *mut super::super::ui::core::CoreWindow) -> HRESULT, - fn add_Activated(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Activated(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Activated(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Activated(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_IsMain(&self, out: *mut bool) -> HRESULT, fn get_IsHosted(&self, out: *mut bool) -> HRESULT }} impl ICoreApplicationView { - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_core_window(&self) -> Result> { + #[cfg(feature="windows-ui")] #[inline] pub fn get_core_window(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CoreWindow)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_activated(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_activated(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Activated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_activated(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_activated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Activated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_main(&self) -> Result { + }} + #[inline] pub fn get_is_main(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsMain)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_hosted(&self) -> Result { + }} + #[inline] pub fn get_is_hosted(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsHosted)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class CoreApplicationView: ICoreApplicationView} DEFINE_IID!(IID_ICoreApplicationView2, 1760262879, 37247, 18667, 154, 235, 125, 229, 62, 8, 106, 177); @@ -5251,61 +5251,61 @@ RT_INTERFACE!{interface ICoreApplicationView2(ICoreApplicationView2Vtbl): IInspe #[cfg(feature="windows-ui")] fn get_Dispatcher(&self, out: *mut *mut super::super::ui::core::CoreDispatcher) -> HRESULT }} impl ICoreApplicationView2 { - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_dispatcher(&self) -> Result> { + #[cfg(feature="windows-ui")] #[inline] pub fn get_dispatcher(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Dispatcher)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut bool) -> HRESULT, fn get_TitleBar(&self, out: *mut *mut CoreApplicationViewTitleBar) -> HRESULT, - fn add_HostedViewClosing(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_HostedViewClosing(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_HostedViewClosing(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_HostedViewClosing(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl ICoreApplicationView3 { - #[inline] pub unsafe fn get_is_component(&self) -> Result { + #[inline] pub fn get_is_component(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsComponent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_title_bar(&self) -> Result> { + }} + #[inline] pub fn get_title_bar(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TitleBar)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_hosted_view_closing(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_hosted_view_closing(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_HostedViewClosing)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_hosted_view_closing(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_hosted_view_closing(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_HostedViewClosing)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ICoreApplicationView5, 734041512, 36592, 17517, 158, 96, 58, 62, 4, 40, 198, 113); RT_INTERFACE!{interface ICoreApplicationView5(ICoreApplicationView5Vtbl): IInspectable(IInspectableVtbl) [IID_ICoreApplicationView5] { - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::IPropertySet) -> HRESULT + fn get_Properties(&self, out: *mut *mut foundation::collections::IPropertySet) -> HRESULT }} impl ICoreApplicationView5 { - #[inline] pub unsafe fn get_properties(&self) -> Result> { + #[inline] pub fn get_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_ICoreApplicationView6, 3239695514, 1657, 18874, 128, 63, 183, 156, 92, 243, 76, 202); RT_INTERFACE!{interface ICoreApplicationView6(ICoreApplicationView6Vtbl): IInspectable(IInspectableVtbl) [IID_ICoreApplicationView6] { #[cfg(feature="windows-system")] fn get_DispatcherQueue(&self, out: *mut *mut super::super::system::DispatcherQueue) -> HRESULT }} impl ICoreApplicationView6 { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_dispatcher_queue(&self) -> Result> { + #[cfg(feature="windows-system")] #[inline] pub fn get_dispatcher_queue(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DispatcherQueue)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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] { @@ -5314,106 +5314,106 @@ RT_INTERFACE!{interface ICoreApplicationViewTitleBar(ICoreApplicationViewTitleBa fn get_SystemOverlayLeftInset(&self, out: *mut f64) -> HRESULT, fn get_SystemOverlayRightInset(&self, out: *mut f64) -> HRESULT, fn get_Height(&self, out: *mut f64) -> HRESULT, - fn add_LayoutMetricsChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_LayoutMetricsChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_LayoutMetricsChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_LayoutMetricsChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_IsVisible(&self, out: *mut bool) -> HRESULT, - fn add_IsVisibleChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_IsVisibleChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_IsVisibleChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_IsVisibleChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl ICoreApplicationViewTitleBar { - #[inline] pub unsafe fn set_extend_view_into_title_bar(&self, value: bool) -> Result<()> { + #[inline] pub fn set_extend_view_into_title_bar(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ExtendViewIntoTitleBar)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_extend_view_into_title_bar(&self) -> Result { + }} + #[inline] pub fn get_extend_view_into_title_bar(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendViewIntoTitleBar)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_system_overlay_left_inset(&self) -> Result { + }} + #[inline] pub fn get_system_overlay_left_inset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SystemOverlayLeftInset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_system_overlay_right_inset(&self) -> Result { + }} + #[inline] pub fn get_system_overlay_right_inset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SystemOverlayRightInset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_height(&self) -> Result { + }} + #[inline] pub fn get_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Height)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_layout_metrics_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_layout_metrics_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_LayoutMetricsChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_layout_metrics_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_layout_metrics_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_LayoutMetricsChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_visible(&self) -> Result { + }} + #[inline] pub fn get_is_visible(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsVisible)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_is_visible_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_is_visible_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_IsVisibleChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_is_visible_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_is_visible_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_IsVisibleChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CoreApplicationViewTitleBar: ICoreApplicationViewTitleBar} 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Views(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn CreateNewView(&self, runtimeType: HSTRING, entryPoint: HSTRING, out: *mut *mut CoreApplicationView) -> HRESULT, fn get_MainView(&self, out: *mut *mut CoreApplicationView) -> HRESULT }} impl ICoreImmersiveApplication { - #[inline] pub unsafe fn get_views(&self) -> Result>> { + #[inline] pub fn get_views(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Views)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_new_view(&self, runtimeType: &HStringArg, entryPoint: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_new_view(&self, runtimeType: &HStringArg, entryPoint: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateNewView)(self as *const _ as *mut _, runtimeType.get(), entryPoint.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_main_view(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_main_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MainView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut *mut CoreApplicationView) -> HRESULT }} impl ICoreImmersiveApplication2 { - #[inline] pub unsafe fn create_new_view_from_main_view(&self) -> Result> { + #[inline] pub fn create_new_view_from_main_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateNewViewFromMainView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, viewSource: *mut IFrameworkViewSource, out: *mut *mut CoreApplicationView) -> HRESULT }} impl ICoreImmersiveApplication3 { - #[inline] pub unsafe fn create_new_view_with_view_source(&self, viewSource: &IFrameworkViewSource) -> Result> { + #[inline] pub fn create_new_view_with_view_source(&self, viewSource: &IFrameworkViewSource) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateNewViewWithViewSource)(self as *const _ as *mut _, viewSource as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IFrameworkView, 4205534416, 35108, 17836, 173, 15, 160, 143, 174, 93, 3, 36); RT_INTERFACE!{interface IFrameworkView(IFrameworkViewVtbl): IInspectable(IInspectableVtbl) [IID_IFrameworkView] { @@ -5425,48 +5425,48 @@ RT_INTERFACE!{interface IFrameworkView(IFrameworkViewVtbl): IInspectable(IInspec fn Uninitialize(&self) -> HRESULT }} impl IFrameworkView { - #[inline] pub unsafe fn initialize(&self, applicationView: &CoreApplicationView) -> Result<()> { + #[inline] pub fn initialize(&self, applicationView: &CoreApplicationView) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Initialize)(self as *const _ as *mut _, applicationView as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn set_window(&self, window: &super::super::ui::core::CoreWindow) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_window(&self, window: &super::super::ui::core::CoreWindow) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetWindow)(self as *const _ as *mut _, window as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn load(&self, entryPoint: &HStringArg) -> Result<()> { + }} + #[inline] pub fn load(&self, entryPoint: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Load)(self as *const _ as *mut _, entryPoint.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn run(&self) -> Result<()> { + }} + #[inline] pub fn run(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Run)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn uninitialize(&self) -> Result<()> { + }} + #[inline] pub fn uninitialize(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Uninitialize)(self as *const _ as *mut _); 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(&self, out: *mut *mut IFrameworkView) -> HRESULT }} impl IFrameworkViewSource { - #[inline] pub unsafe fn create_view(&self) -> Result> { + #[inline] pub fn create_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IHostedViewClosingEventArgs { - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class HostedViewClosingEventArgs: IHostedViewClosingEventArgs} DEFINE_IID!(IID_IUnhandledError, 2488907558, 21429, 18054, 158, 175, 250, 129, 98, 220, 57, 128); @@ -5475,15 +5475,15 @@ RT_INTERFACE!{interface IUnhandledError(IUnhandledErrorVtbl): IInspectable(IInsp fn Propagate(&self) -> HRESULT }} impl IUnhandledError { - #[inline] pub unsafe fn get_handled(&self) -> Result { + #[inline] pub fn get_handled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Handled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn propagate(&self) -> Result<()> { + }} + #[inline] pub fn propagate(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Propagate)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class UnhandledError: IUnhandledError} DEFINE_IID!(IID_IUnhandledErrorDetectedEventArgs, 1738192779, 45878, 18466, 172, 64, 13, 117, 15, 11, 122, 43); @@ -5491,11 +5491,11 @@ RT_INTERFACE!{interface IUnhandledErrorDetectedEventArgs(IUnhandledErrorDetected fn get_UnhandledError(&self, out: *mut *mut UnhandledError) -> HRESULT }} impl IUnhandledErrorDetectedEventArgs { - #[inline] pub unsafe fn get_unhandled_error(&self) -> Result> { + #[inline] pub fn get_unhandled_error(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UnhandledError)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class UnhandledErrorDetectedEventArgs: IUnhandledErrorDetectedEventArgs} } // Windows.ApplicationModel.Core @@ -5504,32 +5504,32 @@ use ::prelude::*; RT_CLASS!{static class AppServiceCatalog} impl RtActivatable for AppServiceCatalog {} impl AppServiceCatalog { - #[inline] pub fn find_app_service_providers_async(appServiceName: &HStringArg) -> Result>>> { unsafe { + #[inline] pub fn find_app_service_providers_async(appServiceName: &HStringArg) -> Result>>> { >::get_activation_factory().find_app_service_providers_async(appServiceName) - }} + } } DEFINE_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]) [CLSID_AppServiceCatalog]); 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(&self, appServiceName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn FindAppServiceProvidersAsync(&self, appServiceName: HSTRING, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IAppServiceCatalogStatics { - #[inline] pub unsafe fn find_app_service_providers_async(&self, appServiceName: &HStringArg) -> Result>>> { + #[inline] pub fn find_app_service_providers_async(&self, appServiceName: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAppServiceProvidersAsync)(self as *const _ as *mut _, appServiceName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut AppServiceClosedStatus) -> HRESULT }} impl IAppServiceClosedEventArgs { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppServiceClosedEventArgs: IAppServiceClosedEventArgs} RT_ENUM! { enum AppServiceClosedStatus: i32 { @@ -5541,85 +5541,85 @@ RT_INTERFACE!{interface IAppServiceConnection(IAppServiceConnectionVtbl): IInspe fn put_AppServiceName(&self, value: HSTRING) -> HRESULT, fn get_PackageFamilyName(&self, out: *mut HSTRING) -> HRESULT, fn put_PackageFamilyName(&self, value: HSTRING) -> HRESULT, - fn OpenAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn SendMessageAsync(&self, message: *mut super::super::foundation::collections::ValueSet, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_RequestReceived(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RequestReceived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ServiceClosed(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ServiceClosed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn OpenAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn SendMessageAsync(&self, message: *mut foundation::collections::ValueSet, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_RequestReceived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RequestReceived(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ServiceClosed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ServiceClosed(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IAppServiceConnection { - #[inline] pub unsafe fn get_app_service_name(&self) -> Result { + #[inline] pub fn get_app_service_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppServiceName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_app_service_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_app_service_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AppServiceName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_package_family_name(&self) -> Result { + }} + #[inline] pub fn get_package_family_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PackageFamilyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_package_family_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_package_family_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PackageFamilyName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn open_async(&self) -> Result>> { + }} + #[inline] pub fn open_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn send_message_async(&self, message: &super::super::foundation::collections::ValueSet) -> Result>> { + }} + #[inline] pub fn send_message_async(&self, message: &foundation::collections::ValueSet) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SendMessageAsync)(self as *const _ as *mut _, 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(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_request_received(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RequestReceived)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_request_received(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_request_received(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RequestReceived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_service_closed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_service_closed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ServiceClosed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_service_closed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_service_closed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ServiceClosed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AppServiceConnection: IAppServiceConnection} impl RtActivatable for AppServiceConnection {} DEFINE_CLSID!(AppServiceConnection(&[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,111,110,110,101,99,116,105,111,110,0]) [CLSID_AppServiceConnection]); 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(&self, remoteSystemConnectionRequest: *mut super::super::system::remotesystems::RemoteSystemConnectionRequest, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-system")] fn OpenRemoteAsync(&self, remoteSystemConnectionRequest: *mut super::super::system::remotesystems::RemoteSystemConnectionRequest, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(feature="windows-system")] fn get_User(&self, out: *mut *mut super::super::system::User) -> HRESULT, #[cfg(feature="windows-system")] fn put_User(&self, value: *mut super::super::system::User) -> HRESULT }} impl IAppServiceConnection2 { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn open_remote_async(&self, remoteSystemConnectionRequest: &super::super::system::remotesystems::RemoteSystemConnectionRequest) -> Result>> { + #[cfg(feature="windows-system")] #[inline] pub fn open_remote_async(&self, remoteSystemConnectionRequest: &super::super::system::remotesystems::RemoteSystemConnectionRequest) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenRemoteAsync)(self as *const _ as *mut _, remoteSystemConnectionRequest 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 get_user(&self) -> Result> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_User)(self 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_user(&self, value: &super::super::system::User) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-system")] #[inline] pub fn set_user(&self, value: &super::super::system::User) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_User)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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, @@ -5629,28 +5629,28 @@ RT_INTERFACE!{interface IAppServiceDeferral(IAppServiceDeferralVtbl): IInspectab fn Complete(&self) -> HRESULT }} impl IAppServiceDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AppServiceDeferral: IAppServiceDeferral} 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(&self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT, - fn SendResponseAsync(&self, message: *mut super::super::foundation::collections::ValueSet, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn get_Message(&self, out: *mut *mut foundation::collections::ValueSet) -> HRESULT, + fn SendResponseAsync(&self, message: *mut foundation::collections::ValueSet, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IAppServiceRequest { - #[inline] pub unsafe fn get_message(&self) -> Result> { + #[inline] pub fn get_message(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Message)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn send_response_async(&self, message: &super::super::foundation::collections::ValueSet) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn send_response_async(&self, message: &foundation::collections::ValueSet) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SendResponseAsync)(self as *const _ as *mut _, message as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class AppServiceRequest: IAppServiceRequest} DEFINE_IID!(IID_IAppServiceRequestReceivedEventArgs, 1846682464, 65381, 17582, 158, 69, 133, 127, 228, 24, 6, 129); @@ -5659,34 +5659,34 @@ RT_INTERFACE!{interface IAppServiceRequestReceivedEventArgs(IAppServiceRequestRe fn GetDeferral(&self, out: *mut *mut AppServiceDeferral) -> HRESULT }} impl IAppServiceRequestReceivedEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppServiceRequestReceivedEventArgs: IAppServiceRequestReceivedEventArgs} 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(&self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT, + fn get_Message(&self, out: *mut *mut foundation::collections::ValueSet) -> HRESULT, fn get_Status(&self, out: *mut AppServiceResponseStatus) -> HRESULT }} impl IAppServiceResponse { - #[inline] pub unsafe fn get_message(&self) -> Result> { + #[inline] pub fn get_message(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Message)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppServiceResponse: IAppServiceResponse} RT_ENUM! { enum AppServiceResponseStatus: i32 { @@ -5699,21 +5699,21 @@ RT_INTERFACE!{interface IAppServiceTriggerDetails(IAppServiceTriggerDetailsVtbl) fn get_AppServiceConnection(&self, out: *mut *mut AppServiceConnection) -> HRESULT }} impl IAppServiceTriggerDetails { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_caller_package_family_name(&self) -> Result { + }} + #[inline] pub fn get_caller_package_family_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CallerPackageFamilyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_service_connection(&self) -> Result> { + }} + #[inline] pub fn get_app_service_connection(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppServiceConnection)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppServiceTriggerDetails: IAppServiceTriggerDetails} DEFINE_IID!(IID_IAppServiceTriggerDetails2, 3896333490, 10444, 17394, 180, 101, 192, 72, 46, 89, 226, 220); @@ -5721,43 +5721,43 @@ RT_INTERFACE!{interface IAppServiceTriggerDetails2(IAppServiceTriggerDetails2Vtb fn get_IsRemoteSystemConnection(&self, out: *mut bool) -> HRESULT }} impl IAppServiceTriggerDetails2 { - #[inline] pub unsafe fn get_is_remote_system_connection(&self) -> Result { + #[inline] pub fn get_is_remote_system_connection(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsRemoteSystemConnection)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IAppServiceTriggerDetails3, 4225179169, 31033, 20072, 158, 60, 119, 128, 20, 122, 171, 182); RT_INTERFACE!{interface IAppServiceTriggerDetails3(IAppServiceTriggerDetails3Vtbl): IInspectable(IInspectableVtbl) [IID_IAppServiceTriggerDetails3] { - fn CheckCallerForCapabilityAsync(&self, capabilityName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn CheckCallerForCapabilityAsync(&self, capabilityName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IAppServiceTriggerDetails3 { - #[inline] pub unsafe fn check_caller_for_capability_async(&self, capabilityName: &HStringArg) -> Result>> { + #[inline] pub fn check_caller_for_capability_async(&self, capabilityName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CheckCallerForCapabilityAsync)(self as *const _ as *mut _, capabilityName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } } // Windows.ApplicationModel.AppService pub mod appointments { // Windows.ApplicationModel.Appointments use ::prelude::*; 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(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn put_StartTime(&self, value: super::super::foundation::DateTime) -> HRESULT, - fn get_Duration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_Duration(&self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_StartTime(&self, out: *mut foundation::DateTime) -> HRESULT, + fn put_StartTime(&self, value: foundation::DateTime) -> HRESULT, + fn get_Duration(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_Duration(&self, value: foundation::TimeSpan) -> HRESULT, fn get_Location(&self, out: *mut HSTRING) -> HRESULT, fn put_Location(&self, value: HSTRING) -> HRESULT, fn get_Subject(&self, out: *mut HSTRING) -> HRESULT, fn put_Subject(&self, value: HSTRING) -> HRESULT, fn get_Details(&self, out: *mut HSTRING) -> HRESULT, fn put_Details(&self, value: HSTRING) -> HRESULT, - fn get_Reminder(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_Reminder(&self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_Reminder(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_Reminder(&self, value: *mut foundation::IReference) -> HRESULT, fn get_Organizer(&self, out: *mut *mut AppointmentOrganizer) -> HRESULT, fn put_Organizer(&self, value: *mut AppointmentOrganizer) -> HRESULT, - fn get_Invitees(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Invitees(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_Recurrence(&self, out: *mut *mut AppointmentRecurrence) -> HRESULT, fn put_Recurrence(&self, value: *mut AppointmentRecurrence) -> HRESULT, fn get_BusyStatus(&self, out: *mut AppointmentBusyStatus) -> HRESULT, @@ -5766,123 +5766,123 @@ RT_INTERFACE!{interface IAppointment(IAppointmentVtbl): IInspectable(IInspectabl fn put_AllDay(&self, value: bool) -> HRESULT, fn get_Sensitivity(&self, out: *mut AppointmentSensitivity) -> HRESULT, fn put_Sensitivity(&self, value: AppointmentSensitivity) -> HRESULT, - fn get_Uri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_Uri(&self, value: *mut super::super::foundation::Uri) -> HRESULT + fn get_Uri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_Uri(&self, value: *mut foundation::Uri) -> HRESULT }} impl IAppointment { - #[inline] pub unsafe fn get_start_time(&self) -> Result { + #[inline] pub fn get_start_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StartTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_start_time(&self, value: super::super::foundation::DateTime) -> Result<()> { + }} + #[inline] pub fn set_start_time(&self, value: foundation::DateTime) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StartTime)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_duration(&self) -> Result { + }} + #[inline] pub fn get_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Duration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_duration(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_duration(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Duration)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_location(&self) -> Result { + }} + #[inline] pub fn get_location(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Location)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_location(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_location(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Location)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_subject(&self) -> Result { + }} + #[inline] pub fn get_subject(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Subject)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_subject(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_subject(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Subject)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_details(&self) -> Result { + }} + #[inline] pub fn get_details(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Details)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_details(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_details(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Details)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_reminder(&self) -> Result>> { + }} + #[inline] pub fn get_reminder(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Reminder)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_reminder(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_reminder(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Reminder)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_organizer(&self) -> Result> { + }} + #[inline] pub fn get_organizer(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Organizer)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_organizer(&self, value: &AppointmentOrganizer) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_organizer(&self, value: &AppointmentOrganizer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Organizer)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_invitees(&self) -> Result>> { + }} + #[inline] pub fn get_invitees(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Invitees)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_recurrence(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_recurrence(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Recurrence)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_recurrence(&self, value: &AppointmentRecurrence) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_recurrence(&self, value: &AppointmentRecurrence) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Recurrence)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_busy_status(&self) -> Result { + }} + #[inline] pub fn get_busy_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BusyStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_busy_status(&self, value: AppointmentBusyStatus) -> Result<()> { + }} + #[inline] pub fn set_busy_status(&self, value: AppointmentBusyStatus) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BusyStatus)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_all_day(&self) -> Result { + }} + #[inline] pub fn get_all_day(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AllDay)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_all_day(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_all_day(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AllDay)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_sensitivity(&self) -> Result { + }} + #[inline] pub fn get_sensitivity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Sensitivity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_sensitivity(&self, value: AppointmentSensitivity) -> Result<()> { + }} + #[inline] pub fn set_sensitivity(&self, value: AppointmentSensitivity) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Sensitivity)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_uri(&self) -> Result> { + }} + #[inline] pub fn get_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Uri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_uri(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_uri(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Uri)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Appointment: IAppointment} impl RtActivatable for Appointment {} @@ -5893,15 +5893,15 @@ RT_INTERFACE!{interface IAppointment2(IAppointment2Vtbl): IInspectable(IInspecta fn get_CalendarId(&self, out: *mut HSTRING) -> HRESULT, fn get_RoamingId(&self, out: *mut HSTRING) -> HRESULT, fn put_RoamingId(&self, value: HSTRING) -> HRESULT, - fn get_OriginalStartTime(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_OriginalStartTime(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn get_IsResponseRequested(&self, out: *mut bool) -> HRESULT, fn put_IsResponseRequested(&self, value: bool) -> HRESULT, fn get_AllowNewTimeProposal(&self, out: *mut bool) -> HRESULT, fn put_AllowNewTimeProposal(&self, value: bool) -> HRESULT, fn get_OnlineMeetingLink(&self, out: *mut HSTRING) -> HRESULT, fn put_OnlineMeetingLink(&self, value: HSTRING) -> HRESULT, - fn get_ReplyTime(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_ReplyTime(&self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_ReplyTime(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_ReplyTime(&self, value: *mut foundation::IReference) -> HRESULT, fn get_UserResponse(&self, out: *mut AppointmentParticipantResponse) -> HRESULT, fn put_UserResponse(&self, value: AppointmentParticipantResponse) -> HRESULT, fn get_HasInvitees(&self, out: *mut bool) -> HRESULT, @@ -5911,98 +5911,98 @@ RT_INTERFACE!{interface IAppointment2(IAppointment2Vtbl): IInspectable(IInspecta fn put_IsOrganizedByUser(&self, value: bool) -> HRESULT }} impl IAppointment2 { - #[inline] pub unsafe fn get_local_id(&self) -> Result { + #[inline] pub fn get_local_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LocalId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_calendar_id(&self) -> Result { + }} + #[inline] pub fn get_calendar_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CalendarId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_roaming_id(&self) -> Result { + }} + #[inline] pub fn get_roaming_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RoamingId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_roaming_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_roaming_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RoamingId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_original_start_time(&self) -> Result>> { + }} + #[inline] pub fn get_original_start_time(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OriginalStartTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_response_requested(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_response_requested(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsResponseRequested)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_response_requested(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_response_requested(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsResponseRequested)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_allow_new_time_proposal(&self) -> Result { + }} + #[inline] pub fn get_allow_new_time_proposal(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AllowNewTimeProposal)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_allow_new_time_proposal(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_allow_new_time_proposal(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AllowNewTimeProposal)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_online_meeting_link(&self) -> Result { + }} + #[inline] pub fn get_online_meeting_link(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OnlineMeetingLink)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_online_meeting_link(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_online_meeting_link(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OnlineMeetingLink)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_reply_time(&self) -> Result>> { + }} + #[inline] pub fn get_reply_time(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ReplyTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_reply_time(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_reply_time(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReplyTime)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_user_response(&self) -> Result { + }} + #[inline] pub fn get_user_response(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UserResponse)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_user_response(&self, value: AppointmentParticipantResponse) -> Result<()> { + }} + #[inline] pub fn set_user_response(&self, value: AppointmentParticipantResponse) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_UserResponse)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_invitees(&self) -> Result { + }} + #[inline] pub fn get_has_invitees(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasInvitees)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_canceled_meeting(&self) -> Result { + }} + #[inline] pub fn get_is_canceled_meeting(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCanceledMeeting)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_canceled_meeting(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_canceled_meeting(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsCanceledMeeting)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_organized_by_user(&self) -> Result { + }} + #[inline] pub fn get_is_organized_by_user(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsOrganizedByUser)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_organized_by_user(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_organized_by_user(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsOrganizedByUser)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } 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] { @@ -6013,29 +6013,29 @@ RT_INTERFACE!{interface IAppointment3(IAppointment3Vtbl): IInspectable(IInspecta fn put_DetailsKind(&self, value: AppointmentDetailsKind) -> HRESULT }} impl IAppointment3 { - #[inline] pub unsafe fn get_change_number(&self) -> Result { + #[inline] pub fn get_change_number(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ChangeNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_change_number(&self) -> Result { + }} + #[inline] pub fn get_remote_change_number(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RemoteChangeNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_remote_change_number(&self, value: u64) -> Result<()> { + }} + #[inline] pub fn set_remote_change_number(&self, value: u64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RemoteChangeNumber)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_details_kind(&self) -> Result { + }} + #[inline] pub fn get_details_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DetailsKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_details_kind(&self, value: AppointmentDetailsKind) -> Result<()> { + }} + #[inline] pub fn set_details_kind(&self, value: AppointmentDetailsKind) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DetailsKind)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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, @@ -6055,148 +6055,148 @@ RT_INTERFACE!{interface IAppointmentCalendar(IAppointmentCalendarVtbl): IInspect fn get_SourceDisplayName(&self, out: *mut HSTRING) -> HRESULT, fn get_SummaryCardView(&self, out: *mut AppointmentSummaryCardView) -> HRESULT, fn put_SummaryCardView(&self, value: AppointmentSummaryCardView) -> HRESULT, - fn FindAppointmentsAsync(&self, rangeStart: super::super::foundation::DateTime, rangeLength: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn FindAppointmentsAsyncWithOptions(&self, rangeStart: super::super::foundation::DateTime, rangeLength: super::super::foundation::TimeSpan, options: *mut FindAppointmentsOptions, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn FindExceptionsFromMasterAsync(&self, masterLocalId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn FindAllInstancesAsync(&self, masterLocalId: HSTRING, rangeStart: super::super::foundation::DateTime, rangeLength: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn FindAllInstancesAsyncWithOptions(&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(&self, localId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetAppointmentInstanceAsync(&self, localId: HSTRING, instanceStartTime: super::super::foundation::DateTime, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FindUnexpandedAppointmentsAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn FindUnexpandedAppointmentsAsyncWithOptions(&self, options: *mut FindAppointmentsOptions, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn DeleteAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn SaveAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn DeleteAppointmentAsync(&self, localId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn DeleteAppointmentInstanceAsync(&self, localId: HSTRING, instanceStartTime: super::super::foundation::DateTime, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn SaveAppointmentAsync(&self, pAppointment: *mut Appointment, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn FindAppointmentsAsync(&self, rangeStart: foundation::DateTime, rangeLength: foundation::TimeSpan, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn FindAppointmentsAsyncWithOptions(&self, rangeStart: foundation::DateTime, rangeLength: foundation::TimeSpan, options: *mut FindAppointmentsOptions, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn FindExceptionsFromMasterAsync(&self, masterLocalId: HSTRING, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn FindAllInstancesAsync(&self, masterLocalId: HSTRING, rangeStart: foundation::DateTime, rangeLength: foundation::TimeSpan, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn FindAllInstancesAsyncWithOptions(&self, masterLocalId: HSTRING, rangeStart: foundation::DateTime, rangeLength: foundation::TimeSpan, pOptions: *mut FindAppointmentsOptions, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetAppointmentAsync(&self, localId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetAppointmentInstanceAsync(&self, localId: HSTRING, instanceStartTime: foundation::DateTime, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn FindUnexpandedAppointmentsAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn FindUnexpandedAppointmentsAsyncWithOptions(&self, options: *mut FindAppointmentsOptions, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn DeleteAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn SaveAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn DeleteAppointmentAsync(&self, localId: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn DeleteAppointmentInstanceAsync(&self, localId: HSTRING, instanceStartTime: foundation::DateTime, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn SaveAppointmentAsync(&self, pAppointment: *mut Appointment, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IAppointmentCalendar { - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_display_color(&self) -> Result { + #[cfg(feature="windows-ui")] #[inline] pub fn get_display_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DisplayColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_display_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_local_id(&self) -> Result { + }} + #[inline] pub fn get_local_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LocalId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_hidden(&self) -> Result { + }} + #[inline] pub fn get_is_hidden(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsHidden)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_other_app_read_access(&self) -> Result { + }} + #[inline] pub fn get_other_app_read_access(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OtherAppReadAccess)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_other_app_read_access(&self, value: AppointmentCalendarOtherAppReadAccess) -> Result<()> { + }} + #[inline] pub fn set_other_app_read_access(&self, value: AppointmentCalendarOtherAppReadAccess) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OtherAppReadAccess)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_other_app_write_access(&self) -> Result { + }} + #[inline] pub fn get_other_app_write_access(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OtherAppWriteAccess)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_other_app_write_access(&self, value: AppointmentCalendarOtherAppWriteAccess) -> Result<()> { + }} + #[inline] pub fn set_other_app_write_access(&self, value: AppointmentCalendarOtherAppWriteAccess) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OtherAppWriteAccess)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_source_display_name(&self) -> Result { + }} + #[inline] pub fn get_source_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SourceDisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_summary_card_view(&self) -> Result { + }} + #[inline] pub fn get_summary_card_view(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SummaryCardView)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_summary_card_view(&self, value: AppointmentSummaryCardView) -> Result<()> { + }} + #[inline] pub fn set_summary_card_view(&self, value: AppointmentSummaryCardView) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SummaryCardView)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn find_appointments_async(&self, rangeStart: super::super::foundation::DateTime, rangeLength: super::super::foundation::TimeSpan) -> Result>>> { + }} + #[inline] pub fn find_appointments_async(&self, rangeStart: foundation::DateTime, rangeLength: foundation::TimeSpan) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAppointmentsAsync)(self as *const _ as *mut _, rangeStart, rangeLength, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_appointments_async_with_options(&self, rangeStart: super::super::foundation::DateTime, rangeLength: super::super::foundation::TimeSpan, options: &FindAppointmentsOptions) -> Result>>> { + }} + #[inline] pub fn find_appointments_async_with_options(&self, rangeStart: foundation::DateTime, rangeLength: foundation::TimeSpan, options: &FindAppointmentsOptions) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAppointmentsAsyncWithOptions)(self as *const _ as *mut _, rangeStart, rangeLength, options as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_exceptions_from_master_async(&self, masterLocalId: &HStringArg) -> Result>>> { + }} + #[inline] pub fn find_exceptions_from_master_async(&self, masterLocalId: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindExceptionsFromMasterAsync)(self as *const _ as *mut _, masterLocalId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_all_instances_async(&self, masterLocalId: &HStringArg, rangeStart: super::super::foundation::DateTime, rangeLength: super::super::foundation::TimeSpan) -> Result>>> { + }} + #[inline] pub fn find_all_instances_async(&self, masterLocalId: &HStringArg, rangeStart: foundation::DateTime, rangeLength: foundation::TimeSpan) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllInstancesAsync)(self as *const _ as *mut _, masterLocalId.get(), rangeStart, rangeLength, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_all_instances_async_with_options(&self, masterLocalId: &HStringArg, rangeStart: super::super::foundation::DateTime, rangeLength: super::super::foundation::TimeSpan, pOptions: &FindAppointmentsOptions) -> Result>>> { + }} + #[inline] pub fn find_all_instances_async_with_options(&self, masterLocalId: &HStringArg, rangeStart: foundation::DateTime, rangeLength: foundation::TimeSpan, pOptions: &FindAppointmentsOptions) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllInstancesAsyncWithOptions)(self as *const _ as *mut _, 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 get_appointment_async(&self, localId: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_appointment_async(&self, localId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAppointmentAsync)(self as *const _ as *mut _, localId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_appointment_instance_async(&self, localId: &HStringArg, instanceStartTime: super::super::foundation::DateTime) -> Result>> { + }} + #[inline] pub fn get_appointment_instance_async(&self, localId: &HStringArg, instanceStartTime: foundation::DateTime) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAppointmentInstanceAsync)(self as *const _ as *mut _, localId.get(), instanceStartTime, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_unexpanded_appointments_async(&self) -> Result>>> { + }} + #[inline] pub fn find_unexpanded_appointments_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindUnexpandedAppointmentsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_unexpanded_appointments_async_with_options(&self, options: &FindAppointmentsOptions) -> Result>>> { + }} + #[inline] pub fn find_unexpanded_appointments_async_with_options(&self, options: &FindAppointmentsOptions) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindUnexpandedAppointmentsAsyncWithOptions)(self 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 delete_async(&self) -> Result> { + }} + #[inline] pub fn delete_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn save_async(&self) -> Result> { + }} + #[inline] pub fn save_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete_appointment_async(&self, localId: &HStringArg) -> Result> { + }} + #[inline] pub fn delete_appointment_async(&self, localId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteAppointmentAsync)(self as *const _ as *mut _, localId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete_appointment_instance_async(&self, localId: &HStringArg, instanceStartTime: super::super::foundation::DateTime) -> Result> { + }} + #[inline] pub fn delete_appointment_instance_async(&self, localId: &HStringArg, instanceStartTime: foundation::DateTime) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteAppointmentInstanceAsync)(self as *const _ as *mut _, localId.get(), instanceStartTime, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn save_appointment_async(&self, pAppointment: &Appointment) -> Result> { + }} + #[inline] pub fn save_appointment_async(&self, pAppointment: &Appointment) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveAppointmentAsync)(self as *const _ as *mut _, pAppointment as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class AppointmentCalendar: IAppointmentCalendar} DEFINE_IID!(IID_IAppointmentCalendar2, 417850402, 9319, 19996, 164, 89, 216, 162, 147, 3, 208, 146); @@ -6222,139 +6222,139 @@ RT_INTERFACE!{interface IAppointmentCalendar2(IAppointmentCalendar2Vtbl): IInspe fn put_CanNotifyInvitees(&self, value: bool) -> HRESULT, fn get_MustNofityInvitees(&self, out: *mut bool) -> HRESULT, fn put_MustNofityInvitees(&self, value: bool) -> HRESULT, - fn TryCreateOrUpdateAppointmentAsync(&self, appointment: *mut Appointment, notifyInvitees: bool, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryCancelMeetingAsync(&self, meeting: *mut Appointment, subject: HSTRING, comment: HSTRING, notifyInvitees: bool, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryForwardMeetingAsync(&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(&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(&self, meeting: *mut Appointment, response: AppointmentParticipantResponse, subject: HSTRING, comment: HSTRING, sendUpdate: bool, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn TryCreateOrUpdateAppointmentAsync(&self, appointment: *mut Appointment, notifyInvitees: bool, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryCancelMeetingAsync(&self, meeting: *mut Appointment, subject: HSTRING, comment: HSTRING, notifyInvitees: bool, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryForwardMeetingAsync(&self, meeting: *mut Appointment, invitees: *mut foundation::collections::IIterable, subject: HSTRING, forwardHeader: HSTRING, comment: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryProposeNewTimeForMeetingAsync(&self, meeting: *mut Appointment, newStartTime: foundation::DateTime, newDuration: foundation::TimeSpan, subject: HSTRING, comment: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryUpdateMeetingResponseAsync(&self, meeting: *mut Appointment, response: AppointmentParticipantResponse, subject: HSTRING, comment: HSTRING, sendUpdate: bool, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IAppointmentCalendar2 { - #[inline] pub unsafe fn get_sync_manager(&self) -> Result> { + #[inline] pub fn get_sync_manager(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SyncManager)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_remote_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_remote_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_remote_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RemoteId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn set_display_color(&self, value: super::super::ui::Color) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_display_color(&self, value: super::super::ui::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayColor)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_hidden(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_hidden(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsHidden)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_user_data_account_id(&self) -> Result { + }} + #[inline] pub fn get_user_data_account_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UserDataAccountId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_create_or_update_appointments(&self) -> Result { + }} + #[inline] pub fn get_can_create_or_update_appointments(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanCreateOrUpdateAppointments)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_create_or_update_appointments(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_create_or_update_appointments(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanCreateOrUpdateAppointments)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_cancel_meetings(&self) -> Result { + }} + #[inline] pub fn get_can_cancel_meetings(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanCancelMeetings)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_cancel_meetings(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_cancel_meetings(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanCancelMeetings)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_forward_meetings(&self) -> Result { + }} + #[inline] pub fn get_can_forward_meetings(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanForwardMeetings)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_forward_meetings(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_forward_meetings(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanForwardMeetings)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_propose_new_time_for_meetings(&self) -> Result { + }} + #[inline] pub fn get_can_propose_new_time_for_meetings(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanProposeNewTimeForMeetings)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_propose_new_time_for_meetings(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_propose_new_time_for_meetings(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanProposeNewTimeForMeetings)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_update_meeting_responses(&self) -> Result { + }} + #[inline] pub fn get_can_update_meeting_responses(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanUpdateMeetingResponses)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_update_meeting_responses(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_update_meeting_responses(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanUpdateMeetingResponses)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_notify_invitees(&self) -> Result { + }} + #[inline] pub fn get_can_notify_invitees(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanNotifyInvitees)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_notify_invitees(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_notify_invitees(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanNotifyInvitees)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_must_nofity_invitees(&self) -> Result { + }} + #[inline] pub fn get_must_nofity_invitees(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MustNofityInvitees)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_must_nofity_invitees(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_must_nofity_invitees(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MustNofityInvitees)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn try_create_or_update_appointment_async(&self, appointment: &Appointment, notifyInvitees: bool) -> Result>> { + }} + #[inline] pub fn try_create_or_update_appointment_async(&self, appointment: &Appointment, notifyInvitees: bool) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryCreateOrUpdateAppointmentAsync)(self as *const _ as *mut _, appointment as *const _ as *mut _, notifyInvitees, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_cancel_meeting_async(&self, meeting: &Appointment, subject: &HStringArg, comment: &HStringArg, notifyInvitees: bool) -> Result>> { + }} + #[inline] pub fn try_cancel_meeting_async(&self, meeting: &Appointment, subject: &HStringArg, comment: &HStringArg, notifyInvitees: bool) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryCancelMeetingAsync)(self as *const _ as *mut _, 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(&self, meeting: &Appointment, invitees: &super::super::foundation::collections::IIterable, subject: &HStringArg, forwardHeader: &HStringArg, comment: &HStringArg) -> Result>> { + }} + #[inline] pub fn try_forward_meeting_async(&self, meeting: &Appointment, invitees: &foundation::collections::IIterable, subject: &HStringArg, forwardHeader: &HStringArg, comment: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryForwardMeetingAsync)(self as *const _ as *mut _, 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(&self, meeting: &Appointment, newStartTime: super::super::foundation::DateTime, newDuration: super::super::foundation::TimeSpan, subject: &HStringArg, comment: &HStringArg) -> Result>> { + }} + #[inline] pub fn try_propose_new_time_for_meeting_async(&self, meeting: &Appointment, newStartTime: foundation::DateTime, newDuration: foundation::TimeSpan, subject: &HStringArg, comment: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryProposeNewTimeForMeetingAsync)(self as *const _ as *mut _, 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(&self, meeting: &Appointment, response: AppointmentParticipantResponse, subject: &HStringArg, comment: &HStringArg, sendUpdate: bool) -> Result>> { + }} + #[inline] pub fn try_update_meeting_response_async(&self, meeting: &Appointment, response: AppointmentParticipantResponse, subject: &HStringArg, comment: &HStringArg, sendUpdate: bool) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryUpdateMeetingResponseAsync)(self as *const _ as *mut _, 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_IAppointmentCalendar3, 3944993323, 42629, 17070, 132, 149, 179, 17, 154, 219, 65, 103); RT_INTERFACE!{interface IAppointmentCalendar3(IAppointmentCalendar3Vtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentCalendar3] { - fn RegisterSyncManagerAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn RegisterSyncManagerAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IAppointmentCalendar3 { - #[inline] pub unsafe fn register_sync_manager_async(&self) -> Result> { + #[inline] pub fn register_sync_manager_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RegisterSyncManagerAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum AppointmentCalendarOtherAppReadAccess: i32 { SystemOnly (AppointmentCalendarOtherAppReadAccess_SystemOnly) = 0, Limited (AppointmentCalendarOtherAppReadAccess_Limited) = 1, Full (AppointmentCalendarOtherAppReadAccess_Full) = 2, None (AppointmentCalendarOtherAppReadAccess_None) = 3, @@ -6365,63 +6365,63 @@ RT_ENUM! { enum AppointmentCalendarOtherAppWriteAccess: i32 { 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(&self, out: *mut AppointmentCalendarSyncStatus) -> HRESULT, - fn get_LastSuccessfulSyncTime(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_LastAttemptedSyncTime(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn SyncAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_SyncStatusChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SyncStatusChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn get_LastSuccessfulSyncTime(&self, out: *mut foundation::DateTime) -> HRESULT, + fn get_LastAttemptedSyncTime(&self, out: *mut foundation::DateTime) -> HRESULT, + fn SyncAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_SyncStatusChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SyncStatusChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IAppointmentCalendarSyncManager { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_last_successful_sync_time(&self) -> Result { + }} + #[inline] pub fn get_last_successful_sync_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LastSuccessfulSyncTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_last_attempted_sync_time(&self) -> Result { + }} + #[inline] pub fn get_last_attempted_sync_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LastAttemptedSyncTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn sync_async(&self) -> Result>> { + }} + #[inline] pub fn sync_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SyncAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_sync_status_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_sync_status_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SyncStatusChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_sync_status_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_sync_status_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SyncStatusChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AppointmentCalendarSyncManager: IAppointmentCalendarSyncManager} 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(&self, value: AppointmentCalendarSyncStatus) -> HRESULT, - fn put_LastSuccessfulSyncTime(&self, value: super::super::foundation::DateTime) -> HRESULT, - fn put_LastAttemptedSyncTime(&self, value: super::super::foundation::DateTime) -> HRESULT + fn put_LastSuccessfulSyncTime(&self, value: foundation::DateTime) -> HRESULT, + fn put_LastAttemptedSyncTime(&self, value: foundation::DateTime) -> HRESULT }} impl IAppointmentCalendarSyncManager2 { - #[inline] pub unsafe fn set_status(&self, value: AppointmentCalendarSyncStatus) -> Result<()> { + #[inline] pub fn set_status(&self, value: AppointmentCalendarSyncStatus) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Status)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_last_successful_sync_time(&self, value: super::super::foundation::DateTime) -> Result<()> { + }} + #[inline] pub fn set_last_successful_sync_time(&self, value: foundation::DateTime) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LastSuccessfulSyncTime)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_last_attempted_sync_time(&self, value: super::super::foundation::DateTime) -> Result<()> { + }} + #[inline] pub fn set_last_attempted_sync_time(&self, value: foundation::DateTime) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LastAttemptedSyncTime)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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, @@ -6429,19 +6429,19 @@ RT_ENUM! { enum AppointmentCalendarSyncStatus: i32 { 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(&self, out: *mut AppointmentConflictType) -> HRESULT, - fn get_Date(&self, out: *mut super::super::foundation::DateTime) -> HRESULT + fn get_Date(&self, out: *mut foundation::DateTime) -> HRESULT }} impl IAppointmentConflictResult { - #[inline] pub unsafe fn get_type(&self) -> Result { + #[inline] pub fn get_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Type)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_date(&self) -> Result { + }} + #[inline] pub fn get_date(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Date)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppointmentConflictResult: IAppointmentConflictResult} RT_ENUM! { enum AppointmentConflictType: i32 { @@ -6456,25 +6456,25 @@ RT_ENUM! { enum AppointmentDetailsKind: i32 { 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(&self, out: *mut *mut Appointment) -> HRESULT, - fn get_ExceptionProperties(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_ExceptionProperties(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_IsDeleted(&self, out: *mut bool) -> HRESULT }} impl IAppointmentException { - #[inline] pub unsafe fn get_appointment(&self) -> Result> { + #[inline] pub fn get_appointment(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Appointment)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_exception_properties(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_exception_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExceptionProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_deleted(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_deleted(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDeleted)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppointmentException: IAppointmentException} DEFINE_IID!(IID_IAppointmentInvitee, 331286422, 38978, 18779, 176, 231, 239, 143, 121, 192, 112, 29); @@ -6485,24 +6485,24 @@ RT_INTERFACE!{interface IAppointmentInvitee(IAppointmentInviteeVtbl): IInspectab fn put_Response(&self, value: AppointmentParticipantResponse) -> HRESULT }} impl IAppointmentInvitee { - #[inline] pub unsafe fn get_role(&self) -> Result { + #[inline] pub fn get_role(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Role)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_role(&self, value: AppointmentParticipantRole) -> Result<()> { + }} + #[inline] pub fn set_role(&self, value: AppointmentParticipantRole) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Role)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_response(&self) -> Result { + }} + #[inline] pub fn get_response(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Response)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_response(&self, value: AppointmentParticipantResponse) -> Result<()> { + }} + #[inline] pub fn set_response(&self, value: AppointmentParticipantResponse) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Response)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AppointmentInvitee: IAppointmentInvitee} impl RtActivatable for AppointmentInvitee {} @@ -6512,248 +6512,248 @@ impl RtActivatable for AppointmentManager {} impl RtActivatable for AppointmentManager {} impl RtActivatable for AppointmentManager {} impl AppointmentManager { - #[inline] pub fn show_add_appointment_async(appointment: &Appointment, selection: super::super::foundation::Rect) -> Result>> { unsafe { + #[inline] pub fn show_add_appointment_async(appointment: &Appointment, selection: foundation::Rect) -> Result>> { >::get_activation_factory().show_add_appointment_async(appointment, selection) - }} - #[cfg(feature="windows-ui")] #[inline] pub fn show_add_appointment_with_placement_async(appointment: &Appointment, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result>> { unsafe { + } + #[cfg(feature="windows-ui")] #[inline] pub fn show_add_appointment_with_placement_async(appointment: &Appointment, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result>> { >::get_activation_factory().show_add_appointment_with_placement_async(appointment, selection, preferredPlacement) - }} - #[inline] pub fn show_replace_appointment_async(appointmentId: &HStringArg, appointment: &Appointment, selection: super::super::foundation::Rect) -> Result>> { unsafe { + } + #[inline] pub fn show_replace_appointment_async(appointmentId: &HStringArg, appointment: &Appointment, selection: foundation::Rect) -> Result>> { >::get_activation_factory().show_replace_appointment_async(appointmentId, appointment, selection) - }} - #[cfg(feature="windows-ui")] #[inline] pub fn show_replace_appointment_with_placement_async(appointmentId: &HStringArg, appointment: &Appointment, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result>> { unsafe { + } + #[cfg(feature="windows-ui")] #[inline] pub fn show_replace_appointment_with_placement_async(appointmentId: &HStringArg, appointment: &Appointment, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result>> { >::get_activation_factory().show_replace_appointment_with_placement_async(appointmentId, appointment, selection, preferredPlacement) - }} - #[cfg(feature="windows-ui")] #[inline] pub fn show_replace_appointment_with_placement_and_date_async(appointmentId: &HStringArg, appointment: &Appointment, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: super::super::foundation::DateTime) -> Result>> { unsafe { + } + #[cfg(feature="windows-ui")] #[inline] pub fn show_replace_appointment_with_placement_and_date_async(appointmentId: &HStringArg, appointment: &Appointment, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: foundation::DateTime) -> Result>> { >::get_activation_factory().show_replace_appointment_with_placement_and_date_async(appointmentId, appointment, selection, preferredPlacement, instanceStartDate) - }} - #[inline] pub fn show_remove_appointment_async(appointmentId: &HStringArg, selection: super::super::foundation::Rect) -> Result>> { unsafe { + } + #[inline] pub fn show_remove_appointment_async(appointmentId: &HStringArg, selection: foundation::Rect) -> Result>> { >::get_activation_factory().show_remove_appointment_async(appointmentId, selection) - }} - #[cfg(feature="windows-ui")] #[inline] pub fn show_remove_appointment_with_placement_async(appointmentId: &HStringArg, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result>> { unsafe { + } + #[cfg(feature="windows-ui")] #[inline] pub fn show_remove_appointment_with_placement_async(appointmentId: &HStringArg, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result>> { >::get_activation_factory().show_remove_appointment_with_placement_async(appointmentId, selection, preferredPlacement) - }} - #[cfg(feature="windows-ui")] #[inline] pub fn show_remove_appointment_with_placement_and_date_async(appointmentId: &HStringArg, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: super::super::foundation::DateTime) -> Result>> { unsafe { + } + #[cfg(feature="windows-ui")] #[inline] pub fn show_remove_appointment_with_placement_and_date_async(appointmentId: &HStringArg, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: foundation::DateTime) -> Result>> { >::get_activation_factory().show_remove_appointment_with_placement_and_date_async(appointmentId, selection, preferredPlacement, instanceStartDate) - }} - #[inline] pub fn show_time_frame_async(timeToShow: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan) -> Result> { unsafe { + } + #[inline] pub fn show_time_frame_async(timeToShow: foundation::DateTime, duration: foundation::TimeSpan) -> Result> { >::get_activation_factory().show_time_frame_async(timeToShow, duration) - }} - #[inline] pub fn show_appointment_details_async(appointmentId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn show_appointment_details_async(appointmentId: &HStringArg) -> Result> { >::get_activation_factory().show_appointment_details_async(appointmentId) - }} - #[inline] pub fn show_appointment_details_with_date_async(appointmentId: &HStringArg, instanceStartDate: super::super::foundation::DateTime) -> Result> { unsafe { + } + #[inline] pub fn show_appointment_details_with_date_async(appointmentId: &HStringArg, instanceStartDate: foundation::DateTime) -> Result> { >::get_activation_factory().show_appointment_details_with_date_async(appointmentId, instanceStartDate) - }} - #[inline] pub fn show_edit_new_appointment_async(appointment: &Appointment) -> Result>> { unsafe { + } + #[inline] pub fn show_edit_new_appointment_async(appointment: &Appointment) -> Result>> { >::get_activation_factory().show_edit_new_appointment_async(appointment) - }} - #[inline] pub fn request_store_async(options: AppointmentStoreAccessType) -> Result>> { unsafe { + } + #[inline] pub fn request_store_async(options: AppointmentStoreAccessType) -> Result>> { >::get_activation_factory().request_store_async(options) - }} - #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::super::system::User) -> Result> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::super::system::User) -> Result>> { >::get_activation_factory().get_for_user(user) - }} + } } DEFINE_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]) [CLSID_AppointmentManager]); 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(&self, appointment: *mut Appointment, selection: super::super::foundation::Rect, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ShowAddAppointmentAsync(&self, appointment: *mut Appointment, selection: foundation::Rect, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-ui"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-ui")] fn ShowAddAppointmentWithPlacementAsync(&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(&self, appointmentId: HSTRING, appointment: *mut Appointment, selection: super::super::foundation::Rect, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-ui")] fn ShowAddAppointmentWithPlacementAsync(&self, appointment: *mut Appointment, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ShowReplaceAppointmentAsync(&self, appointmentId: HSTRING, appointment: *mut Appointment, selection: foundation::Rect, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-ui"))] fn __Dummy3(&self) -> (), - #[cfg(feature="windows-ui")] fn ShowReplaceAppointmentWithPlacementAsync(&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(feature="windows-ui")] fn ShowReplaceAppointmentWithPlacementAsync(&self, appointmentId: HSTRING, appointment: *mut Appointment, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-ui"))] fn __Dummy4(&self) -> (), - #[cfg(feature="windows-ui")] fn ShowReplaceAppointmentWithPlacementAndDateAsync(&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(&self, appointmentId: HSTRING, selection: super::super::foundation::Rect, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-ui")] fn ShowReplaceAppointmentWithPlacementAndDateAsync(&self, appointmentId: HSTRING, appointment: *mut Appointment, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: foundation::DateTime, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ShowRemoveAppointmentAsync(&self, appointmentId: HSTRING, selection: foundation::Rect, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-ui"))] fn __Dummy6(&self) -> (), - #[cfg(feature="windows-ui")] fn ShowRemoveAppointmentWithPlacementAsync(&self, appointmentId: HSTRING, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-ui")] fn ShowRemoveAppointmentWithPlacementAsync(&self, appointmentId: HSTRING, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-ui"))] fn __Dummy7(&self) -> (), - #[cfg(feature="windows-ui")] fn ShowRemoveAppointmentWithPlacementAndDateAsync(&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(&self, timeToShow: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn ShowAppointmentDetailsAsync(&self, appointmentId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn ShowAppointmentDetailsWithDateAsync(&self, appointmentId: HSTRING, instanceStartDate: super::super::foundation::DateTime, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn ShowEditNewAppointmentAsync(&self, appointment: *mut Appointment, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestStoreAsync(&self, options: AppointmentStoreAccessType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-ui")] fn ShowRemoveAppointmentWithPlacementAndDateAsync(&self, appointmentId: HSTRING, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: foundation::DateTime, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ShowTimeFrameAsync(&self, timeToShow: foundation::DateTime, duration: foundation::TimeSpan, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ShowAppointmentDetailsAsync(&self, appointmentId: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ShowAppointmentDetailsWithDateAsync(&self, appointmentId: HSTRING, instanceStartDate: foundation::DateTime, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ShowEditNewAppointmentAsync(&self, appointment: *mut Appointment, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestStoreAsync(&self, options: AppointmentStoreAccessType, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(feature="windows-system")] fn get_User(&self, out: *mut *mut super::super::system::User) -> HRESULT }} impl IAppointmentManagerForUser { - #[inline] pub unsafe fn show_add_appointment_async(&self, appointment: &Appointment, selection: super::super::foundation::Rect) -> Result>> { + #[inline] pub fn show_add_appointment_async(&self, appointment: &Appointment, selection: foundation::Rect) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowAddAppointmentAsync)(self as *const _ as *mut _, appointment as *const _ as *mut _, selection, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn show_add_appointment_with_placement_async(&self, appointment: &Appointment, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result>> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn show_add_appointment_with_placement_async(&self, appointment: &Appointment, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowAddAppointmentWithPlacementAsync)(self as *const _ as *mut _, appointment as *const _ as *mut _, selection, preferredPlacement, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn show_replace_appointment_async(&self, appointmentId: &HStringArg, appointment: &Appointment, selection: super::super::foundation::Rect) -> Result>> { + }} + #[inline] pub fn show_replace_appointment_async(&self, appointmentId: &HStringArg, appointment: &Appointment, selection: foundation::Rect) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowReplaceAppointmentAsync)(self as *const _ as *mut _, appointmentId.get(), appointment as *const _ as *mut _, selection, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn show_replace_appointment_with_placement_async(&self, appointmentId: &HStringArg, appointment: &Appointment, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result>> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn show_replace_appointment_with_placement_async(&self, appointmentId: &HStringArg, appointment: &Appointment, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowReplaceAppointmentWithPlacementAsync)(self as *const _ as *mut _, appointmentId.get(), appointment as *const _ as *mut _, selection, preferredPlacement, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn show_replace_appointment_with_placement_and_date_async(&self, appointmentId: &HStringArg, appointment: &Appointment, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: super::super::foundation::DateTime) -> Result>> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn show_replace_appointment_with_placement_and_date_async(&self, appointmentId: &HStringArg, appointment: &Appointment, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: foundation::DateTime) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowReplaceAppointmentWithPlacementAndDateAsync)(self as *const _ as *mut _, 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(&self, appointmentId: &HStringArg, selection: super::super::foundation::Rect) -> Result>> { + }} + #[inline] pub fn show_remove_appointment_async(&self, appointmentId: &HStringArg, selection: foundation::Rect) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowRemoveAppointmentAsync)(self as *const _ as *mut _, 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(&self, appointmentId: &HStringArg, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result>> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn show_remove_appointment_with_placement_async(&self, appointmentId: &HStringArg, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowRemoveAppointmentWithPlacementAsync)(self as *const _ as *mut _, 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(&self, appointmentId: &HStringArg, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: super::super::foundation::DateTime) -> Result>> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn show_remove_appointment_with_placement_and_date_async(&self, appointmentId: &HStringArg, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: foundation::DateTime) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowRemoveAppointmentWithPlacementAndDateAsync)(self as *const _ as *mut _, 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(&self, timeToShow: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan) -> Result> { + }} + #[inline] pub fn show_time_frame_async(&self, timeToShow: foundation::DateTime, duration: foundation::TimeSpan) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowTimeFrameAsync)(self as *const _ as *mut _, timeToShow, duration, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn show_appointment_details_async(&self, appointmentId: &HStringArg) -> Result> { + }} + #[inline] pub fn show_appointment_details_async(&self, appointmentId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowAppointmentDetailsAsync)(self as *const _ as *mut _, 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(&self, appointmentId: &HStringArg, instanceStartDate: super::super::foundation::DateTime) -> Result> { + }} + #[inline] pub fn show_appointment_details_with_date_async(&self, appointmentId: &HStringArg, instanceStartDate: foundation::DateTime) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowAppointmentDetailsWithDateAsync)(self as *const _ as *mut _, 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(&self, appointment: &Appointment) -> Result>> { + }} + #[inline] pub fn show_edit_new_appointment_async(&self, appointment: &Appointment) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowEditNewAppointmentAsync)(self as *const _ as *mut _, 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(&self, options: AppointmentStoreAccessType) -> Result>> { + }} + #[inline] pub fn request_store_async(&self, options: AppointmentStoreAccessType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestStoreAsync)(self as *const _ as *mut _, options, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_user(&self) -> Result> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_User)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppointmentManagerForUser: IAppointmentManagerForUser} 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(&self, appointment: *mut Appointment, selection: super::super::foundation::Rect, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ShowAddAppointmentAsync(&self, appointment: *mut Appointment, selection: foundation::Rect, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-ui"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-ui")] fn ShowAddAppointmentWithPlacementAsync(&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(&self, appointmentId: HSTRING, appointment: *mut Appointment, selection: super::super::foundation::Rect, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-ui")] fn ShowAddAppointmentWithPlacementAsync(&self, appointment: *mut Appointment, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ShowReplaceAppointmentAsync(&self, appointmentId: HSTRING, appointment: *mut Appointment, selection: foundation::Rect, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-ui"))] fn __Dummy3(&self) -> (), - #[cfg(feature="windows-ui")] fn ShowReplaceAppointmentWithPlacementAsync(&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(feature="windows-ui")] fn ShowReplaceAppointmentWithPlacementAsync(&self, appointmentId: HSTRING, appointment: *mut Appointment, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-ui"))] fn __Dummy4(&self) -> (), - #[cfg(feature="windows-ui")] fn ShowReplaceAppointmentWithPlacementAndDateAsync(&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(&self, appointmentId: HSTRING, selection: super::super::foundation::Rect, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-ui")] fn ShowReplaceAppointmentWithPlacementAndDateAsync(&self, appointmentId: HSTRING, appointment: *mut Appointment, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: foundation::DateTime, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ShowRemoveAppointmentAsync(&self, appointmentId: HSTRING, selection: foundation::Rect, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-ui"))] fn __Dummy6(&self) -> (), - #[cfg(feature="windows-ui")] fn ShowRemoveAppointmentWithPlacementAsync(&self, appointmentId: HSTRING, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-ui")] fn ShowRemoveAppointmentWithPlacementAsync(&self, appointmentId: HSTRING, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-ui"))] fn __Dummy7(&self) -> (), - #[cfg(feature="windows-ui")] fn ShowRemoveAppointmentWithPlacementAndDateAsync(&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(&self, timeToShow: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + #[cfg(feature="windows-ui")] fn ShowRemoveAppointmentWithPlacementAndDateAsync(&self, appointmentId: HSTRING, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: foundation::DateTime, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ShowTimeFrameAsync(&self, timeToShow: foundation::DateTime, duration: foundation::TimeSpan, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IAppointmentManagerStatics { - #[inline] pub unsafe fn show_add_appointment_async(&self, appointment: &Appointment, selection: super::super::foundation::Rect) -> Result>> { + #[inline] pub fn show_add_appointment_async(&self, appointment: &Appointment, selection: foundation::Rect) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowAddAppointmentAsync)(self as *const _ as *mut _, appointment as *const _ as *mut _, selection, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn show_add_appointment_with_placement_async(&self, appointment: &Appointment, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result>> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn show_add_appointment_with_placement_async(&self, appointment: &Appointment, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowAddAppointmentWithPlacementAsync)(self as *const _ as *mut _, appointment as *const _ as *mut _, selection, preferredPlacement, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn show_replace_appointment_async(&self, appointmentId: &HStringArg, appointment: &Appointment, selection: super::super::foundation::Rect) -> Result>> { + }} + #[inline] pub fn show_replace_appointment_async(&self, appointmentId: &HStringArg, appointment: &Appointment, selection: foundation::Rect) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowReplaceAppointmentAsync)(self as *const _ as *mut _, appointmentId.get(), appointment as *const _ as *mut _, selection, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn show_replace_appointment_with_placement_async(&self, appointmentId: &HStringArg, appointment: &Appointment, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result>> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn show_replace_appointment_with_placement_async(&self, appointmentId: &HStringArg, appointment: &Appointment, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowReplaceAppointmentWithPlacementAsync)(self as *const _ as *mut _, appointmentId.get(), appointment as *const _ as *mut _, selection, preferredPlacement, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn show_replace_appointment_with_placement_and_date_async(&self, appointmentId: &HStringArg, appointment: &Appointment, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: super::super::foundation::DateTime) -> Result>> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn show_replace_appointment_with_placement_and_date_async(&self, appointmentId: &HStringArg, appointment: &Appointment, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: foundation::DateTime) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowReplaceAppointmentWithPlacementAndDateAsync)(self as *const _ as *mut _, 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(&self, appointmentId: &HStringArg, selection: super::super::foundation::Rect) -> Result>> { + }} + #[inline] pub fn show_remove_appointment_async(&self, appointmentId: &HStringArg, selection: foundation::Rect) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowRemoveAppointmentAsync)(self as *const _ as *mut _, 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(&self, appointmentId: &HStringArg, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result>> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn show_remove_appointment_with_placement_async(&self, appointmentId: &HStringArg, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowRemoveAppointmentWithPlacementAsync)(self as *const _ as *mut _, 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(&self, appointmentId: &HStringArg, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: super::super::foundation::DateTime) -> Result>> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn show_remove_appointment_with_placement_and_date_async(&self, appointmentId: &HStringArg, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: foundation::DateTime) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowRemoveAppointmentWithPlacementAndDateAsync)(self as *const _ as *mut _, 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(&self, timeToShow: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan) -> Result> { + }} + #[inline] pub fn show_time_frame_async(&self, timeToShow: foundation::DateTime, duration: foundation::TimeSpan) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowTimeFrameAsync)(self as *const _ as *mut _, timeToShow, duration, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, appointmentId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn ShowAppointmentDetailsWithDateAsync(&self, appointmentId: HSTRING, instanceStartDate: super::super::foundation::DateTime, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn ShowEditNewAppointmentAsync(&self, appointment: *mut Appointment, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestStoreAsync(&self, options: AppointmentStoreAccessType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn ShowAppointmentDetailsAsync(&self, appointmentId: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ShowAppointmentDetailsWithDateAsync(&self, appointmentId: HSTRING, instanceStartDate: foundation::DateTime, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ShowEditNewAppointmentAsync(&self, appointment: *mut Appointment, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestStoreAsync(&self, options: AppointmentStoreAccessType, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IAppointmentManagerStatics2 { - #[inline] pub unsafe fn show_appointment_details_async(&self, appointmentId: &HStringArg) -> Result> { + #[inline] pub fn show_appointment_details_async(&self, appointmentId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowAppointmentDetailsAsync)(self as *const _ as *mut _, 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(&self, appointmentId: &HStringArg, instanceStartDate: super::super::foundation::DateTime) -> Result> { + }} + #[inline] pub fn show_appointment_details_with_date_async(&self, appointmentId: &HStringArg, instanceStartDate: foundation::DateTime) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowAppointmentDetailsWithDateAsync)(self as *const _ as *mut _, 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(&self, appointment: &Appointment) -> Result>> { + }} + #[inline] pub fn show_edit_new_appointment_async(&self, appointment: &Appointment) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowEditNewAppointmentAsync)(self as *const _ as *mut _, 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(&self, options: AppointmentStoreAccessType) -> Result>> { + }} + #[inline] pub fn request_store_async(&self, options: AppointmentStoreAccessType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestStoreAsync)(self as *const _ as *mut _, options, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, user: *mut super::super::system::User, out: *mut *mut AppointmentManagerForUser) -> HRESULT }} impl IAppointmentManagerStatics3 { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_for_user(&self, user: &super::super::system::User) -> Result> { + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(&self, user: &super::super::system::User) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForUser)(self as *const _ as *mut _, user as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppointmentOrganizer: IAppointmentParticipant} impl RtActivatable for AppointmentOrganizer {} @@ -6766,24 +6766,24 @@ RT_INTERFACE!{interface IAppointmentParticipant(IAppointmentParticipantVtbl): II fn put_Address(&self, value: HSTRING) -> HRESULT }} impl IAppointmentParticipant { - #[inline] pub unsafe fn get_display_name(&self) -> Result { + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_display_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_address(&self) -> Result { + }} + #[inline] pub fn get_address(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Address)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_address(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_address(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Address)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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, @@ -6795,84 +6795,84 @@ RT_CLASS!{static class AppointmentProperties} impl RtActivatable for AppointmentProperties {} impl RtActivatable for AppointmentProperties {} impl AppointmentProperties { - #[inline] pub fn get_subject() -> Result { unsafe { + #[inline] pub fn get_subject() -> Result { >::get_activation_factory().get_subject() - }} - #[inline] pub fn get_location() -> Result { unsafe { + } + #[inline] pub fn get_location() -> Result { >::get_activation_factory().get_location() - }} - #[inline] pub fn get_start_time() -> Result { unsafe { + } + #[inline] pub fn get_start_time() -> Result { >::get_activation_factory().get_start_time() - }} - #[inline] pub fn get_duration() -> Result { unsafe { + } + #[inline] pub fn get_duration() -> Result { >::get_activation_factory().get_duration() - }} - #[inline] pub fn get_reminder() -> Result { unsafe { + } + #[inline] pub fn get_reminder() -> Result { >::get_activation_factory().get_reminder() - }} - #[inline] pub fn get_busy_status() -> Result { unsafe { + } + #[inline] pub fn get_busy_status() -> Result { >::get_activation_factory().get_busy_status() - }} - #[inline] pub fn get_sensitivity() -> Result { unsafe { + } + #[inline] pub fn get_sensitivity() -> Result { >::get_activation_factory().get_sensitivity() - }} - #[inline] pub fn get_original_start_time() -> Result { unsafe { + } + #[inline] pub fn get_original_start_time() -> Result { >::get_activation_factory().get_original_start_time() - }} - #[inline] pub fn get_is_response_requested() -> Result { unsafe { + } + #[inline] pub fn get_is_response_requested() -> Result { >::get_activation_factory().get_is_response_requested() - }} - #[inline] pub fn get_allow_new_time_proposal() -> Result { unsafe { + } + #[inline] pub fn get_allow_new_time_proposal() -> Result { >::get_activation_factory().get_allow_new_time_proposal() - }} - #[inline] pub fn get_all_day() -> Result { unsafe { + } + #[inline] pub fn get_all_day() -> Result { >::get_activation_factory().get_all_day() - }} - #[inline] pub fn get_details() -> Result { unsafe { + } + #[inline] pub fn get_details() -> Result { >::get_activation_factory().get_details() - }} - #[inline] pub fn get_online_meeting_link() -> Result { unsafe { + } + #[inline] pub fn get_online_meeting_link() -> Result { >::get_activation_factory().get_online_meeting_link() - }} - #[inline] pub fn get_reply_time() -> Result { unsafe { + } + #[inline] pub fn get_reply_time() -> Result { >::get_activation_factory().get_reply_time() - }} - #[inline] pub fn get_organizer() -> Result { unsafe { + } + #[inline] pub fn get_organizer() -> Result { >::get_activation_factory().get_organizer() - }} - #[inline] pub fn get_user_response() -> Result { unsafe { + } + #[inline] pub fn get_user_response() -> Result { >::get_activation_factory().get_user_response() - }} - #[inline] pub fn get_has_invitees() -> Result { unsafe { + } + #[inline] pub fn get_has_invitees() -> Result { >::get_activation_factory().get_has_invitees() - }} - #[inline] pub fn get_is_canceled_meeting() -> Result { unsafe { + } + #[inline] pub fn get_is_canceled_meeting() -> Result { >::get_activation_factory().get_is_canceled_meeting() - }} - #[inline] pub fn get_is_organized_by_user() -> Result { unsafe { + } + #[inline] pub fn get_is_organized_by_user() -> Result { >::get_activation_factory().get_is_organized_by_user() - }} - #[inline] pub fn get_recurrence() -> Result { unsafe { + } + #[inline] pub fn get_recurrence() -> Result { >::get_activation_factory().get_recurrence() - }} - #[inline] pub fn get_uri() -> Result { unsafe { + } + #[inline] pub fn get_uri() -> Result { >::get_activation_factory().get_uri() - }} - #[inline] pub fn get_invitees() -> Result { unsafe { + } + #[inline] pub fn get_invitees() -> Result { >::get_activation_factory().get_invitees() - }} - #[inline] pub fn get_default_properties() -> Result>> { unsafe { + } + #[inline] pub fn get_default_properties() -> Result>>> { >::get_activation_factory().get_default_properties() - }} - #[inline] pub fn get_change_number() -> Result { unsafe { + } + #[inline] pub fn get_change_number() -> Result { >::get_activation_factory().get_change_number() - }} - #[inline] pub fn get_remote_change_number() -> Result { unsafe { + } + #[inline] pub fn get_remote_change_number() -> Result { >::get_activation_factory().get_remote_change_number() - }} - #[inline] pub fn get_details_kind() -> Result { unsafe { + } + #[inline] pub fn get_details_kind() -> Result { >::get_activation_factory().get_details_kind() - }} + } } DEFINE_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]) [CLSID_AppointmentProperties]); DEFINE_IID!(IID_IAppointmentPropertiesStatics, 622075881, 26798, 15022, 133, 95, 188, 68, 65, 202, 162, 52); @@ -6899,124 +6899,124 @@ RT_INTERFACE!{static interface IAppointmentPropertiesStatics(IAppointmentPropert fn get_Recurrence(&self, out: *mut HSTRING) -> HRESULT, fn get_Uri(&self, out: *mut HSTRING) -> HRESULT, fn get_Invitees(&self, out: *mut HSTRING) -> HRESULT, - fn get_DefaultProperties(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_DefaultProperties(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IAppointmentPropertiesStatics { - #[inline] pub unsafe fn get_subject(&self) -> Result { + #[inline] pub fn get_subject(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Subject)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_location(&self) -> Result { + }} + #[inline] pub fn get_location(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Location)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_start_time(&self) -> Result { + }} + #[inline] pub fn get_start_time(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StartTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_duration(&self) -> Result { + }} + #[inline] pub fn get_duration(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Duration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_reminder(&self) -> Result { + }} + #[inline] pub fn get_reminder(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Reminder)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_busy_status(&self) -> Result { + }} + #[inline] pub fn get_busy_status(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BusyStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sensitivity(&self) -> Result { + }} + #[inline] pub fn get_sensitivity(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Sensitivity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_original_start_time(&self) -> Result { + }} + #[inline] pub fn get_original_start_time(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OriginalStartTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_response_requested(&self) -> Result { + }} + #[inline] pub fn get_is_response_requested(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsResponseRequested)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_allow_new_time_proposal(&self) -> Result { + }} + #[inline] pub fn get_allow_new_time_proposal(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AllowNewTimeProposal)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_all_day(&self) -> Result { + }} + #[inline] pub fn get_all_day(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AllDay)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_details(&self) -> Result { + }} + #[inline] pub fn get_details(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Details)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_online_meeting_link(&self) -> Result { + }} + #[inline] pub fn get_online_meeting_link(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OnlineMeetingLink)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_reply_time(&self) -> Result { + }} + #[inline] pub fn get_reply_time(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ReplyTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_organizer(&self) -> Result { + }} + #[inline] pub fn get_organizer(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Organizer)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_user_response(&self) -> Result { + }} + #[inline] pub fn get_user_response(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UserResponse)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_invitees(&self) -> Result { + }} + #[inline] pub fn get_has_invitees(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HasInvitees)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_canceled_meeting(&self) -> Result { + }} + #[inline] pub fn get_is_canceled_meeting(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsCanceledMeeting)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_organized_by_user(&self) -> Result { + }} + #[inline] pub fn get_is_organized_by_user(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsOrganizedByUser)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_recurrence(&self) -> Result { + }} + #[inline] pub fn get_recurrence(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Recurrence)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_uri(&self) -> Result { + }} + #[inline] pub fn get_uri(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Uri)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_invitees(&self) -> Result { + }} + #[inline] pub fn get_invitees(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Invitees)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_properties(&self) -> Result>> { + }} + #[inline] pub fn get_default_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DefaultProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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] { @@ -7025,30 +7025,30 @@ RT_INTERFACE!{static interface IAppointmentPropertiesStatics2(IAppointmentProper fn get_DetailsKind(&self, out: *mut HSTRING) -> HRESULT }} impl IAppointmentPropertiesStatics2 { - #[inline] pub unsafe fn get_change_number(&self) -> Result { + #[inline] pub fn get_change_number(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ChangeNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_change_number(&self) -> Result { + }} + #[inline] pub fn get_remote_change_number(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteChangeNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_details_kind(&self) -> Result { + }} + #[inline] pub fn get_details_kind(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DetailsKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut AppointmentRecurrenceUnit) -> HRESULT, fn put_Unit(&self, value: AppointmentRecurrenceUnit) -> HRESULT, - fn get_Occurrences(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_Occurrences(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_Until(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_Until(&self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_Occurrences(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_Occurrences(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_Until(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_Until(&self, value: *mut foundation::IReference) -> HRESULT, fn get_Interval(&self, out: *mut u32) -> HRESULT, fn put_Interval(&self, value: u32) -> HRESULT, fn get_DaysOfWeek(&self, out: *mut AppointmentDaysOfWeek) -> HRESULT, @@ -7061,78 +7061,78 @@ RT_INTERFACE!{interface IAppointmentRecurrence(IAppointmentRecurrenceVtbl): IIns fn put_Day(&self, value: u32) -> HRESULT }} impl IAppointmentRecurrence { - #[inline] pub unsafe fn get_unit(&self) -> Result { + #[inline] pub fn get_unit(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Unit)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_unit(&self, value: AppointmentRecurrenceUnit) -> Result<()> { + }} + #[inline] pub fn set_unit(&self, value: AppointmentRecurrenceUnit) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Unit)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_occurrences(&self) -> Result>> { + }} + #[inline] pub fn get_occurrences(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Occurrences)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_occurrences(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_occurrences(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Occurrences)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_until(&self) -> Result>> { + }} + #[inline] pub fn get_until(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Until)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_until(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_until(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Until)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_interval(&self) -> Result { + }} + #[inline] pub fn get_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Interval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_interval(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_interval(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Interval)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_days_of_week(&self) -> Result { + }} + #[inline] pub fn get_days_of_week(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DaysOfWeek)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_days_of_week(&self, value: AppointmentDaysOfWeek) -> Result<()> { + }} + #[inline] pub fn set_days_of_week(&self, value: AppointmentDaysOfWeek) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DaysOfWeek)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_week_of_month(&self) -> Result { + }} + #[inline] pub fn get_week_of_month(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_WeekOfMonth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_week_of_month(&self, value: AppointmentWeekOfMonth) -> Result<()> { + }} + #[inline] pub fn set_week_of_month(&self, value: AppointmentWeekOfMonth) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_WeekOfMonth)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_month(&self) -> Result { + }} + #[inline] pub fn get_month(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Month)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_month(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_month(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Month)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_day(&self) -> Result { + }} + #[inline] pub fn get_day(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Day)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_day(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_day(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Day)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AppointmentRecurrence: IAppointmentRecurrence} impl RtActivatable for AppointmentRecurrence {} @@ -7144,31 +7144,31 @@ RT_INTERFACE!{interface IAppointmentRecurrence2(IAppointmentRecurrence2Vtbl): II fn put_TimeZone(&self, value: HSTRING) -> HRESULT }} impl IAppointmentRecurrence2 { - #[inline] pub unsafe fn get_recurrence_type(&self) -> Result { + #[inline] pub fn get_recurrence_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RecurrenceType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_time_zone(&self) -> Result { + }} + #[inline] pub fn get_time_zone(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TimeZone)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_time_zone(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_time_zone(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TimeZone)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut HSTRING) -> HRESULT }} impl IAppointmentRecurrence3 { - #[inline] pub unsafe fn get_calendar_identifier(&self) -> Result { + #[inline] pub fn get_calendar_identifier(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CalendarIdentifier)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -7179,169 +7179,169 @@ RT_ENUM! { enum AppointmentSensitivity: i32 { 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(&self, out: *mut *mut AppointmentStoreChangeTracker) -> HRESULT, - fn CreateAppointmentCalendarAsync(&self, name: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetAppointmentCalendarAsync(&self, calendarId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetAppointmentAsync(&self, localId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetAppointmentInstanceAsync(&self, localId: HSTRING, instanceStartTime: super::super::foundation::DateTime, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FindAppointmentCalendarsAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn FindAppointmentCalendarsAsyncWithOptions(&self, options: FindAppointmentCalendarsOptions, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn FindAppointmentsAsync(&self, rangeStart: super::super::foundation::DateTime, rangeLength: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn FindAppointmentsAsyncWithOptions(&self, rangeStart: super::super::foundation::DateTime, rangeLength: super::super::foundation::TimeSpan, options: *mut FindAppointmentsOptions, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn FindConflictAsync(&self, appointment: *mut Appointment, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FindConflictAsyncWithInstanceStart(&self, appointment: *mut Appointment, instanceStartTime: super::super::foundation::DateTime, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn MoveAppointmentAsync(&self, appointment: *mut Appointment, destinationCalendar: *mut AppointmentCalendar, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn ShowAddAppointmentAsync(&self, appointment: *mut Appointment, selection: super::super::foundation::Rect, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn ShowReplaceAppointmentAsync(&self, localId: HSTRING, appointment: *mut Appointment, selection: super::super::foundation::Rect, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateAppointmentCalendarAsync(&self, name: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetAppointmentCalendarAsync(&self, calendarId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetAppointmentAsync(&self, localId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetAppointmentInstanceAsync(&self, localId: HSTRING, instanceStartTime: foundation::DateTime, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn FindAppointmentCalendarsAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn FindAppointmentCalendarsAsyncWithOptions(&self, options: FindAppointmentCalendarsOptions, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn FindAppointmentsAsync(&self, rangeStart: foundation::DateTime, rangeLength: foundation::TimeSpan, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn FindAppointmentsAsyncWithOptions(&self, rangeStart: foundation::DateTime, rangeLength: foundation::TimeSpan, options: *mut FindAppointmentsOptions, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn FindConflictAsync(&self, appointment: *mut Appointment, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn FindConflictAsyncWithInstanceStart(&self, appointment: *mut Appointment, instanceStartTime: foundation::DateTime, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn MoveAppointmentAsync(&self, appointment: *mut Appointment, destinationCalendar: *mut AppointmentCalendar, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ShowAddAppointmentAsync(&self, appointment: *mut Appointment, selection: foundation::Rect, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ShowReplaceAppointmentAsync(&self, localId: HSTRING, appointment: *mut Appointment, selection: foundation::Rect, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-ui"))] fn __Dummy14(&self) -> (), - #[cfg(feature="windows-ui")] fn ShowReplaceAppointmentWithPlacementAndDateAsync(&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(&self, localId: HSTRING, selection: super::super::foundation::Rect, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-ui")] fn ShowReplaceAppointmentWithPlacementAndDateAsync(&self, localId: HSTRING, appointment: *mut Appointment, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: foundation::DateTime, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ShowRemoveAppointmentAsync(&self, localId: HSTRING, selection: foundation::Rect, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-ui"))] fn __Dummy16(&self) -> (), - #[cfg(feature="windows-ui")] fn ShowRemoveAppointmentWithPlacementAndDateAsync(&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(&self, localId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn ShowAppointmentDetailsWithDateAsync(&self, localId: HSTRING, instanceStartDate: super::super::foundation::DateTime, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn ShowEditNewAppointmentAsync(&self, appointment: *mut Appointment, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FindLocalIdsFromRoamingIdAsync(&self, roamingId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + #[cfg(feature="windows-ui")] fn ShowRemoveAppointmentWithPlacementAndDateAsync(&self, localId: HSTRING, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: foundation::DateTime, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ShowAppointmentDetailsAsync(&self, localId: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ShowAppointmentDetailsWithDateAsync(&self, localId: HSTRING, instanceStartDate: foundation::DateTime, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ShowEditNewAppointmentAsync(&self, appointment: *mut Appointment, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn FindLocalIdsFromRoamingIdAsync(&self, roamingId: HSTRING, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IAppointmentStore { - #[inline] pub unsafe fn get_change_tracker(&self) -> Result> { + #[inline] pub fn get_change_tracker(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ChangeTracker)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_appointment_calendar_async(&self, name: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_appointment_calendar_async(&self, name: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAppointmentCalendarAsync)(self as *const _ as *mut _, name.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_appointment_calendar_async(&self, calendarId: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_appointment_calendar_async(&self, calendarId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAppointmentCalendarAsync)(self as *const _ as *mut _, calendarId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_appointment_async(&self, localId: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_appointment_async(&self, localId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAppointmentAsync)(self as *const _ as *mut _, localId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_appointment_instance_async(&self, localId: &HStringArg, instanceStartTime: super::super::foundation::DateTime) -> Result>> { + }} + #[inline] pub fn get_appointment_instance_async(&self, localId: &HStringArg, instanceStartTime: foundation::DateTime) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAppointmentInstanceAsync)(self as *const _ as *mut _, localId.get(), instanceStartTime, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_appointment_calendars_async(&self) -> Result>>> { + }} + #[inline] pub fn find_appointment_calendars_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAppointmentCalendarsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_appointment_calendars_async_with_options(&self, options: FindAppointmentCalendarsOptions) -> Result>>> { + }} + #[inline] pub fn find_appointment_calendars_async_with_options(&self, options: FindAppointmentCalendarsOptions) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAppointmentCalendarsAsyncWithOptions)(self as *const _ as *mut _, options, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_appointments_async(&self, rangeStart: super::super::foundation::DateTime, rangeLength: super::super::foundation::TimeSpan) -> Result>>> { + }} + #[inline] pub fn find_appointments_async(&self, rangeStart: foundation::DateTime, rangeLength: foundation::TimeSpan) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAppointmentsAsync)(self as *const _ as *mut _, rangeStart, rangeLength, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_appointments_async_with_options(&self, rangeStart: super::super::foundation::DateTime, rangeLength: super::super::foundation::TimeSpan, options: &FindAppointmentsOptions) -> Result>>> { + }} + #[inline] pub fn find_appointments_async_with_options(&self, rangeStart: foundation::DateTime, rangeLength: foundation::TimeSpan, options: &FindAppointmentsOptions) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAppointmentsAsyncWithOptions)(self as *const _ as *mut _, rangeStart, rangeLength, options as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_conflict_async(&self, appointment: &Appointment) -> Result>> { + }} + #[inline] pub fn find_conflict_async(&self, appointment: &Appointment) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindConflictAsync)(self as *const _ as *mut _, appointment as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_conflict_async_with_instance_start(&self, appointment: &Appointment, instanceStartTime: super::super::foundation::DateTime) -> Result>> { + }} + #[inline] pub fn find_conflict_async_with_instance_start(&self, appointment: &Appointment, instanceStartTime: foundation::DateTime) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindConflictAsyncWithInstanceStart)(self as *const _ as *mut _, appointment as *const _ as *mut _, instanceStartTime, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn move_appointment_async(&self, appointment: &Appointment, destinationCalendar: &AppointmentCalendar) -> Result> { + }} + #[inline] pub fn move_appointment_async(&self, appointment: &Appointment, destinationCalendar: &AppointmentCalendar) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MoveAppointmentAsync)(self as *const _ as *mut _, appointment as *const _ as *mut _, destinationCalendar as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn show_add_appointment_async(&self, appointment: &Appointment, selection: super::super::foundation::Rect) -> Result>> { + }} + #[inline] pub fn show_add_appointment_async(&self, appointment: &Appointment, selection: foundation::Rect) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowAddAppointmentAsync)(self as *const _ as *mut _, appointment as *const _ as *mut _, selection, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn show_replace_appointment_async(&self, localId: &HStringArg, appointment: &Appointment, selection: super::super::foundation::Rect) -> Result>> { + }} + #[inline] pub fn show_replace_appointment_async(&self, localId: &HStringArg, appointment: &Appointment, selection: foundation::Rect) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowReplaceAppointmentAsync)(self as *const _ as *mut _, localId.get(), appointment as *const _ as *mut _, selection, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn show_replace_appointment_with_placement_and_date_async(&self, localId: &HStringArg, appointment: &Appointment, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: super::super::foundation::DateTime) -> Result>> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn show_replace_appointment_with_placement_and_date_async(&self, localId: &HStringArg, appointment: &Appointment, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: foundation::DateTime) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowReplaceAppointmentWithPlacementAndDateAsync)(self as *const _ as *mut _, 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 show_remove_appointment_async(&self, localId: &HStringArg, selection: super::super::foundation::Rect) -> Result>> { + }} + #[inline] pub fn show_remove_appointment_async(&self, localId: &HStringArg, selection: foundation::Rect) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowRemoveAppointmentAsync)(self as *const _ as *mut _, localId.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_and_date_async(&self, localId: &HStringArg, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: super::super::foundation::DateTime) -> Result>> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn show_remove_appointment_with_placement_and_date_async(&self, localId: &HStringArg, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, instanceStartDate: foundation::DateTime) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowRemoveAppointmentWithPlacementAndDateAsync)(self as *const _ as *mut _, localId.get(), selection, preferredPlacement, instanceStartDate, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn show_appointment_details_async(&self, localId: &HStringArg) -> Result> { + }} + #[inline] pub fn show_appointment_details_async(&self, localId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowAppointmentDetailsAsync)(self as *const _ as *mut _, localId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn show_appointment_details_with_date_async(&self, localId: &HStringArg, instanceStartDate: super::super::foundation::DateTime) -> Result> { + }} + #[inline] pub fn show_appointment_details_with_date_async(&self, localId: &HStringArg, instanceStartDate: foundation::DateTime) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowAppointmentDetailsWithDateAsync)(self as *const _ as *mut _, localId.get(), instanceStartDate, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn show_edit_new_appointment_async(&self, appointment: &Appointment) -> Result>> { + }} + #[inline] pub fn show_edit_new_appointment_async(&self, appointment: &Appointment) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowEditNewAppointmentAsync)(self as *const _ as *mut _, appointment as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_local_ids_from_roaming_id_async(&self, roamingId: &HStringArg) -> Result>>> { + }} + #[inline] pub fn find_local_ids_from_roaming_id_async(&self, roamingId: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindLocalIdsFromRoamingIdAsync)(self as *const _ as *mut _, roamingId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class AppointmentStore: IAppointmentStore} 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(&self, pHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StoreChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn CreateAppointmentCalendarInAccountAsync(&self, name: HSTRING, userDataAccountId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn add_StoreChanged(&self, pHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StoreChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn CreateAppointmentCalendarInAccountAsync(&self, name: HSTRING, userDataAccountId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IAppointmentStore2 { - #[inline] pub unsafe fn add_store_changed(&self, pHandler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_store_changed(&self, pHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StoreChanged)(self as *const _ as *mut _, pHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_store_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_store_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StoreChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn create_appointment_calendar_in_account_async(&self, name: &HStringArg, userDataAccountId: &HStringArg) -> Result>> { + }} + #[inline] pub fn create_appointment_calendar_in_account_async(&self, name: &HStringArg, userDataAccountId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAppointmentCalendarInAccountAsync)(self as *const _ as *mut _, name.get(), userDataAccountId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IAppointmentStore3, 1112642571, 45176, 18186, 154, 64, 194, 224, 23, 97, 247, 47); RT_INTERFACE!{interface IAppointmentStore3(IAppointmentStore3Vtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentStore3] { fn GetChangeTracker(&self, identity: HSTRING, out: *mut *mut AppointmentStoreChangeTracker) -> HRESULT }} impl IAppointmentStore3 { - #[inline] pub unsafe fn get_change_tracker(&self, identity: &HStringArg) -> Result> { + #[inline] pub fn get_change_tracker(&self, identity: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetChangeTracker)(self as *const _ as *mut _, identity.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum AppointmentStoreAccessType: i32 { AppCalendarsReadWrite (AppointmentStoreAccessType_AppCalendarsReadWrite) = 0, AllCalendarsReadOnly (AppointmentStoreAccessType_AllCalendarsReadOnly) = 1, AllCalendarsReadWrite (AppointmentStoreAccessType_AllCalendarsReadWrite) = 2, @@ -7352,16 +7352,16 @@ RT_INTERFACE!{interface IAppointmentStoreChange(IAppointmentStoreChangeVtbl): II fn get_ChangeType(&self, out: *mut AppointmentStoreChangeType) -> HRESULT }} impl IAppointmentStoreChange { - #[inline] pub unsafe fn get_appointment(&self) -> Result> { + #[inline] pub fn get_appointment(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Appointment)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_change_type(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_change_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ChangeType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppointmentStoreChange: IAppointmentStoreChange} DEFINE_IID!(IID_IAppointmentStoreChange2, 3011317198, 21009, 17410, 166, 8, 169, 111, 231, 11, 142, 226); @@ -7369,21 +7369,21 @@ RT_INTERFACE!{interface IAppointmentStoreChange2(IAppointmentStoreChange2Vtbl): fn get_AppointmentCalendar(&self, out: *mut *mut AppointmentCalendar) -> HRESULT }} impl IAppointmentStoreChange2 { - #[inline] pub unsafe fn get_appointment_calendar(&self) -> Result> { + #[inline] pub fn get_appointment_calendar(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppointmentCalendar)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self) -> HRESULT }} impl IAppointmentStoreChangedDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AppointmentStoreChangedDeferral: IAppointmentStoreChangedDeferral} DEFINE_IID!(IID_IAppointmentStoreChangedEventArgs, 579205305, 1937, 16766, 191, 234, 204, 109, 65, 99, 108, 140); @@ -7391,33 +7391,33 @@ RT_INTERFACE!{interface IAppointmentStoreChangedEventArgs(IAppointmentStoreChang fn GetDeferral(&self, out: *mut *mut AppointmentStoreChangedDeferral) -> HRESULT }} impl IAppointmentStoreChangedEventArgs { - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppointmentStoreChangedEventArgs: IAppointmentStoreChangedEventArgs} 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn ReadBatchAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, fn AcceptChanges(&self) -> HRESULT, fn AcceptChangesThrough(&self, lastChangeToAccept: *mut AppointmentStoreChange) -> HRESULT }} impl IAppointmentStoreChangeReader { - #[inline] pub unsafe fn read_batch_async(&self) -> Result>>> { + #[inline] pub fn read_batch_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadBatchAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn accept_changes(&self) -> Result<()> { + }} + #[inline] pub fn accept_changes(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AcceptChanges)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn accept_changes_through(&self, lastChangeToAccept: &AppointmentStoreChange) -> Result<()> { + }} + #[inline] pub fn accept_changes_through(&self, lastChangeToAccept: &AppointmentStoreChange) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AcceptChangesThrough)(self as *const _ as *mut _, lastChangeToAccept as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AppointmentStoreChangeReader: IAppointmentStoreChangeReader} DEFINE_IID!(IID_IAppointmentStoreChangeTracker, 455472305, 36558, 20247, 147, 200, 230, 65, 36, 88, 253, 92); @@ -7427,19 +7427,19 @@ RT_INTERFACE!{interface IAppointmentStoreChangeTracker(IAppointmentStoreChangeTr fn Reset(&self) -> HRESULT }} impl IAppointmentStoreChangeTracker { - #[inline] pub unsafe fn get_change_reader(&self) -> Result> { + #[inline] pub fn get_change_reader(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetChangeReader)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn enable(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn enable(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Enable)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn reset(&self) -> Result<()> { + }} + #[inline] pub fn reset(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Reset)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AppointmentStoreChangeTracker: IAppointmentStoreChangeTracker} DEFINE_IID!(IID_IAppointmentStoreChangeTracker2, 3060444997, 38210, 19703, 133, 80, 235, 55, 14, 12, 8, 211); @@ -7447,11 +7447,11 @@ RT_INTERFACE!{interface IAppointmentStoreChangeTracker2(IAppointmentStoreChangeT fn get_IsTracking(&self, out: *mut bool) -> HRESULT }} impl IAppointmentStoreChangeTracker2 { - #[inline] pub unsafe fn get_is_tracking(&self) -> Result { + #[inline] pub fn get_is_tracking(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsTracking)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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, @@ -7472,42 +7472,42 @@ RT_ENUM! { enum FindAppointmentCalendarsOptions: u32 { }} 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_FetchProperties(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_CalendarIds(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_FetchProperties(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_IncludeHidden(&self, out: *mut bool) -> HRESULT, fn put_IncludeHidden(&self, value: bool) -> HRESULT, fn get_MaxCount(&self, out: *mut u32) -> HRESULT, fn put_MaxCount(&self, value: u32) -> HRESULT }} impl IFindAppointmentsOptions { - #[inline] pub unsafe fn get_calendar_ids(&self) -> Result>> { + #[inline] pub fn get_calendar_ids(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CalendarIds)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_fetch_properties(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_fetch_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FetchProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_include_hidden(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_include_hidden(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IncludeHidden)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_include_hidden(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_include_hidden(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IncludeHidden)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_count(&self) -> Result { + }} + #[inline] pub fn get_max_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_count(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_max_count(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxCount)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class FindAppointmentsOptions: IFindAppointmentsOptions} impl RtActivatable for FindAppointmentsOptions {} @@ -7527,53 +7527,53 @@ RT_INTERFACE!{interface IAddAppointmentOperation(IAddAppointmentOperationVtbl): fn DismissUI(&self) -> HRESULT }} impl IAddAppointmentOperation { - #[inline] pub unsafe fn get_appointment_information(&self) -> Result> { + #[inline] pub fn get_appointment_information(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppointmentInformation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_source_package_family_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_source_package_family_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SourcePackageFamilyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed(&self, itemId: &HStringArg) -> Result<()> { + }} + #[inline] pub fn report_completed(&self, itemId: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportCompleted)(self as *const _ as *mut _, itemId.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn report_canceled(&self) -> Result<()> { + }} + #[inline] pub fn report_canceled(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportCanceled)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn report_error(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn report_error(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportError)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn dismiss_ui(&self) -> Result<()> { + }} + #[inline] pub fn dismiss_ui(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).DismissUI)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AddAppointmentOperation: IAddAppointmentOperation} RT_CLASS!{static class AppointmentsProviderLaunchActionVerbs} impl RtActivatable for AppointmentsProviderLaunchActionVerbs {} impl RtActivatable for AppointmentsProviderLaunchActionVerbs {} impl AppointmentsProviderLaunchActionVerbs { - #[inline] pub fn get_add_appointment() -> Result { unsafe { + #[inline] pub fn get_add_appointment() -> Result { >::get_activation_factory().get_add_appointment() - }} - #[inline] pub fn get_replace_appointment() -> Result { unsafe { + } + #[inline] pub fn get_replace_appointment() -> Result { >::get_activation_factory().get_replace_appointment() - }} - #[inline] pub fn get_remove_appointment() -> Result { unsafe { + } + #[inline] pub fn get_remove_appointment() -> Result { >::get_activation_factory().get_remove_appointment() - }} - #[inline] pub fn get_show_time_frame() -> Result { unsafe { + } + #[inline] pub fn get_show_time_frame() -> Result { >::get_activation_factory().get_show_time_frame() - }} - #[inline] pub fn get_show_appointment_details() -> Result { unsafe { + } + #[inline] pub fn get_show_appointment_details() -> Result { >::get_activation_factory().get_show_appointment_details() - }} + } } DEFINE_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]) [CLSID_AppointmentsProviderLaunchActionVerbs]); DEFINE_IID!(IID_IAppointmentsProviderLaunchActionVerbsStatics, 920369704, 40494, 18886, 142, 247, 58, 183, 165, 220, 200, 184); @@ -7584,42 +7584,42 @@ RT_INTERFACE!{static interface IAppointmentsProviderLaunchActionVerbsStatics(IAp fn get_ShowTimeFrame(&self, out: *mut HSTRING) -> HRESULT }} impl IAppointmentsProviderLaunchActionVerbsStatics { - #[inline] pub unsafe fn get_add_appointment(&self) -> Result { + #[inline] pub fn get_add_appointment(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AddAppointment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_replace_appointment(&self) -> Result { + }} + #[inline] pub fn get_replace_appointment(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ReplaceAppointment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_remove_appointment(&self) -> Result { + }} + #[inline] pub fn get_remove_appointment(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoveAppointment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_show_time_frame(&self) -> Result { + }} + #[inline] pub fn get_show_time_frame(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ShowTimeFrame)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut HSTRING) -> HRESULT }} impl IAppointmentsProviderLaunchActionVerbsStatics2 { - #[inline] pub unsafe fn get_show_appointment_details(&self) -> Result { + #[inline] pub fn get_show_appointment_details(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ShowAppointmentDetails)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } 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(&self, out: *mut HSTRING) -> HRESULT, - fn get_InstanceStartDate(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::DateTime>) -> HRESULT, + fn get_InstanceStartDate(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn get_SourcePackageFamilyName(&self, out: *mut HSTRING) -> HRESULT, fn ReportCompleted(&self) -> HRESULT, fn ReportCanceled(&self) -> HRESULT, @@ -7627,44 +7627,44 @@ RT_INTERFACE!{interface IRemoveAppointmentOperation(IRemoveAppointmentOperationV fn DismissUI(&self) -> HRESULT }} impl IRemoveAppointmentOperation { - #[inline] pub unsafe fn get_appointment_id(&self) -> Result { + #[inline] pub fn get_appointment_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppointmentId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_instance_start_date(&self) -> Result>> { + }} + #[inline] pub fn get_instance_start_date(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InstanceStartDate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_source_package_family_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_source_package_family_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SourcePackageFamilyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed(&self) -> Result<()> { + }} + #[inline] pub fn report_completed(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportCompleted)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn report_canceled(&self) -> Result<()> { + }} + #[inline] pub fn report_canceled(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportCanceled)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn report_error(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn report_error(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportError)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn dismiss_ui(&self) -> Result<()> { + }} + #[inline] pub fn dismiss_ui(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).DismissUI)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class RemoveAppointmentOperation: IRemoveAppointmentOperation} 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(&self, out: *mut HSTRING) -> HRESULT, fn get_AppointmentInformation(&self, out: *mut *mut super::Appointment) -> HRESULT, - fn get_InstanceStartDate(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::DateTime>) -> HRESULT, + fn get_InstanceStartDate(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn get_SourcePackageFamilyName(&self, out: *mut HSTRING) -> HRESULT, fn ReportCompleted(&self, itemId: HSTRING) -> HRESULT, fn ReportCanceled(&self) -> HRESULT, @@ -7672,42 +7672,42 @@ RT_INTERFACE!{interface IReplaceAppointmentOperation(IReplaceAppointmentOperatio fn DismissUI(&self) -> HRESULT }} impl IReplaceAppointmentOperation { - #[inline] pub unsafe fn get_appointment_id(&self) -> Result { + #[inline] pub fn get_appointment_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppointmentId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_appointment_information(&self) -> Result> { + }} + #[inline] pub fn get_appointment_information(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppointmentInformation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_instance_start_date(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_instance_start_date(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InstanceStartDate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_source_package_family_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_source_package_family_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SourcePackageFamilyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed(&self, itemId: &HStringArg) -> Result<()> { + }} + #[inline] pub fn report_completed(&self, itemId: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportCompleted)(self as *const _ as *mut _, itemId.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn report_canceled(&self) -> Result<()> { + }} + #[inline] pub fn report_canceled(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportCanceled)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn report_error(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn report_error(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportError)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn dismiss_ui(&self) -> Result<()> { + }} + #[inline] pub fn dismiss_ui(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).DismissUI)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ReplaceAppointmentOperation: IReplaceAppointmentOperation} } // Windows.ApplicationModel.Appointments.AppointmentsProvider @@ -7717,72 +7717,72 @@ DEFINE_IID!(IID_IAppointmentCalendarCancelMeetingRequest, 1229328269, 25652, 165 RT_INTERFACE!{interface IAppointmentCalendarCancelMeetingRequest(IAppointmentCalendarCancelMeetingRequestVtbl): IInspectable(IInspectableVtbl) [IID_IAppointmentCalendarCancelMeetingRequest] { fn get_AppointmentCalendarLocalId(&self, out: *mut HSTRING) -> HRESULT, fn get_AppointmentLocalId(&self, out: *mut HSTRING) -> HRESULT, - fn get_AppointmentOriginalStartTime(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::DateTime>) -> HRESULT, + fn get_AppointmentOriginalStartTime(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn get_Subject(&self, out: *mut HSTRING) -> HRESULT, fn get_Comment(&self, out: *mut HSTRING) -> HRESULT, fn get_NotifyInvitees(&self, out: *mut bool) -> HRESULT, - fn ReportCompletedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportFailedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn ReportCompletedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IAppointmentCalendarCancelMeetingRequest { - #[inline] pub unsafe fn get_appointment_calendar_local_id(&self) -> Result { + #[inline] pub fn get_appointment_calendar_local_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppointmentCalendarLocalId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_appointment_local_id(&self) -> Result { + }} + #[inline] pub fn get_appointment_local_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppointmentLocalId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_appointment_original_start_time(&self) -> Result>> { + }} + #[inline] pub fn get_appointment_original_start_time(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppointmentOriginalStartTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_subject(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_subject(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Subject)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_comment(&self) -> Result { + }} + #[inline] pub fn get_comment(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Comment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_notify_invitees(&self) -> Result { + }} + #[inline] pub fn get_notify_invitees(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NotifyInvitees)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed_async(&self) -> Result> { + }} + #[inline] pub fn report_completed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportCompletedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_failed_async(&self) -> Result> { + }} + #[inline] pub fn report_failed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportFailedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class AppointmentCalendarCancelMeetingRequest: IAppointmentCalendarCancelMeetingRequest} 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(&self, out: *mut *mut AppointmentCalendarCancelMeetingRequest) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IAppointmentCalendarCancelMeetingRequestEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppointmentCalendarCancelMeetingRequestEventArgs: IAppointmentCalendarCancelMeetingRequestEventArgs} DEFINE_IID!(IID_IAppointmentCalendarCreateOrUpdateAppointmentRequest, 778236594, 51862, 18604, 145, 36, 64, 107, 25, 254, 250, 112); @@ -7790,412 +7790,412 @@ RT_INTERFACE!{interface IAppointmentCalendarCreateOrUpdateAppointmentRequest(IAp fn get_AppointmentCalendarLocalId(&self, out: *mut HSTRING) -> HRESULT, fn get_Appointment(&self, out: *mut *mut super::Appointment) -> HRESULT, fn get_NotifyInvitees(&self, out: *mut bool) -> HRESULT, - fn get_ChangedProperties(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn ReportCompletedAsync(&self, createdOrUpdatedAppointment: *mut super::Appointment, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportFailedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn get_ChangedProperties(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn ReportCompletedAsync(&self, createdOrUpdatedAppointment: *mut super::Appointment, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IAppointmentCalendarCreateOrUpdateAppointmentRequest { - #[inline] pub unsafe fn get_appointment_calendar_local_id(&self) -> Result { + #[inline] pub fn get_appointment_calendar_local_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppointmentCalendarLocalId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_appointment(&self) -> Result> { + }} + #[inline] pub fn get_appointment(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Appointment)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_notify_invitees(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_notify_invitees(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NotifyInvitees)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_changed_properties(&self) -> Result>> { + }} + #[inline] pub fn get_changed_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ChangedProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed_async(&self, createdOrUpdatedAppointment: &super::Appointment) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn report_completed_async(&self, createdOrUpdatedAppointment: &super::Appointment) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportCompletedAsync)(self as *const _ as *mut _, createdOrUpdatedAppointment as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_failed_async(&self) -> Result> { + }} + #[inline] pub fn report_failed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportFailedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class AppointmentCalendarCreateOrUpdateAppointmentRequest: IAppointmentCalendarCreateOrUpdateAppointmentRequest} 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(&self, out: *mut *mut AppointmentCalendarCreateOrUpdateAppointmentRequest) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IAppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs: IAppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs} 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(&self, out: *mut HSTRING) -> HRESULT, fn get_AppointmentLocalId(&self, out: *mut HSTRING) -> HRESULT, - fn get_AppointmentOriginalStartTime(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::DateTime>) -> HRESULT, - fn get_Invitees(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_AppointmentOriginalStartTime(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_Invitees(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_Subject(&self, out: *mut HSTRING) -> HRESULT, fn get_ForwardHeader(&self, out: *mut HSTRING) -> HRESULT, fn get_Comment(&self, out: *mut HSTRING) -> HRESULT, - fn ReportCompletedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportFailedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn ReportCompletedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IAppointmentCalendarForwardMeetingRequest { - #[inline] pub unsafe fn get_appointment_calendar_local_id(&self) -> Result { + #[inline] pub fn get_appointment_calendar_local_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppointmentCalendarLocalId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_appointment_local_id(&self) -> Result { + }} + #[inline] pub fn get_appointment_local_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppointmentLocalId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_appointment_original_start_time(&self) -> Result>> { + }} + #[inline] pub fn get_appointment_original_start_time(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppointmentOriginalStartTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_invitees(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_invitees(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Invitees)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_subject(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_subject(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Subject)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_forward_header(&self) -> Result { + }} + #[inline] pub fn get_forward_header(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ForwardHeader)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_comment(&self) -> Result { + }} + #[inline] pub fn get_comment(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Comment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed_async(&self) -> Result> { + }} + #[inline] pub fn report_completed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportCompletedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_failed_async(&self) -> Result> { + }} + #[inline] pub fn report_failed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportFailedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class AppointmentCalendarForwardMeetingRequest: IAppointmentCalendarForwardMeetingRequest} 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(&self, out: *mut *mut AppointmentCalendarForwardMeetingRequest) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IAppointmentCalendarForwardMeetingRequestEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppointmentCalendarForwardMeetingRequestEventArgs: IAppointmentCalendarForwardMeetingRequestEventArgs} 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(&self, out: *mut HSTRING) -> HRESULT, fn get_AppointmentLocalId(&self, out: *mut HSTRING) -> HRESULT, - fn get_AppointmentOriginalStartTime(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::DateTime>) -> HRESULT, - fn get_NewStartTime(&self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, - fn get_NewDuration(&self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_AppointmentOriginalStartTime(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_NewStartTime(&self, out: *mut foundation::DateTime) -> HRESULT, + fn get_NewDuration(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn get_Subject(&self, out: *mut HSTRING) -> HRESULT, fn get_Comment(&self, out: *mut HSTRING) -> HRESULT, - fn ReportCompletedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportFailedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn ReportCompletedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IAppointmentCalendarProposeNewTimeForMeetingRequest { - #[inline] pub unsafe fn get_appointment_calendar_local_id(&self) -> Result { + #[inline] pub fn get_appointment_calendar_local_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppointmentCalendarLocalId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_appointment_local_id(&self) -> Result { + }} + #[inline] pub fn get_appointment_local_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppointmentLocalId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_appointment_original_start_time(&self) -> Result>> { + }} + #[inline] pub fn get_appointment_original_start_time(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppointmentOriginalStartTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_new_start_time(&self) -> Result<::rt::gen::windows::foundation::DateTime> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_new_start_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NewStartTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_new_duration(&self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + }} + #[inline] pub fn get_new_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NewDuration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_subject(&self) -> Result { + }} + #[inline] pub fn get_subject(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Subject)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_comment(&self) -> Result { + }} + #[inline] pub fn get_comment(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Comment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed_async(&self) -> Result> { + }} + #[inline] pub fn report_completed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportCompletedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_failed_async(&self) -> Result> { + }} + #[inline] pub fn report_failed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportFailedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class AppointmentCalendarProposeNewTimeForMeetingRequest: IAppointmentCalendarProposeNewTimeForMeetingRequest} 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(&self, out: *mut *mut AppointmentCalendarProposeNewTimeForMeetingRequest) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IAppointmentCalendarProposeNewTimeForMeetingRequestEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppointmentCalendarProposeNewTimeForMeetingRequestEventArgs: IAppointmentCalendarProposeNewTimeForMeetingRequestEventArgs} 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(&self, out: *mut HSTRING) -> HRESULT, - fn ReportCompletedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportFailedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn ReportCompletedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IAppointmentCalendarSyncManagerSyncRequest { - #[inline] pub unsafe fn get_appointment_calendar_local_id(&self) -> Result { + #[inline] pub fn get_appointment_calendar_local_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppointmentCalendarLocalId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed_async(&self) -> Result> { + }} + #[inline] pub fn report_completed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportCompletedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_failed_async(&self) -> Result> { + }} + #[inline] pub fn report_failed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportFailedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class AppointmentCalendarSyncManagerSyncRequest: IAppointmentCalendarSyncManagerSyncRequest} 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(&self, out: *mut *mut AppointmentCalendarSyncManagerSyncRequest) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IAppointmentCalendarSyncManagerSyncRequestEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppointmentCalendarSyncManagerSyncRequestEventArgs: IAppointmentCalendarSyncManagerSyncRequestEventArgs} 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(&self, out: *mut HSTRING) -> HRESULT, fn get_AppointmentLocalId(&self, out: *mut HSTRING) -> HRESULT, - fn get_AppointmentOriginalStartTime(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::DateTime>) -> HRESULT, + fn get_AppointmentOriginalStartTime(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn get_Response(&self, out: *mut super::AppointmentParticipantResponse) -> HRESULT, fn get_Subject(&self, out: *mut HSTRING) -> HRESULT, fn get_Comment(&self, out: *mut HSTRING) -> HRESULT, fn get_SendUpdate(&self, out: *mut bool) -> HRESULT, - fn ReportCompletedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportFailedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn ReportCompletedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IAppointmentCalendarUpdateMeetingResponseRequest { - #[inline] pub unsafe fn get_appointment_calendar_local_id(&self) -> Result { + #[inline] pub fn get_appointment_calendar_local_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppointmentCalendarLocalId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_appointment_local_id(&self) -> Result { + }} + #[inline] pub fn get_appointment_local_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppointmentLocalId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_appointment_original_start_time(&self) -> Result>> { + }} + #[inline] pub fn get_appointment_original_start_time(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppointmentOriginalStartTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_response(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_response(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Response)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_subject(&self) -> Result { + }} + #[inline] pub fn get_subject(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Subject)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_comment(&self) -> Result { + }} + #[inline] pub fn get_comment(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Comment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_send_update(&self) -> Result { + }} + #[inline] pub fn get_send_update(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SendUpdate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed_async(&self) -> Result> { + }} + #[inline] pub fn report_completed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportCompletedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_failed_async(&self) -> Result> { + }} + #[inline] pub fn report_failed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportFailedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class AppointmentCalendarUpdateMeetingResponseRequest: IAppointmentCalendarUpdateMeetingResponseRequest} 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(&self, out: *mut *mut AppointmentCalendarUpdateMeetingResponseRequest) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IAppointmentCalendarUpdateMeetingResponseRequestEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppointmentCalendarUpdateMeetingResponseRequestEventArgs: IAppointmentCalendarUpdateMeetingResponseRequestEventArgs} 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(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SyncRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_CreateOrUpdateAppointmentRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CreateOrUpdateAppointmentRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_CancelMeetingRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CancelMeetingRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_ForwardMeetingRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ForwardMeetingRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_ProposeNewTimeForMeetingRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ProposeNewTimeForMeetingRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_UpdateMeetingResponseRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_UpdateMeetingResponseRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_SyncRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SyncRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_CreateOrUpdateAppointmentRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CreateOrUpdateAppointmentRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_CancelMeetingRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CancelMeetingRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ForwardMeetingRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ForwardMeetingRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ProposeNewTimeForMeetingRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ProposeNewTimeForMeetingRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_UpdateMeetingResponseRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_UpdateMeetingResponseRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn Start(&self) -> HRESULT }} impl IAppointmentDataProviderConnection { - #[inline] pub unsafe fn add_sync_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub fn add_sync_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SyncRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_sync_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_sync_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SyncRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_create_or_update_appointment_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_create_or_update_appointment_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CreateOrUpdateAppointmentRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_create_or_update_appointment_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_create_or_update_appointment_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CreateOrUpdateAppointmentRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_cancel_meeting_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_cancel_meeting_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CancelMeetingRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_cancel_meeting_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_cancel_meeting_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CancelMeetingRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_forward_meeting_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_forward_meeting_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ForwardMeetingRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_forward_meeting_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_forward_meeting_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ForwardMeetingRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_propose_new_time_for_meeting_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_propose_new_time_for_meeting_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ProposeNewTimeForMeetingRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_propose_new_time_for_meeting_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_propose_new_time_for_meeting_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ProposeNewTimeForMeetingRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_update_meeting_response_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_update_meeting_response_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_UpdateMeetingResponseRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_update_meeting_response_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_update_meeting_response_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_UpdateMeetingResponseRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AppointmentDataProviderConnection: IAppointmentDataProviderConnection} DEFINE_IID!(IID_IAppointmentDataProviderTriggerDetails, 3005758465, 32274, 20062, 177, 239, 116, 251, 104, 172, 111, 42); @@ -8203,11 +8203,11 @@ RT_INTERFACE!{interface IAppointmentDataProviderTriggerDetails(IAppointmentDataP fn get_Connection(&self, out: *mut *mut AppointmentDataProviderConnection) -> HRESULT }} impl IAppointmentDataProviderTriggerDetails { - #[inline] pub unsafe fn get_connection(&self) -> Result> { + #[inline] pub fn get_connection(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Connection)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppointmentDataProviderTriggerDetails: IAppointmentDataProviderTriggerDetails} } // Windows.ApplicationModel.Appointments.DataProvider @@ -8221,32 +8221,32 @@ RT_INTERFACE!{interface IActivatedEventArgs(IActivatedEventArgsVtbl): IInspectab fn get_SplashScreen(&self, out: *mut *mut SplashScreen) -> HRESULT }} impl IActivatedEventArgs { - #[inline] pub unsafe fn get_kind(&self) -> Result { + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_previous_execution_state(&self) -> Result { + }} + #[inline] pub fn get_previous_execution_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PreviousExecutionState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_splash_screen(&self) -> Result> { + }} + #[inline] pub fn get_splash_screen(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SplashScreen)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut *mut super::super::system::User) -> HRESULT }} impl IActivatedEventArgsWithUser { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_user(&self) -> Result> { + #[cfg(feature="windows-system")] #[inline] pub fn get_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_User)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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, LockScreenComponent (ActivationKind_LockScreenComponent) = 1016, ContactPanel (ActivationKind_ContactPanel) = 1017, PrintWorkflowForegroundTask (ActivationKind_PrintWorkflowForegroundTask) = 1018, GameUIProvider (ActivationKind_GameUIProvider) = 1019, StartupTask (ActivationKind_StartupTask) = 1020, CommandLineLaunch (ActivationKind_CommandLineLaunch) = 1021, @@ -8259,33 +8259,33 @@ RT_INTERFACE!{interface IApplicationViewActivatedEventArgs(IApplicationViewActiv fn get_CurrentlyShownApplicationViewId(&self, out: *mut i32) -> HRESULT }} impl IApplicationViewActivatedEventArgs { - #[inline] pub unsafe fn get_currently_shown_application_view_id(&self) -> Result { + #[inline] pub fn get_currently_shown_application_view_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CurrentlyShownApplicationViewId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, out: *mut HSTRING) -> HRESULT }} impl IAppointmentsProviderActivatedEventArgs { - #[inline] pub unsafe fn get_verb(&self) -> Result { + #[inline] pub fn get_verb(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Verb)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::appointments::appointmentsprovider::AddAppointmentOperation) -> HRESULT }} impl IAppointmentsProviderAddAppointmentActivatedEventArgs { - #[inline] pub unsafe fn get_add_appointment_operation(&self) -> Result> { + #[inline] pub fn get_add_appointment_operation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AddAppointmentOperation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppointmentsProviderAddAppointmentActivatedEventArgs: IAppointmentsProviderAddAppointmentActivatedEventArgs} DEFINE_IID!(IID_IAppointmentsProviderRemoveAppointmentActivatedEventArgs, 1964980920, 2958, 17692, 159, 21, 150, 110, 105, 155, 172, 37); @@ -8293,11 +8293,11 @@ RT_INTERFACE!{interface IAppointmentsProviderRemoveAppointmentActivatedEventArgs fn get_RemoveAppointmentOperation(&self, out: *mut *mut super::appointments::appointmentsprovider::RemoveAppointmentOperation) -> HRESULT }} impl IAppointmentsProviderRemoveAppointmentActivatedEventArgs { - #[inline] pub unsafe fn get_remove_appointment_operation(&self) -> Result> { + #[inline] pub fn get_remove_appointment_operation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoveAppointmentOperation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppointmentsProviderRemoveAppointmentActivatedEventArgs: IAppointmentsProviderRemoveAppointmentActivatedEventArgs} DEFINE_IID!(IID_IAppointmentsProviderReplaceAppointmentActivatedEventArgs, 357677012, 43393, 16487, 138, 98, 5, 36, 228, 173, 225, 33); @@ -8305,53 +8305,53 @@ RT_INTERFACE!{interface IAppointmentsProviderReplaceAppointmentActivatedEventArg fn get_ReplaceAppointmentOperation(&self, out: *mut *mut super::appointments::appointmentsprovider::ReplaceAppointmentOperation) -> HRESULT }} impl IAppointmentsProviderReplaceAppointmentActivatedEventArgs { - #[inline] pub unsafe fn get_replace_appointment_operation(&self) -> Result> { + #[inline] pub fn get_replace_appointment_operation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ReplaceAppointmentOperation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppointmentsProviderReplaceAppointmentActivatedEventArgs: IAppointmentsProviderReplaceAppointmentActivatedEventArgs} 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(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_InstanceStartDate(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn get_LocalId(&self, out: *mut HSTRING) -> HRESULT, fn get_RoamingId(&self, out: *mut HSTRING) -> HRESULT }} impl IAppointmentsProviderShowAppointmentDetailsActivatedEventArgs { - #[inline] pub unsafe fn get_instance_start_date(&self) -> Result>> { + #[inline] pub fn get_instance_start_date(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InstanceStartDate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_local_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_local_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LocalId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_roaming_id(&self) -> Result { + }} + #[inline] pub fn get_roaming_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RoamingId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class AppointmentsProviderShowAppointmentDetailsActivatedEventArgs: IAppointmentsProviderShowAppointmentDetailsActivatedEventArgs} 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(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_Duration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + fn get_TimeToShow(&self, out: *mut foundation::DateTime) -> HRESULT, + fn get_Duration(&self, out: *mut foundation::TimeSpan) -> HRESULT }} impl IAppointmentsProviderShowTimeFrameActivatedEventArgs { - #[inline] pub unsafe fn get_time_to_show(&self) -> Result { + #[inline] pub fn get_time_to_show(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TimeToShow)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_duration(&self) -> Result { + }} + #[inline] pub fn get_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Duration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppointmentsProviderShowTimeFrameActivatedEventArgs: IAppointmentsProviderShowTimeFrameActivatedEventArgs} DEFINE_IID!(IID_IBackgroundActivatedEventArgs, 2870263520, 59232, 17422, 169, 28, 68, 121, 109, 227, 169, 45); @@ -8359,11 +8359,11 @@ RT_INTERFACE!{interface IBackgroundActivatedEventArgs(IBackgroundActivatedEventA fn get_TaskInstance(&self, out: *mut *mut super::background::IBackgroundTaskInstance) -> HRESULT }} impl IBackgroundActivatedEventArgs { - #[inline] pub unsafe fn get_task_instance(&self) -> Result> { + #[inline] pub fn get_task_instance(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TaskInstance)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class BackgroundActivatedEventArgs: IBackgroundActivatedEventArgs} DEFINE_IID!(IID_ICachedFileUpdaterActivatedEventArgs, 3496915399, 14341, 20171, 183, 87, 108, 241, 94, 38, 254, 243); @@ -8371,11 +8371,11 @@ RT_INTERFACE!{interface ICachedFileUpdaterActivatedEventArgs(ICachedFileUpdaterA #[cfg(feature="windows-storage")] fn get_CachedFileUpdaterUI(&self, out: *mut *mut super::super::storage::provider::CachedFileUpdaterUI) -> HRESULT }} impl ICachedFileUpdaterActivatedEventArgs { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_cached_file_updater_ui(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_cached_file_updater_ui(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CachedFileUpdaterUI)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CachedFileUpdaterActivatedEventArgs: ICachedFileUpdaterActivatedEventArgs} DEFINE_IID!(IID_ICameraSettingsActivatedEventArgs, 4217873672, 11693, 18698, 145, 112, 220, 160, 54, 235, 17, 75); @@ -8384,16 +8384,16 @@ RT_INTERFACE!{interface ICameraSettingsActivatedEventArgs(ICameraSettingsActivat fn get_VideoDeviceExtension(&self, out: *mut *mut IInspectable) -> HRESULT }} impl ICameraSettingsActivatedEventArgs { - #[inline] pub unsafe fn get_video_device_controller(&self) -> Result> { + #[inline] pub fn get_video_device_controller(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoDeviceController)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_device_extension(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_video_device_extension(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoDeviceExtension)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CameraSettingsActivatedEventArgs: ICameraSettingsActivatedEventArgs} DEFINE_IID!(IID_ICommandLineActivatedEventArgs, 1158039340, 106, 18667, 138, 251, 208, 122, 178, 94, 51, 102); @@ -8401,11 +8401,11 @@ RT_INTERFACE!{interface ICommandLineActivatedEventArgs(ICommandLineActivatedEven fn get_Operation(&self, out: *mut *mut CommandLineActivationOperation) -> HRESULT }} impl ICommandLineActivatedEventArgs { - #[inline] pub unsafe fn get_operation(&self) -> Result> { + #[inline] pub fn get_operation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Operation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CommandLineActivatedEventArgs: ICommandLineActivatedEventArgs} DEFINE_IID!(IID_ICommandLineActivationOperation, 2571839553, 50590, 20329, 188, 253, 182, 30, 212, 230, 34, 235); @@ -8414,33 +8414,33 @@ RT_INTERFACE!{interface ICommandLineActivationOperation(ICommandLineActivationOp fn get_CurrentDirectoryPath(&self, out: *mut HSTRING) -> HRESULT, fn put_ExitCode(&self, value: i32) -> HRESULT, fn get_ExitCode(&self, out: *mut i32) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl ICommandLineActivationOperation { - #[inline] pub unsafe fn get_arguments(&self) -> Result { + #[inline] pub fn get_arguments(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Arguments)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_directory_path(&self) -> Result { + }} + #[inline] pub fn get_current_directory_path(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CurrentDirectoryPath)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_exit_code(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_exit_code(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ExitCode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_exit_code(&self) -> Result { + }} + #[inline] pub fn get_exit_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExitCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CommandLineActivationOperation: ICommandLineActivationOperation} DEFINE_IID!(IID_IContactActivatedEventArgs, 3592921540, 49189, 19521, 157, 239, 241, 234, 250, 208, 117, 231); @@ -8448,11 +8448,11 @@ RT_INTERFACE!{interface IContactActivatedEventArgs(IContactActivatedEventArgsVtb fn get_Verb(&self, out: *mut HSTRING) -> HRESULT }} impl IContactActivatedEventArgs { - #[inline] pub unsafe fn get_verb(&self) -> Result { + #[inline] pub fn get_verb(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Verb)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IContactCallActivatedEventArgs, 3269399751, 12523, 16838, 179, 188, 91, 22, 148, 249, 218, 179); RT_INTERFACE!{interface IContactCallActivatedEventArgs(IContactCallActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IContactCallActivatedEventArgs] { @@ -8461,21 +8461,21 @@ RT_INTERFACE!{interface IContactCallActivatedEventArgs(IContactCallActivatedEven fn get_Contact(&self, out: *mut *mut super::contacts::Contact) -> HRESULT }} impl IContactCallActivatedEventArgs { - #[inline] pub unsafe fn get_service_id(&self) -> Result { + #[inline] pub fn get_service_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServiceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_user_id(&self) -> Result { + }} + #[inline] pub fn get_service_user_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServiceUserId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_contact(&self) -> Result> { + }} + #[inline] pub fn get_contact(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Contact)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ContactCallActivatedEventArgs: IContactCallActivatedEventArgs} DEFINE_IID!(IID_IContactMapActivatedEventArgs, 3006003312, 61159, 19154, 170, 241, 168, 126, 255, 207, 0, 164); @@ -8484,16 +8484,16 @@ RT_INTERFACE!{interface IContactMapActivatedEventArgs(IContactMapActivatedEventA fn get_Contact(&self, out: *mut *mut super::contacts::Contact) -> HRESULT }} impl IContactMapActivatedEventArgs { - #[inline] pub unsafe fn get_address(&self) -> Result> { + #[inline] pub fn get_address(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Address)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_contact(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_contact(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Contact)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ContactMapActivatedEventArgs: IContactMapActivatedEventArgs} DEFINE_IID!(IID_IContactMessageActivatedEventArgs, 3730410930, 3587, 17328, 191, 86, 188, 196, 11, 49, 98, 223); @@ -8503,21 +8503,21 @@ RT_INTERFACE!{interface IContactMessageActivatedEventArgs(IContactMessageActivat fn get_Contact(&self, out: *mut *mut super::contacts::Contact) -> HRESULT }} impl IContactMessageActivatedEventArgs { - #[inline] pub unsafe fn get_service_id(&self) -> Result { + #[inline] pub fn get_service_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServiceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_user_id(&self) -> Result { + }} + #[inline] pub fn get_service_user_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServiceUserId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_contact(&self) -> Result> { + }} + #[inline] pub fn get_contact(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Contact)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ContactMessageActivatedEventArgs: IContactMessageActivatedEventArgs} DEFINE_IID!(IID_IContactPanelActivatedEventArgs, 1388012516, 54228, 19299, 128, 81, 74, 242, 8, 44, 171, 128); @@ -8526,16 +8526,16 @@ RT_INTERFACE!{interface IContactPanelActivatedEventArgs(IContactPanelActivatedEv fn get_Contact(&self, out: *mut *mut super::contacts::Contact) -> HRESULT }} impl IContactPanelActivatedEventArgs { - #[inline] pub unsafe fn get_contact_panel(&self) -> Result> { + #[inline] pub fn get_contact_panel(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContactPanel)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_contact(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_contact(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Contact)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ContactPanelActivatedEventArgs: IContactPanelActivatedEventArgs} DEFINE_IID!(IID_IContactPickerActivatedEventArgs, 3461851879, 25673, 17831, 151, 31, 209, 19, 190, 122, 137, 54); @@ -8543,11 +8543,11 @@ RT_INTERFACE!{interface IContactPickerActivatedEventArgs(IContactPickerActivated fn get_ContactPickerUI(&self, out: *mut *mut super::contacts::provider::ContactPickerUI) -> HRESULT }} impl IContactPickerActivatedEventArgs { - #[inline] pub unsafe fn get_contact_picker_ui(&self) -> Result> { + #[inline] pub fn get_contact_picker_ui(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContactPickerUI)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ContactPickerActivatedEventArgs: IContactPickerActivatedEventArgs} DEFINE_IID!(IID_IContactPostActivatedEventArgs, 3009035367, 61927, 18005, 173, 110, 72, 87, 88, 143, 85, 47); @@ -8557,21 +8557,21 @@ RT_INTERFACE!{interface IContactPostActivatedEventArgs(IContactPostActivatedEven fn get_Contact(&self, out: *mut *mut super::contacts::Contact) -> HRESULT }} impl IContactPostActivatedEventArgs { - #[inline] pub unsafe fn get_service_id(&self) -> Result { + #[inline] pub fn get_service_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServiceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_user_id(&self) -> Result { + }} + #[inline] pub fn get_service_user_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServiceUserId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_contact(&self) -> Result> { + }} + #[inline] pub fn get_contact(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Contact)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ContactPostActivatedEventArgs: IContactPostActivatedEventArgs} DEFINE_IID!(IID_IContactsProviderActivatedEventArgs, 1166073000, 22352, 18710, 170, 82, 192, 130, 149, 33, 235, 148); @@ -8579,11 +8579,11 @@ RT_INTERFACE!{interface IContactsProviderActivatedEventArgs(IContactsProviderAct fn get_Verb(&self, out: *mut HSTRING) -> HRESULT }} impl IContactsProviderActivatedEventArgs { - #[inline] pub unsafe fn get_verb(&self) -> Result { + #[inline] pub fn get_verb(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Verb)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(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] { @@ -8592,33 +8592,33 @@ RT_INTERFACE!{interface IContactVideoCallActivatedEventArgs(IContactVideoCallAct fn get_Contact(&self, out: *mut *mut super::contacts::Contact) -> HRESULT }} impl IContactVideoCallActivatedEventArgs { - #[inline] pub unsafe fn get_service_id(&self) -> Result { + #[inline] pub fn get_service_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServiceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_user_id(&self) -> Result { + }} + #[inline] pub fn get_service_user_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServiceUserId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_contact(&self) -> Result> { + }} + #[inline] pub fn get_contact(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Contact)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ContactVideoCallActivatedEventArgs: IContactVideoCallActivatedEventArgs} 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(&self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT + fn get_ContinuationData(&self, out: *mut *mut foundation::collections::ValueSet) -> HRESULT }} impl IContinuationActivatedEventArgs { - #[inline] pub unsafe fn get_continuation_data(&self) -> Result> { + #[inline] pub fn get_continuation_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContinuationData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IDeviceActivatedEventArgs, 3444619689, 52752, 17618, 130, 52, 195, 85, 160, 115, 239, 51); RT_INTERFACE!{interface IDeviceActivatedEventArgs(IDeviceActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceActivatedEventArgs] { @@ -8626,16 +8626,16 @@ RT_INTERFACE!{interface IDeviceActivatedEventArgs(IDeviceActivatedEventArgsVtbl) fn get_Verb(&self, out: *mut HSTRING) -> HRESULT }} impl IDeviceActivatedEventArgs { - #[inline] pub unsafe fn get_device_information_id(&self) -> Result { + #[inline] pub fn get_device_information_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceInformationId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_verb(&self) -> Result { + }} + #[inline] pub fn get_verb(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Verb)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class DeviceActivatedEventArgs: IDeviceActivatedEventArgs} DEFINE_IID!(IID_IDevicePairingActivatedEventArgs, 3953185252, 60614, 16712, 148, 237, 244, 179, 126, 192, 91, 62); @@ -8643,11 +8643,11 @@ RT_INTERFACE!{interface IDevicePairingActivatedEventArgs(IDevicePairingActivated #[cfg(feature="windows-devices")] fn get_DeviceInformation(&self, out: *mut *mut super::super::devices::enumeration::DeviceInformation) -> HRESULT }} impl IDevicePairingActivatedEventArgs { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_device_information(&self) -> Result> { + #[cfg(feature="windows-devices")] #[inline] pub fn get_device_information(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceInformation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DevicePairingActivatedEventArgs: IDevicePairingActivatedEventArgs} DEFINE_IID!(IID_IDialReceiverActivatedEventArgs, 4218912471, 34286, 17774, 164, 77, 133, 215, 48, 231, 10, 237); @@ -8655,30 +8655,30 @@ RT_INTERFACE!{interface IDialReceiverActivatedEventArgs(IDialReceiverActivatedEv fn get_AppName(&self, out: *mut HSTRING) -> HRESULT }} impl IDialReceiverActivatedEventArgs { - #[inline] pub unsafe fn get_app_name(&self) -> Result { + #[inline] pub fn get_app_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class DialReceiverActivatedEventArgs: IDialReceiverActivatedEventArgs} 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(&self) -> (), - #[cfg(feature="windows-storage")] fn get_Files(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + #[cfg(feature="windows-storage")] fn get_Files(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_Verb(&self, out: *mut HSTRING) -> HRESULT }} impl IFileActivatedEventArgs { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_files(&self) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_files(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Files)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_verb(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_verb(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Verb)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class FileActivatedEventArgs: IFileActivatedEventArgs} DEFINE_IID!(IID_IFileActivatedEventArgsWithCallerPackageFamilyName, 761327723, 53855, 19749, 134, 83, 225, 197, 225, 16, 131, 9); @@ -8686,33 +8686,33 @@ RT_INTERFACE!{interface IFileActivatedEventArgsWithCallerPackageFamilyName(IFile fn get_CallerPackageFamilyName(&self, out: *mut HSTRING) -> HRESULT }} impl IFileActivatedEventArgsWithCallerPackageFamilyName { - #[inline] pub unsafe fn get_caller_package_family_name(&self) -> Result { + #[inline] pub fn get_caller_package_family_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CallerPackageFamilyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } 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(&self, out: *mut *mut super::super::storage::search::StorageFileQueryResult) -> HRESULT }} impl IFileActivatedEventArgsWithNeighboringFiles { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_neighboring_files_query(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_neighboring_files_query(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NeighboringFilesQuery)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut *mut super::super::storage::pickers::provider::FileOpenPickerUI) -> HRESULT }} impl IFileOpenPickerActivatedEventArgs { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_file_open_picker_ui(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_file_open_picker_ui(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FileOpenPickerUI)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class FileOpenPickerActivatedEventArgs: IFileOpenPickerActivatedEventArgs} DEFINE_IID!(IID_IFileOpenPickerActivatedEventArgs2, 1584602982, 36127, 17915, 175, 29, 115, 32, 92, 143, 199, 161); @@ -8720,22 +8720,22 @@ RT_INTERFACE!{interface IFileOpenPickerActivatedEventArgs2(IFileOpenPickerActiva fn get_CallerPackageFamilyName(&self, out: *mut HSTRING) -> HRESULT }} impl IFileOpenPickerActivatedEventArgs2 { - #[inline] pub unsafe fn get_caller_package_family_name(&self) -> Result { + #[inline] pub fn get_caller_package_family_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CallerPackageFamilyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + #[cfg(feature="windows-storage")] fn get_Files(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IFileOpenPickerContinuationEventArgs { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_files(&self) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_files(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Files)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class FileOpenPickerContinuationEventArgs: IFileOpenPickerContinuationEventArgs} DEFINE_IID!(IID_IFileSavePickerActivatedEventArgs, 2176949489, 29926, 17287, 130, 235, 187, 143, 214, 75, 67, 70); @@ -8743,11 +8743,11 @@ RT_INTERFACE!{interface IFileSavePickerActivatedEventArgs(IFileSavePickerActivat #[cfg(feature="windows-storage")] fn get_FileSavePickerUI(&self, out: *mut *mut super::super::storage::pickers::provider::FileSavePickerUI) -> HRESULT }} impl IFileSavePickerActivatedEventArgs { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_file_save_picker_ui(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_file_save_picker_ui(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FileSavePickerUI)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class FileSavePickerActivatedEventArgs: IFileSavePickerActivatedEventArgs} DEFINE_IID!(IID_IFileSavePickerActivatedEventArgs2, 1802763795, 11506, 19784, 140, 188, 175, 103, 210, 63, 28, 231); @@ -8756,27 +8756,27 @@ RT_INTERFACE!{interface IFileSavePickerActivatedEventArgs2(IFileSavePickerActiva fn get_EnterpriseId(&self, out: *mut HSTRING) -> HRESULT }} impl IFileSavePickerActivatedEventArgs2 { - #[inline] pub unsafe fn get_caller_package_family_name(&self) -> Result { + #[inline] pub fn get_caller_package_family_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CallerPackageFamilyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_enterprise_id(&self) -> Result { + }} + #[inline] pub fn get_enterprise_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EnterpriseId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::super::storage::StorageFile) -> HRESULT }} impl IFileSavePickerContinuationEventArgs { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_file(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_file(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_File)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class FileSavePickerContinuationEventArgs: IFileSavePickerContinuationEventArgs} DEFINE_IID!(IID_IFolderPickerContinuationEventArgs, 1367876454, 40779, 18831, 190, 176, 66, 104, 79, 110, 28, 41); @@ -8784,11 +8784,11 @@ RT_INTERFACE!{interface IFolderPickerContinuationEventArgs(IFolderPickerContinua #[cfg(feature="windows-storage")] fn get_Folder(&self, out: *mut *mut super::super::storage::StorageFolder) -> HRESULT }} impl IFolderPickerContinuationEventArgs { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_folder(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_folder(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Folder)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class FolderPickerContinuationEventArgs: IFolderPickerContinuationEventArgs} DEFINE_IID!(IID_ILaunchActivatedEventArgs, 4224269862, 41290, 19279, 130, 176, 51, 190, 217, 32, 175, 82); @@ -8797,16 +8797,16 @@ RT_INTERFACE!{interface ILaunchActivatedEventArgs(ILaunchActivatedEventArgsVtbl) fn get_TileId(&self, out: *mut HSTRING) -> HRESULT }} impl ILaunchActivatedEventArgs { - #[inline] pub unsafe fn get_arguments(&self) -> Result { + #[inline] pub fn get_arguments(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Arguments)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_tile_id(&self) -> Result { + }} + #[inline] pub fn get_tile_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TileId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class LaunchActivatedEventArgs: ILaunchActivatedEventArgs} DEFINE_IID!(IID_ILaunchActivatedEventArgs2, 265518780, 40393, 18101, 154, 206, 189, 149, 212, 86, 83, 69); @@ -8814,22 +8814,22 @@ RT_INTERFACE!{interface ILaunchActivatedEventArgs2(ILaunchActivatedEventArgs2Vtb fn get_TileActivatedInfo(&self, out: *mut *mut TileActivatedInfo) -> HRESULT }} impl ILaunchActivatedEventArgs2 { - #[inline] pub unsafe fn get_tile_activated_info(&self) -> Result> { + #[inline] pub fn get_tile_activated_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TileActivatedInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut *mut IInspectable) -> HRESULT }} impl ILockScreenActivatedEventArgs { - #[inline] pub unsafe fn get_info(&self) -> Result> { + #[inline] pub fn get_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Info)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class LockScreenActivatedEventArgs: ILockScreenActivatedEventArgs} DEFINE_IID!(IID_ILockScreenCallActivatedEventArgs, 116621246, 46578, 17547, 177, 62, 227, 40, 172, 28, 81, 106); @@ -8837,11 +8837,11 @@ RT_INTERFACE!{interface ILockScreenCallActivatedEventArgs(ILockScreenCallActivat fn get_CallUI(&self, out: *mut *mut super::calls::LockScreenCallUI) -> HRESULT }} impl ILockScreenCallActivatedEventArgs { - #[inline] pub unsafe fn get_call_ui(&self) -> Result> { + #[inline] pub fn get_call_ui(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CallUI)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class LockScreenCallActivatedEventArgs: ILockScreenCallActivatedEventArgs} RT_CLASS!{class LockScreenComponentActivatedEventArgs: IActivatedEventArgs} @@ -8850,11 +8850,11 @@ RT_INTERFACE!{interface IPickerReturnedActivatedEventArgs(IPickerReturnedActivat fn get_PickerOperationId(&self, out: *mut HSTRING) -> HRESULT }} impl IPickerReturnedActivatedEventArgs { - #[inline] pub unsafe fn get_picker_operation_id(&self) -> Result { + #[inline] pub fn get_picker_operation_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PickerOperationId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PickerReturnedActivatedEventArgs: IPickerReturnedActivatedEventArgs} DEFINE_IID!(IID_IPrelaunchActivatedEventArgs, 205812091, 6647, 18646, 176, 70, 207, 34, 130, 110, 170, 116); @@ -8862,22 +8862,22 @@ RT_INTERFACE!{interface IPrelaunchActivatedEventArgs(IPrelaunchActivatedEventArg fn get_PrelaunchActivated(&self, out: *mut bool) -> HRESULT }} impl IPrelaunchActivatedEventArgs { - #[inline] pub unsafe fn get_prelaunch_activated(&self) -> Result { + #[inline] pub fn get_prelaunch_activated(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PrelaunchActivated)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::super::devices::printers::extensions::Print3DWorkflow) -> HRESULT }} impl IPrint3DWorkflowActivatedEventArgs { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_workflow(&self) -> Result> { + #[cfg(feature="windows-devices")] #[inline] pub fn get_workflow(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Workflow)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class Print3DWorkflowActivatedEventArgs: IPrint3DWorkflowActivatedEventArgs} DEFINE_IID!(IID_IPrintTaskSettingsActivatedEventArgs, 3996164297, 52822, 18533, 186, 142, 137, 84, 172, 39, 17, 7); @@ -8885,52 +8885,52 @@ RT_INTERFACE!{interface IPrintTaskSettingsActivatedEventArgs(IPrintTaskSettingsA #[cfg(feature="windows-devices")] fn get_Configuration(&self, out: *mut *mut super::super::devices::printers::extensions::PrintTaskConfiguration) -> HRESULT }} impl IPrintTaskSettingsActivatedEventArgs { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_configuration(&self) -> Result> { + #[cfg(feature="windows-devices")] #[inline] pub fn get_configuration(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Configuration)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PrintTaskSettingsActivatedEventArgs: IPrintTaskSettingsActivatedEventArgs} 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(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT + fn get_Uri(&self, out: *mut *mut foundation::Uri) -> HRESULT }} impl IProtocolActivatedEventArgs { - #[inline] pub unsafe fn get_uri(&self) -> Result> { + #[inline] pub fn get_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Uri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ProtocolActivatedEventArgs: IProtocolActivatedEventArgs} 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(&self, out: *mut HSTRING) -> HRESULT, - fn get_Data(&self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT + fn get_Data(&self, out: *mut *mut foundation::collections::ValueSet) -> HRESULT }} impl IProtocolActivatedEventArgsWithCallerPackageFamilyNameAndData { - #[inline] pub unsafe fn get_caller_package_family_name(&self) -> Result { + #[inline] pub fn get_caller_package_family_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CallerPackageFamilyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_data(&self) -> Result> { + }} + #[inline] pub fn get_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Data)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut *mut super::super::system::ProtocolForResultsOperation) -> HRESULT }} impl IProtocolForResultsActivatedEventArgs { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_protocol_for_results_operation(&self) -> Result> { + #[cfg(feature="windows-system")] #[inline] pub fn get_protocol_for_results_operation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProtocolForResultsOperation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ProtocolForResultsActivatedEventArgs: IProtocolForResultsActivatedEventArgs} DEFINE_IID!(IID_IRestrictedLaunchActivatedEventArgs, 3770133633, 49091, 17220, 165, 218, 25, 253, 90, 39, 186, 174); @@ -8938,11 +8938,11 @@ RT_INTERFACE!{interface IRestrictedLaunchActivatedEventArgs(IRestrictedLaunchAct fn get_SharedContext(&self, out: *mut *mut IInspectable) -> HRESULT }} impl IRestrictedLaunchActivatedEventArgs { - #[inline] pub unsafe fn get_shared_context(&self) -> Result> { + #[inline] pub fn get_shared_context(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SharedContext)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RestrictedLaunchActivatedEventArgs: IRestrictedLaunchActivatedEventArgs} DEFINE_IID!(IID_ISearchActivatedEventArgs, 2360568145, 22728, 17379, 148, 188, 65, 211, 63, 139, 99, 14); @@ -8951,16 +8951,16 @@ RT_INTERFACE!{interface ISearchActivatedEventArgs(ISearchActivatedEventArgsVtbl) fn get_Language(&self, out: *mut HSTRING) -> HRESULT }} impl ISearchActivatedEventArgs { - #[inline] pub unsafe fn get_query_text(&self) -> Result { + #[inline] pub fn get_query_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_QueryText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_language(&self) -> Result { + }} + #[inline] pub fn get_language(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Language)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class SearchActivatedEventArgs: ISearchActivatedEventArgs} DEFINE_IID!(IID_ISearchActivatedEventArgsWithLinguisticDetails, 3231658970, 2219, 18737, 155, 124, 69, 16, 37, 242, 31, 129); @@ -8968,45 +8968,45 @@ RT_INTERFACE!{interface ISearchActivatedEventArgsWithLinguisticDetails(ISearchAc fn get_LinguisticDetails(&self, out: *mut *mut super::search::SearchPaneQueryLinguisticDetails) -> HRESULT }} impl ISearchActivatedEventArgsWithLinguisticDetails { - #[inline] pub unsafe fn get_linguistic_details(&self) -> Result> { + #[inline] pub fn get_linguistic_details(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LinguisticDetails)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut *mut super::datatransfer::sharetarget::ShareOperation) -> HRESULT }} impl IShareTargetActivatedEventArgs { - #[inline] pub unsafe fn get_share_operation(&self) -> Result> { + #[inline] pub fn get_share_operation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ShareOperation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ShareTargetActivatedEventArgs: IShareTargetActivatedEventArgs} 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(&self, out: *mut super::super::foundation::Rect) -> HRESULT, - fn add_Dismissed(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Dismissed(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn get_ImageLocation(&self, out: *mut foundation::Rect) -> HRESULT, + fn add_Dismissed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Dismissed(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl ISplashScreen { - #[inline] pub unsafe fn get_image_location(&self) -> Result { + #[inline] pub fn get_image_location(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ImageLocation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_dismissed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_dismissed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Dismissed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_dismissed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_dismissed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Dismissed)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SplashScreen: ISplashScreen} DEFINE_IID!(IID_IStartupTaskActivatedEventArgs, 61938264, 21110, 19857, 134, 33, 84, 97, 24, 100, 213, 250); @@ -9014,41 +9014,41 @@ RT_INTERFACE!{interface IStartupTaskActivatedEventArgs(IStartupTaskActivatedEven fn get_TaskId(&self, out: *mut HSTRING) -> HRESULT }} impl IStartupTaskActivatedEventArgs { - #[inline] pub unsafe fn get_task_id(&self) -> Result { + #[inline] pub fn get_task_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TaskId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class StartupTaskActivatedEventArgs: IStartupTaskActivatedEventArgs} 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + #[cfg(feature="windows-ui")] fn get_RecentlyShownNotifications(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl ITileActivatedInfo { - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_recently_shown_notifications(&self) -> Result>> { + #[cfg(feature="windows-ui")] #[inline] pub fn get_recently_shown_notifications(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RecentlyShownNotifications)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class TileActivatedInfo: ITileActivatedInfo} 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(&self, out: *mut HSTRING) -> HRESULT, - fn get_UserInput(&self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT + fn get_UserInput(&self, out: *mut *mut foundation::collections::ValueSet) -> HRESULT }} impl IToastNotificationActivatedEventArgs { - #[inline] pub unsafe fn get_argument(&self) -> Result { + #[inline] pub fn get_argument(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Argument)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_user_input(&self) -> Result> { + }} + #[inline] pub fn get_user_input(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UserInput)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ToastNotificationActivatedEventArgs: IToastNotificationActivatedEventArgs} DEFINE_IID!(IID_IUserDataAccountProviderActivatedEventArgs, 466220835, 36593, 19025, 166, 58, 254, 113, 30, 234, 182, 7); @@ -9056,11 +9056,11 @@ RT_INTERFACE!{interface IUserDataAccountProviderActivatedEventArgs(IUserDataAcco fn get_Operation(&self, out: *mut *mut super::userdataaccounts::provider::IUserDataAccountProviderOperation) -> HRESULT }} impl IUserDataAccountProviderActivatedEventArgs { - #[inline] pub unsafe fn get_operation(&self) -> Result> { + #[inline] pub fn get_operation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Operation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class UserDataAccountProviderActivatedEventArgs: IUserDataAccountProviderActivatedEventArgs} DEFINE_IID!(IID_IViewSwitcherProvider, 871532710, 23596, 19751, 186, 199, 117, 54, 8, 143, 18, 25); @@ -9068,22 +9068,22 @@ RT_INTERFACE!{interface IViewSwitcherProvider(IViewSwitcherProviderVtbl): IInspe #[cfg(feature="windows-ui")] fn get_ViewSwitcher(&self, out: *mut *mut super::super::ui::viewmanagement::ActivationViewSwitcher) -> HRESULT }} impl IViewSwitcherProvider { - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_view_switcher(&self) -> Result> { + #[cfg(feature="windows-ui")] #[inline] pub fn get_view_switcher(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ViewSwitcher)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut *mut super::super::media::speechrecognition::SpeechRecognitionResult) -> HRESULT }} impl IVoiceCommandActivatedEventArgs { - #[cfg(feature="windows-media")] #[inline] pub unsafe fn get_result(&self) -> Result> { + #[cfg(feature="windows-media")] #[inline] pub fn get_result(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Result)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class VoiceCommandActivatedEventArgs: IVoiceCommandActivatedEventArgs} DEFINE_IID!(IID_IWalletActionActivatedEventArgs, 4244374139, 6682, 19746, 146, 63, 174, 111, 69, 250, 82, 217); @@ -9093,21 +9093,21 @@ RT_INTERFACE!{interface IWalletActionActivatedEventArgs(IWalletActionActivatedEv fn get_ActionId(&self, out: *mut HSTRING) -> HRESULT }} impl IWalletActionActivatedEventArgs { - #[inline] pub unsafe fn get_item_id(&self) -> Result { + #[inline] pub fn get_item_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ItemId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_action_kind(&self) -> Result { + }} + #[inline] pub fn get_action_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ActionKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_action_id(&self) -> Result { + }} + #[inline] pub fn get_action_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ActionId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class WalletActionActivatedEventArgs: IWalletActionActivatedEventArgs} DEFINE_IID!(IID_IWebAccountProviderActivatedEventArgs, 1924601716, 39146, 19663, 151, 82, 70, 217, 5, 16, 4, 241); @@ -9115,11 +9115,11 @@ RT_INTERFACE!{interface IWebAccountProviderActivatedEventArgs(IWebAccountProvide #[cfg(feature="windows-security")] fn get_Operation(&self, out: *mut *mut super::super::security::authentication::web::provider::IWebAccountProviderOperation) -> HRESULT }} impl IWebAccountProviderActivatedEventArgs { - #[cfg(feature="windows-security")] #[inline] pub unsafe fn get_operation(&self) -> Result> { + #[cfg(feature="windows-security")] #[inline] pub fn get_operation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Operation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class WebAccountProviderActivatedEventArgs: IWebAccountProviderActivatedEventArgs} DEFINE_IID!(IID_IWebAuthenticationBrokerContinuationEventArgs, 1977459668, 30484, 17725, 183, 255, 185, 94, 58, 23, 9, 218); @@ -9127,11 +9127,11 @@ RT_INTERFACE!{interface IWebAuthenticationBrokerContinuationEventArgs(IWebAuthen #[cfg(feature="windows-security")] fn get_WebAuthenticationResult(&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(&self) -> Result> { + #[cfg(feature="windows-security")] #[inline] pub fn get_web_authentication_result(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WebAuthenticationResult)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class WebAuthenticationBrokerContinuationEventArgs: IWebAuthenticationBrokerContinuationEventArgs} } // Windows.ApplicationModel.Activation @@ -9146,60 +9146,60 @@ RT_INTERFACE!{interface IChatCapabilities(IChatCapabilitiesVtbl): IInspectable(I fn get_IsIntegratedMessagingCapable(&self, out: *mut bool) -> HRESULT }} impl IChatCapabilities { - #[inline] pub unsafe fn get_is_online(&self) -> Result { + #[inline] pub fn get_is_online(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsOnline)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_chat_capable(&self) -> Result { + }} + #[inline] pub fn get_is_chat_capable(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsChatCapable)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_file_transfer_capable(&self) -> Result { + }} + #[inline] pub fn get_is_file_transfer_capable(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsFileTransferCapable)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_geo_location_push_capable(&self) -> Result { + }} + #[inline] pub fn get_is_geo_location_push_capable(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsGeoLocationPushCapable)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_integrated_messaging_capable(&self) -> Result { + }} + #[inline] pub fn get_is_integrated_messaging_capable(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsIntegratedMessagingCapable)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ChatCapabilities: IChatCapabilities} RT_CLASS!{static class ChatCapabilitiesManager} impl RtActivatable for ChatCapabilitiesManager {} impl ChatCapabilitiesManager { - #[inline] pub fn get_cached_capabilities_async(address: &HStringArg) -> Result>> { unsafe { + #[inline] pub fn get_cached_capabilities_async(address: &HStringArg) -> Result>> { >::get_activation_factory().get_cached_capabilities_async(address) - }} - #[inline] pub fn get_capabilities_from_network_async(address: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn get_capabilities_from_network_async(address: &HStringArg) -> Result>> { >::get_activation_factory().get_capabilities_from_network_async(address) - }} + } } DEFINE_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]) [CLSID_ChatCapabilitiesManager]); 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(&self, address: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetCapabilitiesFromNetworkAsync(&self, address: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetCachedCapabilitiesAsync(&self, address: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetCapabilitiesFromNetworkAsync(&self, address: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IChatCapabilitiesManagerStatics { - #[inline] pub unsafe fn get_cached_capabilities_async(&self, address: &HStringArg) -> Result>> { + #[inline] pub fn get_cached_capabilities_async(&self, address: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCachedCapabilitiesAsync)(self as *const _ as *mut _, address.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_capabilities_from_network_async(&self, address: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_capabilities_from_network_async(&self, address: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCapabilitiesFromNetworkAsync)(self as *const _ as *mut _, address.get(), &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] { @@ -9210,104 +9210,104 @@ RT_INTERFACE!{interface IChatConversation(IChatConversationVtbl): IInspectable(I fn get_IsConversationMuted(&self, out: *mut bool) -> HRESULT, fn put_IsConversationMuted(&self, value: bool) -> HRESULT, fn get_MostRecentMessageId(&self, out: *mut HSTRING) -> HRESULT, - fn get_Participants(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Participants(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_ThreadingInfo(&self, out: *mut *mut ChatConversationThreadingInfo) -> HRESULT, - fn DeleteAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn DeleteAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn GetMessageReader(&self, out: *mut *mut ChatMessageReader) -> HRESULT, - fn MarkAllMessagesAsReadAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn MarkMessagesAsReadAsync(&self, value: super::super::foundation::DateTime, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn SaveAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn MarkAllMessagesAsReadAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn MarkMessagesAsReadAsync(&self, value: foundation::DateTime, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn SaveAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn NotifyLocalParticipantComposing(&self, transportId: HSTRING, participantAddress: HSTRING, isComposing: bool) -> HRESULT, fn NotifyRemoteParticipantComposing(&self, transportId: HSTRING, participantAddress: HSTRING, isComposing: bool) -> HRESULT, - fn add_RemoteParticipantComposingChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RemoteParticipantComposingChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_RemoteParticipantComposingChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RemoteParticipantComposingChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IChatConversation { - #[inline] pub unsafe fn get_has_unread_messages(&self) -> Result { + #[inline] pub fn get_has_unread_messages(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasUnreadMessages)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&self) -> Result { + }} + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_subject(&self) -> Result { + }} + #[inline] pub fn get_subject(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Subject)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_subject(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_subject(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Subject)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_conversation_muted(&self) -> Result { + }} + #[inline] pub fn get_is_conversation_muted(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsConversationMuted)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_conversation_muted(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_conversation_muted(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsConversationMuted)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_most_recent_message_id(&self) -> Result { + }} + #[inline] pub fn get_most_recent_message_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MostRecentMessageId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_participants(&self) -> Result>> { + }} + #[inline] pub fn get_participants(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Participants)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_threading_info(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_threading_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ThreadingInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete_async(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn delete_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_message_reader(&self) -> Result> { + }} + #[inline] pub fn get_message_reader(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetMessageReader)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn mark_all_messages_as_read_async(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn mark_all_messages_as_read_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MarkAllMessagesAsReadAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn mark_messages_as_read_async(&self, value: super::super::foundation::DateTime) -> Result> { + }} + #[inline] pub fn mark_messages_as_read_async(&self, value: foundation::DateTime) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MarkMessagesAsReadAsync)(self as *const _ as *mut _, value, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn save_async(&self) -> Result> { + }} + #[inline] pub fn save_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn notify_local_participant_composing(&self, transportId: &HStringArg, participantAddress: &HStringArg, isComposing: bool) -> Result<()> { + }} + #[inline] pub fn notify_local_participant_composing(&self, transportId: &HStringArg, participantAddress: &HStringArg, isComposing: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).NotifyLocalParticipantComposing)(self as *const _ as *mut _, transportId.get(), participantAddress.get(), isComposing); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn notify_remote_participant_composing(&self, transportId: &HStringArg, participantAddress: &HStringArg, isComposing: bool) -> Result<()> { + }} + #[inline] pub fn notify_remote_participant_composing(&self, transportId: &HStringArg, participantAddress: &HStringArg, isComposing: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).NotifyRemoteParticipantComposing)(self as *const _ as *mut _, transportId.get(), participantAddress.get(), isComposing); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_remote_participant_composing_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_remote_participant_composing_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RemoteParticipantComposingChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_remote_participant_composing_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_remote_participant_composing_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RemoteParticipantComposingChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ChatConversation: IChatConversation} DEFINE_IID!(IID_IChatConversation2, 167972049, 38970, 18346, 154, 144, 238, 72, 238, 153, 123, 89); @@ -9316,32 +9316,32 @@ RT_INTERFACE!{interface IChatConversation2(IChatConversation2Vtbl): IInspectable fn put_CanModifyParticipants(&self, value: bool) -> HRESULT }} impl IChatConversation2 { - #[inline] pub unsafe fn get_can_modify_participants(&self) -> Result { + #[inline] pub fn get_can_modify_participants(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanModifyParticipants)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_modify_participants(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_modify_participants(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanModifyParticipants)(self as *const _ as *mut _, 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn ReadBatchWithCountAsync(&self, count: i32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn ReadBatchAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn ReadBatchWithCountAsync(&self, count: i32, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IChatConversationReader { - #[inline] pub unsafe fn read_batch_async(&self) -> Result>>> { + #[inline] pub fn read_batch_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadBatchAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn read_batch_with_count_async(&self, count: i32) -> Result>>> { + }} + #[inline] pub fn read_batch_with_count_async(&self, count: i32) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadBatchWithCountAsync)(self as *const _ as *mut _, count, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ChatConversationReader: IChatConversationReader} DEFINE_IID!(IID_IChatConversationThreadingInfo, 857481692, 31239, 17442, 163, 44, 36, 190, 124, 109, 171, 36); @@ -9352,52 +9352,52 @@ RT_INTERFACE!{interface IChatConversationThreadingInfo(IChatConversationThreadin fn put_Custom(&self, value: HSTRING) -> HRESULT, fn get_ConversationId(&self, out: *mut HSTRING) -> HRESULT, fn put_ConversationId(&self, value: HSTRING) -> HRESULT, - fn get_Participants(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Participants(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_Kind(&self, out: *mut ChatConversationThreadingKind) -> HRESULT, fn put_Kind(&self, value: ChatConversationThreadingKind) -> HRESULT }} impl IChatConversationThreadingInfo { - #[inline] pub unsafe fn get_contact_id(&self) -> Result { + #[inline] pub fn get_contact_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContactId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_contact_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_contact_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ContactId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_custom(&self) -> Result { + }} + #[inline] pub fn get_custom(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Custom)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_custom(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_custom(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Custom)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_conversation_id(&self) -> Result { + }} + #[inline] pub fn get_conversation_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ConversationId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_conversation_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_conversation_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ConversationId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_participants(&self) -> Result>> { + }} + #[inline] pub fn get_participants(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Participants)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_kind(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_kind(&self, value: ChatConversationThreadingKind) -> Result<()> { + }} + #[inline] pub fn set_kind(&self, value: ChatConversationThreadingKind) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Kind)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ChatConversationThreadingInfo: IChatConversationThreadingInfo} impl RtActivatable for ChatConversationThreadingInfo {} @@ -9410,18 +9410,18 @@ RT_INTERFACE!{interface IChatItem(IChatItemVtbl): IInspectable(IInspectableVtbl) fn get_ItemKind(&self, out: *mut ChatItemKind) -> HRESULT }} impl IChatItem { - #[inline] pub unsafe fn get_item_kind(&self) -> Result { + #[inline] pub fn get_item_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ItemKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum ChatItemKind: i32 { Message (ChatItemKind_Message) = 0, Conversation (ChatItemKind_Conversation) = 1, }} 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Attachments(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_Body(&self, out: *mut HSTRING) -> HRESULT, fn put_Body(&self, value: HSTRING) -> HRESULT, fn get_From(&self, out: *mut HSTRING) -> HRESULT, @@ -9429,10 +9429,10 @@ RT_INTERFACE!{interface IChatMessage(IChatMessageVtbl): IInspectable(IInspectabl fn get_IsForwardingDisabled(&self, out: *mut bool) -> HRESULT, fn get_IsIncoming(&self, out: *mut bool) -> HRESULT, fn get_IsRead(&self, out: *mut bool) -> HRESULT, - fn get_LocalTimestamp(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_NetworkTimestamp(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_Recipients(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_RecipientSendStatuses(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, + fn get_LocalTimestamp(&self, out: *mut foundation::DateTime) -> HRESULT, + fn get_NetworkTimestamp(&self, out: *mut foundation::DateTime) -> HRESULT, + fn get_Recipients(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_RecipientSendStatuses(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT, fn get_Status(&self, out: *mut ChatMessageStatus) -> HRESULT, fn get_Subject(&self, out: *mut HSTRING) -> HRESULT, fn get_TransportFriendlyName(&self, out: *mut HSTRING) -> HRESULT, @@ -9440,89 +9440,89 @@ RT_INTERFACE!{interface IChatMessage(IChatMessageVtbl): IInspectable(IInspectabl fn put_TransportId(&self, value: HSTRING) -> HRESULT }} impl IChatMessage { - #[inline] pub unsafe fn get_attachments(&self) -> Result>> { + #[inline] pub fn get_attachments(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Attachments)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_body(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_body(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Body)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_body(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_body(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Body)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_from(&self) -> Result { + }} + #[inline] pub fn get_from(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_From)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&self) -> Result { + }} + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_forwarding_disabled(&self) -> Result { + }} + #[inline] pub fn get_is_forwarding_disabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsForwardingDisabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_incoming(&self) -> Result { + }} + #[inline] pub fn get_is_incoming(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsIncoming)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_read(&self) -> Result { + }} + #[inline] pub fn get_is_read(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsRead)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_local_timestamp(&self) -> Result { + }} + #[inline] pub fn get_local_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LocalTimestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_network_timestamp(&self) -> Result { + }} + #[inline] pub fn get_network_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NetworkTimestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_recipients(&self) -> Result>> { + }} + #[inline] pub fn get_recipients(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Recipients)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_recipient_send_statuses(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_recipient_send_statuses(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RecipientSendStatuses)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_subject(&self) -> Result { + }} + #[inline] pub fn get_subject(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Subject)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_transport_friendly_name(&self) -> Result { + }} + #[inline] pub fn get_transport_friendly_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TransportFriendlyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_transport_id(&self) -> Result { + }} + #[inline] pub fn get_transport_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TransportId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_transport_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_transport_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TransportId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ChatMessage: IChatMessage} impl RtActivatable for ChatMessage {} @@ -9541,12 +9541,12 @@ RT_INTERFACE!{interface IChatMessage2(IChatMessage2Vtbl): IInspectable(IInspecta fn get_IsSeen(&self, out: *mut bool) -> HRESULT, fn put_IsSeen(&self, value: bool) -> HRESULT, fn get_IsSimMessage(&self, out: *mut bool) -> HRESULT, - fn put_LocalTimestamp(&self, value: super::super::foundation::DateTime) -> HRESULT, + fn put_LocalTimestamp(&self, value: foundation::DateTime) -> HRESULT, fn get_MessageKind(&self, out: *mut ChatMessageKind) -> HRESULT, fn put_MessageKind(&self, value: ChatMessageKind) -> HRESULT, fn get_MessageOperatorKind(&self, out: *mut ChatMessageOperatorKind) -> HRESULT, fn put_MessageOperatorKind(&self, value: ChatMessageOperatorKind) -> HRESULT, - fn put_NetworkTimestamp(&self, value: super::super::foundation::DateTime) -> HRESULT, + fn put_NetworkTimestamp(&self, value: foundation::DateTime) -> HRESULT, fn get_IsReceivedDuringQuietHours(&self, out: *mut bool) -> HRESULT, fn put_IsReceivedDuringQuietHours(&self, value: bool) -> HRESULT, fn put_RemoteId(&self, value: HSTRING) -> HRESULT, @@ -9556,143 +9556,143 @@ RT_INTERFACE!{interface IChatMessage2(IChatMessage2Vtbl): IInspectable(IInspecta fn put_ShouldSuppressNotification(&self, value: bool) -> HRESULT, fn get_ThreadingInfo(&self, out: *mut *mut ChatConversationThreadingInfo) -> HRESULT, fn put_ThreadingInfo(&self, value: *mut ChatConversationThreadingInfo) -> HRESULT, - fn get_RecipientsDeliveryInfos(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_RecipientsDeliveryInfos(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IChatMessage2 { - #[inline] pub unsafe fn get_estimated_download_size(&self) -> Result { + #[inline] pub fn get_estimated_download_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EstimatedDownloadSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_estimated_download_size(&self, value: u64) -> Result<()> { + }} + #[inline] pub fn set_estimated_download_size(&self, value: u64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_EstimatedDownloadSize)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_from(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_from(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_From)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_auto_reply(&self) -> Result { + }} + #[inline] pub fn get_is_auto_reply(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsAutoReply)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_auto_reply(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_auto_reply(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsAutoReply)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_forwarding_disabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_forwarding_disabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsForwardingDisabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_reply_disabled(&self) -> Result { + }} + #[inline] pub fn get_is_reply_disabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsReplyDisabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_incoming(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_incoming(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsIncoming)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_read(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_read(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsRead)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_seen(&self) -> Result { + }} + #[inline] pub fn get_is_seen(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSeen)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_seen(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_seen(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsSeen)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_sim_message(&self) -> Result { + }} + #[inline] pub fn get_is_sim_message(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSimMessage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_local_timestamp(&self, value: super::super::foundation::DateTime) -> Result<()> { + }} + #[inline] pub fn set_local_timestamp(&self, value: foundation::DateTime) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LocalTimestamp)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_message_kind(&self) -> Result { + }} + #[inline] pub fn get_message_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MessageKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_message_kind(&self, value: ChatMessageKind) -> Result<()> { + }} + #[inline] pub fn set_message_kind(&self, value: ChatMessageKind) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MessageKind)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_message_operator_kind(&self) -> Result { + }} + #[inline] pub fn get_message_operator_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MessageOperatorKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_message_operator_kind(&self, value: ChatMessageOperatorKind) -> Result<()> { + }} + #[inline] pub fn set_message_operator_kind(&self, value: ChatMessageOperatorKind) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MessageOperatorKind)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_network_timestamp(&self, value: super::super::foundation::DateTime) -> Result<()> { + }} + #[inline] pub fn set_network_timestamp(&self, value: foundation::DateTime) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_NetworkTimestamp)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_received_during_quiet_hours(&self) -> Result { + }} + #[inline] pub fn get_is_received_during_quiet_hours(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsReceivedDuringQuietHours)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_received_during_quiet_hours(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_received_during_quiet_hours(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsReceivedDuringQuietHours)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_remote_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_remote_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RemoteId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_status(&self, value: ChatMessageStatus) -> Result<()> { + }} + #[inline] pub fn set_status(&self, value: ChatMessageStatus) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Status)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_subject(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_subject(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Subject)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_should_suppress_notification(&self) -> Result { + }} + #[inline] pub fn get_should_suppress_notification(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ShouldSuppressNotification)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_should_suppress_notification(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_should_suppress_notification(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ShouldSuppressNotification)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_threading_info(&self) -> Result> { + }} + #[inline] pub fn get_threading_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ThreadingInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_threading_info(&self, value: &ChatConversationThreadingInfo) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_threading_info(&self, value: &ChatConversationThreadingInfo) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ThreadingInfo)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_recipients_delivery_infos(&self) -> Result>> { + }} + #[inline] pub fn get_recipients_delivery_infos(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RecipientsDeliveryInfos)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut HSTRING) -> HRESULT }} impl IChatMessage3 { - #[inline] pub unsafe fn get_remote_id(&self) -> Result { + #[inline] pub fn get_remote_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IChatMessage4, 756304655, 53951, 17932, 170, 104, 109, 63, 132, 131, 201, 191); RT_INTERFACE!{interface IChatMessage4(IChatMessage4Vtbl): IInspectable(IInspectableVtbl) [IID_IChatMessage4] { @@ -9700,15 +9700,15 @@ RT_INTERFACE!{interface IChatMessage4(IChatMessage4Vtbl): IInspectable(IInspecta fn put_SyncId(&self, value: HSTRING) -> HRESULT }} impl IChatMessage4 { - #[inline] pub unsafe fn get_sync_id(&self) -> Result { + #[inline] pub fn get_sync_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SyncId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_sync_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_sync_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SyncId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } 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] { @@ -9724,49 +9724,49 @@ RT_INTERFACE!{interface IChatMessageAttachment(IChatMessageAttachmentVtbl): IIns fn put_Text(&self, value: HSTRING) -> HRESULT }} impl IChatMessageAttachment { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_data_stream_reference(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_data_stream_reference(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DataStreamReference)(self 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_data_stream_reference(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_data_stream_reference(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DataStreamReference)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_group_id(&self) -> Result { + }} + #[inline] pub fn get_group_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_GroupId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_group_id(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_group_id(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_GroupId)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_mime_type(&self) -> Result { + }} + #[inline] pub fn get_mime_type(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MimeType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_mime_type(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_mime_type(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MimeType)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_text(&self) -> Result { + }} + #[inline] pub fn get_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Text)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_text(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_text(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Text)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ChatMessageAttachment: IChatMessageAttachment} impl RtActivatable for ChatMessageAttachment {} impl ChatMessageAttachment { - #[cfg(feature="windows-storage")] #[inline] pub fn create_chat_message_attachment(mimeType: &HStringArg, dataStreamReference: &super::super::storage::streams::IRandomAccessStreamReference) -> Result> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn create_chat_message_attachment(mimeType: &HStringArg, dataStreamReference: &super::super::storage::streams::IRandomAccessStreamReference) -> Result> { >::get_activation_factory().create_chat_message_attachment(mimeType, dataStreamReference) - }} + } } DEFINE_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]) [CLSID_ChatMessageAttachment]); DEFINE_IID!(IID_IChatMessageAttachment2, 1591317104, 32209, 19079, 168, 206, 172, 221, 135, 216, 13, 200); @@ -9781,63 +9781,63 @@ RT_INTERFACE!{interface IChatMessageAttachment2(IChatMessageAttachment2Vtbl): II fn put_OriginalFileName(&self, value: HSTRING) -> HRESULT }} impl IChatMessageAttachment2 { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_thumbnail(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_thumbnail(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Thumbnail)(self 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_thumbnail(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_thumbnail(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Thumbnail)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_transfer_progress(&self) -> Result { + }} + #[inline] pub fn get_transfer_progress(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TransferProgress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_transfer_progress(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_transfer_progress(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TransferProgress)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_original_file_name(&self) -> Result { + }} + #[inline] pub fn get_original_file_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OriginalFileName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_original_file_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_original_file_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OriginalFileName)(self as *const _ as *mut _, 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(&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(&self, mimeType: &HStringArg, dataStreamReference: &super::super::storage::streams::IRandomAccessStreamReference) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn create_chat_message_attachment(&self, mimeType: &HStringArg, dataStreamReference: &super::super::storage::streams::IRandomAccessStreamReference) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateChatMessageAttachment)(self as *const _ as *mut _, mimeType.get(), dataStreamReference as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class ChatMessageBlocking} impl RtActivatable for ChatMessageBlocking {} impl ChatMessageBlocking { - #[inline] pub fn mark_message_as_blocked_async(localChatMessageId: &HStringArg, blocked: bool) -> Result> { unsafe { + #[inline] pub fn mark_message_as_blocked_async(localChatMessageId: &HStringArg, blocked: bool) -> Result> { >::get_activation_factory().mark_message_as_blocked_async(localChatMessageId, blocked) - }} + } } DEFINE_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]) [CLSID_ChatMessageBlocking]); 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(&self, localChatMessageId: HSTRING, blocked: bool, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn MarkMessageAsBlockedAsync(&self, localChatMessageId: HSTRING, blocked: bool, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IChatMessageBlockingStatic { - #[inline] pub unsafe fn mark_message_as_blocked_async(&self, localChatMessageId: &HStringArg, blocked: bool) -> Result> { + #[inline] pub fn mark_message_as_blocked_async(&self, localChatMessageId: &HStringArg, blocked: bool) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MarkMessageAsBlockedAsync)(self as *const _ as *mut _, localChatMessageId.get(), blocked, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IChatMessageChange, 471384917, 16926, 21688, 109, 56, 107, 58, 108, 130, 252, 204); RT_INTERFACE!{interface IChatMessageChange(IChatMessageChangeVtbl): IInspectable(IInspectableVtbl) [IID_IChatMessageChange] { @@ -9845,16 +9845,16 @@ RT_INTERFACE!{interface IChatMessageChange(IChatMessageChangeVtbl): IInspectable fn get_Message(&self, out: *mut *mut ChatMessage) -> HRESULT }} impl IChatMessageChange { - #[inline] pub unsafe fn get_change_type(&self) -> Result { + #[inline] pub fn get_change_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ChangeType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_message(&self) -> Result> { + }} + #[inline] pub fn get_message(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Message)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ChatMessageChange: IChatMessageChange} DEFINE_IID!(IID_IChatMessageChangedDeferral, 4224103180, 30860, 19916, 172, 231, 98, 130, 56, 41, 104, 207); @@ -9862,10 +9862,10 @@ RT_INTERFACE!{interface IChatMessageChangedDeferral(IChatMessageChangedDeferralV fn Complete(&self) -> HRESULT }} impl IChatMessageChangedDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ChatMessageChangedDeferral: IChatMessageChangedDeferral} DEFINE_IID!(IID_IChatMessageChangedEventArgs, 3065462317, 26908, 20191, 134, 96, 110, 185, 137, 104, 146, 227); @@ -9873,33 +9873,33 @@ RT_INTERFACE!{interface IChatMessageChangedEventArgs(IChatMessageChangedEventArg fn GetDeferral(&self, out: *mut *mut ChatMessageChangedDeferral) -> HRESULT }} impl IChatMessageChangedEventArgs { - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ChatMessageChangedEventArgs: IChatMessageChangedEventArgs} 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(&self) -> HRESULT, fn AcceptChangesThrough(&self, lastChangeToAcknowledge: *mut ChatMessageChange) -> HRESULT, - fn ReadBatchAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn ReadBatchAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IChatMessageChangeReader { - #[inline] pub unsafe fn accept_changes(&self) -> Result<()> { + #[inline] pub fn accept_changes(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AcceptChanges)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn accept_changes_through(&self, lastChangeToAcknowledge: &ChatMessageChange) -> Result<()> { + }} + #[inline] pub fn accept_changes_through(&self, lastChangeToAcknowledge: &ChatMessageChange) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AcceptChangesThrough)(self as *const _ as *mut _, lastChangeToAcknowledge as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn read_batch_async(&self) -> Result>>> { + }} + #[inline] pub fn read_batch_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadBatchAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ChatMessageChangeReader: IChatMessageChangeReader} DEFINE_IID!(IID_IChatMessageChangeTracker, 1622667366, 28832, 21028, 80, 140, 36, 46, 247, 193, 208, 111); @@ -9909,19 +9909,19 @@ RT_INTERFACE!{interface IChatMessageChangeTracker(IChatMessageChangeTrackerVtbl) fn Reset(&self) -> HRESULT }} impl IChatMessageChangeTracker { - #[inline] pub unsafe fn enable(&self) -> Result<()> { + #[inline] pub fn enable(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Enable)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_change_reader(&self) -> Result> { + }} + #[inline] pub fn get_change_reader(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetChangeReader)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn reset(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn reset(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Reset)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ChatMessageChangeTracker: IChatMessageChangeTracker} RT_ENUM! { enum ChatMessageChangeType: i32 { @@ -9935,95 +9935,95 @@ impl RtActivatable for ChatMessageManager {} impl RtActivatable for ChatMessageManager {} impl RtActivatable for ChatMessageManager {} impl ChatMessageManager { - #[inline] pub fn register_transport_async() -> Result>> { unsafe { + #[inline] pub fn register_transport_async() -> Result>> { >::get_activation_factory().register_transport_async() - }} - #[inline] pub fn get_transport_async(transportId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn get_transport_async(transportId: &HStringArg) -> Result>> { >::get_activation_factory().get_transport_async(transportId) - }} - #[inline] pub fn get_transports_async() -> Result>>> { unsafe { + } + #[inline] pub fn get_transports_async() -> Result>>> { >::get_activation_factory().get_transports_async() - }} - #[inline] pub fn request_store_async() -> Result>> { unsafe { + } + #[inline] pub fn request_store_async() -> Result>> { >::get_activation_factory().request_store_async() - }} - #[inline] pub fn show_compose_sms_message_async(message: &ChatMessage) -> Result> { unsafe { + } + #[inline] pub fn show_compose_sms_message_async(message: &ChatMessage) -> Result> { >::get_activation_factory().show_compose_sms_message_async(message) - }} - #[inline] pub fn show_sms_settings() -> Result<()> { unsafe { + } + #[inline] pub fn show_sms_settings() -> Result<()> { >::get_activation_factory().show_sms_settings() - }} - #[inline] pub fn request_sync_manager_async() -> Result>> { unsafe { + } + #[inline] pub fn request_sync_manager_async() -> Result>> { >::get_activation_factory().request_sync_manager_async() - }} + } } DEFINE_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]) [CLSID_ChatMessageManager]); 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetTransportAsync(&self, transportId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn RegisterTransportAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetTransportAsync(&self, transportId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IChatMessageManager2Statics { - #[inline] pub unsafe fn register_transport_async(&self) -> Result>> { + #[inline] pub fn register_transport_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RegisterTransportAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_transport_async(&self, transportId: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_transport_async(&self, transportId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetTransportAsync)(self as *const _ as *mut _, transportId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(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(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn RequestStoreAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn ShowComposeSmsMessageAsync(&self, message: *mut ChatMessage, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn GetTransportsAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn RequestStoreAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ShowComposeSmsMessageAsync(&self, message: *mut ChatMessage, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn ShowSmsSettings(&self) -> HRESULT }} impl IChatMessageManagerStatic { - #[inline] pub unsafe fn get_transports_async(&self) -> Result>>> { + #[inline] pub fn get_transports_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetTransportsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_store_async(&self) -> Result>> { + }} + #[inline] pub fn request_store_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestStoreAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn show_compose_sms_message_async(&self, message: &ChatMessage) -> Result> { + }} + #[inline] pub fn show_compose_sms_message_async(&self, message: &ChatMessage) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowComposeSmsMessageAsync)(self as *const _ as *mut _, message as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn show_sms_settings(&self) -> Result<()> { + }} + #[inline] pub fn show_sms_settings(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ShowSmsSettings)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn RequestSyncManagerAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IChatMessageManagerStatics3 { - #[inline] pub unsafe fn request_sync_manager_async(&self) -> Result>> { + #[inline] pub fn request_sync_manager_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestSyncManagerAsync)(self 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(&self, out: *mut *mut ChatMessage) -> HRESULT }} impl IChatMessageNotificationTriggerDetails { - #[inline] pub unsafe fn get_chat_message(&self) -> Result> { + #[inline] pub fn get_chat_message(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ChatMessage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ChatMessageNotificationTriggerDetails: IChatMessageNotificationTriggerDetails} DEFINE_IID!(IID_IChatMessageNotificationTriggerDetails2, 1807033056, 43527, 20433, 148, 113, 119, 147, 79, 183, 94, 230); @@ -10034,52 +10034,52 @@ RT_INTERFACE!{interface IChatMessageNotificationTriggerDetails2(IChatMessageNoti fn get_ShouldUpdateActionCenter(&self, out: *mut bool) -> HRESULT }} impl IChatMessageNotificationTriggerDetails2 { - #[inline] pub unsafe fn get_should_display_toast(&self) -> Result { + #[inline] pub fn get_should_display_toast(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ShouldDisplayToast)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_should_update_detail_text(&self) -> Result { + }} + #[inline] pub fn get_should_update_detail_text(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ShouldUpdateDetailText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_should_update_badge(&self) -> Result { + }} + #[inline] pub fn get_should_update_badge(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ShouldUpdateBadge)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_should_update_action_center(&self) -> Result { + }} + #[inline] pub fn get_should_update_action_center(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ShouldUpdateActionCenter)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum ChatMessageOperatorKind: i32 { Unspecified (ChatMessageOperatorKind_Unspecified) = 0, Sms (ChatMessageOperatorKind_Sms) = 1, Mms (ChatMessageOperatorKind_Mms) = 2, Rcs (ChatMessageOperatorKind_Rcs) = 3, }} 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn ReadBatchAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IChatMessageReader { - #[inline] pub unsafe fn read_batch_async(&self) -> Result>>> { + #[inline] pub fn read_batch_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadBatchAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ChatMessageReader: IChatMessageReader} 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(&self, count: i32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn ReadBatchWithCountAsync(&self, count: i32, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IChatMessageReader2 { - #[inline] pub unsafe fn read_batch_with_count_async(&self, count: i32) -> Result>>> { + #[inline] pub fn read_batch_with_count_async(&self, count: i32) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadBatchWithCountAsync)(self as *const _ as *mut _, count, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -10087,196 +10087,196 @@ RT_ENUM! { enum ChatMessageStatus: i32 { 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(&self, out: *mut *mut ChatMessageChangeTracker) -> HRESULT, - fn DeleteMessageAsync(&self, localMessageId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn DownloadMessageAsync(&self, localChatMessageId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn GetMessageAsync(&self, localChatMessageId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn DeleteMessageAsync(&self, localMessageId: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn DownloadMessageAsync(&self, localChatMessageId: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn GetMessageAsync(&self, localChatMessageId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetMessageReader1(&self, out: *mut *mut ChatMessageReader) -> HRESULT, - fn GetMessageReader2(&self, recentTimeLimit: super::super::foundation::TimeSpan, out: *mut *mut ChatMessageReader) -> HRESULT, - fn MarkMessageReadAsync(&self, localChatMessageId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn RetrySendMessageAsync(&self, localChatMessageId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn SendMessageAsync(&self, chatMessage: *mut ChatMessage, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn GetMessageReader2(&self, recentTimeLimit: foundation::TimeSpan, out: *mut *mut ChatMessageReader) -> HRESULT, + fn MarkMessageReadAsync(&self, localChatMessageId: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn RetrySendMessageAsync(&self, localChatMessageId: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn SendMessageAsync(&self, chatMessage: *mut ChatMessage, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn ValidateMessage(&self, chatMessage: *mut ChatMessage, out: *mut *mut ChatMessageValidationResult) -> HRESULT, - fn add_MessageChanged(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_MessageChanged(&self, value: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_MessageChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_MessageChanged(&self, value: foundation::EventRegistrationToken) -> HRESULT }} impl IChatMessageStore { - #[inline] pub unsafe fn get_change_tracker(&self) -> Result> { + #[inline] pub fn get_change_tracker(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ChangeTracker)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete_message_async(&self, localMessageId: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn delete_message_async(&self, localMessageId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteMessageAsync)(self as *const _ as *mut _, localMessageId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn download_message_async(&self, localChatMessageId: &HStringArg) -> Result> { + }} + #[inline] pub fn download_message_async(&self, localChatMessageId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DownloadMessageAsync)(self as *const _ as *mut _, localChatMessageId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_message_async(&self, localChatMessageId: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_message_async(&self, localChatMessageId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetMessageAsync)(self as *const _ as *mut _, localChatMessageId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_message_reader1(&self) -> Result> { + }} + #[inline] pub fn get_message_reader1(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetMessageReader1)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_message_reader2(&self, recentTimeLimit: super::super::foundation::TimeSpan) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_message_reader2(&self, recentTimeLimit: foundation::TimeSpan) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetMessageReader2)(self as *const _ as *mut _, recentTimeLimit, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn mark_message_read_async(&self, localChatMessageId: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn mark_message_read_async(&self, localChatMessageId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MarkMessageReadAsync)(self as *const _ as *mut _, localChatMessageId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn retry_send_message_async(&self, localChatMessageId: &HStringArg) -> Result> { + }} + #[inline] pub fn retry_send_message_async(&self, localChatMessageId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RetrySendMessageAsync)(self as *const _ as *mut _, localChatMessageId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn send_message_async(&self, chatMessage: &ChatMessage) -> Result> { + }} + #[inline] pub fn send_message_async(&self, chatMessage: &ChatMessage) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SendMessageAsync)(self as *const _ as *mut _, chatMessage as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn validate_message(&self, chatMessage: &ChatMessage) -> Result> { + }} + #[inline] pub fn validate_message(&self, chatMessage: &ChatMessage) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ValidateMessage)(self as *const _ as *mut _, chatMessage as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_message_changed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_message_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_MessageChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_message_changed(&self, value: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_message_changed(&self, value: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_MessageChanged)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ChatMessageStore: IChatMessageStore} 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(&self, localChatMessageId: HSTRING, addresses: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetConversationAsync(&self, conversationId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetConversationForTransportsAsync(&self, conversationId: HSTRING, transportIds: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetConversationFromThreadingInfoAsync(&self, threadingInfo: *mut ChatConversationThreadingInfo, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ForwardMessageAsync(&self, localChatMessageId: HSTRING, addresses: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetConversationAsync(&self, conversationId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetConversationForTransportsAsync(&self, conversationId: HSTRING, transportIds: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetConversationFromThreadingInfoAsync(&self, threadingInfo: *mut ChatConversationThreadingInfo, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetConversationReader(&self, out: *mut *mut ChatConversationReader) -> HRESULT, - fn GetConversationForTransportsReader(&self, transportIds: *mut super::super::foundation::collections::IIterable, out: *mut *mut ChatConversationReader) -> HRESULT, - fn GetMessageByRemoteIdAsync(&self, transportId: HSTRING, remoteId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetUnseenCountAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetUnseenCountForTransportsReaderAsync(&self, transportIds: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn MarkAsSeenAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn MarkAsSeenForTransportsAsync(&self, transportIds: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn GetConversationForTransportsReader(&self, transportIds: *mut foundation::collections::IIterable, out: *mut *mut ChatConversationReader) -> HRESULT, + fn GetMessageByRemoteIdAsync(&self, transportId: HSTRING, remoteId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetUnseenCountAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetUnseenCountForTransportsReaderAsync(&self, transportIds: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn MarkAsSeenAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn MarkAsSeenForTransportsAsync(&self, transportIds: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn GetSearchReader(&self, value: *mut ChatQueryOptions, out: *mut *mut ChatSearchReader) -> HRESULT, - fn SaveMessageAsync(&self, chatMessage: *mut ChatMessage, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn TryCancelDownloadMessageAsync(&self, localChatMessageId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryCancelSendMessageAsync(&self, localChatMessageId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_StoreChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StoreChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn SaveMessageAsync(&self, chatMessage: *mut ChatMessage, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn TryCancelDownloadMessageAsync(&self, localChatMessageId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryCancelSendMessageAsync(&self, localChatMessageId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_StoreChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StoreChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IChatMessageStore2 { - #[inline] pub unsafe fn forward_message_async(&self, localChatMessageId: &HStringArg, addresses: &super::super::foundation::collections::IIterable) -> Result>> { + #[inline] pub fn forward_message_async(&self, localChatMessageId: &HStringArg, addresses: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ForwardMessageAsync)(self as *const _ as *mut _, 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_conversation_async(&self, conversationId: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_conversation_async(&self, conversationId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetConversationAsync)(self as *const _ as *mut _, conversationId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_conversation_for_transports_async(&self, conversationId: &HStringArg, transportIds: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn get_conversation_for_transports_async(&self, conversationId: &HStringArg, transportIds: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetConversationForTransportsAsync)(self as *const _ as *mut _, 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_conversation_from_threading_info_async(&self, threadingInfo: &ChatConversationThreadingInfo) -> Result>> { + }} + #[inline] pub fn get_conversation_from_threading_info_async(&self, threadingInfo: &ChatConversationThreadingInfo) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetConversationFromThreadingInfoAsync)(self as *const _ as *mut _, threadingInfo as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_conversation_reader(&self) -> Result> { + }} + #[inline] pub fn get_conversation_reader(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetConversationReader)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_conversation_for_transports_reader(&self, transportIds: &super::super::foundation::collections::IIterable) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_conversation_for_transports_reader(&self, transportIds: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetConversationForTransportsReader)(self as *const _ as *mut _, 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(&self, transportId: &HStringArg, remoteId: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_message_by_remote_id_async(&self, transportId: &HStringArg, remoteId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetMessageByRemoteIdAsync)(self as *const _ as *mut _, 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(&self) -> Result>> { + }} + #[inline] pub fn get_unseen_count_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetUnseenCountAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_unseen_count_for_transports_reader_async(&self, transportIds: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn get_unseen_count_for_transports_reader_async(&self, transportIds: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetUnseenCountForTransportsReaderAsync)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[inline] pub fn mark_as_seen_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MarkAsSeenAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn mark_as_seen_for_transports_async(&self, transportIds: &super::super::foundation::collections::IIterable) -> Result> { + }} + #[inline] pub fn mark_as_seen_for_transports_async(&self, transportIds: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MarkAsSeenForTransportsAsync)(self as *const _ as *mut _, 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(&self, value: &ChatQueryOptions) -> Result> { + }} + #[inline] pub fn get_search_reader(&self, value: &ChatQueryOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSearchReader)(self as *const _ as *mut _, 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(&self, chatMessage: &ChatMessage) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn save_message_async(&self, chatMessage: &ChatMessage) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveMessageAsync)(self as *const _ as *mut _, 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(&self, localChatMessageId: &HStringArg) -> Result>> { + }} + #[inline] pub fn try_cancel_download_message_async(&self, localChatMessageId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryCancelDownloadMessageAsync)(self as *const _ as *mut _, localChatMessageId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_cancel_send_message_async(&self, localChatMessageId: &HStringArg) -> Result>> { + }} + #[inline] pub fn try_cancel_send_message_async(&self, localChatMessageId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryCancelSendMessageAsync)(self as *const _ as *mut _, localChatMessageId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_store_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_store_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StoreChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_store_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_store_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StoreChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, syncId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetMessageBySyncIdAsync(&self, syncId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IChatMessageStore3 { - #[inline] pub unsafe fn get_message_by_sync_id_async(&self, syncId: &HStringArg) -> Result>> { + #[inline] pub fn get_message_by_sync_id_async(&self, syncId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetMessageBySyncIdAsync)(self as *const _ as *mut _, syncId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(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] { @@ -10284,16 +10284,16 @@ RT_INTERFACE!{interface IChatMessageStoreChangedEventArgs(IChatMessageStoreChang fn get_Kind(&self, out: *mut ChatStoreChangedEventKind) -> HRESULT }} impl IChatMessageStoreChangedEventArgs { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_kind(&self) -> Result { + }} + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ChatMessageStoreChangedEventArgs: IChatMessageStoreChangedEventArgs} DEFINE_IID!(IID_IChatMessageTransport, 1672076280, 59059, 23706, 95, 133, 212, 121, 37, 185, 189, 24); @@ -10302,34 +10302,34 @@ RT_INTERFACE!{interface IChatMessageTransport(IChatMessageTransportVtbl): IInspe fn get_IsActive(&self, out: *mut bool) -> HRESULT, fn get_TransportFriendlyName(&self, out: *mut HSTRING) -> HRESULT, fn get_TransportId(&self, out: *mut HSTRING) -> HRESULT, - fn RequestSetAsNotificationProviderAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn RequestSetAsNotificationProviderAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IChatMessageTransport { - #[inline] pub unsafe fn get_is_app_set_as_notification_provider(&self) -> Result { + #[inline] pub fn get_is_app_set_as_notification_provider(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsAppSetAsNotificationProvider)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_active(&self) -> Result { + }} + #[inline] pub fn get_is_active(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsActive)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_transport_friendly_name(&self) -> Result { + }} + #[inline] pub fn get_transport_friendly_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TransportFriendlyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_transport_id(&self) -> Result { + }} + #[inline] pub fn get_transport_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TransportId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_set_as_notification_provider_async(&self) -> Result> { + }} + #[inline] pub fn request_set_as_notification_provider_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestSetAsNotificationProviderAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ChatMessageTransport: IChatMessageTransport} DEFINE_IID!(IID_IChatMessageTransport2, 2426885666, 55370, 19490, 169, 77, 84, 68, 68, 237, 200, 161); @@ -10338,16 +10338,16 @@ RT_INTERFACE!{interface IChatMessageTransport2(IChatMessageTransport2Vtbl): IIns fn get_TransportKind(&self, out: *mut ChatMessageTransportKind) -> HRESULT }} impl IChatMessageTransport2 { - #[inline] pub unsafe fn get_configuration(&self) -> Result> { + #[inline] pub fn get_configuration(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Configuration)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_transport_kind(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_transport_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TransportKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IChatMessageTransportConfiguration, 2275407653, 6664, 19146, 160, 117, 51, 85, 18, 99, 18, 230); RT_INTERFACE!{interface IChatMessageTransportConfiguration(IChatMessageTransportConfigurationVtbl): IInspectable(IInspectableVtbl) [IID_IChatMessageTransportConfiguration] { @@ -10356,34 +10356,34 @@ RT_INTERFACE!{interface IChatMessageTransportConfiguration(IChatMessageTransport fn get_MaxRecipientCount(&self, out: *mut i32) -> HRESULT, #[cfg(not(feature="windows-media"))] fn __Dummy3(&self) -> (), #[cfg(feature="windows-media")] fn get_SupportedVideoFormat(&self, out: *mut *mut super::super::media::mediaproperties::MediaEncodingProfile) -> HRESULT, - fn get_ExtendedProperties(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT + fn get_ExtendedProperties(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT }} impl IChatMessageTransportConfiguration { - #[inline] pub unsafe fn get_max_attachment_count(&self) -> Result { + #[inline] pub fn get_max_attachment_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxAttachmentCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_message_size_in_kilobytes(&self) -> Result { + }} + #[inline] pub fn get_max_message_size_in_kilobytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxMessageSizeInKilobytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_recipient_count(&self) -> Result { + }} + #[inline] pub fn get_max_recipient_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxRecipientCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-media")] #[inline] pub unsafe fn get_supported_video_format(&self) -> Result> { + }} + #[cfg(feature="windows-media")] #[inline] pub fn get_supported_video_format(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedVideoFormat)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_properties(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_extended_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExtendedProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ChatMessageTransportConfiguration: IChatMessageTransportConfiguration} RT_ENUM! { enum ChatMessageTransportKind: i32 { @@ -10391,32 +10391,32 @@ RT_ENUM! { enum ChatMessageTransportKind: i32 { }} 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(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_PartCount(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_RemainingCharacterCountInPart(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_MaxPartCount(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_PartCount(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_RemainingCharacterCountInPart(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn get_Status(&self, out: *mut ChatMessageValidationStatus) -> HRESULT }} impl IChatMessageValidationResult { - #[inline] pub unsafe fn get_max_part_count(&self) -> Result>> { + #[inline] pub fn get_max_part_count(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxPartCount)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_part_count(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_part_count(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PartCount)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_remaining_character_count_in_part(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_remaining_character_count_in_part(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemainingCharacterCountInPart)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ChatMessageValidationResult: IChatMessageValidationResult} RT_ENUM! { enum ChatMessageValidationStatus: i32 { @@ -10428,15 +10428,15 @@ RT_INTERFACE!{interface IChatQueryOptions(IChatQueryOptionsVtbl): IInspectable(I fn put_SearchString(&self, value: HSTRING) -> HRESULT }} impl IChatQueryOptions { - #[inline] pub unsafe fn get_search_string(&self) -> Result { + #[inline] pub fn get_search_string(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SearchString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_search_string(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_search_string(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SearchString)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ChatQueryOptions: IChatQueryOptions} impl RtActivatable for ChatQueryOptions {} @@ -10445,10 +10445,10 @@ DEFINE_IID!(IID_IChatRecipientDeliveryInfo, 4291277474, 10300, 19466, 138, 14, 1 RT_INTERFACE!{interface IChatRecipientDeliveryInfo(IChatRecipientDeliveryInfoVtbl): IInspectable(IInspectableVtbl) [IID_IChatRecipientDeliveryInfo] { fn get_TransportAddress(&self, out: *mut HSTRING) -> HRESULT, fn put_TransportAddress(&self, value: HSTRING) -> HRESULT, - fn get_DeliveryTime(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_DeliveryTime(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_ReadTime(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_ReadTime(&self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_DeliveryTime(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_DeliveryTime(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_ReadTime(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_ReadTime(&self, value: *mut foundation::IReference) -> HRESULT, fn get_TransportErrorCodeCategory(&self, out: *mut ChatTransportErrorCodeCategory) -> HRESULT, fn get_TransportInterpretedErrorCode(&self, out: *mut ChatTransportInterpretedErrorCode) -> HRESULT, fn get_TransportErrorCode(&self, out: *mut i32) -> HRESULT, @@ -10456,58 +10456,58 @@ RT_INTERFACE!{interface IChatRecipientDeliveryInfo(IChatRecipientDeliveryInfoVtb fn get_Status(&self, out: *mut ChatMessageStatus) -> HRESULT }} impl IChatRecipientDeliveryInfo { - #[inline] pub unsafe fn get_transport_address(&self) -> Result { + #[inline] pub fn get_transport_address(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TransportAddress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_transport_address(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_transport_address(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TransportAddress)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_delivery_time(&self) -> Result>> { + }} + #[inline] pub fn get_delivery_time(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeliveryTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_delivery_time(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_delivery_time(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DeliveryTime)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_read_time(&self) -> Result>> { + }} + #[inline] pub fn get_read_time(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ReadTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_read_time(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_read_time(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReadTime)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_transport_error_code_category(&self) -> Result { + }} + #[inline] pub fn get_transport_error_code_category(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TransportErrorCodeCategory)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_transport_interpreted_error_code(&self) -> Result { + }} + #[inline] pub fn get_transport_interpreted_error_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TransportInterpretedErrorCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_transport_error_code(&self) -> Result { + }} + #[inline] pub fn get_transport_error_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TransportErrorCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_error_permanent(&self) -> Result { + }} + #[inline] pub fn get_is_error_permanent(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsErrorPermanent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ChatRecipientDeliveryInfo: IChatRecipientDeliveryInfo} impl RtActivatable for ChatRecipientDeliveryInfo {} @@ -10517,20 +10517,20 @@ RT_ENUM! { enum ChatRestoreHistorySpan: i32 { }} 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn ReadBatchWithCountAsync(&self, count: i32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn ReadBatchAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn ReadBatchWithCountAsync(&self, count: i32, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IChatSearchReader { - #[inline] pub unsafe fn read_batch_async(&self) -> Result>>> { + #[inline] pub fn read_batch_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadBatchAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn read_batch_with_count_async(&self, count: i32) -> Result>>> { + }} + #[inline] pub fn read_batch_with_count_async(&self, count: i32) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadBatchWithCountAsync)(self as *const _ as *mut _, count, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ChatSearchReader: IChatSearchReader} RT_ENUM! { enum ChatStoreChangedEventKind: i32 { @@ -10544,67 +10544,67 @@ RT_INTERFACE!{interface IChatSyncConfiguration(IChatSyncConfigurationVtbl): IIns fn put_RestoreHistorySpan(&self, value: ChatRestoreHistorySpan) -> HRESULT }} impl IChatSyncConfiguration { - #[inline] pub unsafe fn get_is_sync_enabled(&self) -> Result { + #[inline] pub fn get_is_sync_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSyncEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_sync_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_sync_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsSyncEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_restore_history_span(&self) -> Result { + }} + #[inline] pub fn get_restore_history_span(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RestoreHistorySpan)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_restore_history_span(&self, value: ChatRestoreHistorySpan) -> Result<()> { + }} + #[inline] pub fn set_restore_history_span(&self, value: ChatRestoreHistorySpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RestoreHistorySpan)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ChatSyncConfiguration: IChatSyncConfiguration} 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(&self, out: *mut *mut ChatSyncConfiguration) -> HRESULT, #[cfg(not(feature="windows-security"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-security")] fn AssociateAccountAsync(&self, webAccount: *mut super::super::security::credentials::WebAccount, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn UnassociateAccountAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + #[cfg(feature="windows-security")] fn AssociateAccountAsync(&self, webAccount: *mut super::super::security::credentials::WebAccount, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn UnassociateAccountAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, #[cfg(not(feature="windows-security"))] fn __Dummy3(&self) -> (), #[cfg(feature="windows-security")] fn IsAccountAssociated(&self, webAccount: *mut super::super::security::credentials::WebAccount, out: *mut bool) -> HRESULT, fn StartSync(&self) -> HRESULT, - fn SetConfigurationAsync(&self, configuration: *mut ChatSyncConfiguration, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn SetConfigurationAsync(&self, configuration: *mut ChatSyncConfiguration, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IChatSyncManager { - #[inline] pub unsafe fn get_configuration(&self) -> Result> { + #[inline] pub fn get_configuration(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Configuration)(self 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 associate_account_async(&self, webAccount: &super::super::security::credentials::WebAccount) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-security")] #[inline] pub fn associate_account_async(&self, webAccount: &super::super::security::credentials::WebAccount) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AssociateAccountAsync)(self 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 unassociate_account_async(&self) -> Result> { + }} + #[inline] pub fn unassociate_account_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UnassociateAccountAsync)(self 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 is_account_associated(&self, webAccount: &super::super::security::credentials::WebAccount) -> Result { + }} + #[cfg(feature="windows-security")] #[inline] pub fn is_account_associated(&self, webAccount: &super::super::security::credentials::WebAccount) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsAccountAssociated)(self as *const _ as *mut _, webAccount as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn start_sync(&self) -> Result<()> { + }} + #[inline] pub fn start_sync(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StartSync)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_configuration_async(&self, configuration: &ChatSyncConfiguration) -> Result> { + }} + #[inline] pub fn set_configuration_async(&self, configuration: &ChatSyncConfiguration) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetConfigurationAsync)(self as *const _ as *mut _, configuration as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ChatSyncManager: IChatSyncManager} RT_ENUM! { enum ChatTransportErrorCodeCategory: i32 { @@ -10619,46 +10619,46 @@ RT_INTERFACE!{interface IRcsEndUserMessage(IRcsEndUserMessageVtbl): IInspectable fn get_Title(&self, out: *mut HSTRING) -> HRESULT, fn get_Text(&self, out: *mut HSTRING) -> HRESULT, fn get_IsPinRequired(&self, out: *mut bool) -> HRESULT, - fn get_Actions(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn SendResponseAsync(&self, action: *mut RcsEndUserMessageAction, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn SendResponseWithPinAsync(&self, action: *mut RcsEndUserMessageAction, pin: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn get_Actions(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn SendResponseAsync(&self, action: *mut RcsEndUserMessageAction, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn SendResponseWithPinAsync(&self, action: *mut RcsEndUserMessageAction, pin: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IRcsEndUserMessage { - #[inline] pub unsafe fn get_transport_id(&self) -> Result { + #[inline] pub fn get_transport_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TransportId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_title(&self) -> Result { + }} + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_text(&self) -> Result { + }} + #[inline] pub fn get_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Text)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_pin_required(&self) -> Result { + }} + #[inline] pub fn get_is_pin_required(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPinRequired)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_actions(&self) -> Result>> { + }} + #[inline] pub fn get_actions(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Actions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn send_response_async(&self, action: &RcsEndUserMessageAction) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn send_response_async(&self, action: &RcsEndUserMessageAction) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SendResponseAsync)(self as *const _ as *mut _, 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(&self, action: &RcsEndUserMessageAction, pin: &HStringArg) -> Result> { + }} + #[inline] pub fn send_response_with_pin_async(&self, action: &RcsEndUserMessageAction, pin: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SendResponseWithPinAsync)(self as *const _ as *mut _, action as *const _ as *mut _, pin.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class RcsEndUserMessage: IRcsEndUserMessage} DEFINE_IID!(IID_IRcsEndUserMessageAction, 2453112631, 39746, 18131, 157, 94, 60, 27, 45, 174, 124, 184); @@ -10666,11 +10666,11 @@ RT_INTERFACE!{interface IRcsEndUserMessageAction(IRcsEndUserMessageActionVtbl): fn get_Label(&self, out: *mut HSTRING) -> HRESULT }} impl IRcsEndUserMessageAction { - #[inline] pub unsafe fn get_label(&self) -> Result { + #[inline] pub fn get_label(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Label)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::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); @@ -10679,16 +10679,16 @@ RT_INTERFACE!{interface IRcsEndUserMessageAvailableEventArgs(IRcsEndUserMessageA fn get_Message(&self, out: *mut *mut RcsEndUserMessage) -> HRESULT }} impl IRcsEndUserMessageAvailableEventArgs { - #[inline] pub unsafe fn get_is_message_available(&self) -> Result { + #[inline] pub fn get_is_message_available(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsMessageAvailable)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_message(&self) -> Result> { + }} + #[inline] pub fn get_message(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Message)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RcsEndUserMessageAvailableEventArgs: IRcsEndUserMessageAvailableEventArgs} DEFINE_IID!(IID_IRcsEndUserMessageAvailableTriggerDetails, 1536652333, 13599, 18066, 180, 30, 27, 3, 93, 193, 137, 134); @@ -10697,80 +10697,80 @@ RT_INTERFACE!{interface IRcsEndUserMessageAvailableTriggerDetails(IRcsEndUserMes fn get_Text(&self, out: *mut HSTRING) -> HRESULT }} impl IRcsEndUserMessageAvailableTriggerDetails { - #[inline] pub unsafe fn get_title(&self) -> Result { + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_text(&self) -> Result { + }} + #[inline] pub fn get_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Text)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class RcsEndUserMessageAvailableTriggerDetails: IRcsEndUserMessageAvailableTriggerDetails} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_MessageAvailableChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_MessageAvailableChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_MessageAvailableChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IRcsEndUserMessageManager { - #[inline] pub unsafe fn add_message_available_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_message_available_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_MessageAvailableChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_message_available_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_message_available_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_MessageAvailableChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class RcsEndUserMessageManager: IRcsEndUserMessageManager} RT_CLASS!{static class RcsManager} impl RtActivatable for RcsManager {} impl RcsManager { - #[inline] pub fn get_end_user_message_manager() -> Result> { unsafe { + #[inline] pub fn get_end_user_message_manager() -> Result>> { >::get_activation_factory().get_end_user_message_manager() - }} - #[inline] pub fn get_transports_async() -> Result>>> { unsafe { + } + #[inline] pub fn get_transports_async() -> Result>>> { >::get_activation_factory().get_transports_async() - }} - #[inline] pub fn get_transport_async(transportId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn get_transport_async(transportId: &HStringArg) -> Result>> { >::get_activation_factory().get_transport_async(transportId) - }} - #[inline] pub fn leave_conversation_async(conversation: &ChatConversation) -> Result> { unsafe { + } + #[inline] pub fn leave_conversation_async(conversation: &ChatConversation) -> Result> { >::get_activation_factory().leave_conversation_async(conversation) - }} + } } DEFINE_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]) [CLSID_RcsManager]); 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(&self, out: *mut *mut RcsEndUserMessageManager) -> HRESULT, - fn GetTransportsAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetTransportAsync(&self, transportId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn LeaveConversationAsync(&self, conversation: *mut ChatConversation, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn GetTransportsAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetTransportAsync(&self, transportId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn LeaveConversationAsync(&self, conversation: *mut ChatConversation, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IRcsManagerStatics { - #[inline] pub unsafe fn get_end_user_message_manager(&self) -> Result> { + #[inline] pub fn get_end_user_message_manager(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetEndUserMessageManager)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_transports_async(&self) -> Result>>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_transports_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetTransportsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_transport_async(&self, transportId: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_transport_async(&self, transportId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetTransportAsync)(self as *const _ as *mut _, transportId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn leave_conversation_async(&self, conversation: &ChatConversation) -> Result> { + }} + #[inline] pub fn leave_conversation_async(&self, conversation: &ChatConversation) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LeaveConversationAsync)(self as *const _ as *mut _, conversation as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum RcsServiceKind: i32 { Chat (RcsServiceKind_Chat) = 0, GroupChat (RcsServiceKind_GroupChat) = 1, FileTransfer (RcsServiceKind_FileTransfer) = 2, Capability (RcsServiceKind_Capability) = 3, @@ -10780,70 +10780,70 @@ RT_INTERFACE!{interface IRcsServiceKindSupportedChangedEventArgs(IRcsServiceKind fn get_ServiceKind(&self, out: *mut RcsServiceKind) -> HRESULT }} impl IRcsServiceKindSupportedChangedEventArgs { - #[inline] pub unsafe fn get_service_kind(&self) -> Result { + #[inline] pub fn get_service_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ServiceKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class RcsServiceKindSupportedChangedEventArgs: IRcsServiceKindSupportedChangedEventArgs} 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(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, + fn get_ExtendedProperties(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT, fn get_IsActive(&self, out: *mut bool) -> HRESULT, fn get_TransportFriendlyName(&self, out: *mut HSTRING) -> HRESULT, fn get_TransportId(&self, out: *mut HSTRING) -> HRESULT, fn get_Configuration(&self, out: *mut *mut RcsTransportConfiguration) -> HRESULT, fn IsStoreAndForwardEnabled(&self, serviceKind: RcsServiceKind, out: *mut bool) -> HRESULT, fn IsServiceKindSupported(&self, serviceKind: RcsServiceKind, out: *mut bool) -> HRESULT, - fn add_ServiceKindSupportedChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ServiceKindSupportedChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ServiceKindSupportedChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ServiceKindSupportedChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IRcsTransport { - #[inline] pub unsafe fn get_extended_properties(&self) -> Result>> { + #[inline] pub fn get_extended_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExtendedProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_active(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_active(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsActive)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_transport_friendly_name(&self) -> Result { + }} + #[inline] pub fn get_transport_friendly_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TransportFriendlyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_transport_id(&self) -> Result { + }} + #[inline] pub fn get_transport_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TransportId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_configuration(&self) -> Result> { + }} + #[inline] pub fn get_configuration(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Configuration)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn is_store_and_forward_enabled(&self, serviceKind: RcsServiceKind) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn is_store_and_forward_enabled(&self, serviceKind: RcsServiceKind) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsStoreAndForwardEnabled)(self as *const _ as *mut _, serviceKind, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_service_kind_supported(&self, serviceKind: RcsServiceKind) -> Result { + }} + #[inline] pub fn is_service_kind_supported(&self, serviceKind: RcsServiceKind) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsServiceKindSupported)(self as *const _ as *mut _, serviceKind, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_service_kind_supported_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_service_kind_supported_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ServiceKindSupportedChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_service_kind_supported_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_service_kind_supported_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ServiceKindSupportedChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class RcsTransport: IRcsTransport} DEFINE_IID!(IID_IRcsTransportConfiguration, 533508354, 9330, 19385, 153, 136, 193, 33, 28, 131, 232, 169); @@ -10856,36 +10856,36 @@ RT_INTERFACE!{interface IRcsTransportConfiguration(IRcsTransportConfigurationVtb fn get_WarningFileSizeInKilobytes(&self, out: *mut i32) -> HRESULT }} impl IRcsTransportConfiguration { - #[inline] pub unsafe fn get_max_attachment_count(&self) -> Result { + #[inline] pub fn get_max_attachment_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxAttachmentCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_message_size_in_kilobytes(&self) -> Result { + }} + #[inline] pub fn get_max_message_size_in_kilobytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxMessageSizeInKilobytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_group_message_size_in_kilobytes(&self) -> Result { + }} + #[inline] pub fn get_max_group_message_size_in_kilobytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxGroupMessageSizeInKilobytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_recipient_count(&self) -> Result { + }} + #[inline] pub fn get_max_recipient_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxRecipientCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_file_size_in_kilobytes(&self) -> Result { + }} + #[inline] pub fn get_max_file_size_in_kilobytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxFileSizeInKilobytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_warning_file_size_in_kilobytes(&self) -> Result { + }} + #[inline] pub fn get_warning_file_size_in_kilobytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_WarningFileSizeInKilobytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class RcsTransportConfiguration: IRcsTransportConfiguration} DEFINE_IID!(IID_IRemoteParticipantComposingChangedEventArgs, 515917223, 53193, 17865, 152, 118, 68, 159, 43, 193, 128, 245); @@ -10895,21 +10895,21 @@ RT_INTERFACE!{interface IRemoteParticipantComposingChangedEventArgs(IRemoteParti fn get_IsComposing(&self, out: *mut bool) -> HRESULT }} impl IRemoteParticipantComposingChangedEventArgs { - #[inline] pub unsafe fn get_transport_id(&self) -> Result { + #[inline] pub fn get_transport_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TransportId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_participant_address(&self) -> Result { + }} + #[inline] pub fn get_participant_address(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ParticipantAddress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_composing(&self) -> Result { + }} + #[inline] pub fn get_is_composing(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsComposing)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class RemoteParticipantComposingChangedEventArgs: IRemoteParticipantComposingChangedEventArgs} } // Windows.ApplicationModel.Chat @@ -10917,44 +10917,44 @@ pub mod contacts { // Windows.ApplicationModel.Contacts use ::prelude::*; 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(&self, contact: *mut Contact, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn TryLinkContactsAsync(&self, primaryContact: *mut Contact, secondaryContact: *mut Contact, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn UnlinkRawContactAsync(&self, contact: *mut Contact, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn TrySetPreferredSourceForPictureAsync(&self, aggregateContact: *mut Contact, rawContact: *mut Contact, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FindRawContactsAsync(&self, contact: *mut Contact, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn TryLinkContactsAsync(&self, primaryContact: *mut Contact, secondaryContact: *mut Contact, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn UnlinkRawContactAsync(&self, contact: *mut Contact, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn TrySetPreferredSourceForPictureAsync(&self, aggregateContact: *mut Contact, rawContact: *mut Contact, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IAggregateContactManager { - #[inline] pub unsafe fn find_raw_contacts_async(&self, contact: &Contact) -> Result>>> { + #[inline] pub fn find_raw_contacts_async(&self, contact: &Contact) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindRawContactsAsync)(self as *const _ as *mut _, contact as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_link_contacts_async(&self, primaryContact: &Contact, secondaryContact: &Contact) -> Result>> { + }} + #[inline] pub fn try_link_contacts_async(&self, primaryContact: &Contact, secondaryContact: &Contact) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryLinkContactsAsync)(self as *const _ as *mut _, 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 unlink_raw_contact_async(&self, contact: &Contact) -> Result> { + }} + #[inline] pub fn unlink_raw_contact_async(&self, contact: &Contact) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UnlinkRawContactAsync)(self as *const _ as *mut _, contact as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_set_preferred_source_for_picture_async(&self, aggregateContact: &Contact, rawContact: &Contact) -> Result>> { + }} + #[inline] pub fn try_set_preferred_source_for_picture_async(&self, aggregateContact: &Contact, rawContact: &Contact) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TrySetPreferredSourceForPictureAsync)(self as *const _ as *mut _, aggregateContact as *const _ as *mut _, rawContact as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class AggregateContactManager: IAggregateContactManager} 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(&self, contactListId: HSTRING, remoteSourceId: HSTRING, accountId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn SetRemoteIdentificationInformationAsync(&self, contactListId: HSTRING, remoteSourceId: HSTRING, accountId: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IAggregateContactManager2 { - #[inline] pub unsafe fn set_remote_identification_information_async(&self, contactListId: &HStringArg, remoteSourceId: &HStringArg, accountId: &HStringArg) -> Result> { + #[inline] pub fn set_remote_identification_information_async(&self, contactListId: &HStringArg, remoteSourceId: &HStringArg, accountId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetRemoteIdentificationInformationAsync)(self as *const _ as *mut _, contactListId.get(), remoteSourceId.get(), accountId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IContact, 3959452403, 8472, 16457, 158, 188, 23, 240, 171, 105, 43, 100); RT_INTERFACE!{interface IContact(IContactVtbl): IInspectable(IInspectableVtbl) [IID_IContact] { @@ -10964,32 +10964,32 @@ RT_INTERFACE!{interface IContact(IContactVtbl): IInspectable(IInspectableVtbl) [ #[cfg(feature="windows-storage")] fn get_Thumbnail(&self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy3(&self) -> (), #[cfg(feature="windows-storage")] fn put_Thumbnail(&self, value: *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, - fn get_Fields(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_Fields(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IContact { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Name)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_thumbnail(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_thumbnail(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Thumbnail)(self 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_thumbnail(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_thumbnail(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Thumbnail)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_fields(&self) -> Result>> { + }} + #[inline] pub fn get_fields(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Fields)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class Contact: IContact} impl RtActivatable for Contact {} @@ -11000,92 +11000,92 @@ RT_INTERFACE!{interface IContact2(IContact2Vtbl): IInspectable(IInspectableVtbl) fn put_Id(&self, value: HSTRING) -> HRESULT, fn get_Notes(&self, out: *mut HSTRING) -> HRESULT, fn put_Notes(&self, value: HSTRING) -> HRESULT, - fn get_Phones(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_Emails(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_Addresses(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_ConnectedServiceAccounts(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_ImportantDates(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_DataSuppliers(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_JobInfo(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_SignificantOthers(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_Websites(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_ProviderProperties(&self, out: *mut *mut super::super::foundation::collections::IPropertySet) -> HRESULT + fn get_Phones(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_Emails(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_Addresses(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_ConnectedServiceAccounts(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_ImportantDates(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_DataSuppliers(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_JobInfo(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_SignificantOthers(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_Websites(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_ProviderProperties(&self, out: *mut *mut foundation::collections::IPropertySet) -> HRESULT }} impl IContact2 { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Id)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_notes(&self) -> Result { + }} + #[inline] pub fn get_notes(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Notes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_notes(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_notes(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Notes)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_phones(&self) -> Result>> { + }} + #[inline] pub fn get_phones(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Phones)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_emails(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_emails(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Emails)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_addresses(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_addresses(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Addresses)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_connected_service_accounts(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_connected_service_accounts(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ConnectedServiceAccounts)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_important_dates(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_important_dates(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ImportantDates)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_data_suppliers(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_data_suppliers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DataSuppliers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_job_info(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_job_info(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_JobInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_significant_others(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_significant_others(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SignificantOthers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_websites(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_websites(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Websites)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_provider_properties(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_provider_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProviderProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut HSTRING) -> HRESULT, - fn get_DisplayPictureUserUpdateTime(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn put_DisplayPictureUserUpdateTime(&self, value: super::super::foundation::DateTime) -> HRESULT, + fn get_DisplayPictureUserUpdateTime(&self, out: *mut foundation::DateTime) -> HRESULT, + fn put_DisplayPictureUserUpdateTime(&self, value: foundation::DateTime) -> HRESULT, fn get_IsMe(&self, out: *mut bool) -> HRESULT, fn get_AggregateId(&self, out: *mut HSTRING) -> HRESULT, fn get_RemoteId(&self, out: *mut HSTRING) -> HRESULT, @@ -11112,114 +11112,114 @@ RT_INTERFACE!{interface IContact3(IContact3Vtbl): IInspectable(IInspectableVtbl) fn get_SortName(&self, out: *mut HSTRING) -> HRESULT }} impl IContact3 { - #[inline] pub unsafe fn get_contact_list_id(&self) -> Result { + #[inline] pub fn get_contact_list_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContactListId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_picture_user_update_time(&self) -> Result { + }} + #[inline] pub fn get_display_picture_user_update_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DisplayPictureUserUpdateTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_picture_user_update_time(&self, value: super::super::foundation::DateTime) -> Result<()> { + }} + #[inline] pub fn set_display_picture_user_update_time(&self, value: foundation::DateTime) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayPictureUserUpdateTime)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_me(&self) -> Result { + }} + #[inline] pub fn get_is_me(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsMe)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_aggregate_id(&self) -> Result { + }} + #[inline] pub fn get_aggregate_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AggregateId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_id(&self) -> Result { + }} + #[inline] pub fn get_remote_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_remote_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_remote_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RemoteId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_ring_tone_token(&self) -> Result { + }} + #[inline] pub fn get_ring_tone_token(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RingToneToken)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_ring_tone_token(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_ring_tone_token(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RingToneToken)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_display_picture_manually_set(&self) -> Result { + }} + #[inline] pub fn get_is_display_picture_manually_set(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDisplayPictureManuallySet)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_large_display_picture(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_large_display_picture(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LargeDisplayPicture)(self 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_small_display_picture(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_small_display_picture(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SmallDisplayPicture)(self 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_source_display_picture(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_source_display_picture(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SourceDisplayPicture)(self 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_source_display_picture(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_source_display_picture(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SourceDisplayPicture)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_text_tone_token(&self) -> Result { + }} + #[inline] pub fn get_text_tone_token(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TextToneToken)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_text_tone_token(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_text_tone_token(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TextToneToken)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_aggregate(&self) -> Result { + }} + #[inline] pub fn get_is_aggregate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsAggregate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_full_name(&self) -> Result { + }} + #[inline] pub fn get_full_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FullName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name_override(&self) -> Result { + }} + #[inline] pub fn get_display_name_override(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayNameOverride)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_name_override(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_display_name_override(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayNameOverride)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_nickname(&self) -> Result { + }} + #[inline] pub fn get_nickname(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Nickname)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_nickname(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_nickname(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Nickname)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_sort_name(&self) -> Result { + }} + #[inline] pub fn get_sort_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SortName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IContactAddress, 2537149338, 17102, 18546, 141, 112, 48, 99, 170, 88, 75, 112); RT_INTERFACE!{interface IContactAddress(IContactAddressVtbl): IInspectable(IInspectableVtbl) [IID_IContactAddress] { @@ -11239,69 +11239,69 @@ RT_INTERFACE!{interface IContactAddress(IContactAddressVtbl): IInspectable(IInsp fn put_Description(&self, value: HSTRING) -> HRESULT }} impl IContactAddress { - #[inline] pub unsafe fn get_street_address(&self) -> Result { + #[inline] pub fn get_street_address(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StreetAddress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_street_address(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_street_address(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StreetAddress)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_locality(&self) -> Result { + }} + #[inline] pub fn get_locality(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Locality)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_locality(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_locality(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Locality)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_region(&self) -> Result { + }} + #[inline] pub fn get_region(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Region)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_region(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_region(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Region)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_country(&self) -> Result { + }} + #[inline] pub fn get_country(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Country)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_country(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_country(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Country)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_postal_code(&self) -> Result { + }} + #[inline] pub fn get_postal_code(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PostalCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_postal_code(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_postal_code(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PostalCode)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_kind(&self) -> Result { + }} + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_kind(&self, value: ContactAddressKind) -> Result<()> { + }} + #[inline] pub fn set_kind(&self, value: ContactAddressKind) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Kind)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_description(&self) -> Result { + }} + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_description(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_description(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Description)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ContactAddress: IContactAddress} impl RtActivatable for ContactAddress {} @@ -11320,56 +11320,56 @@ RT_INTERFACE!{interface IContactAnnotation(IContactAnnotationVtbl): IInspectable fn get_SupportedOperations(&self, out: *mut ContactAnnotationOperations) -> HRESULT, fn put_SupportedOperations(&self, value: ContactAnnotationOperations) -> HRESULT, fn get_IsDisabled(&self, out: *mut bool) -> HRESULT, - fn get_ProviderProperties(&self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT + fn get_ProviderProperties(&self, out: *mut *mut foundation::collections::ValueSet) -> HRESULT }} impl IContactAnnotation { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_annotation_list_id(&self) -> Result { + }} + #[inline] pub fn get_annotation_list_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AnnotationListId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_contact_id(&self) -> Result { + }} + #[inline] pub fn get_contact_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContactId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_contact_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_contact_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ContactId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_id(&self) -> Result { + }} + #[inline] pub fn get_remote_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_remote_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_remote_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RemoteId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_operations(&self) -> Result { + }} + #[inline] pub fn get_supported_operations(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SupportedOperations)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_supported_operations(&self, value: ContactAnnotationOperations) -> Result<()> { + }} + #[inline] pub fn set_supported_operations(&self, value: ContactAnnotationOperations) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SupportedOperations)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_disabled(&self) -> Result { + }} + #[inline] pub fn get_is_disabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDisabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_provider_properties(&self) -> Result> { + }} + #[inline] pub fn get_provider_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProviderProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ContactAnnotation: IContactAnnotation} impl RtActivatable for ContactAnnotation {} @@ -11380,74 +11380,74 @@ RT_INTERFACE!{interface IContactAnnotation2(IContactAnnotation2Vtbl): IInspectab fn put_ContactListId(&self, value: HSTRING) -> HRESULT }} impl IContactAnnotation2 { - #[inline] pub unsafe fn get_contact_list_id(&self) -> Result { + #[inline] pub fn get_contact_list_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContactListId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_contact_list_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_contact_list_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ContactListId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut HSTRING) -> HRESULT, fn get_ProviderPackageFamilyName(&self, out: *mut HSTRING) -> HRESULT, fn get_UserDataAccountId(&self, out: *mut HSTRING) -> HRESULT, - fn DeleteAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn TrySaveAnnotationAsync(&self, annotation: *mut ContactAnnotation, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetAnnotationAsync(&self, annotationId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FindAnnotationsByRemoteIdAsync(&self, remoteId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn FindAnnotationsAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn DeleteAnnotationAsync(&self, annotation: *mut ContactAnnotation, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn DeleteAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn TrySaveAnnotationAsync(&self, annotation: *mut ContactAnnotation, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetAnnotationAsync(&self, annotationId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn FindAnnotationsByRemoteIdAsync(&self, remoteId: HSTRING, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn FindAnnotationsAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn DeleteAnnotationAsync(&self, annotation: *mut ContactAnnotation, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IContactAnnotationList { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_provider_package_family_name(&self) -> Result { + }} + #[inline] pub fn get_provider_package_family_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProviderPackageFamilyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_user_data_account_id(&self) -> Result { + }} + #[inline] pub fn get_user_data_account_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UserDataAccountId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete_async(&self) -> Result> { + }} + #[inline] pub fn delete_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_save_annotation_async(&self, annotation: &ContactAnnotation) -> Result>> { + }} + #[inline] pub fn try_save_annotation_async(&self, annotation: &ContactAnnotation) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TrySaveAnnotationAsync)(self as *const _ as *mut _, annotation as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_annotation_async(&self, annotationId: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_annotation_async(&self, annotationId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAnnotationAsync)(self as *const _ as *mut _, annotationId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_annotations_by_remote_id_async(&self, remoteId: &HStringArg) -> Result>>> { + }} + #[inline] pub fn find_annotations_by_remote_id_async(&self, remoteId: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAnnotationsByRemoteIdAsync)(self as *const _ as *mut _, remoteId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_annotations_async(&self) -> Result>>> { + }} + #[inline] pub fn find_annotations_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAnnotationsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete_annotation_async(&self, annotation: &ContactAnnotation) -> Result> { + }} + #[inline] pub fn delete_annotation_async(&self, annotation: &ContactAnnotation) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteAnnotationAsync)(self as *const _ as *mut _, annotation as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ContactAnnotationList: IContactAnnotationList} RT_ENUM! { enum ContactAnnotationOperations: u32 { @@ -11455,88 +11455,88 @@ RT_ENUM! { enum ContactAnnotationOperations: u32 { }} 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(&self, emailAddress: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn FindContactIdsByPhoneNumberAsync(&self, phoneNumber: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn FindAnnotationsForContactAsync(&self, contact: *mut Contact, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn DisableAnnotationAsync(&self, annotation: *mut ContactAnnotation, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn CreateAnnotationListAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CreateAnnotationListInAccountAsync(&self, userDataAccountId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetAnnotationListAsync(&self, annotationListId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FindAnnotationListsAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn FindContactIdsByEmailAsync(&self, emailAddress: HSTRING, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn FindContactIdsByPhoneNumberAsync(&self, phoneNumber: HSTRING, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn FindAnnotationsForContactAsync(&self, contact: *mut Contact, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn DisableAnnotationAsync(&self, annotation: *mut ContactAnnotation, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn CreateAnnotationListAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreateAnnotationListInAccountAsync(&self, userDataAccountId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetAnnotationListAsync(&self, annotationListId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn FindAnnotationListsAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IContactAnnotationStore { - #[inline] pub unsafe fn find_contact_ids_by_email_async(&self, emailAddress: &HStringArg) -> Result>>> { + #[inline] pub fn find_contact_ids_by_email_async(&self, emailAddress: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindContactIdsByEmailAsync)(self as *const _ as *mut _, emailAddress.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_contact_ids_by_phone_number_async(&self, phoneNumber: &HStringArg) -> Result>>> { + }} + #[inline] pub fn find_contact_ids_by_phone_number_async(&self, phoneNumber: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindContactIdsByPhoneNumberAsync)(self as *const _ as *mut _, phoneNumber.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_annotations_for_contact_async(&self, contact: &Contact) -> Result>>> { + }} + #[inline] pub fn find_annotations_for_contact_async(&self, contact: &Contact) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAnnotationsForContactAsync)(self as *const _ as *mut _, contact as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn disable_annotation_async(&self, annotation: &ContactAnnotation) -> Result> { + }} + #[inline] pub fn disable_annotation_async(&self, annotation: &ContactAnnotation) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DisableAnnotationAsync)(self as *const _ as *mut _, annotation as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_annotation_list_async(&self) -> Result>> { + }} + #[inline] pub fn create_annotation_list_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAnnotationListAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_annotation_list_in_account_async(&self, userDataAccountId: &HStringArg) -> Result>> { + }} + #[inline] pub fn create_annotation_list_in_account_async(&self, userDataAccountId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAnnotationListInAccountAsync)(self as *const _ as *mut _, userDataAccountId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_annotation_list_async(&self, annotationListId: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_annotation_list_async(&self, annotationListId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAnnotationListAsync)(self as *const _ as *mut _, annotationListId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_annotation_lists_async(&self) -> Result>>> { + }} + #[inline] pub fn find_annotation_lists_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAnnotationListsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ContactAnnotationStore: IContactAnnotationStore} DEFINE_IID!(IID_IContactAnnotationStore2, 2128487421, 25063, 18791, 142, 197, 189, 242, 128, 162, 64, 99); RT_INTERFACE!{interface IContactAnnotationStore2(IContactAnnotationStore2Vtbl): IInspectable(IInspectableVtbl) [IID_IContactAnnotationStore2] { - fn FindAnnotationsForContactListAsync(&self, contactListId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn FindAnnotationsForContactListAsync(&self, contactListId: HSTRING, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IContactAnnotationStore2 { - #[inline] pub unsafe fn find_annotations_for_contact_list_async(&self, contactListId: &HStringArg) -> Result>>> { + #[inline] pub fn find_annotations_for_contact_list_async(&self, contactListId: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAnnotationsForContactListAsync)(self as *const _ as *mut _, contactListId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum ContactAnnotationStoreAccessType: i32 { AppAnnotationsReadWrite (ContactAnnotationStoreAccessType_AppAnnotationsReadWrite) = 0, AllAnnotationsReadWrite (ContactAnnotationStoreAccessType_AllAnnotationsReadWrite) = 1, }} 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Contacts(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_Status(&self, out: *mut ContactBatchStatus) -> HRESULT }} impl IContactBatch { - #[inline] pub unsafe fn get_contacts(&self) -> Result>> { + #[inline] pub fn get_contacts(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Contacts)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ContactBatch: IContactBatch} RT_ENUM! { enum ContactBatchStatus: i32 { @@ -11547,10 +11547,10 @@ RT_INTERFACE!{interface IContactCardDelayedDataLoader(IContactCardDelayedDataLoa fn SetData(&self, contact: *mut Contact) -> HRESULT }} impl IContactCardDelayedDataLoader { - #[inline] pub unsafe fn set_data(&self, contact: &Contact) -> Result<()> { + #[inline] pub fn set_data(&self, contact: &Contact) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetData)(self as *const _ as *mut _, contact as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ContactCardDelayedDataLoader: IContactCardDelayedDataLoader} RT_ENUM! { enum ContactCardHeaderKind: i32 { @@ -11564,38 +11564,38 @@ RT_INTERFACE!{interface IContactCardOptions(IContactCardOptionsVtbl): IInspectab fn put_InitialTabKind(&self, value: ContactCardTabKind) -> HRESULT }} impl IContactCardOptions { - #[inline] pub unsafe fn get_header_kind(&self) -> Result { + #[inline] pub fn get_header_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HeaderKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_header_kind(&self, value: ContactCardHeaderKind) -> Result<()> { + }} + #[inline] pub fn set_header_kind(&self, value: ContactCardHeaderKind) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_HeaderKind)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_initial_tab_kind(&self) -> Result { + }} + #[inline] pub fn get_initial_tab_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InitialTabKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_initial_tab_kind(&self, value: ContactCardTabKind) -> Result<()> { + }} + #[inline] pub fn set_initial_tab_kind(&self, value: ContactCardTabKind) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InitialTabKind)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ContactCardOptions: IContactCardOptions} impl RtActivatable for ContactCardOptions {} DEFINE_CLSID!(ContactCardOptions(&[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,67,97,114,100,79,112,116,105,111,110,115,0]) [CLSID_ContactCardOptions]); 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_ServerSearchContactListIds(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IContactCardOptions2 { - #[inline] pub unsafe fn get_server_search_contact_list_ids(&self) -> Result>> { + #[inline] pub fn get_server_search_contact_list_ids(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServerSearchContactListIds)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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, @@ -11606,16 +11606,16 @@ RT_INTERFACE!{interface IContactChange(IContactChangeVtbl): IInspectable(IInspec fn get_Contact(&self, out: *mut *mut Contact) -> HRESULT }} impl IContactChange { - #[inline] pub unsafe fn get_change_type(&self) -> Result { + #[inline] pub fn get_change_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ChangeType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_contact(&self) -> Result> { + }} + #[inline] pub fn get_contact(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Contact)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ContactChange: IContactChange} DEFINE_IID!(IID_IContactChangedDeferral, 3306437352, 6915, 18168, 182, 148, 165, 35, 232, 60, 252, 182); @@ -11623,10 +11623,10 @@ RT_INTERFACE!{interface IContactChangedDeferral(IContactChangedDeferralVtbl): II fn Complete(&self) -> HRESULT }} impl IContactChangedDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ContactChangedDeferral: IContactChangedDeferral} DEFINE_IID!(IID_IContactChangedEventArgs, 1381924817, 29683, 19325, 169, 24, 88, 11, 228, 54, 97, 33); @@ -11634,33 +11634,33 @@ RT_INTERFACE!{interface IContactChangedEventArgs(IContactChangedEventArgsVtbl): fn GetDeferral(&self, out: *mut *mut ContactChangedDeferral) -> HRESULT }} impl IContactChangedEventArgs { - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ContactChangedEventArgs: IContactChangedEventArgs} 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(&self) -> HRESULT, fn AcceptChangesThrough(&self, lastChangeToAccept: *mut ContactChange) -> HRESULT, - fn ReadBatchAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn ReadBatchAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IContactChangeReader { - #[inline] pub unsafe fn accept_changes(&self) -> Result<()> { + #[inline] pub fn accept_changes(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AcceptChanges)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn accept_changes_through(&self, lastChangeToAccept: &ContactChange) -> Result<()> { + }} + #[inline] pub fn accept_changes_through(&self, lastChangeToAccept: &ContactChange) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AcceptChangesThrough)(self as *const _ as *mut _, lastChangeToAccept as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn read_batch_async(&self) -> Result>>> { + }} + #[inline] pub fn read_batch_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadBatchAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ContactChangeReader: IContactChangeReader} DEFINE_IID!(IID_IContactChangeTracker, 1855531346, 12443, 16461, 151, 18, 179, 123, 211, 2, 120, 170); @@ -11670,19 +11670,19 @@ RT_INTERFACE!{interface IContactChangeTracker(IContactChangeTrackerVtbl): IInspe fn Reset(&self) -> HRESULT }} impl IContactChangeTracker { - #[inline] pub unsafe fn enable(&self) -> Result<()> { + #[inline] pub fn enable(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Enable)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_change_reader(&self) -> Result> { + }} + #[inline] pub fn get_change_reader(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetChangeReader)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn reset(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn reset(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Reset)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ContactChangeTracker: IContactChangeTracker} DEFINE_IID!(IID_IContactChangeTracker2, 2139803900, 37665, 19736, 156, 9, 215, 8, 198, 63, 205, 49); @@ -11690,11 +11690,11 @@ RT_INTERFACE!{interface IContactChangeTracker2(IContactChangeTracker2Vtbl): IIns fn get_IsTracking(&self, out: *mut bool) -> HRESULT }} impl IContactChangeTracker2 { - #[inline] pub unsafe fn get_is_tracking(&self) -> Result { + #[inline] pub fn get_is_tracking(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsTracking)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum ContactChangeType: i32 { Created (ContactChangeType_Created) = 0, Modified (ContactChangeType_Modified) = 1, Deleted (ContactChangeType_Deleted) = 2, ChangeTrackingLost (ContactChangeType_ChangeTrackingLost) = 3, @@ -11707,87 +11707,87 @@ RT_INTERFACE!{interface IContactConnectedServiceAccount(IContactConnectedService fn put_ServiceName(&self, value: HSTRING) -> HRESULT }} impl IContactConnectedServiceAccount { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Id)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_name(&self) -> Result { + }} + #[inline] pub fn get_service_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServiceName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_service_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_service_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ServiceName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ContactConnectedServiceAccount: IContactConnectedServiceAccount} impl RtActivatable for ContactConnectedServiceAccount {} DEFINE_CLSID!(ContactConnectedServiceAccount(&[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,67,111,110,110,101,99,116,101,100,83,101,114,118,105,99,101,65,99,99,111,117,110,116,0]) [CLSID_ContactConnectedServiceAccount]); 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(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_Day(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_Month(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_Month(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_Year(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_Year(&self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_Day(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_Day(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_Month(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_Month(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_Year(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_Year(&self, value: *mut foundation::IReference) -> HRESULT, fn get_Kind(&self, out: *mut ContactDateKind) -> HRESULT, fn put_Kind(&self, value: ContactDateKind) -> HRESULT, fn get_Description(&self, out: *mut HSTRING) -> HRESULT, fn put_Description(&self, value: HSTRING) -> HRESULT }} impl IContactDate { - #[inline] pub unsafe fn get_day(&self) -> Result>> { + #[inline] pub fn get_day(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Day)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_day(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_day(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Day)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_month(&self) -> Result>> { + }} + #[inline] pub fn get_month(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Month)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_month(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_month(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Month)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_year(&self) -> Result>> { + }} + #[inline] pub fn get_year(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Year)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_year(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_year(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Year)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_kind(&self) -> Result { + }} + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_kind(&self, value: ContactDateKind) -> Result<()> { + }} + #[inline] pub fn set_kind(&self, value: ContactDateKind) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Kind)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_description(&self) -> Result { + }} + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_description(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_description(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Description)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ContactDate: IContactDate} impl RtActivatable for ContactDate {} @@ -11805,33 +11805,33 @@ RT_INTERFACE!{interface IContactEmail(IContactEmailVtbl): IInspectable(IInspecta fn put_Description(&self, value: HSTRING) -> HRESULT }} impl IContactEmail { - #[inline] pub unsafe fn get_address(&self) -> Result { + #[inline] pub fn get_address(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Address)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_address(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_address(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Address)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_kind(&self) -> Result { + }} + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_kind(&self, value: ContactEmailKind) -> Result<()> { + }} + #[inline] pub fn set_kind(&self, value: ContactEmailKind) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Kind)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_description(&self) -> Result { + }} + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_description(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_description(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Description)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ContactEmail: IContactEmail} impl RtActivatable for ContactEmail {} @@ -11847,39 +11847,39 @@ RT_INTERFACE!{interface IContactField(IContactFieldVtbl): IInspectable(IInspecta fn get_Value(&self, out: *mut HSTRING) -> HRESULT }} impl IContactField { - #[inline] pub unsafe fn get_type(&self) -> Result { + #[inline] pub fn get_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Type)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_category(&self) -> Result { + }} + #[inline] pub fn get_category(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Category)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_name(&self) -> Result { + }} + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result { + }} + #[inline] pub fn get_value(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ContactField: IContactField} impl RtActivatable for ContactField {} impl ContactField { - #[inline] pub fn create_field_default(value: &HStringArg, type_: ContactFieldType) -> Result> { unsafe { + #[inline] pub fn create_field_default(value: &HStringArg, type_: ContactFieldType) -> Result> { >::get_activation_factory().create_field_default(value, type_) - }} - #[inline] pub fn create_field_category(value: &HStringArg, type_: ContactFieldType, category: ContactFieldCategory) -> Result> { unsafe { + } + #[inline] pub fn create_field_category(value: &HStringArg, type_: ContactFieldType, category: ContactFieldCategory) -> Result> { >::get_activation_factory().create_field_category(value, type_, category) - }} - #[inline] pub fn create_field_custom(name: &HStringArg, value: &HStringArg, type_: ContactFieldType, category: ContactFieldCategory) -> Result> { unsafe { + } + #[inline] pub fn create_field_custom(name: &HStringArg, value: &HStringArg, type_: ContactFieldType, category: ContactFieldCategory) -> Result> { >::get_activation_factory().create_field_custom(name, value, type_, category) - }} + } } DEFINE_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]) [CLSID_ContactField]); RT_ENUM! { enum ContactFieldCategory: i32 { @@ -11892,21 +11892,21 @@ RT_INTERFACE!{static interface IContactFieldFactory(IContactFieldFactoryVtbl): I fn CreateField_Custom(&self, name: HSTRING, value: HSTRING, type_: ContactFieldType, category: ContactFieldCategory, out: *mut *mut ContactField) -> HRESULT }} impl IContactFieldFactory { - #[inline] pub unsafe fn create_field_default(&self, value: &HStringArg, type_: ContactFieldType) -> Result> { + #[inline] pub fn create_field_default(&self, value: &HStringArg, type_: ContactFieldType) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateField_Default)(self as *const _ as *mut _, value.get(), type_, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_field_category(&self, value: &HStringArg, type_: ContactFieldType, category: ContactFieldCategory) -> Result> { + }} + #[inline] pub fn create_field_category(&self, value: &HStringArg, type_: ContactFieldType, category: ContactFieldCategory) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateField_Category)(self as *const _ as *mut _, value.get(), type_, category, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_field_custom(&self, name: &HStringArg, value: &HStringArg, type_: ContactFieldType, category: ContactFieldCategory) -> Result> { + }} + #[inline] pub fn create_field_custom(&self, name: &HStringArg, value: &HStringArg, type_: ContactFieldType, category: ContactFieldCategory) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateField_Custom)(self as *const _ as *mut _, name.get(), value.get(), type_, category, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ContactFieldFactory: IContactFieldFactory} impl RtActivatable for ContactFieldFactory {} @@ -11923,55 +11923,55 @@ DEFINE_IID!(IID_IContactInformation, 660518612, 27182, 17016, 169, 20, 228, 96, RT_INTERFACE!{interface IContactInformation(IContactInformationVtbl): IInspectable(IInspectableVtbl) [IID_IContactInformation] { fn get_Name(&self, out: *mut HSTRING) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-storage")] fn GetThumbnailAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn get_Emails(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_PhoneNumbers(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_Locations(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_InstantMessages(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_CustomFields(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn QueryCustomFields(&self, customName: HSTRING, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + #[cfg(feature="windows-storage")] fn GetThumbnailAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn get_Emails(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_PhoneNumbers(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_Locations(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_InstantMessages(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_CustomFields(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn QueryCustomFields(&self, customName: HSTRING, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IContactInformation { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self 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 get_thumbnail_async(&self) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_thumbnail_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetThumbnailAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_emails(&self) -> Result>> { + }} + #[inline] pub fn get_emails(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Emails)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_phone_numbers(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_phone_numbers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PhoneNumbers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_locations(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_locations(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Locations)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_instant_messages(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_instant_messages(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InstantMessages)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_custom_fields(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_custom_fields(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CustomFields)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn query_custom_fields(&self, customName: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn query_custom_fields(&self, customName: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).QueryCustomFields)(self as *const _ as *mut _, customName.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ContactInformation: IContactInformation} DEFINE_IID!(IID_IContactInstantMessageField, 3437443895, 3461, 16890, 180, 61, 218, 89, 156, 62, 176, 9); @@ -11979,66 +11979,66 @@ RT_INTERFACE!{interface IContactInstantMessageField(IContactInstantMessageFieldV fn get_UserName(&self, out: *mut HSTRING) -> HRESULT, fn get_Service(&self, out: *mut HSTRING) -> HRESULT, fn get_DisplayText(&self, out: *mut HSTRING) -> HRESULT, - fn get_LaunchUri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT + fn get_LaunchUri(&self, out: *mut *mut foundation::Uri) -> HRESULT }} impl IContactInstantMessageField { - #[inline] pub unsafe fn get_user_name(&self) -> Result { + #[inline] pub fn get_user_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UserName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_service(&self) -> Result { + }} + #[inline] pub fn get_service(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Service)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_text(&self) -> Result { + }} + #[inline] pub fn get_display_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_launch_uri(&self) -> Result> { + }} + #[inline] pub fn get_launch_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LaunchUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ContactInstantMessageField: IContactInstantMessageField} impl RtActivatable for ContactInstantMessageField {} impl ContactInstantMessageField { - #[inline] pub fn create_instant_message_default(userName: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_instant_message_default(userName: &HStringArg) -> Result> { >::get_activation_factory().create_instant_message_default(userName) - }} - #[inline] pub fn create_instant_message_category(userName: &HStringArg, category: ContactFieldCategory) -> Result> { unsafe { + } + #[inline] pub fn create_instant_message_category(userName: &HStringArg, category: ContactFieldCategory) -> Result> { >::get_activation_factory().create_instant_message_category(userName, category) - }} - #[inline] pub fn create_instant_message_all(userName: &HStringArg, category: ContactFieldCategory, service: &HStringArg, displayText: &HStringArg, verb: &super::super::foundation::Uri) -> Result> { unsafe { + } + #[inline] pub fn create_instant_message_all(userName: &HStringArg, category: ContactFieldCategory, service: &HStringArg, displayText: &HStringArg, verb: &foundation::Uri) -> Result> { >::get_activation_factory().create_instant_message_all(userName, category, service, displayText, verb) - }} + } } DEFINE_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]) [CLSID_ContactInstantMessageField]); 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(&self, userName: HSTRING, out: *mut *mut ContactInstantMessageField) -> HRESULT, fn CreateInstantMessage_Category(&self, userName: HSTRING, category: ContactFieldCategory, out: *mut *mut ContactInstantMessageField) -> HRESULT, - fn CreateInstantMessage_All(&self, userName: HSTRING, category: ContactFieldCategory, service: HSTRING, displayText: HSTRING, verb: *mut super::super::foundation::Uri, out: *mut *mut ContactInstantMessageField) -> HRESULT + fn CreateInstantMessage_All(&self, userName: HSTRING, category: ContactFieldCategory, service: HSTRING, displayText: HSTRING, verb: *mut foundation::Uri, out: *mut *mut ContactInstantMessageField) -> HRESULT }} impl IContactInstantMessageFieldFactory { - #[inline] pub unsafe fn create_instant_message_default(&self, userName: &HStringArg) -> Result> { + #[inline] pub fn create_instant_message_default(&self, userName: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstantMessage_Default)(self as *const _ as *mut _, userName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_instant_message_category(&self, userName: &HStringArg, category: ContactFieldCategory) -> Result> { + }} + #[inline] pub fn create_instant_message_category(&self, userName: &HStringArg, category: ContactFieldCategory) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstantMessage_Category)(self as *const _ as *mut _, userName.get(), category, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_instant_message_all(&self, userName: &HStringArg, category: ContactFieldCategory, service: &HStringArg, displayText: &HStringArg, verb: &super::super::foundation::Uri) -> Result> { + }} + #[inline] pub fn create_instant_message_all(&self, userName: &HStringArg, category: ContactFieldCategory, service: &HStringArg, displayText: &HStringArg, verb: &foundation::Uri) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstantMessage_All)(self as *const _ as *mut _, 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) } - } + }} } DEFINE_IID!(IID_IContactJobInfo, 1829862220, 52816, 19267, 158, 105, 177, 130, 88, 234, 83, 21); RT_INTERFACE!{interface IContactJobInfo(IContactJobInfoVtbl): IInspectable(IInspectableVtbl) [IID_IContactJobInfo] { @@ -12060,78 +12060,78 @@ RT_INTERFACE!{interface IContactJobInfo(IContactJobInfoVtbl): IInspectable(IInsp fn put_Description(&self, value: HSTRING) -> HRESULT }} impl IContactJobInfo { - #[inline] pub unsafe fn get_company_name(&self) -> Result { + #[inline] pub fn get_company_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CompanyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_company_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_company_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CompanyName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_company_yomi_name(&self) -> Result { + }} + #[inline] pub fn get_company_yomi_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CompanyYomiName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_company_yomi_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_company_yomi_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CompanyYomiName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_department(&self) -> Result { + }} + #[inline] pub fn get_department(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Department)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_department(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_department(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Department)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_title(&self) -> Result { + }} + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_title(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_title(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Title)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_manager(&self) -> Result { + }} + #[inline] pub fn get_manager(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Manager)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_manager(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_manager(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Manager)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_office(&self) -> Result { + }} + #[inline] pub fn get_office(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Office)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_office(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_office(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Office)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_company_address(&self) -> Result { + }} + #[inline] pub fn get_company_address(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CompanyAddress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_company_address(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_company_address(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CompanyAddress)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_description(&self) -> Result { + }} + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_description(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_description(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Description)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ContactJobInfo: IContactJobInfo} impl RtActivatable for ContactJobInfo {} @@ -12139,21 +12139,21 @@ DEFINE_CLSID!(ContactJobInfo(&[87,105,110,100,111,119,115,46,65,112,112,108,105, RT_CLASS!{static class ContactLaunchActionVerbs} impl RtActivatable for ContactLaunchActionVerbs {} impl ContactLaunchActionVerbs { - #[inline] pub fn get_call() -> Result { unsafe { + #[inline] pub fn get_call() -> Result { >::get_activation_factory().get_call() - }} - #[inline] pub fn get_message() -> Result { unsafe { + } + #[inline] pub fn get_message() -> Result { >::get_activation_factory().get_message() - }} - #[inline] pub fn get_map() -> Result { unsafe { + } + #[inline] pub fn get_map() -> Result { >::get_activation_factory().get_map() - }} - #[inline] pub fn get_post() -> Result { unsafe { + } + #[inline] pub fn get_post() -> Result { >::get_activation_factory().get_post() - }} - #[inline] pub fn get_video_call() -> Result { unsafe { + } + #[inline] pub fn get_video_call() -> Result { >::get_activation_factory().get_video_call() - }} + } } DEFINE_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]) [CLSID_ContactLaunchActionVerbs]); DEFINE_IID!(IID_IContactLaunchActionVerbsStatics, 4212273878, 61043, 18151, 135, 97, 17, 205, 1, 87, 114, 143); @@ -12165,31 +12165,31 @@ RT_INTERFACE!{static interface IContactLaunchActionVerbsStatics(IContactLaunchAc fn get_VideoCall(&self, out: *mut HSTRING) -> HRESULT }} impl IContactLaunchActionVerbsStatics { - #[inline] pub unsafe fn get_call(&self) -> Result { + #[inline] pub fn get_call(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Call)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_message(&self) -> Result { + }} + #[inline] pub fn get_message(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Message)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_map(&self) -> Result { + }} + #[inline] pub fn get_map(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Map)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_post(&self) -> Result { + }} + #[inline] pub fn get_post(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Post)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_call(&self) -> Result { + }} + #[inline] pub fn get_video_call(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoCall)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IContactList, 383642741, 14636, 18501, 157, 251, 81, 163, 231, 239, 62, 66); RT_INTERFACE!{interface IContactList(IContactListVtbl): IInspectable(IInspectableVtbl) [IID_IContactList] { @@ -12207,162 +12207,162 @@ RT_INTERFACE!{interface IContactList(IContactListVtbl): IInspectable(IInspectabl fn get_SyncManager(&self, out: *mut *mut ContactListSyncManager) -> HRESULT, fn get_SupportsServerSearch(&self, out: *mut bool) -> HRESULT, fn get_UserDataAccountId(&self, out: *mut HSTRING) -> HRESULT, - fn add_ContactChanged(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ContactChanged(&self, value: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn SaveAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn DeleteAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn GetContactFromRemoteIdAsync(&self, remoteId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetMeContactAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_ContactChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ContactChanged(&self, value: foundation::EventRegistrationToken) -> HRESULT, + fn SaveAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn DeleteAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn GetContactFromRemoteIdAsync(&self, remoteId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetMeContactAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetContactReader(&self, out: *mut *mut ContactReader) -> HRESULT, fn GetContactReaderWithOptions(&self, options: *mut ContactQueryOptions, out: *mut *mut ContactReader) -> HRESULT, - fn SaveContactAsync(&self, contact: *mut Contact, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn DeleteContactAsync(&self, contact: *mut Contact, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn GetContactAsync(&self, contactId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn SaveContactAsync(&self, contact: *mut Contact, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn DeleteContactAsync(&self, contact: *mut Contact, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn GetContactAsync(&self, contactId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IContactList { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_display_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_source_display_name(&self) -> Result { + }} + #[inline] pub fn get_source_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SourceDisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_hidden(&self) -> Result { + }} + #[inline] pub fn get_is_hidden(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsHidden)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_hidden(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_hidden(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsHidden)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_other_app_read_access(&self) -> Result { + }} + #[inline] pub fn get_other_app_read_access(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OtherAppReadAccess)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_other_app_read_access(&self, value: ContactListOtherAppReadAccess) -> Result<()> { + }} + #[inline] pub fn set_other_app_read_access(&self, value: ContactListOtherAppReadAccess) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OtherAppReadAccess)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_other_app_write_access(&self) -> Result { + }} + #[inline] pub fn get_other_app_write_access(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OtherAppWriteAccess)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_other_app_write_access(&self, value: ContactListOtherAppWriteAccess) -> Result<()> { + }} + #[inline] pub fn set_other_app_write_access(&self, value: ContactListOtherAppWriteAccess) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OtherAppWriteAccess)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_change_tracker(&self) -> Result> { + }} + #[inline] pub fn get_change_tracker(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ChangeTracker)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sync_manager(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_sync_manager(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SyncManager)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supports_server_search(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_supports_server_search(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SupportsServerSearch)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_user_data_account_id(&self) -> Result { + }} + #[inline] pub fn get_user_data_account_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UserDataAccountId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_contact_changed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_contact_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ContactChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_contact_changed(&self, value: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_contact_changed(&self, value: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ContactChanged)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn save_async(&self) -> Result> { + }} + #[inline] pub fn save_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete_async(&self) -> Result> { + }} + #[inline] pub fn delete_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_contact_from_remote_id_async(&self, remoteId: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_contact_from_remote_id_async(&self, remoteId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetContactFromRemoteIdAsync)(self as *const _ as *mut _, remoteId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_me_contact_async(&self) -> Result>> { + }} + #[inline] pub fn get_me_contact_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetMeContactAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_contact_reader(&self) -> Result> { + }} + #[inline] pub fn get_contact_reader(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetContactReader)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_contact_reader_with_options(&self, options: &ContactQueryOptions) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_contact_reader_with_options(&self, options: &ContactQueryOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetContactReaderWithOptions)(self 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 save_contact_async(&self, contact: &Contact) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn save_contact_async(&self, contact: &Contact) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveContactAsync)(self as *const _ as *mut _, contact as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete_contact_async(&self, contact: &Contact) -> Result> { + }} + #[inline] pub fn delete_contact_async(&self, contact: &Contact) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteContactAsync)(self as *const _ as *mut _, contact as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_contact_async(&self, contactId: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_contact_async(&self, contactId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetContactAsync)(self as *const _ as *mut _, contactId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ContactList: IContactList} 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(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn RegisterSyncManagerAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn put_SupportsServerSearch(&self, value: bool) -> HRESULT, fn get_SyncConstraints(&self, out: *mut *mut ContactListSyncConstraints) -> HRESULT }} impl IContactList2 { - #[inline] pub unsafe fn register_sync_manager_async(&self) -> Result> { + #[inline] pub fn register_sync_manager_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RegisterSyncManagerAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_supports_server_search(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_supports_server_search(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SupportsServerSearch)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_sync_constraints(&self) -> Result> { + }} + #[inline] pub fn get_sync_constraints(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SyncConstraints)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IContactList3, 360246871, 9980, 16872, 168, 80, 90, 163, 37, 20, 172, 169); RT_INTERFACE!{interface IContactList3(IContactList3Vtbl): IInspectable(IInspectableVtbl) [IID_IContactList3] { @@ -12370,33 +12370,33 @@ RT_INTERFACE!{interface IContactList3(IContactList3Vtbl): IInspectable(IInspecta fn GetChangeTracker(&self, identity: HSTRING, out: *mut *mut ContactChangeTracker) -> HRESULT }} impl IContactList3 { - #[inline] pub unsafe fn get_limited_write_operations(&self) -> Result> { + #[inline] pub fn get_limited_write_operations(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LimitedWriteOperations)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_change_tracker(&self, identity: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_change_tracker(&self, identity: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetChangeTracker)(self as *const _ as *mut _, identity.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IContactListLimitedWriteOperations, 3784840154, 18955, 17592, 154, 31, 160, 243, 210, 24, 23, 95); RT_INTERFACE!{interface IContactListLimitedWriteOperations(IContactListLimitedWriteOperationsVtbl): IInspectable(IInspectableVtbl) [IID_IContactListLimitedWriteOperations] { - fn TryCreateOrUpdateContactAsync(&self, contact: *mut Contact, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryDeleteContactAsync(&self, contactId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn TryCreateOrUpdateContactAsync(&self, contact: *mut Contact, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryDeleteContactAsync(&self, contactId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IContactListLimitedWriteOperations { - #[inline] pub unsafe fn try_create_or_update_contact_async(&self, contact: &Contact) -> Result>> { + #[inline] pub fn try_create_or_update_contact_async(&self, contact: &Contact) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryCreateOrUpdateContactAsync)(self as *const _ as *mut _, contact as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_delete_contact_async(&self, contactId: &HStringArg) -> Result>> { + }} + #[inline] pub fn try_delete_contact_async(&self, contactId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryDeleteContactAsync)(self as *const _ as *mut _, contactId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ContactListLimitedWriteOperations: IContactListLimitedWriteOperations} RT_ENUM! { enum ContactListOtherAppReadAccess: i32 { @@ -12409,376 +12409,376 @@ DEFINE_IID!(IID_IContactListSyncConstraints, 2997927681, 12386, 20014, 150, 157, RT_INTERFACE!{interface IContactListSyncConstraints(IContactListSyncConstraintsVtbl): IInspectable(IInspectableVtbl) [IID_IContactListSyncConstraints] { fn get_CanSyncDescriptions(&self, out: *mut bool) -> HRESULT, fn put_CanSyncDescriptions(&self, value: bool) -> HRESULT, - fn get_MaxHomePhoneNumbers(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_MaxHomePhoneNumbers(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_MaxMobilePhoneNumbers(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_MaxMobilePhoneNumbers(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_MaxWorkPhoneNumbers(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_MaxWorkPhoneNumbers(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_MaxOtherPhoneNumbers(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_MaxOtherPhoneNumbers(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_MaxPagerPhoneNumbers(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_MaxPagerPhoneNumbers(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_MaxBusinessFaxPhoneNumbers(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_MaxBusinessFaxPhoneNumbers(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_MaxHomeFaxPhoneNumbers(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_MaxHomeFaxPhoneNumbers(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_MaxCompanyPhoneNumbers(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_MaxCompanyPhoneNumbers(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_MaxAssistantPhoneNumbers(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_MaxAssistantPhoneNumbers(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_MaxRadioPhoneNumbers(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_MaxRadioPhoneNumbers(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_MaxPersonalEmailAddresses(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_MaxPersonalEmailAddresses(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_MaxWorkEmailAddresses(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_MaxWorkEmailAddresses(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_MaxOtherEmailAddresses(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_MaxOtherEmailAddresses(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_MaxHomeAddresses(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_MaxHomeAddresses(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_MaxWorkAddresses(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_MaxWorkAddresses(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_MaxOtherAddresses(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_MaxOtherAddresses(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_MaxBirthdayDates(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_MaxBirthdayDates(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_MaxAnniversaryDates(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_MaxAnniversaryDates(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_MaxOtherDates(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_MaxOtherDates(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_MaxOtherRelationships(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_MaxOtherRelationships(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_MaxSpouseRelationships(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_MaxSpouseRelationships(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_MaxPartnerRelationships(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_MaxPartnerRelationships(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_MaxSiblingRelationships(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_MaxSiblingRelationships(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_MaxParentRelationships(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_MaxParentRelationships(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_MaxChildRelationships(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_MaxChildRelationships(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_MaxJobInfo(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_MaxJobInfo(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_MaxWebsites(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_MaxWebsites(&self, value: *mut super::super::foundation::IReference) -> HRESULT + fn get_MaxHomePhoneNumbers(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_MaxHomePhoneNumbers(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_MaxMobilePhoneNumbers(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_MaxMobilePhoneNumbers(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_MaxWorkPhoneNumbers(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_MaxWorkPhoneNumbers(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_MaxOtherPhoneNumbers(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_MaxOtherPhoneNumbers(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_MaxPagerPhoneNumbers(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_MaxPagerPhoneNumbers(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_MaxBusinessFaxPhoneNumbers(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_MaxBusinessFaxPhoneNumbers(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_MaxHomeFaxPhoneNumbers(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_MaxHomeFaxPhoneNumbers(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_MaxCompanyPhoneNumbers(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_MaxCompanyPhoneNumbers(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_MaxAssistantPhoneNumbers(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_MaxAssistantPhoneNumbers(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_MaxRadioPhoneNumbers(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_MaxRadioPhoneNumbers(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_MaxPersonalEmailAddresses(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_MaxPersonalEmailAddresses(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_MaxWorkEmailAddresses(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_MaxWorkEmailAddresses(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_MaxOtherEmailAddresses(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_MaxOtherEmailAddresses(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_MaxHomeAddresses(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_MaxHomeAddresses(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_MaxWorkAddresses(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_MaxWorkAddresses(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_MaxOtherAddresses(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_MaxOtherAddresses(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_MaxBirthdayDates(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_MaxBirthdayDates(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_MaxAnniversaryDates(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_MaxAnniversaryDates(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_MaxOtherDates(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_MaxOtherDates(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_MaxOtherRelationships(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_MaxOtherRelationships(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_MaxSpouseRelationships(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_MaxSpouseRelationships(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_MaxPartnerRelationships(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_MaxPartnerRelationships(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_MaxSiblingRelationships(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_MaxSiblingRelationships(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_MaxParentRelationships(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_MaxParentRelationships(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_MaxChildRelationships(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_MaxChildRelationships(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_MaxJobInfo(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_MaxJobInfo(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_MaxWebsites(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_MaxWebsites(&self, value: *mut foundation::IReference) -> HRESULT }} impl IContactListSyncConstraints { - #[inline] pub unsafe fn get_can_sync_descriptions(&self) -> Result { + #[inline] pub fn get_can_sync_descriptions(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanSyncDescriptions)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_sync_descriptions(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_sync_descriptions(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanSyncDescriptions)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_home_phone_numbers(&self) -> Result>> { + }} + #[inline] pub fn get_max_home_phone_numbers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxHomePhoneNumbers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_home_phone_numbers(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_max_home_phone_numbers(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxHomePhoneNumbers)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_mobile_phone_numbers(&self) -> Result>> { + }} + #[inline] pub fn get_max_mobile_phone_numbers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxMobilePhoneNumbers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_mobile_phone_numbers(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_max_mobile_phone_numbers(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxMobilePhoneNumbers)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_work_phone_numbers(&self) -> Result>> { + }} + #[inline] pub fn get_max_work_phone_numbers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxWorkPhoneNumbers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_work_phone_numbers(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_max_work_phone_numbers(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxWorkPhoneNumbers)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_other_phone_numbers(&self) -> Result>> { + }} + #[inline] pub fn get_max_other_phone_numbers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxOtherPhoneNumbers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_other_phone_numbers(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_max_other_phone_numbers(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxOtherPhoneNumbers)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_pager_phone_numbers(&self) -> Result>> { + }} + #[inline] pub fn get_max_pager_phone_numbers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxPagerPhoneNumbers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_pager_phone_numbers(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_max_pager_phone_numbers(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxPagerPhoneNumbers)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_business_fax_phone_numbers(&self) -> Result>> { + }} + #[inline] pub fn get_max_business_fax_phone_numbers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxBusinessFaxPhoneNumbers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_business_fax_phone_numbers(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_max_business_fax_phone_numbers(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxBusinessFaxPhoneNumbers)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_home_fax_phone_numbers(&self) -> Result>> { + }} + #[inline] pub fn get_max_home_fax_phone_numbers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxHomeFaxPhoneNumbers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_home_fax_phone_numbers(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_max_home_fax_phone_numbers(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxHomeFaxPhoneNumbers)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_company_phone_numbers(&self) -> Result>> { + }} + #[inline] pub fn get_max_company_phone_numbers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxCompanyPhoneNumbers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_company_phone_numbers(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_max_company_phone_numbers(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxCompanyPhoneNumbers)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_assistant_phone_numbers(&self) -> Result>> { + }} + #[inline] pub fn get_max_assistant_phone_numbers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxAssistantPhoneNumbers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_assistant_phone_numbers(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_max_assistant_phone_numbers(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxAssistantPhoneNumbers)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_radio_phone_numbers(&self) -> Result>> { + }} + #[inline] pub fn get_max_radio_phone_numbers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxRadioPhoneNumbers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_radio_phone_numbers(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_max_radio_phone_numbers(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxRadioPhoneNumbers)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_personal_email_addresses(&self) -> Result>> { + }} + #[inline] pub fn get_max_personal_email_addresses(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxPersonalEmailAddresses)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_personal_email_addresses(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_max_personal_email_addresses(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxPersonalEmailAddresses)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_work_email_addresses(&self) -> Result>> { + }} + #[inline] pub fn get_max_work_email_addresses(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxWorkEmailAddresses)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_work_email_addresses(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_max_work_email_addresses(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxWorkEmailAddresses)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_other_email_addresses(&self) -> Result>> { + }} + #[inline] pub fn get_max_other_email_addresses(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxOtherEmailAddresses)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_other_email_addresses(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_max_other_email_addresses(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxOtherEmailAddresses)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_home_addresses(&self) -> Result>> { + }} + #[inline] pub fn get_max_home_addresses(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxHomeAddresses)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_home_addresses(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_max_home_addresses(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxHomeAddresses)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_work_addresses(&self) -> Result>> { + }} + #[inline] pub fn get_max_work_addresses(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxWorkAddresses)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_work_addresses(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_max_work_addresses(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxWorkAddresses)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_other_addresses(&self) -> Result>> { + }} + #[inline] pub fn get_max_other_addresses(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxOtherAddresses)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_other_addresses(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_max_other_addresses(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxOtherAddresses)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_birthday_dates(&self) -> Result>> { + }} + #[inline] pub fn get_max_birthday_dates(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxBirthdayDates)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_birthday_dates(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_max_birthday_dates(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxBirthdayDates)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_anniversary_dates(&self) -> Result>> { + }} + #[inline] pub fn get_max_anniversary_dates(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxAnniversaryDates)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_anniversary_dates(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_max_anniversary_dates(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxAnniversaryDates)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_other_dates(&self) -> Result>> { + }} + #[inline] pub fn get_max_other_dates(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxOtherDates)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_other_dates(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_max_other_dates(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxOtherDates)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_other_relationships(&self) -> Result>> { + }} + #[inline] pub fn get_max_other_relationships(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxOtherRelationships)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_other_relationships(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_max_other_relationships(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxOtherRelationships)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_spouse_relationships(&self) -> Result>> { + }} + #[inline] pub fn get_max_spouse_relationships(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxSpouseRelationships)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_spouse_relationships(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_max_spouse_relationships(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxSpouseRelationships)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_partner_relationships(&self) -> Result>> { + }} + #[inline] pub fn get_max_partner_relationships(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxPartnerRelationships)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_partner_relationships(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_max_partner_relationships(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxPartnerRelationships)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_sibling_relationships(&self) -> Result>> { + }} + #[inline] pub fn get_max_sibling_relationships(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxSiblingRelationships)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_sibling_relationships(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_max_sibling_relationships(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxSiblingRelationships)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_parent_relationships(&self) -> Result>> { + }} + #[inline] pub fn get_max_parent_relationships(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxParentRelationships)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_parent_relationships(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_max_parent_relationships(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxParentRelationships)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_child_relationships(&self) -> Result>> { + }} + #[inline] pub fn get_max_child_relationships(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxChildRelationships)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_child_relationships(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_max_child_relationships(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxChildRelationships)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_job_info(&self) -> Result>> { + }} + #[inline] pub fn get_max_job_info(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxJobInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_job_info(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_max_job_info(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxJobInfo)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_websites(&self) -> Result>> { + }} + #[inline] pub fn get_max_websites(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxWebsites)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_websites(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_max_websites(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxWebsites)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut ContactListSyncStatus) -> HRESULT, - fn get_LastSuccessfulSyncTime(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_LastAttemptedSyncTime(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn SyncAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_SyncStatusChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SyncStatusChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn get_LastSuccessfulSyncTime(&self, out: *mut foundation::DateTime) -> HRESULT, + fn get_LastAttemptedSyncTime(&self, out: *mut foundation::DateTime) -> HRESULT, + fn SyncAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_SyncStatusChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SyncStatusChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IContactListSyncManager { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_last_successful_sync_time(&self) -> Result { + }} + #[inline] pub fn get_last_successful_sync_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LastSuccessfulSyncTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_last_attempted_sync_time(&self) -> Result { + }} + #[inline] pub fn get_last_attempted_sync_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LastAttemptedSyncTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn sync_async(&self) -> Result>> { + }} + #[inline] pub fn sync_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SyncAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_sync_status_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_sync_status_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SyncStatusChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_sync_status_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_sync_status_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SyncStatusChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ContactListSyncManager: IContactListSyncManager} 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(&self, value: ContactListSyncStatus) -> HRESULT, - fn put_LastSuccessfulSyncTime(&self, value: super::super::foundation::DateTime) -> HRESULT, - fn put_LastAttemptedSyncTime(&self, value: super::super::foundation::DateTime) -> HRESULT + fn put_LastSuccessfulSyncTime(&self, value: foundation::DateTime) -> HRESULT, + fn put_LastAttemptedSyncTime(&self, value: foundation::DateTime) -> HRESULT }} impl IContactListSyncManager2 { - #[inline] pub unsafe fn set_status(&self, value: ContactListSyncStatus) -> Result<()> { + #[inline] pub fn set_status(&self, value: ContactListSyncStatus) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Status)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_last_successful_sync_time(&self, value: super::super::foundation::DateTime) -> Result<()> { + }} + #[inline] pub fn set_last_successful_sync_time(&self, value: foundation::DateTime) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LastSuccessfulSyncTime)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_last_attempted_sync_time(&self, value: super::super::foundation::DateTime) -> Result<()> { + }} + #[inline] pub fn set_last_attempted_sync_time(&self, value: foundation::DateTime) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LastAttemptedSyncTime)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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, @@ -12793,49 +12793,49 @@ RT_INTERFACE!{interface IContactLocationField(IContactLocationFieldVtbl): IInspe fn get_PostalCode(&self, out: *mut HSTRING) -> HRESULT }} impl IContactLocationField { - #[inline] pub unsafe fn get_unstructured_address(&self) -> Result { + #[inline] pub fn get_unstructured_address(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UnstructuredAddress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_street(&self) -> Result { + }} + #[inline] pub fn get_street(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Street)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_city(&self) -> Result { + }} + #[inline] pub fn get_city(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_City)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_region(&self) -> Result { + }} + #[inline] pub fn get_region(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Region)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_country(&self) -> Result { + }} + #[inline] pub fn get_country(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Country)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_postal_code(&self) -> Result { + }} + #[inline] pub fn get_postal_code(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PostalCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ContactLocationField: IContactLocationField} impl RtActivatable for ContactLocationField {} impl ContactLocationField { - #[inline] pub fn create_location_default(unstructuredAddress: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_location_default(unstructuredAddress: &HStringArg) -> Result> { >::get_activation_factory().create_location_default(unstructuredAddress) - }} - #[inline] pub fn create_location_category(unstructuredAddress: &HStringArg, category: ContactFieldCategory) -> Result> { unsafe { + } + #[inline] pub fn create_location_category(unstructuredAddress: &HStringArg, category: ContactFieldCategory) -> Result> { >::get_activation_factory().create_location_category(unstructuredAddress, category) - }} - #[inline] pub fn create_location_all(unstructuredAddress: &HStringArg, category: ContactFieldCategory, street: &HStringArg, city: &HStringArg, region: &HStringArg, country: &HStringArg, postalCode: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_location_all(unstructuredAddress: &HStringArg, category: ContactFieldCategory, street: &HStringArg, city: &HStringArg, region: &HStringArg, country: &HStringArg, postalCode: &HStringArg) -> Result> { >::get_activation_factory().create_location_all(unstructuredAddress, category, street, city, region, country, postalCode) - }} + } } DEFINE_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]) [CLSID_ContactLocationField]); DEFINE_IID!(IID_IContactLocationFieldFactory, 4154012375, 12255, 17406, 143, 24, 65, 137, 115, 144, 188, 254); @@ -12845,21 +12845,21 @@ RT_INTERFACE!{static interface IContactLocationFieldFactory(IContactLocationFiel fn CreateLocation_All(&self, unstructuredAddress: HSTRING, category: ContactFieldCategory, street: HSTRING, city: HSTRING, region: HSTRING, country: HSTRING, postalCode: HSTRING, out: *mut *mut ContactLocationField) -> HRESULT }} impl IContactLocationFieldFactory { - #[inline] pub unsafe fn create_location_default(&self, unstructuredAddress: &HStringArg) -> Result> { + #[inline] pub fn create_location_default(&self, unstructuredAddress: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateLocation_Default)(self as *const _ as *mut _, unstructuredAddress.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_location_category(&self, unstructuredAddress: &HStringArg, category: ContactFieldCategory) -> Result> { + }} + #[inline] pub fn create_location_category(&self, unstructuredAddress: &HStringArg, category: ContactFieldCategory) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateLocation_Category)(self as *const _ as *mut _, unstructuredAddress.get(), category, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_location_all(&self, unstructuredAddress: &HStringArg, category: ContactFieldCategory, street: &HStringArg, city: &HStringArg, region: &HStringArg, country: &HStringArg, postalCode: &HStringArg) -> Result> { + }} + #[inline] pub fn create_location_all(&self, unstructuredAddress: &HStringArg, category: ContactFieldCategory, street: &HStringArg, city: &HStringArg, region: &HStringArg, country: &HStringArg, postalCode: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateLocation_All)(self as *const _ as *mut _, 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) } - } + }} } RT_CLASS!{static class ContactManager} impl RtActivatable for ContactManager {} @@ -12868,84 +12868,84 @@ impl RtActivatable for ContactManager {} impl RtActivatable for ContactManager {} impl RtActivatable for ContactManager {} impl ContactManager { - #[inline] pub fn show_contact_card(contact: &Contact, selection: super::super::foundation::Rect) -> Result<()> { unsafe { + #[inline] pub fn show_contact_card(contact: &Contact, selection: foundation::Rect) -> Result<()> { >::get_activation_factory().show_contact_card(contact, selection) - }} - #[cfg(feature="windows-ui")] #[inline] pub fn show_contact_card_with_placement(contact: &Contact, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result<()> { unsafe { + } + #[cfg(feature="windows-ui")] #[inline] pub fn show_contact_card_with_placement(contact: &Contact, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result<()> { >::get_activation_factory().show_contact_card_with_placement(contact, selection, preferredPlacement) - }} - #[cfg(feature="windows-ui")] #[inline] pub fn show_delay_loaded_contact_card(contact: &Contact, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result> { unsafe { + } + #[cfg(feature="windows-ui")] #[inline] pub fn show_delay_loaded_contact_card(contact: &Contact, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result>> { >::get_activation_factory().show_delay_loaded_contact_card(contact, selection, preferredPlacement) - }} - #[inline] pub fn request_store_async() -> Result>> { unsafe { + } + #[inline] pub fn request_store_async() -> Result>> { >::get_activation_factory().request_store_async() - }} - #[cfg(feature="windows-storage")] #[inline] pub fn convert_contact_to_vcard_async(contact: &Contact) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn convert_contact_to_vcard_async(contact: &Contact) -> Result>> { >::get_activation_factory().convert_contact_to_vcard_async(contact) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn convert_contact_to_vcard_async_with_max_bytes(contact: &Contact, maxBytes: u32) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn convert_contact_to_vcard_async_with_max_bytes(contact: &Contact, maxBytes: u32) -> Result>> { >::get_activation_factory().convert_contact_to_vcard_async_with_max_bytes(contact, maxBytes) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn convert_vcard_to_contact_async(vCard: &super::super::storage::streams::IRandomAccessStreamReference) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn convert_vcard_to_contact_async(vCard: &super::super::storage::streams::IRandomAccessStreamReference) -> Result>> { >::get_activation_factory().convert_vcard_to_contact_async(vCard) - }} - #[inline] pub fn request_store_async_with_access_type(accessType: ContactStoreAccessType) -> Result>> { unsafe { + } + #[inline] pub fn request_store_async_with_access_type(accessType: ContactStoreAccessType) -> Result>> { >::get_activation_factory().request_store_async_with_access_type(accessType) - }} - #[inline] pub fn request_annotation_store_async(accessType: ContactAnnotationStoreAccessType) -> Result>> { unsafe { + } + #[inline] pub fn request_annotation_store_async(accessType: ContactAnnotationStoreAccessType) -> Result>> { >::get_activation_factory().request_annotation_store_async(accessType) - }} - #[inline] pub fn is_show_contact_card_supported() -> Result { unsafe { + } + #[inline] pub fn is_show_contact_card_supported() -> Result { >::get_activation_factory().is_show_contact_card_supported() - }} - #[cfg(feature="windows-ui")] #[inline] pub fn show_contact_card_with_options(contact: &Contact, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, contactCardOptions: &ContactCardOptions) -> Result<()> { unsafe { + } + #[cfg(feature="windows-ui")] #[inline] pub fn show_contact_card_with_options(contact: &Contact, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, contactCardOptions: &ContactCardOptions) -> Result<()> { >::get_activation_factory().show_contact_card_with_options(contact, selection, preferredPlacement, contactCardOptions) - }} - #[inline] pub fn is_show_delay_loaded_contact_card_supported() -> Result { unsafe { + } + #[inline] pub fn is_show_delay_loaded_contact_card_supported() -> Result { >::get_activation_factory().is_show_delay_loaded_contact_card_supported() - }} - #[cfg(feature="windows-ui")] #[inline] pub fn show_delay_loaded_contact_card_with_options(contact: &Contact, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, contactCardOptions: &ContactCardOptions) -> Result> { unsafe { + } + #[cfg(feature="windows-ui")] #[inline] pub fn show_delay_loaded_contact_card_with_options(contact: &Contact, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, contactCardOptions: &ContactCardOptions) -> Result>> { >::get_activation_factory().show_delay_loaded_contact_card_with_options(contact, selection, preferredPlacement, contactCardOptions) - }} - #[inline] pub fn show_full_contact_card(contact: &Contact, fullContactCardOptions: &FullContactCardOptions) -> Result<()> { unsafe { + } + #[inline] pub fn show_full_contact_card(contact: &Contact, fullContactCardOptions: &FullContactCardOptions) -> Result<()> { >::get_activation_factory().show_full_contact_card(contact, fullContactCardOptions) - }} - #[inline] pub fn get_system_display_name_order() -> Result { unsafe { + } + #[inline] pub fn get_system_display_name_order() -> Result { >::get_activation_factory().get_system_display_name_order() - }} - #[inline] pub fn set_system_display_name_order(value: ContactNameOrder) -> Result<()> { unsafe { + } + #[inline] pub fn set_system_display_name_order(value: ContactNameOrder) -> Result<()> { >::get_activation_factory().set_system_display_name_order(value) - }} - #[inline] pub fn get_system_sort_order() -> Result { unsafe { + } + #[inline] pub fn get_system_sort_order() -> Result { >::get_activation_factory().get_system_sort_order() - }} - #[inline] pub fn set_system_sort_order(value: ContactNameOrder) -> Result<()> { unsafe { + } + #[inline] pub fn set_system_sort_order(value: ContactNameOrder) -> Result<()> { >::get_activation_factory().set_system_sort_order(value) - }} - #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::super::system::User) -> Result> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::super::system::User) -> Result>> { >::get_activation_factory().get_for_user(user) - }} - #[inline] pub fn is_show_full_contact_card_supported_async() -> Result>> { unsafe { + } + #[inline] pub fn is_show_full_contact_card_supported_async() -> Result>> { >::get_activation_factory().is_show_full_contact_card_supported_async() - }} - #[inline] pub fn get_include_middle_name_in_system_display_and_sort() -> Result { unsafe { + } + #[inline] pub fn get_include_middle_name_in_system_display_and_sort() -> Result { >::get_activation_factory().get_include_middle_name_in_system_display_and_sort() - }} - #[inline] pub fn set_include_middle_name_in_system_display_and_sort(value: bool) -> Result<()> { unsafe { + } + #[inline] pub fn set_include_middle_name_in_system_display_and_sort(value: bool) -> Result<()> { >::get_activation_factory().set_include_middle_name_in_system_display_and_sort(value) - }} + } } DEFINE_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]) [CLSID_ContactManager]); 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(&self) -> (), - #[cfg(feature="windows-storage")] fn ConvertContactToVCardAsync(&self, contact: *mut Contact, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn ConvertContactToVCardAsync(&self, contact: *mut Contact, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-storage")] fn ConvertContactToVCardAsyncWithMaxBytes(&self, contact: *mut Contact, maxBytes: u32, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn ConvertContactToVCardAsyncWithMaxBytes(&self, contact: *mut Contact, maxBytes: u32, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy2(&self) -> (), - #[cfg(feature="windows-storage")] fn ConvertVCardToContactAsync(&self, vCard: *mut super::super::storage::streams::IRandomAccessStreamReference, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestStoreAsync(&self, accessType: ContactStoreAccessType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestAnnotationStoreAsync(&self, accessType: ContactAnnotationStoreAccessType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn ConvertVCardToContactAsync(&self, vCard: *mut super::super::storage::streams::IRandomAccessStreamReference, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestStoreAsync(&self, accessType: ContactStoreAccessType, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestAnnotationStoreAsync(&self, accessType: ContactAnnotationStoreAccessType, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn get_SystemDisplayNameOrder(&self, out: *mut ContactNameOrder) -> HRESULT, fn put_SystemDisplayNameOrder(&self, value: ContactNameOrder) -> HRESULT, fn get_SystemSortOrder(&self, out: *mut ContactNameOrder) -> HRESULT, @@ -12953,54 +12953,54 @@ RT_INTERFACE!{interface IContactManagerForUser(IContactManagerForUserVtbl): IIns #[cfg(feature="windows-system")] fn get_User(&self, out: *mut *mut super::super::system::User) -> HRESULT }} impl IContactManagerForUser { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn convert_contact_to_vcard_async(&self, contact: &Contact) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn convert_contact_to_vcard_async(&self, contact: &Contact) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConvertContactToVCardAsync)(self as *const _ as *mut _, 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(&self, contact: &Contact, maxBytes: u32) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn convert_contact_to_vcard_async_with_max_bytes(&self, contact: &Contact, maxBytes: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConvertContactToVCardAsyncWithMaxBytes)(self as *const _ as *mut _, 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(&self, vCard: &super::super::storage::streams::IRandomAccessStreamReference) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn convert_vcard_to_contact_async(&self, vCard: &super::super::storage::streams::IRandomAccessStreamReference) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConvertVCardToContactAsync)(self as *const _ as *mut _, 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(&self, accessType: ContactStoreAccessType) -> Result>> { + }} + #[inline] pub fn request_store_async(&self, accessType: ContactStoreAccessType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestStoreAsync)(self as *const _ as *mut _, accessType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_annotation_store_async(&self, accessType: ContactAnnotationStoreAccessType) -> Result>> { + }} + #[inline] pub fn request_annotation_store_async(&self, accessType: ContactAnnotationStoreAccessType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAnnotationStoreAsync)(self as *const _ as *mut _, accessType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_system_display_name_order(&self) -> Result { + }} + #[inline] pub fn get_system_display_name_order(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SystemDisplayNameOrder)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_system_display_name_order(&self, value: ContactNameOrder) -> Result<()> { + }} + #[inline] pub fn set_system_display_name_order(&self, value: ContactNameOrder) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SystemDisplayNameOrder)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_system_sort_order(&self) -> Result { + }} + #[inline] pub fn get_system_sort_order(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SystemSortOrder)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_system_sort_order(&self, value: ContactNameOrder) -> Result<()> { + }} + #[inline] pub fn set_system_sort_order(&self, value: ContactNameOrder) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SystemSortOrder)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_user(&self) -> Result> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_User)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ContactManagerForUser: IContactManagerForUser} DEFINE_IID!(IID_IContactManagerForUser2, 1296473134, 15221, 19059, 187, 48, 115, 102, 69, 71, 34, 86); @@ -13008,59 +13008,59 @@ RT_INTERFACE!{interface IContactManagerForUser2(IContactManagerForUser2Vtbl): II fn ShowFullContactCard(&self, contact: *mut Contact, fullContactCardOptions: *mut FullContactCardOptions) -> HRESULT }} impl IContactManagerForUser2 { - #[inline] pub unsafe fn show_full_contact_card(&self, contact: &Contact, fullContactCardOptions: &FullContactCardOptions) -> Result<()> { + #[inline] pub fn show_full_contact_card(&self, contact: &Contact, fullContactCardOptions: &FullContactCardOptions) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ShowFullContactCard)(self as *const _ as *mut _, contact as *const _ as *mut _, fullContactCardOptions as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, contact: *mut Contact, selection: super::super::foundation::Rect) -> HRESULT, - #[cfg(feature="windows-ui")] fn ShowContactCardWithPlacement(&self, contact: *mut Contact, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> HRESULT, - #[cfg(feature="windows-ui")] fn ShowDelayLoadedContactCard(&self, contact: *mut Contact, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, out: *mut *mut ContactCardDelayedDataLoader) -> HRESULT + fn ShowContactCard(&self, contact: *mut Contact, selection: foundation::Rect) -> HRESULT, + #[cfg(feature="windows-ui")] fn ShowContactCardWithPlacement(&self, contact: *mut Contact, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> HRESULT, + #[cfg(feature="windows-ui")] fn ShowDelayLoadedContactCard(&self, contact: *mut Contact, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, out: *mut *mut ContactCardDelayedDataLoader) -> HRESULT }} impl IContactManagerStatics { - #[inline] pub unsafe fn show_contact_card(&self, contact: &Contact, selection: super::super::foundation::Rect) -> Result<()> { + #[inline] pub fn show_contact_card(&self, contact: &Contact, selection: foundation::Rect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ShowContactCard)(self as *const _ as *mut _, contact as *const _ as *mut _, selection); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn show_contact_card_with_placement(&self, contact: &Contact, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn show_contact_card_with_placement(&self, contact: &Contact, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ShowContactCardWithPlacement)(self as *const _ as *mut _, 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(&self, contact: &Contact, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn show_delay_loaded_contact_card(&self, contact: &Contact, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowDelayLoadedContactCard)(self as *const _ as *mut _, contact as *const _ as *mut _, selection, preferredPlacement, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn RequestStoreAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IContactManagerStatics2 { - #[inline] pub unsafe fn request_store_async(&self) -> Result>> { + #[inline] pub fn request_store_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestStoreAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self) -> (), - #[cfg(feature="windows-storage")] fn ConvertContactToVCardAsync(&self, contact: *mut Contact, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn ConvertContactToVCardAsync(&self, contact: *mut Contact, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-storage")] fn ConvertContactToVCardAsyncWithMaxBytes(&self, contact: *mut Contact, maxBytes: u32, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn ConvertContactToVCardAsyncWithMaxBytes(&self, contact: *mut Contact, maxBytes: u32, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy2(&self) -> (), - #[cfg(feature="windows-storage")] fn ConvertVCardToContactAsync(&self, vCard: *mut super::super::storage::streams::IRandomAccessStreamReference, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestStoreAsyncWithAccessType(&self, accessType: ContactStoreAccessType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestAnnotationStoreAsync(&self, accessType: ContactAnnotationStoreAccessType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn ConvertVCardToContactAsync(&self, vCard: *mut super::super::storage::streams::IRandomAccessStreamReference, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestStoreAsyncWithAccessType(&self, accessType: ContactStoreAccessType, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestAnnotationStoreAsync(&self, accessType: ContactAnnotationStoreAccessType, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn IsShowContactCardSupported(&self, out: *mut bool) -> HRESULT, #[cfg(not(feature="windows-ui"))] fn __Dummy6(&self) -> (), - #[cfg(feature="windows-ui")] fn ShowContactCardWithOptions(&self, contact: *mut Contact, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, contactCardOptions: *mut ContactCardOptions) -> HRESULT, + #[cfg(feature="windows-ui")] fn ShowContactCardWithOptions(&self, contact: *mut Contact, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, contactCardOptions: *mut ContactCardOptions) -> HRESULT, fn IsShowDelayLoadedContactCardSupported(&self, out: *mut bool) -> HRESULT, #[cfg(not(feature="windows-ui"))] fn __Dummy8(&self) -> (), - #[cfg(feature="windows-ui")] fn ShowDelayLoadedContactCardWithOptions(&self, contact: *mut Contact, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, contactCardOptions: *mut ContactCardOptions, out: *mut *mut ContactCardDelayedDataLoader) -> HRESULT, + #[cfg(feature="windows-ui")] fn ShowDelayLoadedContactCardWithOptions(&self, contact: *mut Contact, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, contactCardOptions: *mut ContactCardOptions, out: *mut *mut ContactCardDelayedDataLoader) -> HRESULT, fn ShowFullContactCard(&self, contact: *mut Contact, fullContactCardOptions: *mut FullContactCardOptions) -> HRESULT, fn get_SystemDisplayNameOrder(&self, out: *mut ContactNameOrder) -> HRESULT, fn put_SystemDisplayNameOrder(&self, value: ContactNameOrder) -> HRESULT, @@ -13068,129 +13068,129 @@ RT_INTERFACE!{static interface IContactManagerStatics3(IContactManagerStatics3Vt fn put_SystemSortOrder(&self, value: ContactNameOrder) -> HRESULT }} impl IContactManagerStatics3 { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn convert_contact_to_vcard_async(&self, contact: &Contact) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn convert_contact_to_vcard_async(&self, contact: &Contact) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConvertContactToVCardAsync)(self as *const _ as *mut _, 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(&self, contact: &Contact, maxBytes: u32) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn convert_contact_to_vcard_async_with_max_bytes(&self, contact: &Contact, maxBytes: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConvertContactToVCardAsyncWithMaxBytes)(self as *const _ as *mut _, 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(&self, vCard: &super::super::storage::streams::IRandomAccessStreamReference) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn convert_vcard_to_contact_async(&self, vCard: &super::super::storage::streams::IRandomAccessStreamReference) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConvertVCardToContactAsync)(self as *const _ as *mut _, 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(&self, accessType: ContactStoreAccessType) -> Result>> { + }} + #[inline] pub fn request_store_async_with_access_type(&self, accessType: ContactStoreAccessType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestStoreAsyncWithAccessType)(self as *const _ as *mut _, accessType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_annotation_store_async(&self, accessType: ContactAnnotationStoreAccessType) -> Result>> { + }} + #[inline] pub fn request_annotation_store_async(&self, accessType: ContactAnnotationStoreAccessType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAnnotationStoreAsync)(self as *const _ as *mut _, accessType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn is_show_contact_card_supported(&self) -> Result { + }} + #[inline] pub fn is_show_contact_card_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsShowContactCardSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn show_contact_card_with_options(&self, contact: &Contact, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, contactCardOptions: &ContactCardOptions) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn show_contact_card_with_options(&self, contact: &Contact, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, contactCardOptions: &ContactCardOptions) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ShowContactCardWithOptions)(self as *const _ as *mut _, 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(&self) -> Result { + }} + #[inline] pub fn is_show_delay_loaded_contact_card_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsShowDelayLoadedContactCardSupported)(self as *const _ as *mut _, &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(&self, contact: &Contact, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, contactCardOptions: &ContactCardOptions) -> Result> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn show_delay_loaded_contact_card_with_options(&self, contact: &Contact, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, contactCardOptions: &ContactCardOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowDelayLoadedContactCardWithOptions)(self as *const _ as *mut _, 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) } - } - #[inline] pub unsafe fn show_full_contact_card(&self, contact: &Contact, fullContactCardOptions: &FullContactCardOptions) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn show_full_contact_card(&self, contact: &Contact, fullContactCardOptions: &FullContactCardOptions) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ShowFullContactCard)(self as *const _ as *mut _, 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(&self) -> Result { + }} + #[inline] pub fn get_system_display_name_order(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SystemDisplayNameOrder)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_system_display_name_order(&self, value: ContactNameOrder) -> Result<()> { + }} + #[inline] pub fn set_system_display_name_order(&self, value: ContactNameOrder) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SystemDisplayNameOrder)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_system_sort_order(&self) -> Result { + }} + #[inline] pub fn get_system_sort_order(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SystemSortOrder)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_system_sort_order(&self, value: ContactNameOrder) -> Result<()> { + }} + #[inline] pub fn set_system_sort_order(&self, value: ContactNameOrder) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SystemSortOrder)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, user: *mut super::super::system::User, out: *mut *mut ContactManagerForUser) -> HRESULT }} impl IContactManagerStatics4 { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_for_user(&self, user: &super::super::system::User) -> Result> { + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(&self, user: &super::super::system::User) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForUser)(self as *const _ as *mut _, user as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IContactManagerStatics5, 4149811847, 44215, 20397, 144, 242, 168, 171, 100, 205, 187, 164); RT_INTERFACE!{static interface IContactManagerStatics5(IContactManagerStatics5Vtbl): IInspectable(IInspectableVtbl) [IID_IContactManagerStatics5] { - fn IsShowFullContactCardSupportedAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn IsShowFullContactCardSupportedAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn get_IncludeMiddleNameInSystemDisplayAndSort(&self, out: *mut bool) -> HRESULT, fn put_IncludeMiddleNameInSystemDisplayAndSort(&self, value: bool) -> HRESULT }} impl IContactManagerStatics5 { - #[inline] pub unsafe fn is_show_full_contact_card_supported_async(&self) -> Result>> { + #[inline] pub fn is_show_full_contact_card_supported_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).IsShowFullContactCardSupportedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_include_middle_name_in_system_display_and_sort(&self) -> Result { + }} + #[inline] pub fn get_include_middle_name_in_system_display_and_sort(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IncludeMiddleNameInSystemDisplayAndSort)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_include_middle_name_in_system_display_and_sort(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_include_middle_name_in_system_display_and_sort(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IncludeMiddleNameInSystemDisplayAndSort)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut ContactMatchReasonKind) -> HRESULT, #[cfg(not(feature="windows-data"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-data")] fn get_Segments(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + #[cfg(feature="windows-data")] fn get_Segments(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_Text(&self, out: *mut HSTRING) -> HRESULT }} impl IContactMatchReason { - #[inline] pub unsafe fn get_field(&self) -> Result { + #[inline] pub fn get_field(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Field)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-data")] #[inline] pub unsafe fn get_segments(&self) -> Result>> { + }} + #[cfg(feature="windows-data")] #[inline] pub fn get_segments(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Segments)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_text(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Text)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ContactMatchReason: IContactMatchReason} RT_ENUM! { enum ContactMatchReasonKind: i32 { @@ -13216,79 +13216,79 @@ RT_INTERFACE!{interface IContactName(IContactNameVtbl): IInspectable(IInspectabl fn get_YomiDisplayName(&self, out: *mut HSTRING) -> HRESULT }} impl IContactName { - #[inline] pub unsafe fn get_first_name(&self) -> Result { + #[inline] pub fn get_first_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FirstName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_first_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_first_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FirstName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_last_name(&self) -> Result { + }} + #[inline] pub fn get_last_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LastName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_last_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_last_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LastName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_middle_name(&self) -> Result { + }} + #[inline] pub fn get_middle_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MiddleName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_middle_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_middle_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MiddleName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_yomi_given_name(&self) -> Result { + }} + #[inline] pub fn get_yomi_given_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_YomiGivenName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_yomi_given_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_yomi_given_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_YomiGivenName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_yomi_family_name(&self) -> Result { + }} + #[inline] pub fn get_yomi_family_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_YomiFamilyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_yomi_family_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_yomi_family_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_YomiFamilyName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_honorific_name_suffix(&self) -> Result { + }} + #[inline] pub fn get_honorific_name_suffix(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HonorificNameSuffix)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_honorific_name_suffix(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_honorific_name_suffix(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_HonorificNameSuffix)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_honorific_name_prefix(&self) -> Result { + }} + #[inline] pub fn get_honorific_name_prefix(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HonorificNamePrefix)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_honorific_name_prefix(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_honorific_name_prefix(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_HonorificNamePrefix)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_yomi_display_name(&self) -> Result { + }} + #[inline] pub fn get_yomi_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_YomiDisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum ContactNameOrder: i32 { FirstNameLastName (ContactNameOrder_FirstNameLastName) = 0, LastNameFirstName (ContactNameOrder_LastNameFirstName) = 1, @@ -13297,58 +13297,58 @@ DEFINE_IID!(IID_IContactPanel, 1103041125, 53998, 19351, 168, 10, 125, 141, 100, RT_INTERFACE!{interface IContactPanel(IContactPanelVtbl): IInspectable(IInspectableVtbl) [IID_IContactPanel] { fn ClosePanel(&self) -> HRESULT, #[cfg(not(feature="windows-ui"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-ui")] fn get_HeaderColor(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + #[cfg(feature="windows-ui")] fn get_HeaderColor(&self, out: *mut *mut foundation::IReference) -> HRESULT, #[cfg(not(feature="windows-ui"))] fn __Dummy2(&self) -> (), - #[cfg(feature="windows-ui")] fn put_HeaderColor(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn add_LaunchFullAppRequested(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_LaunchFullAppRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Closing(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Closing(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + #[cfg(feature="windows-ui")] fn put_HeaderColor(&self, value: *mut foundation::IReference) -> HRESULT, + fn add_LaunchFullAppRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_LaunchFullAppRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Closing(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Closing(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IContactPanel { - #[inline] pub unsafe fn close_panel(&self) -> Result<()> { + #[inline] pub fn close_panel(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ClosePanel)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_header_color(&self) -> Result>> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_header_color(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HeaderColor)(self 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 set_header_color(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_header_color(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_HeaderColor)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_launch_full_app_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_launch_full_app_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_LaunchFullAppRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_launch_full_app_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_launch_full_app_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_LaunchFullAppRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_closing(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_closing(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Closing)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_closing(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_closing(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Closing)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ContactPanel: IContactPanel} DEFINE_IID!(IID_IContactPanelClosingEventArgs, 572617939, 53067, 18135, 183, 57, 110, 220, 22, 17, 11, 251); RT_INTERFACE!{interface IContactPanelClosingEventArgs(IContactPanelClosingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IContactPanelClosingEventArgs] { - fn GetDeferral(&self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IContactPanelClosingEventArgs { - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ContactPanelClosingEventArgs: IContactPanelClosingEventArgs} DEFINE_IID!(IID_IContactPanelLaunchFullAppRequestedEventArgs, 2295733262, 9140, 19432, 138, 252, 7, 44, 37, 164, 25, 13); @@ -13357,15 +13357,15 @@ RT_INTERFACE!{interface IContactPanelLaunchFullAppRequestedEventArgs(IContactPan fn put_Handled(&self, value: bool) -> HRESULT }} impl IContactPanelLaunchFullAppRequestedEventArgs { - #[inline] pub unsafe fn get_handled(&self) -> Result { + #[inline] pub fn get_handled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Handled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_handled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_handled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Handled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ContactPanelLaunchFullAppRequestedEventArgs: IContactPanelLaunchFullAppRequestedEventArgs} DEFINE_IID!(IID_IContactPhone, 1182640997, 10002, 20306, 183, 131, 158, 168, 17, 28, 99, 205); @@ -13378,33 +13378,33 @@ RT_INTERFACE!{interface IContactPhone(IContactPhoneVtbl): IInspectable(IInspecta fn put_Description(&self, value: HSTRING) -> HRESULT }} impl IContactPhone { - #[inline] pub unsafe fn get_number(&self) -> Result { + #[inline] pub fn get_number(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Number)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_number(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_number(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Number)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_kind(&self) -> Result { + }} + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_kind(&self, value: ContactPhoneKind) -> Result<()> { + }} + #[inline] pub fn set_kind(&self, value: ContactPhoneKind) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Kind)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_description(&self) -> Result { + }} + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_description(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_description(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Description)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ContactPhone: IContactPhone} impl RtActivatable for ContactPhone {} @@ -13418,108 +13418,108 @@ RT_INTERFACE!{interface IContactPicker(IContactPickerVtbl): IInspectable(IInspec fn put_CommitButtonText(&self, value: HSTRING) -> HRESULT, fn get_SelectionMode(&self, out: *mut ContactSelectionMode) -> HRESULT, fn put_SelectionMode(&self, value: ContactSelectionMode) -> HRESULT, - fn get_DesiredFields(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn PickSingleContactAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn PickMultipleContactsAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn get_DesiredFields(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn PickSingleContactAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn PickMultipleContactsAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IContactPicker { - #[inline] pub unsafe fn get_commit_button_text(&self) -> Result { + #[inline] pub fn get_commit_button_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CommitButtonText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_commit_button_text(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_commit_button_text(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CommitButtonText)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_selection_mode(&self) -> Result { + }} + #[inline] pub fn get_selection_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SelectionMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_selection_mode(&self, value: ContactSelectionMode) -> Result<()> { + }} + #[inline] pub fn set_selection_mode(&self, value: ContactSelectionMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SelectionMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_desired_fields(&self) -> Result>> { + }} + #[inline] pub fn get_desired_fields(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DesiredFields)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn pick_single_contact_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn pick_single_contact_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PickSingleContactAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn pick_multiple_contacts_async(&self) -> Result>>> { + }} + #[inline] pub fn pick_multiple_contacts_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PickMultipleContactsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ContactPicker: IContactPicker} impl RtActivatable for ContactPicker {} impl RtActivatable for ContactPicker {} impl ContactPicker { - #[cfg(feature="windows-system")] #[inline] pub fn create_for_user(user: &super::super::system::User) -> Result> { unsafe { + #[cfg(feature="windows-system")] #[inline] pub fn create_for_user(user: &super::super::system::User) -> Result>> { >::get_activation_factory().create_for_user(user) - }} - #[inline] pub fn is_supported_async() -> Result>> { unsafe { + } + #[inline] pub fn is_supported_async() -> Result>> { >::get_activation_factory().is_supported_async() - }} + } } DEFINE_CLSID!(ContactPicker(&[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,80,105,99,107,101,114,0]) [CLSID_ContactPicker]); 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn PickContactAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn PickContactsAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn get_DesiredFieldsWithContactFieldType(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn PickContactAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn PickContactsAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IContactPicker2 { - #[inline] pub unsafe fn get_desired_fields_with_contact_field_type(&self) -> Result>> { + #[inline] pub fn get_desired_fields_with_contact_field_type(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DesiredFieldsWithContactFieldType)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn pick_contact_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn pick_contact_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PickContactAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn pick_contacts_async(&self) -> Result>>> { + }} + #[inline] pub fn pick_contacts_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PickContactsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IContactPicker3, 242365205, 45635, 19437, 133, 22, 34, 177, 167, 172, 10, 206); RT_INTERFACE!{interface IContactPicker3(IContactPicker3Vtbl): IInspectable(IInspectableVtbl) [IID_IContactPicker3] { #[cfg(feature="windows-system")] fn get_User(&self, out: *mut *mut super::super::system::User) -> HRESULT }} impl IContactPicker3 { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_user(&self) -> Result> { + #[cfg(feature="windows-system")] #[inline] pub fn get_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_User)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IContactPickerStatics, 1955119145, 27219, 16984, 163, 233, 98, 223, 246, 120, 75, 108); RT_INTERFACE!{static interface IContactPickerStatics(IContactPickerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IContactPickerStatics] { #[cfg(not(feature="windows-system"))] fn __Dummy0(&self) -> (), #[cfg(feature="windows-system")] fn CreateForUser(&self, user: *mut super::super::system::User, out: *mut *mut ContactPicker) -> HRESULT, - fn IsSupportedAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn IsSupportedAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IContactPickerStatics { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn create_for_user(&self, user: &super::super::system::User) -> Result> { + #[cfg(feature="windows-system")] #[inline] pub fn create_for_user(&self, user: &super::super::system::User) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateForUser)(self as *const _ as *mut _, user as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn is_supported_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn is_supported_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).IsSupportedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum ContactQueryDesiredFields: u32 { None (ContactQueryDesiredFields_None) = 0, PhoneNumber (ContactQueryDesiredFields_PhoneNumber) = 1, EmailAddress (ContactQueryDesiredFields_EmailAddress) = 2, PostalAddress (ContactQueryDesiredFields_PostalAddress) = 4, @@ -13527,69 +13527,69 @@ RT_ENUM! { enum ContactQueryDesiredFields: u32 { 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(&self, out: *mut *mut ContactQueryTextSearch) -> HRESULT, - fn get_ContactListIds(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_ContactListIds(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_IncludeContactsFromHiddenLists(&self, out: *mut bool) -> HRESULT, fn put_IncludeContactsFromHiddenLists(&self, value: bool) -> HRESULT, fn get_DesiredFields(&self, out: *mut ContactQueryDesiredFields) -> HRESULT, fn put_DesiredFields(&self, value: ContactQueryDesiredFields) -> HRESULT, fn get_DesiredOperations(&self, out: *mut ContactAnnotationOperations) -> HRESULT, fn put_DesiredOperations(&self, value: ContactAnnotationOperations) -> HRESULT, - fn get_AnnotationListIds(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_AnnotationListIds(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IContactQueryOptions { - #[inline] pub unsafe fn get_text_search(&self) -> Result> { + #[inline] pub fn get_text_search(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TextSearch)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_contact_list_ids(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_contact_list_ids(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContactListIds)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_include_contacts_from_hidden_lists(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_include_contacts_from_hidden_lists(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IncludeContactsFromHiddenLists)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_include_contacts_from_hidden_lists(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_include_contacts_from_hidden_lists(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IncludeContactsFromHiddenLists)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_desired_fields(&self) -> Result { + }} + #[inline] pub fn get_desired_fields(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DesiredFields)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_desired_fields(&self, value: ContactQueryDesiredFields) -> Result<()> { + }} + #[inline] pub fn set_desired_fields(&self, value: ContactQueryDesiredFields) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DesiredFields)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_desired_operations(&self) -> Result { + }} + #[inline] pub fn get_desired_operations(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DesiredOperations)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_desired_operations(&self, value: ContactAnnotationOperations) -> Result<()> { + }} + #[inline] pub fn set_desired_operations(&self, value: ContactAnnotationOperations) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DesiredOperations)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_annotation_list_ids(&self) -> Result>> { + }} + #[inline] pub fn get_annotation_list_ids(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AnnotationListIds)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ContactQueryOptions: IContactQueryOptions} impl RtActivatable for ContactQueryOptions {} impl RtActivatable for ContactQueryOptions {} impl ContactQueryOptions { - #[inline] pub fn create_with_text(text: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_with_text(text: &HStringArg) -> Result> { >::get_activation_factory().create_with_text(text) - }} - #[inline] pub fn create_with_text_and_fields(text: &HStringArg, fields: ContactQuerySearchFields) -> Result> { unsafe { + } + #[inline] pub fn create_with_text_and_fields(text: &HStringArg, fields: ContactQuerySearchFields) -> Result> { >::get_activation_factory().create_with_text_and_fields(text, fields) - }} + } } DEFINE_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]) [CLSID_ContactQueryOptions]); DEFINE_IID!(IID_IContactQueryOptionsFactory, 1413462599, 36071, 18123, 157, 172, 154, 164, 42, 27, 200, 226); @@ -13598,16 +13598,16 @@ RT_INTERFACE!{static interface IContactQueryOptionsFactory(IContactQueryOptionsF fn CreateWithTextAndFields(&self, text: HSTRING, fields: ContactQuerySearchFields, out: *mut *mut ContactQueryOptions) -> HRESULT }} impl IContactQueryOptionsFactory { - #[inline] pub unsafe fn create_with_text(&self, text: &HStringArg) -> Result> { + #[inline] pub fn create_with_text(&self, text: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithText)(self as *const _ as *mut _, text.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_text_and_fields(&self, text: &HStringArg, fields: ContactQuerySearchFields) -> Result> { + }} + #[inline] pub fn create_with_text_and_fields(&self, text: &HStringArg, fields: ContactQuerySearchFields) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithTextAndFields)(self as *const _ as *mut _, text.get(), fields, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -13625,51 +13625,51 @@ RT_INTERFACE!{interface IContactQueryTextSearch(IContactQueryTextSearchVtbl): II fn put_SearchScope(&self, value: ContactQuerySearchScope) -> HRESULT }} impl IContactQueryTextSearch { - #[inline] pub unsafe fn get_fields(&self) -> Result { + #[inline] pub fn get_fields(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Fields)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_fields(&self, value: ContactQuerySearchFields) -> Result<()> { + }} + #[inline] pub fn set_fields(&self, value: ContactQuerySearchFields) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Fields)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_text(&self) -> Result { + }} + #[inline] pub fn get_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Text)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_text(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_text(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Text)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_search_scope(&self) -> Result { + }} + #[inline] pub fn get_search_scope(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SearchScope)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_search_scope(&self, value: ContactQuerySearchScope) -> Result<()> { + }} + #[inline] pub fn set_search_scope(&self, value: ContactQuerySearchScope) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SearchScope)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ContactQueryTextSearch: IContactQueryTextSearch} 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetMatchingPropertiesWithMatchReason(&self, contact: *mut Contact, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn ReadBatchAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetMatchingPropertiesWithMatchReason(&self, contact: *mut Contact, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IContactReader { - #[inline] pub unsafe fn read_batch_async(&self) -> Result>> { + #[inline] pub fn read_batch_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadBatchAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_matching_properties_with_match_reason(&self, contact: &Contact) -> Result>> { + }} + #[inline] pub fn get_matching_properties_with_match_reason(&self, contact: &Contact) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetMatchingPropertiesWithMatchReason)(self as *const _ as *mut _, contact as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ContactReader: IContactReader} RT_ENUM! { enum ContactRelationship: i32 { @@ -13686,24 +13686,24 @@ RT_INTERFACE!{interface IContactSignificantOther(IContactSignificantOtherVtbl): fn put_Description(&self, value: HSTRING) -> HRESULT }} impl IContactSignificantOther { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Name)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_description(&self) -> Result { + }} + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_description(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_description(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Description)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ContactSignificantOther: IContactSignificantOther} impl RtActivatable for ContactSignificantOther {} @@ -13714,120 +13714,120 @@ RT_INTERFACE!{interface IContactSignificantOther2(IContactSignificantOther2Vtbl) fn put_Relationship(&self, value: ContactRelationship) -> HRESULT }} impl IContactSignificantOther2 { - #[inline] pub unsafe fn get_relationship(&self) -> Result { + #[inline] pub fn get_relationship(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Relationship)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_relationship(&self, value: ContactRelationship) -> Result<()> { + }} + #[inline] pub fn set_relationship(&self, value: ContactRelationship) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Relationship)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn FindContactsWithSearchTextAsync(&self, searchText: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetContactAsync(&self, contactId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FindContactsAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn FindContactsWithSearchTextAsync(&self, searchText: HSTRING, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetContactAsync(&self, contactId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IContactStore { - #[inline] pub unsafe fn find_contacts_async(&self) -> Result>>> { + #[inline] pub fn find_contacts_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindContactsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_contacts_with_search_text_async(&self, searchText: &HStringArg) -> Result>>> { + }} + #[inline] pub fn find_contacts_with_search_text_async(&self, searchText: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindContactsWithSearchTextAsync)(self as *const _ as *mut _, searchText.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_contact_async(&self, contactId: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_contact_async(&self, contactId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetContactAsync)(self as *const _ as *mut _, contactId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ContactStore: IContactStore} 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(&self, out: *mut *mut ContactChangeTracker) -> HRESULT, - fn add_ContactChanged(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ContactChanged(&self, value: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ContactChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ContactChanged(&self, value: foundation::EventRegistrationToken) -> HRESULT, fn get_AggregateContactManager(&self, out: *mut *mut AggregateContactManager) -> HRESULT, - fn FindContactListsAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetContactListAsync(&self, contactListId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CreateContactListAsync(&self, displayName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetMeContactAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FindContactListsAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetContactListAsync(&self, contactListId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreateContactListAsync(&self, displayName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetMeContactAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetContactReader(&self, out: *mut *mut ContactReader) -> HRESULT, fn GetContactReaderWithOptions(&self, options: *mut ContactQueryOptions, out: *mut *mut ContactReader) -> HRESULT, - fn CreateContactListInAccountAsync(&self, displayName: HSTRING, userDataAccountId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn CreateContactListInAccountAsync(&self, displayName: HSTRING, userDataAccountId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IContactStore2 { - #[inline] pub unsafe fn get_change_tracker(&self) -> Result> { + #[inline] pub fn get_change_tracker(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ChangeTracker)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_contact_changed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_contact_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ContactChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_contact_changed(&self, value: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_contact_changed(&self, value: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ContactChanged)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_aggregate_contact_manager(&self) -> Result> { + }} + #[inline] pub fn get_aggregate_contact_manager(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AggregateContactManager)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_contact_lists_async(&self) -> Result>>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn find_contact_lists_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindContactListsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_contact_list_async(&self, contactListId: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_contact_list_async(&self, contactListId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetContactListAsync)(self as *const _ as *mut _, contactListId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_contact_list_async(&self, displayName: &HStringArg) -> Result>> { + }} + #[inline] pub fn create_contact_list_async(&self, displayName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateContactListAsync)(self as *const _ as *mut _, displayName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_me_contact_async(&self) -> Result>> { + }} + #[inline] pub fn get_me_contact_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetMeContactAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_contact_reader(&self) -> Result> { + }} + #[inline] pub fn get_contact_reader(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetContactReader)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_contact_reader_with_options(&self, options: &ContactQueryOptions) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_contact_reader_with_options(&self, options: &ContactQueryOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetContactReaderWithOptions)(self 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 create_contact_list_in_account_async(&self, displayName: &HStringArg, userDataAccountId: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_contact_list_in_account_async(&self, displayName: &HStringArg, userDataAccountId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateContactListInAccountAsync)(self as *const _ as *mut _, displayName.get(), userDataAccountId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IContactStore3, 3414699116, 78, 16464, 135, 240, 132, 4, 7, 238, 104, 24); RT_INTERFACE!{interface IContactStore3(IContactStore3Vtbl): IInspectable(IInspectableVtbl) [IID_IContactStore3] { fn GetChangeTracker(&self, identity: HSTRING, out: *mut *mut ContactChangeTracker) -> HRESULT }} impl IContactStore3 { - #[inline] pub unsafe fn get_change_tracker(&self, identity: &HStringArg) -> Result> { + #[inline] pub fn get_change_tracker(&self, identity: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetChangeTracker)(self as *const _ as *mut _, identity.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum ContactStoreAccessType: i32 { AppContactsReadWrite (ContactStoreAccessType_AppContactsReadWrite) = 0, AllContactsReadOnly (ContactStoreAccessType_AllContactsReadOnly) = 1, AllContactsReadWrite (ContactStoreAccessType_AllContactsReadWrite) = 2, @@ -13839,30 +13839,30 @@ RT_INTERFACE!{interface IContactStoreNotificationTriggerDetails(IContactStoreNot RT_CLASS!{class ContactStoreNotificationTriggerDetails: IContactStoreNotificationTriggerDetails} 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(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_Uri(&self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_Uri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_Uri(&self, value: *mut foundation::Uri) -> HRESULT, fn get_Description(&self, out: *mut HSTRING) -> HRESULT, fn put_Description(&self, value: HSTRING) -> HRESULT }} impl IContactWebsite { - #[inline] pub unsafe fn get_uri(&self) -> Result> { + #[inline] pub fn get_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Uri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_uri(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_uri(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Uri)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_description(&self) -> Result { + }} + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_description(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_description(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Description)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ContactWebsite: IContactWebsite} impl RtActivatable for ContactWebsite {} @@ -13873,15 +13873,15 @@ RT_INTERFACE!{interface IContactWebsite2(IContactWebsite2Vtbl): IInspectable(IIn fn put_RawValue(&self, value: HSTRING) -> HRESULT }} impl IContactWebsite2 { - #[inline] pub unsafe fn get_raw_value(&self) -> Result { + #[inline] pub fn get_raw_value(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RawValue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_raw_value(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_raw_value(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RawValue)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } 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] { @@ -13889,15 +13889,15 @@ RT_INTERFACE!{interface IFullContactCardOptions(IFullContactCardOptionsVtbl): II #[cfg(feature="windows-ui")] fn put_DesiredRemainingView(&self, value: super::super::ui::viewmanagement::ViewSizePreference) -> HRESULT }} impl IFullContactCardOptions { - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_desired_remaining_view(&self) -> Result { + #[cfg(feature="windows-ui")] #[inline] pub fn get_desired_remaining_view(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DesiredRemainingView)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn set_desired_remaining_view(&self, value: super::super::ui::viewmanagement::ViewSizePreference) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_desired_remaining_view(&self, value: super::super::ui::viewmanagement::ViewSizePreference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DesiredRemainingView)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class FullContactCardOptions: IFullContactCardOptions} impl RtActivatable for FullContactCardOptions {} @@ -13905,24 +13905,24 @@ DEFINE_CLSID!(FullContactCardOptions(&[87,105,110,100,111,119,115,46,65,112,112, RT_CLASS!{static class KnownContactField} impl RtActivatable for KnownContactField {} impl KnownContactField { - #[inline] pub fn get_email() -> Result { unsafe { + #[inline] pub fn get_email() -> Result { >::get_activation_factory().get_email() - }} - #[inline] pub fn get_phone_number() -> Result { unsafe { + } + #[inline] pub fn get_phone_number() -> Result { >::get_activation_factory().get_phone_number() - }} - #[inline] pub fn get_location() -> Result { unsafe { + } + #[inline] pub fn get_location() -> Result { >::get_activation_factory().get_location() - }} - #[inline] pub fn get_instant_message() -> Result { unsafe { + } + #[inline] pub fn get_instant_message() -> Result { >::get_activation_factory().get_instant_message() - }} - #[inline] pub fn convert_name_to_type(name: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn convert_name_to_type(name: &HStringArg) -> Result { >::get_activation_factory().convert_name_to_type(name) - }} - #[inline] pub fn convert_type_to_name(type_: ContactFieldType) -> Result { unsafe { + } + #[inline] pub fn convert_type_to_name(type_: ContactFieldType) -> Result { >::get_activation_factory().convert_type_to_name(type_) - }} + } } DEFINE_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]) [CLSID_KnownContactField]); DEFINE_IID!(IID_IKnownContactFieldStatics, 772676370, 54823, 20426, 186, 212, 31, 175, 22, 140, 125, 20); @@ -13935,47 +13935,47 @@ RT_INTERFACE!{static interface IKnownContactFieldStatics(IKnownContactFieldStati fn ConvertTypeToName(&self, type_: ContactFieldType, out: *mut HSTRING) -> HRESULT }} impl IKnownContactFieldStatics { - #[inline] pub unsafe fn get_email(&self) -> Result { + #[inline] pub fn get_email(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Email)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_phone_number(&self) -> Result { + }} + #[inline] pub fn get_phone_number(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PhoneNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_location(&self) -> Result { + }} + #[inline] pub fn get_location(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Location)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_instant_message(&self) -> Result { + }} + #[inline] pub fn get_instant_message(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InstantMessage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn convert_name_to_type(&self, name: &HStringArg) -> Result { + }} + #[inline] pub fn convert_name_to_type(&self, name: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ConvertNameToType)(self as *const _ as *mut _, name.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn convert_type_to_name(&self, type_: ContactFieldType) -> Result { + }} + #[inline] pub fn convert_type_to_name(&self, type_: ContactFieldType) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConvertTypeToName)(self as *const _ as *mut _, type_, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IPinnedContactIdsQueryResult, 2107319634, 5497, 19932, 135, 31, 163, 10, 58, 234, 155, 161); RT_INTERFACE!{interface IPinnedContactIdsQueryResult(IPinnedContactIdsQueryResultVtbl): IInspectable(IInspectableVtbl) [IID_IPinnedContactIdsQueryResult] { - fn get_ContactIds(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_ContactIds(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IPinnedContactIdsQueryResult { - #[inline] pub unsafe fn get_contact_ids(&self) -> Result>> { + #[inline] pub fn get_contact_ids(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContactIds)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PinnedContactIdsQueryResult: IPinnedContactIdsQueryResult} DEFINE_IID!(IID_IPinnedContactManager, 4240208908, 57814, 17859, 184, 182, 163, 86, 4, 225, 103, 160); @@ -13984,65 +13984,65 @@ RT_INTERFACE!{interface IPinnedContactManager(IPinnedContactManagerVtbl): IInspe #[cfg(feature="windows-system")] fn get_User(&self, out: *mut *mut super::super::system::User) -> HRESULT, fn IsPinSurfaceSupported(&self, surface: PinnedContactSurface, out: *mut bool) -> HRESULT, fn IsContactPinned(&self, contact: *mut Contact, surface: PinnedContactSurface, out: *mut bool) -> HRESULT, - fn RequestPinContactAsync(&self, contact: *mut Contact, surface: PinnedContactSurface, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestPinContactsAsync(&self, contacts: *mut super::super::foundation::collections::IIterable, surface: PinnedContactSurface, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestUnpinContactAsync(&self, contact: *mut Contact, surface: PinnedContactSurface, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestPinContactAsync(&self, contact: *mut Contact, surface: PinnedContactSurface, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestPinContactsAsync(&self, contacts: *mut foundation::collections::IIterable, surface: PinnedContactSurface, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestUnpinContactAsync(&self, contact: *mut Contact, surface: PinnedContactSurface, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn SignalContactActivity(&self, contact: *mut Contact) -> HRESULT, - fn GetPinnedContactIdsAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetPinnedContactIdsAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IPinnedContactManager { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_user(&self) -> Result> { + #[cfg(feature="windows-system")] #[inline] pub fn get_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_User)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn is_pin_surface_supported(&self, surface: PinnedContactSurface) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn is_pin_surface_supported(&self, surface: PinnedContactSurface) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsPinSurfaceSupported)(self as *const _ as *mut _, surface, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_contact_pinned(&self, contact: &Contact, surface: PinnedContactSurface) -> Result { + }} + #[inline] pub fn is_contact_pinned(&self, contact: &Contact, surface: PinnedContactSurface) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsContactPinned)(self as *const _ as *mut _, contact as *const _ as *mut _, surface, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn request_pin_contact_async(&self, contact: &Contact, surface: PinnedContactSurface) -> Result>> { + }} + #[inline] pub fn request_pin_contact_async(&self, contact: &Contact, surface: PinnedContactSurface) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestPinContactAsync)(self as *const _ as *mut _, contact as *const _ as *mut _, surface, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_pin_contacts_async(&self, contacts: &super::super::foundation::collections::IIterable, surface: PinnedContactSurface) -> Result>> { + }} + #[inline] pub fn request_pin_contacts_async(&self, contacts: &foundation::collections::IIterable, surface: PinnedContactSurface) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestPinContactsAsync)(self as *const _ as *mut _, contacts as *const _ as *mut _, surface, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_unpin_contact_async(&self, contact: &Contact, surface: PinnedContactSurface) -> Result>> { + }} + #[inline] pub fn request_unpin_contact_async(&self, contact: &Contact, surface: PinnedContactSurface) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestUnpinContactAsync)(self as *const _ as *mut _, contact as *const _ as *mut _, surface, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn signal_contact_activity(&self, contact: &Contact) -> Result<()> { + }} + #[inline] pub fn signal_contact_activity(&self, contact: &Contact) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SignalContactActivity)(self as *const _ as *mut _, contact as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_pinned_contact_ids_async(&self) -> Result>> { + }} + #[inline] pub fn get_pinned_contact_ids_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPinnedContactIdsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PinnedContactManager: IPinnedContactManager} impl RtActivatable for PinnedContactManager {} impl PinnedContactManager { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} - #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::super::system::User) -> Result> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::super::system::User) -> Result>> { >::get_activation_factory().get_for_user(user) - }} - #[inline] pub fn is_supported() -> Result { unsafe { + } + #[inline] pub fn is_supported() -> Result { >::get_activation_factory().is_supported() - }} + } } DEFINE_CLSID!(PinnedContactManager(&[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,80,105,110,110,101,100,67,111,110,116,97,99,116,77,97,110,97,103,101,114,0]) [CLSID_PinnedContactManager]); DEFINE_IID!(IID_IPinnedContactManagerStatics, 4133276798, 65017, 18538, 172, 233, 188, 49, 29, 10, 231, 240); @@ -14053,21 +14053,21 @@ RT_INTERFACE!{static interface IPinnedContactManagerStatics(IPinnedContactManage fn IsSupported(&self, out: *mut bool) -> HRESULT }} impl IPinnedContactManagerStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self 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 get_for_user(&self, user: &super::super::system::User) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(&self, user: &super::super::system::User) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForUser)(self as *const _ as *mut _, user as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn is_supported(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn is_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum PinnedContactSurface: i32 { StartMenu (PinnedContactSurface_StartMenu) = 0, Taskbar (PinnedContactSurface_Taskbar) = 1, @@ -14076,170 +14076,170 @@ pub mod dataprovider { // Windows.ApplicationModel.Contacts.DataProvider use ::prelude::*; 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(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SyncRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_ServerSearchReadBatchRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ServerSearchReadBatchRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_SyncRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SyncRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ServerSearchReadBatchRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ServerSearchReadBatchRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn Start(&self) -> HRESULT }} impl IContactDataProviderConnection { - #[inline] pub unsafe fn add_sync_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub fn add_sync_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SyncRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_sync_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_sync_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SyncRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_server_search_read_batch_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_server_search_read_batch_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ServerSearchReadBatchRequested)(self as *const _ as *mut _, 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(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_server_search_read_batch_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ServerSearchReadBatchRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ContactDataProviderConnection: IContactDataProviderConnection} DEFINE_IID!(IID_IContactDataProviderConnection2, 2714970032, 6508, 19453, 143, 15, 198, 141, 103, 242, 73, 211); RT_INTERFACE!{interface IContactDataProviderConnection2(IContactDataProviderConnection2Vtbl): IInspectable(IInspectableVtbl) [IID_IContactDataProviderConnection2] { - fn add_CreateOrUpdateContactRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CreateOrUpdateContactRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_DeleteContactRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DeleteContactRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn add_CreateOrUpdateContactRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CreateOrUpdateContactRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_DeleteContactRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DeleteContactRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IContactDataProviderConnection2 { - #[inline] pub unsafe fn add_create_or_update_contact_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub fn add_create_or_update_contact_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CreateOrUpdateContactRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_create_or_update_contact_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_create_or_update_contact_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CreateOrUpdateContactRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_delete_contact_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_delete_contact_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DeleteContactRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_delete_contact_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_delete_contact_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DeleteContactRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut ContactDataProviderConnection) -> HRESULT }} impl IContactDataProviderTriggerDetails { - #[inline] pub unsafe fn get_connection(&self) -> Result> { + #[inline] pub fn get_connection(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Connection)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ContactDataProviderTriggerDetails: IContactDataProviderTriggerDetails} DEFINE_IID!(IID_IContactListCreateOrUpdateContactRequest, 3031384351, 51273, 18384, 177, 25, 145, 207, 96, 91, 47, 42); RT_INTERFACE!{interface IContactListCreateOrUpdateContactRequest(IContactListCreateOrUpdateContactRequestVtbl): IInspectable(IInspectableVtbl) [IID_IContactListCreateOrUpdateContactRequest] { fn get_ContactListId(&self, out: *mut HSTRING) -> HRESULT, fn get_Contact(&self, out: *mut *mut super::Contact) -> HRESULT, - fn ReportCompletedAsync(&self, createdOrUpdatedContact: *mut super::Contact, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportFailedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn ReportCompletedAsync(&self, createdOrUpdatedContact: *mut super::Contact, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IContactListCreateOrUpdateContactRequest { - #[inline] pub unsafe fn get_contact_list_id(&self) -> Result { + #[inline] pub fn get_contact_list_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContactListId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_contact(&self) -> Result> { + }} + #[inline] pub fn get_contact(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Contact)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed_async(&self, createdOrUpdatedContact: &super::Contact) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn report_completed_async(&self, createdOrUpdatedContact: &super::Contact) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportCompletedAsync)(self as *const _ as *mut _, createdOrUpdatedContact as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_failed_async(&self) -> Result> { + }} + #[inline] pub fn report_failed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportFailedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ContactListCreateOrUpdateContactRequest: IContactListCreateOrUpdateContactRequest} DEFINE_IID!(IID_IContactListCreateOrUpdateContactRequestEventArgs, 2233210512, 6737, 19212, 174, 239, 18, 64, 172, 91, 237, 117); RT_INTERFACE!{interface IContactListCreateOrUpdateContactRequestEventArgs(IContactListCreateOrUpdateContactRequestEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IContactListCreateOrUpdateContactRequestEventArgs] { fn get_Request(&self, out: *mut *mut ContactListCreateOrUpdateContactRequest) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IContactListCreateOrUpdateContactRequestEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ContactListCreateOrUpdateContactRequestEventArgs: IContactListCreateOrUpdateContactRequestEventArgs} DEFINE_IID!(IID_IContactListDeleteContactRequest, 1578190471, 52739, 19941, 133, 87, 156, 207, 85, 45, 71, 42); RT_INTERFACE!{interface IContactListDeleteContactRequest(IContactListDeleteContactRequestVtbl): IInspectable(IInspectableVtbl) [IID_IContactListDeleteContactRequest] { fn get_ContactListId(&self, out: *mut HSTRING) -> HRESULT, fn get_ContactId(&self, out: *mut HSTRING) -> HRESULT, - fn ReportCompletedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportFailedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn ReportCompletedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IContactListDeleteContactRequest { - #[inline] pub unsafe fn get_contact_list_id(&self) -> Result { + #[inline] pub fn get_contact_list_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContactListId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_contact_id(&self) -> Result { + }} + #[inline] pub fn get_contact_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContactId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed_async(&self) -> Result> { + }} + #[inline] pub fn report_completed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportCompletedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_failed_async(&self) -> Result> { + }} + #[inline] pub fn report_failed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportFailedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ContactListDeleteContactRequest: IContactListDeleteContactRequest} DEFINE_IID!(IID_IContactListDeleteContactRequestEventArgs, 2988463265, 59642, 19893, 147, 137, 45, 18, 238, 125, 21, 238); RT_INTERFACE!{interface IContactListDeleteContactRequestEventArgs(IContactListDeleteContactRequestEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IContactListDeleteContactRequestEventArgs] { fn get_Request(&self, out: *mut *mut ContactListDeleteContactRequest) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IContactListDeleteContactRequestEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ContactListDeleteContactRequestEventArgs: IContactListDeleteContactRequestEventArgs} DEFINE_IID!(IID_IContactListServerSearchReadBatchRequest, 3128388247, 16432, 18725, 159, 180, 20, 59, 41, 94, 101, 59); @@ -14248,106 +14248,106 @@ RT_INTERFACE!{interface IContactListServerSearchReadBatchRequest(IContactListSer fn get_ContactListId(&self, out: *mut HSTRING) -> HRESULT, fn get_Options(&self, out: *mut *mut super::ContactQueryOptions) -> HRESULT, fn get_SuggestedBatchSize(&self, out: *mut u32) -> HRESULT, - fn SaveContactAsync(&self, contact: *mut super::Contact, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportCompletedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportFailedAsync(&self, batchStatus: super::ContactBatchStatus, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn SaveContactAsync(&self, contact: *mut super::Contact, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportCompletedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&self, batchStatus: super::ContactBatchStatus, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IContactListServerSearchReadBatchRequest { - #[inline] pub unsafe fn get_session_id(&self) -> Result { + #[inline] pub fn get_session_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SessionId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_contact_list_id(&self) -> Result { + }} + #[inline] pub fn get_contact_list_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContactListId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_options(&self) -> Result> { + }} + #[inline] pub fn get_options(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Options)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_suggested_batch_size(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_suggested_batch_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SuggestedBatchSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn save_contact_async(&self, contact: &super::Contact) -> Result> { + }} + #[inline] pub fn save_contact_async(&self, contact: &super::Contact) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveContactAsync)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[inline] pub fn report_completed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportCompletedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_failed_async(&self, batchStatus: super::ContactBatchStatus) -> Result> { + }} + #[inline] pub fn report_failed_async(&self, batchStatus: super::ContactBatchStatus) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportFailedAsync)(self as *const _ as *mut _, batchStatus, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ContactListServerSearchReadBatchRequest: IContactListServerSearchReadBatchRequest} 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(&self, out: *mut *mut ContactListServerSearchReadBatchRequest) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IContactListServerSearchReadBatchRequestEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut HSTRING) -> HRESULT, - fn ReportCompletedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportFailedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn ReportCompletedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IContactListSyncManagerSyncRequest { - #[inline] pub unsafe fn get_contact_list_id(&self) -> Result { + #[inline] pub fn get_contact_list_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContactListId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed_async(&self) -> Result> { + }} + #[inline] pub fn report_completed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportCompletedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_failed_async(&self) -> Result> { + }} + #[inline] pub fn report_failed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportFailedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ContactListSyncManagerSyncRequest: IContactListSyncManagerSyncRequest} 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(&self, out: *mut *mut ContactListSyncManagerSyncRequest) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IContactListSyncManagerSyncRequestEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ContactListSyncManagerSyncRequestEventArgs: IContactListSyncManagerSyncRequestEventArgs} } // Windows.ApplicationModel.Contacts.DataProvider @@ -14361,74 +14361,74 @@ RT_INTERFACE!{interface IContactPickerUI(IContactPickerUIVtbl): IInspectable(IIn fn AddContact(&self, id: HSTRING, contact: *mut super::Contact, out: *mut AddContactResult) -> HRESULT, fn RemoveContact(&self, id: HSTRING) -> HRESULT, fn ContainsContact(&self, id: HSTRING, out: *mut bool) -> HRESULT, - fn get_DesiredFields(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_DesiredFields(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_SelectionMode(&self, out: *mut super::ContactSelectionMode) -> HRESULT, - fn add_ContactRemoved(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ContactRemoved(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn add_ContactRemoved(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ContactRemoved(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IContactPickerUI { - #[inline] pub unsafe fn add_contact(&self, id: &HStringArg, contact: &super::Contact) -> Result { + #[inline] pub fn add_contact(&self, id: &HStringArg, contact: &super::Contact) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).AddContact)(self as *const _ as *mut _, id.get(), contact as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_contact(&self, id: &HStringArg) -> Result<()> { + }} + #[inline] pub fn remove_contact(&self, id: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveContact)(self as *const _ as *mut _, id.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn contains_contact(&self, id: &HStringArg) -> Result { + }} + #[inline] pub fn contains_contact(&self, id: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ContainsContact)(self as *const _ as *mut _, id.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_desired_fields(&self) -> Result>> { + }} + #[inline] pub fn get_desired_fields(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DesiredFields)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_selection_mode(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_selection_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SelectionMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_contact_removed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_contact_removed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ContactRemoved)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_contact_removed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_contact_removed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ContactRemoved)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, contact: *mut super::Contact, out: *mut AddContactResult) -> HRESULT, - fn get_DesiredFieldsWithContactFieldType(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT + fn get_DesiredFieldsWithContactFieldType(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IContactPickerUI2 { - #[inline] pub unsafe fn add_contact(&self, contact: &super::Contact) -> Result { + #[inline] pub fn add_contact(&self, contact: &super::Contact) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).AddContact)(self as *const _ as *mut _, contact as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_desired_fields_with_contact_field_type(&self) -> Result>> { + }} + #[inline] pub fn get_desired_fields_with_contact_field_type(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DesiredFieldsWithContactFieldType)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut HSTRING) -> HRESULT }} impl IContactRemovedEventArgs { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ContactRemovedEventArgs: IContactRemovedEventArgs} } // Windows.ApplicationModel.Contacts.Provider @@ -14438,24 +14438,24 @@ use ::prelude::*; RT_CLASS!{static class Clipboard} impl RtActivatable for Clipboard {} impl Clipboard { - #[inline] pub fn get_content() -> Result> { unsafe { + #[inline] pub fn get_content() -> Result>> { >::get_activation_factory().get_content() - }} - #[inline] pub fn set_content(content: &DataPackage) -> Result<()> { unsafe { + } + #[inline] pub fn set_content(content: &DataPackage) -> Result<()> { >::get_activation_factory().set_content(content) - }} - #[inline] pub fn flush() -> Result<()> { unsafe { + } + #[inline] pub fn flush() -> Result<()> { >::get_activation_factory().flush() - }} - #[inline] pub fn clear() -> Result<()> { unsafe { + } + #[inline] pub fn clear() -> Result<()> { >::get_activation_factory().clear() - }} - #[inline] pub fn add_content_changed(changeHandler: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_content_changed(changeHandler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_content_changed(changeHandler) - }} - #[inline] pub fn remove_content_changed(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_content_changed(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_content_changed(token) - }} + } } DEFINE_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]) [CLSID_Clipboard]); DEFINE_IID!(IID_IClipboardStatics, 3324502673, 13538, 18787, 142, 237, 147, 203, 176, 234, 61, 112); @@ -14464,36 +14464,36 @@ RT_INTERFACE!{static interface IClipboardStatics(IClipboardStaticsVtbl): IInspec fn SetContent(&self, content: *mut DataPackage) -> HRESULT, fn Flush(&self) -> HRESULT, fn Clear(&self) -> HRESULT, - fn add_ContentChanged(&self, changeHandler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ContentChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ContentChanged(&self, changeHandler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ContentChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IClipboardStatics { - #[inline] pub unsafe fn get_content(&self) -> Result> { + #[inline] pub fn get_content(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetContent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_content(&self, content: &DataPackage) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_content(&self, content: &DataPackage) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetContent)(self as *const _ as *mut _, content as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn flush(&self) -> Result<()> { + }} + #[inline] pub fn flush(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Flush)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn clear(&self) -> Result<()> { + }} + #[inline] pub fn clear(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Clear)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_content_changed(&self, changeHandler: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_content_changed(&self, changeHandler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ContentChanged)(self as *const _ as *mut _, changeHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_content_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_content_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ContentChanged)(self as *const _ as *mut _, token); 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] { @@ -14501,134 +14501,134 @@ RT_INTERFACE!{interface IDataPackage(IDataPackageVtbl): IInspectable(IInspectabl fn get_Properties(&self, out: *mut *mut DataPackagePropertySet) -> HRESULT, fn get_RequestedOperation(&self, out: *mut DataPackageOperation) -> HRESULT, fn put_RequestedOperation(&self, value: DataPackageOperation) -> HRESULT, - fn add_OperationCompleted(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_OperationCompleted(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Destroyed(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Destroyed(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_OperationCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_OperationCompleted(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_Destroyed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Destroyed(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT, fn SetData(&self, formatId: HSTRING, value: *mut IInspectable) -> HRESULT, fn SetDataProvider(&self, formatId: HSTRING, delayRenderer: *mut DataProviderHandler) -> HRESULT, fn SetText(&self, value: HSTRING) -> HRESULT, - fn SetUri(&self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn SetUri(&self, value: *mut foundation::Uri) -> HRESULT, fn SetHtmlFormat(&self, value: HSTRING) -> HRESULT, - #[cfg(feature="windows-storage")] fn get_ResourceMap(&self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, + #[cfg(feature="windows-storage")] fn get_ResourceMap(&self, out: *mut *mut foundation::collections::IMap) -> HRESULT, fn SetRtf(&self, value: HSTRING) -> HRESULT, #[cfg(feature="windows-storage")] fn SetBitmap(&self, value: *mut super::super::storage::streams::RandomAccessStreamReference) -> HRESULT, - #[cfg(feature="windows-storage")] fn SetStorageItemsReadOnly(&self, value: *mut super::super::foundation::collections::IIterable) -> HRESULT, - #[cfg(feature="windows-storage")] fn SetStorageItems(&self, value: *mut super::super::foundation::collections::IIterable, readOnly: bool) -> HRESULT + #[cfg(feature="windows-storage")] fn SetStorageItemsReadOnly(&self, value: *mut foundation::collections::IIterable) -> HRESULT, + #[cfg(feature="windows-storage")] fn SetStorageItems(&self, value: *mut foundation::collections::IIterable, readOnly: bool) -> HRESULT }} impl IDataPackage { - #[inline] pub unsafe fn get_view(&self) -> Result> { + #[inline] pub fn get_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_requested_operation(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_requested_operation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RequestedOperation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_requested_operation(&self, value: DataPackageOperation) -> Result<()> { + }} + #[inline] pub fn set_requested_operation(&self, value: DataPackageOperation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RequestedOperation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_operation_completed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_operation_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_OperationCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_operation_completed(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_operation_completed(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_OperationCompleted)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_destroyed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_destroyed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Destroyed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_destroyed(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_destroyed(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Destroyed)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_data(&self, formatId: &HStringArg, value: &IInspectable) -> Result<()> { + }} + #[inline] pub fn set_data(&self, formatId: &HStringArg, value: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetData)(self as *const _ as *mut _, formatId.get(), value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_data_provider(&self, formatId: &HStringArg, delayRenderer: &DataProviderHandler) -> Result<()> { + }} + #[inline] pub fn set_data_provider(&self, formatId: &HStringArg, delayRenderer: &DataProviderHandler) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetDataProvider)(self as *const _ as *mut _, formatId.get(), delayRenderer as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_text(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_text(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetText)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_uri(&self, value: &super::super::foundation::Uri) -> Result<()> { + }} + #[inline] pub fn set_uri(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetUri)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_html_format(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_html_format(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetHtmlFormat)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_resource_map(&self) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_resource_map(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResourceMap)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_rtf(&self, value: &HStringArg) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_rtf(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetRtf)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn set_bitmap(&self, value: &super::super::storage::streams::RandomAccessStreamReference) -> Result<()> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_bitmap(&self, value: &super::super::storage::streams::RandomAccessStreamReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetBitmap)(self as *const _ as *mut _, 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(&self, value: &super::super::foundation::collections::IIterable) -> Result<()> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_storage_items_read_only(&self, value: &foundation::collections::IIterable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetStorageItemsReadOnly)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn set_storage_items(&self, value: &super::super::foundation::collections::IIterable, readOnly: bool) -> Result<()> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_storage_items(&self, value: &foundation::collections::IIterable, readOnly: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetStorageItems)(self as *const _ as *mut _, value as *const _ as *mut _, readOnly); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DataPackage: IDataPackage} impl RtActivatable for DataPackage {} DEFINE_CLSID!(DataPackage(&[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,80,97,99,107,97,103,101,0]) [CLSID_DataPackage]); 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(&self, value: *mut super::super::foundation::Uri) -> HRESULT, - fn SetWebLink(&self, value: *mut super::super::foundation::Uri) -> HRESULT + fn SetApplicationLink(&self, value: *mut foundation::Uri) -> HRESULT, + fn SetWebLink(&self, value: *mut foundation::Uri) -> HRESULT }} impl IDataPackage2 { - #[inline] pub unsafe fn set_application_link(&self, value: &super::super::foundation::Uri) -> Result<()> { + #[inline] pub fn set_application_link(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetApplicationLink)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_web_link(&self, value: &super::super::foundation::Uri) -> Result<()> { + }} + #[inline] pub fn set_web_link(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetWebLink)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IDataPackage3, 2297634653, 30843, 19762, 150, 90, 169, 131, 129, 5, 160, 86); RT_INTERFACE!{interface IDataPackage3(IDataPackage3Vtbl): IInspectable(IInspectableVtbl) [IID_IDataPackage3] { - fn add_ShareCompleted(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ShareCompleted(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ShareCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ShareCompleted(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IDataPackage3 { - #[inline] pub unsafe fn add_share_completed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_share_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ShareCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_share_completed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_share_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ShareCompleted)(self as *const _ as *mut _, token); 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, @@ -14643,71 +14643,71 @@ RT_INTERFACE!{interface IDataPackagePropertySet(IDataPackagePropertySetVtbl): II #[cfg(feature="windows-storage")] fn get_Thumbnail(&self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy5(&self) -> (), #[cfg(feature="windows-storage")] fn put_Thumbnail(&self, value: *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, - fn get_FileTypes(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_FileTypes(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_ApplicationName(&self, out: *mut HSTRING) -> HRESULT, fn put_ApplicationName(&self, value: HSTRING) -> HRESULT, - fn get_ApplicationListingUri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_ApplicationListingUri(&self, value: *mut super::super::foundation::Uri) -> HRESULT + fn get_ApplicationListingUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_ApplicationListingUri(&self, value: *mut foundation::Uri) -> HRESULT }} impl IDataPackagePropertySet { - #[inline] pub unsafe fn get_title(&self) -> Result { + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_title(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_title(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Title)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_description(&self) -> Result { + }} + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_description(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_description(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Description)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_thumbnail(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_thumbnail(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Thumbnail)(self 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_thumbnail(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_thumbnail(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Thumbnail)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_file_types(&self) -> Result>> { + }} + #[inline] pub fn get_file_types(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FileTypes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_application_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_application_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ApplicationName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_application_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_application_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ApplicationName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_application_listing_uri(&self) -> Result> { + }} + #[inline] pub fn get_application_listing_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ApplicationListingUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_application_listing_uri(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_application_listing_uri(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ApplicationListingUri)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DataPackagePropertySet: IDataPackagePropertySet} 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(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_ContentSourceWebLink(&self, value: *mut super::super::foundation::Uri) -> HRESULT, - fn get_ContentSourceApplicationLink(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_ContentSourceApplicationLink(&self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_ContentSourceWebLink(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_ContentSourceWebLink(&self, value: *mut foundation::Uri) -> HRESULT, + fn get_ContentSourceApplicationLink(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_ContentSourceApplicationLink(&self, value: *mut foundation::Uri) -> HRESULT, fn get_PackageFamilyName(&self, out: *mut HSTRING) -> HRESULT, fn put_PackageFamilyName(&self, value: HSTRING) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy6(&self) -> (), @@ -14718,51 +14718,51 @@ RT_INTERFACE!{interface IDataPackagePropertySet2(IDataPackagePropertySet2Vtbl): #[cfg(feature="windows-ui")] fn put_LogoBackgroundColor(&self, value: super::super::ui::Color) -> HRESULT }} impl IDataPackagePropertySet2 { - #[inline] pub unsafe fn get_content_source_web_link(&self) -> Result> { + #[inline] pub fn get_content_source_web_link(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContentSourceWebLink)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_content_source_web_link(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_content_source_web_link(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ContentSourceWebLink)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_content_source_application_link(&self) -> Result> { + }} + #[inline] pub fn get_content_source_application_link(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContentSourceApplicationLink)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_content_source_application_link(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_content_source_application_link(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ContentSourceApplicationLink)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_package_family_name(&self) -> Result { + }} + #[inline] pub fn get_package_family_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PackageFamilyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_package_family_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_package_family_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PackageFamilyName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_square30x30_logo(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_square30x30_logo(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Square30x30Logo)(self 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_square30x30_logo(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_square30x30_logo(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Square30x30Logo)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_logo_background_color(&self) -> Result { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_logo_background_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LogoBackgroundColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn set_logo_background_color(&self, value: super::super::ui::Color) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_logo_background_color(&self, value: super::super::ui::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LogoBackgroundColor)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IDataPackagePropertySet3, 2659712411, 20997, 16411, 135, 74, 69, 86, 83, 189, 57, 232); RT_INTERFACE!{interface IDataPackagePropertySet3(IDataPackagePropertySet3Vtbl): IInspectable(IInspectableVtbl) [IID_IDataPackagePropertySet3] { @@ -14770,15 +14770,15 @@ RT_INTERFACE!{interface IDataPackagePropertySet3(IDataPackagePropertySet3Vtbl): fn put_EnterpriseId(&self, value: HSTRING) -> HRESULT }} impl IDataPackagePropertySet3 { - #[inline] pub unsafe fn get_enterprise_id(&self) -> Result { + #[inline] pub fn get_enterprise_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EnterpriseId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_enterprise_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_enterprise_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_EnterpriseId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IDataPackagePropertySetView, 3108826113, 3098, 19543, 190, 85, 117, 208, 18, 137, 115, 93); RT_INTERFACE!{interface IDataPackagePropertySetView(IDataPackagePropertySetViewVtbl): IInspectable(IInspectableVtbl) [IID_IDataPackagePropertySetView] { @@ -14786,238 +14786,238 @@ RT_INTERFACE!{interface IDataPackagePropertySetView(IDataPackagePropertySetViewV fn get_Description(&self, out: *mut HSTRING) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy2(&self) -> (), #[cfg(feature="windows-storage")] fn get_Thumbnail(&self, out: *mut *mut super::super::storage::streams::RandomAccessStreamReference) -> HRESULT, - fn get_FileTypes(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_FileTypes(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_ApplicationName(&self, out: *mut HSTRING) -> HRESULT, - fn get_ApplicationListingUri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT + fn get_ApplicationListingUri(&self, out: *mut *mut foundation::Uri) -> HRESULT }} impl IDataPackagePropertySetView { - #[inline] pub unsafe fn get_title(&self) -> Result { + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_description(&self) -> Result { + }} + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self 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 get_thumbnail(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_thumbnail(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Thumbnail)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_file_types(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_file_types(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FileTypes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_application_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_application_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ApplicationName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_application_listing_uri(&self) -> Result> { + }} + #[inline] pub fn get_application_listing_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ApplicationListingUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DataPackagePropertySetView: IDataPackagePropertySetView} 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(&self, out: *mut HSTRING) -> HRESULT, - fn get_ContentSourceWebLink(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn get_ContentSourceApplicationLink(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn get_ContentSourceWebLink(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn get_ContentSourceApplicationLink(&self, out: *mut *mut foundation::Uri) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy3(&self) -> (), #[cfg(feature="windows-storage")] fn get_Square30x30Logo(&self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, #[cfg(feature="windows-ui")] fn get_LogoBackgroundColor(&self, out: *mut super::super::ui::Color) -> HRESULT }} impl IDataPackagePropertySetView2 { - #[inline] pub unsafe fn get_package_family_name(&self) -> Result { + #[inline] pub fn get_package_family_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PackageFamilyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_content_source_web_link(&self) -> Result> { + }} + #[inline] pub fn get_content_source_web_link(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContentSourceWebLink)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_content_source_application_link(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_content_source_application_link(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContentSourceApplicationLink)(self 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_square30x30_logo(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_square30x30_logo(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Square30x30Logo)(self 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_logo_background_color(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_logo_background_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LogoBackgroundColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, out: *mut HSTRING) -> HRESULT }} impl IDataPackagePropertySetView3 { - #[inline] pub unsafe fn get_enterprise_id(&self) -> Result { + #[inline] pub fn get_enterprise_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EnterpriseId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut DataPackagePropertySetView) -> HRESULT, fn get_RequestedOperation(&self, out: *mut DataPackageOperation) -> HRESULT, fn ReportOperationCompleted(&self, value: DataPackageOperation) -> HRESULT, - fn get_AvailableFormats(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_AvailableFormats(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn Contains(&self, formatId: HSTRING, out: *mut bool) -> HRESULT, - fn GetDataAsync(&self, formatId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetTextAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetCustomTextAsync(&self, formatId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetUriAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetHtmlFormatAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn GetResourceMapAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetRtfAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn GetBitmapAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn GetStorageItemsAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn GetDataAsync(&self, formatId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetTextAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetCustomTextAsync(&self, formatId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetUriAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetHtmlFormatAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn GetResourceMapAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetRtfAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn GetBitmapAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn GetStorageItemsAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IDataPackageView { - #[inline] pub unsafe fn get_properties(&self) -> Result> { + #[inline] pub fn get_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_requested_operation(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_requested_operation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RequestedOperation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn report_operation_completed(&self, value: DataPackageOperation) -> Result<()> { + }} + #[inline] pub fn report_operation_completed(&self, value: DataPackageOperation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportOperationCompleted)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_available_formats(&self) -> Result>> { + }} + #[inline] pub fn get_available_formats(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AvailableFormats)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn contains(&self, formatId: &HStringArg) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn contains(&self, formatId: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).Contains)(self as *const _ as *mut _, formatId.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_data_async(&self, formatId: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_data_async(&self, formatId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDataAsync)(self as *const _ as *mut _, formatId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_text_async(&self) -> Result>> { + }} + #[inline] pub fn get_text_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetTextAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_custom_text_async(&self, formatId: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_custom_text_async(&self, formatId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCustomTextAsync)(self as *const _ as *mut _, formatId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_uri_async(&self) -> Result>> { + }} + #[inline] pub fn get_uri_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetUriAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_html_format_async(&self) -> Result>> { + }} + #[inline] pub fn get_html_format_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetHtmlFormatAsync)(self 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_resource_map_async(&self) -> Result>>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_resource_map_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetResourceMapAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rtf_async(&self) -> Result>> { + }} + #[inline] pub fn get_rtf_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetRtfAsync)(self 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_bitmap_async(&self) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_bitmap_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetBitmapAsync)(self 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_storage_items_async(&self) -> Result>>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_storage_items_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetStorageItemsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class DataPackageView: IDataPackageView} 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetWebLinkAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetApplicationLinkAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetWebLinkAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IDataPackageView2 { - #[inline] pub unsafe fn get_application_link_async(&self) -> Result>> { + #[inline] pub fn get_application_link_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetApplicationLinkAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_web_link_async(&self) -> Result>> { + }} + #[inline] pub fn get_web_link_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetWebLinkAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-security")] fn RequestAccessWithEnterpriseIdAsync(&self, enterpriseId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-security")] fn RequestAccessAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-security")] fn RequestAccessWithEnterpriseIdAsync(&self, enterpriseId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(feature="windows-security")] fn UnlockAndAssumeEnterpriseIdentity(&self, out: *mut super::super::security::enterprisedata::ProtectionPolicyEvaluationResult) -> HRESULT }} impl IDataPackageView3 { - #[cfg(feature="windows-security")] #[inline] pub unsafe fn request_access_async(&self) -> Result>> { + #[cfg(feature="windows-security")] #[inline] pub fn request_access_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessAsync)(self 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_access_with_enterprise_id_async(&self, enterpriseId: &HStringArg) -> Result>> { + }} + #[cfg(feature="windows-security")] #[inline] pub fn request_access_with_enterprise_id_async(&self, enterpriseId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessWithEnterpriseIdAsync)(self as *const _ as *mut _, 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(&self) -> Result { + }} + #[cfg(feature="windows-security")] #[inline] pub fn unlock_and_assume_enterprise_identity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).UnlockAndAssumeEnterpriseIdentity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, formatId: HSTRING) -> HRESULT }} impl IDataPackageView4 { - #[inline] pub unsafe fn set_accepted_format_id(&self, formatId: &HStringArg) -> Result<()> { + #[inline] pub fn set_accepted_format_id(&self, formatId: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetAcceptedFormatId)(self as *const _ as *mut _, formatId.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self) -> HRESULT }} impl IDataProviderDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DataProviderDeferral: IDataProviderDeferral} DEFINE_IID!(IID_DataProviderHandler, 3891058464, 62196, 18989, 146, 14, 23, 10, 47, 72, 42, 39); @@ -15025,72 +15025,72 @@ RT_DELEGATE!{delegate DataProviderHandler(DataProviderHandlerVtbl, DataProviderH fn Invoke(&self, request: *mut DataProviderRequest) -> HRESULT }} impl DataProviderHandler { - #[inline] pub unsafe fn invoke(&self, request: &DataProviderRequest) -> Result<()> { + #[inline] pub fn invoke(&self, request: &DataProviderRequest) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, request as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut HSTRING) -> HRESULT, - fn get_Deadline(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Deadline(&self, out: *mut foundation::DateTime) -> HRESULT, fn GetDeferral(&self, out: *mut *mut DataProviderDeferral) -> HRESULT, fn SetData(&self, value: *mut IInspectable) -> HRESULT }} impl IDataProviderRequest { - #[inline] pub unsafe fn get_format_id(&self) -> Result { + #[inline] pub fn get_format_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FormatId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deadline(&self) -> Result { + }} + #[inline] pub fn get_deadline(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Deadline)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_data(&self, value: &IInspectable) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_data(&self, value: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetData)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DataProviderRequest: IDataProviderRequest} 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(&self, out: *mut *mut DataPackage) -> HRESULT, fn put_Data(&self, value: *mut DataPackage) -> HRESULT, - fn get_Deadline(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Deadline(&self, out: *mut foundation::DateTime) -> HRESULT, fn FailWithDisplayText(&self, value: HSTRING) -> HRESULT, fn GetDeferral(&self, out: *mut *mut DataRequestDeferral) -> HRESULT }} impl IDataRequest { - #[inline] pub unsafe fn get_data(&self) -> Result> { + #[inline] pub fn get_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Data)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_data(&self, value: &DataPackage) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_data(&self, value: &DataPackage) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Data)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_deadline(&self) -> Result { + }} + #[inline] pub fn get_deadline(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Deadline)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn fail_with_display_text(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn fail_with_display_text(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).FailWithDisplayText)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DataRequest: IDataRequest} DEFINE_IID!(IID_IDataRequestDeferral, 1841608863, 902, 16995, 135, 193, 237, 125, 206, 48, 137, 14); @@ -15098,10 +15098,10 @@ RT_INTERFACE!{interface IDataRequestDeferral(IDataRequestDeferralVtbl): IInspect fn Complete(&self) -> HRESULT }} impl IDataRequestDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DataRequestDeferral: IDataRequestDeferral} DEFINE_IID!(IID_IDataRequestedEventArgs, 3414927367, 27333, 17353, 138, 197, 155, 162, 50, 22, 49, 130); @@ -15109,74 +15109,74 @@ RT_INTERFACE!{interface IDataRequestedEventArgs(IDataRequestedEventArgsVtbl): II fn get_Request(&self, out: *mut *mut DataRequest) -> HRESULT }} impl IDataRequestedEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DataRequestedEventArgs: IDataRequestedEventArgs} 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(&self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DataRequested(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_TargetApplicationChosen(&self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_TargetApplicationChosen(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_DataRequested(&self, eventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DataRequested(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_TargetApplicationChosen(&self, eventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_TargetApplicationChosen(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT }} impl IDataTransferManager { - #[inline] pub unsafe fn add_data_requested(&self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_data_requested(&self, eventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DataRequested)(self as *const _ as *mut _, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_data_requested(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_data_requested(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DataRequested)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_target_application_chosen(&self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_target_application_chosen(&self, eventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_TargetApplicationChosen)(self as *const _ as *mut _, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_target_application_chosen(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_target_application_chosen(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_TargetApplicationChosen)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DataTransferManager: IDataTransferManager} impl RtActivatable for DataTransferManager {} impl RtActivatable for DataTransferManager {} impl RtActivatable for DataTransferManager {} impl DataTransferManager { - #[inline] pub fn show_share_ui() -> Result<()> { unsafe { + #[inline] pub fn show_share_ui() -> Result<()> { >::get_activation_factory().show_share_ui() - }} - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + } + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} - #[inline] pub fn is_supported() -> Result { unsafe { + } + #[inline] pub fn is_supported() -> Result { >::get_activation_factory().is_supported() - }} - #[inline] pub fn show_share_uiwith_options(options: &ShareUIOptions) -> Result<()> { unsafe { + } + #[inline] pub fn show_share_uiwith_options(options: &ShareUIOptions) -> Result<()> { >::get_activation_factory().show_share_uiwith_options(options) - }} + } } DEFINE_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]) [CLSID_DataTransferManager]); DEFINE_IID!(IID_IDataTransferManager2, 816741745, 35752, 19458, 142, 63, 221, 178, 59, 56, 135, 21); RT_INTERFACE!{interface IDataTransferManager2(IDataTransferManager2Vtbl): IInspectable(IInspectableVtbl) [IID_IDataTransferManager2] { - fn add_ShareProvidersRequested(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ShareProvidersRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ShareProvidersRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ShareProvidersRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IDataTransferManager2 { - #[inline] pub unsafe fn add_share_providers_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_share_providers_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ShareProvidersRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_share_providers_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_share_providers_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ShareProvidersRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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] { @@ -15184,46 +15184,46 @@ RT_INTERFACE!{static interface IDataTransferManagerStatics(IDataTransferManagerS fn GetForCurrentView(&self, out: *mut *mut DataTransferManager) -> HRESULT }} impl IDataTransferManagerStatics { - #[inline] pub unsafe fn show_share_ui(&self) -> Result<()> { + #[inline] pub fn show_share_ui(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ShowShareUI)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + }} + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut bool) -> HRESULT }} impl IDataTransferManagerStatics2 { - #[inline] pub unsafe fn is_supported(&self) -> Result { + #[inline] pub fn is_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IDataTransferManagerStatics3, 92558451, 27778, 20316, 172, 35, 98, 228, 88, 54, 31, 172); RT_INTERFACE!{static interface IDataTransferManagerStatics3(IDataTransferManagerStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IDataTransferManagerStatics3] { fn ShowShareUIWithOptions(&self, options: *mut ShareUIOptions) -> HRESULT }} impl IDataTransferManagerStatics3 { - #[inline] pub unsafe fn show_share_uiwith_options(&self, options: &ShareUIOptions) -> Result<()> { + #[inline] pub fn show_share_uiwith_options(&self, options: &ShareUIOptions) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ShowShareUIWithOptions)(self as *const _ as *mut _, options as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{static class HtmlFormatHelper} impl RtActivatable for HtmlFormatHelper {} impl HtmlFormatHelper { - #[inline] pub fn get_static_fragment(htmlFormat: &HStringArg) -> Result { unsafe { + #[inline] pub fn get_static_fragment(htmlFormat: &HStringArg) -> Result { >::get_activation_factory().get_static_fragment(htmlFormat) - }} - #[inline] pub fn create_html_format(htmlFragment: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn create_html_format(htmlFragment: &HStringArg) -> Result { >::get_activation_factory().create_html_format(htmlFragment) - }} + } } DEFINE_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]) [CLSID_HtmlFormatHelper]); DEFINE_IID!(IID_IHtmlFormatHelperStatics, 3794696009, 56688, 17519, 174, 252, 97, 206, 229, 159, 101, 94); @@ -15232,27 +15232,27 @@ RT_INTERFACE!{static interface IHtmlFormatHelperStatics(IHtmlFormatHelperStatics fn CreateHtmlFormat(&self, htmlFragment: HSTRING, out: *mut HSTRING) -> HRESULT }} impl IHtmlFormatHelperStatics { - #[inline] pub unsafe fn get_static_fragment(&self, htmlFormat: &HStringArg) -> Result { + #[inline] pub fn get_static_fragment(&self, htmlFormat: &HStringArg) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetStaticFragment)(self as *const _ as *mut _, htmlFormat.get(), &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_html_format(&self, htmlFragment: &HStringArg) -> Result { + }} + #[inline] pub fn create_html_format(&self, htmlFragment: &HStringArg) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateHtmlFormat)(self as *const _ as *mut _, htmlFragment.get(), &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut DataPackageOperation) -> HRESULT }} impl IOperationCompletedEventArgs { - #[inline] pub unsafe fn get_operation(&self) -> Result { + #[inline] pub fn get_operation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Operation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class OperationCompletedEventArgs: IOperationCompletedEventArgs} DEFINE_IID!(IID_IOperationCompletedEventArgs2, 2240782451, 7705, 16645, 178, 247, 200, 71, 136, 8, 213, 98); @@ -15260,36 +15260,36 @@ RT_INTERFACE!{interface IOperationCompletedEventArgs2(IOperationCompletedEventAr fn get_AcceptedFormatId(&self, out: *mut HSTRING) -> HRESULT }} impl IOperationCompletedEventArgs2 { - #[inline] pub unsafe fn get_accepted_format_id(&self) -> Result { + #[inline] pub fn get_accepted_format_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AcceptedFormatId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IShareCompletedEventArgs, 1165280322, 63763, 20320, 157, 247, 204, 64, 96, 171, 25, 22); RT_INTERFACE!{interface IShareCompletedEventArgs(IShareCompletedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IShareCompletedEventArgs] { fn get_ShareTarget(&self, out: *mut *mut ShareTargetInfo) -> HRESULT }} impl IShareCompletedEventArgs { - #[inline] pub unsafe fn get_share_target(&self) -> Result> { + #[inline] pub fn get_share_target(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ShareTarget)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ShareCompletedEventArgs: IShareCompletedEventArgs} RT_CLASS!{static class SharedStorageAccessManager} impl RtActivatable for SharedStorageAccessManager {} impl SharedStorageAccessManager { - #[cfg(feature="windows-storage")] #[inline] pub fn add_file(file: &super::super::storage::IStorageFile) -> Result { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn add_file(file: &super::super::storage::IStorageFile) -> Result { >::get_activation_factory().add_file(file) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn redeem_token_for_file_async(token: &HStringArg) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn redeem_token_for_file_async(token: &HStringArg) -> Result>> { >::get_activation_factory().redeem_token_for_file_async(token) - }} - #[inline] pub fn remove_file(token: &HStringArg) -> Result<()> { unsafe { + } + #[inline] pub fn remove_file(token: &HStringArg) -> Result<()> { >::get_activation_factory().remove_file(token) - }} + } } DEFINE_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]) [CLSID_SharedStorageAccessManager]); DEFINE_IID!(IID_ISharedStorageAccessManagerStatics, 3323144922, 13489, 18505, 189, 95, 208, 159, 238, 49, 88, 197); @@ -15297,24 +15297,24 @@ RT_INTERFACE!{static interface ISharedStorageAccessManagerStatics(ISharedStorage #[cfg(not(feature="windows-storage"))] fn __Dummy0(&self) -> (), #[cfg(feature="windows-storage")] fn AddFile(&self, file: *mut super::super::storage::IStorageFile, out: *mut HSTRING) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-storage")] fn RedeemTokenForFileAsync(&self, token: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn RedeemTokenForFileAsync(&self, token: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn RemoveFile(&self, token: HSTRING) -> HRESULT }} impl ISharedStorageAccessManagerStatics { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn add_file(&self, file: &super::super::storage::IStorageFile) -> Result { + #[cfg(feature="windows-storage")] #[inline] pub fn add_file(&self, file: &super::super::storage::IStorageFile) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AddFile)(self as *const _ as *mut _, file 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 redeem_token_for_file_async(&self, token: &HStringArg) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn redeem_token_for_file_async(&self, token: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RedeemTokenForFileAsync)(self as *const _ as *mut _, token.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn remove_file(&self, token: &HStringArg) -> Result<()> { + }} + #[inline] pub fn remove_file(&self, token: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveFile)(self as *const _ as *mut _, token.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IShareProvider, 799793190, 17470, 19674, 175, 37, 141, 129, 7, 14, 253, 128); RT_INTERFACE!{interface IShareProvider(IShareProviderVtbl): IInspectable(IInspectableVtbl) [IID_IShareProvider] { @@ -15327,37 +15327,37 @@ RT_INTERFACE!{interface IShareProvider(IShareProviderVtbl): IInspectable(IInspec fn put_Tag(&self, value: *mut IInspectable) -> HRESULT }} impl IShareProvider { - #[inline] pub unsafe fn get_title(&self) -> Result { + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self 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 get_display_icon(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_display_icon(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayIcon)(self 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_background_color(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_background_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BackgroundColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_tag(&self) -> Result> { + }} + #[inline] pub fn get_tag(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Tag)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_tag(&self, value: &IInspectable) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_tag(&self, value: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Tag)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ShareProvider: IShareProvider} impl RtActivatable for ShareProvider {} impl ShareProvider { - #[cfg(all(feature="windows-storage",feature="windows-ui"))] #[inline] pub fn create(title: &HStringArg, displayIcon: &super::super::storage::streams::RandomAccessStreamReference, backgroundColor: super::super::ui::Color, handler: &ShareProviderHandler) -> Result> { unsafe { + #[cfg(all(feature="windows-storage",feature="windows-ui"))] #[inline] pub fn create(title: &HStringArg, displayIcon: &super::super::storage::streams::RandomAccessStreamReference, backgroundColor: super::super::ui::Color, handler: &ShareProviderHandler) -> Result> { >::get_activation_factory().create(title, displayIcon, backgroundColor, handler) - }} + } } DEFINE_CLSID!(ShareProvider(&[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,80,114,111,118,105,100,101,114,0]) [CLSID_ShareProvider]); DEFINE_IID!(IID_IShareProviderFactory, 388634444, 59294, 20333, 176, 125, 18, 143, 70, 158, 2, 150); @@ -15365,21 +15365,21 @@ RT_INTERFACE!{static interface IShareProviderFactory(IShareProviderFactoryVtbl): #[cfg(all(feature="windows-storage",feature="windows-ui"))] fn Create(&self, title: HSTRING, displayIcon: *mut super::super::storage::streams::RandomAccessStreamReference, backgroundColor: super::super::ui::Color, handler: *mut ShareProviderHandler, out: *mut *mut ShareProvider) -> HRESULT }} impl IShareProviderFactory { - #[cfg(all(feature="windows-storage",feature="windows-ui"))] #[inline] pub unsafe fn create(&self, title: &HStringArg, displayIcon: &super::super::storage::streams::RandomAccessStreamReference, backgroundColor: super::super::ui::Color, handler: &ShareProviderHandler) -> Result> { + #[cfg(all(feature="windows-storage",feature="windows-ui"))] #[inline] pub fn create(&self, title: &HStringArg, displayIcon: &super::super::storage::streams::RandomAccessStreamReference, backgroundColor: super::super::ui::Color, handler: &ShareProviderHandler) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, title.get(), displayIcon as *const _ as *mut _, backgroundColor, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ShareProviderHandler, 3891911098, 57786, 20045, 189, 101, 212, 56, 69, 211, 33, 47); RT_DELEGATE!{delegate ShareProviderHandler(ShareProviderHandlerVtbl, ShareProviderHandlerImpl) [IID_ShareProviderHandler] { fn Invoke(&self, operation: *mut ShareProviderOperation) -> HRESULT }} impl ShareProviderHandler { - #[inline] pub unsafe fn invoke(&self, operation: &ShareProviderOperation) -> Result<()> { + #[inline] pub fn invoke(&self, operation: &ShareProviderOperation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, operation as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IShareProviderOperation, 432994615, 54325, 16761, 182, 175, 20, 224, 73, 43, 105, 246); RT_INTERFACE!{interface IShareProviderOperation(IShareProviderOperationVtbl): IInspectable(IInspectableVtbl) [IID_IShareProviderOperation] { @@ -15388,44 +15388,44 @@ RT_INTERFACE!{interface IShareProviderOperation(IShareProviderOperationVtbl): II fn ReportCompleted(&self) -> HRESULT }} impl IShareProviderOperation { - #[inline] pub unsafe fn get_data(&self) -> Result> { + #[inline] pub fn get_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Data)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_provider(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_provider(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Provider)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn report_completed(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportCompleted)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ShareProviderOperation: IShareProviderOperation} DEFINE_IID!(IID_IShareProvidersRequestedEventArgs, 4169724758, 41976, 20430, 133, 228, 136, 38, 230, 59, 231, 153); RT_INTERFACE!{interface IShareProvidersRequestedEventArgs(IShareProvidersRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IShareProvidersRequestedEventArgs] { - fn get_Providers(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Providers(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_Data(&self, out: *mut *mut DataPackageView) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IShareProvidersRequestedEventArgs { - #[inline] pub unsafe fn get_providers(&self) -> Result>> { + #[inline] pub fn get_providers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Providers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_data(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Data)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ShareProvidersRequestedEventArgs: IShareProvidersRequestedEventArgs} DEFINE_IID!(IID_IShareTargetInfo, 945546759, 50920, 16660, 178, 148, 40, 243, 187, 111, 153, 4); @@ -15434,44 +15434,44 @@ RT_INTERFACE!{interface IShareTargetInfo(IShareTargetInfoVtbl): IInspectable(IIn fn get_ShareProvider(&self, out: *mut *mut ShareProvider) -> HRESULT }} impl IShareTargetInfo { - #[inline] pub unsafe fn get_app_user_model_id(&self) -> Result { + #[inline] pub fn get_app_user_model_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppUserModelId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_share_provider(&self) -> Result> { + }} + #[inline] pub fn get_share_provider(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ShareProvider)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ShareTargetInfo: IShareTargetInfo} DEFINE_IID!(IID_IShareUIOptions, 1929022080, 13359, 19856, 149, 81, 42, 224, 78, 55, 104, 12); RT_INTERFACE!{interface IShareUIOptions(IShareUIOptionsVtbl): IInspectable(IInspectableVtbl) [IID_IShareUIOptions] { fn get_Theme(&self, out: *mut ShareUITheme) -> HRESULT, fn put_Theme(&self, value: ShareUITheme) -> HRESULT, - fn get_SelectionRect(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_SelectionRect(&self, value: *mut super::super::foundation::IReference) -> HRESULT + fn get_SelectionRect(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_SelectionRect(&self, value: *mut foundation::IReference) -> HRESULT }} impl IShareUIOptions { - #[inline] pub unsafe fn get_theme(&self) -> Result { + #[inline] pub fn get_theme(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Theme)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_theme(&self, value: ShareUITheme) -> Result<()> { + }} + #[inline] pub fn set_theme(&self, value: ShareUITheme) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Theme)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_selection_rect(&self) -> Result>> { + }} + #[inline] pub fn get_selection_rect(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SelectionRect)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_selection_rect(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_selection_rect(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SelectionRect)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ShareUIOptions: IShareUIOptions} impl RtActivatable for ShareUIOptions {} @@ -15483,30 +15483,30 @@ RT_CLASS!{static class StandardDataFormats} impl RtActivatable for StandardDataFormats {} impl RtActivatable for StandardDataFormats {} impl StandardDataFormats { - #[inline] pub fn get_text() -> Result { unsafe { + #[inline] pub fn get_text() -> Result { >::get_activation_factory().get_text() - }} - #[inline] pub fn get_uri() -> Result { unsafe { + } + #[inline] pub fn get_uri() -> Result { >::get_activation_factory().get_uri() - }} - #[inline] pub fn get_html() -> Result { unsafe { + } + #[inline] pub fn get_html() -> Result { >::get_activation_factory().get_html() - }} - #[inline] pub fn get_rtf() -> Result { unsafe { + } + #[inline] pub fn get_rtf() -> Result { >::get_activation_factory().get_rtf() - }} - #[inline] pub fn get_bitmap() -> Result { unsafe { + } + #[inline] pub fn get_bitmap() -> Result { >::get_activation_factory().get_bitmap() - }} - #[inline] pub fn get_storage_items() -> Result { unsafe { + } + #[inline] pub fn get_storage_items() -> Result { >::get_activation_factory().get_storage_items() - }} - #[inline] pub fn get_web_link() -> Result { unsafe { + } + #[inline] pub fn get_web_link() -> Result { >::get_activation_factory().get_web_link() - }} - #[inline] pub fn get_application_link() -> Result { unsafe { + } + #[inline] pub fn get_application_link() -> Result { >::get_activation_factory().get_application_link() - }} + } } DEFINE_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]) [CLSID_StandardDataFormats]); DEFINE_IID!(IID_IStandardDataFormatsStatics, 2127987105, 43136, 16585, 180, 237, 11, 238, 30, 21, 245, 73); @@ -15519,36 +15519,36 @@ RT_INTERFACE!{static interface IStandardDataFormatsStatics(IStandardDataFormatsS fn get_StorageItems(&self, out: *mut HSTRING) -> HRESULT }} impl IStandardDataFormatsStatics { - #[inline] pub unsafe fn get_text(&self) -> Result { + #[inline] pub fn get_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Text)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_uri(&self) -> Result { + }} + #[inline] pub fn get_uri(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Uri)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_html(&self) -> Result { + }} + #[inline] pub fn get_html(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Html)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rtf(&self) -> Result { + }} + #[inline] pub fn get_rtf(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Rtf)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_bitmap(&self) -> Result { + }} + #[inline] pub fn get_bitmap(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Bitmap)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_storage_items(&self) -> Result { + }} + #[inline] pub fn get_storage_items(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StorageItems)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } 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] { @@ -15556,27 +15556,27 @@ RT_INTERFACE!{static interface IStandardDataFormatsStatics2(IStandardDataFormats fn get_ApplicationLink(&self, out: *mut HSTRING) -> HRESULT }} impl IStandardDataFormatsStatics2 { - #[inline] pub unsafe fn get_web_link(&self) -> Result { + #[inline] pub fn get_web_link(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WebLink)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_application_link(&self) -> Result { + }} + #[inline] pub fn get_application_link(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ApplicationLink)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut HSTRING) -> HRESULT }} impl ITargetApplicationChosenEventArgs { - #[inline] pub unsafe fn get_application_name(&self) -> Result { + #[inline] pub fn get_application_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ApplicationName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class TargetApplicationChosenEventArgs: ITargetApplicationChosenEventArgs} pub mod dragdrop { // Windows.ApplicationModel.DataTransfer.DragDrop @@ -15588,37 +15588,37 @@ pub mod core { // Windows.ApplicationModel.DataTransfer.DragDrop.Core use ::prelude::*; 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(&self, value: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_TargetRequested(&self, value: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_TargetRequested(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_TargetRequested(&self, value: foundation::EventRegistrationToken) -> HRESULT, fn get_AreConcurrentOperationsEnabled(&self, out: *mut bool) -> HRESULT, fn put_AreConcurrentOperationsEnabled(&self, value: bool) -> HRESULT }} impl ICoreDragDropManager { - #[inline] pub unsafe fn add_target_requested(&self, value: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub fn add_target_requested(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_TargetRequested)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_target_requested(&self, value: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_target_requested(&self, value: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_TargetRequested)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_are_concurrent_operations_enabled(&self) -> Result { + }} + #[inline] pub fn get_are_concurrent_operations_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AreConcurrentOperationsEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_are_concurrent_operations_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_are_concurrent_operations_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AreConcurrentOperationsEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CoreDragDropManager: ICoreDragDropManager} impl RtActivatable for CoreDragDropManager {} impl CoreDragDropManager { - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} + } } DEFINE_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]) [CLSID_CoreDragDropManager]); DEFINE_IID!(IID_ICoreDragDropManagerStatics, 2504195530, 55826, 19484, 141, 6, 4, 29, 178, 151, 51, 195); @@ -15626,34 +15626,34 @@ RT_INTERFACE!{static interface ICoreDragDropManagerStatics(ICoreDragDropManagerS fn GetForCurrentView(&self, out: *mut *mut CoreDragDropManager) -> HRESULT }} impl ICoreDragDropManagerStatics { - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut *mut super::super::DataPackageView) -> HRESULT, fn get_Modifiers(&self, out: *mut super::DragDropModifiers) -> HRESULT, - fn get_Position(&self, out: *mut ::rt::gen::windows::foundation::Point) -> HRESULT + fn get_Position(&self, out: *mut foundation::Point) -> HRESULT }} impl ICoreDragInfo { - #[inline] pub unsafe fn get_data(&self) -> Result> { + #[inline] pub fn get_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Data)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_modifiers(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_modifiers(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Modifiers)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_position(&self) -> Result<::rt::gen::windows::foundation::Point> { + }} + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class CoreDragInfo: ICoreDragInfo} DEFINE_IID!(IID_ICoreDragInfo2, 3309736421, 59131, 19828, 180, 177, 138, 60, 23, 242, 94, 158); @@ -15661,11 +15661,11 @@ RT_INTERFACE!{interface ICoreDragInfo2(ICoreDragInfo2Vtbl): IInspectable(IInspec fn get_AllowedOperations(&self, out: *mut super::super::DataPackageOperation) -> HRESULT }} impl ICoreDragInfo2 { - #[inline] pub unsafe fn get_allowed_operations(&self) -> Result { + #[inline] pub fn get_allowed_operations(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AllowedOperations)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ICoreDragOperation, 3423002191, 28080, 20066, 171, 27, 167, 74, 2, 220, 109, 133); RT_INTERFACE!{interface ICoreDragOperation(ICoreDragOperationVtbl): IInspectable(IInspectableVtbl) [IID_ICoreDragOperation] { @@ -15674,43 +15674,43 @@ RT_INTERFACE!{interface ICoreDragOperation(ICoreDragOperationVtbl): IInspectable #[cfg(not(feature="windows-graphics"))] fn __Dummy2(&self) -> (), #[cfg(feature="windows-graphics")] fn SetDragUIContentFromSoftwareBitmap(&self, softwareBitmap: *mut ::rt::gen::windows::graphics::imaging::SoftwareBitmap) -> HRESULT, #[cfg(not(feature="windows-graphics"))] fn __Dummy3(&self) -> (), - #[cfg(feature="windows-graphics")] fn SetDragUIContentFromSoftwareBitmapWithAnchorPoint(&self, softwareBitmap: *mut ::rt::gen::windows::graphics::imaging::SoftwareBitmap, anchorPoint: ::rt::gen::windows::foundation::Point) -> HRESULT, + #[cfg(feature="windows-graphics")] fn SetDragUIContentFromSoftwareBitmapWithAnchorPoint(&self, softwareBitmap: *mut ::rt::gen::windows::graphics::imaging::SoftwareBitmap, anchorPoint: foundation::Point) -> HRESULT, fn get_DragUIContentMode(&self, out: *mut CoreDragUIContentMode) -> HRESULT, fn put_DragUIContentMode(&self, value: CoreDragUIContentMode) -> HRESULT, - fn StartAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn StartAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ICoreDragOperation { - #[inline] pub unsafe fn get_data(&self) -> Result> { + #[inline] pub fn get_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Data)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_pointer_id(&self, pointerId: u32) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_pointer_id(&self, pointerId: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetPointerId)(self as *const _ as *mut _, pointerId); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn set_drag_uicontent_from_software_bitmap(&self, softwareBitmap: &::rt::gen::windows::graphics::imaging::SoftwareBitmap) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn set_drag_uicontent_from_software_bitmap(&self, softwareBitmap: &::rt::gen::windows::graphics::imaging::SoftwareBitmap) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetDragUIContentFromSoftwareBitmap)(self as *const _ as *mut _, softwareBitmap as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn set_drag_uicontent_from_software_bitmap_with_anchor_point(&self, softwareBitmap: &::rt::gen::windows::graphics::imaging::SoftwareBitmap, anchorPoint: ::rt::gen::windows::foundation::Point) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn set_drag_uicontent_from_software_bitmap_with_anchor_point(&self, softwareBitmap: &::rt::gen::windows::graphics::imaging::SoftwareBitmap, anchorPoint: foundation::Point) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetDragUIContentFromSoftwareBitmapWithAnchorPoint)(self as *const _ as *mut _, softwareBitmap as *const _ as *mut _, anchorPoint); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_drag_uicontent_mode(&self) -> Result { + }} + #[inline] pub fn get_drag_uicontent_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DragUIContentMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_drag_uicontent_mode(&self, value: CoreDragUIContentMode) -> Result<()> { + }} + #[inline] pub fn set_drag_uicontent_mode(&self, value: CoreDragUIContentMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DragUIContentMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start_async(&self) -> Result>> { + }} + #[inline] pub fn start_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class CoreDragOperation: ICoreDragOperation} impl RtActivatable for CoreDragOperation {} @@ -15721,15 +15721,15 @@ RT_INTERFACE!{interface ICoreDragOperation2(ICoreDragOperation2Vtbl): IInspectab fn put_AllowedOperations(&self, value: super::super::DataPackageOperation) -> HRESULT }} impl ICoreDragOperation2 { - #[inline] pub unsafe fn get_allowed_operations(&self) -> Result { + #[inline] pub fn get_allowed_operations(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AllowedOperations)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_allowed_operations(&self, value: super::super::DataPackageOperation) -> Result<()> { + }} + #[inline] pub fn set_allowed_operations(&self, value: super::super::DataPackageOperation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AllowedOperations)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum CoreDragUIContentMode: u32 { Auto (CoreDragUIContentMode_Auto) = 0, Deferred (CoreDragUIContentMode_Deferred) = 1, @@ -15739,7 +15739,7 @@ RT_INTERFACE!{interface ICoreDragUIOverride(ICoreDragUIOverrideVtbl): IInspectab #[cfg(not(feature="windows-graphics"))] fn __Dummy0(&self) -> (), #[cfg(feature="windows-graphics")] fn SetContentFromSoftwareBitmap(&self, softwareBitmap: *mut ::rt::gen::windows::graphics::imaging::SoftwareBitmap) -> HRESULT, #[cfg(not(feature="windows-graphics"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-graphics")] fn SetContentFromSoftwareBitmapWithAnchorPoint(&self, softwareBitmap: *mut ::rt::gen::windows::graphics::imaging::SoftwareBitmap, anchorPoint: ::rt::gen::windows::foundation::Point) -> HRESULT, + #[cfg(feature="windows-graphics")] fn SetContentFromSoftwareBitmapWithAnchorPoint(&self, softwareBitmap: *mut ::rt::gen::windows::graphics::imaging::SoftwareBitmap, anchorPoint: foundation::Point) -> HRESULT, fn get_IsContentVisible(&self, out: *mut bool) -> HRESULT, fn put_IsContentVisible(&self, value: bool) -> HRESULT, fn get_Caption(&self, out: *mut HSTRING) -> HRESULT, @@ -15751,94 +15751,94 @@ RT_INTERFACE!{interface ICoreDragUIOverride(ICoreDragUIOverrideVtbl): IInspectab fn Clear(&self) -> HRESULT }} impl ICoreDragUIOverride { - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn set_content_from_software_bitmap(&self, softwareBitmap: &::rt::gen::windows::graphics::imaging::SoftwareBitmap) -> Result<()> { + #[cfg(feature="windows-graphics")] #[inline] pub fn set_content_from_software_bitmap(&self, softwareBitmap: &::rt::gen::windows::graphics::imaging::SoftwareBitmap) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetContentFromSoftwareBitmap)(self as *const _ as *mut _, 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(&self, softwareBitmap: &::rt::gen::windows::graphics::imaging::SoftwareBitmap, anchorPoint: ::rt::gen::windows::foundation::Point) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn set_content_from_software_bitmap_with_anchor_point(&self, softwareBitmap: &::rt::gen::windows::graphics::imaging::SoftwareBitmap, anchorPoint: foundation::Point) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetContentFromSoftwareBitmapWithAnchorPoint)(self as *const _ as *mut _, softwareBitmap as *const _ as *mut _, anchorPoint); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_content_visible(&self) -> Result { + }} + #[inline] pub fn get_is_content_visible(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsContentVisible)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_content_visible(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_content_visible(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsContentVisible)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_caption(&self) -> Result { + }} + #[inline] pub fn get_caption(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Caption)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_caption(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_caption(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Caption)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_caption_visible(&self) -> Result { + }} + #[inline] pub fn get_is_caption_visible(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCaptionVisible)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_caption_visible(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_caption_visible(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsCaptionVisible)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_glyph_visible(&self) -> Result { + }} + #[inline] pub fn get_is_glyph_visible(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsGlyphVisible)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_glyph_visible(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_glyph_visible(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsGlyphVisible)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn clear(&self) -> Result<()> { + }} + #[inline] pub fn clear(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Clear)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CoreDragUIOverride: ICoreDragUIOverride} 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(&self, dragInfo: *mut CoreDragInfo, dragUIOverride: *mut CoreDragUIOverride, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn OverAsync(&self, dragInfo: *mut CoreDragInfo, dragUIOverride: *mut CoreDragUIOverride, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn LeaveAsync(&self, dragInfo: *mut CoreDragInfo, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn DropAsync(&self, dragInfo: *mut CoreDragInfo, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn EnterAsync(&self, dragInfo: *mut CoreDragInfo, dragUIOverride: *mut CoreDragUIOverride, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn OverAsync(&self, dragInfo: *mut CoreDragInfo, dragUIOverride: *mut CoreDragUIOverride, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn LeaveAsync(&self, dragInfo: *mut CoreDragInfo, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn DropAsync(&self, dragInfo: *mut CoreDragInfo, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ICoreDropOperationTarget { - #[inline] pub unsafe fn enter_async(&self, dragInfo: &CoreDragInfo, dragUIOverride: &CoreDragUIOverride) -> Result>> { + #[inline] pub fn enter_async(&self, dragInfo: &CoreDragInfo, dragUIOverride: &CoreDragUIOverride) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).EnterAsync)(self as *const _ as *mut _, 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 over_async(&self, dragInfo: &CoreDragInfo, dragUIOverride: &CoreDragUIOverride) -> Result>> { + }} + #[inline] pub fn over_async(&self, dragInfo: &CoreDragInfo, dragUIOverride: &CoreDragUIOverride) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OverAsync)(self as *const _ as *mut _, 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 leave_async(&self, dragInfo: &CoreDragInfo) -> Result> { + }} + #[inline] pub fn leave_async(&self, dragInfo: &CoreDragInfo) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LeaveAsync)(self as *const _ as *mut _, dragInfo as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn drop_async(&self, dragInfo: &CoreDragInfo) -> Result>> { + }} + #[inline] pub fn drop_async(&self, dragInfo: &CoreDragInfo) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DropAsync)(self as *const _ as *mut _, dragInfo as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, target: *mut ICoreDropOperationTarget) -> HRESULT }} impl ICoreDropOperationTargetRequestedEventArgs { - #[inline] pub unsafe fn set_target(&self, target: &ICoreDropOperationTarget) -> Result<()> { + #[inline] pub fn set_target(&self, target: &ICoreDropOperationTarget) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetTarget)(self as *const _ as *mut _, target as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CoreDropOperationTargetRequestedEventArgs: ICoreDropOperationTargetRequestedEventArgs} } // Windows.ApplicationModel.DataTransfer.DragDrop.Core @@ -15855,47 +15855,47 @@ RT_INTERFACE!{interface IQuickLink(IQuickLinkVtbl): IInspectable(IInspectableVtb #[cfg(feature="windows-storage")] fn put_Thumbnail(&self, value: *mut ::rt::gen::windows::storage::streams::RandomAccessStreamReference) -> HRESULT, fn get_Id(&self, out: *mut HSTRING) -> HRESULT, fn put_Id(&self, value: HSTRING) -> HRESULT, - fn get_SupportedDataFormats(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, - fn get_SupportedFileTypes(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT + fn get_SupportedDataFormats(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_SupportedFileTypes(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IQuickLink { - #[inline] pub unsafe fn get_title(&self) -> Result { + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_title(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_title(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Title)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_thumbnail(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_thumbnail(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Thumbnail)(self 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_thumbnail(&self, value: &::rt::gen::windows::storage::streams::RandomAccessStreamReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_thumbnail(&self, value: &::rt::gen::windows::storage::streams::RandomAccessStreamReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Thumbnail)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&self) -> Result { + }} + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Id)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_data_formats(&self) -> Result>> { + }} + #[inline] pub fn get_supported_data_formats(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedDataFormats)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_file_types(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_supported_file_types(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedFileTypes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class QuickLink: IQuickLink} impl RtActivatable for QuickLink {} @@ -15913,44 +15913,44 @@ RT_INTERFACE!{interface IShareOperation(IShareOperationVtbl): IInspectable(IInsp fn ReportError(&self, value: HSTRING) -> HRESULT }} impl IShareOperation { - #[inline] pub unsafe fn get_data(&self) -> Result> { + #[inline] pub fn get_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Data)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_quick_link_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_quick_link_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_QuickLinkId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn remove_this_quick_link(&self) -> Result<()> { + }} + #[inline] pub fn remove_this_quick_link(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveThisQuickLink)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn report_started(&self) -> Result<()> { + }} + #[inline] pub fn report_started(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportStarted)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn report_data_retrieved(&self) -> Result<()> { + }} + #[inline] pub fn report_data_retrieved(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportDataRetrieved)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn report_submitted_background_task(&self) -> Result<()> { + }} + #[inline] pub fn report_submitted_background_task(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportSubmittedBackgroundTask)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed_with_quick_link(&self, quicklink: &QuickLink) -> Result<()> { + }} + #[inline] pub fn report_completed_with_quick_link(&self, quicklink: &QuickLink) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportCompletedWithQuickLink)(self as *const _ as *mut _, quicklink as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed(&self) -> Result<()> { + }} + #[inline] pub fn report_completed(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportCompleted)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn report_error(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn report_error(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportError)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ShareOperation: IShareOperation} DEFINE_IID!(IID_IShareOperation2, 268146625, 38776, 18953, 142, 91, 203, 94, 72, 45, 5, 85); @@ -15958,21 +15958,21 @@ RT_INTERFACE!{interface IShareOperation2(IShareOperation2Vtbl): IInspectable(IIn fn DismissUI(&self) -> HRESULT }} impl IShareOperation2 { - #[inline] pub unsafe fn dismiss_ui(&self) -> Result<()> { + #[inline] pub fn dismiss_ui(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).DismissUI)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IShareOperation3, 1593226114, 47015, 17777, 162, 166, 153, 74, 3, 73, 136, 178); RT_INTERFACE!{interface IShareOperation3(IShareOperation3Vtbl): IInspectable(IInspectableVtbl) [IID_IShareOperation3] { - fn get_Contacts(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn get_Contacts(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IShareOperation3 { - #[inline] pub unsafe fn get_contacts(&self) -> Result>> { + #[inline] pub fn get_contacts(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Contacts)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } } // Windows.ApplicationModel.DataTransfer.ShareTarget } // Windows.ApplicationModel.DataTransfer @@ -15986,36 +15986,36 @@ RT_INTERFACE!{interface IEmailAttachment(IEmailAttachmentVtbl): IInspectable(IIn #[cfg(feature="windows-storage")] fn put_Data(&self, value: *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT }} impl IEmailAttachment { - #[inline] pub unsafe fn get_file_name(&self) -> Result { + #[inline] pub fn get_file_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FileName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_file_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_file_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FileName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_data(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Data)(self 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_data(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_data(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Data)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class EmailAttachment: IEmailAttachment} impl RtActivatable for EmailAttachment {} impl RtActivatable for EmailAttachment {} impl RtActivatable for EmailAttachment {} impl EmailAttachment { - #[cfg(feature="windows-storage")] #[inline] pub fn create(fileName: &HStringArg, data: &super::super::storage::streams::IRandomAccessStreamReference) -> Result> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn create(fileName: &HStringArg, data: &super::super::storage::streams::IRandomAccessStreamReference) -> Result> { >::get_activation_factory().create(fileName, data) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn create2(fileName: &HStringArg, data: &super::super::storage::streams::IRandomAccessStreamReference, mimeType: &HStringArg) -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn create2(fileName: &HStringArg, data: &super::super::storage::streams::IRandomAccessStreamReference, mimeType: &HStringArg) -> Result> { >::get_activation_factory().create(fileName, data, mimeType) - }} + } } DEFINE_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]) [CLSID_EmailAttachment]); DEFINE_IID!(IID_IEmailAttachment2, 576655472, 45311, 17777, 157, 84, 167, 6, 196, 141, 85, 198); @@ -16036,70 +16036,70 @@ RT_INTERFACE!{interface IEmailAttachment2(IEmailAttachment2Vtbl): IInspectable(I fn put_MimeType(&self, value: HSTRING) -> HRESULT }} impl IEmailAttachment2 { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_content_id(&self) -> Result { + }} + #[inline] pub fn get_content_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContentId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_content_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_content_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ContentId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_content_location(&self) -> Result { + }} + #[inline] pub fn get_content_location(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContentLocation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_content_location(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_content_location(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ContentLocation)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_download_state(&self) -> Result { + }} + #[inline] pub fn get_download_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DownloadState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_download_state(&self, value: EmailAttachmentDownloadState) -> Result<()> { + }} + #[inline] pub fn set_download_state(&self, value: EmailAttachmentDownloadState) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DownloadState)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_estimated_download_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_estimated_download_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EstimatedDownloadSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_estimated_download_size_in_bytes(&self, value: u64) -> Result<()> { + }} + #[inline] pub fn set_estimated_download_size_in_bytes(&self, value: u64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_EstimatedDownloadSizeInBytes)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_from_base_message(&self) -> Result { + }} + #[inline] pub fn get_is_from_base_message(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsFromBaseMessage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_inline(&self) -> Result { + }} + #[inline] pub fn get_is_inline(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsInline)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_inline(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_inline(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsInline)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_mime_type(&self) -> Result { + }} + #[inline] pub fn get_mime_type(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MimeType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_mime_type(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_mime_type(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MimeType)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum EmailAttachmentDownloadState: i32 { NotDownloaded (EmailAttachmentDownloadState_NotDownloaded) = 0, Downloading (EmailAttachmentDownloadState_Downloading) = 1, Downloaded (EmailAttachmentDownloadState_Downloaded) = 2, Failed (EmailAttachmentDownloadState_Failed) = 3, @@ -16109,22 +16109,22 @@ RT_INTERFACE!{static interface IEmailAttachmentFactory(IEmailAttachmentFactoryVt #[cfg(feature="windows-storage")] fn Create(&self, fileName: HSTRING, data: *mut super::super::storage::streams::IRandomAccessStreamReference, out: *mut *mut EmailAttachment) -> HRESULT }} impl IEmailAttachmentFactory { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn create(&self, fileName: &HStringArg, data: &super::super::storage::streams::IRandomAccessStreamReference) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn create(&self, fileName: &HStringArg, data: &super::super::storage::streams::IRandomAccessStreamReference) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, fileName.get(), data as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, fileName: HSTRING, data: *mut super::super::storage::streams::IRandomAccessStreamReference, mimeType: HSTRING, out: *mut *mut EmailAttachment) -> HRESULT }} impl IEmailAttachmentFactory2 { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn create(&self, fileName: &HStringArg, data: &super::super::storage::streams::IRandomAccessStreamReference, mimeType: &HStringArg) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn create(&self, fileName: &HStringArg, data: &super::super::storage::streams::IRandomAccessStreamReference, mimeType: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, fileName.get(), data as *const _ as *mut _, mimeType.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum EmailBatchStatus: i32 { Success (EmailBatchStatus_Success) = 0, ServerSearchSyncManagerError (EmailBatchStatus_ServerSearchSyncManagerError) = 1, ServerSearchUnknownError (EmailBatchStatus_ServerSearchUnknownError) = 2, @@ -16142,120 +16142,120 @@ RT_INTERFACE!{interface IEmailConversation(IEmailConversationVtbl): IInspectable fn get_LastEmailResponseKind(&self, out: *mut EmailMessageResponseKind) -> HRESULT, fn get_MessageCount(&self, out: *mut u32) -> HRESULT, fn get_MostRecentMessageId(&self, out: *mut HSTRING) -> HRESULT, - fn get_MostRecentMessageTime(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_MostRecentMessageTime(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_Preview(&self, out: *mut HSTRING) -> HRESULT, fn get_LatestSender(&self, out: *mut *mut EmailRecipient) -> HRESULT, fn get_Subject(&self, out: *mut HSTRING) -> HRESULT, fn get_UnreadMessageCount(&self, out: *mut u32) -> HRESULT, - fn FindMessagesAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn FindMessagesWithCountAsync(&self, count: u32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn FindMessagesAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn FindMessagesWithCountAsync(&self, count: u32, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IEmailConversation { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mailbox_id(&self) -> Result { + }} + #[inline] pub fn get_mailbox_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MailboxId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_flag_state(&self) -> Result { + }} + #[inline] pub fn get_flag_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FlagState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_attachment(&self) -> Result { + }} + #[inline] pub fn get_has_attachment(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasAttachment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_importance(&self) -> Result { + }} + #[inline] pub fn get_importance(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Importance)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_last_email_response_kind(&self) -> Result { + }} + #[inline] pub fn get_last_email_response_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LastEmailResponseKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_message_count(&self) -> Result { + }} + #[inline] pub fn get_message_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MessageCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_most_recent_message_id(&self) -> Result { + }} + #[inline] pub fn get_most_recent_message_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MostRecentMessageId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_most_recent_message_time(&self) -> Result { + }} + #[inline] pub fn get_most_recent_message_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MostRecentMessageTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_preview(&self) -> Result { + }} + #[inline] pub fn get_preview(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Preview)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_latest_sender(&self) -> Result> { + }} + #[inline] pub fn get_latest_sender(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LatestSender)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_subject(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_subject(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Subject)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_unread_message_count(&self) -> Result { + }} + #[inline] pub fn get_unread_message_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UnreadMessageCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn find_messages_async(&self) -> Result>>> { + }} + #[inline] pub fn find_messages_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindMessagesAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_messages_with_count_async(&self, count: u32) -> Result>>> { + }} + #[inline] pub fn find_messages_with_count_async(&self, count: u32) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindMessagesWithCountAsync)(self as *const _ as *mut _, count, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class EmailConversation: IEmailConversation} 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Conversations(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_Status(&self, out: *mut EmailBatchStatus) -> HRESULT }} impl IEmailConversationBatch { - #[inline] pub unsafe fn get_conversations(&self) -> Result>> { + #[inline] pub fn get_conversations(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Conversations)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class EmailConversationBatch: IEmailConversationBatch} 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn ReadBatchAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IEmailConversationReader { - #[inline] pub unsafe fn read_batch_async(&self) -> Result>> { + #[inline] pub fn read_batch_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadBatchAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class EmailConversationReader: IEmailConversationReader} RT_ENUM! { enum EmailFlagState: i32 { @@ -16272,145 +16272,145 @@ RT_INTERFACE!{interface IEmailFolder(IEmailFolderVtbl): IInspectable(IInspectabl fn put_DisplayName(&self, value: HSTRING) -> HRESULT, fn get_IsSyncEnabled(&self, out: *mut bool) -> HRESULT, fn put_IsSyncEnabled(&self, value: bool) -> HRESULT, - fn get_LastSuccessfulSyncTime(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn put_LastSuccessfulSyncTime(&self, value: super::super::foundation::DateTime) -> HRESULT, + fn get_LastSuccessfulSyncTime(&self, out: *mut foundation::DateTime) -> HRESULT, + fn put_LastSuccessfulSyncTime(&self, value: foundation::DateTime) -> HRESULT, fn get_Kind(&self, out: *mut EmailSpecialFolderKind) -> HRESULT, - fn CreateFolderAsync(&self, name: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn DeleteAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn FindChildFoldersAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn CreateFolderAsync(&self, name: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn DeleteAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn FindChildFoldersAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, fn GetConversationReader(&self, out: *mut *mut EmailConversationReader) -> HRESULT, fn GetConversationReaderWithOptions(&self, options: *mut EmailQueryOptions, out: *mut *mut EmailConversationReader) -> HRESULT, - fn GetMessageAsync(&self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetMessageAsync(&self, id: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetMessageReader(&self, out: *mut *mut EmailMessageReader) -> HRESULT, fn GetMessageReaderWithOptions(&self, options: *mut EmailQueryOptions, out: *mut *mut EmailMessageReader) -> HRESULT, - fn GetMessageCountsAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryMoveAsync(&self, newParentFolder: *mut EmailFolder, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryMoveWithNewNameAsync(&self, newParentFolder: *mut EmailFolder, newFolderName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TrySaveAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn SaveMessageAsync(&self, message: *mut EmailMessage, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn GetMessageCountsAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryMoveAsync(&self, newParentFolder: *mut EmailFolder, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryMoveWithNewNameAsync(&self, newParentFolder: *mut EmailFolder, newFolderName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TrySaveAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn SaveMessageAsync(&self, message: *mut EmailMessage, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IEmailFolder { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_id(&self) -> Result { + }} + #[inline] pub fn get_remote_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_remote_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_remote_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RemoteId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_mailbox_id(&self) -> Result { + }} + #[inline] pub fn get_mailbox_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MailboxId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_parent_folder_id(&self) -> Result { + }} + #[inline] pub fn get_parent_folder_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ParentFolderId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_display_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_sync_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_sync_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSyncEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_sync_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_sync_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsSyncEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_last_successful_sync_time(&self) -> Result { + }} + #[inline] pub fn get_last_successful_sync_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LastSuccessfulSyncTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_last_successful_sync_time(&self, value: super::super::foundation::DateTime) -> Result<()> { + }} + #[inline] pub fn set_last_successful_sync_time(&self, value: foundation::DateTime) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LastSuccessfulSyncTime)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_kind(&self) -> Result { + }} + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn create_folder_async(&self, name: &HStringArg) -> Result>> { + }} + #[inline] pub fn create_folder_async(&self, name: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFolderAsync)(self as *const _ as *mut _, name.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete_async(&self) -> Result> { + }} + #[inline] pub fn delete_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_child_folders_async(&self) -> Result>>> { + }} + #[inline] pub fn find_child_folders_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindChildFoldersAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_conversation_reader(&self) -> Result> { + }} + #[inline] pub fn get_conversation_reader(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetConversationReader)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_conversation_reader_with_options(&self, options: &EmailQueryOptions) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_conversation_reader_with_options(&self, options: &EmailQueryOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetConversationReaderWithOptions)(self 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 get_message_async(&self, id: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_message_async(&self, id: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetMessageAsync)(self as *const _ as *mut _, id.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_message_reader(&self) -> Result> { + }} + #[inline] pub fn get_message_reader(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetMessageReader)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_message_reader_with_options(&self, options: &EmailQueryOptions) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_message_reader_with_options(&self, options: &EmailQueryOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetMessageReaderWithOptions)(self 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 get_message_counts_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_message_counts_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetMessageCountsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_move_async(&self, newParentFolder: &EmailFolder) -> Result>> { + }} + #[inline] pub fn try_move_async(&self, newParentFolder: &EmailFolder) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryMoveAsync)(self as *const _ as *mut _, newParentFolder as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_move_with_new_name_async(&self, newParentFolder: &EmailFolder, newFolderName: &HStringArg) -> Result>> { + }} + #[inline] pub fn try_move_with_new_name_async(&self, newParentFolder: &EmailFolder, newFolderName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryMoveWithNewNameAsync)(self as *const _ as *mut _, 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_save_async(&self) -> Result>> { + }} + #[inline] pub fn try_save_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TrySaveAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn save_message_async(&self, message: &EmailMessage) -> Result> { + }} + #[inline] pub fn save_message_async(&self, message: &EmailMessage) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveMessageAsync)(self as *const _ as *mut _, message as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class EmailFolder: IEmailFolder} RT_ENUM! { enum EmailImportance: i32 { @@ -16434,8 +16434,8 @@ RT_INTERFACE!{interface IEmailIrmInfo(IEmailIrmInfoVtbl): IInspectable(IInspecta fn put_CanReply(&self, value: bool) -> HRESULT, fn get_CanReplyAll(&self, out: *mut bool) -> HRESULT, fn put_CanReplyAll(&self, value: bool) -> HRESULT, - fn get_ExpirationDate(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn put_ExpirationDate(&self, value: super::super::foundation::DateTime) -> HRESULT, + fn get_ExpirationDate(&self, out: *mut foundation::DateTime) -> HRESULT, + fn put_ExpirationDate(&self, value: foundation::DateTime) -> HRESULT, fn get_IsIrmOriginator(&self, out: *mut bool) -> HRESULT, fn put_IsIrmOriginator(&self, value: bool) -> HRESULT, fn get_IsProgramaticAccessAllowed(&self, out: *mut bool) -> HRESULT, @@ -16444,134 +16444,134 @@ RT_INTERFACE!{interface IEmailIrmInfo(IEmailIrmInfoVtbl): IInspectable(IInspecta fn put_Template(&self, value: *mut EmailIrmTemplate) -> HRESULT }} impl IEmailIrmInfo { - #[inline] pub unsafe fn get_can_edit(&self) -> Result { + #[inline] pub fn get_can_edit(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanEdit)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_edit(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_edit(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanEdit)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_extract_data(&self) -> Result { + }} + #[inline] pub fn get_can_extract_data(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanExtractData)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_extract_data(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_extract_data(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanExtractData)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_forward(&self) -> Result { + }} + #[inline] pub fn get_can_forward(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanForward)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_forward(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_forward(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanForward)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_modify_recipients_on_response(&self) -> Result { + }} + #[inline] pub fn get_can_modify_recipients_on_response(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanModifyRecipientsOnResponse)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_modify_recipients_on_response(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_modify_recipients_on_response(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanModifyRecipientsOnResponse)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_print_data(&self) -> Result { + }} + #[inline] pub fn get_can_print_data(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanPrintData)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_print_data(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_print_data(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanPrintData)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_remove_irm_on_response(&self) -> Result { + }} + #[inline] pub fn get_can_remove_irm_on_response(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanRemoveIrmOnResponse)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_remove_irm_on_response(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_remove_irm_on_response(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanRemoveIrmOnResponse)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_reply(&self) -> Result { + }} + #[inline] pub fn get_can_reply(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanReply)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_reply(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_reply(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanReply)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_reply_all(&self) -> Result { + }} + #[inline] pub fn get_can_reply_all(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanReplyAll)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_reply_all(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_reply_all(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanReplyAll)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_expiration_date(&self) -> Result { + }} + #[inline] pub fn get_expiration_date(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExpirationDate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_expiration_date(&self, value: super::super::foundation::DateTime) -> Result<()> { + }} + #[inline] pub fn set_expiration_date(&self, value: foundation::DateTime) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ExpirationDate)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_irm_originator(&self) -> Result { + }} + #[inline] pub fn get_is_irm_originator(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsIrmOriginator)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_irm_originator(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_irm_originator(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsIrmOriginator)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_programatic_access_allowed(&self) -> Result { + }} + #[inline] pub fn get_is_programatic_access_allowed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsProgramaticAccessAllowed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_programatic_access_allowed(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_programatic_access_allowed(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsProgramaticAccessAllowed)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_template(&self) -> Result> { + }} + #[inline] pub fn get_template(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Template)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_template(&self, value: &EmailIrmTemplate) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_template(&self, value: &EmailIrmTemplate) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Template)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class EmailIrmInfo: IEmailIrmInfo} impl RtActivatable for EmailIrmInfo {} impl RtActivatable for EmailIrmInfo {} impl EmailIrmInfo { - #[inline] pub fn create(expiration: super::super::foundation::DateTime, irmTemplate: &EmailIrmTemplate) -> Result> { unsafe { + #[inline] pub fn create(expiration: foundation::DateTime, irmTemplate: &EmailIrmTemplate) -> Result> { >::get_activation_factory().create(expiration, irmTemplate) - }} + } } DEFINE_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]) [CLSID_EmailIrmInfo]); 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(&self, expiration: super::super::foundation::DateTime, irmTemplate: *mut EmailIrmTemplate, out: *mut *mut EmailIrmInfo) -> HRESULT + fn Create(&self, expiration: foundation::DateTime, irmTemplate: *mut EmailIrmTemplate, out: *mut *mut EmailIrmInfo) -> HRESULT }} impl IEmailIrmInfoFactory { - #[inline] pub unsafe fn create(&self, expiration: super::super::foundation::DateTime, irmTemplate: &EmailIrmTemplate) -> Result> { + #[inline] pub fn create(&self, expiration: foundation::DateTime, irmTemplate: &EmailIrmTemplate) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, expiration, irmTemplate as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IEmailIrmTemplate, 4079449485, 21613, 19434, 169, 99, 84, 163, 139, 44, 192, 22); RT_INTERFACE!{interface IEmailIrmTemplate(IEmailIrmTemplateVtbl): IInspectable(IInspectableVtbl) [IID_IEmailIrmTemplate] { @@ -16583,41 +16583,41 @@ RT_INTERFACE!{interface IEmailIrmTemplate(IEmailIrmTemplateVtbl): IInspectable(I fn put_Name(&self, value: HSTRING) -> HRESULT }} impl IEmailIrmTemplate { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Id)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_description(&self) -> Result { + }} + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_description(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_description(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Description)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_name(&self) -> Result { + }} + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Name)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class EmailIrmTemplate: IEmailIrmTemplate} impl RtActivatable for EmailIrmTemplate {} impl RtActivatable for EmailIrmTemplate {} impl EmailIrmTemplate { - #[inline] pub fn create(id: &HStringArg, name: &HStringArg, description: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(id: &HStringArg, name: &HStringArg, description: &HStringArg) -> Result> { >::get_activation_factory().create(id, name, description) - }} + } } DEFINE_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]) [CLSID_EmailIrmTemplate]); DEFINE_IID!(IID_IEmailIrmTemplateFactory, 1034098806, 34616, 17432, 185, 203, 71, 27, 147, 111, 231, 30); @@ -16625,11 +16625,11 @@ RT_INTERFACE!{static interface IEmailIrmTemplateFactory(IEmailIrmTemplateFactory fn Create(&self, id: HSTRING, name: HSTRING, description: HSTRING, out: *mut *mut EmailIrmTemplate) -> HRESULT }} impl IEmailIrmTemplateFactory { - #[inline] pub unsafe fn create(&self, id: &HStringArg, name: &HStringArg, description: &HStringArg) -> Result> { + #[inline] pub fn create(&self, id: &HStringArg, name: &HStringArg, description: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, id.get(), name.get(), description.get(), &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] { @@ -16639,26 +16639,26 @@ RT_INTERFACE!{interface IEmailItemCounts(IEmailItemCountsVtbl): IInspectable(IIn fn get_Unread(&self, out: *mut u32) -> HRESULT }} impl IEmailItemCounts { - #[inline] pub unsafe fn get_flagged(&self) -> Result { + #[inline] pub fn get_flagged(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Flagged)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_important(&self) -> Result { + }} + #[inline] pub fn get_important(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Important)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_total(&self) -> Result { + }} + #[inline] pub fn get_total(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Total)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_unread(&self) -> Result { + }} + #[inline] pub fn get_unread(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Unread)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class EmailItemCounts: IEmailItemCounts} DEFINE_IID!(IID_IEmailMailbox, 2826503753, 53083, 16667, 128, 177, 74, 106, 20, 132, 206, 37); @@ -16672,7 +16672,7 @@ RT_INTERFACE!{interface IEmailMailbox(IEmailMailboxVtbl): IInspectable(IInspecta fn get_IsDataEncryptedUnderLock(&self, out: *mut bool) -> HRESULT, fn get_MailAddress(&self, out: *mut HSTRING) -> HRESULT, fn put_MailAddress(&self, value: HSTRING) -> HRESULT, - fn get_MailAddressAliases(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_MailAddressAliases(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_OtherAppReadAccess(&self, out: *mut EmailMailboxOtherAppReadAccess) -> HRESULT, fn put_OtherAppReadAccess(&self, value: EmailMailboxOtherAppReadAccess) -> HRESULT, fn get_OtherAppWriteAccess(&self, out: *mut EmailMailboxOtherAppWriteAccess) -> HRESULT, @@ -16685,281 +16685,281 @@ RT_INTERFACE!{interface IEmailMailbox(IEmailMailboxVtbl): IInspectable(IInspecta fn GetConversationReaderWithOptions(&self, options: *mut EmailQueryOptions, out: *mut *mut EmailConversationReader) -> HRESULT, fn GetMessageReader(&self, out: *mut *mut EmailMessageReader) -> HRESULT, fn GetMessageReaderWithOptions(&self, options: *mut EmailQueryOptions, out: *mut *mut EmailMessageReader) -> HRESULT, - fn DeleteAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn GetConversationAsync(&self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetFolderAsync(&self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetMessageAsync(&self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetSpecialFolderAsync(&self, folderType: EmailSpecialFolderKind, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn SaveAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn MarkMessageAsSeenAsync(&self, messageId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn MarkFolderAsSeenAsync(&self, folderId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn MarkMessageReadAsync(&self, messageId: HSTRING, isRead: bool, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn ChangeMessageFlagStateAsync(&self, messageId: HSTRING, flagState: EmailFlagState, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn TryMoveMessageAsync(&self, messageId: HSTRING, newParentFolderId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryMoveFolderAsync(&self, folderId: HSTRING, newParentFolderId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryMoveFolderWithNewNameAsync(&self, folderId: HSTRING, newParentFolderId: HSTRING, newFolderName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn DeleteMessageAsync(&self, messageId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn MarkFolderSyncEnabledAsync(&self, folderId: HSTRING, isSyncEnabled: bool, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn SendMessageAsync(&self, message: *mut EmailMessage, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn SaveDraftAsync(&self, message: *mut EmailMessage, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn DownloadMessageAsync(&self, messageId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn DownloadAttachmentAsync(&self, attachmentId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn CreateResponseMessageAsync(&self, messageId: HSTRING, responseType: EmailMessageResponseKind, subject: HSTRING, responseHeaderType: EmailMessageBodyKind, responseHeader: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryUpdateMeetingResponseAsync(&self, meeting: *mut EmailMessage, response: EmailMeetingResponseType, subject: HSTRING, comment: HSTRING, sendUpdate: bool, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryForwardMeetingAsync(&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(&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(&self, pHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_MailboxChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn SmartSendMessageAsync(&self, message: *mut EmailMessage, smartSend: bool, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn TrySetAutoReplySettingsAsync(&self, autoReplySettings: *mut EmailMailboxAutoReplySettings, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryGetAutoReplySettingsAsync(&self, requestedFormat: EmailMailboxAutoReplyMessageResponseKind, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn DeleteAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn GetConversationAsync(&self, id: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetFolderAsync(&self, id: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetMessageAsync(&self, id: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetSpecialFolderAsync(&self, folderType: EmailSpecialFolderKind, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn SaveAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn MarkMessageAsSeenAsync(&self, messageId: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn MarkFolderAsSeenAsync(&self, folderId: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn MarkMessageReadAsync(&self, messageId: HSTRING, isRead: bool, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ChangeMessageFlagStateAsync(&self, messageId: HSTRING, flagState: EmailFlagState, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn TryMoveMessageAsync(&self, messageId: HSTRING, newParentFolderId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryMoveFolderAsync(&self, folderId: HSTRING, newParentFolderId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryMoveFolderWithNewNameAsync(&self, folderId: HSTRING, newParentFolderId: HSTRING, newFolderName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn DeleteMessageAsync(&self, messageId: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn MarkFolderSyncEnabledAsync(&self, folderId: HSTRING, isSyncEnabled: bool, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn SendMessageAsync(&self, message: *mut EmailMessage, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn SaveDraftAsync(&self, message: *mut EmailMessage, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn DownloadMessageAsync(&self, messageId: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn DownloadAttachmentAsync(&self, attachmentId: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn CreateResponseMessageAsync(&self, messageId: HSTRING, responseType: EmailMessageResponseKind, subject: HSTRING, responseHeaderType: EmailMessageBodyKind, responseHeader: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryUpdateMeetingResponseAsync(&self, meeting: *mut EmailMessage, response: EmailMeetingResponseType, subject: HSTRING, comment: HSTRING, sendUpdate: bool, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryForwardMeetingAsync(&self, meeting: *mut EmailMessage, recipients: *mut foundation::collections::IIterable, subject: HSTRING, forwardHeaderType: EmailMessageBodyKind, forwardHeader: HSTRING, comment: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryProposeNewTimeForMeetingAsync(&self, meeting: *mut EmailMessage, newStartTime: foundation::DateTime, newDuration: foundation::TimeSpan, subject: HSTRING, comment: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_MailboxChanged(&self, pHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_MailboxChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn SmartSendMessageAsync(&self, message: *mut EmailMessage, smartSend: bool, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn TrySetAutoReplySettingsAsync(&self, autoReplySettings: *mut EmailMailboxAutoReplySettings, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryGetAutoReplySettingsAsync(&self, requestedFormat: EmailMailboxAutoReplyMessageResponseKind, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IEmailMailbox { - #[inline] pub unsafe fn get_capabilities(&self) -> Result> { + #[inline] pub fn get_capabilities(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Capabilities)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_change_tracker(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_change_tracker(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ChangeTracker)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_display_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&self) -> Result { + }} + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_owned_by_current_app(&self) -> Result { + }} + #[inline] pub fn get_is_owned_by_current_app(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsOwnedByCurrentApp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_data_encrypted_under_lock(&self) -> Result { + }} + #[inline] pub fn get_is_data_encrypted_under_lock(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDataEncryptedUnderLock)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_mail_address(&self) -> Result { + }} + #[inline] pub fn get_mail_address(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MailAddress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_mail_address(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_mail_address(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MailAddress)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_mail_address_aliases(&self) -> Result>> { + }} + #[inline] pub fn get_mail_address_aliases(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MailAddressAliases)(self 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(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_other_app_read_access(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OtherAppReadAccess)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_other_app_read_access(&self, value: EmailMailboxOtherAppReadAccess) -> Result<()> { + }} + #[inline] pub fn set_other_app_read_access(&self, value: EmailMailboxOtherAppReadAccess) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OtherAppReadAccess)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_other_app_write_access(&self) -> Result { + }} + #[inline] pub fn get_other_app_write_access(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OtherAppWriteAccess)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_other_app_write_access(&self, value: EmailMailboxOtherAppWriteAccess) -> Result<()> { + }} + #[inline] pub fn set_other_app_write_access(&self, value: EmailMailboxOtherAppWriteAccess) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OtherAppWriteAccess)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_policies(&self) -> Result> { + }} + #[inline] pub fn get_policies(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Policies)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_source_display_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_source_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SourceDisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sync_manager(&self) -> Result> { + }} + #[inline] pub fn get_sync_manager(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SyncManager)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_user_data_account_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_user_data_account_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UserDataAccountId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_conversation_reader(&self) -> Result> { + }} + #[inline] pub fn get_conversation_reader(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetConversationReader)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_conversation_reader_with_options(&self, options: &EmailQueryOptions) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_conversation_reader_with_options(&self, options: &EmailQueryOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetConversationReaderWithOptions)(self 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 get_message_reader(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_message_reader(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetMessageReader)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_message_reader_with_options(&self, options: &EmailQueryOptions) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_message_reader_with_options(&self, options: &EmailQueryOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetMessageReaderWithOptions)(self 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 delete_async(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn delete_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_conversation_async(&self, id: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_conversation_async(&self, id: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetConversationAsync)(self as *const _ as *mut _, id.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_folder_async(&self, id: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_folder_async(&self, id: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFolderAsync)(self as *const _ as *mut _, id.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_message_async(&self, id: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_message_async(&self, id: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetMessageAsync)(self as *const _ as *mut _, id.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_special_folder_async(&self, folderType: EmailSpecialFolderKind) -> Result>> { + }} + #[inline] pub fn get_special_folder_async(&self, folderType: EmailSpecialFolderKind) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSpecialFolderAsync)(self as *const _ as *mut _, folderType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn save_async(&self) -> Result> { + }} + #[inline] pub fn save_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn mark_message_as_seen_async(&self, messageId: &HStringArg) -> Result> { + }} + #[inline] pub fn mark_message_as_seen_async(&self, messageId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MarkMessageAsSeenAsync)(self as *const _ as *mut _, messageId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn mark_folder_as_seen_async(&self, folderId: &HStringArg) -> Result> { + }} + #[inline] pub fn mark_folder_as_seen_async(&self, folderId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MarkFolderAsSeenAsync)(self as *const _ as *mut _, folderId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn mark_message_read_async(&self, messageId: &HStringArg, isRead: bool) -> Result> { + }} + #[inline] pub fn mark_message_read_async(&self, messageId: &HStringArg, isRead: bool) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MarkMessageReadAsync)(self as *const _ as *mut _, messageId.get(), isRead, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn change_message_flag_state_async(&self, messageId: &HStringArg, flagState: EmailFlagState) -> Result> { + }} + #[inline] pub fn change_message_flag_state_async(&self, messageId: &HStringArg, flagState: EmailFlagState) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ChangeMessageFlagStateAsync)(self as *const _ as *mut _, messageId.get(), flagState, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_move_message_async(&self, messageId: &HStringArg, newParentFolderId: &HStringArg) -> Result>> { + }} + #[inline] pub fn try_move_message_async(&self, messageId: &HStringArg, newParentFolderId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryMoveMessageAsync)(self as *const _ as *mut _, messageId.get(), newParentFolderId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_move_folder_async(&self, folderId: &HStringArg, newParentFolderId: &HStringArg) -> Result>> { + }} + #[inline] pub fn try_move_folder_async(&self, folderId: &HStringArg, newParentFolderId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryMoveFolderAsync)(self as *const _ as *mut _, folderId.get(), newParentFolderId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_move_folder_with_new_name_async(&self, folderId: &HStringArg, newParentFolderId: &HStringArg, newFolderName: &HStringArg) -> Result>> { + }} + #[inline] pub fn try_move_folder_with_new_name_async(&self, folderId: &HStringArg, newParentFolderId: &HStringArg, newFolderName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryMoveFolderWithNewNameAsync)(self as *const _ as *mut _, folderId.get(), newParentFolderId.get(), newFolderName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete_message_async(&self, messageId: &HStringArg) -> Result> { + }} + #[inline] pub fn delete_message_async(&self, messageId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteMessageAsync)(self as *const _ as *mut _, messageId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn mark_folder_sync_enabled_async(&self, folderId: &HStringArg, isSyncEnabled: bool) -> Result> { + }} + #[inline] pub fn mark_folder_sync_enabled_async(&self, folderId: &HStringArg, isSyncEnabled: bool) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MarkFolderSyncEnabledAsync)(self as *const _ as *mut _, folderId.get(), isSyncEnabled, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn send_message_async(&self, message: &EmailMessage) -> Result> { + }} + #[inline] pub fn send_message_async(&self, message: &EmailMessage) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SendMessageAsync)(self as *const _ as *mut _, message as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn save_draft_async(&self, message: &EmailMessage) -> Result> { + }} + #[inline] pub fn save_draft_async(&self, message: &EmailMessage) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveDraftAsync)(self as *const _ as *mut _, message as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn download_message_async(&self, messageId: &HStringArg) -> Result> { + }} + #[inline] pub fn download_message_async(&self, messageId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DownloadMessageAsync)(self as *const _ as *mut _, messageId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn download_attachment_async(&self, attachmentId: &HStringArg) -> Result> { + }} + #[inline] pub fn download_attachment_async(&self, attachmentId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DownloadAttachmentAsync)(self as *const _ as *mut _, attachmentId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_response_message_async(&self, messageId: &HStringArg, responseType: EmailMessageResponseKind, subject: &HStringArg, responseHeaderType: EmailMessageBodyKind, responseHeader: &HStringArg) -> Result>> { + }} + #[inline] pub fn create_response_message_async(&self, messageId: &HStringArg, responseType: EmailMessageResponseKind, subject: &HStringArg, responseHeaderType: EmailMessageBodyKind, responseHeader: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateResponseMessageAsync)(self as *const _ as *mut _, 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 try_update_meeting_response_async(&self, meeting: &EmailMessage, response: EmailMeetingResponseType, subject: &HStringArg, comment: &HStringArg, sendUpdate: bool) -> Result>> { + }} + #[inline] pub fn try_update_meeting_response_async(&self, meeting: &EmailMessage, response: EmailMeetingResponseType, subject: &HStringArg, comment: &HStringArg, sendUpdate: bool) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryUpdateMeetingResponseAsync)(self as *const _ as *mut _, meeting as *const _ as *mut _, response, subject.get(), comment.get(), sendUpdate, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_forward_meeting_async(&self, meeting: &EmailMessage, recipients: &super::super::foundation::collections::IIterable, subject: &HStringArg, forwardHeaderType: EmailMessageBodyKind, forwardHeader: &HStringArg, comment: &HStringArg) -> Result>> { + }} + #[inline] pub fn try_forward_meeting_async(&self, meeting: &EmailMessage, recipients: &foundation::collections::IIterable, subject: &HStringArg, forwardHeaderType: EmailMessageBodyKind, forwardHeader: &HStringArg, comment: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryForwardMeetingAsync)(self as *const _ as *mut _, 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 try_propose_new_time_for_meeting_async(&self, meeting: &EmailMessage, newStartTime: super::super::foundation::DateTime, newDuration: super::super::foundation::TimeSpan, subject: &HStringArg, comment: &HStringArg) -> Result>> { + }} + #[inline] pub fn try_propose_new_time_for_meeting_async(&self, meeting: &EmailMessage, newStartTime: foundation::DateTime, newDuration: foundation::TimeSpan, subject: &HStringArg, comment: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryProposeNewTimeForMeetingAsync)(self as *const _ as *mut _, 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 add_mailbox_changed(&self, pHandler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_mailbox_changed(&self, pHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_MailboxChanged)(self as *const _ as *mut _, pHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_mailbox_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_mailbox_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_MailboxChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn smart_send_message_async(&self, message: &EmailMessage, smartSend: bool) -> Result> { + }} + #[inline] pub fn smart_send_message_async(&self, message: &EmailMessage, smartSend: bool) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SmartSendMessageAsync)(self as *const _ as *mut _, message as *const _ as *mut _, smartSend, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_set_auto_reply_settings_async(&self, autoReplySettings: &EmailMailboxAutoReplySettings) -> Result>> { + }} + #[inline] pub fn try_set_auto_reply_settings_async(&self, autoReplySettings: &EmailMailboxAutoReplySettings) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TrySetAutoReplySettingsAsync)(self as *const _ as *mut _, autoReplySettings as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_get_auto_reply_settings_async(&self, requestedFormat: EmailMailboxAutoReplyMessageResponseKind) -> Result>> { + }} + #[inline] pub fn try_get_auto_reply_settings_async(&self, requestedFormat: EmailMailboxAutoReplyMessageResponseKind) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetAutoReplySettingsAsync)(self as *const _ as *mut _, requestedFormat, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class EmailMailbox: IEmailMailbox} DEFINE_IID!(IID_IEmailMailbox2, 351855620, 27810, 19122, 146, 65, 121, 205, 123, 244, 99, 70); @@ -16969,79 +16969,79 @@ RT_INTERFACE!{interface IEmailMailbox2(IEmailMailbox2Vtbl): IInspectable(IInspec fn get_NetworkId(&self, out: *mut HSTRING) -> HRESULT }} impl IEmailMailbox2 { - #[inline] pub unsafe fn get_linked_mailbox_id(&self) -> Result { + #[inline] pub fn get_linked_mailbox_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LinkedMailboxId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_network_account_id(&self) -> Result { + }} + #[inline] pub fn get_network_account_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NetworkAccountId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_network_id(&self) -> Result { + }} + #[inline] pub fn get_network_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NetworkId)(self as *const _ as *mut _, &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(&self, recipients: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn ResolveRecipientsAsync(&self, recipients: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, #[cfg(not(feature="windows-security"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-security")] fn ValidateCertificatesAsync(&self, certificates: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn TryEmptyFolderAsync(&self, folderId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryCreateFolderAsync(&self, parentFolderId: HSTRING, name: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryDeleteFolderAsync(&self, folderId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-security")] fn ValidateCertificatesAsync(&self, certificates: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn TryEmptyFolderAsync(&self, folderId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryCreateFolderAsync(&self, parentFolderId: HSTRING, name: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryDeleteFolderAsync(&self, folderId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IEmailMailbox3 { - #[inline] pub unsafe fn resolve_recipients_async(&self, recipients: &super::super::foundation::collections::IIterable) -> Result>>> { + #[inline] pub fn resolve_recipients_async(&self, recipients: &foundation::collections::IIterable) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ResolveRecipientsAsync)(self as *const _ as *mut _, recipients 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 validate_certificates_async(&self, certificates: &super::super::foundation::collections::IIterable) -> Result>>> { + }} + #[cfg(feature="windows-security")] #[inline] pub fn validate_certificates_async(&self, certificates: &foundation::collections::IIterable) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ValidateCertificatesAsync)(self as *const _ as *mut _, certificates as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_empty_folder_async(&self, folderId: &HStringArg) -> Result>> { + }} + #[inline] pub fn try_empty_folder_async(&self, folderId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryEmptyFolderAsync)(self as *const _ as *mut _, folderId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_create_folder_async(&self, parentFolderId: &HStringArg, name: &HStringArg) -> Result>> { + }} + #[inline] pub fn try_create_folder_async(&self, parentFolderId: &HStringArg, name: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryCreateFolderAsync)(self as *const _ as *mut _, parentFolderId.get(), name.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_delete_folder_async(&self, folderId: &HStringArg) -> Result>> { + }} + #[inline] pub fn try_delete_folder_async(&self, folderId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryDeleteFolderAsync)(self as *const _ as *mut _, folderId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn RegisterSyncManagerAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IEmailMailbox4 { - #[inline] pub unsafe fn register_sync_manager_async(&self) -> Result> { + #[inline] pub fn register_sync_manager_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RegisterSyncManagerAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IEmailMailbox5, 966160519, 146, 18878, 189, 14, 93, 77, 201, 217, 109, 144); RT_INTERFACE!{interface IEmailMailbox5(IEmailMailbox5Vtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailbox5] { fn GetChangeTracker(&self, identity: HSTRING, out: *mut *mut EmailMailboxChangeTracker) -> HRESULT }} impl IEmailMailbox5 { - #[inline] pub unsafe fn get_change_tracker(&self, identity: &HStringArg) -> Result> { + #[inline] pub fn get_change_tracker(&self, identity: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetChangeTracker)(self as *const _ as *mut _, identity.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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] { @@ -17049,16 +17049,16 @@ RT_INTERFACE!{interface IEmailMailboxAction(IEmailMailboxActionVtbl): IInspectab fn get_ChangeNumber(&self, out: *mut u64) -> HRESULT }} impl IEmailMailboxAction { - #[inline] pub unsafe fn get_kind(&self) -> Result { + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_change_number(&self) -> Result { + }} + #[inline] pub fn get_change_number(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ChangeNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class EmailMailboxAction: IEmailMailboxAction} RT_ENUM! { enum EmailMailboxActionKind: i32 { @@ -17075,24 +17075,24 @@ RT_INTERFACE!{interface IEmailMailboxAutoReply(IEmailMailboxAutoReplyVtbl): IIns fn put_Response(&self, value: HSTRING) -> HRESULT }} impl IEmailMailboxAutoReply { - #[inline] pub unsafe fn get_is_enabled(&self) -> Result { + #[inline] pub fn get_is_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_response(&self) -> Result { + }} + #[inline] pub fn get_response(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Response)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_response(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_response(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Response)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class EmailMailboxAutoReply: IEmailMailboxAutoReply} RT_ENUM! { enum EmailMailboxAutoReplyMessageResponseKind: i32 { @@ -17104,66 +17104,66 @@ RT_INTERFACE!{interface IEmailMailboxAutoReplySettings(IEmailMailboxAutoReplySet fn put_IsEnabled(&self, value: bool) -> HRESULT, fn get_ResponseKind(&self, out: *mut EmailMailboxAutoReplyMessageResponseKind) -> HRESULT, fn put_ResponseKind(&self, value: EmailMailboxAutoReplyMessageResponseKind) -> HRESULT, - fn get_StartTime(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_StartTime(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_EndTime(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_EndTime(&self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_StartTime(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_StartTime(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_EndTime(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_EndTime(&self, value: *mut foundation::IReference) -> HRESULT, fn get_InternalReply(&self, out: *mut *mut EmailMailboxAutoReply) -> HRESULT, fn get_KnownExternalReply(&self, out: *mut *mut EmailMailboxAutoReply) -> HRESULT, fn get_UnknownExternalReply(&self, out: *mut *mut EmailMailboxAutoReply) -> HRESULT }} impl IEmailMailboxAutoReplySettings { - #[inline] pub unsafe fn get_is_enabled(&self) -> Result { + #[inline] pub fn get_is_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_response_kind(&self) -> Result { + }} + #[inline] pub fn get_response_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ResponseKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_response_kind(&self, value: EmailMailboxAutoReplyMessageResponseKind) -> Result<()> { + }} + #[inline] pub fn set_response_kind(&self, value: EmailMailboxAutoReplyMessageResponseKind) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ResponseKind)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_start_time(&self) -> Result>> { + }} + #[inline] pub fn get_start_time(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StartTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_start_time(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_start_time(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StartTime)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_end_time(&self) -> Result>> { + }} + #[inline] pub fn get_end_time(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EndTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_end_time(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_end_time(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_EndTime)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_internal_reply(&self) -> Result> { + }} + #[inline] pub fn get_internal_reply(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InternalReply)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_known_external_reply(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_known_external_reply(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_KnownExternalReply)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_unknown_external_reply(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_unknown_external_reply(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UnknownExternalReply)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class EmailMailboxAutoReplySettings: IEmailMailboxAutoReplySettings} impl RtActivatable for EmailMailboxAutoReplySettings {} @@ -17180,46 +17180,46 @@ RT_INTERFACE!{interface IEmailMailboxCapabilities(IEmailMailboxCapabilitiesVtbl) fn get_CanSmartSend(&self, out: *mut bool) -> HRESULT }} impl IEmailMailboxCapabilities { - #[inline] pub unsafe fn get_can_forward_meetings(&self) -> Result { + #[inline] pub fn get_can_forward_meetings(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanForwardMeetings)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_get_and_set_external_auto_replies(&self) -> Result { + }} + #[inline] pub fn get_can_get_and_set_external_auto_replies(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanGetAndSetExternalAutoReplies)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_get_and_set_internal_auto_replies(&self) -> Result { + }} + #[inline] pub fn get_can_get_and_set_internal_auto_replies(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanGetAndSetInternalAutoReplies)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_update_meeting_responses(&self) -> Result { + }} + #[inline] pub fn get_can_update_meeting_responses(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanUpdateMeetingResponses)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_server_search_folders(&self) -> Result { + }} + #[inline] pub fn get_can_server_search_folders(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanServerSearchFolders)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_server_search_mailbox(&self) -> Result { + }} + #[inline] pub fn get_can_server_search_mailbox(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanServerSearchMailbox)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_propose_new_time_for_meetings(&self) -> Result { + }} + #[inline] pub fn get_can_propose_new_time_for_meetings(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanProposeNewTimeForMeetings)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_smart_send(&self) -> Result { + }} + #[inline] pub fn get_can_smart_send(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanSmartSend)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class EmailMailboxCapabilities: IEmailMailboxCapabilities} DEFINE_IID!(IID_IEmailMailboxCapabilities2, 1769094884, 12065, 19644, 136, 171, 46, 118, 2, 164, 128, 107); @@ -17232,36 +17232,36 @@ RT_INTERFACE!{interface IEmailMailboxCapabilities2(IEmailMailboxCapabilities2Vtb fn get_CanMoveFolder(&self, out: *mut bool) -> HRESULT }} impl IEmailMailboxCapabilities2 { - #[inline] pub unsafe fn get_can_resolve_recipients(&self) -> Result { + #[inline] pub fn get_can_resolve_recipients(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanResolveRecipients)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_validate_certificates(&self) -> Result { + }} + #[inline] pub fn get_can_validate_certificates(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanValidateCertificates)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_empty_folder(&self) -> Result { + }} + #[inline] pub fn get_can_empty_folder(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanEmptyFolder)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_create_folder(&self) -> Result { + }} + #[inline] pub fn get_can_create_folder(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanCreateFolder)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_delete_folder(&self) -> Result { + }} + #[inline] pub fn get_can_delete_folder(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanDeleteFolder)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_move_folder(&self) -> Result { + }} + #[inline] pub fn get_can_move_folder(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanMoveFolder)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IEmailMailboxCapabilities3, 4136692036, 22258, 17834, 135, 44, 12, 233, 243, 219, 11, 92); RT_INTERFACE!{interface IEmailMailboxCapabilities3(IEmailMailboxCapabilities3Vtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxCapabilities3] { @@ -17281,91 +17281,91 @@ RT_INTERFACE!{interface IEmailMailboxCapabilities3(IEmailMailboxCapabilities3Vtb fn put_CanMoveFolder(&self, value: bool) -> HRESULT }} impl IEmailMailboxCapabilities3 { - #[inline] pub unsafe fn set_can_forward_meetings(&self, value: bool) -> Result<()> { + #[inline] pub fn set_can_forward_meetings(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanForwardMeetings)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_get_and_set_external_auto_replies(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_get_and_set_external_auto_replies(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanGetAndSetExternalAutoReplies)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_get_and_set_internal_auto_replies(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_get_and_set_internal_auto_replies(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanGetAndSetInternalAutoReplies)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_update_meeting_responses(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_update_meeting_responses(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanUpdateMeetingResponses)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_server_search_folders(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_server_search_folders(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanServerSearchFolders)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_server_search_mailbox(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_server_search_mailbox(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanServerSearchMailbox)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_propose_new_time_for_meetings(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_propose_new_time_for_meetings(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanProposeNewTimeForMeetings)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_smart_send(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_smart_send(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanSmartSend)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_resolve_recipients(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_resolve_recipients(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanResolveRecipients)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_validate_certificates(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_validate_certificates(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanValidateCertificates)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_empty_folder(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_empty_folder(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanEmptyFolder)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_create_folder(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_create_folder(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanCreateFolder)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_delete_folder(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_delete_folder(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanDeleteFolder)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_move_folder(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_move_folder(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanMoveFolder)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut EmailMailboxChangeType) -> HRESULT, - fn get_MailboxActions(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_MailboxActions(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_Message(&self, out: *mut *mut EmailMessage) -> HRESULT, fn get_Folder(&self, out: *mut *mut EmailFolder) -> HRESULT }} impl IEmailMailboxChange { - #[inline] pub unsafe fn get_change_type(&self) -> Result { + #[inline] pub fn get_change_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ChangeType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_mailbox_actions(&self) -> Result>> { + }} + #[inline] pub fn get_mailbox_actions(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MailboxActions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_message(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_message(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Message)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_folder(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_folder(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Folder)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class EmailMailboxChange: IEmailMailboxChange} DEFINE_IID!(IID_IEmailMailboxChangedDeferral, 2006611137, 38853, 19284, 179, 13, 48, 98, 50, 98, 62, 109); @@ -17373,10 +17373,10 @@ RT_INTERFACE!{interface IEmailMailboxChangedDeferral(IEmailMailboxChangedDeferra fn Complete(&self) -> HRESULT }} impl IEmailMailboxChangedDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class EmailMailboxChangedDeferral: IEmailMailboxChangedDeferral} DEFINE_IID!(IID_IEmailMailboxChangedEventArgs, 1023237998, 468, 20042, 164, 76, 178, 45, 212, 46, 194, 7); @@ -17384,33 +17384,33 @@ RT_INTERFACE!{interface IEmailMailboxChangedEventArgs(IEmailMailboxChangedEventA fn GetDeferral(&self, out: *mut *mut EmailMailboxChangedDeferral) -> HRESULT }} impl IEmailMailboxChangedEventArgs { - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class EmailMailboxChangedEventArgs: IEmailMailboxChangedEventArgs} 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(&self) -> HRESULT, fn AcceptChangesThrough(&self, lastChangeToAcknowledge: *mut EmailMailboxChange) -> HRESULT, - fn ReadBatchAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn ReadBatchAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IEmailMailboxChangeReader { - #[inline] pub unsafe fn accept_changes(&self) -> Result<()> { + #[inline] pub fn accept_changes(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AcceptChanges)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn accept_changes_through(&self, lastChangeToAcknowledge: &EmailMailboxChange) -> Result<()> { + }} + #[inline] pub fn accept_changes_through(&self, lastChangeToAcknowledge: &EmailMailboxChange) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AcceptChangesThrough)(self as *const _ as *mut _, lastChangeToAcknowledge as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn read_batch_async(&self) -> Result>>> { + }} + #[inline] pub fn read_batch_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadBatchAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class EmailMailboxChangeReader: IEmailMailboxChangeReader} DEFINE_IID!(IID_IEmailMailboxChangeTracker, 2061796920, 20838, 17079, 136, 130, 253, 33, 201, 43, 221, 75); @@ -17421,24 +17421,24 @@ RT_INTERFACE!{interface IEmailMailboxChangeTracker(IEmailMailboxChangeTrackerVtb fn Reset(&self) -> HRESULT }} impl IEmailMailboxChangeTracker { - #[inline] pub unsafe fn get_is_tracking(&self) -> Result { + #[inline] pub fn get_is_tracking(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsTracking)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn enable(&self) -> Result<()> { + }} + #[inline] pub fn enable(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Enable)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_change_reader(&self) -> Result> { + }} + #[inline] pub fn get_change_reader(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetChangeReader)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn reset(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn reset(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Reset)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class EmailMailboxChangeTracker: IEmailMailboxChangeTracker} RT_ENUM! { enum EmailMailboxChangeType: i32 { @@ -17450,16 +17450,16 @@ RT_INTERFACE!{interface IEmailMailboxCreateFolderResult(IEmailMailboxCreateFolde fn get_Folder(&self, out: *mut *mut EmailFolder) -> HRESULT }} impl IEmailMailboxCreateFolderResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_folder(&self) -> Result> { + }} + #[inline] pub fn get_folder(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Folder)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class EmailMailboxCreateFolderResult: IEmailMailboxCreateFolderResult} RT_ENUM! { enum EmailMailboxCreateFolderStatus: i32 { @@ -17481,30 +17481,30 @@ DEFINE_IID!(IID_IEmailMailboxPolicies, 523453893, 7227, 19911, 180, 16, 99, 115, RT_INTERFACE!{interface IEmailMailboxPolicies(IEmailMailboxPoliciesVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMailboxPolicies] { fn get_AllowedSmimeEncryptionAlgorithmNegotiation(&self, out: *mut EmailMailboxAllowedSmimeEncryptionAlgorithmNegotiation) -> HRESULT, fn get_AllowSmimeSoftCertificates(&self, out: *mut bool) -> HRESULT, - fn get_RequiredSmimeEncryptionAlgorithm(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_RequiredSmimeSigningAlgorithm(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn get_RequiredSmimeEncryptionAlgorithm(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_RequiredSmimeSigningAlgorithm(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IEmailMailboxPolicies { - #[inline] pub unsafe fn get_allowed_smime_encryption_algorithm_negotiation(&self) -> Result { + #[inline] pub fn get_allowed_smime_encryption_algorithm_negotiation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AllowedSmimeEncryptionAlgorithmNegotiation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_allow_smime_soft_certificates(&self) -> Result { + }} + #[inline] pub fn get_allow_smime_soft_certificates(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AllowSmimeSoftCertificates)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_required_smime_encryption_algorithm(&self) -> Result>> { + }} + #[inline] pub fn get_required_smime_encryption_algorithm(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RequiredSmimeEncryptionAlgorithm)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_required_smime_signing_algorithm(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_required_smime_signing_algorithm(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RequiredSmimeSigningAlgorithm)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class EmailMailboxPolicies: IEmailMailboxPolicies} DEFINE_IID!(IID_IEmailMailboxPolicies2, 3132459771, 41291, 18812, 168, 226, 85, 234, 194, 156, 196, 181); @@ -17513,51 +17513,51 @@ RT_INTERFACE!{interface IEmailMailboxPolicies2(IEmailMailboxPolicies2Vtbl): IIns fn get_MustSignSmimeMessages(&self, out: *mut bool) -> HRESULT }} impl IEmailMailboxPolicies2 { - #[inline] pub unsafe fn get_must_encrypt_smime_messages(&self) -> Result { + #[inline] pub fn get_must_encrypt_smime_messages(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MustEncryptSmimeMessages)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_must_sign_smime_messages(&self) -> Result { + }} + #[inline] pub fn get_must_sign_smime_messages(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MustSignSmimeMessages)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, value: EmailMailboxAllowedSmimeEncryptionAlgorithmNegotiation) -> HRESULT, fn put_AllowSmimeSoftCertificates(&self, value: bool) -> HRESULT, - fn put_RequiredSmimeEncryptionAlgorithm(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn put_RequiredSmimeSigningAlgorithm(&self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn put_RequiredSmimeEncryptionAlgorithm(&self, value: *mut foundation::IReference) -> HRESULT, + fn put_RequiredSmimeSigningAlgorithm(&self, value: *mut foundation::IReference) -> HRESULT, fn put_MustEncryptSmimeMessages(&self, value: bool) -> HRESULT, fn put_MustSignSmimeMessages(&self, value: bool) -> HRESULT }} impl IEmailMailboxPolicies3 { - #[inline] pub unsafe fn set_allowed_smime_encryption_algorithm_negotiation(&self, value: EmailMailboxAllowedSmimeEncryptionAlgorithmNegotiation) -> Result<()> { + #[inline] pub fn set_allowed_smime_encryption_algorithm_negotiation(&self, value: EmailMailboxAllowedSmimeEncryptionAlgorithmNegotiation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AllowedSmimeEncryptionAlgorithmNegotiation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_allow_smime_soft_certificates(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_allow_smime_soft_certificates(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AllowSmimeSoftCertificates)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_required_smime_encryption_algorithm(&self, value: &super::super::foundation::IReference) -> Result<()> { + }} + #[inline] pub fn set_required_smime_encryption_algorithm(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RequiredSmimeEncryptionAlgorithm)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_required_smime_signing_algorithm(&self, value: &super::super::foundation::IReference) -> Result<()> { + }} + #[inline] pub fn set_required_smime_signing_algorithm(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RequiredSmimeSigningAlgorithm)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_must_encrypt_smime_messages(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_must_encrypt_smime_messages(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MustEncryptSmimeMessages)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_must_sign_smime_messages(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_must_sign_smime_messages(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MustSignSmimeMessages)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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, @@ -17568,63 +17568,63 @@ RT_ENUM! { enum EmailMailboxSmimeSigningAlgorithm: i32 { 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(&self, out: *mut EmailMailboxSyncStatus) -> HRESULT, - fn get_LastSuccessfulSyncTime(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_LastAttemptedSyncTime(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn SyncAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_SyncStatusChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SyncStatusChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn get_LastSuccessfulSyncTime(&self, out: *mut foundation::DateTime) -> HRESULT, + fn get_LastAttemptedSyncTime(&self, out: *mut foundation::DateTime) -> HRESULT, + fn SyncAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_SyncStatusChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SyncStatusChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IEmailMailboxSyncManager { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_last_successful_sync_time(&self) -> Result { + }} + #[inline] pub fn get_last_successful_sync_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LastSuccessfulSyncTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_last_attempted_sync_time(&self) -> Result { + }} + #[inline] pub fn get_last_attempted_sync_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LastAttemptedSyncTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn sync_async(&self) -> Result>> { + }} + #[inline] pub fn sync_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SyncAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_sync_status_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_sync_status_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SyncStatusChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_sync_status_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_sync_status_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SyncStatusChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class EmailMailboxSyncManager: IEmailMailboxSyncManager} 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(&self, value: EmailMailboxSyncStatus) -> HRESULT, - fn put_LastSuccessfulSyncTime(&self, value: super::super::foundation::DateTime) -> HRESULT, - fn put_LastAttemptedSyncTime(&self, value: super::super::foundation::DateTime) -> HRESULT + fn put_LastSuccessfulSyncTime(&self, value: foundation::DateTime) -> HRESULT, + fn put_LastAttemptedSyncTime(&self, value: foundation::DateTime) -> HRESULT }} impl IEmailMailboxSyncManager2 { - #[inline] pub unsafe fn set_status(&self, value: EmailMailboxSyncStatus) -> Result<()> { + #[inline] pub fn set_status(&self, value: EmailMailboxSyncStatus) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Status)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_last_successful_sync_time(&self, value: super::super::foundation::DateTime) -> Result<()> { + }} + #[inline] pub fn set_last_successful_sync_time(&self, value: foundation::DateTime) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LastSuccessfulSyncTime)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_last_attempted_sync_time(&self, value: super::super::foundation::DateTime) -> Result<()> { + }} + #[inline] pub fn set_last_attempted_sync_time(&self, value: foundation::DateTime) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LastAttemptedSyncTime)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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, @@ -17634,73 +17634,73 @@ impl RtActivatable for EmailManager {} impl RtActivatable for EmailManager {} impl RtActivatable for EmailManager {} impl EmailManager { - #[inline] pub fn show_compose_new_email_async(message: &EmailMessage) -> Result> { unsafe { + #[inline] pub fn show_compose_new_email_async(message: &EmailMessage) -> Result> { >::get_activation_factory().show_compose_new_email_async(message) - }} - #[inline] pub fn request_store_async(accessType: EmailStoreAccessType) -> Result>> { unsafe { + } + #[inline] pub fn request_store_async(accessType: EmailStoreAccessType) -> Result>> { >::get_activation_factory().request_store_async(accessType) - }} - #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::super::system::User) -> Result> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::super::system::User) -> Result>> { >::get_activation_factory().get_for_user(user) - }} + } } DEFINE_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]) [CLSID_EmailManager]); 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(&self, message: *mut EmailMessage, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn RequestStoreAsync(&self, accessType: EmailStoreAccessType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ShowComposeNewEmailAsync(&self, message: *mut EmailMessage, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn RequestStoreAsync(&self, accessType: EmailStoreAccessType, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(feature="windows-system")] fn get_User(&self, out: *mut *mut super::super::system::User) -> HRESULT }} impl IEmailManagerForUser { - #[inline] pub unsafe fn show_compose_new_email_async(&self, message: &EmailMessage) -> Result> { + #[inline] pub fn show_compose_new_email_async(&self, message: &EmailMessage) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowComposeNewEmailAsync)(self as *const _ as *mut _, message as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_store_async(&self, accessType: EmailStoreAccessType) -> Result>> { + }} + #[inline] pub fn request_store_async(&self, accessType: EmailStoreAccessType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestStoreAsync)(self as *const _ as *mut _, accessType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_user(&self) -> Result> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_User)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class EmailManagerForUser: IEmailManagerForUser} 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(&self, message: *mut EmailMessage, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn ShowComposeNewEmailAsync(&self, message: *mut EmailMessage, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IEmailManagerStatics { - #[inline] pub unsafe fn show_compose_new_email_async(&self, message: &EmailMessage) -> Result> { + #[inline] pub fn show_compose_new_email_async(&self, message: &EmailMessage) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowComposeNewEmailAsync)(self as *const _ as *mut _, message as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, accessType: EmailStoreAccessType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn RequestStoreAsync(&self, accessType: EmailStoreAccessType, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IEmailManagerStatics2 { - #[inline] pub unsafe fn request_store_async(&self, accessType: EmailStoreAccessType) -> Result>> { + #[inline] pub fn request_store_async(&self, accessType: EmailStoreAccessType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestStoreAsync)(self as *const _ as *mut _, accessType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&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(&self, user: &super::super::system::User) -> Result> { + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(&self, user: &super::super::system::User) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForUser)(self as *const _ as *mut _, user as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IEmailMeetingInfo, 834682793, 31027, 16735, 162, 117, 209, 101, 186, 7, 2, 107); RT_INTERFACE!{interface IEmailMeetingInfo(IEmailMeetingInfoVtbl): IInspectable(IInspectableVtbl) [IID_IEmailMeetingInfo] { @@ -17708,147 +17708,147 @@ RT_INTERFACE!{interface IEmailMeetingInfo(IEmailMeetingInfoVtbl): IInspectable(I fn put_AllowNewTimeProposal(&self, value: bool) -> HRESULT, fn get_AppointmentRoamingId(&self, out: *mut HSTRING) -> HRESULT, fn put_AppointmentRoamingId(&self, value: HSTRING) -> HRESULT, - fn get_AppointmentOriginalStartTime(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_AppointmentOriginalStartTime(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_Duration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_Duration(&self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_AppointmentOriginalStartTime(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_AppointmentOriginalStartTime(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_Duration(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_Duration(&self, value: foundation::TimeSpan) -> HRESULT, fn get_IsAllDay(&self, out: *mut bool) -> HRESULT, fn put_IsAllDay(&self, value: bool) -> HRESULT, fn get_IsResponseRequested(&self, out: *mut bool) -> HRESULT, fn put_IsResponseRequested(&self, value: bool) -> HRESULT, fn get_Location(&self, out: *mut HSTRING) -> HRESULT, fn put_Location(&self, value: HSTRING) -> HRESULT, - fn get_ProposedStartTime(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_ProposedStartTime(&self, proposedStartTime: *mut super::super::foundation::IReference) -> HRESULT, - fn get_ProposedDuration(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_ProposedDuration(&self, duration: *mut super::super::foundation::IReference) -> HRESULT, - fn get_RecurrenceStartTime(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_RecurrenceStartTime(&self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_ProposedStartTime(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_ProposedStartTime(&self, proposedStartTime: *mut foundation::IReference) -> HRESULT, + fn get_ProposedDuration(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_ProposedDuration(&self, duration: *mut foundation::IReference) -> HRESULT, + fn get_RecurrenceStartTime(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_RecurrenceStartTime(&self, value: *mut foundation::IReference) -> HRESULT, fn get_Recurrence(&self, out: *mut *mut super::appointments::AppointmentRecurrence) -> HRESULT, fn put_Recurrence(&self, value: *mut super::appointments::AppointmentRecurrence) -> HRESULT, fn get_RemoteChangeNumber(&self, out: *mut u64) -> HRESULT, fn put_RemoteChangeNumber(&self, value: u64) -> HRESULT, - fn get_StartTime(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn put_StartTime(&self, value: super::super::foundation::DateTime) -> HRESULT + fn get_StartTime(&self, out: *mut foundation::DateTime) -> HRESULT, + fn put_StartTime(&self, value: foundation::DateTime) -> HRESULT }} impl IEmailMeetingInfo { - #[inline] pub unsafe fn get_allow_new_time_proposal(&self) -> Result { + #[inline] pub fn get_allow_new_time_proposal(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AllowNewTimeProposal)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_allow_new_time_proposal(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_allow_new_time_proposal(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AllowNewTimeProposal)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_appointment_roaming_id(&self) -> Result { + }} + #[inline] pub fn get_appointment_roaming_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppointmentRoamingId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_appointment_roaming_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_appointment_roaming_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AppointmentRoamingId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_appointment_original_start_time(&self) -> Result>> { + }} + #[inline] pub fn get_appointment_original_start_time(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppointmentOriginalStartTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_appointment_original_start_time(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_appointment_original_start_time(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AppointmentOriginalStartTime)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_duration(&self) -> Result { + }} + #[inline] pub fn get_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Duration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_duration(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_duration(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Duration)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_all_day(&self) -> Result { + }} + #[inline] pub fn get_is_all_day(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsAllDay)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_all_day(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_all_day(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsAllDay)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_response_requested(&self) -> Result { + }} + #[inline] pub fn get_is_response_requested(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsResponseRequested)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_response_requested(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_response_requested(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsResponseRequested)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_location(&self) -> Result { + }} + #[inline] pub fn get_location(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Location)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_location(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_location(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Location)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_proposed_start_time(&self) -> Result>> { + }} + #[inline] pub fn get_proposed_start_time(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProposedStartTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_proposed_start_time(&self, proposedStartTime: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_proposed_start_time(&self, proposedStartTime: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ProposedStartTime)(self as *const _ as *mut _, proposedStartTime as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_proposed_duration(&self) -> Result>> { + }} + #[inline] pub fn get_proposed_duration(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProposedDuration)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_proposed_duration(&self, duration: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_proposed_duration(&self, duration: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ProposedDuration)(self as *const _ as *mut _, duration as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_recurrence_start_time(&self) -> Result>> { + }} + #[inline] pub fn get_recurrence_start_time(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RecurrenceStartTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_recurrence_start_time(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_recurrence_start_time(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RecurrenceStartTime)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_recurrence(&self) -> Result> { + }} + #[inline] pub fn get_recurrence(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Recurrence)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_recurrence(&self, value: &super::appointments::AppointmentRecurrence) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_recurrence(&self, value: &super::appointments::AppointmentRecurrence) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Recurrence)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_change_number(&self) -> Result { + }} + #[inline] pub fn get_remote_change_number(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RemoteChangeNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_remote_change_number(&self, value: u64) -> Result<()> { + }} + #[inline] pub fn set_remote_change_number(&self, value: u64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RemoteChangeNumber)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_start_time(&self) -> Result { + }} + #[inline] pub fn get_start_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StartTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_start_time(&self, value: super::super::foundation::DateTime) -> Result<()> { + }} + #[inline] pub fn set_start_time(&self, value: foundation::DateTime) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StartTime)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class EmailMeetingInfo: IEmailMeetingInfo} impl RtActivatable for EmailMeetingInfo {} @@ -17858,11 +17858,11 @@ RT_INTERFACE!{interface IEmailMeetingInfo2(IEmailMeetingInfo2Vtbl): IInspectable fn get_IsReportedOutOfDateByServer(&self, out: *mut bool) -> HRESULT }} impl IEmailMeetingInfo2 { - #[inline] pub unsafe fn get_is_reported_out_of_date_by_server(&self) -> Result { + #[inline] pub fn get_is_reported_out_of_date_by_server(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsReportedOutOfDateByServer)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum EmailMeetingResponseType: i32 { Accept (EmailMeetingResponseType_Accept) = 0, Decline (EmailMeetingResponseType_Decline) = 1, Tentative (EmailMeetingResponseType_Tentative) = 2, @@ -17873,50 +17873,50 @@ RT_INTERFACE!{interface IEmailMessage(IEmailMessageVtbl): IInspectable(IInspecta fn put_Subject(&self, value: HSTRING) -> HRESULT, fn get_Body(&self, out: *mut HSTRING) -> HRESULT, fn put_Body(&self, value: HSTRING) -> HRESULT, - fn get_To(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_CC(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_Bcc(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_Attachments(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_To(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_CC(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_Bcc(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_Attachments(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IEmailMessage { - #[inline] pub unsafe fn get_subject(&self) -> Result { + #[inline] pub fn get_subject(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Subject)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_subject(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_subject(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Subject)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_body(&self) -> Result { + }} + #[inline] pub fn get_body(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Body)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_body(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_body(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Body)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_to(&self) -> Result>> { + }} + #[inline] pub fn get_to(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_To)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_cc(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_cc(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CC)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_bcc(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_bcc(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Bcc)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_attachments(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_attachments(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Attachments)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class EmailMessage: IEmailMessage} impl RtActivatable for EmailMessage {} @@ -17962,222 +17962,222 @@ RT_INTERFACE!{interface IEmailMessage2(IEmailMessage2Vtbl): IInspectable(IInspec fn put_LastResponseKind(&self, value: EmailMessageResponseKind) -> HRESULT, fn get_Sender(&self, out: *mut *mut EmailRecipient) -> HRESULT, fn put_Sender(&self, value: *mut EmailRecipient) -> HRESULT, - fn get_SentTime(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_SentTime(&self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_SentTime(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_SentTime(&self, value: *mut foundation::IReference) -> HRESULT, fn get_MeetingInfo(&self, out: *mut *mut EmailMeetingInfo) -> HRESULT, fn put_MeetingInfo(&self, value: *mut EmailMeetingInfo) -> HRESULT, #[cfg(feature="windows-storage")] fn GetBodyStream(&self, type_: EmailMessageBodyKind, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, #[cfg(feature="windows-storage")] fn SetBodyStream(&self, type_: EmailMessageBodyKind, stream: *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT }} impl IEmailMessage2 { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_id(&self) -> Result { + }} + #[inline] pub fn get_remote_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_remote_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_remote_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RemoteId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_mailbox_id(&self) -> Result { + }} + #[inline] pub fn get_mailbox_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MailboxId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_conversation_id(&self) -> Result { + }} + #[inline] pub fn get_conversation_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ConversationId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_folder_id(&self) -> Result { + }} + #[inline] pub fn get_folder_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FolderId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_allow_internet_images(&self) -> Result { + }} + #[inline] pub fn get_allow_internet_images(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AllowInternetImages)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_allow_internet_images(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_allow_internet_images(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AllowInternetImages)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_change_number(&self) -> Result { + }} + #[inline] pub fn get_change_number(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ChangeNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_download_state(&self) -> Result { + }} + #[inline] pub fn get_download_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DownloadState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_download_state(&self, value: EmailMessageDownloadState) -> Result<()> { + }} + #[inline] pub fn set_download_state(&self, value: EmailMessageDownloadState) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DownloadState)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_estimated_download_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_estimated_download_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EstimatedDownloadSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_estimated_download_size_in_bytes(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_estimated_download_size_in_bytes(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_EstimatedDownloadSizeInBytes)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_flag_state(&self) -> Result { + }} + #[inline] pub fn get_flag_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FlagState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_flag_state(&self, value: EmailFlagState) -> Result<()> { + }} + #[inline] pub fn set_flag_state(&self, value: EmailFlagState) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FlagState)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_partial_bodies(&self) -> Result { + }} + #[inline] pub fn get_has_partial_bodies(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasPartialBodies)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_importance(&self) -> Result { + }} + #[inline] pub fn get_importance(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Importance)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_importance(&self, value: EmailImportance) -> Result<()> { + }} + #[inline] pub fn set_importance(&self, value: EmailImportance) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Importance)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_in_response_to_message_id(&self) -> Result { + }} + #[inline] pub fn get_in_response_to_message_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InResponseToMessageId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_irm_info(&self) -> Result> { + }} + #[inline] pub fn get_irm_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IrmInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_irm_info(&self, value: &EmailIrmInfo) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_irm_info(&self, value: &EmailIrmInfo) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IrmInfo)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_draft_message(&self) -> Result { + }} + #[inline] pub fn get_is_draft_message(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDraftMessage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_read(&self) -> Result { + }} + #[inline] pub fn get_is_read(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsRead)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_read(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_read(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsRead)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_seen(&self) -> Result { + }} + #[inline] pub fn get_is_seen(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSeen)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_seen(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_seen(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsSeen)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_server_search_message(&self) -> Result { + }} + #[inline] pub fn get_is_server_search_message(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsServerSearchMessage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_smart_sendable(&self) -> Result { + }} + #[inline] pub fn get_is_smart_sendable(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSmartSendable)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_message_class(&self) -> Result { + }} + #[inline] pub fn get_message_class(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MessageClass)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_message_class(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_message_class(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MessageClass)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_normalized_subject(&self) -> Result { + }} + #[inline] pub fn get_normalized_subject(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NormalizedSubject)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_original_code_page(&self) -> Result { + }} + #[inline] pub fn get_original_code_page(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OriginalCodePage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_original_code_page(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_original_code_page(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OriginalCodePage)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_preview(&self) -> Result { + }} + #[inline] pub fn get_preview(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Preview)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_preview(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_preview(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Preview)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_last_response_kind(&self) -> Result { + }} + #[inline] pub fn get_last_response_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LastResponseKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_last_response_kind(&self, value: EmailMessageResponseKind) -> Result<()> { + }} + #[inline] pub fn set_last_response_kind(&self, value: EmailMessageResponseKind) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LastResponseKind)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_sender(&self) -> Result> { + }} + #[inline] pub fn get_sender(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Sender)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_sender(&self, value: &EmailRecipient) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_sender(&self, value: &EmailRecipient) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Sender)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_sent_time(&self) -> Result>> { + }} + #[inline] pub fn get_sent_time(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SentTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_sent_time(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_sent_time(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SentTime)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_meeting_info(&self) -> Result> { + }} + #[inline] pub fn get_meeting_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MeetingInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_meeting_info(&self, value: &EmailMeetingInfo) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_meeting_info(&self, value: &EmailMeetingInfo) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MeetingInfo)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_body_stream(&self, type_: EmailMessageBodyKind) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_body_stream(&self, type_: EmailMessageBodyKind) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetBodyStream)(self as *const _ as *mut _, type_, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn set_body_stream(&self, type_: EmailMessageBodyKind, stream: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_body_stream(&self, type_: EmailMessageBodyKind, stream: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetBodyStream)(self as *const _ as *mut _, type_, stream as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IEmailMessage3, 2716493660, 58776, 19753, 160, 24, 252, 123, 126, 236, 224, 161); RT_INTERFACE!{interface IEmailMessage3(IEmailMessage3Vtbl): IInspectable(IInspectableVtbl) [IID_IEmailMessage3] { @@ -18189,63 +18189,63 @@ RT_INTERFACE!{interface IEmailMessage3(IEmailMessage3Vtbl): IInspectable(IInspec fn put_SmimeKind(&self, value: EmailMessageSmimeKind) -> HRESULT }} impl IEmailMessage3 { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_smime_data(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_smime_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SmimeData)(self 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_smime_data(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_smime_data(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SmimeData)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_smime_kind(&self) -> Result { + }} + #[inline] pub fn get_smime_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SmimeKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_smime_kind(&self, value: EmailMessageSmimeKind) -> Result<()> { + }} + #[inline] pub fn set_smime_kind(&self, value: EmailMessageSmimeKind) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SmimeKind)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IEmailMessage4, 830271873, 15999, 18949, 131, 148, 62, 16, 51, 109, 212, 53); RT_INTERFACE!{interface IEmailMessage4(IEmailMessage4Vtbl): IInspectable(IInspectableVtbl) [IID_IEmailMessage4] { - fn get_ReplyTo(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_ReplyTo(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_SentRepresenting(&self, out: *mut *mut EmailRecipient) -> HRESULT, fn put_SentRepresenting(&self, value: *mut EmailRecipient) -> HRESULT }} impl IEmailMessage4 { - #[inline] pub unsafe fn get_reply_to(&self) -> Result>> { + #[inline] pub fn get_reply_to(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ReplyTo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sent_representing(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_sent_representing(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SentRepresenting)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_sent_representing(&self, value: &EmailRecipient) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_sent_representing(&self, value: &EmailRecipient) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SentRepresenting)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Messages(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_Status(&self, out: *mut EmailBatchStatus) -> HRESULT }} impl IEmailMessageBatch { - #[inline] pub unsafe fn get_messages(&self) -> Result>> { + #[inline] pub fn get_messages(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Messages)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class EmailMessageBatch: IEmailMessageBatch} RT_ENUM! { enum EmailMessageBodyKind: i32 { @@ -18256,14 +18256,14 @@ RT_ENUM! { enum EmailMessageDownloadState: i32 { }} 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn ReadBatchAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IEmailMessageReader { - #[inline] pub unsafe fn read_batch_async(&self) -> Result>> { + #[inline] pub fn read_batch_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadBatchAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class EmailMessageReader: IEmailMessageReader} RT_ENUM! { enum EmailMessageResponseKind: i32 { @@ -18284,57 +18284,57 @@ RT_INTERFACE!{interface IEmailQueryOptions(IEmailQueryOptionsVtbl): IInspectable fn put_SortProperty(&self, value: EmailQuerySortProperty) -> HRESULT, fn get_Kind(&self, out: *mut EmailQueryKind) -> HRESULT, fn put_Kind(&self, value: EmailQueryKind) -> HRESULT, - fn get_FolderIds(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_FolderIds(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IEmailQueryOptions { - #[inline] pub unsafe fn get_text_search(&self) -> Result> { + #[inline] pub fn get_text_search(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TextSearch)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sort_direction(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_sort_direction(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SortDirection)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_sort_direction(&self, value: EmailQuerySortDirection) -> Result<()> { + }} + #[inline] pub fn set_sort_direction(&self, value: EmailQuerySortDirection) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SortDirection)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_sort_property(&self) -> Result { + }} + #[inline] pub fn get_sort_property(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SortProperty)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_sort_property(&self, value: EmailQuerySortProperty) -> Result<()> { + }} + #[inline] pub fn set_sort_property(&self, value: EmailQuerySortProperty) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SortProperty)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_kind(&self) -> Result { + }} + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_kind(&self, value: EmailQueryKind) -> Result<()> { + }} + #[inline] pub fn set_kind(&self, value: EmailQueryKind) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Kind)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_folder_ids(&self) -> Result>> { + }} + #[inline] pub fn get_folder_ids(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FolderIds)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class EmailQueryOptions: IEmailQueryOptions} impl RtActivatable for EmailQueryOptions {} impl RtActivatable for EmailQueryOptions {} impl EmailQueryOptions { - #[inline] pub fn create_with_text(text: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_with_text(text: &HStringArg) -> Result> { >::get_activation_factory().create_with_text(text) - }} - #[inline] pub fn create_with_text_and_fields(text: &HStringArg, fields: EmailQuerySearchFields) -> Result> { unsafe { + } + #[inline] pub fn create_with_text_and_fields(text: &HStringArg, fields: EmailQuerySearchFields) -> Result> { >::get_activation_factory().create_with_text_and_fields(text, fields) - }} + } } DEFINE_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]) [CLSID_EmailQueryOptions]); DEFINE_IID!(IID_IEmailQueryOptionsFactory, 2297536952, 30891, 20200, 180, 227, 4, 109, 110, 47, 229, 226); @@ -18343,16 +18343,16 @@ RT_INTERFACE!{static interface IEmailQueryOptionsFactory(IEmailQueryOptionsFacto fn CreateWithTextAndFields(&self, text: HSTRING, fields: EmailQuerySearchFields, out: *mut *mut EmailQueryOptions) -> HRESULT }} impl IEmailQueryOptionsFactory { - #[inline] pub unsafe fn create_with_text(&self, text: &HStringArg) -> Result> { + #[inline] pub fn create_with_text(&self, text: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithText)(self as *const _ as *mut _, text.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_text_and_fields(&self, text: &HStringArg, fields: EmailQuerySearchFields) -> Result> { + }} + #[inline] pub fn create_with_text_and_fields(&self, text: &HStringArg, fields: EmailQuerySearchFields) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithTextAndFields)(self as *const _ as *mut _, text.get(), fields, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -18376,33 +18376,33 @@ RT_INTERFACE!{interface IEmailQueryTextSearch(IEmailQueryTextSearchVtbl): IInspe fn put_Text(&self, value: HSTRING) -> HRESULT }} impl IEmailQueryTextSearch { - #[inline] pub unsafe fn get_fields(&self) -> Result { + #[inline] pub fn get_fields(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Fields)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_fields(&self, value: EmailQuerySearchFields) -> Result<()> { + }} + #[inline] pub fn set_fields(&self, value: EmailQuerySearchFields) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Fields)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_search_scope(&self) -> Result { + }} + #[inline] pub fn get_search_scope(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SearchScope)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_search_scope(&self, value: EmailQuerySearchScope) -> Result<()> { + }} + #[inline] pub fn set_search_scope(&self, value: EmailQuerySearchScope) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SearchScope)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_text(&self) -> Result { + }} + #[inline] pub fn get_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Text)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_text(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_text(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Text)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class EmailQueryTextSearch: IEmailQueryTextSearch} DEFINE_IID!(IID_IEmailRecipient, 3404211635, 17528, 18452, 185, 0, 201, 2, 181, 225, 155, 83); @@ -18413,35 +18413,35 @@ RT_INTERFACE!{interface IEmailRecipient(IEmailRecipientVtbl): IInspectable(IInsp fn put_Address(&self, value: HSTRING) -> HRESULT }} impl IEmailRecipient { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Name)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_address(&self) -> Result { + }} + #[inline] pub fn get_address(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Address)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_address(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_address(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Address)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class EmailRecipient: IEmailRecipient} impl RtActivatable for EmailRecipient {} impl RtActivatable for EmailRecipient {} impl EmailRecipient { - #[inline] pub fn create(address: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(address: &HStringArg) -> Result> { >::get_activation_factory().create(address) - }} - #[inline] pub fn create_with_name(address: &HStringArg, name: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_with_name(address: &HStringArg, name: &HStringArg) -> Result> { >::get_activation_factory().create_with_name(address, name) - }} + } } DEFINE_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]) [CLSID_EmailRecipient]); DEFINE_IID!(IID_IEmailRecipientFactory, 1426110541, 51098, 20216, 185, 9, 114, 46, 24, 227, 147, 93); @@ -18450,33 +18450,33 @@ RT_INTERFACE!{static interface IEmailRecipientFactory(IEmailRecipientFactoryVtbl fn CreateWithName(&self, address: HSTRING, name: HSTRING, out: *mut *mut EmailRecipient) -> HRESULT }} impl IEmailRecipientFactory { - #[inline] pub unsafe fn create(&self, address: &HStringArg) -> Result> { + #[inline] pub fn create(&self, address: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, address.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_name(&self, address: &HStringArg, name: &HStringArg) -> Result> { + }} + #[inline] pub fn create_with_name(&self, address: &HStringArg, name: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithName)(self as *const _ as *mut _, address.get(), name.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut EmailRecipientResolutionStatus) -> HRESULT, - #[cfg(feature="windows-security")] fn get_PublicKeys(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + #[cfg(feature="windows-security")] fn get_PublicKeys(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IEmailRecipientResolutionResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-security")] #[inline] pub unsafe fn get_public_keys(&self) -> Result>> { + }} + #[cfg(feature="windows-security")] #[inline] pub fn get_public_keys(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PublicKeys)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class EmailRecipientResolutionResult: IEmailRecipientResolutionResult} impl RtActivatable for EmailRecipientResolutionResult {} @@ -18484,17 +18484,17 @@ DEFINE_CLSID!(EmailRecipientResolutionResult(&[87,105,110,100,111,119,115,46,65, 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(&self, value: EmailRecipientResolutionStatus) -> HRESULT, - #[cfg(feature="windows-security")] fn SetPublicKeys(&self, value: *mut super::super::foundation::collections::IIterable) -> HRESULT + #[cfg(feature="windows-security")] fn SetPublicKeys(&self, value: *mut foundation::collections::IIterable) -> HRESULT }} impl IEmailRecipientResolutionResult2 { - #[inline] pub unsafe fn set_status(&self, value: EmailRecipientResolutionStatus) -> Result<()> { + #[inline] pub fn set_status(&self, value: EmailRecipientResolutionStatus) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Status)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-security")] #[inline] pub unsafe fn set_public_keys(&self, value: &super::super::foundation::collections::IIterable) -> Result<()> { + }} + #[cfg(feature="windows-security")] #[inline] pub fn set_public_keys(&self, value: &foundation::collections::IIterable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetPublicKeys)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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, @@ -18504,74 +18504,74 @@ RT_ENUM! { enum EmailSpecialFolderKind: i32 { }} 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn FindMailboxesAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, fn GetConversationReader(&self, out: *mut *mut EmailConversationReader) -> HRESULT, fn GetConversationReaderWithOptions(&self, options: *mut EmailQueryOptions, out: *mut *mut EmailConversationReader) -> HRESULT, fn GetMessageReader(&self, out: *mut *mut EmailMessageReader) -> HRESULT, fn GetMessageReaderWithOptions(&self, options: *mut EmailQueryOptions, out: *mut *mut EmailMessageReader) -> HRESULT, - fn GetMailboxAsync(&self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetConversationAsync(&self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetFolderAsync(&self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetMessageAsync(&self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CreateMailboxAsync(&self, accountName: HSTRING, accountAddress: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CreateMailboxInAccountAsync(&self, accountName: HSTRING, accountAddress: HSTRING, userDataAccountId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetMailboxAsync(&self, id: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetConversationAsync(&self, id: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetFolderAsync(&self, id: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetMessageAsync(&self, id: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreateMailboxAsync(&self, accountName: HSTRING, accountAddress: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreateMailboxInAccountAsync(&self, accountName: HSTRING, accountAddress: HSTRING, userDataAccountId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IEmailStore { - #[inline] pub unsafe fn find_mailboxes_async(&self) -> Result>>> { + #[inline] pub fn find_mailboxes_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindMailboxesAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_conversation_reader(&self) -> Result> { + }} + #[inline] pub fn get_conversation_reader(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetConversationReader)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_conversation_reader_with_options(&self, options: &EmailQueryOptions) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_conversation_reader_with_options(&self, options: &EmailQueryOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetConversationReaderWithOptions)(self 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 get_message_reader(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_message_reader(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetMessageReader)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_message_reader_with_options(&self, options: &EmailQueryOptions) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_message_reader_with_options(&self, options: &EmailQueryOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetMessageReaderWithOptions)(self 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 get_mailbox_async(&self, id: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_mailbox_async(&self, id: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetMailboxAsync)(self as *const _ as *mut _, id.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_conversation_async(&self, id: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_conversation_async(&self, id: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetConversationAsync)(self as *const _ as *mut _, id.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_folder_async(&self, id: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_folder_async(&self, id: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFolderAsync)(self as *const _ as *mut _, id.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_message_async(&self, id: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_message_async(&self, id: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetMessageAsync)(self as *const _ as *mut _, id.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_mailbox_async(&self, accountName: &HStringArg, accountAddress: &HStringArg) -> Result>> { + }} + #[inline] pub fn create_mailbox_async(&self, accountName: &HStringArg, accountAddress: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateMailboxAsync)(self as *const _ as *mut _, 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(&self, accountName: &HStringArg, accountAddress: &HStringArg, userDataAccountId: &HStringArg) -> Result>> { + }} + #[inline] pub fn create_mailbox_in_account_async(&self, accountName: &HStringArg, accountAddress: &HStringArg, userDataAccountId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateMailboxInAccountAsync)(self as *const _ as *mut _, accountName.get(), accountAddress.get(), userDataAccountId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class EmailStore: IEmailStore} RT_ENUM! { enum EmailStoreAccessType: i32 { @@ -18586,178 +18586,178 @@ pub mod dataprovider { // Windows.ApplicationModel.Email.DataProvider use ::prelude::*; 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(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_MailboxSyncRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_DownloadMessageRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DownloadMessageRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_DownloadAttachmentRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DownloadAttachmentRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_CreateFolderRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CreateFolderRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_DeleteFolderRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DeleteFolderRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_EmptyFolderRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_EmptyFolderRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_MoveFolderRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_MoveFolderRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_UpdateMeetingResponseRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_UpdateMeetingResponseRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_ForwardMeetingRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ForwardMeetingRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_ProposeNewTimeForMeetingRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ProposeNewTimeForMeetingRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_SetAutoReplySettingsRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SetAutoReplySettingsRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_GetAutoReplySettingsRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_GetAutoReplySettingsRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_ResolveRecipientsRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ResolveRecipientsRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_ValidateCertificatesRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ValidateCertificatesRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_ServerSearchReadBatchRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ServerSearchReadBatchRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_MailboxSyncRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_MailboxSyncRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_DownloadMessageRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DownloadMessageRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_DownloadAttachmentRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DownloadAttachmentRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_CreateFolderRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CreateFolderRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_DeleteFolderRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DeleteFolderRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_EmptyFolderRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_EmptyFolderRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_MoveFolderRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_MoveFolderRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_UpdateMeetingResponseRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_UpdateMeetingResponseRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ForwardMeetingRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ForwardMeetingRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ProposeNewTimeForMeetingRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ProposeNewTimeForMeetingRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_SetAutoReplySettingsRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SetAutoReplySettingsRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_GetAutoReplySettingsRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_GetAutoReplySettingsRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ResolveRecipientsRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ResolveRecipientsRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ValidateCertificatesRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ValidateCertificatesRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ServerSearchReadBatchRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ServerSearchReadBatchRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn Start(&self) -> HRESULT }} impl IEmailDataProviderConnection { - #[inline] pub unsafe fn add_mailbox_sync_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub fn add_mailbox_sync_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_MailboxSyncRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_mailbox_sync_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_mailbox_sync_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_MailboxSyncRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_download_message_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_download_message_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DownloadMessageRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_download_message_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_download_message_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DownloadMessageRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_download_attachment_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_download_attachment_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DownloadAttachmentRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_download_attachment_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_download_attachment_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DownloadAttachmentRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_create_folder_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_create_folder_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CreateFolderRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_create_folder_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_create_folder_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CreateFolderRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_delete_folder_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_delete_folder_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DeleteFolderRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_delete_folder_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_delete_folder_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DeleteFolderRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_empty_folder_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_empty_folder_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_EmptyFolderRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_empty_folder_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_empty_folder_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_EmptyFolderRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_move_folder_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_move_folder_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_MoveFolderRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_move_folder_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_move_folder_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_MoveFolderRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_update_meeting_response_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_update_meeting_response_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_UpdateMeetingResponseRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_update_meeting_response_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_update_meeting_response_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_UpdateMeetingResponseRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_forward_meeting_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_forward_meeting_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ForwardMeetingRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_forward_meeting_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_forward_meeting_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ForwardMeetingRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_propose_new_time_for_meeting_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_propose_new_time_for_meeting_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ProposeNewTimeForMeetingRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_propose_new_time_for_meeting_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_propose_new_time_for_meeting_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ProposeNewTimeForMeetingRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_set_auto_reply_settings_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_set_auto_reply_settings_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SetAutoReplySettingsRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_set_auto_reply_settings_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_set_auto_reply_settings_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SetAutoReplySettingsRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_get_auto_reply_settings_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_get_auto_reply_settings_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_GetAutoReplySettingsRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_get_auto_reply_settings_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_get_auto_reply_settings_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_GetAutoReplySettingsRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_resolve_recipients_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_resolve_recipients_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ResolveRecipientsRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_resolve_recipients_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_resolve_recipients_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ResolveRecipientsRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_validate_certificates_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_validate_certificates_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ValidateCertificatesRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_validate_certificates_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_validate_certificates_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ValidateCertificatesRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_server_search_read_batch_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_server_search_read_batch_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ServerSearchReadBatchRequested)(self as *const _ as *mut _, 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(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_server_search_read_batch_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ServerSearchReadBatchRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class EmailDataProviderConnection: IEmailDataProviderConnection} DEFINE_IID!(IID_IEmailDataProviderTriggerDetails, 2403225168, 13342, 17907, 187, 160, 132, 160, 5, 225, 49, 154); @@ -18765,11 +18765,11 @@ RT_INTERFACE!{interface IEmailDataProviderTriggerDetails(IEmailDataProviderTrigg fn get_Connection(&self, out: *mut *mut EmailDataProviderConnection) -> HRESULT }} impl IEmailDataProviderTriggerDetails { - #[inline] pub unsafe fn get_connection(&self) -> Result> { + #[inline] pub fn get_connection(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Connection)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class EmailDataProviderTriggerDetails: IEmailDataProviderTriggerDetails} DEFINE_IID!(IID_IEmailMailboxCreateFolderRequest, 407713653, 51489, 19513, 163, 9, 225, 108, 159, 34, 176, 75); @@ -18777,101 +18777,101 @@ RT_INTERFACE!{interface IEmailMailboxCreateFolderRequest(IEmailMailboxCreateFold fn get_EmailMailboxId(&self, out: *mut HSTRING) -> HRESULT, fn get_ParentFolderId(&self, out: *mut HSTRING) -> HRESULT, fn get_Name(&self, out: *mut HSTRING) -> HRESULT, - fn ReportCompletedAsync(&self, folder: *mut super::EmailFolder, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportFailedAsync(&self, status: super::EmailMailboxCreateFolderStatus, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn ReportCompletedAsync(&self, folder: *mut super::EmailFolder, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&self, status: super::EmailMailboxCreateFolderStatus, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IEmailMailboxCreateFolderRequest { - #[inline] pub unsafe fn get_email_mailbox_id(&self) -> Result { + #[inline] pub fn get_email_mailbox_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EmailMailboxId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_parent_folder_id(&self) -> Result { + }} + #[inline] pub fn get_parent_folder_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ParentFolderId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_name(&self) -> Result { + }} + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed_async(&self, folder: &super::EmailFolder) -> Result> { + }} + #[inline] pub fn report_completed_async(&self, folder: &super::EmailFolder) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportCompletedAsync)(self as *const _ as *mut _, folder as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_failed_async(&self, status: super::EmailMailboxCreateFolderStatus) -> Result> { + }} + #[inline] pub fn report_failed_async(&self, status: super::EmailMailboxCreateFolderStatus) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportFailedAsync)(self as *const _ as *mut _, status, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class EmailMailboxCreateFolderRequest: IEmailMailboxCreateFolderRequest} 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(&self, out: *mut *mut EmailMailboxCreateFolderRequest) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IEmailMailboxCreateFolderRequestEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class EmailMailboxCreateFolderRequestEventArgs: IEmailMailboxCreateFolderRequestEventArgs} 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(&self, out: *mut HSTRING) -> HRESULT, fn get_EmailFolderId(&self, out: *mut HSTRING) -> HRESULT, - fn ReportCompletedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportFailedAsync(&self, status: super::EmailMailboxDeleteFolderStatus, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn ReportCompletedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&self, status: super::EmailMailboxDeleteFolderStatus, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IEmailMailboxDeleteFolderRequest { - #[inline] pub unsafe fn get_email_mailbox_id(&self) -> Result { + #[inline] pub fn get_email_mailbox_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EmailMailboxId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_email_folder_id(&self) -> Result { + }} + #[inline] pub fn get_email_folder_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EmailFolderId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed_async(&self) -> Result> { + }} + #[inline] pub fn report_completed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportCompletedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_failed_async(&self, status: super::EmailMailboxDeleteFolderStatus) -> Result> { + }} + #[inline] pub fn report_failed_async(&self, status: super::EmailMailboxDeleteFolderStatus) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportFailedAsync)(self as *const _ as *mut _, status, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class EmailMailboxDeleteFolderRequest: IEmailMailboxDeleteFolderRequest} 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(&self, out: *mut *mut EmailMailboxDeleteFolderRequest) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IEmailMailboxDeleteFolderRequestEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class EmailMailboxDeleteFolderRequestEventArgs: IEmailMailboxDeleteFolderRequestEventArgs} DEFINE_IID!(IID_IEmailMailboxDownloadAttachmentRequest, 186497972, 29964, 18657, 188, 228, 141, 88, 150, 132, 255, 188); @@ -18879,275 +18879,275 @@ RT_INTERFACE!{interface IEmailMailboxDownloadAttachmentRequest(IEmailMailboxDown fn get_EmailMailboxId(&self, out: *mut HSTRING) -> HRESULT, fn get_EmailMessageId(&self, out: *mut HSTRING) -> HRESULT, fn get_EmailAttachmentId(&self, out: *mut HSTRING) -> HRESULT, - fn ReportCompletedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportFailedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn ReportCompletedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IEmailMailboxDownloadAttachmentRequest { - #[inline] pub unsafe fn get_email_mailbox_id(&self) -> Result { + #[inline] pub fn get_email_mailbox_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EmailMailboxId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_email_message_id(&self) -> Result { + }} + #[inline] pub fn get_email_message_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EmailMessageId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_email_attachment_id(&self) -> Result { + }} + #[inline] pub fn get_email_attachment_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EmailAttachmentId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed_async(&self) -> Result> { + }} + #[inline] pub fn report_completed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportCompletedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_failed_async(&self) -> Result> { + }} + #[inline] pub fn report_failed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportFailedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class EmailMailboxDownloadAttachmentRequest: IEmailMailboxDownloadAttachmentRequest} 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(&self, out: *mut *mut EmailMailboxDownloadAttachmentRequest) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IEmailMailboxDownloadAttachmentRequestEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class EmailMailboxDownloadAttachmentRequestEventArgs: IEmailMailboxDownloadAttachmentRequestEventArgs} 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(&self, out: *mut HSTRING) -> HRESULT, fn get_EmailMessageId(&self, out: *mut HSTRING) -> HRESULT, - fn ReportCompletedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportFailedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn ReportCompletedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IEmailMailboxDownloadMessageRequest { - #[inline] pub unsafe fn get_email_mailbox_id(&self) -> Result { + #[inline] pub fn get_email_mailbox_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EmailMailboxId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_email_message_id(&self) -> Result { + }} + #[inline] pub fn get_email_message_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EmailMessageId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed_async(&self) -> Result> { + }} + #[inline] pub fn report_completed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportCompletedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_failed_async(&self) -> Result> { + }} + #[inline] pub fn report_failed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportFailedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class EmailMailboxDownloadMessageRequest: IEmailMailboxDownloadMessageRequest} 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(&self, out: *mut *mut EmailMailboxDownloadMessageRequest) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IEmailMailboxDownloadMessageRequestEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class EmailMailboxDownloadMessageRequestEventArgs: IEmailMailboxDownloadMessageRequestEventArgs} 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(&self, out: *mut HSTRING) -> HRESULT, fn get_EmailFolderId(&self, out: *mut HSTRING) -> HRESULT, - fn ReportCompletedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportFailedAsync(&self, status: super::EmailMailboxEmptyFolderStatus, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn ReportCompletedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&self, status: super::EmailMailboxEmptyFolderStatus, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IEmailMailboxEmptyFolderRequest { - #[inline] pub unsafe fn get_email_mailbox_id(&self) -> Result { + #[inline] pub fn get_email_mailbox_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EmailMailboxId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_email_folder_id(&self) -> Result { + }} + #[inline] pub fn get_email_folder_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EmailFolderId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed_async(&self) -> Result> { + }} + #[inline] pub fn report_completed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportCompletedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_failed_async(&self, status: super::EmailMailboxEmptyFolderStatus) -> Result> { + }} + #[inline] pub fn report_failed_async(&self, status: super::EmailMailboxEmptyFolderStatus) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportFailedAsync)(self as *const _ as *mut _, status, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class EmailMailboxEmptyFolderRequest: IEmailMailboxEmptyFolderRequest} 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(&self, out: *mut *mut EmailMailboxEmptyFolderRequest) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IEmailMailboxEmptyFolderRequestEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class EmailMailboxEmptyFolderRequestEventArgs: IEmailMailboxEmptyFolderRequestEventArgs} 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(&self, out: *mut HSTRING) -> HRESULT, fn get_EmailMessageId(&self, out: *mut HSTRING) -> HRESULT, - fn get_Recipients(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_Recipients(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_Subject(&self, out: *mut HSTRING) -> HRESULT, fn get_ForwardHeaderType(&self, out: *mut super::EmailMessageBodyKind) -> HRESULT, fn get_ForwardHeader(&self, out: *mut HSTRING) -> HRESULT, fn get_Comment(&self, out: *mut HSTRING) -> HRESULT, - fn ReportCompletedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportFailedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn ReportCompletedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IEmailMailboxForwardMeetingRequest { - #[inline] pub unsafe fn get_email_mailbox_id(&self) -> Result { + #[inline] pub fn get_email_mailbox_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EmailMailboxId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_email_message_id(&self) -> Result { + }} + #[inline] pub fn get_email_message_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EmailMessageId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_recipients(&self) -> Result>> { + }} + #[inline] pub fn get_recipients(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Recipients)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_subject(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_subject(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Subject)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_forward_header_type(&self) -> Result { + }} + #[inline] pub fn get_forward_header_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ForwardHeaderType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_forward_header(&self) -> Result { + }} + #[inline] pub fn get_forward_header(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ForwardHeader)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_comment(&self) -> Result { + }} + #[inline] pub fn get_comment(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Comment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed_async(&self) -> Result> { + }} + #[inline] pub fn report_completed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportCompletedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_failed_async(&self) -> Result> { + }} + #[inline] pub fn report_failed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportFailedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class EmailMailboxForwardMeetingRequest: IEmailMailboxForwardMeetingRequest} 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(&self, out: *mut *mut EmailMailboxForwardMeetingRequest) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IEmailMailboxForwardMeetingRequestEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class EmailMailboxForwardMeetingRequestEventArgs: IEmailMailboxForwardMeetingRequestEventArgs} 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(&self, out: *mut HSTRING) -> HRESULT, fn get_RequestedFormat(&self, out: *mut super::EmailMailboxAutoReplyMessageResponseKind) -> HRESULT, - fn ReportCompletedAsync(&self, autoReplySettings: *mut super::EmailMailboxAutoReplySettings, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportFailedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn ReportCompletedAsync(&self, autoReplySettings: *mut super::EmailMailboxAutoReplySettings, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IEmailMailboxGetAutoReplySettingsRequest { - #[inline] pub unsafe fn get_email_mailbox_id(&self) -> Result { + #[inline] pub fn get_email_mailbox_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EmailMailboxId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_requested_format(&self) -> Result { + }} + #[inline] pub fn get_requested_format(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RequestedFormat)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed_async(&self, autoReplySettings: &super::EmailMailboxAutoReplySettings) -> Result> { + }} + #[inline] pub fn report_completed_async(&self, autoReplySettings: &super::EmailMailboxAutoReplySettings) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportCompletedAsync)(self as *const _ as *mut _, autoReplySettings as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_failed_async(&self) -> Result> { + }} + #[inline] pub fn report_failed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportFailedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class EmailMailboxGetAutoReplySettingsRequest: IEmailMailboxGetAutoReplySettingsRequest} 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(&self, out: *mut *mut EmailMailboxGetAutoReplySettingsRequest) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IEmailMailboxGetAutoReplySettingsRequestEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class EmailMailboxGetAutoReplySettingsRequestEventArgs: IEmailMailboxGetAutoReplySettingsRequestEventArgs} DEFINE_IID!(IID_IEmailMailboxMoveFolderRequest, 280635478, 19093, 16488, 145, 204, 103, 204, 122, 207, 69, 79); @@ -19156,178 +19156,178 @@ RT_INTERFACE!{interface IEmailMailboxMoveFolderRequest(IEmailMailboxMoveFolderRe fn get_EmailFolderId(&self, out: *mut HSTRING) -> HRESULT, fn get_NewParentFolderId(&self, out: *mut HSTRING) -> HRESULT, fn get_NewFolderName(&self, out: *mut HSTRING) -> HRESULT, - fn ReportCompletedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportFailedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn ReportCompletedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IEmailMailboxMoveFolderRequest { - #[inline] pub unsafe fn get_email_mailbox_id(&self) -> Result { + #[inline] pub fn get_email_mailbox_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EmailMailboxId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_email_folder_id(&self) -> Result { + }} + #[inline] pub fn get_email_folder_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EmailFolderId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_new_parent_folder_id(&self) -> Result { + }} + #[inline] pub fn get_new_parent_folder_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NewParentFolderId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_new_folder_name(&self) -> Result { + }} + #[inline] pub fn get_new_folder_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NewFolderName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed_async(&self) -> Result> { + }} + #[inline] pub fn report_completed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportCompletedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_failed_async(&self) -> Result> { + }} + #[inline] pub fn report_failed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportFailedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class EmailMailboxMoveFolderRequest: IEmailMailboxMoveFolderRequest} 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(&self, out: *mut *mut EmailMailboxMoveFolderRequest) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IEmailMailboxMoveFolderRequestEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class EmailMailboxMoveFolderRequestEventArgs: IEmailMailboxMoveFolderRequestEventArgs} 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(&self, out: *mut HSTRING) -> HRESULT, fn get_EmailMessageId(&self, out: *mut HSTRING) -> HRESULT, - fn get_NewStartTime(&self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, - fn get_NewDuration(&self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_NewStartTime(&self, out: *mut foundation::DateTime) -> HRESULT, + fn get_NewDuration(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn get_Subject(&self, out: *mut HSTRING) -> HRESULT, fn get_Comment(&self, out: *mut HSTRING) -> HRESULT, - fn ReportCompletedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportFailedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn ReportCompletedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IEmailMailboxProposeNewTimeForMeetingRequest { - #[inline] pub unsafe fn get_email_mailbox_id(&self) -> Result { + #[inline] pub fn get_email_mailbox_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EmailMailboxId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_email_message_id(&self) -> Result { + }} + #[inline] pub fn get_email_message_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EmailMessageId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_new_start_time(&self) -> Result<::rt::gen::windows::foundation::DateTime> { + }} + #[inline] pub fn get_new_start_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NewStartTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_new_duration(&self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + }} + #[inline] pub fn get_new_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NewDuration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_subject(&self) -> Result { + }} + #[inline] pub fn get_subject(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Subject)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_comment(&self) -> Result { + }} + #[inline] pub fn get_comment(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Comment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed_async(&self) -> Result> { + }} + #[inline] pub fn report_completed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportCompletedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_failed_async(&self) -> Result> { + }} + #[inline] pub fn report_failed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportFailedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class EmailMailboxProposeNewTimeForMeetingRequest: IEmailMailboxProposeNewTimeForMeetingRequest} 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(&self, out: *mut *mut EmailMailboxProposeNewTimeForMeetingRequest) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IEmailMailboxProposeNewTimeForMeetingRequestEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class EmailMailboxProposeNewTimeForMeetingRequestEventArgs: IEmailMailboxProposeNewTimeForMeetingRequestEventArgs} 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(&self, out: *mut HSTRING) -> HRESULT, - fn get_Recipients(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn ReportCompletedAsync(&self, resolutionResults: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportFailedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn get_Recipients(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn ReportCompletedAsync(&self, resolutionResults: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IEmailMailboxResolveRecipientsRequest { - #[inline] pub unsafe fn get_email_mailbox_id(&self) -> Result { + #[inline] pub fn get_email_mailbox_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EmailMailboxId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_recipients(&self) -> Result>> { + }} + #[inline] pub fn get_recipients(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Recipients)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed_async(&self, resolutionResults: &::rt::gen::windows::foundation::collections::IIterable) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn report_completed_async(&self, resolutionResults: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportCompletedAsync)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[inline] pub fn report_failed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportFailedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class EmailMailboxResolveRecipientsRequest: IEmailMailboxResolveRecipientsRequest} 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(&self, out: *mut *mut EmailMailboxResolveRecipientsRequest) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IEmailMailboxResolveRecipientsRequestEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class EmailMailboxResolveRecipientsRequestEventArgs: IEmailMailboxResolveRecipientsRequestEventArgs} DEFINE_IID!(IID_IEmailMailboxServerSearchReadBatchRequest, 151972831, 23190, 16851, 138, 216, 52, 145, 47, 154, 166, 14); @@ -19337,159 +19337,159 @@ RT_INTERFACE!{interface IEmailMailboxServerSearchReadBatchRequest(IEmailMailboxS fn get_EmailFolderId(&self, out: *mut HSTRING) -> HRESULT, fn get_Options(&self, out: *mut *mut super::EmailQueryOptions) -> HRESULT, fn get_SuggestedBatchSize(&self, out: *mut u32) -> HRESULT, - fn SaveMessageAsync(&self, message: *mut super::EmailMessage, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportCompletedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportFailedAsync(&self, batchStatus: super::EmailBatchStatus, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn SaveMessageAsync(&self, message: *mut super::EmailMessage, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportCompletedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&self, batchStatus: super::EmailBatchStatus, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IEmailMailboxServerSearchReadBatchRequest { - #[inline] pub unsafe fn get_session_id(&self) -> Result { + #[inline] pub fn get_session_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SessionId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_email_mailbox_id(&self) -> Result { + }} + #[inline] pub fn get_email_mailbox_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EmailMailboxId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_email_folder_id(&self) -> Result { + }} + #[inline] pub fn get_email_folder_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EmailFolderId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_options(&self) -> Result> { + }} + #[inline] pub fn get_options(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Options)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_suggested_batch_size(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_suggested_batch_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SuggestedBatchSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn save_message_async(&self, message: &super::EmailMessage) -> Result> { + }} + #[inline] pub fn save_message_async(&self, message: &super::EmailMessage) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveMessageAsync)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[inline] pub fn report_completed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportCompletedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_failed_async(&self, batchStatus: super::EmailBatchStatus) -> Result> { + }} + #[inline] pub fn report_failed_async(&self, batchStatus: super::EmailBatchStatus) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportFailedAsync)(self as *const _ as *mut _, batchStatus, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class EmailMailboxServerSearchReadBatchRequest: IEmailMailboxServerSearchReadBatchRequest} 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(&self, out: *mut *mut EmailMailboxServerSearchReadBatchRequest) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IEmailMailboxServerSearchReadBatchRequestEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class EmailMailboxServerSearchReadBatchRequestEventArgs: IEmailMailboxServerSearchReadBatchRequestEventArgs} 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(&self, out: *mut HSTRING) -> HRESULT, fn get_AutoReplySettings(&self, out: *mut *mut super::EmailMailboxAutoReplySettings) -> HRESULT, - fn ReportCompletedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportFailedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn ReportCompletedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IEmailMailboxSetAutoReplySettingsRequest { - #[inline] pub unsafe fn get_email_mailbox_id(&self) -> Result { + #[inline] pub fn get_email_mailbox_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EmailMailboxId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_auto_reply_settings(&self) -> Result> { + }} + #[inline] pub fn get_auto_reply_settings(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AutoReplySettings)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed_async(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn report_completed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportCompletedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_failed_async(&self) -> Result> { + }} + #[inline] pub fn report_failed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportFailedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class EmailMailboxSetAutoReplySettingsRequest: IEmailMailboxSetAutoReplySettingsRequest} 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(&self, out: *mut *mut EmailMailboxSetAutoReplySettingsRequest) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IEmailMailboxSetAutoReplySettingsRequestEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class EmailMailboxSetAutoReplySettingsRequestEventArgs: IEmailMailboxSetAutoReplySettingsRequestEventArgs} 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(&self, out: *mut HSTRING) -> HRESULT, - fn ReportCompletedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportFailedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn ReportCompletedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IEmailMailboxSyncManagerSyncRequest { - #[inline] pub unsafe fn get_email_mailbox_id(&self) -> Result { + #[inline] pub fn get_email_mailbox_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EmailMailboxId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed_async(&self) -> Result> { + }} + #[inline] pub fn report_completed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportCompletedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_failed_async(&self) -> Result> { + }} + #[inline] pub fn report_failed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportFailedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class EmailMailboxSyncManagerSyncRequest: IEmailMailboxSyncManagerSyncRequest} 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(&self, out: *mut *mut EmailMailboxSyncManagerSyncRequest) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IEmailMailboxSyncManagerSyncRequestEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class EmailMailboxSyncManagerSyncRequestEventArgs: IEmailMailboxSyncManagerSyncRequestEventArgs} DEFINE_IID!(IID_IEmailMailboxUpdateMeetingResponseRequest, 1536797843, 45775, 18568, 186, 79, 48, 107, 107, 102, 223, 48); @@ -19500,117 +19500,117 @@ RT_INTERFACE!{interface IEmailMailboxUpdateMeetingResponseRequest(IEmailMailboxU fn get_Subject(&self, out: *mut HSTRING) -> HRESULT, fn get_Comment(&self, out: *mut HSTRING) -> HRESULT, fn get_SendUpdate(&self, out: *mut bool) -> HRESULT, - fn ReportCompletedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportFailedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn ReportCompletedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IEmailMailboxUpdateMeetingResponseRequest { - #[inline] pub unsafe fn get_email_mailbox_id(&self) -> Result { + #[inline] pub fn get_email_mailbox_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EmailMailboxId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_email_message_id(&self) -> Result { + }} + #[inline] pub fn get_email_message_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EmailMessageId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_response(&self) -> Result { + }} + #[inline] pub fn get_response(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Response)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_subject(&self) -> Result { + }} + #[inline] pub fn get_subject(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Subject)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_comment(&self) -> Result { + }} + #[inline] pub fn get_comment(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Comment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_send_update(&self) -> Result { + }} + #[inline] pub fn get_send_update(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SendUpdate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed_async(&self) -> Result> { + }} + #[inline] pub fn report_completed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportCompletedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_failed_async(&self) -> Result> { + }} + #[inline] pub fn report_failed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportFailedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class EmailMailboxUpdateMeetingResponseRequest: IEmailMailboxUpdateMeetingResponseRequest} 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(&self, out: *mut *mut EmailMailboxUpdateMeetingResponseRequest) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IEmailMailboxUpdateMeetingResponseRequestEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class EmailMailboxUpdateMeetingResponseRequestEventArgs: IEmailMailboxUpdateMeetingResponseRequestEventArgs} 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(&self, out: *mut HSTRING) -> HRESULT, #[cfg(not(feature="windows-security"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-security")] fn get_Certificates(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView<::rt::gen::windows::security::cryptography::certificates::Certificate>) -> HRESULT, - fn ReportCompletedAsync(&self, validationStatuses: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportFailedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + #[cfg(feature="windows-security")] fn get_Certificates(&self, out: *mut *mut foundation::collections::IVectorView<::rt::gen::windows::security::cryptography::certificates::Certificate>) -> HRESULT, + fn ReportCompletedAsync(&self, validationStatuses: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IEmailMailboxValidateCertificatesRequest { - #[inline] pub unsafe fn get_email_mailbox_id(&self) -> Result { + #[inline] pub fn get_email_mailbox_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EmailMailboxId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-security")] #[inline] pub unsafe fn get_certificates(&self) -> Result>> { + }} + #[cfg(feature="windows-security")] #[inline] pub fn get_certificates(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Certificates)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed_async(&self, validationStatuses: &::rt::gen::windows::foundation::collections::IIterable) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn report_completed_async(&self, validationStatuses: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportCompletedAsync)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[inline] pub fn report_failed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportFailedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class EmailMailboxValidateCertificatesRequest: IEmailMailboxValidateCertificatesRequest} 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(&self, out: *mut *mut EmailMailboxValidateCertificatesRequest) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IEmailMailboxValidateCertificatesRequestEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class EmailMailboxValidateCertificatesRequestEventArgs: IEmailMailboxValidateCertificatesRequestEventArgs} } // Windows.ApplicationModel.Email.DataProvider @@ -19628,11 +19628,11 @@ RT_INTERFACE!{interface IExtendedExecutionRevokedEventArgs(IExtendedExecutionRev fn get_Reason(&self, out: *mut ExtendedExecutionRevokedReason) -> HRESULT }} impl IExtendedExecutionRevokedEventArgs { - #[inline] pub unsafe fn get_reason(&self) -> Result { + #[inline] pub fn get_reason(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Reason)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ExtendedExecutionRevokedEventArgs: IExtendedExecutionRevokedEventArgs} RT_ENUM! { enum ExtendedExecutionRevokedReason: i32 { @@ -19646,52 +19646,52 @@ RT_INTERFACE!{interface IExtendedExecutionSession(IExtendedExecutionSessionVtbl) fn put_Description(&self, value: HSTRING) -> HRESULT, fn get_PercentProgress(&self, out: *mut u32) -> HRESULT, fn put_PercentProgress(&self, value: u32) -> HRESULT, - fn add_Revoked(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Revoked(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn RequestExtensionAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn add_Revoked(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Revoked(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn RequestExtensionAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IExtendedExecutionSession { - #[inline] pub unsafe fn get_reason(&self) -> Result { + #[inline] pub fn get_reason(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Reason)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_reason(&self, value: ExtendedExecutionReason) -> Result<()> { + }} + #[inline] pub fn set_reason(&self, value: ExtendedExecutionReason) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Reason)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_description(&self) -> Result { + }} + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_description(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_description(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Description)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_percent_progress(&self) -> Result { + }} + #[inline] pub fn get_percent_progress(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PercentProgress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_percent_progress(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_percent_progress(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PercentProgress)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_revoked(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_revoked(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Revoked)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_revoked(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_revoked(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Revoked)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn request_extension_async(&self) -> Result>> { + }} + #[inline] pub fn request_extension_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestExtensionAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ExtendedExecutionSession: IExtendedExecutionSession} impl RtActivatable for ExtendedExecutionSession {} @@ -19709,11 +19709,11 @@ RT_INTERFACE!{interface IExtendedExecutionForegroundRevokedEventArgs(IExtendedEx fn get_Reason(&self, out: *mut ExtendedExecutionForegroundRevokedReason) -> HRESULT }} impl IExtendedExecutionForegroundRevokedEventArgs { - #[inline] pub unsafe fn get_reason(&self) -> Result { + #[inline] pub fn get_reason(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Reason)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ExtendedExecutionForegroundRevokedEventArgs: IExtendedExecutionForegroundRevokedEventArgs} RT_ENUM! { enum ExtendedExecutionForegroundRevokedReason: i32 { @@ -19723,45 +19723,45 @@ DEFINE_IID!(IID_IExtendedExecutionForegroundSession, 4227088609, 40208, 16897, 1 RT_INTERFACE!{interface IExtendedExecutionForegroundSession(IExtendedExecutionForegroundSessionVtbl): IInspectable(IInspectableVtbl) [IID_IExtendedExecutionForegroundSession] { fn get_Description(&self, out: *mut HSTRING) -> HRESULT, fn put_Description(&self, value: HSTRING) -> HRESULT, - fn add_Revoked(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Revoked(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn RequestExtensionAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn add_Revoked(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Revoked(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn RequestExtensionAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn get_Reason(&self, out: *mut ExtendedExecutionForegroundReason) -> HRESULT, fn put_Reason(&self, value: ExtendedExecutionForegroundReason) -> HRESULT }} impl IExtendedExecutionForegroundSession { - #[inline] pub unsafe fn get_description(&self) -> Result { + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_description(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_description(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Description)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_revoked(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_revoked(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Revoked)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_revoked(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_revoked(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Revoked)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn request_extension_async(&self) -> Result>> { + }} + #[inline] pub fn request_extension_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestExtensionAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_reason(&self) -> Result { + }} + #[inline] pub fn get_reason(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Reason)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_reason(&self, value: ExtendedExecutionForegroundReason) -> Result<()> { + }} + #[inline] pub fn set_reason(&self, value: ExtendedExecutionForegroundReason) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Reason)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ExtendedExecutionForegroundSession: IExtendedExecutionForegroundSession} impl RtActivatable for ExtendedExecutionForegroundSession {} @@ -19776,14 +19776,14 @@ RT_INTERFACE!{interface IUserDataTask(IUserDataTaskVtbl): IInspectable(IInspecta fn get_ListId(&self, out: *mut HSTRING) -> HRESULT, fn get_RemoteId(&self, out: *mut HSTRING) -> HRESULT, fn put_RemoteId(&self, value: HSTRING) -> HRESULT, - fn get_CompletedDate(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_CompletedDate(&self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_CompletedDate(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_CompletedDate(&self, value: *mut foundation::IReference) -> HRESULT, fn get_Details(&self, out: *mut HSTRING) -> HRESULT, fn put_Details(&self, value: HSTRING) -> HRESULT, fn get_DetailsKind(&self, out: *mut UserDataTaskDetailsKind) -> HRESULT, fn put_DetailsKind(&self, value: UserDataTaskDetailsKind) -> HRESULT, - fn get_DueDate(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_DueDate(&self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_DueDate(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_DueDate(&self, value: *mut foundation::IReference) -> HRESULT, fn get_Kind(&self, out: *mut UserDataTaskKind) -> HRESULT, fn get_Priority(&self, out: *mut UserDataTaskPriority) -> HRESULT, fn put_Priority(&self, value: UserDataTaskPriority) -> HRESULT, @@ -19791,153 +19791,153 @@ RT_INTERFACE!{interface IUserDataTask(IUserDataTaskVtbl): IInspectable(IInspecta fn put_RecurrenceProperties(&self, value: *mut UserDataTaskRecurrenceProperties) -> HRESULT, fn get_RegenerationProperties(&self, out: *mut *mut UserDataTaskRegenerationProperties) -> HRESULT, fn put_RegenerationProperties(&self, value: *mut UserDataTaskRegenerationProperties) -> HRESULT, - fn get_Reminder(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_Reminder(&self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_Reminder(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_Reminder(&self, value: *mut foundation::IReference) -> HRESULT, fn get_Sensitivity(&self, out: *mut UserDataTaskSensitivity) -> HRESULT, fn put_Sensitivity(&self, value: UserDataTaskSensitivity) -> HRESULT, fn get_Subject(&self, out: *mut HSTRING) -> HRESULT, fn put_Subject(&self, value: HSTRING) -> HRESULT, - fn get_StartDate(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_StartDate(&self, value: *mut super::super::foundation::IReference) -> HRESULT + fn get_StartDate(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_StartDate(&self, value: *mut foundation::IReference) -> HRESULT }} impl IUserDataTask { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_list_id(&self) -> Result { + }} + #[inline] pub fn get_list_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ListId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_id(&self) -> Result { + }} + #[inline] pub fn get_remote_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_remote_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_remote_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RemoteId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_completed_date(&self) -> Result>> { + }} + #[inline] pub fn get_completed_date(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CompletedDate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_completed_date(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_completed_date(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CompletedDate)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_details(&self) -> Result { + }} + #[inline] pub fn get_details(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Details)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_details(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_details(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Details)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_details_kind(&self) -> Result { + }} + #[inline] pub fn get_details_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DetailsKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_details_kind(&self, value: UserDataTaskDetailsKind) -> Result<()> { + }} + #[inline] pub fn set_details_kind(&self, value: UserDataTaskDetailsKind) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DetailsKind)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_due_date(&self) -> Result>> { + }} + #[inline] pub fn get_due_date(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DueDate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_due_date(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_due_date(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DueDate)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_kind(&self) -> Result { + }} + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_priority(&self) -> Result { + }} + #[inline] pub fn get_priority(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Priority)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_priority(&self, value: UserDataTaskPriority) -> Result<()> { + }} + #[inline] pub fn set_priority(&self, value: UserDataTaskPriority) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Priority)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_recurrence_properties(&self) -> Result> { + }} + #[inline] pub fn get_recurrence_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RecurrenceProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_recurrence_properties(&self, value: &UserDataTaskRecurrenceProperties) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_recurrence_properties(&self, value: &UserDataTaskRecurrenceProperties) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RecurrenceProperties)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_regeneration_properties(&self) -> Result> { + }} + #[inline] pub fn get_regeneration_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RegenerationProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_regeneration_properties(&self, value: &UserDataTaskRegenerationProperties) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_regeneration_properties(&self, value: &UserDataTaskRegenerationProperties) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RegenerationProperties)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_reminder(&self) -> Result>> { + }} + #[inline] pub fn get_reminder(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Reminder)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_reminder(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_reminder(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Reminder)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_sensitivity(&self) -> Result { + }} + #[inline] pub fn get_sensitivity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Sensitivity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_sensitivity(&self, value: UserDataTaskSensitivity) -> Result<()> { + }} + #[inline] pub fn set_sensitivity(&self, value: UserDataTaskSensitivity) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Sensitivity)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_subject(&self) -> Result { + }} + #[inline] pub fn get_subject(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Subject)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_subject(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_subject(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Subject)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_start_date(&self) -> Result>> { + }} + #[inline] pub fn get_start_date(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StartDate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_start_date(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_start_date(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StartDate)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class UserDataTask: IUserDataTask} impl RtActivatable for UserDataTask {} DEFINE_CLSID!(UserDataTask(&[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,84,97,115,107,115,46,85,115,101,114,68,97,116,97,84,97,115,107,0]) [CLSID_UserDataTask]); DEFINE_IID!(IID_IUserDataTaskBatch, 942515710, 8373, 17180, 143, 66, 165, 210, 146, 236, 147, 12); RT_INTERFACE!{interface IUserDataTaskBatch(IUserDataTaskBatchVtbl): IInspectable(IInspectableVtbl) [IID_IUserDataTaskBatch] { - fn get_Tasks(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_Tasks(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IUserDataTaskBatch { - #[inline] pub unsafe fn get_tasks(&self) -> Result>> { + #[inline] pub fn get_tasks(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Tasks)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class UserDataTaskBatch: IUserDataTaskBatch} RT_ENUM! { enum UserDataTaskDaysOfWeek: u32 { @@ -19962,138 +19962,138 @@ RT_INTERFACE!{interface IUserDataTaskList(IUserDataTaskListVtbl): IInspectable(I fn put_OtherAppWriteAccess(&self, value: UserDataTaskListOtherAppWriteAccess) -> HRESULT, fn get_LimitedWriteOperations(&self, out: *mut *mut UserDataTaskListLimitedWriteOperations) -> HRESULT, fn get_SyncManager(&self, out: *mut *mut UserDataTaskListSyncManager) -> HRESULT, - fn RegisterSyncManagerAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn RegisterSyncManagerAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn GetTaskReader(&self, out: *mut *mut UserDataTaskReader) -> HRESULT, fn GetTaskReaderWithOptions(&self, options: *mut UserDataTaskQueryOptions, out: *mut *mut UserDataTaskReader) -> HRESULT, - fn GetTaskAsync(&self, userDataTask: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn SaveTaskAsync(&self, userDataTask: *mut UserDataTask, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn DeleteTaskAsync(&self, userDataTaskId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn DeleteAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn SaveAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn GetTaskAsync(&self, userDataTask: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn SaveTaskAsync(&self, userDataTask: *mut UserDataTask, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn DeleteTaskAsync(&self, userDataTaskId: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn DeleteAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn SaveAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IUserDataTaskList { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_user_data_account_id(&self) -> Result { + }} + #[inline] pub fn get_user_data_account_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UserDataAccountId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_display_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_source_display_name(&self) -> Result { + }} + #[inline] pub fn get_source_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SourceDisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_other_app_read_access(&self) -> Result { + }} + #[inline] pub fn get_other_app_read_access(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OtherAppReadAccess)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_other_app_read_access(&self, value: UserDataTaskListOtherAppReadAccess) -> Result<()> { + }} + #[inline] pub fn set_other_app_read_access(&self, value: UserDataTaskListOtherAppReadAccess) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OtherAppReadAccess)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_other_app_write_access(&self) -> Result { + }} + #[inline] pub fn get_other_app_write_access(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OtherAppWriteAccess)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_other_app_write_access(&self, value: UserDataTaskListOtherAppWriteAccess) -> Result<()> { + }} + #[inline] pub fn set_other_app_write_access(&self, value: UserDataTaskListOtherAppWriteAccess) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OtherAppWriteAccess)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_limited_write_operations(&self) -> Result> { + }} + #[inline] pub fn get_limited_write_operations(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LimitedWriteOperations)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sync_manager(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_sync_manager(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SyncManager)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn register_sync_manager_async(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn register_sync_manager_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RegisterSyncManagerAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_task_reader(&self) -> Result> { + }} + #[inline] pub fn get_task_reader(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetTaskReader)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_task_reader_with_options(&self, options: &UserDataTaskQueryOptions) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_task_reader_with_options(&self, options: &UserDataTaskQueryOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetTaskReaderWithOptions)(self 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 get_task_async(&self, userDataTask: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_task_async(&self, userDataTask: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetTaskAsync)(self as *const _ as *mut _, userDataTask.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn save_task_async(&self, userDataTask: &UserDataTask) -> Result> { + }} + #[inline] pub fn save_task_async(&self, userDataTask: &UserDataTask) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveTaskAsync)(self as *const _ as *mut _, userDataTask as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete_task_async(&self, userDataTaskId: &HStringArg) -> Result> { + }} + #[inline] pub fn delete_task_async(&self, userDataTaskId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteTaskAsync)(self as *const _ as *mut _, userDataTaskId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete_async(&self) -> Result> { + }} + #[inline] pub fn delete_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn save_async(&self) -> Result> { + }} + #[inline] pub fn save_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class UserDataTaskList: IUserDataTaskList} DEFINE_IID!(IID_IUserDataTaskListLimitedWriteOperations, 2057463794, 24696, 16771, 145, 158, 79, 41, 241, 156, 250, 233); RT_INTERFACE!{interface IUserDataTaskListLimitedWriteOperations(IUserDataTaskListLimitedWriteOperationsVtbl): IInspectable(IInspectableVtbl) [IID_IUserDataTaskListLimitedWriteOperations] { - fn TryCompleteTaskAsync(&self, userDataTaskId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryCreateOrUpdateTaskAsync(&self, userDataTask: *mut UserDataTask, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryDeleteTaskAsync(&self, userDataTaskId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TrySkipOccurrenceAsync(&self, userDataTaskId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn TryCompleteTaskAsync(&self, userDataTaskId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryCreateOrUpdateTaskAsync(&self, userDataTask: *mut UserDataTask, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryDeleteTaskAsync(&self, userDataTaskId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TrySkipOccurrenceAsync(&self, userDataTaskId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IUserDataTaskListLimitedWriteOperations { - #[inline] pub unsafe fn try_complete_task_async(&self, userDataTaskId: &HStringArg) -> Result>> { + #[inline] pub fn try_complete_task_async(&self, userDataTaskId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryCompleteTaskAsync)(self as *const _ as *mut _, userDataTaskId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_create_or_update_task_async(&self, userDataTask: &UserDataTask) -> Result>> { + }} + #[inline] pub fn try_create_or_update_task_async(&self, userDataTask: &UserDataTask) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryCreateOrUpdateTaskAsync)(self as *const _ as *mut _, userDataTask as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_delete_task_async(&self, userDataTaskId: &HStringArg) -> Result>> { + }} + #[inline] pub fn try_delete_task_async(&self, userDataTaskId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryDeleteTaskAsync)(self as *const _ as *mut _, userDataTaskId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_skip_occurrence_async(&self, userDataTaskId: &HStringArg) -> Result>> { + }} + #[inline] pub fn try_skip_occurrence_async(&self, userDataTaskId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TrySkipOccurrenceAsync)(self as *const _ as *mut _, userDataTaskId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class UserDataTaskListLimitedWriteOperations: IUserDataTaskListLimitedWriteOperations} RT_ENUM! { enum UserDataTaskListOtherAppReadAccess: i32 { @@ -20104,58 +20104,58 @@ RT_ENUM! { enum UserDataTaskListOtherAppWriteAccess: i32 { }} DEFINE_IID!(IID_IUserDataTaskListSyncManager, 2388204181, 7631, 18079, 147, 236, 186, 72, 187, 85, 60, 107); RT_INTERFACE!{interface IUserDataTaskListSyncManager(IUserDataTaskListSyncManagerVtbl): IInspectable(IInspectableVtbl) [IID_IUserDataTaskListSyncManager] { - fn get_LastAttemptedSyncTime(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn put_LastAttemptedSyncTime(&self, value: super::super::foundation::DateTime) -> HRESULT, - fn get_LastSuccessfulSyncTime(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn put_LastSuccessfulSyncTime(&self, value: super::super::foundation::DateTime) -> HRESULT, + fn get_LastAttemptedSyncTime(&self, out: *mut foundation::DateTime) -> HRESULT, + fn put_LastAttemptedSyncTime(&self, value: foundation::DateTime) -> HRESULT, + fn get_LastSuccessfulSyncTime(&self, out: *mut foundation::DateTime) -> HRESULT, + fn put_LastSuccessfulSyncTime(&self, value: foundation::DateTime) -> HRESULT, fn get_Status(&self, out: *mut UserDataTaskListSyncStatus) -> HRESULT, fn put_Status(&self, value: UserDataTaskListSyncStatus) -> HRESULT, - fn SyncAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_SyncStatusChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SyncStatusChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn SyncAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_SyncStatusChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SyncStatusChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IUserDataTaskListSyncManager { - #[inline] pub unsafe fn get_last_attempted_sync_time(&self) -> Result { + #[inline] pub fn get_last_attempted_sync_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LastAttemptedSyncTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_last_attempted_sync_time(&self, value: super::super::foundation::DateTime) -> Result<()> { + }} + #[inline] pub fn set_last_attempted_sync_time(&self, value: foundation::DateTime) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LastAttemptedSyncTime)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_last_successful_sync_time(&self) -> Result { + }} + #[inline] pub fn get_last_successful_sync_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LastSuccessfulSyncTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_last_successful_sync_time(&self, value: super::super::foundation::DateTime) -> Result<()> { + }} + #[inline] pub fn set_last_successful_sync_time(&self, value: foundation::DateTime) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LastSuccessfulSyncTime)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_status(&self, value: UserDataTaskListSyncStatus) -> Result<()> { + }} + #[inline] pub fn set_status(&self, value: UserDataTaskListSyncStatus) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Status)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn sync_async(&self) -> Result>> { + }} + #[inline] pub fn sync_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SyncAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_sync_status_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_sync_status_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SyncStatusChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_sync_status_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_sync_status_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SyncStatusChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class UserDataTaskListSyncManager: IUserDataTaskListSyncManager} RT_ENUM! { enum UserDataTaskListSyncStatus: i32 { @@ -20163,30 +20163,30 @@ RT_ENUM! { enum UserDataTaskListSyncStatus: i32 { }} DEFINE_IID!(IID_IUserDataTaskManager, 2219952404, 58891, 18601, 146, 17, 127, 184, 165, 108, 184, 76); RT_INTERFACE!{interface IUserDataTaskManager(IUserDataTaskManagerVtbl): IInspectable(IInspectableVtbl) [IID_IUserDataTaskManager] { - fn RequestStoreAsync(&self, accessType: UserDataTaskStoreAccessType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestStoreAsync(&self, accessType: UserDataTaskStoreAccessType, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(feature="windows-system")] fn get_User(&self, out: *mut *mut super::super::system::User) -> HRESULT }} impl IUserDataTaskManager { - #[inline] pub unsafe fn request_store_async(&self, accessType: UserDataTaskStoreAccessType) -> Result>> { + #[inline] pub fn request_store_async(&self, accessType: UserDataTaskStoreAccessType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestStoreAsync)(self as *const _ as *mut _, accessType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_user(&self) -> Result> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_User)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class UserDataTaskManager: IUserDataTaskManager} impl RtActivatable for UserDataTaskManager {} impl UserDataTaskManager { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} - #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::super::system::User) -> Result> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::super::system::User) -> Result>> { >::get_activation_factory().get_for_user(user) - }} + } } DEFINE_CLSID!(UserDataTaskManager(&[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,84,97,115,107,115,46,85,115,101,114,68,97,116,97,84,97,115,107,77,97,110,97,103,101,114,0]) [CLSID_UserDataTaskManager]); DEFINE_IID!(IID_IUserDataTaskManagerStatics, 3008707064, 50434, 18428, 168, 30, 16, 8, 131, 113, 157, 85); @@ -20195,16 +20195,16 @@ RT_INTERFACE!{static interface IUserDataTaskManagerStatics(IUserDataTaskManagerS #[cfg(feature="windows-system")] fn GetForUser(&self, user: *mut super::super::system::User, out: *mut *mut UserDataTaskManager) -> HRESULT }} impl IUserDataTaskManagerStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self 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 get_for_user(&self, user: &super::super::system::User) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(&self, user: &super::super::system::User) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForUser)(self as *const _ as *mut _, user as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum UserDataTaskPriority: i32 { Normal (UserDataTaskPriority_Normal) = 0, Low (UserDataTaskPriority_Low) = -1, High (UserDataTaskPriority_High) = 1, @@ -20220,24 +20220,24 @@ RT_INTERFACE!{interface IUserDataTaskQueryOptions(IUserDataTaskQueryOptionsVtbl) fn put_Kind(&self, value: UserDataTaskQueryKind) -> HRESULT }} impl IUserDataTaskQueryOptions { - #[inline] pub unsafe fn get_sort_property(&self) -> Result { + #[inline] pub fn get_sort_property(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SortProperty)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_sort_property(&self, value: UserDataTaskQuerySortProperty) -> Result<()> { + }} + #[inline] pub fn set_sort_property(&self, value: UserDataTaskQuerySortProperty) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SortProperty)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_kind(&self) -> Result { + }} + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_kind(&self, value: UserDataTaskQueryKind) -> Result<()> { + }} + #[inline] pub fn set_kind(&self, value: UserDataTaskQueryKind) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Kind)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class UserDataTaskQueryOptions: IUserDataTaskQueryOptions} impl RtActivatable for UserDataTaskQueryOptions {} @@ -20247,108 +20247,108 @@ RT_ENUM! { enum UserDataTaskQuerySortProperty: i32 { }} DEFINE_IID!(IID_IUserDataTaskReader, 65439921, 19663, 17664, 136, 59, 231, 98, 144, 207, 237, 99); RT_INTERFACE!{interface IUserDataTaskReader(IUserDataTaskReaderVtbl): IInspectable(IInspectableVtbl) [IID_IUserDataTaskReader] { - fn ReadBatchAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn ReadBatchAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IUserDataTaskReader { - #[inline] pub unsafe fn read_batch_async(&self) -> Result>> { + #[inline] pub fn read_batch_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadBatchAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class UserDataTaskReader: IUserDataTaskReader} DEFINE_IID!(IID_IUserDataTaskRecurrenceProperties, 1944027312, 10182, 16590, 177, 73, 156, 212, 20, 133, 166, 158); RT_INTERFACE!{interface IUserDataTaskRecurrenceProperties(IUserDataTaskRecurrencePropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IUserDataTaskRecurrenceProperties] { fn get_Unit(&self, out: *mut UserDataTaskRecurrenceUnit) -> HRESULT, fn put_Unit(&self, value: UserDataTaskRecurrenceUnit) -> HRESULT, - fn get_Occurrences(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_Occurrences(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_Until(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_Until(&self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_Occurrences(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_Occurrences(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_Until(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_Until(&self, value: *mut foundation::IReference) -> HRESULT, fn get_Interval(&self, out: *mut i32) -> HRESULT, fn put_Interval(&self, value: i32) -> HRESULT, - fn get_DaysOfWeek(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_DaysOfWeek(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_WeekOfMonth(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_WeekOfMonth(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_Month(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_Month(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_Day(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_Day(&self, value: *mut super::super::foundation::IReference) -> HRESULT + fn get_DaysOfWeek(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_DaysOfWeek(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_WeekOfMonth(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_WeekOfMonth(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_Month(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_Month(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_Day(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_Day(&self, value: *mut foundation::IReference) -> HRESULT }} impl IUserDataTaskRecurrenceProperties { - #[inline] pub unsafe fn get_unit(&self) -> Result { + #[inline] pub fn get_unit(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Unit)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_unit(&self, value: UserDataTaskRecurrenceUnit) -> Result<()> { + }} + #[inline] pub fn set_unit(&self, value: UserDataTaskRecurrenceUnit) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Unit)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_occurrences(&self) -> Result>> { + }} + #[inline] pub fn get_occurrences(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Occurrences)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_occurrences(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_occurrences(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Occurrences)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_until(&self) -> Result>> { + }} + #[inline] pub fn get_until(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Until)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_until(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_until(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Until)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_interval(&self) -> Result { + }} + #[inline] pub fn get_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Interval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_interval(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_interval(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Interval)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_days_of_week(&self) -> Result>> { + }} + #[inline] pub fn get_days_of_week(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DaysOfWeek)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_days_of_week(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_days_of_week(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DaysOfWeek)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_week_of_month(&self) -> Result>> { + }} + #[inline] pub fn get_week_of_month(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WeekOfMonth)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_week_of_month(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_week_of_month(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_WeekOfMonth)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_month(&self) -> Result>> { + }} + #[inline] pub fn get_month(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Month)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_month(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_month(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Month)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_day(&self) -> Result>> { + }} + #[inline] pub fn get_day(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Day)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_day(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_day(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Day)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class UserDataTaskRecurrenceProperties: IUserDataTaskRecurrenceProperties} impl RtActivatable for UserDataTaskRecurrenceProperties {} @@ -20360,50 +20360,50 @@ DEFINE_IID!(IID_IUserDataTaskRegenerationProperties, 2460680199, 2318, 18180, 18 RT_INTERFACE!{interface IUserDataTaskRegenerationProperties(IUserDataTaskRegenerationPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IUserDataTaskRegenerationProperties] { fn get_Unit(&self, out: *mut UserDataTaskRegenerationUnit) -> HRESULT, fn put_Unit(&self, value: UserDataTaskRegenerationUnit) -> HRESULT, - fn get_Occurrences(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_Occurrences(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_Until(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_Until(&self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_Occurrences(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_Occurrences(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_Until(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_Until(&self, value: *mut foundation::IReference) -> HRESULT, fn get_Interval(&self, out: *mut i32) -> HRESULT, fn put_Interval(&self, value: i32) -> HRESULT }} impl IUserDataTaskRegenerationProperties { - #[inline] pub unsafe fn get_unit(&self) -> Result { + #[inline] pub fn get_unit(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Unit)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_unit(&self, value: UserDataTaskRegenerationUnit) -> Result<()> { + }} + #[inline] pub fn set_unit(&self, value: UserDataTaskRegenerationUnit) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Unit)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_occurrences(&self) -> Result>> { + }} + #[inline] pub fn get_occurrences(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Occurrences)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_occurrences(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_occurrences(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Occurrences)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_until(&self) -> Result>> { + }} + #[inline] pub fn get_until(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Until)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_until(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_until(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Until)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_interval(&self) -> Result { + }} + #[inline] pub fn get_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Interval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_interval(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_interval(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Interval)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class UserDataTaskRegenerationProperties: IUserDataTaskRegenerationProperties} impl RtActivatable for UserDataTaskRegenerationProperties {} @@ -20416,32 +20416,32 @@ RT_ENUM! { enum UserDataTaskSensitivity: i32 { }} DEFINE_IID!(IID_IUserDataTaskStore, 4033518768, 61915, 17850, 138, 98, 8, 96, 4, 192, 33, 61); RT_INTERFACE!{interface IUserDataTaskStore(IUserDataTaskStoreVtbl): IInspectable(IInspectableVtbl) [IID_IUserDataTaskStore] { - fn CreateListAsync(&self, name: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CreateListInAccountAsync(&self, name: HSTRING, userDataAccountId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FindListsAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetListAsync(&self, taskListId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn CreateListAsync(&self, name: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreateListInAccountAsync(&self, name: HSTRING, userDataAccountId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn FindListsAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetListAsync(&self, taskListId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IUserDataTaskStore { - #[inline] pub unsafe fn create_list_async(&self, name: &HStringArg) -> Result>> { + #[inline] pub fn create_list_async(&self, name: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateListAsync)(self as *const _ as *mut _, name.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_list_in_account_async(&self, name: &HStringArg, userDataAccountId: &HStringArg) -> Result>> { + }} + #[inline] pub fn create_list_in_account_async(&self, name: &HStringArg, userDataAccountId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateListInAccountAsync)(self as *const _ as *mut _, name.get(), userDataAccountId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_lists_async(&self) -> Result>>> { + }} + #[inline] pub fn find_lists_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindListsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_list_async(&self, taskListId: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_list_async(&self, taskListId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetListAsync)(self as *const _ as *mut _, taskListId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class UserDataTaskStore: IUserDataTaskStore} RT_ENUM! { enum UserDataTaskStoreAccessType: i32 { @@ -20454,68 +20454,68 @@ pub mod dataprovider { // Windows.ApplicationModel.UserDataTasks.DataProvider use ::prelude::*; DEFINE_IID!(IID_IUserDataTaskDataProviderConnection, 2683542813, 42055, 17035, 175, 233, 229, 64, 43, 222, 176, 65); RT_INTERFACE!{interface IUserDataTaskDataProviderConnection(IUserDataTaskDataProviderConnectionVtbl): IInspectable(IInspectableVtbl) [IID_IUserDataTaskDataProviderConnection] { - fn add_CreateOrUpdateTaskRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CreateOrUpdateTaskRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_SyncRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SyncRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_SkipOccurrenceRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SkipOccurrenceRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_CompleteTaskRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CompleteTaskRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_DeleteTaskRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DeleteTaskRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_CreateOrUpdateTaskRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CreateOrUpdateTaskRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_SyncRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SyncRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_SkipOccurrenceRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SkipOccurrenceRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_CompleteTaskRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CompleteTaskRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_DeleteTaskRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DeleteTaskRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn Start(&self) -> HRESULT }} impl IUserDataTaskDataProviderConnection { - #[inline] pub unsafe fn add_create_or_update_task_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub fn add_create_or_update_task_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CreateOrUpdateTaskRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_create_or_update_task_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_create_or_update_task_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CreateOrUpdateTaskRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_sync_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_sync_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SyncRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_sync_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_sync_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SyncRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_skip_occurrence_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_skip_occurrence_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SkipOccurrenceRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_skip_occurrence_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_skip_occurrence_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SkipOccurrenceRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_complete_task_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_complete_task_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CompleteTaskRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_complete_task_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_complete_task_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CompleteTaskRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_delete_task_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_delete_task_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DeleteTaskRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_delete_task_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_delete_task_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DeleteTaskRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class UserDataTaskDataProviderConnection: IUserDataTaskDataProviderConnection} DEFINE_IID!(IID_IUserDataTaskDataProviderTriggerDetails, 2921804290, 45513, 17726, 175, 197, 179, 10, 243, 189, 33, 125); @@ -20523,245 +20523,245 @@ RT_INTERFACE!{interface IUserDataTaskDataProviderTriggerDetails(IUserDataTaskDat fn get_Connection(&self, out: *mut *mut UserDataTaskDataProviderConnection) -> HRESULT }} impl IUserDataTaskDataProviderTriggerDetails { - #[inline] pub unsafe fn get_connection(&self) -> Result> { + #[inline] pub fn get_connection(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Connection)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class UserDataTaskDataProviderTriggerDetails: IUserDataTaskDataProviderTriggerDetails} DEFINE_IID!(IID_IUserDataTaskListCompleteTaskRequest, 4133360803, 6722, 18906, 133, 82, 40, 115, 229, 44, 85, 235); RT_INTERFACE!{interface IUserDataTaskListCompleteTaskRequest(IUserDataTaskListCompleteTaskRequestVtbl): IInspectable(IInspectableVtbl) [IID_IUserDataTaskListCompleteTaskRequest] { fn get_TaskListId(&self, out: *mut HSTRING) -> HRESULT, fn get_TaskId(&self, out: *mut HSTRING) -> HRESULT, - fn ReportCompletedAsync(&self, completedTaskId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportFailedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn ReportCompletedAsync(&self, completedTaskId: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IUserDataTaskListCompleteTaskRequest { - #[inline] pub unsafe fn get_task_list_id(&self) -> Result { + #[inline] pub fn get_task_list_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TaskListId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_task_id(&self) -> Result { + }} + #[inline] pub fn get_task_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TaskId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed_async(&self, completedTaskId: &HStringArg) -> Result> { + }} + #[inline] pub fn report_completed_async(&self, completedTaskId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportCompletedAsync)(self as *const _ as *mut _, completedTaskId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_failed_async(&self) -> Result> { + }} + #[inline] pub fn report_failed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportFailedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class UserDataTaskListCompleteTaskRequest: IUserDataTaskListCompleteTaskRequest} DEFINE_IID!(IID_IUserDataTaskListCompleteTaskRequestEventArgs, 3615242557, 19698, 18605, 135, 253, 150, 63, 14, 170, 122, 149); RT_INTERFACE!{interface IUserDataTaskListCompleteTaskRequestEventArgs(IUserDataTaskListCompleteTaskRequestEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IUserDataTaskListCompleteTaskRequestEventArgs] { fn get_Request(&self, out: *mut *mut UserDataTaskListCompleteTaskRequest) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IUserDataTaskListCompleteTaskRequestEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class UserDataTaskListCompleteTaskRequestEventArgs: IUserDataTaskListCompleteTaskRequestEventArgs} DEFINE_IID!(IID_IUserDataTaskListCreateOrUpdateTaskRequest, 557020972, 21954, 17152, 130, 121, 4, 50, 110, 7, 204, 228); RT_INTERFACE!{interface IUserDataTaskListCreateOrUpdateTaskRequest(IUserDataTaskListCreateOrUpdateTaskRequestVtbl): IInspectable(IInspectableVtbl) [IID_IUserDataTaskListCreateOrUpdateTaskRequest] { fn get_TaskListId(&self, out: *mut HSTRING) -> HRESULT, fn get_Task(&self, out: *mut *mut super::UserDataTask) -> HRESULT, - fn ReportCompletedAsync(&self, createdOrUpdatedUserDataTask: *mut super::UserDataTask, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportFailedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn ReportCompletedAsync(&self, createdOrUpdatedUserDataTask: *mut super::UserDataTask, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IUserDataTaskListCreateOrUpdateTaskRequest { - #[inline] pub unsafe fn get_task_list_id(&self) -> Result { + #[inline] pub fn get_task_list_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TaskListId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_task(&self) -> Result> { + }} + #[inline] pub fn get_task(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Task)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed_async(&self, createdOrUpdatedUserDataTask: &super::UserDataTask) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn report_completed_async(&self, createdOrUpdatedUserDataTask: &super::UserDataTask) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportCompletedAsync)(self as *const _ as *mut _, createdOrUpdatedUserDataTask as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_failed_async(&self) -> Result> { + }} + #[inline] pub fn report_failed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportFailedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class UserDataTaskListCreateOrUpdateTaskRequest: IUserDataTaskListCreateOrUpdateTaskRequest} DEFINE_IID!(IID_IUserDataTaskListCreateOrUpdateTaskRequestEventArgs, 314923602, 58232, 16795, 174, 56, 165, 233, 230, 4, 71, 110); RT_INTERFACE!{interface IUserDataTaskListCreateOrUpdateTaskRequestEventArgs(IUserDataTaskListCreateOrUpdateTaskRequestEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IUserDataTaskListCreateOrUpdateTaskRequestEventArgs] { fn get_Request(&self, out: *mut *mut UserDataTaskListCreateOrUpdateTaskRequest) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IUserDataTaskListCreateOrUpdateTaskRequestEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class UserDataTaskListCreateOrUpdateTaskRequestEventArgs: IUserDataTaskListCreateOrUpdateTaskRequestEventArgs} DEFINE_IID!(IID_IUserDataTaskListDeleteTaskRequest, 1267088488, 30295, 20285, 176, 116, 212, 126, 200, 223, 7, 231); RT_INTERFACE!{interface IUserDataTaskListDeleteTaskRequest(IUserDataTaskListDeleteTaskRequestVtbl): IInspectable(IInspectableVtbl) [IID_IUserDataTaskListDeleteTaskRequest] { fn get_TaskListId(&self, out: *mut HSTRING) -> HRESULT, fn get_TaskId(&self, out: *mut HSTRING) -> HRESULT, - fn ReportCompletedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportFailedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn ReportCompletedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IUserDataTaskListDeleteTaskRequest { - #[inline] pub unsafe fn get_task_list_id(&self) -> Result { + #[inline] pub fn get_task_list_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TaskListId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_task_id(&self) -> Result { + }} + #[inline] pub fn get_task_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TaskId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed_async(&self) -> Result> { + }} + #[inline] pub fn report_completed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportCompletedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_failed_async(&self) -> Result> { + }} + #[inline] pub fn report_failed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportFailedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class UserDataTaskListDeleteTaskRequest: IUserDataTaskListDeleteTaskRequest} DEFINE_IID!(IID_IUserDataTaskListDeleteTaskRequestEventArgs, 1617156825, 62818, 16709, 142, 254, 213, 0, 120, 201, 43, 127); RT_INTERFACE!{interface IUserDataTaskListDeleteTaskRequestEventArgs(IUserDataTaskListDeleteTaskRequestEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IUserDataTaskListDeleteTaskRequestEventArgs] { fn get_Request(&self, out: *mut *mut UserDataTaskListDeleteTaskRequest) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IUserDataTaskListDeleteTaskRequestEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class UserDataTaskListDeleteTaskRequestEventArgs: IUserDataTaskListDeleteTaskRequestEventArgs} DEFINE_IID!(IID_IUserDataTaskListSkipOccurrenceRequest, 2877809485, 7379, 17180, 159, 88, 8, 154, 164, 51, 141, 133); RT_INTERFACE!{interface IUserDataTaskListSkipOccurrenceRequest(IUserDataTaskListSkipOccurrenceRequestVtbl): IInspectable(IInspectableVtbl) [IID_IUserDataTaskListSkipOccurrenceRequest] { fn get_TaskListId(&self, out: *mut HSTRING) -> HRESULT, fn get_TaskId(&self, out: *mut HSTRING) -> HRESULT, - fn ReportCompletedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportFailedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn ReportCompletedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IUserDataTaskListSkipOccurrenceRequest { - #[inline] pub unsafe fn get_task_list_id(&self) -> Result { + #[inline] pub fn get_task_list_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TaskListId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_task_id(&self) -> Result { + }} + #[inline] pub fn get_task_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TaskId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed_async(&self) -> Result> { + }} + #[inline] pub fn report_completed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportCompletedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_failed_async(&self) -> Result> { + }} + #[inline] pub fn report_failed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportFailedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class UserDataTaskListSkipOccurrenceRequest: IUserDataTaskListSkipOccurrenceRequest} DEFINE_IID!(IID_IUserDataTaskListSkipOccurrenceRequestEventArgs, 2050724426, 52271, 20091, 170, 205, 165, 185, 210, 156, 250, 78); RT_INTERFACE!{interface IUserDataTaskListSkipOccurrenceRequestEventArgs(IUserDataTaskListSkipOccurrenceRequestEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IUserDataTaskListSkipOccurrenceRequestEventArgs] { fn get_Request(&self, out: *mut *mut UserDataTaskListSkipOccurrenceRequest) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IUserDataTaskListSkipOccurrenceRequestEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class UserDataTaskListSkipOccurrenceRequestEventArgs: IUserDataTaskListSkipOccurrenceRequestEventArgs} DEFINE_IID!(IID_IUserDataTaskListSyncManagerSyncRequest, 1084700679, 30096, 16713, 174, 25, 178, 17, 67, 26, 159, 72); RT_INTERFACE!{interface IUserDataTaskListSyncManagerSyncRequest(IUserDataTaskListSyncManagerSyncRequestVtbl): IInspectable(IInspectableVtbl) [IID_IUserDataTaskListSyncManagerSyncRequest] { fn get_TaskListId(&self, out: *mut HSTRING) -> HRESULT, - fn ReportCompletedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ReportFailedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn ReportCompletedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportFailedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IUserDataTaskListSyncManagerSyncRequest { - #[inline] pub unsafe fn get_task_list_id(&self) -> Result { + #[inline] pub fn get_task_list_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TaskListId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed_async(&self) -> Result> { + }} + #[inline] pub fn report_completed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportCompletedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_failed_async(&self) -> Result> { + }} + #[inline] pub fn report_failed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportFailedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class UserDataTaskListSyncManagerSyncRequest: IUserDataTaskListSyncManagerSyncRequest} DEFINE_IID!(IID_IUserDataTaskListSyncManagerSyncRequestEventArgs, 2393709586, 30350, 17341, 131, 133, 92, 220, 53, 31, 253, 234); RT_INTERFACE!{interface IUserDataTaskListSyncManagerSyncRequestEventArgs(IUserDataTaskListSyncManagerSyncRequestEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IUserDataTaskListSyncManagerSyncRequestEventArgs] { fn get_Request(&self, out: *mut *mut UserDataTaskListSyncManagerSyncRequest) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IUserDataTaskListSyncManagerSyncRequestEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class UserDataTaskListSyncManagerSyncRequestEventArgs: IUserDataTaskListSyncManagerSyncRequestEventArgs} } // Windows.ApplicationModel.UserDataTasks.DataProvider @@ -20773,179 +20773,179 @@ RT_INTERFACE!{interface IUserActivity(IUserActivityVtbl): IInspectable(IInspecta fn get_State(&self, out: *mut UserActivityState) -> HRESULT, fn get_ActivityId(&self, out: *mut HSTRING) -> HRESULT, fn get_VisualElements(&self, out: *mut *mut UserActivityVisualElements) -> HRESULT, - fn get_ContentUri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_ContentUri(&self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_ContentUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_ContentUri(&self, value: *mut foundation::Uri) -> HRESULT, fn get_ContentType(&self, out: *mut HSTRING) -> HRESULT, fn put_ContentType(&self, value: HSTRING) -> HRESULT, - fn get_FallbackUri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_FallbackUri(&self, value: *mut super::super::foundation::Uri) -> HRESULT, - fn get_ActivationUri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_ActivationUri(&self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_FallbackUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_FallbackUri(&self, value: *mut foundation::Uri) -> HRESULT, + fn get_ActivationUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_ActivationUri(&self, value: *mut foundation::Uri) -> HRESULT, fn get_ContentInfo(&self, out: *mut *mut IUserActivityContentInfo) -> HRESULT, fn put_ContentInfo(&self, value: *mut IUserActivityContentInfo) -> HRESULT, - fn SaveAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn SaveAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn CreateSession(&self, out: *mut *mut UserActivitySession) -> HRESULT }} impl IUserActivity { - #[inline] pub unsafe fn get_state(&self) -> Result { + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_activity_id(&self) -> Result { + }} + #[inline] pub fn get_activity_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ActivityId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_visual_elements(&self) -> Result> { + }} + #[inline] pub fn get_visual_elements(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VisualElements)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_content_uri(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_content_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContentUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_content_uri(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_content_uri(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ContentUri)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_content_type(&self) -> Result { + }} + #[inline] pub fn get_content_type(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContentType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_content_type(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_content_type(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ContentType)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_fallback_uri(&self) -> Result> { + }} + #[inline] pub fn get_fallback_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FallbackUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_fallback_uri(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_fallback_uri(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FallbackUri)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_activation_uri(&self) -> Result> { + }} + #[inline] pub fn get_activation_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ActivationUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_activation_uri(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_activation_uri(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ActivationUri)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_content_info(&self) -> Result> { + }} + #[inline] pub fn get_content_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContentInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_content_info(&self, value: &IUserActivityContentInfo) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_content_info(&self, value: &IUserActivityContentInfo) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ContentInfo)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn save_async(&self) -> Result> { + }} + #[inline] pub fn save_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_session(&self) -> Result> { + }} + #[inline] pub fn create_session(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateSession)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class UserActivity: IUserActivity} DEFINE_IID!(IID_IUserActivityAttribution, 883280053, 34525, 19180, 164, 145, 106, 79, 174, 165, 210, 46); RT_INTERFACE!{interface IUserActivityAttribution(IUserActivityAttributionVtbl): IInspectable(IInspectableVtbl) [IID_IUserActivityAttribution] { - fn get_IconUri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_IconUri(&self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_IconUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_IconUri(&self, value: *mut foundation::Uri) -> HRESULT, fn get_AlternateText(&self, out: *mut HSTRING) -> HRESULT, fn put_AlternateText(&self, value: HSTRING) -> HRESULT, fn get_AddImageQuery(&self, out: *mut bool) -> HRESULT, fn put_AddImageQuery(&self, value: bool) -> HRESULT }} impl IUserActivityAttribution { - #[inline] pub unsafe fn get_icon_uri(&self) -> Result> { + #[inline] pub fn get_icon_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IconUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_icon_uri(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_icon_uri(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IconUri)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_alternate_text(&self) -> Result { + }} + #[inline] pub fn get_alternate_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AlternateText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_alternate_text(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_alternate_text(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AlternateText)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_add_image_query(&self) -> Result { + }} + #[inline] pub fn get_add_image_query(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AddImageQuery)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_add_image_query(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_add_image_query(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AddImageQuery)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class UserActivityAttribution: IUserActivityAttribution} impl RtActivatable for UserActivityAttribution {} impl RtActivatable for UserActivityAttribution {} impl UserActivityAttribution { - #[inline] pub fn create_with_uri(iconUri: &super::super::foundation::Uri) -> Result> { unsafe { + #[inline] pub fn create_with_uri(iconUri: &foundation::Uri) -> Result> { >::get_activation_factory().create_with_uri(iconUri) - }} + } } DEFINE_CLSID!(UserActivityAttribution(&[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,65,99,116,105,118,105,116,105,101,115,46,85,115,101,114,65,99,116,105,118,105,116,121,65,116,116,114,105,98,117,116,105,111,110,0]) [CLSID_UserActivityAttribution]); DEFINE_IID!(IID_IUserActivityAttributionFactory, 3861631570, 50534, 20290, 153, 116, 145, 108, 77, 118, 55, 126); RT_INTERFACE!{static interface IUserActivityAttributionFactory(IUserActivityAttributionFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IUserActivityAttributionFactory] { - fn CreateWithUri(&self, iconUri: *mut super::super::foundation::Uri, out: *mut *mut UserActivityAttribution) -> HRESULT + fn CreateWithUri(&self, iconUri: *mut foundation::Uri, out: *mut *mut UserActivityAttribution) -> HRESULT }} impl IUserActivityAttributionFactory { - #[inline] pub unsafe fn create_with_uri(&self, iconUri: &super::super::foundation::Uri) -> Result> { + #[inline] pub fn create_with_uri(&self, iconUri: &foundation::Uri) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithUri)(self as *const _ as *mut _, iconUri as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IUserActivityChannel, 3133208760, 41188, 18491, 185, 72, 156, 186, 189, 6, 7, 12); RT_INTERFACE!{interface IUserActivityChannel(IUserActivityChannelVtbl): IInspectable(IInspectableVtbl) [IID_IUserActivityChannel] { - fn GetOrCreateUserActivityAsync(&self, activityId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn DeleteActivityAsync(&self, activityId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn DeleteAllActivitiesAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn GetOrCreateUserActivityAsync(&self, activityId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn DeleteActivityAsync(&self, activityId: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn DeleteAllActivitiesAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IUserActivityChannel { - #[inline] pub unsafe fn get_or_create_user_activity_async(&self, activityId: &HStringArg) -> Result>> { + #[inline] pub fn get_or_create_user_activity_async(&self, activityId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetOrCreateUserActivityAsync)(self as *const _ as *mut _, activityId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete_activity_async(&self, activityId: &HStringArg) -> Result> { + }} + #[inline] pub fn delete_activity_async(&self, activityId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteActivityAsync)(self as *const _ as *mut _, activityId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete_all_activities_async(&self) -> Result> { + }} + #[inline] pub fn delete_all_activities_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteAllActivitiesAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class UserActivityChannel: IUserActivityChannel} impl RtActivatable for UserActivityChannel {} impl UserActivityChannel { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} + } } DEFINE_CLSID!(UserActivityChannel(&[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,65,99,116,105,118,105,116,105,101,115,46,85,115,101,114,65,99,116,105,118,105,116,121,67,104,97,110,110,101,108,0]) [CLSID_UserActivityChannel]); DEFINE_IID!(IID_IUserActivityChannelStatics, 3368027563, 6541, 19840, 171, 178, 201, 119, 94, 196, 167, 41); @@ -20953,29 +20953,29 @@ RT_INTERFACE!{static interface IUserActivityChannelStatics(IUserActivityChannelS fn GetDefault(&self, out: *mut *mut UserActivityChannel) -> HRESULT }} impl IUserActivityChannelStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IUserActivityContentInfo, 3013207469, 4991, 16541, 130, 45, 225, 175, 39, 206, 8, 220); RT_INTERFACE!{interface IUserActivityContentInfo(IUserActivityContentInfoVtbl): IInspectable(IInspectableVtbl) [IID_IUserActivityContentInfo] { fn ToJson(&self, out: *mut HSTRING) -> HRESULT }} impl IUserActivityContentInfo { - #[inline] pub unsafe fn to_json(&self) -> Result { + #[inline] pub fn to_json(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ToJson)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class UserActivityContentInfo: IUserActivityContentInfo} impl RtActivatable for UserActivityContentInfo {} impl UserActivityContentInfo { - #[inline] pub fn from_json(value: &HStringArg) -> Result> { unsafe { + #[inline] pub fn from_json(value: &HStringArg) -> Result>> { >::get_activation_factory().from_json(value) - }} + } } DEFINE_CLSID!(UserActivityContentInfo(&[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,65,99,116,105,118,105,116,105,101,115,46,85,115,101,114,65,99,116,105,118,105,116,121,67,111,110,116,101,110,116,73,110,102,111,0]) [CLSID_UserActivityContentInfo]); DEFINE_IID!(IID_IUserActivityContentInfoStatics, 2575876939, 902, 19401, 150, 138, 130, 0, 176, 4, 20, 79); @@ -20983,22 +20983,22 @@ RT_INTERFACE!{static interface IUserActivityContentInfoStatics(IUserActivityCont fn FromJson(&self, value: HSTRING, out: *mut *mut UserActivityContentInfo) -> HRESULT }} impl IUserActivityContentInfoStatics { - #[inline] pub unsafe fn from_json(&self, value: &HStringArg) -> Result> { + #[inline] pub fn from_json(&self, value: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromJson)(self as *const _ as *mut _, value.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IUserActivitySession, 2923646328, 9466, 17571, 173, 72, 110, 218, 97, 170, 25, 36); RT_INTERFACE!{interface IUserActivitySession(IUserActivitySessionVtbl): IInspectable(IInspectableVtbl) [IID_IUserActivitySession] { fn get_ActivityId(&self, out: *mut HSTRING) -> HRESULT }} impl IUserActivitySession { - #[inline] pub unsafe fn get_activity_id(&self) -> Result { + #[inline] pub fn get_activity_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ActivityId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class UserActivitySession: IUserActivitySession} RT_ENUM! { enum UserActivityState: i32 { @@ -21018,51 +21018,51 @@ RT_INTERFACE!{interface IUserActivityVisualElements(IUserActivityVisualElementsV #[cfg(feature="windows-ui")] fn get_Content(&self, out: *mut *mut super::super::ui::shell::IAdaptiveCard) -> HRESULT }} impl IUserActivityVisualElements { - #[inline] pub unsafe fn get_display_text(&self) -> Result { + #[inline] pub fn get_display_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_text(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_display_text(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayText)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_description(&self) -> Result { + }} + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_description(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_description(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Description)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_background_color(&self) -> Result { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_background_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BackgroundColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn set_background_color(&self, value: super::super::ui::Color) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_background_color(&self, value: super::super::ui::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BackgroundColor)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_attribution(&self) -> Result> { + }} + #[inline] pub fn get_attribution(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Attribution)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_attribution(&self, value: &UserActivityAttribution) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_attribution(&self, value: &UserActivityAttribution) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Attribution)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn set_content(&self, value: &super::super::ui::shell::IAdaptiveCard) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_content(&self, value: &super::super::ui::shell::IAdaptiveCard) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Content)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_content(&self) -> Result> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_content(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Content)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class UserActivityVisualElements: IUserActivityVisualElements} pub mod core { // Windows.ApplicationModel.UserActivities.Core @@ -21070,30 +21070,30 @@ use ::prelude::*; RT_CLASS!{static class CoreUserActivityManager} impl RtActivatable for CoreUserActivityManager {} impl CoreUserActivityManager { - #[inline] pub fn create_user_activity_session_in_background(activity: &super::UserActivity) -> Result> { unsafe { + #[inline] pub fn create_user_activity_session_in_background(activity: &super::UserActivity) -> Result>> { >::get_activation_factory().create_user_activity_session_in_background(activity) - }} - #[inline] pub fn delete_user_activity_sessions_in_time_range_async(channel: &super::UserActivityChannel, startTime: ::rt::gen::windows::foundation::DateTime, endTime: ::rt::gen::windows::foundation::DateTime) -> Result> { unsafe { + } + #[inline] pub fn delete_user_activity_sessions_in_time_range_async(channel: &super::UserActivityChannel, startTime: foundation::DateTime, endTime: foundation::DateTime) -> Result> { >::get_activation_factory().delete_user_activity_sessions_in_time_range_async(channel, startTime, endTime) - }} + } } DEFINE_CLSID!(CoreUserActivityManager(&[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,65,99,116,105,118,105,116,105,101,115,46,67,111,114,101,46,67,111,114,101,85,115,101,114,65,99,116,105,118,105,116,121,77,97,110,97,103,101,114,0]) [CLSID_CoreUserActivityManager]); DEFINE_IID!(IID_ICoreUserActivityManagerStatics, 3392854786, 42174, 19789, 191, 168, 103, 149, 244, 38, 78, 251); RT_INTERFACE!{static interface ICoreUserActivityManagerStatics(ICoreUserActivityManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ICoreUserActivityManagerStatics] { fn CreateUserActivitySessionInBackground(&self, activity: *mut super::UserActivity, out: *mut *mut super::UserActivitySession) -> HRESULT, - fn DeleteUserActivitySessionsInTimeRangeAsync(&self, channel: *mut super::UserActivityChannel, startTime: ::rt::gen::windows::foundation::DateTime, endTime: ::rt::gen::windows::foundation::DateTime, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn DeleteUserActivitySessionsInTimeRangeAsync(&self, channel: *mut super::UserActivityChannel, startTime: foundation::DateTime, endTime: foundation::DateTime, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl ICoreUserActivityManagerStatics { - #[inline] pub unsafe fn create_user_activity_session_in_background(&self, activity: &super::UserActivity) -> Result> { + #[inline] pub fn create_user_activity_session_in_background(&self, activity: &super::UserActivity) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateUserActivitySessionInBackground)(self as *const _ as *mut _, activity as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete_user_activity_sessions_in_time_range_async(&self, channel: &super::UserActivityChannel, startTime: ::rt::gen::windows::foundation::DateTime, endTime: ::rt::gen::windows::foundation::DateTime) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn delete_user_activity_sessions_in_time_range_async(&self, channel: &super::UserActivityChannel, startTime: foundation::DateTime, endTime: foundation::DateTime) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteUserActivitySessionsInTimeRangeAsync)(self as *const _ as *mut _, channel as *const _ as *mut _, startTime, endTime, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } } // Windows.ApplicationModel.UserActivities.Core } // Windows.ApplicationModel.UserActivities @@ -21110,82 +21110,82 @@ RT_INTERFACE!{interface IUserDataAccount(IUserDataAccountVtbl): IInspectable(IIn #[cfg(feature="windows-storage")] fn get_Icon(&self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, fn get_DeviceAccountTypeId(&self, out: *mut HSTRING) -> HRESULT, fn get_PackageFamilyName(&self, out: *mut HSTRING) -> HRESULT, - fn SaveAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn DeleteAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn FindAppointmentCalendarsAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn FindEmailMailboxesAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn FindContactListsAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn FindContactAnnotationListsAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn SaveAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn DeleteAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn FindAppointmentCalendarsAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn FindEmailMailboxesAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn FindContactListsAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn FindContactAnnotationListsAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IUserDataAccount { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_user_display_name(&self) -> Result { + }} + #[inline] pub fn get_user_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UserDisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_user_display_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_user_display_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_UserDisplayName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_other_app_read_access(&self) -> Result { + }} + #[inline] pub fn get_other_app_read_access(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OtherAppReadAccess)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_other_app_read_access(&self, value: UserDataAccountOtherAppReadAccess) -> Result<()> { + }} + #[inline] pub fn set_other_app_read_access(&self, value: UserDataAccountOtherAppReadAccess) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OtherAppReadAccess)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_icon(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_icon(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Icon)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_account_type_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_device_account_type_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceAccountTypeId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_package_family_name(&self) -> Result { + }} + #[inline] pub fn get_package_family_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PackageFamilyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn save_async(&self) -> Result> { + }} + #[inline] pub fn save_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete_async(&self) -> Result> { + }} + #[inline] pub fn delete_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_appointment_calendars_async(&self) -> Result>>> { + }} + #[inline] pub fn find_appointment_calendars_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAppointmentCalendarsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_email_mailboxes_async(&self) -> Result>>> { + }} + #[inline] pub fn find_email_mailboxes_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindEmailMailboxesAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_contact_lists_async(&self) -> Result>>> { + }} + #[inline] pub fn find_contact_lists_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindContactListsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_contact_annotation_lists_async(&self) -> Result>>> { + }} + #[inline] pub fn find_contact_annotation_lists_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindContactAnnotationListsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class UserDataAccount: IUserDataAccount} DEFINE_IID!(IID_IUserDataAccount2, 126671007, 56962, 16459, 129, 149, 200, 163, 172, 25, 143, 96); @@ -21194,88 +21194,88 @@ RT_INTERFACE!{interface IUserDataAccount2(IUserDataAccount2Vtbl): IInspectable(I fn get_IsProtectedUnderLock(&self, out: *mut bool) -> HRESULT }} impl IUserDataAccount2 { - #[inline] pub unsafe fn get_enterprise_id(&self) -> Result { + #[inline] pub fn get_enterprise_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EnterpriseId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_protected_under_lock(&self) -> Result { + }} + #[inline] pub fn get_is_protected_under_lock(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsProtectedUnderLock)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_ExplictReadAccessPackageFamilyNames(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_DisplayName(&self, out: *mut HSTRING) -> HRESULT, fn put_DisplayName(&self, value: HSTRING) -> HRESULT }} impl IUserDataAccount3 { - #[inline] pub unsafe fn get_explict_read_access_package_family_names(&self) -> Result>> { + #[inline] pub fn get_explict_read_access_package_family_names(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExplictReadAccessPackageFamilyNames)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_display_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IUserDataAccount4, 3291566608, 60133, 20234, 168, 178, 28, 202, 17, 94, 0, 143); RT_INTERFACE!{interface IUserDataAccount4(IUserDataAccount4Vtbl): IInspectable(IInspectableVtbl) [IID_IUserDataAccount4] { fn get_CanShowCreateContactGroup(&self, out: *mut bool) -> HRESULT, fn put_CanShowCreateContactGroup(&self, value: bool) -> HRESULT, - fn get_ProviderProperties(&self, out: *mut *mut super::super::foundation::collections::IPropertySet) -> HRESULT, - fn FindUserDataTaskListsAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn FindContactGroupsAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn TryShowCreateContactGroupAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn get_ProviderProperties(&self, out: *mut *mut foundation::collections::IPropertySet) -> HRESULT, + fn FindUserDataTaskListsAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn FindContactGroupsAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn TryShowCreateContactGroupAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn put_IsProtectedUnderLock(&self, value: bool) -> HRESULT, #[cfg(feature="windows-storage")] fn put_Icon(&self, value: *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT }} impl IUserDataAccount4 { - #[inline] pub unsafe fn get_can_show_create_contact_group(&self) -> Result { + #[inline] pub fn get_can_show_create_contact_group(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanShowCreateContactGroup)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_show_create_contact_group(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_show_create_contact_group(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanShowCreateContactGroup)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_provider_properties(&self) -> Result> { + }} + #[inline] pub fn get_provider_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProviderProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_user_data_task_lists_async(&self) -> Result>>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn find_user_data_task_lists_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindUserDataTaskListsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_contact_groups_async(&self) -> Result>>> { + }} + #[inline] pub fn find_contact_groups_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindContactGroupsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_show_create_contact_group_async(&self) -> Result>> { + }} + #[inline] pub fn try_show_create_contact_group_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryShowCreateContactGroupAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_protected_under_lock(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_protected_under_lock(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsProtectedUnderLock)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn set_icon(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_icon(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Icon)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum UserDataAccountContentKinds: u32 { Email (UserDataAccountContentKinds_Email) = 1, Contact (UserDataAccountContentKinds_Contact) = 2, Appointment (UserDataAccountContentKinds_Appointment) = 4, @@ -21284,154 +21284,154 @@ RT_CLASS!{static class UserDataAccountManager} impl RtActivatable for UserDataAccountManager {} impl RtActivatable for UserDataAccountManager {} impl UserDataAccountManager { - #[inline] pub fn request_store_async(storeAccessType: UserDataAccountStoreAccessType) -> Result>> { unsafe { + #[inline] pub fn request_store_async(storeAccessType: UserDataAccountStoreAccessType) -> Result>> { >::get_activation_factory().request_store_async(storeAccessType) - }} - #[inline] pub fn show_add_account_async(contentKinds: UserDataAccountContentKinds) -> Result>> { unsafe { + } + #[inline] pub fn show_add_account_async(contentKinds: UserDataAccountContentKinds) -> Result>> { >::get_activation_factory().show_add_account_async(contentKinds) - }} - #[inline] pub fn show_account_settings_async(id: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn show_account_settings_async(id: &HStringArg) -> Result> { >::get_activation_factory().show_account_settings_async(id) - }} - #[inline] pub fn show_account_error_resolver_async(id: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn show_account_error_resolver_async(id: &HStringArg) -> Result> { >::get_activation_factory().show_account_error_resolver_async(id) - }} - #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::super::system::User) -> Result> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::super::system::User) -> Result>> { >::get_activation_factory().get_for_user(user) - }} + } } DEFINE_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]) [CLSID_UserDataAccountManager]); 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(&self, storeAccessType: UserDataAccountStoreAccessType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestStoreAsync(&self, storeAccessType: UserDataAccountStoreAccessType, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(feature="windows-system")] fn get_User(&self, out: *mut *mut super::super::system::User) -> HRESULT }} impl IUserDataAccountManagerForUser { - #[inline] pub unsafe fn request_store_async(&self, storeAccessType: UserDataAccountStoreAccessType) -> Result>> { + #[inline] pub fn request_store_async(&self, storeAccessType: UserDataAccountStoreAccessType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestStoreAsync)(self as *const _ as *mut _, storeAccessType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_user(&self) -> Result> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_User)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class UserDataAccountManagerForUser: IUserDataAccountManagerForUser} 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(&self, storeAccessType: UserDataAccountStoreAccessType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn ShowAddAccountAsync(&self, contentKinds: UserDataAccountContentKinds, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn ShowAccountSettingsAsync(&self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn ShowAccountErrorResolverAsync(&self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn RequestStoreAsync(&self, storeAccessType: UserDataAccountStoreAccessType, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ShowAddAccountAsync(&self, contentKinds: UserDataAccountContentKinds, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ShowAccountSettingsAsync(&self, id: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ShowAccountErrorResolverAsync(&self, id: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IUserDataAccountManagerStatics { - #[inline] pub unsafe fn request_store_async(&self, storeAccessType: UserDataAccountStoreAccessType) -> Result>> { + #[inline] pub fn request_store_async(&self, storeAccessType: UserDataAccountStoreAccessType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestStoreAsync)(self as *const _ as *mut _, storeAccessType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn show_add_account_async(&self, contentKinds: UserDataAccountContentKinds) -> Result>> { + }} + #[inline] pub fn show_add_account_async(&self, contentKinds: UserDataAccountContentKinds) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowAddAccountAsync)(self as *const _ as *mut _, contentKinds, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn show_account_settings_async(&self, id: &HStringArg) -> Result> { + }} + #[inline] pub fn show_account_settings_async(&self, id: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowAccountSettingsAsync)(self as *const _ as *mut _, id.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn show_account_error_resolver_async(&self, id: &HStringArg) -> Result> { + }} + #[inline] pub fn show_account_error_resolver_async(&self, id: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowAccountErrorResolverAsync)(self as *const _ as *mut _, id.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(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(&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(&self, user: &super::super::system::User) -> Result> { + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(&self, user: &super::super::system::User) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForUser)(self as *const _ as *mut _, user as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum UserDataAccountOtherAppReadAccess: i32 { SystemOnly (UserDataAccountOtherAppReadAccess_SystemOnly) = 0, Full (UserDataAccountOtherAppReadAccess_Full) = 1, None (UserDataAccountOtherAppReadAccess_None) = 2, }} 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetAccountAsync(&self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CreateAccountAsync(&self, userDisplayName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FindAccountsAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetAccountAsync(&self, id: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreateAccountAsync(&self, userDisplayName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IUserDataAccountStore { - #[inline] pub unsafe fn find_accounts_async(&self) -> Result>>> { + #[inline] pub fn find_accounts_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAccountsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_account_async(&self, id: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_account_async(&self, id: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAccountAsync)(self as *const _ as *mut _, id.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_account_async(&self, userDisplayName: &HStringArg) -> Result>> { + }} + #[inline] pub fn create_account_async(&self, userDisplayName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAccountAsync)(self as *const _ as *mut _, userDisplayName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class UserDataAccountStore: IUserDataAccountStore} 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(&self, userDisplayName: HSTRING, packageRelativeAppId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_StoreChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StoreChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn CreateAccountWithPackageRelativeAppIdAsync(&self, userDisplayName: HSTRING, packageRelativeAppId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_StoreChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StoreChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IUserDataAccountStore2 { - #[inline] pub unsafe fn create_account_with_package_relative_app_id_async(&self, userDisplayName: &HStringArg, packageRelativeAppId: &HStringArg) -> Result>> { + #[inline] pub fn create_account_with_package_relative_app_id_async(&self, userDisplayName: &HStringArg, packageRelativeAppId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAccountWithPackageRelativeAppIdAsync)(self as *const _ as *mut _, userDisplayName.get(), packageRelativeAppId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_store_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_store_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StoreChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_store_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_store_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StoreChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IUserDataAccountStore3, 2168635540, 62409, 18315, 177, 23, 101, 133, 190, 187, 103, 137); RT_INTERFACE!{interface IUserDataAccountStore3(IUserDataAccountStore3Vtbl): IInspectable(IInspectableVtbl) [IID_IUserDataAccountStore3] { - fn CreateAccountWithPackageRelativeAppIdAndEnterpriseIdAsync(&self, userDisplayName: HSTRING, packageRelativeAppId: HSTRING, enterpriseId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn CreateAccountWithPackageRelativeAppIdAndEnterpriseIdAsync(&self, userDisplayName: HSTRING, packageRelativeAppId: HSTRING, enterpriseId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IUserDataAccountStore3 { - #[inline] pub unsafe fn create_account_with_package_relative_app_id_and_enterprise_id_async(&self, userDisplayName: &HStringArg, packageRelativeAppId: &HStringArg, enterpriseId: &HStringArg) -> Result>> { + #[inline] pub fn create_account_with_package_relative_app_id_and_enterprise_id_async(&self, userDisplayName: &HStringArg, packageRelativeAppId: &HStringArg, enterpriseId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAccountWithPackageRelativeAppIdAndEnterpriseIdAsync)(self as *const _ as *mut _, userDisplayName.get(), packageRelativeAppId.get(), enterpriseId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum UserDataAccountStoreAccessType: i32 { AllAccountsReadOnly (UserDataAccountStoreAccessType_AllAccountsReadOnly) = 0, AppAccountsReadWrite (UserDataAccountStoreAccessType_AppAccountsReadWrite) = 1, }} 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(&self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IUserDataAccountStoreChangedEventArgs { - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class UserDataAccountStoreChangedEventArgs: IUserDataAccountStoreChangedEventArgs} pub mod provider { // Windows.ApplicationModel.UserDataAccounts.Provider @@ -21443,44 +21443,44 @@ RT_INTERFACE!{interface IUserDataAccountPartnerAccountInfo(IUserDataAccountPartn fn get_AccountKind(&self, out: *mut UserDataAccountProviderPartnerAccountKind) -> HRESULT }} impl IUserDataAccountPartnerAccountInfo { - #[inline] pub unsafe fn get_display_name(&self) -> Result { + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_priority(&self) -> Result { + }} + #[inline] pub fn get_priority(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Priority)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_account_kind(&self) -> Result { + }} + #[inline] pub fn get_account_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AccountKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class UserDataAccountPartnerAccountInfo: IUserDataAccountPartnerAccountInfo} 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(&self, out: *mut super::UserDataAccountContentKinds) -> HRESULT, - fn get_PartnerAccountInfos(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_PartnerAccountInfos(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn ReportCompleted(&self, userDataAccountId: HSTRING) -> HRESULT }} impl IUserDataAccountProviderAddAccountOperation { - #[inline] pub unsafe fn get_content_kinds(&self) -> Result { + #[inline] pub fn get_content_kinds(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ContentKinds)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_partner_account_infos(&self) -> Result>> { + }} + #[inline] pub fn get_partner_account_infos(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PartnerAccountInfos)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed(&self, userDataAccountId: &HStringArg) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn report_completed(&self, userDataAccountId: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportCompleted)(self as *const _ as *mut _, userDataAccountId.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class UserDataAccountProviderAddAccountOperation: IUserDataAccountProviderAddAccountOperation} DEFINE_IID!(IID_IUserDataAccountProviderOperation, 2718608739, 34956, 19042, 163, 221, 52, 208, 122, 128, 43, 43); @@ -21488,11 +21488,11 @@ RT_INTERFACE!{interface IUserDataAccountProviderOperation(IUserDataAccountProvid fn get_Kind(&self, out: *mut UserDataAccountProviderOperationKind) -> HRESULT }} impl IUserDataAccountProviderOperation { - #[inline] pub unsafe fn get_kind(&self) -> Result { + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum UserDataAccountProviderOperationKind: i32 { AddAccount (UserDataAccountProviderOperationKind_AddAccount) = 0, Settings (UserDataAccountProviderOperationKind_Settings) = 1, ResolveErrors (UserDataAccountProviderOperationKind_ResolveErrors) = 2, @@ -21506,15 +21506,15 @@ RT_INTERFACE!{interface IUserDataAccountProviderResolveErrorsOperation(IUserData fn ReportCompleted(&self) -> HRESULT }} impl IUserDataAccountProviderResolveErrorsOperation { - #[inline] pub unsafe fn get_user_data_account_id(&self) -> Result { + #[inline] pub fn get_user_data_account_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UserDataAccountId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed(&self) -> Result<()> { + }} + #[inline] pub fn report_completed(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportCompleted)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class UserDataAccountProviderResolveErrorsOperation: IUserDataAccountProviderResolveErrorsOperation} DEFINE_IID!(IID_IUserDataAccountProviderSettingsOperation, 2449690039, 34376, 20272, 172, 250, 48, 2, 101, 140, 168, 13); @@ -21523,15 +21523,15 @@ RT_INTERFACE!{interface IUserDataAccountProviderSettingsOperation(IUserDataAccou fn ReportCompleted(&self) -> HRESULT }} impl IUserDataAccountProviderSettingsOperation { - #[inline] pub unsafe fn get_user_data_account_id(&self) -> Result { + #[inline] pub fn get_user_data_account_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UserDataAccountId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed(&self) -> Result<()> { + }} + #[inline] pub fn report_completed(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportCompleted)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class UserDataAccountProviderSettingsOperation: IUserDataAccountProviderSettingsOperation} } // Windows.ApplicationModel.UserDataAccounts.Provider @@ -21576,150 +21576,150 @@ RT_INTERFACE!{interface IDeviceAccountConfiguration(IDeviceAccountConfigurationV fn put_OutgoingServerUsername(&self, value: HSTRING) -> HRESULT }} impl IDeviceAccountConfiguration { - #[inline] pub unsafe fn get_account_name(&self) -> Result { + #[inline] pub fn get_account_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AccountName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_account_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_account_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AccountName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_account_type_id(&self) -> Result { + }} + #[inline] pub fn get_device_account_type_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceAccountTypeId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_device_account_type_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_device_account_type_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DeviceAccountTypeId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_server_type(&self) -> Result { + }} + #[inline] pub fn get_server_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ServerType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_server_type(&self, value: DeviceAccountServerType) -> Result<()> { + }} + #[inline] pub fn set_server_type(&self, value: DeviceAccountServerType) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ServerType)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_email_address(&self) -> Result { + }} + #[inline] pub fn get_email_address(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EmailAddress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_email_address(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_email_address(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_EmailAddress)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_domain(&self) -> Result { + }} + #[inline] pub fn get_domain(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Domain)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_domain(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_domain(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Domain)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_email_sync_enabled(&self) -> Result { + }} + #[inline] pub fn get_email_sync_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EmailSyncEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_email_sync_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_email_sync_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_EmailSyncEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_contacts_sync_enabled(&self) -> Result { + }} + #[inline] pub fn get_contacts_sync_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ContactsSyncEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_contacts_sync_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_contacts_sync_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ContactsSyncEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_calendar_sync_enabled(&self) -> Result { + }} + #[inline] pub fn get_calendar_sync_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CalendarSyncEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_calendar_sync_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_calendar_sync_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CalendarSyncEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_incoming_server_address(&self) -> Result { + }} + #[inline] pub fn get_incoming_server_address(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IncomingServerAddress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_incoming_server_address(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_incoming_server_address(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IncomingServerAddress)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_incoming_server_port(&self) -> Result { + }} + #[inline] pub fn get_incoming_server_port(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IncomingServerPort)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_incoming_server_port(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_incoming_server_port(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IncomingServerPort)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_incoming_server_requires_ssl(&self) -> Result { + }} + #[inline] pub fn get_incoming_server_requires_ssl(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IncomingServerRequiresSsl)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_incoming_server_requires_ssl(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_incoming_server_requires_ssl(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IncomingServerRequiresSsl)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_incoming_server_username(&self) -> Result { + }} + #[inline] pub fn get_incoming_server_username(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IncomingServerUsername)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_incoming_server_username(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_incoming_server_username(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IncomingServerUsername)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_outgoing_server_address(&self) -> Result { + }} + #[inline] pub fn get_outgoing_server_address(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OutgoingServerAddress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_outgoing_server_address(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_outgoing_server_address(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OutgoingServerAddress)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_outgoing_server_port(&self) -> Result { + }} + #[inline] pub fn get_outgoing_server_port(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OutgoingServerPort)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_outgoing_server_port(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_outgoing_server_port(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OutgoingServerPort)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_outgoing_server_requires_ssl(&self) -> Result { + }} + #[inline] pub fn get_outgoing_server_requires_ssl(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OutgoingServerRequiresSsl)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_outgoing_server_requires_ssl(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_outgoing_server_requires_ssl(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OutgoingServerRequiresSsl)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_outgoing_server_username(&self) -> Result { + }} + #[inline] pub fn get_outgoing_server_username(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OutgoingServerUsername)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_outgoing_server_username(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_outgoing_server_username(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OutgoingServerUsername)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DeviceAccountConfiguration: IDeviceAccountConfiguration} impl RtActivatable for DeviceAccountConfiguration {} @@ -21762,12 +21762,12 @@ RT_INTERFACE!{interface IDeviceAccountConfiguration2(IDeviceAccountConfiguration fn put_CardDavSyncScheduleKind(&self, value: DeviceAccountSyncScheduleKind) -> HRESULT, fn get_CalDavSyncScheduleKind(&self, out: *mut DeviceAccountSyncScheduleKind) -> HRESULT, fn put_CalDavSyncScheduleKind(&self, value: DeviceAccountSyncScheduleKind) -> HRESULT, - fn get_CardDavServerUrl(&self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, - fn put_CardDavServerUrl(&self, value: *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn get_CardDavServerUrl(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_CardDavServerUrl(&self, value: *mut foundation::Uri) -> HRESULT, fn get_CardDavRequiresSsl(&self, out: *mut bool) -> HRESULT, fn put_CardDavRequiresSsl(&self, value: bool) -> HRESULT, - fn get_CalDavServerUrl(&self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, - fn put_CalDavServerUrl(&self, value: *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn get_CalDavServerUrl(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_CalDavServerUrl(&self, value: *mut foundation::Uri) -> HRESULT, fn get_CalDavRequiresSsl(&self, out: *mut bool) -> HRESULT, fn put_CalDavRequiresSsl(&self, value: bool) -> HRESULT, fn get_WasModifiedByUser(&self, out: *mut bool) -> HRESULT, @@ -21788,259 +21788,259 @@ RT_INTERFACE!{interface IDeviceAccountConfiguration2(IDeviceAccountConfiguration fn put_IsSyncScheduleManagedBySystem(&self, value: bool) -> HRESULT }} impl IDeviceAccountConfiguration2 { - #[cfg(feature="windows-security")] #[inline] pub unsafe fn get_incoming_server_credential(&self) -> Result> { + #[cfg(feature="windows-security")] #[inline] pub fn get_incoming_server_credential(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IncomingServerCredential)(self 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 set_incoming_server_credential(&self, value: &::rt::gen::windows::security::credentials::PasswordCredential) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-security")] #[inline] pub fn set_incoming_server_credential(&self, value: &::rt::gen::windows::security::credentials::PasswordCredential) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IncomingServerCredential)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[cfg(feature="windows-security")] #[inline] pub fn get_outgoing_server_credential(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OutgoingServerCredential)(self 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 set_outgoing_server_credential(&self, value: &::rt::gen::windows::security::credentials::PasswordCredential) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-security")] #[inline] pub fn set_outgoing_server_credential(&self, value: &::rt::gen::windows::security::credentials::PasswordCredential) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OutgoingServerCredential)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_oauth_refresh_token(&self) -> Result { + }} + #[inline] pub fn get_oauth_refresh_token(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OAuthRefreshToken)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_oauth_refresh_token(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_oauth_refresh_token(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OAuthRefreshToken)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_externally_managed(&self) -> Result { + }} + #[inline] pub fn get_is_externally_managed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsExternallyManaged)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_externally_managed(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_externally_managed(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsExternallyManaged)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_account_icon_id(&self) -> Result { + }} + #[inline] pub fn get_account_icon_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AccountIconId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_account_icon_id(&self, value: DeviceAccountIconId) -> Result<()> { + }} + #[inline] pub fn set_account_icon_id(&self, value: DeviceAccountIconId) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AccountIconId)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_authentication_type(&self) -> Result { + }} + #[inline] pub fn get_authentication_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AuthenticationType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_authentication_type(&self, value: DeviceAccountAuthenticationType) -> Result<()> { + }} + #[inline] pub fn set_authentication_type(&self, value: DeviceAccountAuthenticationType) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AuthenticationType)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_sso_authentication_supported(&self) -> Result { + }} + #[inline] pub fn get_is_sso_authentication_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSsoAuthenticationSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sso_account_id(&self) -> Result { + }} + #[inline] pub fn get_sso_account_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SsoAccountId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_sso_account_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_sso_account_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SsoAccountId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_always_download_full_message(&self) -> Result { + }} + #[inline] pub fn get_always_download_full_message(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AlwaysDownloadFullMessage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_always_download_full_message(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_always_download_full_message(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AlwaysDownloadFullMessage)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_does_policy_allow_mail_sync(&self) -> Result { + }} + #[inline] pub fn get_does_policy_allow_mail_sync(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DoesPolicyAllowMailSync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sync_schedule_kind(&self) -> Result { + }} + #[inline] pub fn get_sync_schedule_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SyncScheduleKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_sync_schedule_kind(&self, value: DeviceAccountSyncScheduleKind) -> Result<()> { + }} + #[inline] pub fn set_sync_schedule_kind(&self, value: DeviceAccountSyncScheduleKind) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SyncScheduleKind)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_mail_age_filter(&self) -> Result { + }} + #[inline] pub fn get_mail_age_filter(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MailAgeFilter)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_mail_age_filter(&self, value: DeviceAccountMailAgeFilter) -> Result<()> { + }} + #[inline] pub fn set_mail_age_filter(&self, value: DeviceAccountMailAgeFilter) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MailAgeFilter)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_client_authentication_certificate_required(&self) -> Result { + }} + #[inline] pub fn get_is_client_authentication_certificate_required(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsClientAuthenticationCertificateRequired)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_client_authentication_certificate_required(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_client_authentication_certificate_required(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsClientAuthenticationCertificateRequired)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_auto_select_authentication_certificate(&self) -> Result { + }} + #[inline] pub fn get_auto_select_authentication_certificate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AutoSelectAuthenticationCertificate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_auto_select_authentication_certificate(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_auto_select_authentication_certificate(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AutoSelectAuthenticationCertificate)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_authentication_certificate_id(&self) -> Result { + }} + #[inline] pub fn get_authentication_certificate_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AuthenticationCertificateId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_authentication_certificate_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_authentication_certificate_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AuthenticationCertificateId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_card_dav_sync_schedule_kind(&self) -> Result { + }} + #[inline] pub fn get_card_dav_sync_schedule_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CardDavSyncScheduleKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_card_dav_sync_schedule_kind(&self, value: DeviceAccountSyncScheduleKind) -> Result<()> { + }} + #[inline] pub fn set_card_dav_sync_schedule_kind(&self, value: DeviceAccountSyncScheduleKind) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CardDavSyncScheduleKind)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_cal_dav_sync_schedule_kind(&self) -> Result { + }} + #[inline] pub fn get_cal_dav_sync_schedule_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CalDavSyncScheduleKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_cal_dav_sync_schedule_kind(&self, value: DeviceAccountSyncScheduleKind) -> Result<()> { + }} + #[inline] pub fn set_cal_dav_sync_schedule_kind(&self, value: DeviceAccountSyncScheduleKind) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CalDavSyncScheduleKind)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_card_dav_server_url(&self) -> Result> { + }} + #[inline] pub fn get_card_dav_server_url(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CardDavServerUrl)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_card_dav_server_url(&self, value: &::rt::gen::windows::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_card_dav_server_url(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CardDavServerUrl)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_card_dav_requires_ssl(&self) -> Result { + }} + #[inline] pub fn get_card_dav_requires_ssl(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CardDavRequiresSsl)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_card_dav_requires_ssl(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_card_dav_requires_ssl(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CardDavRequiresSsl)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_cal_dav_server_url(&self) -> Result> { + }} + #[inline] pub fn get_cal_dav_server_url(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CalDavServerUrl)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_cal_dav_server_url(&self, value: &::rt::gen::windows::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_cal_dav_server_url(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CalDavServerUrl)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_cal_dav_requires_ssl(&self) -> Result { + }} + #[inline] pub fn get_cal_dav_requires_ssl(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CalDavRequiresSsl)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_cal_dav_requires_ssl(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_cal_dav_requires_ssl(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CalDavRequiresSsl)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_was_modified_by_user(&self) -> Result { + }} + #[inline] pub fn get_was_modified_by_user(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_WasModifiedByUser)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_was_modified_by_user(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_was_modified_by_user(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_WasModifiedByUser)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_was_incoming_server_certificate_hash_confirmed(&self) -> Result { + }} + #[inline] pub fn get_was_incoming_server_certificate_hash_confirmed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_WasIncomingServerCertificateHashConfirmed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_was_incoming_server_certificate_hash_confirmed(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_was_incoming_server_certificate_hash_confirmed(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_WasIncomingServerCertificateHashConfirmed)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_incoming_server_certificate_hash(&self) -> Result { + }} + #[inline] pub fn get_incoming_server_certificate_hash(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IncomingServerCertificateHash)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_incoming_server_certificate_hash(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_incoming_server_certificate_hash(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IncomingServerCertificateHash)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_outgoing_server_authentication_required(&self) -> Result { + }} + #[inline] pub fn get_is_outgoing_server_authentication_required(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsOutgoingServerAuthenticationRequired)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_outgoing_server_authentication_required(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_outgoing_server_authentication_required(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsOutgoingServerAuthenticationRequired)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_outgoing_server_authentication_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_outgoing_server_authentication_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsOutgoingServerAuthenticationEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_outgoing_server_authentication_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_outgoing_server_authentication_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsOutgoingServerAuthenticationEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_was_outgoing_server_certificate_hash_confirmed(&self) -> Result { + }} + #[inline] pub fn get_was_outgoing_server_certificate_hash_confirmed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_WasOutgoingServerCertificateHashConfirmed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_was_outgoing_server_certificate_hash_confirmed(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_was_outgoing_server_certificate_hash_confirmed(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_WasOutgoingServerCertificateHashConfirmed)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_outgoing_server_certificate_hash(&self) -> Result { + }} + #[inline] pub fn get_outgoing_server_certificate_hash(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OutgoingServerCertificateHash)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_outgoing_server_certificate_hash(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_outgoing_server_certificate_hash(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OutgoingServerCertificateHash)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_sync_schedule_managed_by_system(&self) -> Result { + }} + #[inline] pub fn get_is_sync_schedule_managed_by_system(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSyncScheduleManagedBySystem)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_sync_schedule_managed_by_system(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_sync_schedule_managed_by_system(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsSyncScheduleManagedBySystem)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum DeviceAccountIconId: i32 { Exchange (DeviceAccountIconId_Exchange) = 0, Msa (DeviceAccountIconId_Msa) = 1, Outlook (DeviceAccountIconId_Outlook) = 2, Generic (DeviceAccountIconId_Generic) = 3, @@ -22058,62 +22058,62 @@ RT_CLASS!{static class UserDataAccountSystemAccessManager} impl RtActivatable for UserDataAccountSystemAccessManager {} impl RtActivatable for UserDataAccountSystemAccessManager {} impl UserDataAccountSystemAccessManager { - #[inline] pub fn add_and_show_device_accounts_async(accounts: &::rt::gen::windows::foundation::collections::IIterable) -> Result>>> { unsafe { + #[inline] pub fn add_and_show_device_accounts_async(accounts: &foundation::collections::IIterable) -> Result>>> { >::get_activation_factory().add_and_show_device_accounts_async(accounts) - }} - #[inline] pub fn suppress_local_account_with_account_async(userDataAccountId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn suppress_local_account_with_account_async(userDataAccountId: &HStringArg) -> Result> { >::get_activation_factory().suppress_local_account_with_account_async(userDataAccountId) - }} - #[inline] pub fn create_device_account_async(account: &DeviceAccountConfiguration) -> Result>> { unsafe { + } + #[inline] pub fn create_device_account_async(account: &DeviceAccountConfiguration) -> Result>> { >::get_activation_factory().create_device_account_async(account) - }} - #[inline] pub fn delete_device_account_async(accountId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn delete_device_account_async(accountId: &HStringArg) -> Result> { >::get_activation_factory().delete_device_account_async(accountId) - }} - #[inline] pub fn get_device_account_configuration_async(accountId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn get_device_account_configuration_async(accountId: &HStringArg) -> Result>> { >::get_activation_factory().get_device_account_configuration_async(accountId) - }} + } } DEFINE_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]) [CLSID_UserDataAccountSystemAccessManager]); 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(&self, accounts: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT + fn AddAndShowDeviceAccountsAsync(&self, accounts: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IUserDataAccountSystemAccessManagerStatics { - #[inline] pub unsafe fn add_and_show_device_accounts_async(&self, accounts: &::rt::gen::windows::foundation::collections::IIterable) -> Result>>> { + #[inline] pub fn add_and_show_device_accounts_async(&self, accounts: &foundation::collections::IIterable) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AddAndShowDeviceAccountsAsync)(self as *const _ as *mut _, accounts as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, userDataAccountId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn CreateDeviceAccountAsync(&self, account: *mut DeviceAccountConfiguration, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn DeleteDeviceAccountAsync(&self, accountId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn GetDeviceAccountConfigurationAsync(&self, accountId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn SuppressLocalAccountWithAccountAsync(&self, userDataAccountId: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn CreateDeviceAccountAsync(&self, account: *mut DeviceAccountConfiguration, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn DeleteDeviceAccountAsync(&self, accountId: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn GetDeviceAccountConfigurationAsync(&self, accountId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IUserDataAccountSystemAccessManagerStatics2 { - #[inline] pub unsafe fn suppress_local_account_with_account_async(&self, userDataAccountId: &HStringArg) -> Result> { + #[inline] pub fn suppress_local_account_with_account_async(&self, userDataAccountId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SuppressLocalAccountWithAccountAsync)(self as *const _ as *mut _, userDataAccountId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_device_account_async(&self, account: &DeviceAccountConfiguration) -> Result>> { + }} + #[inline] pub fn create_device_account_async(&self, account: &DeviceAccountConfiguration) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDeviceAccountAsync)(self as *const _ as *mut _, account as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete_device_account_async(&self, accountId: &HStringArg) -> Result> { + }} + #[inline] pub fn delete_device_account_async(&self, accountId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteDeviceAccountAsync)(self as *const _ as *mut _, accountId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_account_configuration_async(&self, accountId: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_device_account_configuration_async(&self, accountId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceAccountConfigurationAsync)(self as *const _ as *mut _, accountId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } } // Windows.ApplicationModel.UserDataAccounts.SystemAccess } // Windows.ApplicationModel.UserDataAccounts @@ -22126,125 +22126,125 @@ RT_INTERFACE!{interface IAppExtension(IAppExtensionVtbl): IInspectable(IInspecta fn get_Description(&self, out: *mut HSTRING) -> HRESULT, fn get_Package(&self, out: *mut *mut super::Package) -> HRESULT, fn get_AppInfo(&self, out: *mut *mut super::AppInfo) -> HRESULT, - fn GetExtensionPropertiesAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn GetPublicFolderAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetExtensionPropertiesAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn GetPublicFolderAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IAppExtension { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_description(&self) -> Result { + }} + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_package(&self) -> Result> { + }} + #[inline] pub fn get_package(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Package)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_info(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_app_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_extension_properties_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_extension_properties_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetExtensionPropertiesAsync)(self 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_public_folder_async(&self) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_public_folder_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPublicFolderAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class AppExtension: IAppExtension} 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn RequestRemovePackageAsync(&self, packageFullName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_PackageInstalled(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PackageInstalled(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PackageUpdating(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PackageUpdating(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PackageUpdated(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PackageUpdated(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PackageUninstalling(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PackageUninstalling(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PackageStatusChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PackageStatusChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn FindAllAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn RequestRemovePackageAsync(&self, packageFullName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_PackageInstalled(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PackageInstalled(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PackageUpdating(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PackageUpdating(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PackageUpdated(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PackageUpdated(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PackageUninstalling(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PackageUninstalling(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PackageStatusChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PackageStatusChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IAppExtensionCatalog { - #[inline] pub unsafe fn find_all_async(&self) -> Result>>> { + #[inline] pub fn find_all_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_remove_package_async(&self, packageFullName: &HStringArg) -> Result>> { + }} + #[inline] pub fn request_remove_package_async(&self, packageFullName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestRemovePackageAsync)(self as *const _ as *mut _, packageFullName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_package_installed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_package_installed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PackageInstalled)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_package_installed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_package_installed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PackageInstalled)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_package_updating(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_package_updating(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PackageUpdating)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_package_updating(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_package_updating(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PackageUpdating)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_package_updated(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_package_updated(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PackageUpdated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_package_updated(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_package_updated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PackageUpdated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_package_uninstalling(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_package_uninstalling(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PackageUninstalling)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_package_uninstalling(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_package_uninstalling(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PackageUninstalling)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_package_status_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_package_status_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PackageStatusChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_package_status_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_package_status_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PackageStatusChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AppExtensionCatalog: IAppExtensionCatalog} impl RtActivatable for AppExtensionCatalog {} impl AppExtensionCatalog { - #[inline] pub fn open(appExtensionName: &HStringArg) -> Result> { unsafe { + #[inline] pub fn open(appExtensionName: &HStringArg) -> Result>> { >::get_activation_factory().open(appExtensionName) - }} + } } DEFINE_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]) [CLSID_AppExtensionCatalog]); DEFINE_IID!(IID_IAppExtensionCatalogStatics, 1010198154, 24344, 20235, 156, 229, 202, 182, 29, 25, 111, 17); @@ -22252,34 +22252,34 @@ RT_INTERFACE!{static interface IAppExtensionCatalogStatics(IAppExtensionCatalogS fn Open(&self, appExtensionName: HSTRING, out: *mut *mut AppExtensionCatalog) -> HRESULT }} impl IAppExtensionCatalogStatics { - #[inline] pub unsafe fn open(&self, appExtensionName: &HStringArg) -> Result> { + #[inline] pub fn open(&self, appExtensionName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Open)(self as *const _ as *mut _, appExtensionName.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut HSTRING) -> HRESULT, fn get_Package(&self, out: *mut *mut super::Package) -> HRESULT, - fn get_Extensions(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_Extensions(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IAppExtensionPackageInstalledEventArgs { - #[inline] pub unsafe fn get_app_extension_name(&self) -> Result { + #[inline] pub fn get_app_extension_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppExtensionName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_package(&self) -> Result> { + }} + #[inline] pub fn get_package(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Package)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_extensions(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_extensions(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Extensions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppExtensionPackageInstalledEventArgs: IAppExtensionPackageInstalledEventArgs} DEFINE_IID!(IID_IAppExtensionPackageStatusChangedEventArgs, 484537395, 4435, 17661, 135, 177, 138, 225, 5, 3, 3, 223); @@ -22288,16 +22288,16 @@ RT_INTERFACE!{interface IAppExtensionPackageStatusChangedEventArgs(IAppExtension fn get_Package(&self, out: *mut *mut super::Package) -> HRESULT }} impl IAppExtensionPackageStatusChangedEventArgs { - #[inline] pub unsafe fn get_app_extension_name(&self) -> Result { + #[inline] pub fn get_app_extension_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppExtensionName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_package(&self) -> Result> { + }} + #[inline] pub fn get_package(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Package)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppExtensionPackageStatusChangedEventArgs: IAppExtensionPackageStatusChangedEventArgs} DEFINE_IID!(IID_IAppExtensionPackageUninstallingEventArgs, 1626431685, 5918, 16639, 174, 152, 171, 44, 32, 221, 77, 117); @@ -22306,40 +22306,40 @@ RT_INTERFACE!{interface IAppExtensionPackageUninstallingEventArgs(IAppExtensionP fn get_Package(&self, out: *mut *mut super::Package) -> HRESULT }} impl IAppExtensionPackageUninstallingEventArgs { - #[inline] pub unsafe fn get_app_extension_name(&self) -> Result { + #[inline] pub fn get_app_extension_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppExtensionName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_package(&self) -> Result> { + }} + #[inline] pub fn get_package(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Package)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppExtensionPackageUninstallingEventArgs: IAppExtensionPackageUninstallingEventArgs} 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(&self, out: *mut HSTRING) -> HRESULT, fn get_Package(&self, out: *mut *mut super::Package) -> HRESULT, - fn get_Extensions(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_Extensions(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IAppExtensionPackageUpdatedEventArgs { - #[inline] pub unsafe fn get_app_extension_name(&self) -> Result { + #[inline] pub fn get_app_extension_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppExtensionName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_package(&self) -> Result> { + }} + #[inline] pub fn get_package(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Package)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_extensions(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_extensions(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Extensions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppExtensionPackageUpdatedEventArgs: IAppExtensionPackageUpdatedEventArgs} DEFINE_IID!(IID_IAppExtensionPackageUpdatingEventArgs, 2127926057, 6757, 18432, 167, 0, 179, 33, 0, 158, 48, 106); @@ -22348,16 +22348,16 @@ RT_INTERFACE!{interface IAppExtensionPackageUpdatingEventArgs(IAppExtensionPacka fn get_Package(&self, out: *mut *mut super::Package) -> HRESULT }} impl IAppExtensionPackageUpdatingEventArgs { - #[inline] pub unsafe fn get_app_extension_name(&self) -> Result { + #[inline] pub fn get_app_extension_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppExtensionName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_package(&self) -> Result> { + }} + #[inline] pub fn get_package(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Package)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppExtensionPackageUpdatingEventArgs: IAppExtensionPackageUpdatingEventArgs} } // Windows.ApplicationModel.AppExtensions @@ -22366,30 +22366,30 @@ use ::prelude::*; 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(&self) -> HRESULT, - fn add_Unlocking(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Unlocking(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_Unlocking(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Unlocking(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl ILockApplicationHost { - #[inline] pub unsafe fn request_unlock(&self) -> Result<()> { + #[inline] pub fn request_unlock(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RequestUnlock)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_unlocking(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_unlocking(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Unlocking)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_unlocking(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_unlocking(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Unlocking)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class LockApplicationHost: ILockApplicationHost} impl RtActivatable for LockApplicationHost {} impl LockApplicationHost { - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} + } } DEFINE_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]) [CLSID_LockApplicationHost]); DEFINE_IID!(IID_ILockApplicationHostStatics, 4103056270, 9175, 20067, 150, 161, 102, 111, 245, 45, 59, 44); @@ -22397,11 +22397,11 @@ RT_INTERFACE!{static interface ILockApplicationHostStatics(ILockApplicationHostS fn GetForCurrentView(&self, out: *mut *mut LockApplicationHost) -> HRESULT }} impl ILockApplicationHostStatics { - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_ILockScreenBadge, 3914401241, 11263, 19888, 155, 79, 56, 36, 119, 139, 156, 154); RT_INTERFACE!{interface ILockScreenBadge(ILockScreenBadgeVtbl): IInspectable(IInspectableVtbl) [IID_ILockScreenBadge] { @@ -22409,109 +22409,109 @@ RT_INTERFACE!{interface ILockScreenBadge(ILockScreenBadgeVtbl): IInspectable(IIn #[cfg(feature="windows-storage")] fn get_Logo(&self, out: *mut *mut super::super::storage::streams::IRandomAccessStream) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy1(&self) -> (), #[cfg(feature="windows-storage")] fn get_Glyph(&self, out: *mut *mut super::super::storage::streams::IRandomAccessStream) -> HRESULT, - fn get_Number(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_Number(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn get_AutomationName(&self, out: *mut HSTRING) -> HRESULT, fn LaunchApp(&self) -> HRESULT }} impl ILockScreenBadge { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_logo(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_logo(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Logo)(self 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_glyph(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_glyph(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Glyph)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_number(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_number(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Number)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_automation_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_automation_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AutomationName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn launch_app(&self) -> Result<()> { + }} + #[inline] pub fn launch_app(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).LaunchApp)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class LockScreenBadge: ILockScreenBadge} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_LockScreenImageChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_LockScreenImageChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_LockScreenImageChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, #[cfg(feature="windows-storage")] fn get_LockScreenImage(&self, out: *mut *mut super::super::storage::streams::IRandomAccessStream) -> HRESULT, - fn add_BadgesChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_BadgesChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_Badges(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn add_DetailTextChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DetailTextChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_DetailText(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn add_AlarmIconChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AlarmIconChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_BadgesChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_BadgesChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn get_Badges(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn add_DetailTextChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DetailTextChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn get_DetailText(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn add_AlarmIconChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AlarmIconChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, #[cfg(feature="windows-storage")] fn get_AlarmIcon(&self, out: *mut *mut super::super::storage::streams::IRandomAccessStream) -> HRESULT }} impl ILockScreenInfo { - #[inline] pub unsafe fn add_lock_screen_image_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_lock_screen_image_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_LockScreenImageChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_lock_screen_image_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_lock_screen_image_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_LockScreenImageChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_lock_screen_image(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_lock_screen_image(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LockScreenImage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_badges_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_badges_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_BadgesChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_badges_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_badges_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_BadgesChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_badges(&self) -> Result>> { + }} + #[inline] pub fn get_badges(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Badges)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_detail_text_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_detail_text_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DetailTextChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_detail_text_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_detail_text_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DetailTextChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_detail_text(&self) -> Result>> { + }} + #[inline] pub fn get_detail_text(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DetailText)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_alarm_icon_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_alarm_icon_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AlarmIconChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_alarm_icon_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_alarm_icon_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AlarmIconChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_alarm_icon(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_alarm_icon(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AlarmIcon)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class LockScreenInfo: ILockScreenInfo} DEFINE_IID!(IID_ILockScreenUnlockingDeferral, 2122128086, 20995, 17383, 155, 214, 124, 57, 71, 209, 227, 254); @@ -22519,28 +22519,28 @@ RT_INTERFACE!{interface ILockScreenUnlockingDeferral(ILockScreenUnlockingDeferra fn Complete(&self) -> HRESULT }} impl ILockScreenUnlockingDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class LockScreenUnlockingDeferral: ILockScreenUnlockingDeferral} 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(&self, out: *mut *mut LockScreenUnlockingDeferral) -> HRESULT, - fn get_Deadline(&self, out: *mut super::super::foundation::DateTime) -> HRESULT + fn get_Deadline(&self, out: *mut foundation::DateTime) -> HRESULT }} impl ILockScreenUnlockingEventArgs { - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deadline(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deadline(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Deadline)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class LockScreenUnlockingEventArgs: ILockScreenUnlockingEventArgs} } // Windows.ApplicationModel.LockScreen @@ -22550,8 +22550,8 @@ DEFINE_IID!(IID_IPaymentAddress, 1596089577, 28474, 16742, 160, 24, 10, 11, 6, 1 RT_INTERFACE!{interface IPaymentAddress(IPaymentAddressVtbl): IInspectable(IInspectableVtbl) [IID_IPaymentAddress] { fn get_Country(&self, out: *mut HSTRING) -> HRESULT, fn put_Country(&self, value: HSTRING) -> HRESULT, - fn get_AddressLines(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn put_AddressLines(&self, value: *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_AddressLines(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn put_AddressLines(&self, value: *mut foundation::collections::IVectorView) -> HRESULT, fn get_Region(&self, out: *mut HSTRING) -> HRESULT, fn put_Region(&self, value: HSTRING) -> HRESULT, fn get_City(&self, out: *mut HSTRING) -> HRESULT, @@ -22570,113 +22570,113 @@ RT_INTERFACE!{interface IPaymentAddress(IPaymentAddressVtbl): IInspectable(IInsp fn put_Recipient(&self, value: HSTRING) -> HRESULT, fn get_PhoneNumber(&self, out: *mut HSTRING) -> HRESULT, fn put_PhoneNumber(&self, value: HSTRING) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT + fn get_Properties(&self, out: *mut *mut foundation::collections::ValueSet) -> HRESULT }} impl IPaymentAddress { - #[inline] pub unsafe fn get_country(&self) -> Result { + #[inline] pub fn get_country(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Country)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_country(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_country(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Country)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_address_lines(&self) -> Result>> { + }} + #[inline] pub fn get_address_lines(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AddressLines)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_address_lines(&self, value: &super::super::foundation::collections::IVectorView) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_address_lines(&self, value: &foundation::collections::IVectorView) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AddressLines)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_region(&self) -> Result { + }} + #[inline] pub fn get_region(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Region)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_region(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_region(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Region)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_city(&self) -> Result { + }} + #[inline] pub fn get_city(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_City)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_city(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_city(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_City)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_dependent_locality(&self) -> Result { + }} + #[inline] pub fn get_dependent_locality(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DependentLocality)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_dependent_locality(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_dependent_locality(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DependentLocality)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_postal_code(&self) -> Result { + }} + #[inline] pub fn get_postal_code(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PostalCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_postal_code(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_postal_code(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PostalCode)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_sorting_code(&self) -> Result { + }} + #[inline] pub fn get_sorting_code(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SortingCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_sorting_code(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_sorting_code(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SortingCode)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_language_code(&self) -> Result { + }} + #[inline] pub fn get_language_code(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LanguageCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_language_code(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_language_code(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LanguageCode)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_organization(&self) -> Result { + }} + #[inline] pub fn get_organization(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Organization)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_organization(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_organization(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Organization)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_recipient(&self) -> Result { + }} + #[inline] pub fn get_recipient(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Recipient)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_recipient(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_recipient(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Recipient)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_phone_number(&self) -> Result { + }} + #[inline] pub fn get_phone_number(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PhoneNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_phone_number(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_phone_number(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PhoneNumber)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result> { + }} + #[inline] pub fn get_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PaymentAddress: IPaymentAddress} impl RtActivatable for PaymentAddress {} @@ -22686,18 +22686,18 @@ RT_INTERFACE!{interface IPaymentCanMakePaymentResult(IPaymentCanMakePaymentResul fn get_Status(&self, out: *mut PaymentCanMakePaymentResultStatus) -> HRESULT }} impl IPaymentCanMakePaymentResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PaymentCanMakePaymentResult: IPaymentCanMakePaymentResult} impl RtActivatable for PaymentCanMakePaymentResult {} impl PaymentCanMakePaymentResult { - #[inline] pub fn create(value: PaymentCanMakePaymentResultStatus) -> Result> { unsafe { + #[inline] pub fn create(value: PaymentCanMakePaymentResultStatus) -> Result> { >::get_activation_factory().create(value) - }} + } } DEFINE_CLSID!(PaymentCanMakePaymentResult(&[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,121,109,101,110,116,115,46,80,97,121,109,101,110,116,67,97,110,77,97,107,101,80,97,121,109,101,110,116,82,101,115,117,108,116,0]) [CLSID_PaymentCanMakePaymentResult]); DEFINE_IID!(IID_IPaymentCanMakePaymentResultFactory, 3151800894, 32073, 20329, 170, 83, 42, 15, 129, 100, 183, 201); @@ -22705,11 +22705,11 @@ RT_INTERFACE!{static interface IPaymentCanMakePaymentResultFactory(IPaymentCanMa fn Create(&self, value: PaymentCanMakePaymentResultStatus, out: *mut *mut PaymentCanMakePaymentResult) -> HRESULT }} impl IPaymentCanMakePaymentResultFactory { - #[inline] pub unsafe fn create(&self, value: PaymentCanMakePaymentResultStatus) -> Result> { + #[inline] pub fn create(&self, value: PaymentCanMakePaymentResultStatus) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, value, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum PaymentCanMakePaymentResultStatus: i32 { Unknown (PaymentCanMakePaymentResultStatus_Unknown) = 0, Yes (PaymentCanMakePaymentResultStatus_Yes) = 1, No (PaymentCanMakePaymentResultStatus_No) = 2, NotAllowed (PaymentCanMakePaymentResultStatus_NotAllowed) = 3, UserNotSignedIn (PaymentCanMakePaymentResultStatus_UserNotSignedIn) = 4, SpecifiedPaymentMethodIdsNotSupported (PaymentCanMakePaymentResultStatus_SpecifiedPaymentMethodIdsNotSupported) = 5, NoQualifyingCardOnFile (PaymentCanMakePaymentResultStatus_NoQualifyingCardOnFile) = 6, @@ -22724,43 +22724,43 @@ RT_INTERFACE!{interface IPaymentCurrencyAmount(IPaymentCurrencyAmountVtbl): IIns fn put_Value(&self, value: HSTRING) -> HRESULT }} impl IPaymentCurrencyAmount { - #[inline] pub unsafe fn get_currency(&self) -> Result { + #[inline] pub fn get_currency(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Currency)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_currency(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_currency(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Currency)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_currency_system(&self) -> Result { + }} + #[inline] pub fn get_currency_system(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CurrencySystem)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_currency_system(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_currency_system(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CurrencySystem)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result { + }} + #[inline] pub fn get_value(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_value(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_value(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Value)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PaymentCurrencyAmount: IPaymentCurrencyAmount} impl RtActivatable for PaymentCurrencyAmount {} impl PaymentCurrencyAmount { - #[inline] pub fn create(value: &HStringArg, currency: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(value: &HStringArg, currency: &HStringArg) -> Result> { >::get_activation_factory().create(value, currency) - }} - #[inline] pub fn create_with_currency_system(value: &HStringArg, currency: &HStringArg, currencySystem: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_with_currency_system(value: &HStringArg, currency: &HStringArg, currencySystem: &HStringArg) -> Result> { >::get_activation_factory().create_with_currency_system(value, currency, currencySystem) - }} + } } DEFINE_CLSID!(PaymentCurrencyAmount(&[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,121,109,101,110,116,115,46,80,97,121,109,101,110,116,67,117,114,114,101,110,99,121,65,109,111,117,110,116,0]) [CLSID_PaymentCurrencyAmount]); DEFINE_IID!(IID_IPaymentCurrencyAmountFactory, 844616504, 5132, 17781, 133, 53, 247, 115, 23, 140, 9, 167); @@ -22769,160 +22769,160 @@ RT_INTERFACE!{static interface IPaymentCurrencyAmountFactory(IPaymentCurrencyAmo fn CreateWithCurrencySystem(&self, value: HSTRING, currency: HSTRING, currencySystem: HSTRING, out: *mut *mut PaymentCurrencyAmount) -> HRESULT }} impl IPaymentCurrencyAmountFactory { - #[inline] pub unsafe fn create(&self, value: &HStringArg, currency: &HStringArg) -> Result> { + #[inline] pub fn create(&self, value: &HStringArg, currency: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, value.get(), currency.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_currency_system(&self, value: &HStringArg, currency: &HStringArg, currencySystem: &HStringArg) -> Result> { + }} + #[inline] pub fn create_with_currency_system(&self, value: &HStringArg, currency: &HStringArg, currencySystem: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithCurrencySystem)(self as *const _ as *mut _, value.get(), currency.get(), currencySystem.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IPaymentDetails, 1404775805, 57579, 16467, 142, 174, 206, 124, 72, 224, 41, 69); RT_INTERFACE!{interface IPaymentDetails(IPaymentDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IPaymentDetails] { fn get_Total(&self, out: *mut *mut PaymentItem) -> HRESULT, fn put_Total(&self, value: *mut PaymentItem) -> HRESULT, - fn get_DisplayItems(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn put_DisplayItems(&self, value: *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_ShippingOptions(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn put_ShippingOptions(&self, value: *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_Modifiers(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn put_Modifiers(&self, value: *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_DisplayItems(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn put_DisplayItems(&self, value: *mut foundation::collections::IVectorView) -> HRESULT, + fn get_ShippingOptions(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn put_ShippingOptions(&self, value: *mut foundation::collections::IVectorView) -> HRESULT, + fn get_Modifiers(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn put_Modifiers(&self, value: *mut foundation::collections::IVectorView) -> HRESULT }} impl IPaymentDetails { - #[inline] pub unsafe fn get_total(&self) -> Result> { + #[inline] pub fn get_total(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Total)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_total(&self, value: &PaymentItem) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_total(&self, value: &PaymentItem) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Total)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_items(&self) -> Result>> { + }} + #[inline] pub fn get_display_items(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayItems)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_items(&self, value: &super::super::foundation::collections::IVectorView) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_display_items(&self, value: &foundation::collections::IVectorView) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayItems)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_shipping_options(&self) -> Result>> { + }} + #[inline] pub fn get_shipping_options(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ShippingOptions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_shipping_options(&self, value: &super::super::foundation::collections::IVectorView) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_shipping_options(&self, value: &foundation::collections::IVectorView) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ShippingOptions)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_modifiers(&self) -> Result>> { + }} + #[inline] pub fn get_modifiers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Modifiers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_modifiers(&self, value: &super::super::foundation::collections::IVectorView) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_modifiers(&self, value: &foundation::collections::IVectorView) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Modifiers)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PaymentDetails: IPaymentDetails} impl RtActivatable for PaymentDetails {} impl RtActivatable for PaymentDetails {} impl PaymentDetails { - #[inline] pub fn create(total: &PaymentItem) -> Result> { unsafe { + #[inline] pub fn create(total: &PaymentItem) -> Result> { >::get_activation_factory().create(total) - }} - #[inline] pub fn create_with_display_items(total: &PaymentItem, displayItems: &super::super::foundation::collections::IIterable) -> Result> { unsafe { + } + #[inline] pub fn create_with_display_items(total: &PaymentItem, displayItems: &foundation::collections::IIterable) -> Result> { >::get_activation_factory().create_with_display_items(total, displayItems) - }} + } } DEFINE_CLSID!(PaymentDetails(&[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,121,109,101,110,116,115,46,80,97,121,109,101,110,116,68,101,116,97,105,108,115,0]) [CLSID_PaymentDetails]); DEFINE_IID!(IID_IPaymentDetailsFactory, 3488133102, 49386, 19617, 139, 199, 109, 230, 123, 31, 55, 99); RT_INTERFACE!{static interface IPaymentDetailsFactory(IPaymentDetailsFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPaymentDetailsFactory] { fn Create(&self, total: *mut PaymentItem, out: *mut *mut PaymentDetails) -> HRESULT, - fn CreateWithDisplayItems(&self, total: *mut PaymentItem, displayItems: *mut super::super::foundation::collections::IIterable, out: *mut *mut PaymentDetails) -> HRESULT + fn CreateWithDisplayItems(&self, total: *mut PaymentItem, displayItems: *mut foundation::collections::IIterable, out: *mut *mut PaymentDetails) -> HRESULT }} impl IPaymentDetailsFactory { - #[inline] pub unsafe fn create(&self, total: &PaymentItem) -> Result> { + #[inline] pub fn create(&self, total: &PaymentItem) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, total as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_display_items(&self, total: &PaymentItem, displayItems: &super::super::foundation::collections::IIterable) -> Result> { + }} + #[inline] pub fn create_with_display_items(&self, total: &PaymentItem, displayItems: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithDisplayItems)(self as *const _ as *mut _, total as *const _ as *mut _, displayItems as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IPaymentDetailsModifier, 3189538149, 17187, 16855, 179, 5, 223, 203, 118, 95, 105, 222); RT_INTERFACE!{interface IPaymentDetailsModifier(IPaymentDetailsModifierVtbl): IInspectable(IInspectableVtbl) [IID_IPaymentDetailsModifier] { fn get_JsonData(&self, out: *mut HSTRING) -> HRESULT, - fn get_SupportedMethodIds(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedMethodIds(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_Total(&self, out: *mut *mut PaymentItem) -> HRESULT, - fn get_AdditionalDisplayItems(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_AdditionalDisplayItems(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IPaymentDetailsModifier { - #[inline] pub unsafe fn get_json_data(&self) -> Result { + #[inline] pub fn get_json_data(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_JsonData)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_method_ids(&self) -> Result>> { + }} + #[inline] pub fn get_supported_method_ids(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedMethodIds)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_total(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_total(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Total)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_additional_display_items(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_additional_display_items(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AdditionalDisplayItems)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PaymentDetailsModifier: IPaymentDetailsModifier} impl RtActivatable for PaymentDetailsModifier {} impl PaymentDetailsModifier { - #[inline] pub fn create(supportedMethodIds: &super::super::foundation::collections::IIterable, total: &PaymentItem) -> Result> { unsafe { + #[inline] pub fn create(supportedMethodIds: &foundation::collections::IIterable, total: &PaymentItem) -> Result> { >::get_activation_factory().create(supportedMethodIds, total) - }} - #[inline] pub fn create_with_additional_display_items(supportedMethodIds: &super::super::foundation::collections::IIterable, total: &PaymentItem, additionalDisplayItems: &super::super::foundation::collections::IIterable) -> Result> { unsafe { + } + #[inline] pub fn create_with_additional_display_items(supportedMethodIds: &foundation::collections::IIterable, total: &PaymentItem, additionalDisplayItems: &foundation::collections::IIterable) -> Result> { >::get_activation_factory().create_with_additional_display_items(supportedMethodIds, total, additionalDisplayItems) - }} - #[inline] pub fn create_with_additional_display_items_and_json_data(supportedMethodIds: &super::super::foundation::collections::IIterable, total: &PaymentItem, additionalDisplayItems: &super::super::foundation::collections::IIterable, jsonData: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_with_additional_display_items_and_json_data(supportedMethodIds: &foundation::collections::IIterable, total: &PaymentItem, additionalDisplayItems: &foundation::collections::IIterable, jsonData: &HStringArg) -> Result> { >::get_activation_factory().create_with_additional_display_items_and_json_data(supportedMethodIds, total, additionalDisplayItems, jsonData) - }} + } } DEFINE_CLSID!(PaymentDetailsModifier(&[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,121,109,101,110,116,115,46,80,97,121,109,101,110,116,68,101,116,97,105,108,115,77,111,100,105,102,105,101,114,0]) [CLSID_PaymentDetailsModifier]); DEFINE_IID!(IID_IPaymentDetailsModifierFactory, 2030064262, 21726, 17052, 158, 79, 93, 206, 110, 16, 235, 206); RT_INTERFACE!{static interface IPaymentDetailsModifierFactory(IPaymentDetailsModifierFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPaymentDetailsModifierFactory] { - fn Create(&self, supportedMethodIds: *mut super::super::foundation::collections::IIterable, total: *mut PaymentItem, out: *mut *mut PaymentDetailsModifier) -> HRESULT, - fn CreateWithAdditionalDisplayItems(&self, supportedMethodIds: *mut super::super::foundation::collections::IIterable, total: *mut PaymentItem, additionalDisplayItems: *mut super::super::foundation::collections::IIterable, out: *mut *mut PaymentDetailsModifier) -> HRESULT, - fn CreateWithAdditionalDisplayItemsAndJsonData(&self, supportedMethodIds: *mut super::super::foundation::collections::IIterable, total: *mut PaymentItem, additionalDisplayItems: *mut super::super::foundation::collections::IIterable, jsonData: HSTRING, out: *mut *mut PaymentDetailsModifier) -> HRESULT + fn Create(&self, supportedMethodIds: *mut foundation::collections::IIterable, total: *mut PaymentItem, out: *mut *mut PaymentDetailsModifier) -> HRESULT, + fn CreateWithAdditionalDisplayItems(&self, supportedMethodIds: *mut foundation::collections::IIterable, total: *mut PaymentItem, additionalDisplayItems: *mut foundation::collections::IIterable, out: *mut *mut PaymentDetailsModifier) -> HRESULT, + fn CreateWithAdditionalDisplayItemsAndJsonData(&self, supportedMethodIds: *mut foundation::collections::IIterable, total: *mut PaymentItem, additionalDisplayItems: *mut foundation::collections::IIterable, jsonData: HSTRING, out: *mut *mut PaymentDetailsModifier) -> HRESULT }} impl IPaymentDetailsModifierFactory { - #[inline] pub unsafe fn create(&self, supportedMethodIds: &super::super::foundation::collections::IIterable, total: &PaymentItem) -> Result> { + #[inline] pub fn create(&self, supportedMethodIds: &foundation::collections::IIterable, total: &PaymentItem) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, supportedMethodIds as *const _ as *mut _, total as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_additional_display_items(&self, supportedMethodIds: &super::super::foundation::collections::IIterable, total: &PaymentItem, additionalDisplayItems: &super::super::foundation::collections::IIterable) -> Result> { + }} + #[inline] pub fn create_with_additional_display_items(&self, supportedMethodIds: &foundation::collections::IIterable, total: &PaymentItem, additionalDisplayItems: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithAdditionalDisplayItems)(self as *const _ as *mut _, supportedMethodIds as *const _ as *mut _, total as *const _ as *mut _, additionalDisplayItems as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_additional_display_items_and_json_data(&self, supportedMethodIds: &super::super::foundation::collections::IIterable, total: &PaymentItem, additionalDisplayItems: &super::super::foundation::collections::IIterable, jsonData: &HStringArg) -> Result> { + }} + #[inline] pub fn create_with_additional_display_items_and_json_data(&self, supportedMethodIds: &foundation::collections::IIterable, total: &PaymentItem, additionalDisplayItems: &foundation::collections::IIterable, jsonData: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithAdditionalDisplayItemsAndJsonData)(self as *const _ as *mut _, supportedMethodIds as *const _ as *mut _, total as *const _ as *mut _, additionalDisplayItems as *const _ as *mut _, jsonData.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IPaymentItem, 1750780043, 31154, 19318, 158, 3, 168, 118, 34, 61, 254, 114); RT_INTERFACE!{interface IPaymentItem(IPaymentItemVtbl): IInspectable(IInspectableVtbl) [IID_IPaymentItem] { @@ -22934,40 +22934,40 @@ RT_INTERFACE!{interface IPaymentItem(IPaymentItemVtbl): IInspectable(IInspectabl fn put_Pending(&self, value: bool) -> HRESULT }} impl IPaymentItem { - #[inline] pub unsafe fn get_label(&self) -> Result { + #[inline] pub fn get_label(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Label)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_label(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_label(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Label)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_amount(&self) -> Result> { + }} + #[inline] pub fn get_amount(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Amount)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_amount(&self, value: &PaymentCurrencyAmount) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_amount(&self, value: &PaymentCurrencyAmount) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Amount)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_pending(&self) -> Result { + }} + #[inline] pub fn get_pending(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Pending)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_pending(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_pending(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Pending)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PaymentItem: IPaymentItem} impl RtActivatable for PaymentItem {} impl PaymentItem { - #[inline] pub fn create(label: &HStringArg, amount: &PaymentCurrencyAmount) -> Result> { unsafe { + #[inline] pub fn create(label: &HStringArg, amount: &PaymentCurrencyAmount) -> Result> { >::get_activation_factory().create(label, amount) - }} + } } DEFINE_CLSID!(PaymentItem(&[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,121,109,101,110,116,115,46,80,97,121,109,101,110,116,73,116,101,109,0]) [CLSID_PaymentItem]); DEFINE_IID!(IID_IPaymentItemFactory, 3333126872, 9475, 19741, 167, 120, 2, 178, 229, 146, 123, 44); @@ -22975,130 +22975,130 @@ RT_INTERFACE!{static interface IPaymentItemFactory(IPaymentItemFactoryVtbl): IIn fn Create(&self, label: HSTRING, amount: *mut PaymentCurrencyAmount, out: *mut *mut PaymentItem) -> HRESULT }} impl IPaymentItemFactory { - #[inline] pub unsafe fn create(&self, label: &HStringArg, amount: &PaymentCurrencyAmount) -> Result> { + #[inline] pub fn create(&self, label: &HStringArg, amount: &PaymentCurrencyAmount) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, label.get(), amount as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IPaymentMediator, 4212058153, 60428, 17562, 131, 218, 122, 227, 7, 51, 101, 162); RT_INTERFACE!{interface IPaymentMediator(IPaymentMediatorVtbl): IInspectable(IInspectableVtbl) [IID_IPaymentMediator] { - fn GetSupportedMethodIdsAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn SubmitPaymentRequestAsync(&self, paymentRequest: *mut PaymentRequest, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn SubmitPaymentRequestWithChangeHandlerAsync(&self, paymentRequest: *mut PaymentRequest, changeHandler: *mut PaymentRequestChangedHandler, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetSupportedMethodIdsAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn SubmitPaymentRequestAsync(&self, paymentRequest: *mut PaymentRequest, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn SubmitPaymentRequestWithChangeHandlerAsync(&self, paymentRequest: *mut PaymentRequest, changeHandler: *mut PaymentRequestChangedHandler, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IPaymentMediator { - #[inline] pub unsafe fn get_supported_method_ids_async(&self) -> Result>>> { + #[inline] pub fn get_supported_method_ids_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSupportedMethodIdsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn submit_payment_request_async(&self, paymentRequest: &PaymentRequest) -> Result>> { + }} + #[inline] pub fn submit_payment_request_async(&self, paymentRequest: &PaymentRequest) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SubmitPaymentRequestAsync)(self as *const _ as *mut _, paymentRequest as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn submit_payment_request_with_change_handler_async(&self, paymentRequest: &PaymentRequest, changeHandler: &PaymentRequestChangedHandler) -> Result>> { + }} + #[inline] pub fn submit_payment_request_with_change_handler_async(&self, paymentRequest: &PaymentRequest, changeHandler: &PaymentRequestChangedHandler) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SubmitPaymentRequestWithChangeHandlerAsync)(self as *const _ as *mut _, paymentRequest as *const _ as *mut _, changeHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PaymentMediator: IPaymentMediator} impl RtActivatable for PaymentMediator {} DEFINE_CLSID!(PaymentMediator(&[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,121,109,101,110,116,115,46,80,97,121,109,101,110,116,77,101,100,105,97,116,111,114,0]) [CLSID_PaymentMediator]); DEFINE_IID!(IID_IPaymentMediator2, 3471808753, 58375, 16680, 142, 115, 217, 61, 95, 130, 39, 134); RT_INTERFACE!{interface IPaymentMediator2(IPaymentMediator2Vtbl): IInspectable(IInspectableVtbl) [IID_IPaymentMediator2] { - fn CanMakePaymentAsync(&self, paymentRequest: *mut PaymentRequest, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn CanMakePaymentAsync(&self, paymentRequest: *mut PaymentRequest, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IPaymentMediator2 { - #[inline] pub unsafe fn can_make_payment_async(&self, paymentRequest: &PaymentRequest) -> Result>> { + #[inline] pub fn can_make_payment_async(&self, paymentRequest: &PaymentRequest) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CanMakePaymentAsync)(self as *const _ as *mut _, paymentRequest as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IPaymentMerchantInfo, 1665421392, 3732, 20182, 170, 203, 230, 1, 43, 211, 39, 167); RT_INTERFACE!{interface IPaymentMerchantInfo(IPaymentMerchantInfoVtbl): IInspectable(IInspectableVtbl) [IID_IPaymentMerchantInfo] { fn get_PackageFullName(&self, out: *mut HSTRING) -> HRESULT, - fn get_Uri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT + fn get_Uri(&self, out: *mut *mut foundation::Uri) -> HRESULT }} impl IPaymentMerchantInfo { - #[inline] pub unsafe fn get_package_full_name(&self) -> Result { + #[inline] pub fn get_package_full_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PackageFullName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_uri(&self) -> Result> { + }} + #[inline] pub fn get_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Uri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PaymentMerchantInfo: IPaymentMerchantInfo} impl RtActivatable for PaymentMerchantInfo {} impl RtActivatable for PaymentMerchantInfo {} impl PaymentMerchantInfo { - #[inline] pub fn create(uri: &super::super::foundation::Uri) -> Result> { unsafe { + #[inline] pub fn create(uri: &foundation::Uri) -> Result> { >::get_activation_factory().create(uri) - }} + } } DEFINE_CLSID!(PaymentMerchantInfo(&[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,121,109,101,110,116,115,46,80,97,121,109,101,110,116,77,101,114,99,104,97,110,116,73,110,102,111,0]) [CLSID_PaymentMerchantInfo]); DEFINE_IID!(IID_IPaymentMerchantInfoFactory, 2659831507, 52407, 16743, 168, 236, 225, 10, 233, 109, 188, 209); RT_INTERFACE!{static interface IPaymentMerchantInfoFactory(IPaymentMerchantInfoFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPaymentMerchantInfoFactory] { - fn Create(&self, uri: *mut super::super::foundation::Uri, out: *mut *mut PaymentMerchantInfo) -> HRESULT + fn Create(&self, uri: *mut foundation::Uri, out: *mut *mut PaymentMerchantInfo) -> HRESULT }} impl IPaymentMerchantInfoFactory { - #[inline] pub unsafe fn create(&self, uri: &super::super::foundation::Uri) -> Result> { + #[inline] pub fn create(&self, uri: &foundation::Uri) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, uri as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IPaymentMethodData, 3520318196, 56984, 16681, 177, 183, 195, 173, 134, 35, 123, 244); RT_INTERFACE!{interface IPaymentMethodData(IPaymentMethodDataVtbl): IInspectable(IInspectableVtbl) [IID_IPaymentMethodData] { - fn get_SupportedMethodIds(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedMethodIds(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_JsonData(&self, out: *mut HSTRING) -> HRESULT }} impl IPaymentMethodData { - #[inline] pub unsafe fn get_supported_method_ids(&self) -> Result>> { + #[inline] pub fn get_supported_method_ids(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedMethodIds)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_json_data(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_json_data(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_JsonData)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PaymentMethodData: IPaymentMethodData} impl RtActivatable for PaymentMethodData {} impl PaymentMethodData { - #[inline] pub fn create(supportedMethodIds: &super::super::foundation::collections::IIterable) -> Result> { unsafe { + #[inline] pub fn create(supportedMethodIds: &foundation::collections::IIterable) -> Result> { >::get_activation_factory().create(supportedMethodIds) - }} - #[inline] pub fn create_with_json_data(supportedMethodIds: &super::super::foundation::collections::IIterable, jsonData: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_with_json_data(supportedMethodIds: &foundation::collections::IIterable, jsonData: &HStringArg) -> Result> { >::get_activation_factory().create_with_json_data(supportedMethodIds, jsonData) - }} + } } DEFINE_CLSID!(PaymentMethodData(&[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,121,109,101,110,116,115,46,80,97,121,109,101,110,116,77,101,116,104,111,100,68,97,116,97,0]) [CLSID_PaymentMethodData]); DEFINE_IID!(IID_IPaymentMethodDataFactory, 2329793151, 39850, 19074, 131, 66, 168, 33, 9, 146, 163, 107); RT_INTERFACE!{static interface IPaymentMethodDataFactory(IPaymentMethodDataFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPaymentMethodDataFactory] { - fn Create(&self, supportedMethodIds: *mut super::super::foundation::collections::IIterable, out: *mut *mut PaymentMethodData) -> HRESULT, - fn CreateWithJsonData(&self, supportedMethodIds: *mut super::super::foundation::collections::IIterable, jsonData: HSTRING, out: *mut *mut PaymentMethodData) -> HRESULT + fn Create(&self, supportedMethodIds: *mut foundation::collections::IIterable, out: *mut *mut PaymentMethodData) -> HRESULT, + fn CreateWithJsonData(&self, supportedMethodIds: *mut foundation::collections::IIterable, jsonData: HSTRING, out: *mut *mut PaymentMethodData) -> HRESULT }} impl IPaymentMethodDataFactory { - #[inline] pub unsafe fn create(&self, supportedMethodIds: &super::super::foundation::collections::IIterable) -> Result> { + #[inline] pub fn create(&self, supportedMethodIds: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, supportedMethodIds as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_json_data(&self, supportedMethodIds: &super::super::foundation::collections::IIterable, jsonData: &HStringArg) -> Result> { + }} + #[inline] pub fn create_with_json_data(&self, supportedMethodIds: &foundation::collections::IIterable, jsonData: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithJsonData)(self as *const _ as *mut _, supportedMethodIds as *const _ as *mut _, jsonData.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum PaymentOptionPresence: i32 { None (PaymentOptionPresence_None) = 0, Optional (PaymentOptionPresence_Optional) = 1, Required (PaymentOptionPresence_Required) = 2, @@ -23117,51 +23117,51 @@ RT_INTERFACE!{interface IPaymentOptions(IPaymentOptionsVtbl): IInspectable(IInsp fn put_ShippingType(&self, value: PaymentShippingType) -> HRESULT }} impl IPaymentOptions { - #[inline] pub unsafe fn get_request_payer_email(&self) -> Result { + #[inline] pub fn get_request_payer_email(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RequestPayerEmail)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_request_payer_email(&self, value: PaymentOptionPresence) -> Result<()> { + }} + #[inline] pub fn set_request_payer_email(&self, value: PaymentOptionPresence) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RequestPayerEmail)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_request_payer_name(&self) -> Result { + }} + #[inline] pub fn get_request_payer_name(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RequestPayerName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_request_payer_name(&self, value: PaymentOptionPresence) -> Result<()> { + }} + #[inline] pub fn set_request_payer_name(&self, value: PaymentOptionPresence) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RequestPayerName)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_request_payer_phone_number(&self) -> Result { + }} + #[inline] pub fn get_request_payer_phone_number(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RequestPayerPhoneNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_request_payer_phone_number(&self, value: PaymentOptionPresence) -> Result<()> { + }} + #[inline] pub fn set_request_payer_phone_number(&self, value: PaymentOptionPresence) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RequestPayerPhoneNumber)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_request_shipping(&self) -> Result { + }} + #[inline] pub fn get_request_shipping(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RequestShipping)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_request_shipping(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_request_shipping(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RequestShipping)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_shipping_type(&self) -> Result { + }} + #[inline] pub fn get_shipping_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ShippingType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_shipping_type(&self, value: PaymentShippingType) -> Result<()> { + }} + #[inline] pub fn set_shipping_type(&self, value: PaymentShippingType) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ShippingType)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PaymentOptions: IPaymentOptions} impl RtActivatable for PaymentOptions {} @@ -23170,47 +23170,47 @@ DEFINE_IID!(IID_IPaymentRequest, 3075031777, 60795, 18411, 188, 8, 120, 204, 93, RT_INTERFACE!{interface IPaymentRequest(IPaymentRequestVtbl): IInspectable(IInspectableVtbl) [IID_IPaymentRequest] { fn get_MerchantInfo(&self, out: *mut *mut PaymentMerchantInfo) -> HRESULT, fn get_Details(&self, out: *mut *mut PaymentDetails) -> HRESULT, - fn get_MethodData(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_MethodData(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_Options(&self, out: *mut *mut PaymentOptions) -> HRESULT }} impl IPaymentRequest { - #[inline] pub unsafe fn get_merchant_info(&self) -> Result> { + #[inline] pub fn get_merchant_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MerchantInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_details(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_details(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Details)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_method_data(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_method_data(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MethodData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_options(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_options(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Options)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PaymentRequest: IPaymentRequest} impl RtActivatable for PaymentRequest {} impl RtActivatable for PaymentRequest {} impl PaymentRequest { - #[inline] pub fn create(details: &PaymentDetails, methodData: &super::super::foundation::collections::IIterable) -> Result> { unsafe { + #[inline] pub fn create(details: &PaymentDetails, methodData: &foundation::collections::IIterable) -> Result> { >::get_activation_factory().create(details, methodData) - }} - #[inline] pub fn create_with_merchant_info(details: &PaymentDetails, methodData: &super::super::foundation::collections::IIterable, merchantInfo: &PaymentMerchantInfo) -> Result> { unsafe { + } + #[inline] pub fn create_with_merchant_info(details: &PaymentDetails, methodData: &foundation::collections::IIterable, merchantInfo: &PaymentMerchantInfo) -> Result> { >::get_activation_factory().create_with_merchant_info(details, methodData, merchantInfo) - }} - #[inline] pub fn create_with_merchant_info_and_options(details: &PaymentDetails, methodData: &super::super::foundation::collections::IIterable, merchantInfo: &PaymentMerchantInfo, options: &PaymentOptions) -> Result> { unsafe { + } + #[inline] pub fn create_with_merchant_info_and_options(details: &PaymentDetails, methodData: &foundation::collections::IIterable, merchantInfo: &PaymentMerchantInfo, options: &PaymentOptions) -> Result> { >::get_activation_factory().create_with_merchant_info_and_options(details, methodData, merchantInfo, options) - }} - #[inline] pub fn create_with_merchant_info_options_and_id(details: &PaymentDetails, methodData: &super::super::foundation::collections::IIterable, merchantInfo: &PaymentMerchantInfo, options: &PaymentOptions, id: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_with_merchant_info_options_and_id(details: &PaymentDetails, methodData: &foundation::collections::IIterable, merchantInfo: &PaymentMerchantInfo, options: &PaymentOptions, id: &HStringArg) -> Result> { >::get_activation_factory().create_with_merchant_info_options_and_id(details, methodData, merchantInfo, options, id) - }} + } } DEFINE_CLSID!(PaymentRequest(&[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,121,109,101,110,116,115,46,80,97,121,109,101,110,116,82,101,113,117,101,115,116,0]) [CLSID_PaymentRequest]); DEFINE_IID!(IID_IPaymentRequest2, 3057438645, 22936, 18750, 160, 76, 103, 4, 138, 80, 241, 65); @@ -23218,11 +23218,11 @@ RT_INTERFACE!{interface IPaymentRequest2(IPaymentRequest2Vtbl): IInspectable(IIn fn get_Id(&self, out: *mut HSTRING) -> HRESULT }} impl IPaymentRequest2 { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IPaymentRequestChangedArgs, 3323223620, 52619, 19428, 181, 85, 39, 201, 145, 148, 192, 197); RT_INTERFACE!{interface IPaymentRequestChangedArgs(IPaymentRequestChangedArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPaymentRequestChangedArgs] { @@ -23232,25 +23232,25 @@ RT_INTERFACE!{interface IPaymentRequestChangedArgs(IPaymentRequestChangedArgsVtb fn Acknowledge(&self, changeResult: *mut PaymentRequestChangedResult) -> HRESULT }} impl IPaymentRequestChangedArgs { - #[inline] pub unsafe fn get_change_kind(&self) -> Result { + #[inline] pub fn get_change_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ChangeKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_shipping_address(&self) -> Result> { + }} + #[inline] pub fn get_shipping_address(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ShippingAddress)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_selected_shipping_option(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_selected_shipping_option(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SelectedShippingOption)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn acknowledge(&self, changeResult: &PaymentRequestChangedResult) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn acknowledge(&self, changeResult: &PaymentRequestChangedResult) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Acknowledge)(self as *const _ as *mut _, changeResult as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PaymentRequestChangedArgs: IPaymentRequestChangedArgs} DEFINE_IID!(IID_PaymentRequestChangedHandler, 1350089185, 62360, 20268, 162, 126, 148, 211, 113, 207, 108, 125); @@ -23258,10 +23258,10 @@ RT_DELEGATE!{delegate PaymentRequestChangedHandler(PaymentRequestChangedHandlerV fn Invoke(&self, paymentRequest: *mut PaymentRequest, args: *mut PaymentRequestChangedArgs) -> HRESULT }} impl PaymentRequestChangedHandler { - #[inline] pub unsafe fn invoke(&self, paymentRequest: &PaymentRequest, args: &PaymentRequestChangedArgs) -> Result<()> { + #[inline] pub fn invoke(&self, paymentRequest: &PaymentRequest, args: &PaymentRequestChangedArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, paymentRequest as *const _ as *mut _, args as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IPaymentRequestChangedResult, 3748240988, 5828, 18349, 148, 1, 132, 64, 236, 7, 87, 219); RT_INTERFACE!{interface IPaymentRequestChangedResult(IPaymentRequestChangedResultVtbl): IInspectable(IInspectableVtbl) [IID_IPaymentRequestChangedResult] { @@ -23273,43 +23273,43 @@ RT_INTERFACE!{interface IPaymentRequestChangedResult(IPaymentRequestChangedResul fn put_UpdatedPaymentDetails(&self, value: *mut PaymentDetails) -> HRESULT }} impl IPaymentRequestChangedResult { - #[inline] pub unsafe fn get_change_accepted_by_merchant(&self) -> Result { + #[inline] pub fn get_change_accepted_by_merchant(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ChangeAcceptedByMerchant)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_change_accepted_by_merchant(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_change_accepted_by_merchant(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ChangeAcceptedByMerchant)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_message(&self) -> Result { + }} + #[inline] pub fn get_message(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Message)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_message(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_message(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Message)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_updated_payment_details(&self) -> Result> { + }} + #[inline] pub fn get_updated_payment_details(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UpdatedPaymentDetails)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_updated_payment_details(&self, value: &PaymentDetails) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_updated_payment_details(&self, value: &PaymentDetails) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_UpdatedPaymentDetails)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PaymentRequestChangedResult: IPaymentRequestChangedResult} impl RtActivatable for PaymentRequestChangedResult {} impl PaymentRequestChangedResult { - #[inline] pub fn create(changeAcceptedByMerchant: bool) -> Result> { unsafe { + #[inline] pub fn create(changeAcceptedByMerchant: bool) -> Result> { >::get_activation_factory().create(changeAcceptedByMerchant) - }} - #[inline] pub fn create_with_payment_details(changeAcceptedByMerchant: bool, updatedPaymentDetails: &PaymentDetails) -> Result> { unsafe { + } + #[inline] pub fn create_with_payment_details(changeAcceptedByMerchant: bool, updatedPaymentDetails: &PaymentDetails) -> Result> { >::get_activation_factory().create_with_payment_details(changeAcceptedByMerchant, updatedPaymentDetails) - }} + } } DEFINE_CLSID!(PaymentRequestChangedResult(&[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,121,109,101,110,116,115,46,80,97,121,109,101,110,116,82,101,113,117,101,115,116,67,104,97,110,103,101,100,82,101,115,117,108,116,0]) [CLSID_PaymentRequestChangedResult]); DEFINE_IID!(IID_IPaymentRequestChangedResultFactory, 141823830, 7475, 17457, 129, 75, 103, 234, 36, 191, 33, 219); @@ -23318,16 +23318,16 @@ RT_INTERFACE!{static interface IPaymentRequestChangedResultFactory(IPaymentReque fn CreateWithPaymentDetails(&self, changeAcceptedByMerchant: bool, updatedPaymentDetails: *mut PaymentDetails, out: *mut *mut PaymentRequestChangedResult) -> HRESULT }} impl IPaymentRequestChangedResultFactory { - #[inline] pub unsafe fn create(&self, changeAcceptedByMerchant: bool) -> Result> { + #[inline] pub fn create(&self, changeAcceptedByMerchant: bool) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, changeAcceptedByMerchant, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_payment_details(&self, changeAcceptedByMerchant: bool, updatedPaymentDetails: &PaymentDetails) -> Result> { + }} + #[inline] pub fn create_with_payment_details(&self, changeAcceptedByMerchant: bool, updatedPaymentDetails: &PaymentDetails) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithPaymentDetails)(self as *const _ as *mut _, changeAcceptedByMerchant, updatedPaymentDetails as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum PaymentRequestChangeKind: i32 { ShippingOption (PaymentRequestChangeKind_ShippingOption) = 0, ShippingAddress (PaymentRequestChangeKind_ShippingAddress) = 1, @@ -23337,37 +23337,37 @@ RT_ENUM! { enum PaymentRequestCompletionStatus: i32 { }} DEFINE_IID!(IID_IPaymentRequestFactory, 1049262556, 27508, 17107, 177, 3, 240, 222, 53, 251, 24, 72); RT_INTERFACE!{static interface IPaymentRequestFactory(IPaymentRequestFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IPaymentRequestFactory] { - fn Create(&self, details: *mut PaymentDetails, methodData: *mut super::super::foundation::collections::IIterable, out: *mut *mut PaymentRequest) -> HRESULT, - fn CreateWithMerchantInfo(&self, details: *mut PaymentDetails, methodData: *mut super::super::foundation::collections::IIterable, merchantInfo: *mut PaymentMerchantInfo, out: *mut *mut PaymentRequest) -> HRESULT, - fn CreateWithMerchantInfoAndOptions(&self, details: *mut PaymentDetails, methodData: *mut super::super::foundation::collections::IIterable, merchantInfo: *mut PaymentMerchantInfo, options: *mut PaymentOptions, out: *mut *mut PaymentRequest) -> HRESULT + fn Create(&self, details: *mut PaymentDetails, methodData: *mut foundation::collections::IIterable, out: *mut *mut PaymentRequest) -> HRESULT, + fn CreateWithMerchantInfo(&self, details: *mut PaymentDetails, methodData: *mut foundation::collections::IIterable, merchantInfo: *mut PaymentMerchantInfo, out: *mut *mut PaymentRequest) -> HRESULT, + fn CreateWithMerchantInfoAndOptions(&self, details: *mut PaymentDetails, methodData: *mut foundation::collections::IIterable, merchantInfo: *mut PaymentMerchantInfo, options: *mut PaymentOptions, out: *mut *mut PaymentRequest) -> HRESULT }} impl IPaymentRequestFactory { - #[inline] pub unsafe fn create(&self, details: &PaymentDetails, methodData: &super::super::foundation::collections::IIterable) -> Result> { + #[inline] pub fn create(&self, details: &PaymentDetails, methodData: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, details as *const _ as *mut _, methodData as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_merchant_info(&self, details: &PaymentDetails, methodData: &super::super::foundation::collections::IIterable, merchantInfo: &PaymentMerchantInfo) -> Result> { + }} + #[inline] pub fn create_with_merchant_info(&self, details: &PaymentDetails, methodData: &foundation::collections::IIterable, merchantInfo: &PaymentMerchantInfo) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithMerchantInfo)(self as *const _ as *mut _, details as *const _ as *mut _, methodData as *const _ as *mut _, merchantInfo as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_merchant_info_and_options(&self, details: &PaymentDetails, methodData: &super::super::foundation::collections::IIterable, merchantInfo: &PaymentMerchantInfo, options: &PaymentOptions) -> Result> { + }} + #[inline] pub fn create_with_merchant_info_and_options(&self, details: &PaymentDetails, methodData: &foundation::collections::IIterable, merchantInfo: &PaymentMerchantInfo, options: &PaymentOptions) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithMerchantInfoAndOptions)(self as *const _ as *mut _, details as *const _ as *mut _, methodData as *const _ as *mut _, merchantInfo 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_IPaymentRequestFactory2, 3872264997, 42246, 17266, 183, 239, 26, 3, 29, 86, 98, 209); RT_INTERFACE!{static interface IPaymentRequestFactory2(IPaymentRequestFactory2Vtbl): IInspectable(IInspectableVtbl) [IID_IPaymentRequestFactory2] { - fn CreateWithMerchantInfoOptionsAndId(&self, details: *mut PaymentDetails, methodData: *mut super::super::foundation::collections::IIterable, merchantInfo: *mut PaymentMerchantInfo, options: *mut PaymentOptions, id: HSTRING, out: *mut *mut PaymentRequest) -> HRESULT + fn CreateWithMerchantInfoOptionsAndId(&self, details: *mut PaymentDetails, methodData: *mut foundation::collections::IIterable, merchantInfo: *mut PaymentMerchantInfo, options: *mut PaymentOptions, id: HSTRING, out: *mut *mut PaymentRequest) -> HRESULT }} impl IPaymentRequestFactory2 { - #[inline] pub unsafe fn create_with_merchant_info_options_and_id(&self, details: &PaymentDetails, methodData: &super::super::foundation::collections::IIterable, merchantInfo: &PaymentMerchantInfo, options: &PaymentOptions, id: &HStringArg) -> Result> { + #[inline] pub fn create_with_merchant_info_options_and_id(&self, details: &PaymentDetails, methodData: &foundation::collections::IIterable, merchantInfo: &PaymentMerchantInfo, options: &PaymentOptions, id: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithMerchantInfoOptionsAndId)(self as *const _ as *mut _, details as *const _ as *mut _, methodData as *const _ as *mut _, merchantInfo as *const _ as *mut _, options as *const _ as *mut _, id.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum PaymentRequestStatus: i32 { Succeeded (PaymentRequestStatus_Succeeded) = 0, Failed (PaymentRequestStatus_Failed) = 1, Canceled (PaymentRequestStatus_Canceled) = 2, @@ -23378,16 +23378,16 @@ RT_INTERFACE!{interface IPaymentRequestSubmitResult(IPaymentRequestSubmitResultV fn get_Response(&self, out: *mut *mut PaymentResponse) -> HRESULT }} impl IPaymentRequestSubmitResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_response(&self) -> Result> { + }} + #[inline] pub fn get_response(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Response)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PaymentRequestSubmitResult: IPaymentRequestSubmitResult} DEFINE_IID!(IID_IPaymentResponse, 3778581591, 35794, 18568, 159, 168, 151, 152, 85, 69, 16, 142); @@ -23398,44 +23398,44 @@ RT_INTERFACE!{interface IPaymentResponse(IPaymentResponseVtbl): IInspectable(IIn fn get_PayerEmail(&self, out: *mut HSTRING) -> HRESULT, fn get_PayerName(&self, out: *mut HSTRING) -> HRESULT, fn get_PayerPhoneNumber(&self, out: *mut HSTRING) -> HRESULT, - fn CompleteAsync(&self, status: PaymentRequestCompletionStatus, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn CompleteAsync(&self, status: PaymentRequestCompletionStatus, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IPaymentResponse { - #[inline] pub unsafe fn get_payment_token(&self) -> Result> { + #[inline] pub fn get_payment_token(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PaymentToken)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_shipping_option(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_shipping_option(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ShippingOption)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_shipping_address(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_shipping_address(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ShippingAddress)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_payer_email(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_payer_email(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PayerEmail)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_payer_name(&self) -> Result { + }} + #[inline] pub fn get_payer_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PayerName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_payer_phone_number(&self) -> Result { + }} + #[inline] pub fn get_payer_phone_number(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PayerPhoneNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn complete_async(&self, status: PaymentRequestCompletionStatus) -> Result> { + }} + #[inline] pub fn complete_async(&self, status: PaymentRequestCompletionStatus) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CompleteAsync)(self as *const _ as *mut _, status, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PaymentResponse: IPaymentResponse} DEFINE_IID!(IID_IPaymentShippingOption, 322382554, 38739, 17780, 137, 102, 147, 20, 90, 118, 199, 249); @@ -23450,55 +23450,55 @@ RT_INTERFACE!{interface IPaymentShippingOption(IPaymentShippingOptionVtbl): IIns fn put_IsSelected(&self, value: bool) -> HRESULT }} impl IPaymentShippingOption { - #[inline] pub unsafe fn get_label(&self) -> Result { + #[inline] pub fn get_label(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Label)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_label(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_label(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Label)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_amount(&self) -> Result> { + }} + #[inline] pub fn get_amount(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Amount)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_amount(&self, value: &PaymentCurrencyAmount) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_amount(&self, value: &PaymentCurrencyAmount) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Amount)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_tag(&self) -> Result { + }} + #[inline] pub fn get_tag(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Tag)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_tag(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_tag(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Tag)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_selected(&self) -> Result { + }} + #[inline] pub fn get_is_selected(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSelected)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_selected(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_selected(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsSelected)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PaymentShippingOption: IPaymentShippingOption} impl RtActivatable for PaymentShippingOption {} impl PaymentShippingOption { - #[inline] pub fn create(label: &HStringArg, amount: &PaymentCurrencyAmount) -> Result> { unsafe { + #[inline] pub fn create(label: &HStringArg, amount: &PaymentCurrencyAmount) -> Result> { >::get_activation_factory().create(label, amount) - }} - #[inline] pub fn create_with_selected(label: &HStringArg, amount: &PaymentCurrencyAmount, selected: bool) -> Result> { unsafe { + } + #[inline] pub fn create_with_selected(label: &HStringArg, amount: &PaymentCurrencyAmount, selected: bool) -> Result> { >::get_activation_factory().create_with_selected(label, amount, selected) - }} - #[inline] pub fn create_with_selected_and_tag(label: &HStringArg, amount: &PaymentCurrencyAmount, selected: bool, tag: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_with_selected_and_tag(label: &HStringArg, amount: &PaymentCurrencyAmount, selected: bool, tag: &HStringArg) -> Result> { >::get_activation_factory().create_with_selected_and_tag(label, amount, selected, tag) - }} + } } DEFINE_CLSID!(PaymentShippingOption(&[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,121,109,101,110,116,115,46,80,97,121,109,101,110,116,83,104,105,112,112,105,110,103,79,112,116,105,111,110,0]) [CLSID_PaymentShippingOption]); DEFINE_IID!(IID_IPaymentShippingOptionFactory, 1575352599, 45783, 17515, 157, 115, 97, 35, 251, 202, 59, 198); @@ -23508,21 +23508,21 @@ RT_INTERFACE!{static interface IPaymentShippingOptionFactory(IPaymentShippingOpt fn CreateWithSelectedAndTag(&self, label: HSTRING, amount: *mut PaymentCurrencyAmount, selected: bool, tag: HSTRING, out: *mut *mut PaymentShippingOption) -> HRESULT }} impl IPaymentShippingOptionFactory { - #[inline] pub unsafe fn create(&self, label: &HStringArg, amount: &PaymentCurrencyAmount) -> Result> { + #[inline] pub fn create(&self, label: &HStringArg, amount: &PaymentCurrencyAmount) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, label.get(), amount as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_selected(&self, label: &HStringArg, amount: &PaymentCurrencyAmount, selected: bool) -> Result> { + }} + #[inline] pub fn create_with_selected(&self, label: &HStringArg, amount: &PaymentCurrencyAmount, selected: bool) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithSelected)(self as *const _ as *mut _, label.get(), amount as *const _ as *mut _, selected, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_selected_and_tag(&self, label: &HStringArg, amount: &PaymentCurrencyAmount, selected: bool, tag: &HStringArg) -> Result> { + }} + #[inline] pub fn create_with_selected_and_tag(&self, label: &HStringArg, amount: &PaymentCurrencyAmount, selected: bool, tag: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithSelectedAndTag)(self as *const _ as *mut _, label.get(), amount as *const _ as *mut _, selected, tag.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum PaymentShippingType: i32 { Shipping (PaymentShippingType_Shipping) = 0, Delivery (PaymentShippingType_Delivery) = 1, Pickup (PaymentShippingType_Pickup) = 2, @@ -23533,26 +23533,26 @@ RT_INTERFACE!{interface IPaymentToken(IPaymentTokenVtbl): IInspectable(IInspecta fn get_JsonDetails(&self, out: *mut HSTRING) -> HRESULT }} impl IPaymentToken { - #[inline] pub unsafe fn get_payment_method_id(&self) -> Result { + #[inline] pub fn get_payment_method_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PaymentMethodId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_json_details(&self) -> Result { + }} + #[inline] pub fn get_json_details(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_JsonDetails)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PaymentToken: IPaymentToken} impl RtActivatable for PaymentToken {} impl PaymentToken { - #[inline] pub fn create(paymentMethodId: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(paymentMethodId: &HStringArg) -> Result> { >::get_activation_factory().create(paymentMethodId) - }} - #[inline] pub fn create_with_json_details(paymentMethodId: &HStringArg, jsonDetails: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_with_json_details(paymentMethodId: &HStringArg, jsonDetails: &HStringArg) -> Result> { >::get_activation_factory().create_with_json_details(paymentMethodId, jsonDetails) - }} + } } DEFINE_CLSID!(PaymentToken(&[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,121,109,101,110,116,115,46,80,97,121,109,101,110,116,84,111,107,101,110,0]) [CLSID_PaymentToken]); DEFINE_IID!(IID_IPaymentTokenFactory, 2559367082, 18259, 18692, 131, 115, 221, 123, 8, 185, 149, 193); @@ -23561,16 +23561,16 @@ RT_INTERFACE!{static interface IPaymentTokenFactory(IPaymentTokenFactoryVtbl): I fn CreateWithJsonDetails(&self, paymentMethodId: HSTRING, jsonDetails: HSTRING, out: *mut *mut PaymentToken) -> HRESULT }} impl IPaymentTokenFactory { - #[inline] pub unsafe fn create(&self, paymentMethodId: &HStringArg) -> Result> { + #[inline] pub fn create(&self, paymentMethodId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, paymentMethodId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_json_details(&self, paymentMethodId: &HStringArg, jsonDetails: &HStringArg) -> Result> { + }} + #[inline] pub fn create_with_json_details(&self, paymentMethodId: &HStringArg, jsonDetails: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithJsonDetails)(self as *const _ as *mut _, paymentMethodId.get(), jsonDetails.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } pub mod provider { // Windows.ApplicationModel.Payments.Provider use ::prelude::*; @@ -23580,40 +23580,40 @@ RT_INTERFACE!{interface IPaymentAppCanMakePaymentTriggerDetails(IPaymentAppCanMa fn ReportCanMakePaymentResult(&self, value: *mut super::PaymentCanMakePaymentResult) -> HRESULT }} impl IPaymentAppCanMakePaymentTriggerDetails { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_can_make_payment_result(&self, value: &super::PaymentCanMakePaymentResult) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn report_can_make_payment_result(&self, value: &super::PaymentCanMakePaymentResult) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportCanMakePaymentResult)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PaymentAppCanMakePaymentTriggerDetails: IPaymentAppCanMakePaymentTriggerDetails} DEFINE_IID!(IID_IPaymentAppManager, 239577683, 34081, 18793, 169, 87, 223, 37, 56, 163, 169, 143); RT_INTERFACE!{interface IPaymentAppManager(IPaymentAppManagerVtbl): IInspectable(IInspectableVtbl) [IID_IPaymentAppManager] { - fn RegisterAsync(&self, supportedPaymentMethodIds: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn UnregisterAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn RegisterAsync(&self, supportedPaymentMethodIds: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn UnregisterAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IPaymentAppManager { - #[inline] pub unsafe fn register_async(&self, supportedPaymentMethodIds: &::rt::gen::windows::foundation::collections::IIterable) -> Result> { + #[inline] pub fn register_async(&self, supportedPaymentMethodIds: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RegisterAsync)(self as *const _ as *mut _, supportedPaymentMethodIds as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn unregister_async(&self) -> Result> { + }} + #[inline] pub fn unregister_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UnregisterAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PaymentAppManager: IPaymentAppManager} impl RtActivatable for PaymentAppManager {} impl PaymentAppManager { - #[inline] pub fn get_current() -> Result> { unsafe { + #[inline] pub fn get_current() -> Result>> { >::get_activation_factory().get_current() - }} + } } DEFINE_CLSID!(PaymentAppManager(&[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,121,109,101,110,116,115,46,80,114,111,118,105,100,101,114,46,80,97,121,109,101,110,116,65,112,112,77,97,110,97,103,101,114,0]) [CLSID_PaymentAppManager]); DEFINE_IID!(IID_IPaymentAppManagerStatics, 2738990120, 64649, 17414, 180, 217, 52, 231, 254, 121, 223, 182); @@ -23621,11 +23621,11 @@ RT_INTERFACE!{static interface IPaymentAppManagerStatics(IPaymentAppManagerStati fn get_Current(&self, out: *mut *mut PaymentAppManager) -> HRESULT }} impl IPaymentAppManagerStatics { - #[inline] pub unsafe fn get_current(&self) -> Result> { + #[inline] pub fn get_current(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Current)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IPaymentTransaction, 1649941920, 9893, 20123, 166, 235, 102, 96, 108, 240, 1, 211); RT_INTERFACE!{interface IPaymentTransaction(IPaymentTransactionVtbl): IInspectable(IInspectableVtbl) [IID_IPaymentTransaction] { @@ -23636,70 +23636,70 @@ RT_INTERFACE!{interface IPaymentTransaction(IPaymentTransactionVtbl): IInspectab fn put_PayerName(&self, value: HSTRING) -> HRESULT, fn get_PayerPhoneNumber(&self, out: *mut HSTRING) -> HRESULT, fn put_PayerPhoneNumber(&self, value: HSTRING) -> HRESULT, - fn UpdateShippingAddressAsync(&self, shippingAddress: *mut super::PaymentAddress, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn UpdateSelectedShippingOptionAsync(&self, selectedShippingOption: *mut super::PaymentShippingOption, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn AcceptAsync(&self, paymentToken: *mut super::PaymentToken, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn UpdateShippingAddressAsync(&self, shippingAddress: *mut super::PaymentAddress, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn UpdateSelectedShippingOptionAsync(&self, selectedShippingOption: *mut super::PaymentShippingOption, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn AcceptAsync(&self, paymentToken: *mut super::PaymentToken, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn Reject(&self) -> HRESULT }} impl IPaymentTransaction { - #[inline] pub unsafe fn get_payment_request(&self) -> Result> { + #[inline] pub fn get_payment_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PaymentRequest)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_payer_email(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_payer_email(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PayerEmail)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_payer_email(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_payer_email(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PayerEmail)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_payer_name(&self) -> Result { + }} + #[inline] pub fn get_payer_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PayerName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_payer_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_payer_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PayerName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_payer_phone_number(&self) -> Result { + }} + #[inline] pub fn get_payer_phone_number(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PayerPhoneNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_payer_phone_number(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_payer_phone_number(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PayerPhoneNumber)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn update_shipping_address_async(&self, shippingAddress: &super::PaymentAddress) -> Result>> { + }} + #[inline] pub fn update_shipping_address_async(&self, shippingAddress: &super::PaymentAddress) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UpdateShippingAddressAsync)(self as *const _ as *mut _, shippingAddress as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn update_selected_shipping_option_async(&self, selectedShippingOption: &super::PaymentShippingOption) -> Result>> { + }} + #[inline] pub fn update_selected_shipping_option_async(&self, selectedShippingOption: &super::PaymentShippingOption) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UpdateSelectedShippingOptionAsync)(self as *const _ as *mut _, selectedShippingOption as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn accept_async(&self, paymentToken: &super::PaymentToken) -> Result>> { + }} + #[inline] pub fn accept_async(&self, paymentToken: &super::PaymentToken) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AcceptAsync)(self as *const _ as *mut _, paymentToken as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn reject(&self) -> Result<()> { + }} + #[inline] pub fn reject(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Reject)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PaymentTransaction: IPaymentTransaction} impl RtActivatable for PaymentTransaction {} impl PaymentTransaction { - #[inline] pub fn from_id_async(id: &HStringArg) -> Result>> { unsafe { + #[inline] pub fn from_id_async(id: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(id) - }} + } } DEFINE_CLSID!(PaymentTransaction(&[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,121,109,101,110,116,115,46,80,114,111,118,105,100,101,114,46,80,97,121,109,101,110,116,84,114,97,110,115,97,99,116,105,111,110,0]) [CLSID_PaymentTransaction]); DEFINE_IID!(IID_IPaymentTransactionAcceptResult, 101593718, 54028, 18455, 149, 162, 223, 122, 233, 39, 59, 86); @@ -23707,23 +23707,23 @@ RT_INTERFACE!{interface IPaymentTransactionAcceptResult(IPaymentTransactionAccep fn get_Status(&self, out: *mut super::PaymentRequestCompletionStatus) -> HRESULT }} impl IPaymentTransactionAcceptResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PaymentTransactionAcceptResult: IPaymentTransactionAcceptResult} DEFINE_IID!(IID_IPaymentTransactionStatics, 2372114256, 60938, 19957, 155, 30, 28, 15, 158, 197, 152, 129); RT_INTERFACE!{static interface IPaymentTransactionStatics(IPaymentTransactionStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPaymentTransactionStatics] { - fn FromIdAsync(&self, id: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn FromIdAsync(&self, id: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IPaymentTransactionStatics { - #[inline] pub unsafe fn from_id_async(&self, id: &HStringArg) -> Result>> { + #[inline] pub fn from_id_async(&self, id: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, id.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } } // Windows.ApplicationModel.Payments.Provider } // Windows.ApplicationModel.Payments @@ -23734,11 +23734,11 @@ RT_INTERFACE!{interface IResourceLoader(IResourceLoaderVtbl): IInspectable(IInsp fn GetString(&self, resource: HSTRING, out: *mut HSTRING) -> HRESULT }} impl IResourceLoader { - #[inline] pub unsafe fn get_string(&self, resource: &HStringArg) -> Result { + #[inline] pub fn get_string(&self, resource: &HStringArg) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetString)(self as *const _ as *mut _, resource.get(), &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ResourceLoader: IResourceLoader} impl RtActivatable for ResourceLoader {} @@ -23746,58 +23746,58 @@ impl RtActivatable for ResourceLoader {} impl RtActivatable for ResourceLoader {} impl RtActivatable for ResourceLoader {} impl ResourceLoader { - #[inline] pub fn create_resource_loader_by_name(name: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_resource_loader_by_name(name: &HStringArg) -> Result> { >::get_activation_factory().create_resource_loader_by_name(name) - }} - #[inline] pub fn get_string_for_reference(uri: &super::super::foundation::Uri) -> Result { unsafe { + } + #[inline] pub fn get_string_for_reference(uri: &foundation::Uri) -> Result { >::get_activation_factory().get_string_for_reference(uri) - }} - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + } + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} - #[inline] pub fn get_for_current_view_with_name(name: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn get_for_current_view_with_name(name: &HStringArg) -> Result>> { >::get_activation_factory().get_for_current_view_with_name(name) - }} - #[inline] pub fn get_for_view_independent_use() -> Result> { unsafe { + } + #[inline] pub fn get_for_view_independent_use() -> Result>> { >::get_activation_factory().get_for_view_independent_use() - }} - #[inline] pub fn get_for_view_independent_use_with_name(name: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn get_for_view_independent_use_with_name(name: &HStringArg) -> Result>> { >::get_activation_factory().get_for_view_independent_use_with_name(name) - }} + } } DEFINE_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]) [CLSID_ResourceLoader]); 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(&self, uri: *mut super::super::foundation::Uri, out: *mut HSTRING) -> HRESULT + fn GetStringForUri(&self, uri: *mut foundation::Uri, out: *mut HSTRING) -> HRESULT }} impl IResourceLoader2 { - #[inline] pub unsafe fn get_string_for_uri(&self, uri: &super::super::foundation::Uri) -> Result { + #[inline] pub fn get_string_for_uri(&self, uri: &foundation::Uri) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetStringForUri)(self as *const _ as *mut _, uri as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } 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(&self, name: HSTRING, out: *mut *mut ResourceLoader) -> HRESULT }} impl IResourceLoaderFactory { - #[inline] pub unsafe fn create_resource_loader_by_name(&self, name: &HStringArg) -> Result> { + #[inline] pub fn create_resource_loader_by_name(&self, name: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateResourceLoaderByName)(self as *const _ as *mut _, name.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, uri: *mut super::super::foundation::Uri, out: *mut HSTRING) -> HRESULT + fn GetStringForReference(&self, uri: *mut foundation::Uri, out: *mut HSTRING) -> HRESULT }} impl IResourceLoaderStatics { - #[inline] pub unsafe fn get_string_for_reference(&self, uri: &super::super::foundation::Uri) -> Result { + #[inline] pub fn get_string_for_reference(&self, uri: &foundation::Uri) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetStringForReference)(self as *const _ as *mut _, uri as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } 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] { @@ -23807,174 +23807,174 @@ RT_INTERFACE!{static interface IResourceLoaderStatics2(IResourceLoaderStatics2Vt fn GetForViewIndependentUseWithName(&self, name: HSTRING, out: *mut *mut ResourceLoader) -> HRESULT }} impl IResourceLoaderStatics2 { - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_for_current_view_with_name(&self, name: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_for_current_view_with_name(&self, name: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentViewWithName)(self as *const _ as *mut _, name.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_for_view_independent_use(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_for_view_independent_use(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForViewIndependentUse)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_for_view_independent_use_with_name(&self, name: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_for_view_independent_use_with_name(&self, name: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForViewIndependentUseWithName)(self as *const _ as *mut _, name.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } pub mod core { // Windows.ApplicationModel.Resources.Core use ::prelude::*; 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(&self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, - fn get_Candidates(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_Uri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn get_Candidates(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn Resolve(&self, out: *mut *mut ResourceCandidate) -> HRESULT, fn ResolveForContext(&self, resourceContext: *mut ResourceContext, out: *mut *mut ResourceCandidate) -> HRESULT, - fn ResolveAll(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn ResolveAllForContext(&self, resourceContext: *mut ResourceContext, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn ResolveAll(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn ResolveAllForContext(&self, resourceContext: *mut ResourceContext, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl INamedResource { - #[inline] pub unsafe fn get_uri(&self) -> Result> { + #[inline] pub fn get_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Uri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_candidates(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_candidates(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Candidates)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn resolve(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn resolve(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Resolve)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn resolve_for_context(&self, resourceContext: &ResourceContext) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn resolve_for_context(&self, resourceContext: &ResourceContext) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ResolveForContext)(self as *const _ as *mut _, resourceContext as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn resolve_all(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn resolve_all(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ResolveAll)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn resolve_all_for_context(&self, resourceContext: &ResourceContext) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn resolve_all_for_context(&self, resourceContext: &ResourceContext) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ResolveAllForContext)(self as *const _ as *mut _, resourceContext as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class NamedResource: INamedResource} 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(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_Qualifiers(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_IsMatch(&self, out: *mut bool) -> HRESULT, fn get_IsMatchAsDefault(&self, out: *mut bool) -> HRESULT, fn get_IsDefault(&self, out: *mut bool) -> HRESULT, fn get_ValueAsString(&self, out: *mut HSTRING) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy5(&self) -> (), - #[cfg(feature="windows-storage")] fn GetValueAsFileAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::storage::StorageFile>) -> HRESULT, + #[cfg(feature="windows-storage")] fn GetValueAsFileAsync(&self, out: *mut *mut foundation::IAsyncOperation<::rt::gen::windows::storage::StorageFile>) -> HRESULT, fn GetQualifierValue(&self, qualifierName: HSTRING, out: *mut HSTRING) -> HRESULT }} impl IResourceCandidate { - #[inline] pub unsafe fn get_qualifiers(&self) -> Result>> { + #[inline] pub fn get_qualifiers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Qualifiers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_match(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_match(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsMatch)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_match_as_default(&self) -> Result { + }} + #[inline] pub fn get_is_match_as_default(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsMatchAsDefault)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_default(&self) -> Result { + }} + #[inline] pub fn get_is_default(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDefault)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_value_as_string(&self) -> Result { + }} + #[inline] pub fn get_value_as_string(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ValueAsString)(self 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 get_value_as_file_async(&self) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_value_as_file_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetValueAsFileAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_qualifier_value(&self, qualifierName: &HStringArg) -> Result { + }} + #[inline] pub fn get_qualifier_value(&self, qualifierName: &HStringArg) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetQualifierValue)(self as *const _ as *mut _, qualifierName.get(), &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ResourceCandidate: IResourceCandidate} 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(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::storage::streams::IRandomAccessStream>) -> HRESULT + #[cfg(feature="windows-storage")] fn GetValueAsStreamAsync(&self, out: *mut *mut foundation::IAsyncOperation<::rt::gen::windows::storage::streams::IRandomAccessStream>) -> HRESULT }} impl IResourceCandidate2 { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_value_as_stream_async(&self) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_value_as_stream_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetValueAsStreamAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } -RT_CLASS!{class ResourceCandidateVectorView: ::rt::gen::windows::foundation::collections::IVectorView} +RT_CLASS!{class ResourceCandidateVectorView: foundation::collections::IVectorView} 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(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IObservableMap) -> HRESULT, + fn get_QualifierValues(&self, out: *mut *mut foundation::collections::IObservableMap) -> HRESULT, fn Reset(&self) -> HRESULT, - fn ResetQualifierValues(&self, qualifierNames: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT, - fn OverrideToMatch(&self, result: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT, + fn ResetQualifierValues(&self, qualifierNames: *mut foundation::collections::IIterable) -> HRESULT, + fn OverrideToMatch(&self, result: *mut foundation::collections::IIterable) -> HRESULT, fn Clone(&self, out: *mut *mut ResourceContext) -> HRESULT, - fn get_Languages(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn put_Languages(&self, languages: *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn get_Languages(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn put_Languages(&self, languages: *mut foundation::collections::IVectorView) -> HRESULT }} impl IResourceContext { - #[inline] pub unsafe fn get_qualifier_values(&self) -> Result>> { + #[inline] pub fn get_qualifier_values(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_QualifierValues)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn reset(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn reset(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Reset)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn reset_qualifier_values(&self, qualifierNames: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + }} + #[inline] pub fn reset_qualifier_values(&self, qualifierNames: &foundation::collections::IIterable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ResetQualifierValues)(self as *const _ as *mut _, qualifierNames as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn override_to_match(&self, result: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + }} + #[inline] pub fn override_to_match(&self, result: &foundation::collections::IIterable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OverrideToMatch)(self as *const _ as *mut _, result as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn clone(&self) -> Result> { + }} + #[inline] pub fn clone(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Clone)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_languages(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_languages(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Languages)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_languages(&self, languages: &::rt::gen::windows::foundation::collections::IVectorView) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_languages(&self, languages: &foundation::collections::IVectorView) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Languages)(self as *const _ as *mut _, languages as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ResourceContext: IResourceContext} impl RtActivatable for ResourceContext {} @@ -23982,82 +23982,82 @@ impl RtActivatable for ResourceContext {} impl RtActivatable for ResourceContext {} impl RtActivatable for ResourceContext {} impl ResourceContext { - #[inline] pub fn create_matching_context(result: &::rt::gen::windows::foundation::collections::IIterable) -> Result> { unsafe { + #[inline] pub fn create_matching_context(result: &foundation::collections::IIterable) -> Result>> { >::get_activation_factory().create_matching_context(result) - }} - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + } + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} - #[inline] pub fn set_global_qualifier_value(key: &HStringArg, value: &HStringArg) -> Result<()> { unsafe { + } + #[inline] pub fn set_global_qualifier_value(key: &HStringArg, value: &HStringArg) -> Result<()> { >::get_activation_factory().set_global_qualifier_value(key, value) - }} - #[inline] pub fn reset_global_qualifier_values() -> Result<()> { unsafe { + } + #[inline] pub fn reset_global_qualifier_values() -> Result<()> { >::get_activation_factory().reset_global_qualifier_values() - }} - #[inline] pub fn reset_global_qualifier_values_for_specified_qualifiers(qualifierNames: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { unsafe { + } + #[inline] pub fn reset_global_qualifier_values_for_specified_qualifiers(qualifierNames: &foundation::collections::IIterable) -> Result<()> { >::get_activation_factory().reset_global_qualifier_values_for_specified_qualifiers(qualifierNames) - }} - #[inline] pub fn get_for_view_independent_use() -> Result> { unsafe { + } + #[inline] pub fn get_for_view_independent_use() -> Result>> { >::get_activation_factory().get_for_view_independent_use() - }} - #[inline] pub fn set_global_qualifier_value_with_persistence(key: &HStringArg, value: &HStringArg, persistence: ResourceQualifierPersistence) -> Result<()> { unsafe { + } + #[inline] pub fn set_global_qualifier_value_with_persistence(key: &HStringArg, value: &HStringArg, persistence: ResourceQualifierPersistence) -> Result<()> { >::get_activation_factory().set_global_qualifier_value_with_persistence(key, value, persistence) - }} + } } DEFINE_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]) [CLSID_ResourceContext]); -RT_CLASS!{class ResourceContextLanguagesVectorView: ::rt::gen::windows::foundation::collections::IVectorView} +RT_CLASS!{class ResourceContextLanguagesVectorView: foundation::collections::IVectorView} 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(&self, result: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut ResourceContext) -> HRESULT + fn CreateMatchingContext(&self, result: *mut foundation::collections::IIterable, out: *mut *mut ResourceContext) -> HRESULT }} impl IResourceContextStatics { - #[inline] pub unsafe fn create_matching_context(&self, result: &::rt::gen::windows::foundation::collections::IIterable) -> Result> { + #[inline] pub fn create_matching_context(&self, result: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateMatchingContext)(self as *const _ as *mut _, result as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut ResourceContext) -> HRESULT, fn SetGlobalQualifierValue(&self, key: HSTRING, value: HSTRING) -> HRESULT, fn ResetGlobalQualifierValues(&self) -> HRESULT, - fn ResetGlobalQualifierValuesForSpecifiedQualifiers(&self, qualifierNames: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT, + fn ResetGlobalQualifierValuesForSpecifiedQualifiers(&self, qualifierNames: *mut foundation::collections::IIterable) -> HRESULT, fn GetForViewIndependentUse(&self, out: *mut *mut ResourceContext) -> HRESULT }} impl IResourceContextStatics2 { - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_global_qualifier_value(&self, key: &HStringArg, value: &HStringArg) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_global_qualifier_value(&self, key: &HStringArg, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetGlobalQualifierValue)(self as *const _ as *mut _, key.get(), value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn reset_global_qualifier_values(&self) -> Result<()> { + }} + #[inline] pub fn reset_global_qualifier_values(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ResetGlobalQualifierValues)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn reset_global_qualifier_values_for_specified_qualifiers(&self, qualifierNames: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + }} + #[inline] pub fn reset_global_qualifier_values_for_specified_qualifiers(&self, qualifierNames: &foundation::collections::IIterable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ResetGlobalQualifierValuesForSpecifiedQualifiers)(self as *const _ as *mut _, qualifierNames as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_for_view_independent_use(&self) -> Result> { + }} + #[inline] pub fn get_for_view_independent_use(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForViewIndependentUse)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, key: HSTRING, value: HSTRING, persistence: ResourceQualifierPersistence) -> HRESULT }} impl IResourceContextStatics3 { - #[inline] pub unsafe fn set_global_qualifier_value_with_persistence(&self, key: &HStringArg, value: &HStringArg, persistence: ResourceQualifierPersistence) -> Result<()> { + #[inline] pub fn set_global_qualifier_value_with_persistence(&self, key: &HStringArg, value: &HStringArg, persistence: ResourceQualifierPersistence) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetGlobalQualifierValueWithPersistence)(self as *const _ as *mut _, key.get(), value.get(), persistence); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_STRUCT! { struct ResourceLayoutInfo { MajorVersion: u32, MinorVersion: u32, ResourceSubtreeCount: u32, NamedResourceCount: u32, Checksum: i32, @@ -24065,63 +24065,63 @@ RT_STRUCT! { struct ResourceLayoutInfo { 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(&self, out: *mut *mut ResourceMap) -> HRESULT, - fn get_AllResourceMaps(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMapView) -> HRESULT, + fn get_AllResourceMaps(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT, fn get_DefaultContext(&self, out: *mut *mut ResourceContext) -> HRESULT, - #[cfg(feature="windows-storage")] fn LoadPriFiles(&self, files: *mut ::rt::gen::windows::foundation::collections::IIterable<::rt::gen::windows::storage::IStorageFile>) -> HRESULT, - #[cfg(feature="windows-storage")] fn UnloadPriFiles(&self, files: *mut ::rt::gen::windows::foundation::collections::IIterable<::rt::gen::windows::storage::IStorageFile>) -> HRESULT + #[cfg(feature="windows-storage")] fn LoadPriFiles(&self, files: *mut foundation::collections::IIterable<::rt::gen::windows::storage::IStorageFile>) -> HRESULT, + #[cfg(feature="windows-storage")] fn UnloadPriFiles(&self, files: *mut foundation::collections::IIterable<::rt::gen::windows::storage::IStorageFile>) -> HRESULT }} impl IResourceManager { - #[inline] pub unsafe fn get_main_resource_map(&self) -> Result> { + #[inline] pub fn get_main_resource_map(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MainResourceMap)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_all_resource_maps(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_all_resource_maps(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AllResourceMaps)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_context(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_default_context(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DefaultContext)(self 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_pri_files(&self, files: &::rt::gen::windows::foundation::collections::IIterable<::rt::gen::windows::storage::IStorageFile>) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn load_pri_files(&self, files: &foundation::collections::IIterable<::rt::gen::windows::storage::IStorageFile>) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).LoadPriFiles)(self as *const _ as *mut _, files as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn unload_pri_files(&self, files: &::rt::gen::windows::foundation::collections::IIterable<::rt::gen::windows::storage::IStorageFile>) -> Result<()> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn unload_pri_files(&self, files: &foundation::collections::IIterable<::rt::gen::windows::storage::IStorageFile>) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).UnloadPriFiles)(self as *const _ as *mut _, files as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ResourceManager: IResourceManager} impl RtActivatable for ResourceManager {} impl ResourceManager { - #[inline] pub fn get_current() -> Result> { unsafe { + #[inline] pub fn get_current() -> Result>> { >::get_activation_factory().get_current() - }} - #[inline] pub fn is_resource_reference(resourceReference: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn is_resource_reference(resourceReference: &HStringArg) -> Result { >::get_activation_factory().is_resource_reference(resourceReference) - }} + } } DEFINE_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]) [CLSID_ResourceManager]); 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(&self, packageName: HSTRING, resourceLayoutInfo: ResourceLayoutInfo, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn GetAllSubtreesForPackage(&self, packageName: HSTRING, resourceLayoutInfo: ResourceLayoutInfo, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn GetAllNamedResourcesForPackage(&self, packageName: HSTRING, resourceLayoutInfo: ResourceLayoutInfo, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn GetAllSubtreesForPackage(&self, packageName: HSTRING, resourceLayoutInfo: ResourceLayoutInfo, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IResourceManager2 { - #[inline] pub unsafe fn get_all_named_resources_for_package(&self, packageName: &HStringArg, resourceLayoutInfo: ResourceLayoutInfo) -> Result>> { + #[inline] pub fn get_all_named_resources_for_package(&self, packageName: &HStringArg, resourceLayoutInfo: ResourceLayoutInfo) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAllNamedResourcesForPackage)(self as *const _ as *mut _, 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(&self, packageName: &HStringArg, resourceLayoutInfo: ResourceLayoutInfo) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_all_subtrees_for_package(&self, packageName: &HStringArg, resourceLayoutInfo: ResourceLayoutInfo) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAllSubtreesForPackage)(self as *const _ as *mut _, packageName.get(), resourceLayoutInfo, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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] { @@ -24129,50 +24129,50 @@ RT_INTERFACE!{static interface IResourceManagerStatics(IResourceManagerStaticsVt fn IsResourceReference(&self, resourceReference: HSTRING, out: *mut bool) -> HRESULT }} impl IResourceManagerStatics { - #[inline] pub unsafe fn get_current(&self) -> Result> { + #[inline] pub fn get_current(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Current)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn is_resource_reference(&self, resourceReference: &HStringArg) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn is_resource_reference(&self, resourceReference: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsResourceReference)(self as *const _ as *mut _, resourceReference.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn get_Uri(&self, out: *mut *mut foundation::Uri) -> HRESULT, fn GetValue(&self, resource: HSTRING, out: *mut *mut ResourceCandidate) -> HRESULT, fn GetValueForContext(&self, resource: HSTRING, context: *mut ResourceContext, out: *mut *mut ResourceCandidate) -> HRESULT, fn GetSubtree(&self, reference: HSTRING, out: *mut *mut ResourceMap) -> HRESULT }} impl IResourceMap { - #[inline] pub unsafe fn get_uri(&self) -> Result> { + #[inline] pub fn get_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Uri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self, resource: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_value(&self, resource: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetValue)(self as *const _ as *mut _, resource.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_value_for_context(&self, resource: &HStringArg, context: &ResourceContext) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_value_for_context(&self, resource: &HStringArg, context: &ResourceContext) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetValueForContext)(self as *const _ as *mut _, 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_subtree(&self, reference: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_subtree(&self, reference: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSubtree)(self as *const _ as *mut _, reference.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ResourceMap: IResourceMap} -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 ResourceMapIterator: foundation::collections::IIterator>} +RT_CLASS!{class ResourceMapMapView: foundation::collections::IMapView} +RT_CLASS!{class ResourceMapMapViewIterator: foundation::collections::IIterator>} 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(&self, out: *mut HSTRING) -> HRESULT, @@ -24182,82 +24182,82 @@ RT_INTERFACE!{interface IResourceQualifier(IResourceQualifierVtbl): IInspectable fn get_Score(&self, out: *mut f64) -> HRESULT }} impl IResourceQualifier { - #[inline] pub unsafe fn get_qualifier_name(&self) -> Result { + #[inline] pub fn get_qualifier_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_QualifierName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_qualifier_value(&self) -> Result { + }} + #[inline] pub fn get_qualifier_value(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_QualifierValue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_default(&self) -> Result { + }} + #[inline] pub fn get_is_default(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDefault)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_match(&self) -> Result { + }} + #[inline] pub fn get_is_match(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsMatch)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_score(&self) -> Result { + }} + #[inline] pub fn get_score(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Score)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ResourceQualifier: IResourceQualifier} -RT_CLASS!{class ResourceQualifierMapView: ::rt::gen::windows::foundation::collections::IMapView} -RT_CLASS!{class ResourceQualifierObservableMap: ::rt::gen::windows::foundation::collections::IObservableMap} +RT_CLASS!{class ResourceQualifierMapView: foundation::collections::IMapView} +RT_CLASS!{class ResourceQualifierObservableMap: foundation::collections::IObservableMap} RT_ENUM! { enum ResourceQualifierPersistence: i32 { None (ResourceQualifierPersistence_None) = 0, LocalMachine (ResourceQualifierPersistence_LocalMachine) = 1, }} -RT_CLASS!{class ResourceQualifierVectorView: ::rt::gen::windows::foundation::collections::IVectorView} +RT_CLASS!{class ResourceQualifierVectorView: foundation::collections::IVectorView} } // Windows.ApplicationModel.Resources.Core pub mod management { // Windows.ApplicationModel.Resources.Management use ::prelude::*; 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(&self, out: *mut IndexedResourceType) -> HRESULT, - fn get_Uri(&self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, - fn get_Metadata(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMapView) -> HRESULT, - fn get_Qualifiers(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_Uri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn get_Metadata(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT, + fn get_Qualifiers(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_ValueAsString(&self, out: *mut HSTRING) -> HRESULT, fn GetQualifierValue(&self, qualifierName: HSTRING, out: *mut HSTRING) -> HRESULT }} impl IIndexedResourceCandidate { - #[inline] pub unsafe fn get_type(&self) -> Result { + #[inline] pub fn get_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Type)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_uri(&self) -> Result> { + }} + #[inline] pub fn get_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Uri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_metadata(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_metadata(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Metadata)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_qualifiers(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_qualifiers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Qualifiers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_value_as_string(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_value_as_string(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ValueAsString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_qualifier_value(&self, qualifierName: &HStringArg) -> Result { + }} + #[inline] pub fn get_qualifier_value(&self, qualifierName: &HStringArg) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetQualifierValue)(self as *const _ as *mut _, qualifierName.get(), &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class IndexedResourceCandidate: IIndexedResourceCandidate} DEFINE_IID!(IID_IIndexedResourceQualifier, 3672357787, 54020, 18815, 161, 104, 163, 64, 4, 44, 138, 219); @@ -24266,16 +24266,16 @@ RT_INTERFACE!{interface IIndexedResourceQualifier(IIndexedResourceQualifierVtbl) fn get_QualifierValue(&self, out: *mut HSTRING) -> HRESULT }} impl IIndexedResourceQualifier { - #[inline] pub unsafe fn get_qualifier_name(&self) -> Result { + #[inline] pub fn get_qualifier_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_QualifierName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_qualifier_value(&self) -> Result { + }} + #[inline] pub fn get_qualifier_value(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_QualifierValue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class IndexedResourceQualifier: IIndexedResourceQualifier} RT_ENUM! { enum IndexedResourceType: i32 { @@ -24283,54 +24283,54 @@ RT_ENUM! { enum IndexedResourceType: i32 { }} 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(&self, filePath: *mut ::rt::gen::windows::foundation::Uri, out: *mut *mut IndexedResourceCandidate) -> HRESULT, - fn IndexFileContentsAsync(&self, file: *mut ::rt::gen::windows::foundation::Uri, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT + fn IndexFilePath(&self, filePath: *mut foundation::Uri, out: *mut *mut IndexedResourceCandidate) -> HRESULT, + fn IndexFileContentsAsync(&self, file: *mut foundation::Uri, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IResourceIndexer { - #[inline] pub unsafe fn index_file_path(&self, filePath: &::rt::gen::windows::foundation::Uri) -> Result> { + #[inline] pub fn index_file_path(&self, filePath: &foundation::Uri) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).IndexFilePath)(self as *const _ as *mut _, filePath as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn index_file_contents_async(&self, file: &::rt::gen::windows::foundation::Uri) -> Result>>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn index_file_contents_async(&self, file: &foundation::Uri) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).IndexFileContentsAsync)(self as *const _ as *mut _, file as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ResourceIndexer: IResourceIndexer} impl RtActivatable for ResourceIndexer {} impl RtActivatable for ResourceIndexer {} impl ResourceIndexer { - #[inline] pub fn create_resource_indexer(projectRoot: &::rt::gen::windows::foundation::Uri) -> Result> { unsafe { + #[inline] pub fn create_resource_indexer(projectRoot: &foundation::Uri) -> Result> { >::get_activation_factory().create_resource_indexer(projectRoot) - }} - #[inline] pub fn create_resource_indexer_with_extension(projectRoot: &::rt::gen::windows::foundation::Uri, extensionDllPath: &::rt::gen::windows::foundation::Uri) -> Result> { unsafe { + } + #[inline] pub fn create_resource_indexer_with_extension(projectRoot: &foundation::Uri, extensionDllPath: &foundation::Uri) -> Result> { >::get_activation_factory().create_resource_indexer_with_extension(projectRoot, extensionDllPath) - }} + } } DEFINE_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]) [CLSID_ResourceIndexer]); 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(&self, projectRoot: *mut ::rt::gen::windows::foundation::Uri, out: *mut *mut ResourceIndexer) -> HRESULT + fn CreateResourceIndexer(&self, projectRoot: *mut foundation::Uri, out: *mut *mut ResourceIndexer) -> HRESULT }} impl IResourceIndexerFactory { - #[inline] pub unsafe fn create_resource_indexer(&self, projectRoot: &::rt::gen::windows::foundation::Uri) -> Result> { + #[inline] pub fn create_resource_indexer(&self, projectRoot: &foundation::Uri) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateResourceIndexer)(self as *const _ as *mut _, projectRoot as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IResourceIndexerFactory2, 1614868877, 54757, 19296, 146, 1, 205, 39, 156, 188, 254, 217); RT_INTERFACE!{static interface IResourceIndexerFactory2(IResourceIndexerFactory2Vtbl): IInspectable(IInspectableVtbl) [IID_IResourceIndexerFactory2] { - fn CreateResourceIndexerWithExtension(&self, projectRoot: *mut ::rt::gen::windows::foundation::Uri, extensionDllPath: *mut ::rt::gen::windows::foundation::Uri, out: *mut *mut ResourceIndexer) -> HRESULT + fn CreateResourceIndexerWithExtension(&self, projectRoot: *mut foundation::Uri, extensionDllPath: *mut foundation::Uri, out: *mut *mut ResourceIndexer) -> HRESULT }} impl IResourceIndexerFactory2 { - #[inline] pub unsafe fn create_resource_indexer_with_extension(&self, projectRoot: &::rt::gen::windows::foundation::Uri, extensionDllPath: &::rt::gen::windows::foundation::Uri) -> Result> { + #[inline] pub fn create_resource_indexer_with_extension(&self, projectRoot: &foundation::Uri, extensionDllPath: &foundation::Uri) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateResourceIndexerWithExtension)(self as *const _ as *mut _, projectRoot as *const _ as *mut _, extensionDllPath as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } } // Windows.ApplicationModel.Resources.Management } // Windows.ApplicationModel.Resources @@ -24339,55 +24339,55 @@ use ::prelude::*; 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(&self, out: *mut *mut LicenseInformation) -> HRESULT, - fn get_LinkUri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn get_LinkUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, fn get_AppId(&self, out: *mut Guid) -> HRESULT, - fn RequestAppPurchaseAsync(&self, includeReceipt: bool, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestProductPurchaseAsync(&self, productId: HSTRING, includeReceipt: bool, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn LoadListingInformationAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetAppReceiptAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetProductReceiptAsync(&self, productId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn RequestAppPurchaseAsync(&self, includeReceipt: bool, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestProductPurchaseAsync(&self, productId: HSTRING, includeReceipt: bool, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn LoadListingInformationAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetAppReceiptAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetProductReceiptAsync(&self, productId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ICurrentApp { - #[inline] pub unsafe fn get_license_information(&self) -> Result> { + #[inline] pub fn get_license_information(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LicenseInformation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_link_uri(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_link_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LinkUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_app_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AppId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn request_app_purchase_async(&self, includeReceipt: bool) -> Result>> { + }} + #[inline] pub fn request_app_purchase_async(&self, includeReceipt: bool) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAppPurchaseAsync)(self as *const _ as *mut _, includeReceipt, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_product_purchase_async(&self, productId: &HStringArg, includeReceipt: bool) -> Result>> { + }} + #[inline] pub fn request_product_purchase_async(&self, productId: &HStringArg, includeReceipt: bool) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestProductPurchaseAsync)(self as *const _ as *mut _, productId.get(), includeReceipt, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn load_listing_information_async(&self) -> Result>> { + }} + #[inline] pub fn load_listing_information_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LoadListingInformationAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_receipt_async(&self) -> Result>> { + }} + #[inline] pub fn get_app_receipt_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAppReceiptAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_product_receipt_async(&self, productId: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_product_receipt_async(&self, productId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetProductReceiptAsync)(self as *const _ as *mut _, productId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class CurrentApp} impl RtActivatable for CurrentApp {} @@ -24396,137 +24396,137 @@ impl RtActivatable for CurrentApp {} impl RtActivatable for CurrentApp {} impl RtActivatable for CurrentApp {} impl CurrentApp { - #[inline] pub fn get_license_information() -> Result> { unsafe { + #[inline] pub fn get_license_information() -> Result>> { >::get_activation_factory().get_license_information() - }} - #[inline] pub fn get_link_uri() -> Result> { unsafe { + } + #[inline] pub fn get_link_uri() -> Result>> { >::get_activation_factory().get_link_uri() - }} - #[inline] pub fn get_app_id() -> Result { unsafe { + } + #[inline] pub fn get_app_id() -> Result { >::get_activation_factory().get_app_id() - }} - #[inline] pub fn request_app_purchase_async(includeReceipt: bool) -> Result>> { unsafe { + } + #[inline] pub fn request_app_purchase_async(includeReceipt: bool) -> Result>> { >::get_activation_factory().request_app_purchase_async(includeReceipt) - }} - #[inline] pub fn request_product_purchase_async(productId: &HStringArg, includeReceipt: bool) -> Result>> { unsafe { + } + #[inline] pub fn request_product_purchase_async(productId: &HStringArg, includeReceipt: bool) -> Result>> { >::get_activation_factory().request_product_purchase_async(productId, includeReceipt) - }} - #[inline] pub fn load_listing_information_async() -> Result>> { unsafe { + } + #[inline] pub fn load_listing_information_async() -> Result>> { >::get_activation_factory().load_listing_information_async() - }} - #[inline] pub fn get_app_receipt_async() -> Result>> { unsafe { + } + #[inline] pub fn get_app_receipt_async() -> Result>> { >::get_activation_factory().get_app_receipt_async() - }} - #[inline] pub fn get_product_receipt_async(productId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn get_product_receipt_async(productId: &HStringArg) -> Result>> { >::get_activation_factory().get_product_receipt_async(productId) - }} - #[inline] pub fn get_customer_purchase_id_async(serviceTicket: &HStringArg, publisherUserId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn get_customer_purchase_id_async(serviceTicket: &HStringArg, publisherUserId: &HStringArg) -> Result>> { >::get_activation_factory().get_customer_purchase_id_async(serviceTicket, publisherUserId) - }} - #[inline] pub fn get_customer_collections_id_async(serviceTicket: &HStringArg, publisherUserId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn get_customer_collections_id_async(serviceTicket: &HStringArg, publisherUserId: &HStringArg) -> Result>> { >::get_activation_factory().get_customer_collections_id_async(serviceTicket, publisherUserId) - }} - #[inline] pub fn load_listing_information_by_product_ids_async(productIds: &super::super::foundation::collections::IIterable) -> Result>> { unsafe { + } + #[inline] pub fn load_listing_information_by_product_ids_async(productIds: &foundation::collections::IIterable) -> Result>> { >::get_activation_factory().load_listing_information_by_product_ids_async(productIds) - }} - #[inline] pub fn load_listing_information_by_keywords_async(keywords: &super::super::foundation::collections::IIterable) -> Result>> { unsafe { + } + #[inline] pub fn load_listing_information_by_keywords_async(keywords: &foundation::collections::IIterable) -> Result>> { >::get_activation_factory().load_listing_information_by_keywords_async(keywords) - }} - #[inline] pub fn report_product_fulfillment(productId: &HStringArg) -> Result<()> { unsafe { + } + #[inline] pub fn report_product_fulfillment(productId: &HStringArg) -> Result<()> { >::get_activation_factory().report_product_fulfillment(productId) - }} - #[inline] pub fn get_app_purchase_campaign_id_async() -> Result>> { unsafe { + } + #[inline] pub fn get_app_purchase_campaign_id_async() -> Result>> { >::get_activation_factory().get_app_purchase_campaign_id_async() - }} - #[inline] pub fn report_consumable_fulfillment_async(productId: &HStringArg, transactionId: Guid) -> Result>> { unsafe { + } + #[inline] pub fn report_consumable_fulfillment_async(productId: &HStringArg, transactionId: Guid) -> Result>> { >::get_activation_factory().report_consumable_fulfillment_async(productId, transactionId) - }} - #[inline] pub fn request_product_purchase_with_results_async(productId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn request_product_purchase_with_results_async(productId: &HStringArg) -> Result>> { >::get_activation_factory().request_product_purchase_with_results_async(productId) - }} - #[inline] pub fn request_product_purchase_with_display_properties_async(productId: &HStringArg, offerId: &HStringArg, displayProperties: &ProductPurchaseDisplayProperties) -> Result>> { unsafe { + } + #[inline] pub fn request_product_purchase_with_display_properties_async(productId: &HStringArg, offerId: &HStringArg, displayProperties: &ProductPurchaseDisplayProperties) -> Result>> { >::get_activation_factory().request_product_purchase_with_display_properties_async(productId, offerId, displayProperties) - }} - #[inline] pub fn get_unfulfilled_consumables_async() -> Result>>> { unsafe { + } + #[inline] pub fn get_unfulfilled_consumables_async() -> Result>>> { >::get_activation_factory().get_unfulfilled_consumables_async() - }} + } } DEFINE_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]) [CLSID_CurrentApp]); 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(&self, serviceTicket: HSTRING, publisherUserId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetCustomerCollectionsIdAsync(&self, serviceTicket: HSTRING, publisherUserId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetCustomerPurchaseIdAsync(&self, serviceTicket: HSTRING, publisherUserId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetCustomerCollectionsIdAsync(&self, serviceTicket: HSTRING, publisherUserId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ICurrentApp2Statics { - #[inline] pub unsafe fn get_customer_purchase_id_async(&self, serviceTicket: &HStringArg, publisherUserId: &HStringArg) -> Result>> { + #[inline] pub fn get_customer_purchase_id_async(&self, serviceTicket: &HStringArg, publisherUserId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCustomerPurchaseIdAsync)(self as *const _ as *mut _, 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(&self, serviceTicket: &HStringArg, publisherUserId: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_customer_collections_id_async(&self, serviceTicket: &HStringArg, publisherUserId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCustomerCollectionsIdAsync)(self as *const _ as *mut _, serviceTicket.get(), publisherUserId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut LicenseInformation) -> HRESULT, - fn get_LinkUri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn get_LinkUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, fn get_AppId(&self, out: *mut Guid) -> HRESULT, - fn RequestAppPurchaseAsync(&self, includeReceipt: bool, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestProductPurchaseAsync(&self, productId: HSTRING, includeReceipt: bool, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn LoadListingInformationAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetAppReceiptAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetProductReceiptAsync(&self, productId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn ReloadSimulatorAsync(&self, simulatorSettingsFile: *mut super::super::storage::StorageFile, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn RequestAppPurchaseAsync(&self, includeReceipt: bool, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestProductPurchaseAsync(&self, productId: HSTRING, includeReceipt: bool, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn LoadListingInformationAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetAppReceiptAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetProductReceiptAsync(&self, productId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn ReloadSimulatorAsync(&self, simulatorSettingsFile: *mut super::super::storage::StorageFile, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl ICurrentAppSimulator { - #[inline] pub unsafe fn get_license_information(&self) -> Result> { + #[inline] pub fn get_license_information(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LicenseInformation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_link_uri(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_link_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LinkUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_app_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AppId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn request_app_purchase_async(&self, includeReceipt: bool) -> Result>> { + }} + #[inline] pub fn request_app_purchase_async(&self, includeReceipt: bool) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAppPurchaseAsync)(self as *const _ as *mut _, includeReceipt, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_product_purchase_async(&self, productId: &HStringArg, includeReceipt: bool) -> Result>> { + }} + #[inline] pub fn request_product_purchase_async(&self, productId: &HStringArg, includeReceipt: bool) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestProductPurchaseAsync)(self as *const _ as *mut _, productId.get(), includeReceipt, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn load_listing_information_async(&self) -> Result>> { + }} + #[inline] pub fn load_listing_information_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LoadListingInformationAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_receipt_async(&self) -> Result>> { + }} + #[inline] pub fn get_app_receipt_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAppReceiptAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_product_receipt_async(&self, productId: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_product_receipt_async(&self, productId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetProductReceiptAsync)(self as *const _ as *mut _, 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(&self, simulatorSettingsFile: &super::super::storage::StorageFile) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn reload_simulator_async(&self, simulatorSettingsFile: &super::super::storage::StorageFile) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReloadSimulatorAsync)(self as *const _ as *mut _, simulatorSettingsFile as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class CurrentAppSimulator} impl RtActivatable for CurrentAppSimulator {} @@ -24534,174 +24534,174 @@ impl RtActivatable for CurrentAppSimul impl RtActivatable for CurrentAppSimulator {} impl RtActivatable for CurrentAppSimulator {} impl CurrentAppSimulator { - #[inline] pub fn get_license_information() -> Result> { unsafe { + #[inline] pub fn get_license_information() -> Result>> { >::get_activation_factory().get_license_information() - }} - #[inline] pub fn get_link_uri() -> Result> { unsafe { + } + #[inline] pub fn get_link_uri() -> Result>> { >::get_activation_factory().get_link_uri() - }} - #[inline] pub fn get_app_id() -> Result { unsafe { + } + #[inline] pub fn get_app_id() -> Result { >::get_activation_factory().get_app_id() - }} - #[inline] pub fn request_app_purchase_async(includeReceipt: bool) -> Result>> { unsafe { + } + #[inline] pub fn request_app_purchase_async(includeReceipt: bool) -> Result>> { >::get_activation_factory().request_app_purchase_async(includeReceipt) - }} - #[inline] pub fn request_product_purchase_async(productId: &HStringArg, includeReceipt: bool) -> Result>> { unsafe { + } + #[inline] pub fn request_product_purchase_async(productId: &HStringArg, includeReceipt: bool) -> Result>> { >::get_activation_factory().request_product_purchase_async(productId, includeReceipt) - }} - #[inline] pub fn load_listing_information_async() -> Result>> { unsafe { + } + #[inline] pub fn load_listing_information_async() -> Result>> { >::get_activation_factory().load_listing_information_async() - }} - #[inline] pub fn get_app_receipt_async() -> Result>> { unsafe { + } + #[inline] pub fn get_app_receipt_async() -> Result>> { >::get_activation_factory().get_app_receipt_async() - }} - #[inline] pub fn get_product_receipt_async(productId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn get_product_receipt_async(productId: &HStringArg) -> Result>> { >::get_activation_factory().get_product_receipt_async(productId) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn reload_simulator_async(simulatorSettingsFile: &super::super::storage::StorageFile) -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn reload_simulator_async(simulatorSettingsFile: &super::super::storage::StorageFile) -> Result> { >::get_activation_factory().reload_simulator_async(simulatorSettingsFile) - }} - #[inline] pub fn load_listing_information_by_product_ids_async(productIds: &super::super::foundation::collections::IIterable) -> Result>> { unsafe { + } + #[inline] pub fn load_listing_information_by_product_ids_async(productIds: &foundation::collections::IIterable) -> Result>> { >::get_activation_factory().load_listing_information_by_product_ids_async(productIds) - }} - #[inline] pub fn load_listing_information_by_keywords_async(keywords: &super::super::foundation::collections::IIterable) -> Result>> { unsafe { + } + #[inline] pub fn load_listing_information_by_keywords_async(keywords: &foundation::collections::IIterable) -> Result>> { >::get_activation_factory().load_listing_information_by_keywords_async(keywords) - }} - #[inline] pub fn get_app_purchase_campaign_id_async() -> Result>> { unsafe { + } + #[inline] pub fn get_app_purchase_campaign_id_async() -> Result>> { >::get_activation_factory().get_app_purchase_campaign_id_async() - }} - #[inline] pub fn report_consumable_fulfillment_async(productId: &HStringArg, transactionId: Guid) -> Result>> { unsafe { + } + #[inline] pub fn report_consumable_fulfillment_async(productId: &HStringArg, transactionId: Guid) -> Result>> { >::get_activation_factory().report_consumable_fulfillment_async(productId, transactionId) - }} - #[inline] pub fn request_product_purchase_with_results_async(productId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn request_product_purchase_with_results_async(productId: &HStringArg) -> Result>> { >::get_activation_factory().request_product_purchase_with_results_async(productId) - }} - #[inline] pub fn request_product_purchase_with_display_properties_async(productId: &HStringArg, offerId: &HStringArg, displayProperties: &ProductPurchaseDisplayProperties) -> Result>> { unsafe { + } + #[inline] pub fn request_product_purchase_with_display_properties_async(productId: &HStringArg, offerId: &HStringArg, displayProperties: &ProductPurchaseDisplayProperties) -> Result>> { >::get_activation_factory().request_product_purchase_with_display_properties_async(productId, offerId, displayProperties) - }} - #[inline] pub fn get_unfulfilled_consumables_async() -> Result>>> { unsafe { + } + #[inline] pub fn get_unfulfilled_consumables_async() -> Result>>> { >::get_activation_factory().get_unfulfilled_consumables_async() - }} + } } DEFINE_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]) [CLSID_CurrentAppSimulator]); 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(&self, productIds: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn LoadListingInformationByKeywordsAsync(&self, keywords: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn LoadListingInformationByProductIdsAsync(&self, productIds: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn LoadListingInformationByKeywordsAsync(&self, keywords: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ICurrentAppSimulatorStaticsWithFiltering { - #[inline] pub unsafe fn load_listing_information_by_product_ids_async(&self, productIds: &super::super::foundation::collections::IIterable) -> Result>> { + #[inline] pub fn load_listing_information_by_product_ids_async(&self, productIds: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LoadListingInformationByProductIdsAsync)(self as *const _ as *mut _, productIds as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn load_listing_information_by_keywords_async(&self, keywords: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn load_listing_information_by_keywords_async(&self, keywords: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LoadListingInformationByKeywordsAsync)(self as *const _ as *mut _, keywords as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetAppPurchaseCampaignIdAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ICurrentAppSimulatorWithCampaignId { - #[inline] pub unsafe fn get_app_purchase_campaign_id_async(&self) -> Result>> { + #[inline] pub fn get_app_purchase_campaign_id_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAppPurchaseCampaignIdAsync)(self as *const _ as *mut _, &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(&self, productId: HSTRING, transactionId: Guid, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestProductPurchaseWithResultsAsync(&self, productId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestProductPurchaseWithDisplayPropertiesAsync(&self, productId: HSTRING, offerId: HSTRING, displayProperties: *mut ProductPurchaseDisplayProperties, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetUnfulfilledConsumablesAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn ReportConsumableFulfillmentAsync(&self, productId: HSTRING, transactionId: Guid, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestProductPurchaseWithResultsAsync(&self, productId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestProductPurchaseWithDisplayPropertiesAsync(&self, productId: HSTRING, offerId: HSTRING, displayProperties: *mut ProductPurchaseDisplayProperties, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetUnfulfilledConsumablesAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl ICurrentAppSimulatorWithConsumables { - #[inline] pub unsafe fn report_consumable_fulfillment_async(&self, productId: &HStringArg, transactionId: Guid) -> Result>> { + #[inline] pub fn report_consumable_fulfillment_async(&self, productId: &HStringArg, transactionId: Guid) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportConsumableFulfillmentAsync)(self as *const _ as *mut _, 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(&self, productId: &HStringArg) -> Result>> { + }} + #[inline] pub fn request_product_purchase_with_results_async(&self, productId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestProductPurchaseWithResultsAsync)(self as *const _ as *mut _, 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(&self, productId: &HStringArg, offerId: &HStringArg, displayProperties: &ProductPurchaseDisplayProperties) -> Result>> { + }} + #[inline] pub fn request_product_purchase_with_display_properties_async(&self, productId: &HStringArg, offerId: &HStringArg, displayProperties: &ProductPurchaseDisplayProperties) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestProductPurchaseWithDisplayPropertiesAsync)(self as *const _ as *mut _, 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(&self) -> Result>>> { + }} + #[inline] pub fn get_unfulfilled_consumables_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetUnfulfilledConsumablesAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, productIds: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn LoadListingInformationByKeywordsAsync(&self, keywords: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn LoadListingInformationByProductIdsAsync(&self, productIds: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn LoadListingInformationByKeywordsAsync(&self, keywords: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn ReportProductFulfillment(&self, productId: HSTRING) -> HRESULT }} impl ICurrentAppStaticsWithFiltering { - #[inline] pub unsafe fn load_listing_information_by_product_ids_async(&self, productIds: &super::super::foundation::collections::IIterable) -> Result>> { + #[inline] pub fn load_listing_information_by_product_ids_async(&self, productIds: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LoadListingInformationByProductIdsAsync)(self as *const _ as *mut _, productIds as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn load_listing_information_by_keywords_async(&self, keywords: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn load_listing_information_by_keywords_async(&self, keywords: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LoadListingInformationByKeywordsAsync)(self as *const _ as *mut _, keywords as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_product_fulfillment(&self, productId: &HStringArg) -> Result<()> { + }} + #[inline] pub fn report_product_fulfillment(&self, productId: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportProductFulfillment)(self as *const _ as *mut _, productId.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetAppPurchaseCampaignIdAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ICurrentAppWithCampaignId { - #[inline] pub unsafe fn get_app_purchase_campaign_id_async(&self) -> Result>> { + #[inline] pub fn get_app_purchase_campaign_id_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAppPurchaseCampaignIdAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, productId: HSTRING, transactionId: Guid, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestProductPurchaseWithResultsAsync(&self, productId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestProductPurchaseWithDisplayPropertiesAsync(&self, productId: HSTRING, offerId: HSTRING, displayProperties: *mut ProductPurchaseDisplayProperties, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetUnfulfilledConsumablesAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn ReportConsumableFulfillmentAsync(&self, productId: HSTRING, transactionId: Guid, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestProductPurchaseWithResultsAsync(&self, productId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestProductPurchaseWithDisplayPropertiesAsync(&self, productId: HSTRING, offerId: HSTRING, displayProperties: *mut ProductPurchaseDisplayProperties, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetUnfulfilledConsumablesAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl ICurrentAppWithConsumables { - #[inline] pub unsafe fn report_consumable_fulfillment_async(&self, productId: &HStringArg, transactionId: Guid) -> Result>> { + #[inline] pub fn report_consumable_fulfillment_async(&self, productId: &HStringArg, transactionId: Guid) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportConsumableFulfillmentAsync)(self as *const _ as *mut _, 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(&self, productId: &HStringArg) -> Result>> { + }} + #[inline] pub fn request_product_purchase_with_results_async(&self, productId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestProductPurchaseWithResultsAsync)(self as *const _ as *mut _, 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(&self, productId: &HStringArg, offerId: &HStringArg, displayProperties: &ProductPurchaseDisplayProperties) -> Result>> { + }} + #[inline] pub fn request_product_purchase_with_display_properties_async(&self, productId: &HStringArg, offerId: &HStringArg, displayProperties: &ProductPurchaseDisplayProperties) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestProductPurchaseWithDisplayPropertiesAsync)(self as *const _ as *mut _, 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(&self) -> Result>>> { + }} + #[inline] pub fn get_unfulfilled_consumables_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetUnfulfilledConsumablesAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -24711,145 +24711,145 @@ RT_DELEGATE!{delegate LicenseChangedEventHandler(LicenseChangedEventHandlerVtbl, fn Invoke(&self) -> HRESULT }} impl LicenseChangedEventHandler { - #[inline] pub unsafe fn invoke(&self) -> Result<()> { + #[inline] pub fn invoke(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, + fn get_ProductLicenses(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT, fn get_IsActive(&self, out: *mut bool) -> HRESULT, fn get_IsTrial(&self, out: *mut bool) -> HRESULT, - fn get_ExpirationDate(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn add_LicenseChanged(&self, handler: *mut LicenseChangedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_LicenseChanged(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn get_ExpirationDate(&self, out: *mut foundation::DateTime) -> HRESULT, + fn add_LicenseChanged(&self, handler: *mut LicenseChangedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_LicenseChanged(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl ILicenseInformation { - #[inline] pub unsafe fn get_product_licenses(&self) -> Result>> { + #[inline] pub fn get_product_licenses(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProductLicenses)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_active(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_active(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsActive)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_trial(&self) -> Result { + }} + #[inline] pub fn get_is_trial(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsTrial)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_expiration_date(&self) -> Result { + }} + #[inline] pub fn get_expiration_date(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExpirationDate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_license_changed(&self, handler: &LicenseChangedEventHandler) -> Result { + }} + #[inline] pub fn add_license_changed(&self, handler: &LicenseChangedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_LicenseChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_license_changed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_license_changed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_LicenseChanged)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class LicenseInformation: ILicenseInformation} 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(&self, out: *mut HSTRING) -> HRESULT, fn get_Description(&self, out: *mut HSTRING) -> HRESULT, - fn get_ProductListings(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, + fn get_ProductListings(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT, fn get_FormattedPrice(&self, out: *mut HSTRING) -> HRESULT, fn get_Name(&self, out: *mut HSTRING) -> HRESULT, fn get_AgeRating(&self, out: *mut u32) -> HRESULT }} impl IListingInformation { - #[inline] pub unsafe fn get_current_market(&self) -> Result { + #[inline] pub fn get_current_market(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CurrentMarket)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_description(&self) -> Result { + }} + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_product_listings(&self) -> Result>> { + }} + #[inline] pub fn get_product_listings(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProductListings)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_formatted_price(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_formatted_price(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FormattedPrice)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_name(&self) -> Result { + }} + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_age_rating(&self) -> Result { + }} + #[inline] pub fn get_age_rating(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AgeRating)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ListingInformation: IListingInformation} 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(&self, out: *mut HSTRING) -> HRESULT, - fn get_SaleEndDate(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_SaleEndDate(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_IsOnSale(&self, out: *mut bool) -> HRESULT, fn get_CurrencyCode(&self, out: *mut HSTRING) -> HRESULT }} impl IListingInformation2 { - #[inline] pub unsafe fn get_formatted_base_price(&self) -> Result { + #[inline] pub fn get_formatted_base_price(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FormattedBasePrice)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sale_end_date(&self) -> Result { + }} + #[inline] pub fn get_sale_end_date(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SaleEndDate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_on_sale(&self) -> Result { + }} + #[inline] pub fn get_is_on_sale(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsOnSale)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_currency_code(&self) -> Result { + }} + #[inline] pub fn get_currency_code(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CurrencyCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut HSTRING) -> HRESULT, fn get_IsActive(&self, out: *mut bool) -> HRESULT, - fn get_ExpirationDate(&self, out: *mut super::super::foundation::DateTime) -> HRESULT + fn get_ExpirationDate(&self, out: *mut foundation::DateTime) -> HRESULT }} impl IProductLicense { - #[inline] pub unsafe fn get_product_id(&self) -> Result { + #[inline] pub fn get_product_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProductId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_active(&self) -> Result { + }} + #[inline] pub fn get_is_active(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsActive)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_expiration_date(&self) -> Result { + }} + #[inline] pub fn get_expiration_date(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExpirationDate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ProductLicense: IProductLicense} DEFINE_IID!(IID_IProductLicenseWithFulfillment, 4233321610, 63079, 16627, 186, 60, 4, 90, 99, 171, 179, 172); @@ -24857,11 +24857,11 @@ RT_INTERFACE!{interface IProductLicenseWithFulfillment(IProductLicenseWithFulfil fn get_IsConsumable(&self, out: *mut bool) -> HRESULT }} impl IProductLicenseWithFulfillment { - #[inline] pub unsafe fn get_is_consumable(&self) -> Result { + #[inline] pub fn get_is_consumable(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsConsumable)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IProductListing, 1168627373, 51024, 19868, 148, 124, 176, 13, 203, 249, 233, 194); RT_INTERFACE!{interface IProductListing(IProductListingVtbl): IInspectable(IInspectableVtbl) [IID_IProductListing] { @@ -24870,97 +24870,97 @@ RT_INTERFACE!{interface IProductListing(IProductListingVtbl): IInspectable(IInsp fn get_Name(&self, out: *mut HSTRING) -> HRESULT }} impl IProductListing { - #[inline] pub unsafe fn get_product_id(&self) -> Result { + #[inline] pub fn get_product_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProductId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_formatted_price(&self) -> Result { + }} + #[inline] pub fn get_formatted_price(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FormattedPrice)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_name(&self) -> Result { + }} + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ProductListing: IProductListing} 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(&self, out: *mut HSTRING) -> HRESULT, - fn get_SaleEndDate(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_SaleEndDate(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_IsOnSale(&self, out: *mut bool) -> HRESULT, fn get_CurrencyCode(&self, out: *mut HSTRING) -> HRESULT }} impl IProductListing2 { - #[inline] pub unsafe fn get_formatted_base_price(&self) -> Result { + #[inline] pub fn get_formatted_base_price(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FormattedBasePrice)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sale_end_date(&self) -> Result { + }} + #[inline] pub fn get_sale_end_date(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SaleEndDate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_on_sale(&self) -> Result { + }} + #[inline] pub fn get_is_on_sale(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsOnSale)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_currency_code(&self) -> Result { + }} + #[inline] pub fn get_currency_code(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CurrencyCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut ProductType) -> HRESULT }} impl IProductListingWithConsumables { - #[inline] pub unsafe fn get_product_type(&self) -> Result { + #[inline] pub fn get_product_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProductType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, out: *mut HSTRING) -> HRESULT, - fn get_Keywords(&self, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT, + fn get_Keywords(&self, out: *mut *mut foundation::collections::IIterable) -> HRESULT, fn get_ProductType(&self, out: *mut ProductType) -> HRESULT, fn get_Tag(&self, out: *mut HSTRING) -> HRESULT, - fn get_ImageUri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT + fn get_ImageUri(&self, out: *mut *mut foundation::Uri) -> HRESULT }} impl IProductListingWithMetadata { - #[inline] pub unsafe fn get_description(&self) -> Result { + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_keywords(&self) -> Result>> { + }} + #[inline] pub fn get_keywords(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Keywords)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_product_type(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_product_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProductType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_tag(&self) -> Result { + }} + #[inline] pub fn get_tag(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Tag)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_image_uri(&self) -> Result> { + }} + #[inline] pub fn get_image_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ImageUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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] { @@ -24968,45 +24968,45 @@ RT_INTERFACE!{interface IProductPurchaseDisplayProperties(IProductPurchaseDispla fn put_Name(&self, value: HSTRING) -> HRESULT, fn get_Description(&self, out: *mut HSTRING) -> HRESULT, fn put_Description(&self, value: HSTRING) -> HRESULT, - fn get_Image(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_Image(&self, value: *mut super::super::foundation::Uri) -> HRESULT + fn get_Image(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_Image(&self, value: *mut foundation::Uri) -> HRESULT }} impl IProductPurchaseDisplayProperties { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Name)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_description(&self) -> Result { + }} + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_description(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_description(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Description)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_image(&self) -> Result> { + }} + #[inline] pub fn get_image(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Image)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_image(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_image(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Image)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ProductPurchaseDisplayProperties: IProductPurchaseDisplayProperties} impl RtActivatable for ProductPurchaseDisplayProperties {} impl RtActivatable for ProductPurchaseDisplayProperties {} impl ProductPurchaseDisplayProperties { - #[inline] pub fn create_product_purchase_display_properties(name: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_product_purchase_display_properties(name: &HStringArg) -> Result> { >::get_activation_factory().create_product_purchase_display_properties(name) - }} + } } DEFINE_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]) [CLSID_ProductPurchaseDisplayProperties]); DEFINE_IID!(IID_IProductPurchaseDisplayPropertiesFactory, 1867062772, 13014, 19264, 180, 116, 184, 48, 56, 164, 217, 207); @@ -25014,11 +25014,11 @@ RT_INTERFACE!{static interface IProductPurchaseDisplayPropertiesFactory(IProduct fn CreateProductPurchaseDisplayProperties(&self, name: HSTRING, out: *mut *mut ProductPurchaseDisplayProperties) -> HRESULT }} impl IProductPurchaseDisplayPropertiesFactory { - #[inline] pub unsafe fn create_product_purchase_display_properties(&self, name: &HStringArg) -> Result> { + #[inline] pub fn create_product_purchase_display_properties(&self, name: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateProductPurchaseDisplayProperties)(self as *const _ as *mut _, name.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum ProductPurchaseStatus: i32 { Succeeded (ProductPurchaseStatus_Succeeded) = 0, AlreadyPurchased (ProductPurchaseStatus_AlreadyPurchased) = 1, NotFulfilled (ProductPurchaseStatus_NotFulfilled) = 2, NotPurchased (ProductPurchaseStatus_NotPurchased) = 3, @@ -25034,26 +25034,26 @@ RT_INTERFACE!{interface IPurchaseResults(IPurchaseResultsVtbl): IInspectable(IIn fn get_OfferId(&self, out: *mut HSTRING) -> HRESULT }} impl IPurchaseResults { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_transaction_id(&self) -> Result { + }} + #[inline] pub fn get_transaction_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TransactionId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_receipt_xml(&self) -> Result { + }} + #[inline] pub fn get_receipt_xml(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ReceiptXml)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_offer_id(&self) -> Result { + }} + #[inline] pub fn get_offer_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OfferId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PurchaseResults: IPurchaseResults} DEFINE_IID!(IID_IUnfulfilledConsumable, 771226555, 7389, 19640, 160, 20, 123, 156, 248, 152, 105, 39); @@ -25063,21 +25063,21 @@ RT_INTERFACE!{interface IUnfulfilledConsumable(IUnfulfilledConsumableVtbl): IIns fn get_OfferId(&self, out: *mut HSTRING) -> HRESULT }} impl IUnfulfilledConsumable { - #[inline] pub unsafe fn get_product_id(&self) -> Result { + #[inline] pub fn get_product_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProductId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_transaction_id(&self) -> Result { + }} + #[inline] pub fn get_transaction_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TransactionId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_offer_id(&self) -> Result { + }} + #[inline] pub fn get_offer_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OfferId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class UnfulfilledConsumable: IUnfulfilledConsumable} pub mod preview { // Windows.ApplicationModel.Store.Preview @@ -25088,176 +25088,176 @@ impl RtActivatable for StoreConfiguration {} impl RtActivatable for StoreConfiguration {} impl RtActivatable for StoreConfiguration {} impl StoreConfiguration { - #[inline] pub fn set_system_configuration(catalogHardwareManufacturerId: &HStringArg, catalogStoreContentModifierId: &HStringArg, systemConfigurationExpiration: ::rt::gen::windows::foundation::DateTime, catalogHardwareDescriptor: &HStringArg) -> Result<()> { unsafe { + #[inline] pub fn set_system_configuration(catalogHardwareManufacturerId: &HStringArg, catalogStoreContentModifierId: &HStringArg, systemConfigurationExpiration: foundation::DateTime, catalogHardwareDescriptor: &HStringArg) -> Result<()> { >::get_activation_factory().set_system_configuration(catalogHardwareManufacturerId, catalogStoreContentModifierId, systemConfigurationExpiration, catalogHardwareDescriptor) - }} - #[inline] pub fn set_mobile_operator_configuration(mobileOperatorId: &HStringArg, appDownloadLimitInMegabytes: u32, updateDownloadLimitInMegabytes: u32) -> Result<()> { unsafe { + } + #[inline] pub fn set_mobile_operator_configuration(mobileOperatorId: &HStringArg, appDownloadLimitInMegabytes: u32, updateDownloadLimitInMegabytes: u32) -> Result<()> { >::get_activation_factory().set_mobile_operator_configuration(mobileOperatorId, appDownloadLimitInMegabytes, updateDownloadLimitInMegabytes) - }} - #[inline] pub fn set_store_web_account_id(webAccountId: &HStringArg) -> Result<()> { unsafe { + } + #[inline] pub fn set_store_web_account_id(webAccountId: &HStringArg) -> Result<()> { >::get_activation_factory().set_store_web_account_id(webAccountId) - }} - #[inline] pub fn is_store_web_account_id(webAccountId: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn is_store_web_account_id(webAccountId: &HStringArg) -> Result { >::get_activation_factory().is_store_web_account_id(webAccountId) - }} - #[inline] pub fn get_hardware_manufacturer_info() -> Result> { unsafe { + } + #[inline] pub fn get_hardware_manufacturer_info() -> Result>> { >::get_activation_factory().get_hardware_manufacturer_info() - }} - #[inline] pub fn filter_unsupported_system_features_async(systemFeatures: &::rt::gen::windows::foundation::collections::IIterable) -> Result>>> { unsafe { + } + #[inline] pub fn filter_unsupported_system_features_async(systemFeatures: &foundation::collections::IIterable) -> Result>>> { >::get_activation_factory().filter_unsupported_system_features_async(systemFeatures) - }} - #[inline] pub fn get_purchase_prompting_policy() -> Result>> { unsafe { + } + #[inline] pub fn get_purchase_prompting_policy() -> Result>>> { >::get_activation_factory().get_purchase_prompting_policy() - }} - #[inline] pub fn set_purchase_prompting_policy(value: &::rt::gen::windows::foundation::IReference) -> Result<()> { unsafe { + } + #[inline] pub fn set_purchase_prompting_policy(value: &foundation::IReference) -> Result<()> { >::get_activation_factory().set_purchase_prompting_policy(value) - }} - #[inline] pub fn has_store_web_account() -> Result { unsafe { + } + #[inline] pub fn has_store_web_account() -> Result { >::get_activation_factory().has_store_web_account() - }} - #[cfg(feature="windows-system")] #[inline] pub fn has_store_web_account_for_user(user: &::rt::gen::windows::system::User) -> Result { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn has_store_web_account_for_user(user: &::rt::gen::windows::system::User) -> Result { >::get_activation_factory().has_store_web_account_for_user(user) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn get_store_log_data_async(options: StoreLogOptions) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn get_store_log_data_async(options: StoreLogOptions) -> Result>> { >::get_activation_factory().get_store_log_data_async(options) - }} - #[cfg(feature="windows-system")] #[inline] pub fn set_store_web_account_id_for_user(user: &::rt::gen::windows::system::User, webAccountId: &HStringArg) -> Result<()> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn set_store_web_account_id_for_user(user: &::rt::gen::windows::system::User, webAccountId: &HStringArg) -> Result<()> { >::get_activation_factory().set_store_web_account_id_for_user(user, webAccountId) - }} - #[cfg(feature="windows-system")] #[inline] pub fn is_store_web_account_id_for_user(user: &::rt::gen::windows::system::User, webAccountId: &HStringArg) -> Result { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn is_store_web_account_id_for_user(user: &::rt::gen::windows::system::User, webAccountId: &HStringArg) -> Result { >::get_activation_factory().is_store_web_account_id_for_user(user, webAccountId) - }} - #[cfg(feature="windows-system")] #[inline] pub fn get_purchase_prompting_policy_for_user(user: &::rt::gen::windows::system::User) -> Result>> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn get_purchase_prompting_policy_for_user(user: &::rt::gen::windows::system::User) -> Result>>> { >::get_activation_factory().get_purchase_prompting_policy_for_user(user) - }} - #[cfg(feature="windows-system")] #[inline] pub fn set_purchase_prompting_policy_for_user(user: &::rt::gen::windows::system::User, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn set_purchase_prompting_policy_for_user(user: &::rt::gen::windows::system::User, value: &foundation::IReference) -> Result<()> { >::get_activation_factory().set_purchase_prompting_policy_for_user(user, value) - }} - #[inline] pub fn get_store_web_account_id() -> Result { unsafe { + } + #[inline] pub fn get_store_web_account_id() -> Result { >::get_activation_factory().get_store_web_account_id() - }} - #[cfg(feature="windows-system")] #[inline] pub fn get_store_web_account_id_for_user(user: &::rt::gen::windows::system::User) -> Result { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn get_store_web_account_id_for_user(user: &::rt::gen::windows::system::User) -> Result { >::get_activation_factory().get_store_web_account_id_for_user(user) - }} - #[inline] pub fn set_enterprise_store_web_account_id(webAccountId: &HStringArg) -> Result<()> { unsafe { + } + #[inline] pub fn set_enterprise_store_web_account_id(webAccountId: &HStringArg) -> Result<()> { >::get_activation_factory().set_enterprise_store_web_account_id(webAccountId) - }} - #[cfg(feature="windows-system")] #[inline] pub fn set_enterprise_store_web_account_id_for_user(user: &::rt::gen::windows::system::User, webAccountId: &HStringArg) -> Result<()> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn set_enterprise_store_web_account_id_for_user(user: &::rt::gen::windows::system::User, webAccountId: &HStringArg) -> Result<()> { >::get_activation_factory().set_enterprise_store_web_account_id_for_user(user, webAccountId) - }} - #[inline] pub fn get_enterprise_store_web_account_id() -> Result { unsafe { + } + #[inline] pub fn get_enterprise_store_web_account_id() -> Result { >::get_activation_factory().get_enterprise_store_web_account_id() - }} - #[cfg(feature="windows-system")] #[inline] pub fn get_enterprise_store_web_account_id_for_user(user: &::rt::gen::windows::system::User) -> Result { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn get_enterprise_store_web_account_id_for_user(user: &::rt::gen::windows::system::User) -> Result { >::get_activation_factory().get_enterprise_store_web_account_id_for_user(user) - }} - #[inline] pub fn should_restrict_to_enterprise_store_only() -> Result { unsafe { + } + #[inline] pub fn should_restrict_to_enterprise_store_only() -> Result { >::get_activation_factory().should_restrict_to_enterprise_store_only() - }} - #[cfg(feature="windows-system")] #[inline] pub fn should_restrict_to_enterprise_store_only_for_user(user: &::rt::gen::windows::system::User) -> Result { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn should_restrict_to_enterprise_store_only_for_user(user: &::rt::gen::windows::system::User) -> Result { >::get_activation_factory().should_restrict_to_enterprise_store_only_for_user(user) - }} + } } DEFINE_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]) [CLSID_StoreConfiguration]); 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(&self, catalogHardwareManufacturerId: HSTRING, catalogStoreContentModifierId: HSTRING, systemConfigurationExpiration: ::rt::gen::windows::foundation::DateTime, catalogHardwareDescriptor: HSTRING) -> HRESULT, + fn SetSystemConfiguration(&self, catalogHardwareManufacturerId: HSTRING, catalogStoreContentModifierId: HSTRING, systemConfigurationExpiration: foundation::DateTime, catalogHardwareDescriptor: HSTRING) -> HRESULT, fn SetMobileOperatorConfiguration(&self, mobileOperatorId: HSTRING, appDownloadLimitInMegabytes: u32, updateDownloadLimitInMegabytes: u32) -> HRESULT, fn SetStoreWebAccountId(&self, webAccountId: HSTRING) -> HRESULT, fn IsStoreWebAccountId(&self, webAccountId: HSTRING, out: *mut bool) -> HRESULT, fn get_HardwareManufacturerInfo(&self, out: *mut *mut StoreHardwareManufacturerInfo) -> HRESULT, - fn FilterUnsupportedSystemFeaturesAsync(&self, systemFeatures: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT + fn FilterUnsupportedSystemFeaturesAsync(&self, systemFeatures: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IStoreConfigurationStatics { - #[inline] pub unsafe fn set_system_configuration(&self, catalogHardwareManufacturerId: &HStringArg, catalogStoreContentModifierId: &HStringArg, systemConfigurationExpiration: ::rt::gen::windows::foundation::DateTime, catalogHardwareDescriptor: &HStringArg) -> Result<()> { + #[inline] pub fn set_system_configuration(&self, catalogHardwareManufacturerId: &HStringArg, catalogStoreContentModifierId: &HStringArg, systemConfigurationExpiration: foundation::DateTime, catalogHardwareDescriptor: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetSystemConfiguration)(self as *const _ as *mut _, catalogHardwareManufacturerId.get(), catalogStoreContentModifierId.get(), systemConfigurationExpiration, catalogHardwareDescriptor.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_mobile_operator_configuration(&self, mobileOperatorId: &HStringArg, appDownloadLimitInMegabytes: u32, updateDownloadLimitInMegabytes: u32) -> Result<()> { + }} + #[inline] pub fn set_mobile_operator_configuration(&self, mobileOperatorId: &HStringArg, appDownloadLimitInMegabytes: u32, updateDownloadLimitInMegabytes: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetMobileOperatorConfiguration)(self as *const _ as *mut _, mobileOperatorId.get(), appDownloadLimitInMegabytes, updateDownloadLimitInMegabytes); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_store_web_account_id(&self, webAccountId: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_store_web_account_id(&self, webAccountId: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetStoreWebAccountId)(self as *const _ as *mut _, webAccountId.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn is_store_web_account_id(&self, webAccountId: &HStringArg) -> Result { + }} + #[inline] pub fn is_store_web_account_id(&self, webAccountId: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsStoreWebAccountId)(self as *const _ as *mut _, webAccountId.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_hardware_manufacturer_info(&self) -> Result> { + }} + #[inline] pub fn get_hardware_manufacturer_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HardwareManufacturerInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn filter_unsupported_system_features_async(&self, systemFeatures: &::rt::gen::windows::foundation::collections::IIterable) -> Result>>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn filter_unsupported_system_features_async(&self, systemFeatures: &foundation::collections::IIterable) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FilterUnsupportedSystemFeaturesAsync)(self as *const _ as *mut _, systemFeatures as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn put_PurchasePromptingPolicy(&self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT + fn get_PurchasePromptingPolicy(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_PurchasePromptingPolicy(&self, value: *mut foundation::IReference) -> HRESULT }} impl IStoreConfigurationStatics2 { - #[inline] pub unsafe fn get_purchase_prompting_policy(&self) -> Result>> { + #[inline] pub fn get_purchase_prompting_policy(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PurchasePromptingPolicy)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_purchase_prompting_policy(&self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_purchase_prompting_policy(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PurchasePromptingPolicy)(self as *const _ as *mut _, 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(&self, out: *mut bool) -> HRESULT, #[cfg(feature="windows-system")] fn HasStoreWebAccountForUser(&self, user: *mut ::rt::gen::windows::system::User, out: *mut bool) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy2(&self) -> (), - #[cfg(feature="windows-storage")] fn GetStoreLogDataAsync(&self, options: StoreLogOptions, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::storage::streams::IRandomAccessStreamReference>) -> HRESULT, + #[cfg(feature="windows-storage")] fn GetStoreLogDataAsync(&self, options: StoreLogOptions, out: *mut *mut foundation::IAsyncOperation<::rt::gen::windows::storage::streams::IRandomAccessStreamReference>) -> HRESULT, #[cfg(feature="windows-system")] fn SetStoreWebAccountIdForUser(&self, user: *mut ::rt::gen::windows::system::User, webAccountId: HSTRING) -> HRESULT, #[cfg(feature="windows-system")] fn IsStoreWebAccountIdForUser(&self, user: *mut ::rt::gen::windows::system::User, webAccountId: HSTRING, out: *mut bool) -> HRESULT, - #[cfg(feature="windows-system")] fn GetPurchasePromptingPolicyForUser(&self, user: *mut ::rt::gen::windows::system::User, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - #[cfg(feature="windows-system")] fn SetPurchasePromptingPolicyForUser(&self, user: *mut ::rt::gen::windows::system::User, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT + #[cfg(feature="windows-system")] fn GetPurchasePromptingPolicyForUser(&self, user: *mut ::rt::gen::windows::system::User, out: *mut *mut foundation::IReference) -> HRESULT, + #[cfg(feature="windows-system")] fn SetPurchasePromptingPolicyForUser(&self, user: *mut ::rt::gen::windows::system::User, value: *mut foundation::IReference) -> HRESULT }} impl IStoreConfigurationStatics3 { - #[inline] pub unsafe fn has_store_web_account(&self) -> Result { + #[inline] pub fn has_store_web_account(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).HasStoreWebAccount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn has_store_web_account_for_user(&self, user: &::rt::gen::windows::system::User) -> Result { + }} + #[cfg(feature="windows-system")] #[inline] pub fn has_store_web_account_for_user(&self, user: &::rt::gen::windows::system::User) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).HasStoreWebAccountForUser)(self as *const _ as *mut _, user as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_store_log_data_async(&self, options: StoreLogOptions) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_store_log_data_async(&self, options: StoreLogOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetStoreLogDataAsync)(self as *const _ as *mut _, 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(&self, user: &::rt::gen::windows::system::User, webAccountId: &HStringArg) -> Result<()> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn set_store_web_account_id_for_user(&self, user: &::rt::gen::windows::system::User, webAccountId: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetStoreWebAccountIdForUser)(self as *const _ as *mut _, 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(&self, user: &::rt::gen::windows::system::User, webAccountId: &HStringArg) -> Result { + }} + #[cfg(feature="windows-system")] #[inline] pub fn is_store_web_account_id_for_user(&self, user: &::rt::gen::windows::system::User, webAccountId: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsStoreWebAccountIdForUser)(self as *const _ as *mut _, 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(&self, user: &::rt::gen::windows::system::User) -> Result>> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_purchase_prompting_policy_for_user(&self, user: &::rt::gen::windows::system::User) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPurchasePromptingPolicyForUser)(self as *const _ as *mut _, 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(&self, user: &::rt::gen::windows::system::User, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-system")] #[inline] pub fn set_purchase_prompting_policy_for_user(&self, user: &::rt::gen::windows::system::User, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetPurchasePromptingPolicyForUser)(self as *const _ as *mut _, user as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IStoreConfigurationStatics4, 553604818, 20195, 19696, 155, 18, 85, 44, 3, 49, 15, 117); RT_INTERFACE!{static interface IStoreConfigurationStatics4(IStoreConfigurationStatics4Vtbl): IInspectable(IInspectableVtbl) [IID_IStoreConfigurationStatics4] { @@ -25271,44 +25271,44 @@ RT_INTERFACE!{static interface IStoreConfigurationStatics4(IStoreConfigurationSt #[cfg(feature="windows-system")] fn ShouldRestrictToEnterpriseStoreOnlyForUser(&self, user: *mut ::rt::gen::windows::system::User, out: *mut bool) -> HRESULT }} impl IStoreConfigurationStatics4 { - #[inline] pub unsafe fn get_store_web_account_id(&self) -> Result { + #[inline] pub fn get_store_web_account_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetStoreWebAccountId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_store_web_account_id_for_user(&self, user: &::rt::gen::windows::system::User) -> Result { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_store_web_account_id_for_user(&self, user: &::rt::gen::windows::system::User) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetStoreWebAccountIdForUser)(self as *const _ as *mut _, user as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_enterprise_store_web_account_id(&self, webAccountId: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_enterprise_store_web_account_id(&self, webAccountId: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetEnterpriseStoreWebAccountId)(self as *const _ as *mut _, webAccountId.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn set_enterprise_store_web_account_id_for_user(&self, user: &::rt::gen::windows::system::User, webAccountId: &HStringArg) -> Result<()> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn set_enterprise_store_web_account_id_for_user(&self, user: &::rt::gen::windows::system::User, webAccountId: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetEnterpriseStoreWebAccountIdForUser)(self as *const _ as *mut _, user as *const _ as *mut _, webAccountId.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_enterprise_store_web_account_id(&self) -> Result { + }} + #[inline] pub fn get_enterprise_store_web_account_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetEnterpriseStoreWebAccountId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_enterprise_store_web_account_id_for_user(&self, user: &::rt::gen::windows::system::User) -> Result { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_enterprise_store_web_account_id_for_user(&self, user: &::rt::gen::windows::system::User) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetEnterpriseStoreWebAccountIdForUser)(self as *const _ as *mut _, user as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn should_restrict_to_enterprise_store_only(&self) -> Result { + }} + #[inline] pub fn should_restrict_to_enterprise_store_only(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ShouldRestrictToEnterpriseStoreOnly)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn should_restrict_to_enterprise_store_only_for_user(&self, user: &::rt::gen::windows::system::User) -> Result { + }} + #[cfg(feature="windows-system")] #[inline] pub fn should_restrict_to_enterprise_store_only_for_user(&self, user: &::rt::gen::windows::system::User) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ShouldRestrictToEnterpriseStoreOnlyForUser)(self as *const _ as *mut _, user as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IStoreHardwareManufacturerInfo, 4069710856, 50772, 17324, 162, 31, 52, 128, 28, 157, 51, 136); RT_INTERFACE!{interface IStoreHardwareManufacturerInfo(IStoreHardwareManufacturerInfoVtbl): IInspectable(IInspectableVtbl) [IID_IStoreHardwareManufacturerInfo] { @@ -25318,26 +25318,26 @@ RT_INTERFACE!{interface IStoreHardwareManufacturerInfo(IStoreHardwareManufacture fn get_ManufacturerName(&self, out: *mut HSTRING) -> HRESULT }} impl IStoreHardwareManufacturerInfo { - #[inline] pub unsafe fn get_hardware_manufacturer_id(&self) -> Result { + #[inline] pub fn get_hardware_manufacturer_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HardwareManufacturerId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_store_content_modifier_id(&self) -> Result { + }} + #[inline] pub fn get_store_content_modifier_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StoreContentModifierId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_model_name(&self) -> Result { + }} + #[inline] pub fn get_model_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ModelName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_manufacturer_name(&self) -> Result { + }} + #[inline] pub fn get_manufacturer_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ManufacturerName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class StoreHardwareManufacturerInfo: IStoreHardwareManufacturerInfo} RT_ENUM! { enum StoreLogOptions: u32 { @@ -25345,30 +25345,30 @@ RT_ENUM! { enum StoreLogOptions: u32 { }} 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(&self, productId: HSTRING, skuId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn LoadAddOnProductInfosAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT + fn RequestProductPurchaseByProductIdAndSkuIdAsync(&self, productId: HSTRING, skuId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn LoadAddOnProductInfosAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IStorePreview { - #[inline] pub unsafe fn request_product_purchase_by_product_id_and_sku_id_async(&self, productId: &HStringArg, skuId: &HStringArg) -> Result>> { + #[inline] pub fn request_product_purchase_by_product_id_and_sku_id_async(&self, productId: &HStringArg, skuId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestProductPurchaseByProductIdAndSkuIdAsync)(self as *const _ as *mut _, 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(&self) -> Result>>> { + }} + #[inline] pub fn load_add_on_product_infos_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LoadAddOnProductInfosAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class StorePreview} impl RtActivatable for StorePreview {} impl StorePreview { - #[inline] pub fn request_product_purchase_by_product_id_and_sku_id_async(productId: &HStringArg, skuId: &HStringArg) -> Result>> { unsafe { + #[inline] pub fn request_product_purchase_by_product_id_and_sku_id_async(productId: &HStringArg, skuId: &HStringArg) -> Result>> { >::get_activation_factory().request_product_purchase_by_product_id_and_sku_id_async(productId, skuId) - }} - #[inline] pub fn load_add_on_product_infos_async() -> Result>>> { unsafe { + } + #[inline] pub fn load_add_on_product_infos_async() -> Result>>> { >::get_activation_factory().load_add_on_product_infos_async() - }} + } } DEFINE_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]) [CLSID_StorePreview]); DEFINE_IID!(IID_IStorePreviewProductInfo, 423091123, 27649, 19613, 133, 205, 91, 171, 170, 194, 179, 81); @@ -25377,34 +25377,34 @@ RT_INTERFACE!{interface IStorePreviewProductInfo(IStorePreviewProductInfoVtbl): fn get_ProductType(&self, out: *mut HSTRING) -> HRESULT, fn get_Title(&self, out: *mut HSTRING) -> HRESULT, fn get_Description(&self, out: *mut HSTRING) -> HRESULT, - fn get_SkuInfoList(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn get_SkuInfoList(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IStorePreviewProductInfo { - #[inline] pub unsafe fn get_product_id(&self) -> Result { + #[inline] pub fn get_product_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProductId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_product_type(&self) -> Result { + }} + #[inline] pub fn get_product_type(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProductType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_title(&self) -> Result { + }} + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_description(&self) -> Result { + }} + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sku_info_list(&self) -> Result>> { + }} + #[inline] pub fn get_sku_info_list(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SkuInfoList)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class StorePreviewProductInfo: IStorePreviewProductInfo} RT_ENUM! { enum StorePreviewProductPurchaseStatus: i32 { @@ -25415,11 +25415,11 @@ RT_INTERFACE!{interface IStorePreviewPurchaseResults(IStorePreviewPurchaseResult fn get_ProductPurchaseStatus(&self, out: *mut StorePreviewProductPurchaseStatus) -> HRESULT }} impl IStorePreviewPurchaseResults { - #[inline] pub unsafe fn get_product_purchase_status(&self) -> Result { + #[inline] pub fn get_product_purchase_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProductPurchaseStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class StorePreviewPurchaseResults: IStorePreviewPurchaseResults} DEFINE_IID!(IID_IStorePreviewSkuInfo, 2180871906, 2854, 18649, 152, 206, 39, 70, 28, 102, 157, 108); @@ -25435,51 +25435,51 @@ RT_INTERFACE!{interface IStorePreviewSkuInfo(IStorePreviewSkuInfoVtbl): IInspect fn get_ExtendedData(&self, out: *mut HSTRING) -> HRESULT }} impl IStorePreviewSkuInfo { - #[inline] pub unsafe fn get_product_id(&self) -> Result { + #[inline] pub fn get_product_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProductId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sku_id(&self) -> Result { + }} + #[inline] pub fn get_sku_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SkuId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sku_type(&self) -> Result { + }} + #[inline] pub fn get_sku_type(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SkuType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_title(&self) -> Result { + }} + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_description(&self) -> Result { + }} + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_custom_developer_data(&self) -> Result { + }} + #[inline] pub fn get_custom_developer_data(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CustomDeveloperData)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_currency_code(&self) -> Result { + }} + #[inline] pub fn get_currency_code(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CurrencyCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_formatted_list_price(&self) -> Result { + }} + #[inline] pub fn get_formatted_list_price(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FormattedListPrice)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_data(&self) -> Result { + }} + #[inline] pub fn get_extended_data(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExtendedData)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class StorePreviewSkuInfo: IStorePreviewSkuInfo} RT_ENUM! { enum StoreSystemFeature: i32 { @@ -25487,30 +25487,30 @@ RT_ENUM! { enum StoreSystemFeature: i32 { }} DEFINE_IID!(IID_IWebAuthenticationCoreManagerHelper, 111478053, 59157, 16675, 146, 118, 157, 111, 134, 91, 165, 95); RT_INTERFACE!{static interface IWebAuthenticationCoreManagerHelper(IWebAuthenticationCoreManagerHelperVtbl): IInspectable(IInspectableVtbl) [IID_IWebAuthenticationCoreManagerHelper] { - #[cfg(all(feature="windows-security",feature="windows-ui-xaml"))] fn RequestTokenWithUIElementHostingAsync(&self, request: *mut ::rt::gen::windows::security::authentication::web::core::WebTokenRequest, uiElement: *mut ::rt::gen::windows::ui::xaml::UIElement, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::security::authentication::web::core::WebTokenRequestResult>) -> HRESULT, - #[cfg(all(feature="windows-security",feature="windows-ui-xaml"))] fn RequestTokenWithUIElementHostingAndWebAccountAsync(&self, request: *mut ::rt::gen::windows::security::authentication::web::core::WebTokenRequest, webAccount: *mut ::rt::gen::windows::security::credentials::WebAccount, uiElement: *mut ::rt::gen::windows::ui::xaml::UIElement, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::security::authentication::web::core::WebTokenRequestResult>) -> HRESULT + #[cfg(all(feature="windows-security",feature="windows-ui-xaml"))] fn RequestTokenWithUIElementHostingAsync(&self, request: *mut ::rt::gen::windows::security::authentication::web::core::WebTokenRequest, uiElement: *mut ::rt::gen::windows::ui::xaml::UIElement, out: *mut *mut foundation::IAsyncOperation<::rt::gen::windows::security::authentication::web::core::WebTokenRequestResult>) -> HRESULT, + #[cfg(all(feature="windows-security",feature="windows-ui-xaml"))] fn RequestTokenWithUIElementHostingAndWebAccountAsync(&self, request: *mut ::rt::gen::windows::security::authentication::web::core::WebTokenRequest, webAccount: *mut ::rt::gen::windows::security::credentials::WebAccount, uiElement: *mut ::rt::gen::windows::ui::xaml::UIElement, out: *mut *mut foundation::IAsyncOperation<::rt::gen::windows::security::authentication::web::core::WebTokenRequestResult>) -> HRESULT }} impl IWebAuthenticationCoreManagerHelper { - #[cfg(all(feature="windows-security",feature="windows-ui-xaml"))] #[inline] pub unsafe fn request_token_with_uielement_hosting_async(&self, request: &::rt::gen::windows::security::authentication::web::core::WebTokenRequest, uiElement: &::rt::gen::windows::ui::xaml::UIElement) -> Result>> { + #[cfg(all(feature="windows-security",feature="windows-ui-xaml"))] #[inline] pub fn request_token_with_uielement_hosting_async(&self, request: &::rt::gen::windows::security::authentication::web::core::WebTokenRequest, uiElement: &::rt::gen::windows::ui::xaml::UIElement) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestTokenWithUIElementHostingAsync)(self as *const _ as *mut _, request as *const _ as *mut _, uiElement as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(all(feature="windows-security",feature="windows-ui-xaml"))] #[inline] pub unsafe fn request_token_with_uielement_hosting_and_web_account_async(&self, request: &::rt::gen::windows::security::authentication::web::core::WebTokenRequest, webAccount: &::rt::gen::windows::security::credentials::WebAccount, uiElement: &::rt::gen::windows::ui::xaml::UIElement) -> Result>> { + }} + #[cfg(all(feature="windows-security",feature="windows-ui-xaml"))] #[inline] pub fn request_token_with_uielement_hosting_and_web_account_async(&self, request: &::rt::gen::windows::security::authentication::web::core::WebTokenRequest, webAccount: &::rt::gen::windows::security::credentials::WebAccount, uiElement: &::rt::gen::windows::ui::xaml::UIElement) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestTokenWithUIElementHostingAndWebAccountAsync)(self as *const _ as *mut _, request as *const _ as *mut _, webAccount as *const _ as *mut _, uiElement as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class WebAuthenticationCoreManagerHelper} impl RtActivatable for WebAuthenticationCoreManagerHelper {} impl WebAuthenticationCoreManagerHelper { - #[cfg(all(feature="windows-security",feature="windows-ui-xaml"))] #[inline] pub fn request_token_with_uielement_hosting_async(request: &::rt::gen::windows::security::authentication::web::core::WebTokenRequest, uiElement: &::rt::gen::windows::ui::xaml::UIElement) -> Result>> { unsafe { + #[cfg(all(feature="windows-security",feature="windows-ui-xaml"))] #[inline] pub fn request_token_with_uielement_hosting_async(request: &::rt::gen::windows::security::authentication::web::core::WebTokenRequest, uiElement: &::rt::gen::windows::ui::xaml::UIElement) -> Result>> { >::get_activation_factory().request_token_with_uielement_hosting_async(request, uiElement) - }} - #[cfg(all(feature="windows-security",feature="windows-ui-xaml"))] #[inline] pub fn request_token_with_uielement_hosting_and_web_account_async(request: &::rt::gen::windows::security::authentication::web::core::WebTokenRequest, webAccount: &::rt::gen::windows::security::credentials::WebAccount, uiElement: &::rt::gen::windows::ui::xaml::UIElement) -> Result>> { unsafe { + } + #[cfg(all(feature="windows-security",feature="windows-ui-xaml"))] #[inline] pub fn request_token_with_uielement_hosting_and_web_account_async(request: &::rt::gen::windows::security::authentication::web::core::WebTokenRequest, webAccount: &::rt::gen::windows::security::credentials::WebAccount, uiElement: &::rt::gen::windows::ui::xaml::UIElement) -> Result>> { >::get_activation_factory().request_token_with_uielement_hosting_and_web_account_async(request, webAccount, uiElement) - }} + } } DEFINE_CLSID!(WebAuthenticationCoreManagerHelper(&[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,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,72,101,108,112,101,114,0]) [CLSID_WebAuthenticationCoreManagerHelper]); pub mod installcontrol { // Windows.ApplicationModel.Store.Preview.InstallControl @@ -25525,67 +25525,67 @@ RT_INTERFACE!{interface IAppInstallItem(IAppInstallItemVtbl): IInspectable(IInsp fn Cancel(&self) -> HRESULT, fn Pause(&self) -> HRESULT, fn Restart(&self) -> HRESULT, - fn add_Completed(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Completed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_StatusChanged(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StatusChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn add_Completed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Completed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_StatusChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StatusChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IAppInstallItem { - #[inline] pub unsafe fn get_product_id(&self) -> Result { + #[inline] pub fn get_product_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProductId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_package_family_name(&self) -> Result { + }} + #[inline] pub fn get_package_family_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PackageFamilyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_install_type(&self) -> Result { + }} + #[inline] pub fn get_install_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InstallType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_user_initiated(&self) -> Result { + }} + #[inline] pub fn get_is_user_initiated(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsUserInitiated)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_status(&self) -> Result> { + }} + #[inline] pub fn get_current_status(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentStatus)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn cancel(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn cancel(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Cancel)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn pause(&self) -> Result<()> { + }} + #[inline] pub fn pause(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Pause)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn restart(&self) -> Result<()> { + }} + #[inline] pub fn restart(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Restart)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_completed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Completed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_completed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Completed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_status_changed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_status_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StatusChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_status_changed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_status_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StatusChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AppInstallItem: IAppInstallItem} DEFINE_IID!(IID_IAppInstallItem2, 3549899512, 16576, 20439, 170, 108, 10, 161, 60, 166, 24, 140); @@ -25595,305 +25595,305 @@ RT_INTERFACE!{interface IAppInstallItem2(IAppInstallItem2Vtbl): IInspectable(IIn fn RestartWithTelemetry(&self, correlationVector: HSTRING) -> HRESULT }} impl IAppInstallItem2 { - #[inline] pub unsafe fn cancel_with_telemetry(&self, correlationVector: &HStringArg) -> Result<()> { + #[inline] pub fn cancel_with_telemetry(&self, correlationVector: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).CancelWithTelemetry)(self as *const _ as *mut _, correlationVector.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn pause_with_telemetry(&self, correlationVector: &HStringArg) -> Result<()> { + }} + #[inline] pub fn pause_with_telemetry(&self, correlationVector: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).PauseWithTelemetry)(self as *const _ as *mut _, correlationVector.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn restart_with_telemetry(&self, correlationVector: &HStringArg) -> Result<()> { + }} + #[inline] pub fn restart_with_telemetry(&self, correlationVector: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RestartWithTelemetry)(self as *const _ as *mut _, correlationVector.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IAppInstallItem3, 1866320280, 56647, 17212, 146, 52, 86, 1, 114, 214, 122, 69); RT_INTERFACE!{interface IAppInstallItem3(IAppInstallItem3Vtbl): IInspectable(IInspectableVtbl) [IID_IAppInstallItem3] { - fn get_Children(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_Children(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_ItemOperationsMightAffectOtherItems(&self, out: *mut bool) -> HRESULT }} impl IAppInstallItem3 { - #[inline] pub unsafe fn get_children(&self) -> Result>> { + #[inline] pub fn get_children(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Children)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_item_operations_might_affect_other_items(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_item_operations_might_affect_other_items(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ItemOperationsMightAffectOtherItems)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_AppInstallItems(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn Cancel(&self, productId: HSTRING) -> HRESULT, fn Pause(&self, productId: HSTRING) -> HRESULT, fn Restart(&self, productId: HSTRING) -> HRESULT, - fn add_ItemCompleted(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ItemCompleted(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_ItemStatusChanged(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ItemStatusChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_ItemCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ItemCompleted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ItemStatusChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ItemStatusChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_AutoUpdateSetting(&self, out: *mut AutoUpdateSetting) -> HRESULT, fn put_AutoUpdateSetting(&self, value: AutoUpdateSetting) -> HRESULT, fn get_AcquisitionIdentity(&self, out: *mut HSTRING) -> HRESULT, fn put_AcquisitionIdentity(&self, value: HSTRING) -> HRESULT, - fn GetIsApplicableAsync(&self, productId: HSTRING, skuId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn StartAppInstallAsync(&self, productId: HSTRING, skuId: HSTRING, repair: bool, forceUseOfNonRemovableStorage: bool, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn UpdateAppByPackageFamilyNameAsync(&self, packageFamilyName: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn SearchForUpdatesAsync(&self, productId: HSTRING, skuId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn SearchForAllUpdatesAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, - fn IsStoreBlockedByPolicyAsync(&self, storeClientName: HSTRING, storeClientPublisher: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn GetIsAppAllowedToInstallAsync(&self, productId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn GetIsApplicableAsync(&self, productId: HSTRING, skuId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn StartAppInstallAsync(&self, productId: HSTRING, skuId: HSTRING, repair: bool, forceUseOfNonRemovableStorage: bool, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn UpdateAppByPackageFamilyNameAsync(&self, packageFamilyName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn SearchForUpdatesAsync(&self, productId: HSTRING, skuId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn SearchForAllUpdatesAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn IsStoreBlockedByPolicyAsync(&self, storeClientName: HSTRING, storeClientPublisher: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetIsAppAllowedToInstallAsync(&self, productId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IAppInstallManager { - #[inline] pub unsafe fn get_app_install_items(&self) -> Result>> { + #[inline] pub fn get_app_install_items(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppInstallItems)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn cancel(&self, productId: &HStringArg) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn cancel(&self, productId: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Cancel)(self as *const _ as *mut _, productId.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn pause(&self, productId: &HStringArg) -> Result<()> { + }} + #[inline] pub fn pause(&self, productId: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Pause)(self as *const _ as *mut _, productId.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn restart(&self, productId: &HStringArg) -> Result<()> { + }} + #[inline] pub fn restart(&self, productId: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Restart)(self as *const _ as *mut _, productId.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_item_completed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_item_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ItemCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_item_completed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_item_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ItemCompleted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_item_status_changed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_item_status_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ItemStatusChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_item_status_changed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_item_status_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ItemStatusChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_auto_update_setting(&self) -> Result { + }} + #[inline] pub fn get_auto_update_setting(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AutoUpdateSetting)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_auto_update_setting(&self, value: AutoUpdateSetting) -> Result<()> { + }} + #[inline] pub fn set_auto_update_setting(&self, value: AutoUpdateSetting) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AutoUpdateSetting)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_acquisition_identity(&self) -> Result { + }} + #[inline] pub fn get_acquisition_identity(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AcquisitionIdentity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_acquisition_identity(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_acquisition_identity(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AcquisitionIdentity)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_applicable_async(&self, productId: &HStringArg, skuId: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_is_applicable_async(&self, productId: &HStringArg, skuId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetIsApplicableAsync)(self as *const _ as *mut _, productId.get(), skuId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn start_app_install_async(&self, productId: &HStringArg, skuId: &HStringArg, repair: bool, forceUseOfNonRemovableStorage: bool) -> Result>> { + }} + #[inline] pub fn start_app_install_async(&self, productId: &HStringArg, skuId: &HStringArg, repair: bool, forceUseOfNonRemovableStorage: bool) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartAppInstallAsync)(self as *const _ as *mut _, productId.get(), skuId.get(), repair, forceUseOfNonRemovableStorage, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn update_app_by_package_family_name_async(&self, packageFamilyName: &HStringArg) -> Result>> { + }} + #[inline] pub fn update_app_by_package_family_name_async(&self, packageFamilyName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UpdateAppByPackageFamilyNameAsync)(self as *const _ as *mut _, packageFamilyName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn search_for_updates_async(&self, productId: &HStringArg, skuId: &HStringArg) -> Result>> { + }} + #[inline] pub fn search_for_updates_async(&self, productId: &HStringArg, skuId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SearchForUpdatesAsync)(self as *const _ as *mut _, productId.get(), skuId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn search_for_all_updates_async(&self) -> Result>>> { + }} + #[inline] pub fn search_for_all_updates_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SearchForAllUpdatesAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn is_store_blocked_by_policy_async(&self, storeClientName: &HStringArg, storeClientPublisher: &HStringArg) -> Result>> { + }} + #[inline] pub fn is_store_blocked_by_policy_async(&self, storeClientName: &HStringArg, storeClientPublisher: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).IsStoreBlockedByPolicyAsync)(self as *const _ as *mut _, storeClientName.get(), storeClientPublisher.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_app_allowed_to_install_async(&self, productId: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_is_app_allowed_to_install_async(&self, productId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetIsAppAllowedToInstallAsync)(self as *const _ as *mut _, productId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class AppInstallManager: IAppInstallManager} impl RtActivatable for AppInstallManager {} DEFINE_CLSID!(AppInstallManager(&[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,73,110,115,116,97,108,108,67,111,110,116,114,111,108,46,65,112,112,73,110,115,116,97,108,108,77,97,110,97,103,101,114,0]) [CLSID_AppInstallManager]); 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(&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(&self, packageFamilyName: HSTRING, correlationVector: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn SearchForUpdatesWithTelemetryAsync(&self, productId: HSTRING, skuId: HSTRING, catalogId: HSTRING, correlationVector: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn SearchForAllUpdatesWithTelemetryAsync(&self, correlationVector: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, - fn GetIsAppAllowedToInstallWithTelemetryAsync(&self, productId: HSTRING, skuId: HSTRING, catalogId: HSTRING, correlationVector: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn StartAppInstallWithTelemetryAsync(&self, productId: HSTRING, skuId: HSTRING, repair: bool, forceUseOfNonRemovableStorage: bool, catalogId: HSTRING, bundleId: HSTRING, correlationVector: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn UpdateAppByPackageFamilyNameWithTelemetryAsync(&self, packageFamilyName: HSTRING, correlationVector: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn SearchForUpdatesWithTelemetryAsync(&self, productId: HSTRING, skuId: HSTRING, catalogId: HSTRING, correlationVector: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn SearchForAllUpdatesWithTelemetryAsync(&self, correlationVector: HSTRING, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetIsAppAllowedToInstallWithTelemetryAsync(&self, productId: HSTRING, skuId: HSTRING, catalogId: HSTRING, correlationVector: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn CancelWithTelemetry(&self, productId: HSTRING, correlationVector: HSTRING) -> HRESULT, fn PauseWithTelemetry(&self, productId: HSTRING, correlationVector: HSTRING) -> HRESULT, fn RestartWithTelemetry(&self, productId: HSTRING, correlationVector: HSTRING) -> HRESULT }} impl IAppInstallManager2 { - #[inline] pub unsafe fn start_app_install_with_telemetry_async(&self, productId: &HStringArg, skuId: &HStringArg, repair: bool, forceUseOfNonRemovableStorage: bool, catalogId: &HStringArg, bundleId: &HStringArg, correlationVector: &HStringArg) -> Result>> { + #[inline] pub fn start_app_install_with_telemetry_async(&self, productId: &HStringArg, skuId: &HStringArg, repair: bool, forceUseOfNonRemovableStorage: bool, catalogId: &HStringArg, bundleId: &HStringArg, correlationVector: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartAppInstallWithTelemetryAsync)(self as *const _ as *mut _, 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 update_app_by_package_family_name_with_telemetry_async(&self, packageFamilyName: &HStringArg, correlationVector: &HStringArg) -> Result>> { + }} + #[inline] pub fn update_app_by_package_family_name_with_telemetry_async(&self, packageFamilyName: &HStringArg, correlationVector: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UpdateAppByPackageFamilyNameWithTelemetryAsync)(self 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 search_for_updates_with_telemetry_async(&self, productId: &HStringArg, skuId: &HStringArg, catalogId: &HStringArg, correlationVector: &HStringArg) -> Result>> { + }} + #[inline] pub fn search_for_updates_with_telemetry_async(&self, productId: &HStringArg, skuId: &HStringArg, catalogId: &HStringArg, correlationVector: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SearchForUpdatesWithTelemetryAsync)(self 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 search_for_all_updates_with_telemetry_async(&self, correlationVector: &HStringArg) -> Result>>> { + }} + #[inline] pub fn search_for_all_updates_with_telemetry_async(&self, correlationVector: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SearchForAllUpdatesWithTelemetryAsync)(self as *const _ as *mut _, correlationVector.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_app_allowed_to_install_with_telemetry_async(&self, productId: &HStringArg, skuId: &HStringArg, catalogId: &HStringArg, correlationVector: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_is_app_allowed_to_install_with_telemetry_async(&self, productId: &HStringArg, skuId: &HStringArg, catalogId: &HStringArg, correlationVector: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetIsAppAllowedToInstallWithTelemetryAsync)(self 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 cancel_with_telemetry(&self, productId: &HStringArg, correlationVector: &HStringArg) -> Result<()> { + }} + #[inline] pub fn cancel_with_telemetry(&self, productId: &HStringArg, correlationVector: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).CancelWithTelemetry)(self as *const _ as *mut _, productId.get(), correlationVector.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn pause_with_telemetry(&self, productId: &HStringArg, correlationVector: &HStringArg) -> Result<()> { + }} + #[inline] pub fn pause_with_telemetry(&self, productId: &HStringArg, correlationVector: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).PauseWithTelemetry)(self as *const _ as *mut _, productId.get(), correlationVector.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn restart_with_telemetry(&self, productId: &HStringArg, correlationVector: &HStringArg) -> Result<()> { + }} + #[inline] pub fn restart_with_telemetry(&self, productId: &HStringArg, correlationVector: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RestartWithTelemetry)(self as *const _ as *mut _, productId.get(), correlationVector.get()); 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(&self) -> (), - #[cfg(feature="windows-management")] fn StartProductInstallAsync(&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(feature="windows-management")] fn StartProductInstallAsync(&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 foundation::IAsyncOperation>) -> HRESULT, #[cfg(not(all(feature="windows-management",feature="windows-system")))] fn __Dummy1(&self) -> (), - #[cfg(all(feature="windows-management",feature="windows-system"))] fn StartProductInstallForUserAsync(&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(all(feature="windows-management",feature="windows-system"))] fn StartProductInstallForUserAsync(&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 foundation::IAsyncOperation>) -> HRESULT, #[cfg(not(feature="windows-system"))] fn __Dummy2(&self) -> (), - #[cfg(feature="windows-system")] fn UpdateAppByPackageFamilyNameForUserAsync(&self, user: *mut ::rt::gen::windows::system::User, packageFamilyName: HSTRING, correlationVector: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-system")] fn UpdateAppByPackageFamilyNameForUserAsync(&self, user: *mut ::rt::gen::windows::system::User, packageFamilyName: HSTRING, correlationVector: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-system"))] fn __Dummy3(&self) -> (), - #[cfg(feature="windows-system")] fn SearchForUpdatesForUserAsync(&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(feature="windows-system")] fn SearchForUpdatesForUserAsync(&self, user: *mut ::rt::gen::windows::system::User, productId: HSTRING, skuId: HSTRING, catalogId: HSTRING, correlationVector: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-system"))] fn __Dummy4(&self) -> (), - #[cfg(feature="windows-system")] fn SearchForAllUpdatesForUserAsync(&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(feature="windows-system")] fn SearchForAllUpdatesForUserAsync(&self, user: *mut ::rt::gen::windows::system::User, correlationVector: HSTRING, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, #[cfg(not(feature="windows-system"))] fn __Dummy5(&self) -> (), - #[cfg(feature="windows-system")] fn GetIsAppAllowedToInstallForUserAsync(&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(feature="windows-system")] fn GetIsAppAllowedToInstallForUserAsync(&self, user: *mut ::rt::gen::windows::system::User, productId: HSTRING, skuId: HSTRING, catalogId: HSTRING, correlationVector: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-system"))] fn __Dummy6(&self) -> (), - #[cfg(feature="windows-system")] fn GetIsApplicableForUserAsync(&self, user: *mut ::rt::gen::windows::system::User, productId: HSTRING, skuId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-system")] fn GetIsApplicableForUserAsync(&self, user: *mut ::rt::gen::windows::system::User, productId: HSTRING, skuId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn MoveToFrontOfDownloadQueue(&self, productId: HSTRING, correlationVector: HSTRING) -> HRESULT }} impl IAppInstallManager3 { - #[cfg(feature="windows-management")] #[inline] pub unsafe fn start_product_install_async(&self, productId: &HStringArg, catalogId: &HStringArg, flightId: &HStringArg, clientId: &HStringArg, repair: bool, forceUseOfNonRemovableStorage: bool, correlationVector: &HStringArg, targetVolume: &::rt::gen::windows::management::deployment::PackageVolume) -> Result>>> { + #[cfg(feature="windows-management")] #[inline] pub fn start_product_install_async(&self, productId: &HStringArg, catalogId: &HStringArg, flightId: &HStringArg, clientId: &HStringArg, repair: bool, forceUseOfNonRemovableStorage: bool, correlationVector: &HStringArg, targetVolume: &::rt::gen::windows::management::deployment::PackageVolume) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartProductInstallAsync)(self 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(all(feature="windows-management",feature="windows-system"))] #[inline] pub unsafe fn start_product_install_for_user_async(&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>>> { + }} + #[cfg(all(feature="windows-management",feature="windows-system"))] #[inline] pub fn start_product_install_for_user_async(&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>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartProductInstallForUserAsync)(self as *const _ as *mut _, 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-system")] #[inline] pub unsafe fn update_app_by_package_family_name_for_user_async(&self, user: &::rt::gen::windows::system::User, packageFamilyName: &HStringArg, correlationVector: &HStringArg) -> Result>> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn update_app_by_package_family_name_for_user_async(&self, user: &::rt::gen::windows::system::User, packageFamilyName: &HStringArg, correlationVector: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UpdateAppByPackageFamilyNameForUserAsync)(self as *const _ as *mut _, user as *const _ as *mut _, packageFamilyName.get(), correlationVector.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn search_for_updates_for_user_async(&self, user: &::rt::gen::windows::system::User, productId: &HStringArg, skuId: &HStringArg, catalogId: &HStringArg, correlationVector: &HStringArg) -> Result>> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn search_for_updates_for_user_async(&self, user: &::rt::gen::windows::system::User, productId: &HStringArg, skuId: &HStringArg, catalogId: &HStringArg, correlationVector: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SearchForUpdatesForUserAsync)(self as *const _ as *mut _, 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) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn search_for_all_updates_for_user_async(&self, user: &::rt::gen::windows::system::User, correlationVector: &HStringArg) -> Result>>> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn search_for_all_updates_for_user_async(&self, user: &::rt::gen::windows::system::User, correlationVector: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SearchForAllUpdatesForUserAsync)(self as *const _ as *mut _, user as *const _ as *mut _, correlationVector.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_is_app_allowed_to_install_for_user_async(&self, user: &::rt::gen::windows::system::User, productId: &HStringArg, skuId: &HStringArg, catalogId: &HStringArg, correlationVector: &HStringArg) -> Result>> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_is_app_allowed_to_install_for_user_async(&self, user: &::rt::gen::windows::system::User, productId: &HStringArg, skuId: &HStringArg, catalogId: &HStringArg, correlationVector: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetIsAppAllowedToInstallForUserAsync)(self as *const _ as *mut _, 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) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_is_applicable_for_user_async(&self, user: &::rt::gen::windows::system::User, productId: &HStringArg, skuId: &HStringArg) -> Result>> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_is_applicable_for_user_async(&self, user: &::rt::gen::windows::system::User, productId: &HStringArg, skuId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetIsApplicableForUserAsync)(self as *const _ as *mut _, user as *const _ as *mut _, productId.get(), skuId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn move_to_front_of_download_queue(&self, productId: &HStringArg, correlationVector: &HStringArg) -> Result<()> { + }} + #[inline] pub fn move_to_front_of_download_queue(&self, productId: &HStringArg, correlationVector: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).MoveToFrontOfDownloadQueue)(self as *const _ as *mut _, productId.get(), correlationVector.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IAppInstallManager4, 638200342, 23198, 20157, 185, 68, 242, 186, 117, 195, 17, 89); RT_INTERFACE!{interface IAppInstallManager4(IAppInstallManager4Vtbl): IInspectable(IInspectableVtbl) [IID_IAppInstallManager4] { - fn GetFreeUserEntitlementAsync(&self, storeId: HSTRING, campaignId: HSTRING, correlationVector: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn GetFreeUserEntitlementAsync(&self, storeId: HSTRING, campaignId: HSTRING, correlationVector: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-system"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-system")] fn GetFreeUserEntitlementForUserAsync(&self, user: *mut ::rt::gen::windows::system::User, storeId: HSTRING, campaignId: HSTRING, correlationVector: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn GetFreeDeviceEntitlementAsync(&self, storeId: HSTRING, campaignId: HSTRING, correlationVector: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-system")] fn GetFreeUserEntitlementForUserAsync(&self, user: *mut ::rt::gen::windows::system::User, storeId: HSTRING, campaignId: HSTRING, correlationVector: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetFreeDeviceEntitlementAsync(&self, storeId: HSTRING, campaignId: HSTRING, correlationVector: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IAppInstallManager4 { - #[inline] pub unsafe fn get_free_user_entitlement_async(&self, storeId: &HStringArg, campaignId: &HStringArg, correlationVector: &HStringArg) -> Result>> { + #[inline] pub fn get_free_user_entitlement_async(&self, storeId: &HStringArg, campaignId: &HStringArg, correlationVector: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFreeUserEntitlementAsync)(self as *const _ as *mut _, storeId.get(), campaignId.get(), correlationVector.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_free_user_entitlement_for_user_async(&self, user: &::rt::gen::windows::system::User, storeId: &HStringArg, campaignId: &HStringArg, correlationVector: &HStringArg) -> Result>> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_free_user_entitlement_for_user_async(&self, user: &::rt::gen::windows::system::User, storeId: &HStringArg, campaignId: &HStringArg, correlationVector: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFreeUserEntitlementForUserAsync)(self as *const _ as *mut _, user as *const _ as *mut _, storeId.get(), campaignId.get(), correlationVector.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_free_device_entitlement_async(&self, storeId: &HStringArg, campaignId: &HStringArg, correlationVector: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_free_device_entitlement_async(&self, storeId: &HStringArg, campaignId: &HStringArg, correlationVector: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFreeDeviceEntitlementAsync)(self as *const _ as *mut _, storeId.get(), campaignId.get(), correlationVector.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IAppInstallManager5, 1020771916, 7145, 20351, 182, 117, 170, 29, 100, 165, 41, 178); RT_INTERFACE!{interface IAppInstallManager5(IAppInstallManager5Vtbl): IInspectable(IInspectableVtbl) [IID_IAppInstallManager5] { - fn get_AppInstallItemsWithGroupSupport(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn get_AppInstallItemsWithGroupSupport(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IAppInstallManager5 { - #[inline] pub unsafe fn get_app_install_items_with_group_support(&self) -> Result>> { + #[inline] pub fn get_app_install_items_with_group_support(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppInstallItemsWithGroupSupport)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } 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(&self, out: *mut *mut AppInstallItem) -> HRESULT }} impl IAppInstallManagerItemEventArgs { - #[inline] pub unsafe fn get_item(&self) -> Result> { + #[inline] pub fn get_item(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Item)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppInstallManagerItemEventArgs: IAppInstallManagerItemEventArgs} RT_ENUM! { enum AppInstallState: i32 { @@ -25905,34 +25905,34 @@ RT_INTERFACE!{interface IAppInstallStatus(IAppInstallStatusVtbl): IInspectable(I fn get_DownloadSizeInBytes(&self, out: *mut u64) -> HRESULT, fn get_BytesDownloaded(&self, out: *mut u64) -> HRESULT, fn get_PercentComplete(&self, out: *mut f64) -> HRESULT, - fn get_ErrorCode(&self, out: *mut ::rt::gen::windows::foundation::HResult) -> HRESULT + fn get_ErrorCode(&self, out: *mut foundation::HResult) -> HRESULT }} impl IAppInstallStatus { - #[inline] pub unsafe fn get_install_state(&self) -> Result { + #[inline] pub fn get_install_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InstallState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_download_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_download_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DownloadSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_bytes_downloaded(&self) -> Result { + }} + #[inline] pub fn get_bytes_downloaded(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BytesDownloaded)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_percent_complete(&self) -> Result { + }} + #[inline] pub fn get_percent_complete(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PercentComplete)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_error_code(&self) -> Result<::rt::gen::windows::foundation::HResult> { + }} + #[inline] pub fn get_error_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ErrorCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppInstallStatus: IAppInstallStatus} DEFINE_IID!(IID_IAppInstallStatus2, 2531754378, 24210, 19113, 142, 220, 88, 254, 212, 184, 126, 0); @@ -25942,16 +25942,16 @@ RT_INTERFACE!{interface IAppInstallStatus2(IAppInstallStatus2Vtbl): IInspectable fn get_ReadyForLaunch(&self, out: *mut bool) -> HRESULT }} impl IAppInstallStatus2 { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_user(&self) -> Result> { + #[cfg(feature="windows-system")] #[inline] pub fn get_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_User)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ready_for_launch(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_ready_for_launch(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReadyForLaunch)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum AppInstallType: i32 { Install (AppInstallType_Install) = 0, Update (AppInstallType_Update) = 1, Repair (AppInstallType_Repair) = 2, @@ -25964,11 +25964,11 @@ RT_INTERFACE!{interface IGetEntitlementResult(IGetEntitlementResultVtbl): IInspe fn get_Status(&self, out: *mut GetEntitlementStatus) -> HRESULT }} impl IGetEntitlementResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class GetEntitlementResult: IGetEntitlementResult} RT_ENUM! { enum GetEntitlementStatus: i32 { @@ -25982,45 +25982,45 @@ RT_CLASS!{static class LicenseManager} impl RtActivatable for LicenseManager {} impl RtActivatable for LicenseManager {} impl LicenseManager { - #[cfg(feature="windows-storage")] #[inline] pub fn add_license_async(license: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn add_license_async(license: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { >::get_activation_factory().add_license_async(license) - }} - #[inline] pub fn get_satisfaction_infos_async(contentIds: &::rt::gen::windows::foundation::collections::IIterable, keyIds: &::rt::gen::windows::foundation::collections::IIterable) -> Result>> { unsafe { + } + #[inline] pub fn get_satisfaction_infos_async(contentIds: &foundation::collections::IIterable, keyIds: &foundation::collections::IIterable) -> Result>> { >::get_activation_factory().get_satisfaction_infos_async(contentIds, keyIds) - }} - #[inline] pub fn refresh_licenses_async(refreshOption: LicenseRefreshOption) -> Result> { unsafe { + } + #[inline] pub fn refresh_licenses_async(refreshOption: LicenseRefreshOption) -> Result> { >::get_activation_factory().refresh_licenses_async(refreshOption) - }} + } } DEFINE_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]) [CLSID_LicenseManager]); 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(&self) -> (), - #[cfg(feature="windows-storage")] fn AddLicenseAsync(&self, license: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn GetSatisfactionInfosAsync(&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 + #[cfg(feature="windows-storage")] fn AddLicenseAsync(&self, license: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn GetSatisfactionInfosAsync(&self, contentIds: *mut foundation::collections::IIterable, keyIds: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ILicenseManagerStatics { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn add_license_async(&self, license: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn add_license_async(&self, license: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AddLicenseAsync)(self as *const _ as *mut _, license as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_satisfaction_infos_async(&self, contentIds: &::rt::gen::windows::foundation::collections::IIterable, keyIds: &::rt::gen::windows::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn get_satisfaction_infos_async(&self, contentIds: &foundation::collections::IIterable, keyIds: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSatisfactionInfosAsync)(self as *const _ as *mut _, contentIds as *const _ as *mut _, keyIds as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ILicenseManagerStatics2, 2871968891, 8057, 17536, 184, 126, 44, 73, 158, 96, 27, 163); RT_INTERFACE!{static interface ILicenseManagerStatics2(ILicenseManagerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_ILicenseManagerStatics2] { - fn RefreshLicensesAsync(&self, refreshOption: LicenseRefreshOption, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn RefreshLicensesAsync(&self, refreshOption: LicenseRefreshOption, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl ILicenseManagerStatics2 { - #[inline] pub unsafe fn refresh_licenses_async(&self, refreshOption: LicenseRefreshOption) -> Result> { + #[inline] pub fn refresh_licenses_async(&self, refreshOption: LicenseRefreshOption) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RefreshLicensesAsync)(self as *const _ as *mut _, refreshOption, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum LicenseRefreshOption: i32 { RunningLicenses (LicenseRefreshOption_RunningLicenses) = 0, AllLicenses (LicenseRefreshOption_AllLicenses) = 1, @@ -26036,59 +26036,59 @@ RT_INTERFACE!{interface ILicenseSatisfactionInfo(ILicenseSatisfactionInfoVtbl): fn get_IsSatisfied(&self, out: *mut bool) -> HRESULT }} impl ILicenseSatisfactionInfo { - #[inline] pub unsafe fn get_satisfied_by_device(&self) -> Result { + #[inline] pub fn get_satisfied_by_device(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SatisfiedByDevice)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_satisfied_by_open_license(&self) -> Result { + }} + #[inline] pub fn get_satisfied_by_open_license(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SatisfiedByOpenLicense)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_satisfied_by_trial(&self) -> Result { + }} + #[inline] pub fn get_satisfied_by_trial(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SatisfiedByTrial)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_satisfied_by_pass(&self) -> Result { + }} + #[inline] pub fn get_satisfied_by_pass(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SatisfiedByPass)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_satisfied_by_install_media(&self) -> Result { + }} + #[inline] pub fn get_satisfied_by_install_media(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SatisfiedByInstallMedia)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_satisfied_by_signed_in_user(&self) -> Result { + }} + #[inline] pub fn get_satisfied_by_signed_in_user(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SatisfiedBySignedInUser)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_satisfied(&self) -> Result { + }} + #[inline] pub fn get_is_satisfied(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSatisfied)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class LicenseSatisfactionInfo: ILicenseSatisfactionInfo} 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(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMapView) -> HRESULT, - fn get_ExtendedError(&self, out: *mut ::rt::gen::windows::foundation::HResult) -> HRESULT + fn get_LicenseSatisfactionInfos(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT, + fn get_ExtendedError(&self, out: *mut foundation::HResult) -> HRESULT }} impl ILicenseSatisfactionResult { - #[inline] pub unsafe fn get_license_satisfaction_infos(&self) -> Result>> { + #[inline] pub fn get_license_satisfaction_infos(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LicenseSatisfactionInfos)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_error(&self) -> Result<::rt::gen::windows::foundation::HResult> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_extended_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class LicenseSatisfactionResult: ILicenseSatisfactionResult} } // Windows.ApplicationModel.Store.LicenseManagement @@ -26098,25 +26098,25 @@ use ::prelude::*; 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(&self, out: *mut HSTRING) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::IMapView>) -> HRESULT, + fn get_Properties(&self, out: *mut *mut foundation::collections::IMapView>) -> HRESULT, #[cfg(feature="windows-media")] fn get_SpeechRecognitionResult(&self, out: *mut *mut super::super::media::speechrecognition::SpeechRecognitionResult) -> HRESULT }} impl IVoiceCommand { - #[inline] pub unsafe fn get_command_name(&self) -> Result { + #[inline] pub fn get_command_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CommandName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>>> { + }} + #[inline] pub fn get_properties(&self) -> Result>>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-media")] #[inline] pub unsafe fn get_speech_recognition_result(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-media")] #[inline] pub fn get_speech_recognition_result(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SpeechRecognitionResult)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class VoiceCommand: IVoiceCommand} DEFINE_IID!(IID_IVoiceCommandCompletedEventArgs, 3361630045, 65090, 17196, 153, 7, 9, 223, 159, 207, 100, 232); @@ -26124,11 +26124,11 @@ RT_INTERFACE!{interface IVoiceCommandCompletedEventArgs(IVoiceCommandCompletedEv fn get_Reason(&self, out: *mut VoiceCommandCompletionReason) -> HRESULT }} impl IVoiceCommandCompletedEventArgs { - #[inline] pub unsafe fn get_reason(&self) -> Result { + #[inline] pub fn get_reason(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Reason)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class VoiceCommandCompletedEventArgs: IVoiceCommandCompletedEventArgs} RT_ENUM! { enum VoiceCommandCompletionReason: i32 { @@ -26139,11 +26139,11 @@ RT_INTERFACE!{interface IVoiceCommandConfirmationResult(IVoiceCommandConfirmatio fn get_Confirmed(&self, out: *mut bool) -> HRESULT }} impl IVoiceCommandConfirmationResult { - #[inline] pub unsafe fn get_confirmed(&self) -> Result { + #[inline] pub fn get_confirmed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Confirmed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class VoiceCommandConfirmationResult: IVoiceCommandConfirmationResult} DEFINE_IID!(IID_IVoiceCommandContentTile, 1055910384, 47303, 19574, 160, 222, 22, 7, 137, 94, 227, 39); @@ -26168,78 +26168,78 @@ RT_INTERFACE!{interface IVoiceCommandContentTile(IVoiceCommandContentTileVtbl): fn put_ContentTileType(&self, value: VoiceCommandContentTileType) -> HRESULT }} impl IVoiceCommandContentTile { - #[inline] pub unsafe fn get_title(&self) -> Result { + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_title(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_title(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Title)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_text_line1(&self) -> Result { + }} + #[inline] pub fn get_text_line1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TextLine1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_text_line1(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_text_line1(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TextLine1)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_text_line2(&self) -> Result { + }} + #[inline] pub fn get_text_line2(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TextLine2)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_text_line2(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_text_line2(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TextLine2)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_text_line3(&self) -> Result { + }} + #[inline] pub fn get_text_line3(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TextLine3)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_text_line3(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_text_line3(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TextLine3)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_image(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_image(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Image)(self 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(&self, value: &super::super::storage::IStorageFile) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_image(&self, value: &super::super::storage::IStorageFile) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Image)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_context(&self) -> Result> { + }} + #[inline] pub fn get_app_context(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppContext)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_app_context(&self, value: &IInspectable) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_app_context(&self, value: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AppContext)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_launch_argument(&self) -> Result { + }} + #[inline] pub fn get_app_launch_argument(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppLaunchArgument)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_app_launch_argument(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_app_launch_argument(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AppLaunchArgument)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_content_tile_type(&self) -> Result { + }} + #[inline] pub fn get_content_tile_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ContentTileType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_content_tile_type(&self, value: VoiceCommandContentTileType) -> Result<()> { + }} + #[inline] pub fn set_content_tile_type(&self, value: VoiceCommandContentTileType) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ContentTileType)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class VoiceCommandContentTile: IVoiceCommandContentTile} impl RtActivatable for VoiceCommandContentTile {} @@ -26251,65 +26251,65 @@ DEFINE_IID!(IID_IVoiceCommandDefinition, 2037557968, 2420, 18809, 152, 75, 203, RT_INTERFACE!{interface IVoiceCommandDefinition(IVoiceCommandDefinitionVtbl): IInspectable(IInspectableVtbl) [IID_IVoiceCommandDefinition] { fn get_Language(&self, out: *mut HSTRING) -> HRESULT, fn get_Name(&self, out: *mut HSTRING) -> HRESULT, - fn SetPhraseListAsync(&self, phraseListName: HSTRING, phraseList: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn SetPhraseListAsync(&self, phraseListName: HSTRING, phraseList: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IVoiceCommandDefinition { - #[inline] pub unsafe fn get_language(&self) -> Result { + #[inline] pub fn get_language(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Language)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_name(&self) -> Result { + }} + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_phrase_list_async(&self, phraseListName: &HStringArg, phraseList: &super::super::foundation::collections::IIterable) -> Result> { + }} + #[inline] pub fn set_phrase_list_async(&self, phraseListName: &HStringArg, phraseList: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetPhraseListAsync)(self as *const _ as *mut _, phraseListName.get(), phraseList as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class VoiceCommandDefinition: IVoiceCommandDefinition} RT_CLASS!{static class VoiceCommandDefinitionManager} impl RtActivatable for VoiceCommandDefinitionManager {} impl VoiceCommandDefinitionManager { - #[cfg(feature="windows-storage")] #[inline] pub fn install_command_definitions_from_storage_file_async(file: &super::super::storage::StorageFile) -> Result> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn install_command_definitions_from_storage_file_async(file: &super::super::storage::StorageFile) -> Result> { >::get_activation_factory().install_command_definitions_from_storage_file_async(file) - }} - #[inline] pub fn get_installed_command_definitions() -> Result>> { unsafe { + } + #[inline] pub fn get_installed_command_definitions() -> Result>>> { >::get_activation_factory().get_installed_command_definitions() - }} + } } DEFINE_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]) [CLSID_VoiceCommandDefinitionManager]); 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(&self) -> (), - #[cfg(feature="windows-storage")] fn InstallCommandDefinitionsFromStorageFileAsync(&self, file: *mut super::super::storage::StorageFile, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn get_InstalledCommandDefinitions(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT + #[cfg(feature="windows-storage")] fn InstallCommandDefinitionsFromStorageFileAsync(&self, file: *mut super::super::storage::StorageFile, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn get_InstalledCommandDefinitions(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT }} impl IVoiceCommandDefinitionManagerStatics { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn install_command_definitions_from_storage_file_async(&self, file: &super::super::storage::StorageFile) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn install_command_definitions_from_storage_file_async(&self, file: &super::super::storage::StorageFile) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).InstallCommandDefinitionsFromStorageFileAsync)(self as *const _ as *mut _, file as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_installed_command_definitions(&self) -> Result>> { + }} + #[inline] pub fn get_installed_command_definitions(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InstalledCommandDefinitions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut *mut VoiceCommandContentTile) -> HRESULT }} impl IVoiceCommandDisambiguationResult { - #[inline] pub unsafe fn get_selected_item(&self) -> Result> { + #[inline] pub fn get_selected_item(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SelectedItem)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class VoiceCommandDisambiguationResult: IVoiceCommandDisambiguationResult} DEFINE_IID!(IID_IVoiceCommandResponse, 42251022, 35387, 19652, 166, 161, 202, 213, 190, 39, 22, 181); @@ -26320,168 +26320,168 @@ RT_INTERFACE!{interface IVoiceCommandResponse(IVoiceCommandResponseVtbl): IInspe fn put_RepeatMessage(&self, value: *mut VoiceCommandUserMessage) -> HRESULT, fn get_AppLaunchArgument(&self, out: *mut HSTRING) -> HRESULT, fn put_AppLaunchArgument(&self, value: HSTRING) -> HRESULT, - fn get_VoiceCommandContentTiles(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_VoiceCommandContentTiles(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IVoiceCommandResponse { - #[inline] pub unsafe fn get_message(&self) -> Result> { + #[inline] pub fn get_message(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Message)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_message(&self, value: &VoiceCommandUserMessage) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_message(&self, value: &VoiceCommandUserMessage) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Message)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_repeat_message(&self) -> Result> { + }} + #[inline] pub fn get_repeat_message(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RepeatMessage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_repeat_message(&self, value: &VoiceCommandUserMessage) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_repeat_message(&self, value: &VoiceCommandUserMessage) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RepeatMessage)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_launch_argument(&self) -> Result { + }} + #[inline] pub fn get_app_launch_argument(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppLaunchArgument)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_app_launch_argument(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_app_launch_argument(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AppLaunchArgument)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_voice_command_content_tiles(&self) -> Result>> { + }} + #[inline] pub fn get_voice_command_content_tiles(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VoiceCommandContentTiles)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class VoiceCommandResponse: IVoiceCommandResponse} impl RtActivatable for VoiceCommandResponse {} impl VoiceCommandResponse { - #[inline] pub fn get_max_supported_voice_command_content_tiles() -> Result { unsafe { + #[inline] pub fn get_max_supported_voice_command_content_tiles() -> Result { >::get_activation_factory().get_max_supported_voice_command_content_tiles() - }} - #[inline] pub fn create_response(userMessage: &VoiceCommandUserMessage) -> Result> { unsafe { + } + #[inline] pub fn create_response(userMessage: &VoiceCommandUserMessage) -> Result>> { >::get_activation_factory().create_response(userMessage) - }} - #[inline] pub fn create_response_with_tiles(message: &VoiceCommandUserMessage, contentTiles: &super::super::foundation::collections::IIterable) -> Result> { unsafe { + } + #[inline] pub fn create_response_with_tiles(message: &VoiceCommandUserMessage, contentTiles: &foundation::collections::IIterable) -> Result>> { >::get_activation_factory().create_response_with_tiles(message, contentTiles) - }} - #[inline] pub fn create_response_for_prompt(message: &VoiceCommandUserMessage, repeatMessage: &VoiceCommandUserMessage) -> Result> { unsafe { + } + #[inline] pub fn create_response_for_prompt(message: &VoiceCommandUserMessage, repeatMessage: &VoiceCommandUserMessage) -> Result>> { >::get_activation_factory().create_response_for_prompt(message, repeatMessage) - }} - #[inline] pub fn create_response_for_prompt_with_tiles(message: &VoiceCommandUserMessage, repeatMessage: &VoiceCommandUserMessage, contentTiles: &super::super::foundation::collections::IIterable) -> Result> { unsafe { + } + #[inline] pub fn create_response_for_prompt_with_tiles(message: &VoiceCommandUserMessage, repeatMessage: &VoiceCommandUserMessage, contentTiles: &foundation::collections::IIterable) -> Result>> { >::get_activation_factory().create_response_for_prompt_with_tiles(message, repeatMessage, contentTiles) - }} + } } DEFINE_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]) [CLSID_VoiceCommandResponse]); 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(&self, out: *mut u32) -> HRESULT, fn CreateResponse(&self, userMessage: *mut VoiceCommandUserMessage, out: *mut *mut VoiceCommandResponse) -> HRESULT, - fn CreateResponseWithTiles(&self, message: *mut VoiceCommandUserMessage, contentTiles: *mut super::super::foundation::collections::IIterable, out: *mut *mut VoiceCommandResponse) -> HRESULT, + fn CreateResponseWithTiles(&self, message: *mut VoiceCommandUserMessage, contentTiles: *mut foundation::collections::IIterable, out: *mut *mut VoiceCommandResponse) -> HRESULT, fn CreateResponseForPrompt(&self, message: *mut VoiceCommandUserMessage, repeatMessage: *mut VoiceCommandUserMessage, out: *mut *mut VoiceCommandResponse) -> HRESULT, - fn CreateResponseForPromptWithTiles(&self, message: *mut VoiceCommandUserMessage, repeatMessage: *mut VoiceCommandUserMessage, contentTiles: *mut super::super::foundation::collections::IIterable, out: *mut *mut VoiceCommandResponse) -> HRESULT + fn CreateResponseForPromptWithTiles(&self, message: *mut VoiceCommandUserMessage, repeatMessage: *mut VoiceCommandUserMessage, contentTiles: *mut foundation::collections::IIterable, out: *mut *mut VoiceCommandResponse) -> HRESULT }} impl IVoiceCommandResponseStatics { - #[inline] pub unsafe fn get_max_supported_voice_command_content_tiles(&self) -> Result { + #[inline] pub fn get_max_supported_voice_command_content_tiles(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxSupportedVoiceCommandContentTiles)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn create_response(&self, userMessage: &VoiceCommandUserMessage) -> Result> { + }} + #[inline] pub fn create_response(&self, userMessage: &VoiceCommandUserMessage) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateResponse)(self as *const _ as *mut _, userMessage as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_response_with_tiles(&self, message: &VoiceCommandUserMessage, contentTiles: &super::super::foundation::collections::IIterable) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_response_with_tiles(&self, message: &VoiceCommandUserMessage, contentTiles: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateResponseWithTiles)(self as *const _ as *mut _, 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 create_response_for_prompt(&self, message: &VoiceCommandUserMessage, repeatMessage: &VoiceCommandUserMessage) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_response_for_prompt(&self, message: &VoiceCommandUserMessage, repeatMessage: &VoiceCommandUserMessage) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateResponseForPrompt)(self as *const _ as *mut _, 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 create_response_for_prompt_with_tiles(&self, message: &VoiceCommandUserMessage, repeatMessage: &VoiceCommandUserMessage, contentTiles: &super::super::foundation::collections::IIterable) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_response_for_prompt_with_tiles(&self, message: &VoiceCommandUserMessage, repeatMessage: &VoiceCommandUserMessage, contentTiles: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateResponseForPromptWithTiles)(self as *const _ as *mut _, 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) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestConfirmationAsync(&self, response: *mut VoiceCommandResponse, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestDisambiguationAsync(&self, response: *mut VoiceCommandResponse, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn ReportProgressAsync(&self, response: *mut VoiceCommandResponse, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn ReportSuccessAsync(&self, response: *mut VoiceCommandResponse, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn ReportFailureAsync(&self, response: *mut VoiceCommandResponse, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn RequestAppLaunchAsync(&self, response: *mut VoiceCommandResponse, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn GetVoiceCommandAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestConfirmationAsync(&self, response: *mut VoiceCommandResponse, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestDisambiguationAsync(&self, response: *mut VoiceCommandResponse, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ReportProgressAsync(&self, response: *mut VoiceCommandResponse, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportSuccessAsync(&self, response: *mut VoiceCommandResponse, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReportFailureAsync(&self, response: *mut VoiceCommandResponse, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn RequestAppLaunchAsync(&self, response: *mut VoiceCommandResponse, out: *mut *mut foundation::IAsyncAction) -> HRESULT, #[cfg(not(feature="windows-globalization"))] fn __Dummy7(&self) -> (), #[cfg(feature="windows-globalization")] fn get_Language(&self, out: *mut *mut super::super::globalization::Language) -> HRESULT, - fn add_VoiceCommandCompleted(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_VoiceCommandCompleted(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_VoiceCommandCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_VoiceCommandCompleted(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IVoiceCommandServiceConnection { - #[inline] pub unsafe fn get_voice_command_async(&self) -> Result>> { + #[inline] pub fn get_voice_command_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetVoiceCommandAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_confirmation_async(&self, response: &VoiceCommandResponse) -> Result>> { + }} + #[inline] pub fn request_confirmation_async(&self, response: &VoiceCommandResponse) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestConfirmationAsync)(self as *const _ as *mut _, response as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_disambiguation_async(&self, response: &VoiceCommandResponse) -> Result>> { + }} + #[inline] pub fn request_disambiguation_async(&self, response: &VoiceCommandResponse) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestDisambiguationAsync)(self as *const _ as *mut _, response as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_progress_async(&self, response: &VoiceCommandResponse) -> Result> { + }} + #[inline] pub fn report_progress_async(&self, response: &VoiceCommandResponse) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportProgressAsync)(self as *const _ as *mut _, response as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_success_async(&self, response: &VoiceCommandResponse) -> Result> { + }} + #[inline] pub fn report_success_async(&self, response: &VoiceCommandResponse) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportSuccessAsync)(self as *const _ as *mut _, response as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_failure_async(&self, response: &VoiceCommandResponse) -> Result> { + }} + #[inline] pub fn report_failure_async(&self, response: &VoiceCommandResponse) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportFailureAsync)(self as *const _ as *mut _, 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(&self, response: &VoiceCommandResponse) -> Result> { + }} + #[inline] pub fn request_app_launch_async(&self, response: &VoiceCommandResponse) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAppLaunchAsync)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[cfg(feature="windows-globalization")] #[inline] pub fn get_language(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Language)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_voice_command_completed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_voice_command_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_VoiceCommandCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_voice_command_completed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_voice_command_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_VoiceCommandCompleted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class VoiceCommandServiceConnection: IVoiceCommandServiceConnection} impl RtActivatable for VoiceCommandServiceConnection {} impl VoiceCommandServiceConnection { - #[inline] pub fn from_app_service_trigger_details(triggerDetails: &super::appservice::AppServiceTriggerDetails) -> Result> { unsafe { + #[inline] pub fn from_app_service_trigger_details(triggerDetails: &super::appservice::AppServiceTriggerDetails) -> Result>> { >::get_activation_factory().from_app_service_trigger_details(triggerDetails) - }} + } } DEFINE_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]) [CLSID_VoiceCommandServiceConnection]); DEFINE_IID!(IID_IVoiceCommandServiceConnectionStatics, 923713531, 11572, 17119, 135, 112, 7, 77, 15, 51, 70, 151); @@ -26489,11 +26489,11 @@ RT_INTERFACE!{static interface IVoiceCommandServiceConnectionStatics(IVoiceComma fn FromAppServiceTriggerDetails(&self, triggerDetails: *mut super::appservice::AppServiceTriggerDetails, out: *mut *mut VoiceCommandServiceConnection) -> HRESULT }} impl IVoiceCommandServiceConnectionStatics { - #[inline] pub unsafe fn from_app_service_trigger_details(&self, triggerDetails: &super::appservice::AppServiceTriggerDetails) -> Result> { + #[inline] pub fn from_app_service_trigger_details(&self, triggerDetails: &super::appservice::AppServiceTriggerDetails) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromAppServiceTriggerDetails)(self as *const _ as *mut _, triggerDetails as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IVoiceCommandUserMessage, 1733211072, 17654, 20231, 185, 121, 76, 114, 63, 192, 133, 151); RT_INTERFACE!{interface IVoiceCommandUserMessage(IVoiceCommandUserMessageVtbl): IInspectable(IInspectableVtbl) [IID_IVoiceCommandUserMessage] { @@ -26503,24 +26503,24 @@ RT_INTERFACE!{interface IVoiceCommandUserMessage(IVoiceCommandUserMessageVtbl): fn put_SpokenMessage(&self, value: HSTRING) -> HRESULT }} impl IVoiceCommandUserMessage { - #[inline] pub unsafe fn get_display_message(&self) -> Result { + #[inline] pub fn get_display_message(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayMessage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_message(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_display_message(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayMessage)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_spoken_message(&self) -> Result { + }} + #[inline] pub fn get_spoken_message(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SpokenMessage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_spoken_message(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_spoken_message(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SpokenMessage)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class VoiceCommandUserMessage: IVoiceCommandUserMessage} impl RtActivatable for VoiceCommandUserMessage {} @@ -26532,12 +26532,12 @@ use ::prelude::*; RT_CLASS!{static class HolographicApplicationPreview} impl RtActivatable for HolographicApplicationPreview {} impl HolographicApplicationPreview { - #[inline] pub fn is_current_view_presented_on_holographic_display() -> Result { unsafe { + #[inline] pub fn is_current_view_presented_on_holographic_display() -> Result { >::get_activation_factory().is_current_view_presented_on_holographic_display() - }} - #[inline] pub fn is_holographic_activation(activatedEventArgs: &super::super::activation::IActivatedEventArgs) -> Result { unsafe { + } + #[inline] pub fn is_holographic_activation(activatedEventArgs: &super::super::activation::IActivatedEventArgs) -> Result { >::get_activation_factory().is_holographic_activation(activatedEventArgs) - }} + } } DEFINE_CLSID!(HolographicApplicationPreview(&[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,72,111,108,111,103,114,97,112,104,105,99,46,72,111,108,111,103,114,97,112,104,105,99,65,112,112,108,105,99,97,116,105,111,110,80,114,101,118,105,101,119,0]) [CLSID_HolographicApplicationPreview]); DEFINE_IID!(IID_IHolographicApplicationPreviewStatics, 4261643921, 10810, 17833, 162, 8, 123, 237, 105, 25, 25, 243); @@ -26546,16 +26546,16 @@ RT_INTERFACE!{static interface IHolographicApplicationPreviewStatics(IHolographi fn IsHolographicActivation(&self, activatedEventArgs: *mut super::super::activation::IActivatedEventArgs, out: *mut bool) -> HRESULT }} impl IHolographicApplicationPreviewStatics { - #[inline] pub unsafe fn is_current_view_presented_on_holographic_display(&self) -> Result { + #[inline] pub fn is_current_view_presented_on_holographic_display(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsCurrentViewPresentedOnHolographicDisplay)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_holographic_activation(&self, activatedEventArgs: &super::super::activation::IActivatedEventArgs) -> Result { + }} + #[inline] pub fn is_holographic_activation(&self, activatedEventArgs: &super::super::activation::IActivatedEventArgs) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsHolographicActivation)(self as *const _ as *mut _, activatedEventArgs as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } } // Windows.ApplicationModel.Preview.Holographic pub mod notes { // Windows.ApplicationModel.Preview.Notes @@ -26565,11 +26565,11 @@ RT_INTERFACE!{interface INotePlacementChangedPreviewEventArgs(INotePlacementChan fn get_ViewId(&self, out: *mut i32) -> HRESULT }} impl INotePlacementChangedPreviewEventArgs { - #[inline] pub unsafe fn get_view_id(&self) -> Result { + #[inline] pub fn get_view_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ViewId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class NotePlacementChangedPreviewEventArgs: INotePlacementChangedPreviewEventArgs} DEFINE_IID!(IID_INotesWindowManagerPreview, 3693789758, 18512, 20243, 156, 199, 255, 72, 126, 253, 252, 222); @@ -26582,92 +26582,92 @@ RT_INTERFACE!{interface INotesWindowManagerPreview(INotesWindowManagerPreviewVtb fn HideNote(&self, noteViewId: i32) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy5(&self) -> (), #[cfg(feature="windows-storage")] fn GetNotePlacement(&self, noteViewId: i32, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, - fn TrySetNoteSize(&self, noteViewId: i32, size: ::rt::gen::windows::foundation::Size, out: *mut bool) -> HRESULT, + fn TrySetNoteSize(&self, noteViewId: i32, size: foundation::Size, out: *mut bool) -> HRESULT, fn SetFocusToNextView(&self) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy8(&self) -> (), - #[cfg(feature="windows-storage")] fn SetNotesThumbnailAsync(&self, thumbnail: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn add_SystemLockStateChanged(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SystemLockStateChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_NotePlacementChanged(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_NotePlacementChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_NoteVisibilityChanged(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_NoteVisibilityChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + #[cfg(feature="windows-storage")] fn SetNotesThumbnailAsync(&self, thumbnail: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn add_SystemLockStateChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SystemLockStateChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_NotePlacementChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_NotePlacementChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_NoteVisibilityChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_NoteVisibilityChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl INotesWindowManagerPreview { - #[inline] pub unsafe fn get_is_screen_locked(&self) -> Result { + #[inline] pub fn get_is_screen_locked(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsScreenLocked)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn show_note(&self, noteViewId: i32) -> Result<()> { + }} + #[inline] pub fn show_note(&self, noteViewId: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ShowNote)(self as *const _ as *mut _, noteViewId); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn show_note_relative_to(&self, noteViewId: i32, anchorNoteViewId: i32) -> Result<()> { + }} + #[inline] pub fn show_note_relative_to(&self, noteViewId: i32, anchorNoteViewId: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ShowNoteRelativeTo)(self as *const _ as *mut _, noteViewId, anchorNoteViewId); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn show_note_with_placement(&self, noteViewId: i32, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn show_note_with_placement(&self, noteViewId: i32, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ShowNoteWithPlacement)(self as *const _ as *mut _, noteViewId, data as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn hide_note(&self, noteViewId: i32) -> Result<()> { + }} + #[inline] pub fn hide_note(&self, noteViewId: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).HideNote)(self as *const _ as *mut _, noteViewId); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_note_placement(&self, noteViewId: i32) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_note_placement(&self, noteViewId: i32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetNotePlacement)(self as *const _ as *mut _, noteViewId, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_set_note_size(&self, noteViewId: i32, size: ::rt::gen::windows::foundation::Size) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn try_set_note_size(&self, noteViewId: i32, size: foundation::Size) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TrySetNoteSize)(self as *const _ as *mut _, noteViewId, size, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_focus_to_next_view(&self) -> Result<()> { + }} + #[inline] pub fn set_focus_to_next_view(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetFocusToNextView)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn set_notes_thumbnail_async(&self, thumbnail: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_notes_thumbnail_async(&self, thumbnail: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetNotesThumbnailAsync)(self 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 add_system_lock_state_changed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_system_lock_state_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SystemLockStateChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_system_lock_state_changed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_system_lock_state_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SystemLockStateChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_note_placement_changed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_note_placement_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_NotePlacementChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_note_placement_changed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_note_placement_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_NotePlacementChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_note_visibility_changed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_note_visibility_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_NoteVisibilityChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_note_visibility_changed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_note_visibility_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_NoteVisibilityChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class NotesWindowManagerPreview: INotesWindowManagerPreview} impl RtActivatable for NotesWindowManagerPreview {} impl NotesWindowManagerPreview { - #[inline] pub fn get_for_current_app() -> Result> { unsafe { + #[inline] pub fn get_for_current_app() -> Result>> { >::get_activation_factory().get_for_current_app() - }} + } } DEFINE_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]) [CLSID_NotesWindowManagerPreview]); DEFINE_IID!(IID_INotesWindowManagerPreview2, 3992880714, 8020, 19209, 152, 35, 255, 71, 127, 111, 163, 188); @@ -26676,26 +26676,26 @@ RT_INTERFACE!{interface INotesWindowManagerPreview2(INotesWindowManagerPreview2V #[cfg(not(feature="windows-storage"))] fn __Dummy1(&self) -> (), #[cfg(feature="windows-storage")] fn ShowNoteWithPlacementWithOptions(&self, noteViewId: i32, data: *mut ::rt::gen::windows::storage::streams::IBuffer, options: *mut NotesWindowManagerPreviewShowNoteOptions) -> HRESULT, fn SetFocusToPreviousView(&self) -> HRESULT, - #[cfg(feature="windows-graphics")] fn SetThumbnailImageForTaskSwitcherAsync(&self, bitmap: *mut ::rt::gen::windows::graphics::imaging::SoftwareBitmap, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + #[cfg(feature="windows-graphics")] fn SetThumbnailImageForTaskSwitcherAsync(&self, bitmap: *mut ::rt::gen::windows::graphics::imaging::SoftwareBitmap, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl INotesWindowManagerPreview2 { - #[inline] pub unsafe fn show_note_relative_to_with_options(&self, noteViewId: i32, anchorNoteViewId: i32, options: &NotesWindowManagerPreviewShowNoteOptions) -> Result<()> { + #[inline] pub fn show_note_relative_to_with_options(&self, noteViewId: i32, anchorNoteViewId: i32, options: &NotesWindowManagerPreviewShowNoteOptions) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ShowNoteRelativeToWithOptions)(self as *const _ as *mut _, noteViewId, anchorNoteViewId, options as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn show_note_with_placement_with_options(&self, noteViewId: i32, data: &::rt::gen::windows::storage::streams::IBuffer, options: &NotesWindowManagerPreviewShowNoteOptions) -> Result<()> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn show_note_with_placement_with_options(&self, noteViewId: i32, data: &::rt::gen::windows::storage::streams::IBuffer, options: &NotesWindowManagerPreviewShowNoteOptions) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ShowNoteWithPlacementWithOptions)(self as *const _ as *mut _, noteViewId, data as *const _ as *mut _, options as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_focus_to_previous_view(&self) -> Result<()> { + }} + #[inline] pub fn set_focus_to_previous_view(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetFocusToPreviousView)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn set_thumbnail_image_for_task_switcher_async(&self, bitmap: &::rt::gen::windows::graphics::imaging::SoftwareBitmap) -> Result> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn set_thumbnail_image_for_task_switcher_async(&self, bitmap: &::rt::gen::windows::graphics::imaging::SoftwareBitmap) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetThumbnailImageForTaskSwitcherAsync)(self as *const _ as *mut _, bitmap as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_INotesWindowManagerPreviewShowNoteOptions, 2288716246, 42670, 16391, 165, 109, 28, 167, 12, 132, 192, 210); RT_INTERFACE!{interface INotesWindowManagerPreviewShowNoteOptions(INotesWindowManagerPreviewShowNoteOptionsVtbl): IInspectable(IInspectableVtbl) [IID_INotesWindowManagerPreviewShowNoteOptions] { @@ -26703,15 +26703,15 @@ RT_INTERFACE!{interface INotesWindowManagerPreviewShowNoteOptions(INotesWindowMa fn put_ShowWithFocus(&self, value: bool) -> HRESULT }} impl INotesWindowManagerPreviewShowNoteOptions { - #[inline] pub unsafe fn get_show_with_focus(&self) -> Result { + #[inline] pub fn get_show_with_focus(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ShowWithFocus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_show_with_focus(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_show_with_focus(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ShowWithFocus)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class NotesWindowManagerPreviewShowNoteOptions: INotesWindowManagerPreviewShowNoteOptions} impl RtActivatable for NotesWindowManagerPreviewShowNoteOptions {} @@ -26721,11 +26721,11 @@ RT_INTERFACE!{static interface INotesWindowManagerPreviewStatics(INotesWindowMan fn GetForCurrentApp(&self, out: *mut *mut NotesWindowManagerPreview) -> HRESULT }} impl INotesWindowManagerPreviewStatics { - #[inline] pub unsafe fn get_for_current_app(&self) -> Result> { + #[inline] pub fn get_for_current_app(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentApp)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_INoteVisibilityChangedPreviewEventArgs, 238314654, 14357, 20470, 131, 179, 161, 77, 23, 18, 14, 36); RT_INTERFACE!{interface INoteVisibilityChangedPreviewEventArgs(INoteVisibilityChangedPreviewEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_INoteVisibilityChangedPreviewEventArgs] { @@ -26733,16 +26733,16 @@ RT_INTERFACE!{interface INoteVisibilityChangedPreviewEventArgs(INoteVisibilityCh fn get_IsVisible(&self, out: *mut bool) -> HRESULT }} impl INoteVisibilityChangedPreviewEventArgs { - #[inline] pub unsafe fn get_view_id(&self) -> Result { + #[inline] pub fn get_view_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ViewId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_visible(&self) -> Result { + }} + #[inline] pub fn get_is_visible(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsVisible)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class NoteVisibilityChangedPreviewEventArgs: INoteVisibilityChangedPreviewEventArgs} } // Windows.ApplicationModel.Preview.Notes @@ -26750,21 +26750,21 @@ pub mod inkworkspace { // Windows.ApplicationModel.Preview.InkWorkspace use ::prelude::*; DEFINE_IID!(IID_IInkWorkspaceHostedAppManager, 4262099344, 24153, 19383, 138, 99, 125, 33, 140, 217, 99, 0); RT_INTERFACE!{interface IInkWorkspaceHostedAppManager(IInkWorkspaceHostedAppManagerVtbl): IInspectable(IInspectableVtbl) [IID_IInkWorkspaceHostedAppManager] { - #[cfg(feature="windows-graphics")] fn SetThumbnailAsync(&self, bitmap: *mut ::rt::gen::windows::graphics::imaging::SoftwareBitmap, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + #[cfg(feature="windows-graphics")] fn SetThumbnailAsync(&self, bitmap: *mut ::rt::gen::windows::graphics::imaging::SoftwareBitmap, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IInkWorkspaceHostedAppManager { - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn set_thumbnail_async(&self, bitmap: &::rt::gen::windows::graphics::imaging::SoftwareBitmap) -> Result> { + #[cfg(feature="windows-graphics")] #[inline] pub fn set_thumbnail_async(&self, bitmap: &::rt::gen::windows::graphics::imaging::SoftwareBitmap) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetThumbnailAsync)(self as *const _ as *mut _, bitmap as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class InkWorkspaceHostedAppManager: IInkWorkspaceHostedAppManager} impl RtActivatable for InkWorkspaceHostedAppManager {} impl InkWorkspaceHostedAppManager { - #[inline] pub fn get_for_current_app() -> Result> { unsafe { + #[inline] pub fn get_for_current_app() -> Result>> { >::get_activation_factory().get_for_current_app() - }} + } } DEFINE_CLSID!(InkWorkspaceHostedAppManager(&[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,73,110,107,87,111,114,107,115,112,97,99,101,46,73,110,107,87,111,114,107,115,112,97,99,101,72,111,115,116,101,100,65,112,112,77,97,110,97,103,101,114,0]) [CLSID_InkWorkspaceHostedAppManager]); DEFINE_IID!(IID_IInkWorkspaceHostedAppManagerStatics, 3422391493, 41314, 19396, 132, 238, 232, 113, 109, 82, 51, 197); @@ -26772,11 +26772,11 @@ RT_INTERFACE!{static interface IInkWorkspaceHostedAppManagerStatics(IInkWorkspac fn GetForCurrentApp(&self, out: *mut *mut InkWorkspaceHostedAppManager) -> HRESULT }} impl IInkWorkspaceHostedAppManagerStatics { - #[inline] pub unsafe fn get_for_current_app(&self) -> Result> { + #[inline] pub fn get_for_current_app(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentApp)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } } // Windows.ApplicationModel.Preview.InkWorkspace } // Windows.ApplicationModel.Preview @@ -26789,34 +26789,34 @@ DEFINE_IID!(IID_IWalletBarcode, 1334147881, 56960, 20132, 161, 205, 129, 205, 8, RT_INTERFACE!{interface IWalletBarcode(IWalletBarcodeVtbl): IInspectable(IInspectableVtbl) [IID_IWalletBarcode] { fn get_Symbology(&self, out: *mut WalletBarcodeSymbology) -> HRESULT, fn get_Value(&self, out: *mut HSTRING) -> HRESULT, - #[cfg(feature="windows-storage")] fn GetImageAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn GetImageAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IWalletBarcode { - #[inline] pub unsafe fn get_symbology(&self) -> Result { + #[inline] pub fn get_symbology(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Symbology)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result { + }} + #[inline] pub fn get_value(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self 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 get_image_async(&self) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_image_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetImageAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class WalletBarcode: IWalletBarcode} impl RtActivatable for WalletBarcode {} impl WalletBarcode { - #[inline] pub fn create_wallet_barcode(symbology: WalletBarcodeSymbology, value: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_wallet_barcode(symbology: WalletBarcodeSymbology, value: &HStringArg) -> Result> { >::get_activation_factory().create_wallet_barcode(symbology, value) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn create_custom_wallet_barcode(streamToBarcodeImage: &super::super::storage::streams::IRandomAccessStreamReference) -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn create_custom_wallet_barcode(streamToBarcodeImage: &super::super::storage::streams::IRandomAccessStreamReference) -> Result> { >::get_activation_factory().create_custom_wallet_barcode(streamToBarcodeImage) - }} + } } DEFINE_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]) [CLSID_WalletBarcode]); DEFINE_IID!(IID_IWalletBarcodeFactory, 806449505, 60828, 18078, 187, 253, 48, 108, 149, 234, 113, 8); @@ -26825,16 +26825,16 @@ RT_INTERFACE!{static interface IWalletBarcodeFactory(IWalletBarcodeFactoryVtbl): #[cfg(feature="windows-storage")] fn CreateCustomWalletBarcode(&self, streamToBarcodeImage: *mut super::super::storage::streams::IRandomAccessStreamReference, out: *mut *mut WalletBarcode) -> HRESULT }} impl IWalletBarcodeFactory { - #[inline] pub unsafe fn create_wallet_barcode(&self, symbology: WalletBarcodeSymbology, value: &HStringArg) -> Result> { + #[inline] pub fn create_wallet_barcode(&self, symbology: WalletBarcodeSymbology, value: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWalletBarcode)(self as *const _ as *mut _, symbology, value.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn create_custom_wallet_barcode(&self, streamToBarcodeImage: &super::super::storage::streams::IRandomAccessStreamReference) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_custom_wallet_barcode(&self, streamToBarcodeImage: &super::super::storage::streams::IRandomAccessStreamReference) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateCustomWalletBarcode)(self as *const _ as *mut _, streamToBarcodeImage as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -26851,13 +26851,13 @@ RT_INTERFACE!{interface IWalletItem(IWalletItemVtbl): IInspectable(IInspectableV fn put_IsAcknowledged(&self, value: bool) -> HRESULT, fn get_IssuerDisplayName(&self, out: *mut HSTRING) -> HRESULT, fn put_IssuerDisplayName(&self, value: HSTRING) -> HRESULT, - fn get_LastUpdated(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_LastUpdated(&self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_LastUpdated(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_LastUpdated(&self, value: *mut foundation::IReference) -> HRESULT, fn get_Kind(&self, out: *mut WalletItemKind) -> HRESULT, fn get_Barcode(&self, out: *mut *mut WalletBarcode) -> HRESULT, fn put_Barcode(&self, value: *mut WalletBarcode) -> HRESULT, - fn get_ExpirationDate(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_ExpirationDate(&self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_ExpirationDate(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_ExpirationDate(&self, value: *mut foundation::IReference) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy14(&self) -> (), #[cfg(feature="windows-storage")] fn get_Logo159x159(&self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy15(&self) -> (), @@ -26908,262 +26908,262 @@ RT_INTERFACE!{interface IWalletItem(IWalletItemVtbl): IInspectable(IInspectableV #[cfg(feature="windows-storage")] fn get_PromotionalImage(&self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy41(&self) -> (), #[cfg(feature="windows-storage")] fn put_PromotionalImage(&self, value: *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, - fn get_RelevantDate(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_RelevantDate(&self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_RelevantDate(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_RelevantDate(&self, value: *mut foundation::IReference) -> HRESULT, fn get_RelevantDateDisplayMessage(&self, out: *mut HSTRING) -> HRESULT, fn put_RelevantDateDisplayMessage(&self, value: HSTRING) -> HRESULT, - fn get_TransactionHistory(&self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, - fn get_RelevantLocations(&self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, + fn get_TransactionHistory(&self, out: *mut *mut foundation::collections::IMap) -> HRESULT, + fn get_RelevantLocations(&self, out: *mut *mut foundation::collections::IMap) -> HRESULT, fn get_IsMoreTransactionHistoryLaunchable(&self, out: *mut bool) -> HRESULT, fn put_IsMoreTransactionHistoryLaunchable(&self, value: bool) -> HRESULT, - fn get_DisplayProperties(&self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, - fn get_Verbs(&self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT + fn get_DisplayProperties(&self, out: *mut *mut foundation::collections::IMap) -> HRESULT, + fn get_Verbs(&self, out: *mut *mut foundation::collections::IMap) -> HRESULT }} impl IWalletItem { - #[inline] pub unsafe fn get_display_name(&self) -> Result { + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_display_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&self) -> Result { + }} + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_acknowledged(&self) -> Result { + }} + #[inline] pub fn get_is_acknowledged(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsAcknowledged)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_acknowledged(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_acknowledged(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsAcknowledged)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_issuer_display_name(&self) -> Result { + }} + #[inline] pub fn get_issuer_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IssuerDisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_issuer_display_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_issuer_display_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IssuerDisplayName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_last_updated(&self) -> Result>> { + }} + #[inline] pub fn get_last_updated(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LastUpdated)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_last_updated(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_last_updated(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LastUpdated)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_kind(&self) -> Result { + }} + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_barcode(&self) -> Result> { + }} + #[inline] pub fn get_barcode(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Barcode)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_barcode(&self, value: &WalletBarcode) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_barcode(&self, value: &WalletBarcode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Barcode)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_expiration_date(&self) -> Result>> { + }} + #[inline] pub fn get_expiration_date(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExpirationDate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_expiration_date(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_expiration_date(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ExpirationDate)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_logo159x159(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_logo159x159(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Logo159x159)(self 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_logo159x159(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_logo159x159(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Logo159x159)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_logo336x336(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_logo336x336(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Logo336x336)(self 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_logo336x336(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_logo336x336(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Logo336x336)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_logo99x99(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_logo99x99(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Logo99x99)(self 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_logo99x99(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_logo99x99(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Logo99x99)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_message(&self) -> Result { + }} + #[inline] pub fn get_display_message(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayMessage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_message(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_display_message(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayMessage)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_display_message_launchable(&self) -> Result { + }} + #[inline] pub fn get_is_display_message_launchable(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDisplayMessageLaunchable)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_display_message_launchable(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_display_message_launchable(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsDisplayMessageLaunchable)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_logo_text(&self) -> Result { + }} + #[inline] pub fn get_logo_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LogoText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_logo_text(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_logo_text(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LogoText)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_header_color(&self) -> Result { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_header_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HeaderColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn set_header_color(&self, value: super::super::ui::Color) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_header_color(&self, value: super::super::ui::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_HeaderColor)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_body_color(&self) -> Result { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_body_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BodyColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn set_body_color(&self, value: super::super::ui::Color) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_body_color(&self, value: super::super::ui::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BodyColor)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_header_font_color(&self) -> Result { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_header_font_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HeaderFontColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn set_header_font_color(&self, value: super::super::ui::Color) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_header_font_color(&self, value: super::super::ui::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_HeaderFontColor)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_body_font_color(&self) -> Result { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_body_font_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BodyFontColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn set_body_font_color(&self, value: super::super::ui::Color) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_body_font_color(&self, value: super::super::ui::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BodyFontColor)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_header_background_image(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_header_background_image(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HeaderBackgroundImage)(self 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_header_background_image(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_header_background_image(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_HeaderBackgroundImage)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_body_background_image(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_body_background_image(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BodyBackgroundImage)(self 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_body_background_image(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_body_background_image(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BodyBackgroundImage)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_logo_image(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_logo_image(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LogoImage)(self 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_logo_image(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_logo_image(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LogoImage)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_promotional_image(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_promotional_image(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PromotionalImage)(self 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_promotional_image(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_promotional_image(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PromotionalImage)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_relevant_date(&self) -> Result>> { + }} + #[inline] pub fn get_relevant_date(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RelevantDate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_relevant_date(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_relevant_date(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RelevantDate)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_relevant_date_display_message(&self) -> Result { + }} + #[inline] pub fn get_relevant_date_display_message(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RelevantDateDisplayMessage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_relevant_date_display_message(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_relevant_date_display_message(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RelevantDateDisplayMessage)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_transaction_history(&self) -> Result>> { + }} + #[inline] pub fn get_transaction_history(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TransactionHistory)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_relevant_locations(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_relevant_locations(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RelevantLocations)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_more_transaction_history_launchable(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_more_transaction_history_launchable(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsMoreTransactionHistoryLaunchable)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_more_transaction_history_launchable(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_more_transaction_history_launchable(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsMoreTransactionHistoryLaunchable)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_properties(&self) -> Result>> { + }} + #[inline] pub fn get_display_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_verbs(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_verbs(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Verbs)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class WalletItem: IWalletItem} impl RtActivatable for WalletItem {} impl WalletItem { - #[inline] pub fn create_wallet_item(kind: WalletItemKind, displayName: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_wallet_item(kind: WalletItemKind, displayName: &HStringArg) -> Result> { >::get_activation_factory().create_wallet_item(kind, displayName) - }} + } } DEFINE_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]) [CLSID_WalletItem]); DEFINE_IID!(IID_IWalletItemCustomProperty, 3108716787, 64000, 16637, 152, 220, 157, 228, 102, 151, 241, 231); @@ -27180,58 +27180,58 @@ RT_INTERFACE!{interface IWalletItemCustomProperty(IWalletItemCustomPropertyVtbl) fn put_SummaryViewPosition(&self, value: WalletSummaryViewPosition) -> HRESULT }} impl IWalletItemCustomProperty { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Name)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result { + }} + #[inline] pub fn get_value(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_value(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_value(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Value)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_auto_detect_links(&self) -> Result { + }} + #[inline] pub fn get_auto_detect_links(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AutoDetectLinks)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_auto_detect_links(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_auto_detect_links(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AutoDetectLinks)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_detail_view_position(&self) -> Result { + }} + #[inline] pub fn get_detail_view_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DetailViewPosition)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_detail_view_position(&self, value: WalletDetailViewPosition) -> Result<()> { + }} + #[inline] pub fn set_detail_view_position(&self, value: WalletDetailViewPosition) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DetailViewPosition)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_summary_view_position(&self) -> Result { + }} + #[inline] pub fn get_summary_view_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SummaryViewPosition)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_summary_view_position(&self, value: WalletSummaryViewPosition) -> Result<()> { + }} + #[inline] pub fn set_summary_view_position(&self, value: WalletSummaryViewPosition) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SummaryViewPosition)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class WalletItemCustomProperty: IWalletItemCustomProperty} impl RtActivatable for WalletItemCustomProperty {} impl WalletItemCustomProperty { - #[inline] pub fn create_wallet_item_custom_property(name: &HStringArg, value: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_wallet_item_custom_property(name: &HStringArg, value: &HStringArg) -> Result> { >::get_activation_factory().create_wallet_item_custom_property(name, value) - }} + } } DEFINE_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]) [CLSID_WalletItemCustomProperty]); DEFINE_IID!(IID_IWalletItemCustomPropertyFactory, 3489950276, 24993, 16810, 178, 89, 165, 97, 10, 181, 213, 117); @@ -27239,127 +27239,127 @@ RT_INTERFACE!{static interface IWalletItemCustomPropertyFactory(IWalletItemCusto fn CreateWalletItemCustomProperty(&self, name: HSTRING, value: HSTRING, out: *mut *mut WalletItemCustomProperty) -> HRESULT }} impl IWalletItemCustomPropertyFactory { - #[inline] pub unsafe fn create_wallet_item_custom_property(&self, name: &HStringArg, value: &HStringArg) -> Result> { + #[inline] pub fn create_wallet_item_custom_property(&self, name: &HStringArg, value: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWalletItemCustomProperty)(self as *const _ as *mut _, name.get(), value.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, kind: WalletItemKind, displayName: HSTRING, out: *mut *mut WalletItem) -> HRESULT }} impl IWalletItemFactory { - #[inline] pub unsafe fn create_wallet_item(&self, kind: WalletItemKind, displayName: &HStringArg) -> Result> { + #[inline] pub fn create_wallet_item(&self, kind: WalletItemKind, displayName: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWalletItem)(self as *const _ as *mut _, kind, displayName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(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_IWalletItemStore, 1902135371, 27977, 18680, 145, 169, 64, 161, 208, 241, 62, 244); RT_INTERFACE!{interface IWalletItemStore(IWalletItemStoreVtbl): IInspectable(IInspectableVtbl) [IID_IWalletItemStore] { - fn AddAsync(&self, id: HSTRING, item: *mut WalletItem, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn ClearAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn GetWalletItemAsync(&self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetItemsAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetItemsWithKindAsync(&self, kind: WalletItemKind, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn AddAsync(&self, id: HSTRING, item: *mut WalletItem, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ClearAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn GetWalletItemAsync(&self, id: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetItemsAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetItemsWithKindAsync(&self, kind: WalletItemKind, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy5(&self) -> (), - #[cfg(feature="windows-storage")] fn ImportItemAsync(&self, stream: *mut super::super::storage::streams::IRandomAccessStreamReference, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn DeleteAsync(&self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn ShowAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn ShowItemAsync(&self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn UpdateAsync(&self, item: *mut WalletItem, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + #[cfg(feature="windows-storage")] fn ImportItemAsync(&self, stream: *mut super::super::storage::streams::IRandomAccessStreamReference, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn DeleteAsync(&self, id: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ShowAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ShowItemAsync(&self, id: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn UpdateAsync(&self, item: *mut WalletItem, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IWalletItemStore { - #[inline] pub unsafe fn add_async(&self, id: &HStringArg, item: &WalletItem) -> Result> { + #[inline] pub fn add_async(&self, id: &HStringArg, item: &WalletItem) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AddAsync)(self as *const _ as *mut _, id.get(), item as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn clear_async(&self) -> Result> { + }} + #[inline] pub fn clear_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ClearAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_wallet_item_async(&self, id: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_wallet_item_async(&self, id: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetWalletItemAsync)(self as *const _ as *mut _, id.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_items_async(&self) -> Result>>> { + }} + #[inline] pub fn get_items_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetItemsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_items_with_kind_async(&self, kind: WalletItemKind) -> Result>>> { + }} + #[inline] pub fn get_items_with_kind_async(&self, kind: WalletItemKind) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetItemsWithKindAsync)(self as *const _ as *mut _, kind, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn import_item_async(&self, stream: &super::super::storage::streams::IRandomAccessStreamReference) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn import_item_async(&self, stream: &super::super::storage::streams::IRandomAccessStreamReference) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ImportItemAsync)(self 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 delete_async(&self, id: &HStringArg) -> Result> { + }} + #[inline] pub fn delete_async(&self, id: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteAsync)(self as *const _ as *mut _, id.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn show_async(&self) -> Result> { + }} + #[inline] pub fn show_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn show_item_async(&self, id: &HStringArg) -> Result> { + }} + #[inline] pub fn show_item_async(&self, id: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowItemAsync)(self as *const _ as *mut _, id.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn update_async(&self, item: &WalletItem) -> Result> { + }} + #[inline] pub fn update_async(&self, item: &WalletItem) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UpdateAsync)(self as *const _ as *mut _, item as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class WalletItemStore: IWalletItemStore} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ItemsChanged(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ItemsChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ItemsChanged(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl IWalletItemStore2 { - #[inline] pub unsafe fn add_items_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_items_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ItemsChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_items_changed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_items_changed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ItemsChanged)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{static class WalletManager} impl RtActivatable for WalletManager {} impl WalletManager { - #[inline] pub fn request_store_async() -> Result>> { unsafe { + #[inline] pub fn request_store_async() -> Result>> { >::get_activation_factory().request_store_async() - }} + } } DEFINE_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]) [CLSID_WalletManager]); 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn RequestStoreAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IWalletManagerStatics { - #[inline] pub unsafe fn request_store_async(&self) -> Result>> { + #[inline] pub fn request_store_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestStoreAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IWalletRelevantLocation, 2681763882, 58361, 19937, 186, 179, 187, 25, 46, 70, 179, 243); RT_INTERFACE!{interface IWalletRelevantLocation(IWalletRelevantLocationVtbl): IInspectable(IInspectableVtbl) [IID_IWalletRelevantLocation] { @@ -27371,24 +27371,24 @@ RT_INTERFACE!{interface IWalletRelevantLocation(IWalletRelevantLocationVtbl): II fn put_DisplayMessage(&self, value: HSTRING) -> HRESULT }} impl IWalletRelevantLocation { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_position(&self) -> Result { + #[cfg(feature="windows-devices")] #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn set_position(&self, value: super::super::devices::geolocation::BasicGeoposition) -> Result<()> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn set_position(&self, value: super::super::devices::geolocation::BasicGeoposition) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Position)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_message(&self) -> Result { + }} + #[inline] pub fn get_display_message(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayMessage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_message(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_display_message(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayMessage)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class WalletRelevantLocation: IWalletRelevantLocation} impl RtActivatable for WalletRelevantLocation {} @@ -27406,66 +27406,66 @@ RT_INTERFACE!{interface IWalletTransaction(IWalletTransactionVtbl): IInspectable fn put_IgnoreTimeOfDay(&self, value: bool) -> HRESULT, fn get_DisplayLocation(&self, out: *mut HSTRING) -> HRESULT, fn put_DisplayLocation(&self, value: HSTRING) -> HRESULT, - fn get_TransactionDate(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_TransactionDate(&self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_TransactionDate(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_TransactionDate(&self, value: *mut foundation::IReference) -> HRESULT, fn get_IsLaunchable(&self, out: *mut bool) -> HRESULT, fn put_IsLaunchable(&self, value: bool) -> HRESULT }} impl IWalletTransaction { - #[inline] pub unsafe fn get_description(&self) -> Result { + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_description(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_description(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Description)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_amount(&self) -> Result { + }} + #[inline] pub fn get_display_amount(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayAmount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_amount(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_display_amount(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayAmount)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_ignore_time_of_day(&self) -> Result { + }} + #[inline] pub fn get_ignore_time_of_day(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IgnoreTimeOfDay)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_ignore_time_of_day(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_ignore_time_of_day(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IgnoreTimeOfDay)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_location(&self) -> Result { + }} + #[inline] pub fn get_display_location(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayLocation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_location(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_display_location(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayLocation)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_transaction_date(&self) -> Result>> { + }} + #[inline] pub fn get_transaction_date(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TransactionDate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_transaction_date(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_transaction_date(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TransactionDate)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_launchable(&self) -> Result { + }} + #[inline] pub fn get_is_launchable(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsLaunchable)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_launchable(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_launchable(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsLaunchable)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class WalletTransaction: IWalletTransaction} impl RtActivatable for WalletTransaction {} @@ -27476,22 +27476,22 @@ RT_INTERFACE!{interface IWalletVerb(IWalletVerbVtbl): IInspectable(IInspectableV fn put_Name(&self, value: HSTRING) -> HRESULT }} impl IWalletVerb { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Name)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class WalletVerb: IWalletVerb} impl RtActivatable for WalletVerb {} impl WalletVerb { - #[inline] pub fn create_wallet_verb(name: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_wallet_verb(name: &HStringArg) -> Result> { >::get_activation_factory().create_wallet_verb(name) - }} + } } DEFINE_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]) [CLSID_WalletVerb]); DEFINE_IID!(IID_IWalletVerbFactory, 1979787121, 48728, 19806, 131, 237, 88, 177, 102, 156, 122, 217); @@ -27499,11 +27499,11 @@ RT_INTERFACE!{static interface IWalletVerbFactory(IWalletVerbFactoryVtbl): IInsp fn CreateWalletVerb(&self, name: HSTRING, out: *mut *mut WalletVerb) -> HRESULT }} impl IWalletVerbFactory { - #[inline] pub unsafe fn create_wallet_verb(&self, name: &HStringArg) -> Result> { + #[inline] pub fn create_wallet_verb(&self, name: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWalletVerb)(self as *const _ as *mut _, name.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } pub mod system { // Windows.ApplicationModel.Wallet.System use ::prelude::*; @@ -27512,75 +27512,75 @@ RT_ENUM! { enum WalletItemAppAssociation: i32 { }} 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(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, - fn DeleteAsync(&self, item: *mut super::WalletItem, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn GetItemsAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn DeleteAsync(&self, item: *mut super::WalletItem, out: *mut *mut foundation::IAsyncAction) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy2(&self) -> (), - #[cfg(feature="windows-storage")] fn ImportItemAsync(&self, stream: *mut ::rt::gen::windows::storage::streams::IRandomAccessStreamReference, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn ImportItemAsync(&self, stream: *mut ::rt::gen::windows::storage::streams::IRandomAccessStreamReference, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetAppStatusForItem(&self, item: *mut super::WalletItem, out: *mut WalletItemAppAssociation) -> HRESULT, - fn LaunchAppForItemAsync(&self, item: *mut super::WalletItem, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn LaunchAppForItemAsync(&self, item: *mut super::WalletItem, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IWalletItemSystemStore { - #[inline] pub unsafe fn get_items_async(&self) -> Result>>> { + #[inline] pub fn get_items_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetItemsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete_async(&self, item: &super::WalletItem) -> Result> { + }} + #[inline] pub fn delete_async(&self, item: &super::WalletItem) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteAsync)(self as *const _ as *mut _, item 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_item_async(&self, stream: &::rt::gen::windows::storage::streams::IRandomAccessStreamReference) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn import_item_async(&self, stream: &::rt::gen::windows::storage::streams::IRandomAccessStreamReference) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ImportItemAsync)(self 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 get_app_status_for_item(&self, item: &super::WalletItem) -> Result { + }} + #[inline] pub fn get_app_status_for_item(&self, item: &super::WalletItem) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetAppStatusForItem)(self as *const _ as *mut _, 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(&self, item: &super::WalletItem) -> Result>> { + }} + #[inline] pub fn launch_app_for_item_async(&self, item: &super::WalletItem) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LaunchAppForItemAsync)(self as *const _ as *mut _, item as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class WalletItemSystemStore: IWalletItemSystemStore} 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(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ItemsChanged(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn add_ItemsChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ItemsChanged(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl IWalletItemSystemStore2 { - #[inline] pub unsafe fn add_items_changed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub fn add_items_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ItemsChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_items_changed(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_items_changed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ItemsChanged)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{static class WalletManagerSystem} impl RtActivatable for WalletManagerSystem {} impl WalletManagerSystem { - #[inline] pub fn request_store_async() -> Result>> { unsafe { + #[inline] pub fn request_store_async() -> Result>> { >::get_activation_factory().request_store_async() - }} + } } DEFINE_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]) [CLSID_WalletManagerSystem]); 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(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn RequestStoreAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IWalletManagerSystemStatics { - #[inline] pub unsafe fn request_store_async(&self) -> Result>> { + #[inline] pub fn request_store_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestStoreAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } } // Windows.ApplicationModel.Wallet.System } // Windows.ApplicationModel.Wallet diff --git a/src/rt/gen/windows/data.rs b/src/rt/gen/windows/data.rs index 40e96a8..20301f3 100644 --- a/src/rt/gen/windows/data.rs +++ b/src/rt/gen/windows/data.rs @@ -9,42 +9,42 @@ RT_INTERFACE!{interface IJsonArray(IJsonArrayVtbl): IInspectable(IInspectableVtb fn GetBooleanAt(&self, index: u32, out: *mut bool) -> HRESULT }} impl IJsonArray { - #[inline] pub unsafe fn get_object_at(&self, index: u32) -> Result> { + #[inline] pub fn get_object_at(&self, index: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetObjectAt)(self as *const _ as *mut _, index, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_array_at(&self, index: u32) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_array_at(&self, index: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetArrayAt)(self as *const _ as *mut _, index, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_string_at(&self, index: u32) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_string_at(&self, index: u32) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetStringAt)(self as *const _ as *mut _, index, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_number_at(&self, index: u32) -> Result { + }} + #[inline] pub fn get_number_at(&self, index: u32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetNumberAt)(self as *const _ as *mut _, index, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_boolean_at(&self, index: u32) -> Result { + }} + #[inline] pub fn get_boolean_at(&self, index: u32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetBooleanAt)(self as *const _ as *mut _, index, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class JsonArray: IJsonArray} impl RtActivatable for JsonArray {} impl RtActivatable for JsonArray {} impl JsonArray { - #[inline] pub fn parse(input: &HStringArg) -> Result> { unsafe { + #[inline] pub fn parse(input: &HStringArg) -> Result>> { >::get_activation_factory().parse(input) - }} - #[inline] pub fn try_parse(input: &HStringArg) -> Result<(ComPtr, bool)> { unsafe { + } + #[inline] pub fn try_parse(input: &HStringArg) -> Result<(Option>, bool)> { >::get_activation_factory().try_parse(input) - }} + } } DEFINE_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]) [CLSID_JsonArray]); DEFINE_IID!(IID_IJsonArrayStatics, 3675534505, 57700, 18847, 147, 226, 138, 143, 73, 187, 144, 186); @@ -53,23 +53,23 @@ RT_INTERFACE!{static interface IJsonArrayStatics(IJsonArrayStaticsVtbl): IInspec fn TryParse(&self, input: HSTRING, result: *mut *mut JsonArray, out: *mut bool) -> HRESULT }} impl IJsonArrayStatics { - #[inline] pub unsafe fn parse(&self, input: &HStringArg) -> Result> { + #[inline] pub fn parse(&self, input: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Parse)(self as *const _ as *mut _, input.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_parse(&self, input: &HStringArg) -> Result<(ComPtr, bool)> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn try_parse(&self, input: &HStringArg) -> Result<(Option>, bool)> { unsafe { let mut result = null_mut(); let mut out = zeroed(); let hr = ((*self.lpVtbl).TryParse)(self as *const _ as *mut _, input.get(), &mut result, &mut out); - if hr == S_OK { Ok((ComPtr::wrap(result), out)) } else { err(hr) } - } + if hr == S_OK { Ok((ComPtr::wrap_optional(result), out)) } else { err(hr) } + }} } RT_CLASS!{static class JsonError} impl RtActivatable for JsonError {} impl JsonError { - #[inline] pub fn get_json_status(hresult: i32) -> Result { unsafe { + #[inline] pub fn get_json_status(hresult: i32) -> Result { >::get_activation_factory().get_json_status(hresult) - }} + } } DEFINE_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]) [CLSID_JsonError]); DEFINE_IID!(IID_IJsonErrorStatics2, 1077948634, 34768, 17260, 131, 171, 252, 123, 18, 192, 204, 38); @@ -77,11 +77,11 @@ RT_INTERFACE!{static interface IJsonErrorStatics2(IJsonErrorStatics2Vtbl): IInsp fn GetJsonStatus(&self, hresult: i32, out: *mut JsonErrorStatus) -> HRESULT }} impl IJsonErrorStatics2 { - #[inline] pub unsafe fn get_json_status(&self, hresult: i32) -> Result { + #[inline] pub fn get_json_status(&self, hresult: i32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetJsonStatus)(self as *const _ as *mut _, hresult, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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, @@ -97,51 +97,51 @@ RT_INTERFACE!{interface IJsonObject(IJsonObjectVtbl): IInspectable(IInspectableV fn GetNamedBoolean(&self, name: HSTRING, out: *mut bool) -> HRESULT }} impl IJsonObject { - #[inline] pub unsafe fn get_named_value(&self, name: &HStringArg) -> Result> { + #[inline] pub fn get_named_value(&self, name: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetNamedValue)(self as *const _ as *mut _, name.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_named_value(&self, name: &HStringArg, value: &IJsonValue) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_named_value(&self, name: &HStringArg, value: &IJsonValue) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetNamedValue)(self as *const _ as *mut _, name.get(), value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_named_object(&self, name: &HStringArg) -> Result> { + }} + #[inline] pub fn get_named_object(&self, name: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetNamedObject)(self as *const _ as *mut _, name.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_named_array(&self, name: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_named_array(&self, name: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetNamedArray)(self as *const _ as *mut _, name.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_named_string(&self, name: &HStringArg) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_named_string(&self, name: &HStringArg) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetNamedString)(self as *const _ as *mut _, name.get(), &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_named_number(&self, name: &HStringArg) -> Result { + }} + #[inline] pub fn get_named_number(&self, name: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetNamedNumber)(self as *const _ as *mut _, name.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_named_boolean(&self, name: &HStringArg) -> Result { + }} + #[inline] pub fn get_named_boolean(&self, name: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetNamedBoolean)(self as *const _ as *mut _, name.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class JsonObject: IJsonObject} impl RtActivatable for JsonObject {} impl RtActivatable for JsonObject {} impl JsonObject { - #[inline] pub fn parse(input: &HStringArg) -> Result> { unsafe { + #[inline] pub fn parse(input: &HStringArg) -> Result>> { >::get_activation_factory().parse(input) - }} - #[inline] pub fn try_parse(input: &HStringArg) -> Result<(ComPtr, bool)> { unsafe { + } + #[inline] pub fn try_parse(input: &HStringArg) -> Result<(Option>, bool)> { >::get_activation_factory().try_parse(input) - }} + } } DEFINE_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]) [CLSID_JsonObject]); DEFINE_IID!(IID_IJsonObjectStatics, 579465561, 21726, 17880, 171, 204, 34, 96, 63, 160, 102, 160); @@ -150,16 +150,16 @@ RT_INTERFACE!{static interface IJsonObjectStatics(IJsonObjectStaticsVtbl): IInsp fn TryParse(&self, input: HSTRING, result: *mut *mut JsonObject, out: *mut bool) -> HRESULT }} impl IJsonObjectStatics { - #[inline] pub unsafe fn parse(&self, input: &HStringArg) -> Result> { + #[inline] pub fn parse(&self, input: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Parse)(self as *const _ as *mut _, input.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_parse(&self, input: &HStringArg) -> Result<(ComPtr, bool)> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn try_parse(&self, input: &HStringArg) -> Result<(Option>, bool)> { unsafe { let mut result = null_mut(); let mut out = zeroed(); let hr = ((*self.lpVtbl).TryParse)(self as *const _ as *mut _, input.get(), &mut result, &mut out); - if hr == S_OK { Ok((ComPtr::wrap(result), out)) } else { err(hr) } - } + if hr == S_OK { Ok((ComPtr::wrap_optional(result), out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IJsonObjectWithDefaultValues, 3647001250, 47088, 20224, 142, 68, 216, 44, 244, 21, 234, 19); RT_INTERFACE!{interface IJsonObjectWithDefaultValues(IJsonObjectWithDefaultValuesVtbl): IInspectable(IInspectableVtbl) [IID_IJsonObjectWithDefaultValues] { @@ -171,36 +171,36 @@ RT_INTERFACE!{interface IJsonObjectWithDefaultValues(IJsonObjectWithDefaultValue fn GetNamedBooleanOrDefault(&self, name: HSTRING, defaultValue: bool, out: *mut bool) -> HRESULT }} impl IJsonObjectWithDefaultValues { - #[inline] pub unsafe fn get_named_value_or_default(&self, name: &HStringArg, defaultValue: &JsonValue) -> Result> { + #[inline] pub fn get_named_value_or_default(&self, name: &HStringArg, defaultValue: &JsonValue) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetNamedValueOrDefault)(self as *const _ as *mut _, 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(&self, name: &HStringArg, defaultValue: &JsonObject) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_named_object_or_default(&self, name: &HStringArg, defaultValue: &JsonObject) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetNamedObjectOrDefault)(self as *const _ as *mut _, 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(&self, name: &HStringArg, defaultValue: &HStringArg) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_named_string_or_default(&self, name: &HStringArg, defaultValue: &HStringArg) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetNamedStringOrDefault)(self as *const _ as *mut _, 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(&self, name: &HStringArg, defaultValue: &JsonArray) -> Result> { + }} + #[inline] pub fn get_named_array_or_default(&self, name: &HStringArg, defaultValue: &JsonArray) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetNamedArrayOrDefault)(self as *const _ as *mut _, 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(&self, name: &HStringArg, defaultValue: f64) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_named_number_or_default(&self, name: &HStringArg, defaultValue: f64) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetNamedNumberOrDefault)(self as *const _ as *mut _, name.get(), defaultValue, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_named_boolean_or_default(&self, name: &HStringArg, defaultValue: bool) -> Result { + }} + #[inline] pub fn get_named_boolean_or_default(&self, name: &HStringArg, defaultValue: bool) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetNamedBooleanOrDefault)(self as *const _ as *mut _, name.get(), defaultValue, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IJsonValue, 2736889547, 61619, 19917, 190, 238, 25, 212, 140, 211, 237, 30); RT_INTERFACE!{interface IJsonValue(IJsonValueVtbl): IInspectable(IInspectableVtbl) [IID_IJsonValue] { @@ -213,64 +213,64 @@ RT_INTERFACE!{interface IJsonValue(IJsonValueVtbl): IInspectable(IInspectableVtb fn GetObject(&self, out: *mut *mut JsonObject) -> HRESULT }} impl IJsonValue { - #[inline] pub unsafe fn get_value_type(&self) -> Result { + #[inline] pub fn get_value_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ValueType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn stringify(&self) -> Result { + }} + #[inline] pub fn stringify(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Stringify)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_string(&self) -> Result { + }} + #[inline] pub fn get_string(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_number(&self) -> Result { + }} + #[inline] pub fn get_number(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_boolean(&self) -> Result { + }} + #[inline] pub fn get_boolean(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetBoolean)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_array(&self) -> Result> { + }} + #[inline] pub fn get_array(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetArray)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_object(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_object(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetObject)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class JsonValue: IJsonValue} impl RtActivatable for JsonValue {} impl RtActivatable for JsonValue {} impl JsonValue { - #[inline] pub fn parse(input: &HStringArg) -> Result> { unsafe { + #[inline] pub fn parse(input: &HStringArg) -> Result>> { >::get_activation_factory().parse(input) - }} - #[inline] pub fn try_parse(input: &HStringArg) -> Result<(ComPtr, bool)> { unsafe { + } + #[inline] pub fn try_parse(input: &HStringArg) -> Result<(Option>, bool)> { >::get_activation_factory().try_parse(input) - }} - #[inline] pub fn create_boolean_value(input: bool) -> Result> { unsafe { + } + #[inline] pub fn create_boolean_value(input: bool) -> Result>> { >::get_activation_factory().create_boolean_value(input) - }} - #[inline] pub fn create_number_value(input: f64) -> Result> { unsafe { + } + #[inline] pub fn create_number_value(input: f64) -> Result>> { >::get_activation_factory().create_number_value(input) - }} - #[inline] pub fn create_string_value(input: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_string_value(input: &HStringArg) -> Result>> { >::get_activation_factory().create_string_value(input) - }} - #[inline] pub fn create_null_value() -> Result> { unsafe { + } + #[inline] pub fn create_null_value() -> Result>> { >::get_activation_factory().create_null_value() - }} + } } DEFINE_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]) [CLSID_JsonValue]); DEFINE_IID!(IID_IJsonValueStatics, 1600869450, 12115, 18657, 145, 163, 247, 139, 80, 166, 52, 92); @@ -282,42 +282,42 @@ RT_INTERFACE!{static interface IJsonValueStatics(IJsonValueStaticsVtbl): IInspec fn CreateStringValue(&self, input: HSTRING, out: *mut *mut JsonValue) -> HRESULT }} impl IJsonValueStatics { - #[inline] pub unsafe fn parse(&self, input: &HStringArg) -> Result> { + #[inline] pub fn parse(&self, input: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Parse)(self as *const _ as *mut _, input.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_parse(&self, input: &HStringArg) -> Result<(ComPtr, bool)> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn try_parse(&self, input: &HStringArg) -> Result<(Option>, bool)> { unsafe { let mut result = null_mut(); let mut out = zeroed(); let hr = ((*self.lpVtbl).TryParse)(self as *const _ as *mut _, 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(&self, input: bool) -> Result> { + if hr == S_OK { Ok((ComPtr::wrap_optional(result), out)) } else { err(hr) } + }} + #[inline] pub fn create_boolean_value(&self, input: bool) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateBooleanValue)(self as *const _ as *mut _, input, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_number_value(&self, input: f64) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_number_value(&self, input: f64) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateNumberValue)(self as *const _ as *mut _, input, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_string_value(&self, input: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_string_value(&self, input: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateStringValue)(self as *const _ as *mut _, input.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut *mut JsonValue) -> HRESULT }} impl IJsonValueStatics2 { - #[inline] pub unsafe fn create_null_value(&self) -> Result> { + #[inline] pub fn create_null_value(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateNullValue)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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, @@ -333,21 +333,21 @@ RT_INTERFACE!{interface IDtdEntity(IDtdEntityVtbl): IInspectable(IInspectableVtb fn get_NotationName(&self, out: *mut *mut IInspectable) -> HRESULT }} impl IDtdEntity { - #[inline] pub unsafe fn get_public_id(&self) -> Result> { + #[inline] pub fn get_public_id(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PublicId)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_system_id(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_system_id(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SystemId)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_notation_name(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_notation_name(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NotationName)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DtdEntity: IDtdEntity} DEFINE_IID!(IID_IDtdNotation, 2360664141, 27974, 20187, 171, 115, 223, 131, 197, 26, 211, 151); @@ -356,16 +356,16 @@ RT_INTERFACE!{interface IDtdNotation(IDtdNotationVtbl): IInspectable(IInspectabl fn get_SystemId(&self, out: *mut *mut IInspectable) -> HRESULT }} impl IDtdNotation { - #[inline] pub unsafe fn get_public_id(&self) -> Result> { + #[inline] pub fn get_public_id(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PublicId)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_system_id(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_system_id(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SystemId)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DtdNotation: IDtdNotation} RT_ENUM! { enum NodeType: i32 { @@ -379,25 +379,25 @@ RT_INTERFACE!{interface IXmlAttribute(IXmlAttributeVtbl): IInspectable(IInspecta fn put_Value(&self, value: HSTRING) -> HRESULT }} impl IXmlAttribute { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_specified(&self) -> Result { + }} + #[inline] pub fn get_specified(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Specified)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result { + }} + #[inline] pub fn get_value(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_value(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_value(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Value)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class XmlAttribute: IXmlAttribute} DEFINE_IID!(IID_IXmlCDataSection, 1292153967, 51389, 17844, 136, 153, 4, 0, 215, 194, 198, 15); @@ -417,41 +417,41 @@ RT_INTERFACE!{interface IXmlCharacterData(IXmlCharacterDataVtbl): IInspectable(I fn ReplaceData(&self, offset: u32, count: u32, data: HSTRING) -> HRESULT }} impl IXmlCharacterData { - #[inline] pub unsafe fn get_data(&self) -> Result { + #[inline] pub fn get_data(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Data)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_data(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_data(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Data)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_length(&self) -> Result { + }} + #[inline] pub fn get_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Length)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn substring_data(&self, offset: u32, count: u32) -> Result { + }} + #[inline] pub fn substring_data(&self, offset: u32, count: u32) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SubstringData)(self as *const _ as *mut _, offset, count, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn append_data(&self, data: &HStringArg) -> Result<()> { + }} + #[inline] pub fn append_data(&self, data: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AppendData)(self as *const _ as *mut _, data.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn insert_data(&self, offset: u32, data: &HStringArg) -> Result<()> { + }} + #[inline] pub fn insert_data(&self, offset: u32, data: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InsertData)(self as *const _ as *mut _, offset, data.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn delete_data(&self, offset: u32, count: u32) -> Result<()> { + }} + #[inline] pub fn delete_data(&self, offset: u32, count: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).DeleteData)(self as *const _ as *mut _, offset, count); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn replace_data(&self, offset: u32, count: u32, data: &HStringArg) -> Result<()> { + }} + #[inline] pub fn replace_data(&self, offset: u32, count: u32, data: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReplaceData)(self as *const _ as *mut _, offset, count, data.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IXmlComment, 3164894421, 46623, 17937, 156, 172, 46, 146, 227, 71, 109, 71); RT_INTERFACE!{interface IXmlComment(IXmlCommentVtbl): IInspectable(IInspectableVtbl) [IID_IXmlComment] { @@ -479,108 +479,108 @@ RT_INTERFACE!{interface IXmlDocument(IXmlDocumentVtbl): IInspectable(IInspectabl fn ImportNode(&self, node: *mut IXmlNode, deep: bool, out: *mut *mut IXmlNode) -> HRESULT }} impl IXmlDocument { - #[inline] pub unsafe fn get_doctype(&self) -> Result> { + #[inline] pub fn get_doctype(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Doctype)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_implementation(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_implementation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Implementation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_document_element(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_document_element(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DocumentElement)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_element(&self, tagName: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_element(&self, tagName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateElement)(self as *const _ as *mut _, tagName.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_document_fragment(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_document_fragment(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDocumentFragment)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_text_node(&self, data: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_text_node(&self, data: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateTextNode)(self as *const _ as *mut _, data.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_comment(&self, data: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_comment(&self, data: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateComment)(self as *const _ as *mut _, data.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_processing_instruction(&self, target: &HStringArg, data: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_processing_instruction(&self, target: &HStringArg, data: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateProcessingInstruction)(self as *const _ as *mut _, target.get(), data.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_attribute(&self, name: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_attribute(&self, name: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAttribute)(self as *const _ as *mut _, name.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_entity_reference(&self, name: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_entity_reference(&self, name: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateEntityReference)(self as *const _ as *mut _, name.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_elements_by_tag_name(&self, tagName: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_elements_by_tag_name(&self, tagName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetElementsByTagName)(self as *const _ as *mut _, tagName.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_cdata_section(&self, data: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_cdata_section(&self, data: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateCDataSection)(self as *const _ as *mut _, data.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_document_uri(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_document_uri(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DocumentUri)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_attribute_ns(&self, namespaceUri: &IInspectable, qualifiedName: &HStringArg) -> Result> { + }} + #[inline] pub fn create_attribute_ns(&self, namespaceUri: &IInspectable, qualifiedName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAttributeNS)(self as *const _ as *mut _, namespaceUri as *const _ as *mut _, qualifiedName.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_element_ns(&self, namespaceUri: &IInspectable, qualifiedName: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_element_ns(&self, namespaceUri: &IInspectable, qualifiedName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateElementNS)(self as *const _ as *mut _, 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_element_by_id(&self, elementId: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_element_by_id(&self, elementId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetElementById)(self as *const _ as *mut _, elementId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn import_node(&self, node: &IXmlNode, deep: bool) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn import_node(&self, node: &IXmlNode, deep: bool) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ImportNode)(self as *const _ as *mut _, node as *const _ as *mut _, deep, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class XmlDocument: IXmlDocument} impl RtActivatable for XmlDocument {} impl RtActivatable for XmlDocument {} impl XmlDocument { - #[inline] pub fn load_from_uri_async(uri: &::rt::gen::windows::foundation::Uri) -> Result>> { unsafe { + #[inline] pub fn load_from_uri_async(uri: &foundation::Uri) -> Result>> { >::get_activation_factory().load_from_uri_async(uri) - }} - #[inline] pub fn load_from_uri_with_settings_async(uri: &::rt::gen::windows::foundation::Uri, loadSettings: &XmlLoadSettings) -> Result>> { unsafe { + } + #[inline] pub fn load_from_uri_with_settings_async(uri: &foundation::Uri, loadSettings: &XmlLoadSettings) -> Result>> { >::get_activation_factory().load_from_uri_with_settings_async(uri, loadSettings) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn load_from_file_async(file: &::rt::gen::windows::storage::IStorageFile) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn load_from_file_async(file: &::rt::gen::windows::storage::IStorageFile) -> Result>> { >::get_activation_factory().load_from_file_async(file) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn load_from_file_with_settings_async(file: &::rt::gen::windows::storage::IStorageFile, loadSettings: &XmlLoadSettings) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn load_from_file_with_settings_async(file: &::rt::gen::windows::storage::IStorageFile, loadSettings: &XmlLoadSettings) -> Result>> { >::get_activation_factory().load_from_file_with_settings_async(file, loadSettings) - }} + } } DEFINE_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]) [CLSID_XmlDocument]); DEFINE_IID!(IID_IXmlDocumentFragment, 3807013526, 3105, 17573, 139, 201, 158, 74, 38, 39, 8, 236); @@ -592,22 +592,22 @@ DEFINE_IID!(IID_IXmlDocumentIO, 1825630030, 61029, 17545, 158, 191, 202, 67, 232 RT_INTERFACE!{interface IXmlDocumentIO(IXmlDocumentIOVtbl): IInspectable(IInspectableVtbl) [IID_IXmlDocumentIO] { fn LoadXml(&self, xml: HSTRING) -> HRESULT, fn LoadXmlWithSettings(&self, xml: HSTRING, loadSettings: *mut XmlLoadSettings) -> HRESULT, - #[cfg(feature="windows-storage")] fn SaveToFileAsync(&self, file: *mut ::rt::gen::windows::storage::IStorageFile, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + #[cfg(feature="windows-storage")] fn SaveToFileAsync(&self, file: *mut ::rt::gen::windows::storage::IStorageFile, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IXmlDocumentIO { - #[inline] pub unsafe fn load_xml(&self, xml: &HStringArg) -> Result<()> { + #[inline] pub fn load_xml(&self, xml: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).LoadXml)(self as *const _ as *mut _, xml.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn load_xml_with_settings(&self, xml: &HStringArg, loadSettings: &XmlLoadSettings) -> Result<()> { + }} + #[inline] pub fn load_xml_with_settings(&self, xml: &HStringArg, loadSettings: &XmlLoadSettings) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).LoadXmlWithSettings)(self as *const _ as *mut _, 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(&self, file: &::rt::gen::windows::storage::IStorageFile) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn save_to_file_async(&self, file: &::rt::gen::windows::storage::IStorageFile) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveToFileAsync)(self as *const _ as *mut _, file as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IXmlDocumentIO2, 1560495713, 31704, 19157, 158, 191, 129, 230, 52, 114, 99, 177); RT_INTERFACE!{interface IXmlDocumentIO2(IXmlDocumentIO2Vtbl): IInspectable(IInspectableVtbl) [IID_IXmlDocumentIO2] { @@ -615,43 +615,43 @@ RT_INTERFACE!{interface IXmlDocumentIO2(IXmlDocumentIO2Vtbl): IInspectable(IInsp #[cfg(feature="windows-storage")] fn LoadXmlFromBufferWithSettings(&self, buffer: *mut ::rt::gen::windows::storage::streams::IBuffer, loadSettings: *mut XmlLoadSettings) -> HRESULT }} impl IXmlDocumentIO2 { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn load_xml_from_buffer(&self, buffer: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { + #[cfg(feature="windows-storage")] #[inline] pub fn load_xml_from_buffer(&self, buffer: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).LoadXmlFromBuffer)(self as *const _ as *mut _, buffer as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn load_xml_from_buffer_with_settings(&self, buffer: &::rt::gen::windows::storage::streams::IBuffer, loadSettings: &XmlLoadSettings) -> Result<()> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn load_xml_from_buffer_with_settings(&self, buffer: &::rt::gen::windows::storage::streams::IBuffer, loadSettings: &XmlLoadSettings) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).LoadXmlFromBufferWithSettings)(self as *const _ as *mut _, buffer as *const _ as *mut _, loadSettings as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, uri: *mut ::rt::gen::windows::foundation::Uri, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn LoadFromUriWithSettingsAsync(&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(&self, file: *mut ::rt::gen::windows::storage::IStorageFile, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn LoadFromFileWithSettingsAsync(&self, file: *mut ::rt::gen::windows::storage::IStorageFile, loadSettings: *mut XmlLoadSettings, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn LoadFromUriAsync(&self, uri: *mut foundation::Uri, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn LoadFromUriWithSettingsAsync(&self, uri: *mut foundation::Uri, loadSettings: *mut XmlLoadSettings, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn LoadFromFileAsync(&self, file: *mut ::rt::gen::windows::storage::IStorageFile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn LoadFromFileWithSettingsAsync(&self, file: *mut ::rt::gen::windows::storage::IStorageFile, loadSettings: *mut XmlLoadSettings, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IXmlDocumentStatics { - #[inline] pub unsafe fn load_from_uri_async(&self, uri: &::rt::gen::windows::foundation::Uri) -> Result>> { + #[inline] pub fn load_from_uri_async(&self, uri: &foundation::Uri) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LoadFromUriAsync)(self 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 load_from_uri_with_settings_async(&self, uri: &::rt::gen::windows::foundation::Uri, loadSettings: &XmlLoadSettings) -> Result>> { + }} + #[inline] pub fn load_from_uri_with_settings_async(&self, uri: &foundation::Uri, loadSettings: &XmlLoadSettings) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LoadFromUriWithSettingsAsync)(self as *const _ as *mut _, 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(&self, file: &::rt::gen::windows::storage::IStorageFile) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn load_from_file_async(&self, file: &::rt::gen::windows::storage::IStorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LoadFromFileAsync)(self 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 load_from_file_with_settings_async(&self, file: &::rt::gen::windows::storage::IStorageFile, loadSettings: &XmlLoadSettings) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn load_from_file_with_settings_async(&self, file: &::rt::gen::windows::storage::IStorageFile, loadSettings: &XmlLoadSettings) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LoadFromFileWithSettingsAsync)(self as *const _ as *mut _, file as *const _ as *mut _, loadSettings as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } 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] { @@ -660,21 +660,21 @@ RT_INTERFACE!{interface IXmlDocumentType(IXmlDocumentTypeVtbl): IInspectable(IIn fn get_Notations(&self, out: *mut *mut XmlNamedNodeMap) -> HRESULT }} impl IXmlDocumentType { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_entities(&self) -> Result> { + }} + #[inline] pub fn get_entities(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Entities)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_notations(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_notations(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Notations)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class XmlDocumentType: IXmlDocumentType} DEFINE_IID!(IID_IXmlDomImplementation, 1843757362, 61725, 20411, 140, 198, 88, 60, 186, 147, 17, 47); @@ -682,11 +682,11 @@ RT_INTERFACE!{interface IXmlDomImplementation(IXmlDomImplementationVtbl): IInspe fn HasFeature(&self, feature: HSTRING, version: *mut IInspectable, out: *mut bool) -> HRESULT }} impl IXmlDomImplementation { - #[inline] pub unsafe fn has_feature(&self, feature: &HStringArg, version: &IInspectable) -> Result { + #[inline] pub fn has_feature(&self, feature: &HStringArg, version: &IInspectable) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).HasFeature)(self as *const _ as *mut _, feature.get(), version as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class XmlDomImplementation: IXmlDomImplementation} DEFINE_IID!(IID_IXmlElement, 771459615, 27408, 20216, 159, 131, 239, 204, 232, 250, 236, 55); @@ -706,67 +706,67 @@ RT_INTERFACE!{interface IXmlElement(IXmlElementVtbl): IInspectable(IInspectableV fn GetAttributeNodeNS(&self, namespaceUri: *mut IInspectable, localName: HSTRING, out: *mut *mut XmlAttribute) -> HRESULT }} impl IXmlElement { - #[inline] pub unsafe fn get_tag_name(&self) -> Result { + #[inline] pub fn get_tag_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TagName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_attribute(&self, attributeName: &HStringArg) -> Result { + }} + #[inline] pub fn get_attribute(&self, attributeName: &HStringArg) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAttribute)(self as *const _ as *mut _, attributeName.get(), &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_attribute(&self, attributeName: &HStringArg, attributeValue: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_attribute(&self, attributeName: &HStringArg, attributeValue: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetAttribute)(self as *const _ as *mut _, attributeName.get(), attributeValue.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove_attribute(&self, attributeName: &HStringArg) -> Result<()> { + }} + #[inline] pub fn remove_attribute(&self, attributeName: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveAttribute)(self as *const _ as *mut _, attributeName.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_attribute_node(&self, attributeName: &HStringArg) -> Result> { + }} + #[inline] pub fn get_attribute_node(&self, attributeName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAttributeNode)(self as *const _ as *mut _, attributeName.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_attribute_node(&self, newAttribute: &XmlAttribute) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_attribute_node(&self, newAttribute: &XmlAttribute) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetAttributeNode)(self as *const _ as *mut _, newAttribute as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn remove_attribute_node(&self, attributeNode: &XmlAttribute) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn remove_attribute_node(&self, attributeNode: &XmlAttribute) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RemoveAttributeNode)(self as *const _ as *mut _, attributeNode as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_elements_by_tag_name(&self, tagName: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_elements_by_tag_name(&self, tagName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetElementsByTagName)(self as *const _ as *mut _, tagName.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_attribute_ns(&self, namespaceUri: &IInspectable, qualifiedName: &HStringArg, value: &HStringArg) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_attribute_ns(&self, namespaceUri: &IInspectable, qualifiedName: &HStringArg, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetAttributeNS)(self as *const _ as *mut _, namespaceUri as *const _ as *mut _, qualifiedName.get(), value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_attribute_ns(&self, namespaceUri: &IInspectable, localName: &HStringArg) -> Result { + }} + #[inline] pub fn get_attribute_ns(&self, namespaceUri: &IInspectable, localName: &HStringArg) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAttributeNS)(self as *const _ as *mut _, namespaceUri as *const _ as *mut _, localName.get(), &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn remove_attribute_ns(&self, namespaceUri: &IInspectable, localName: &HStringArg) -> Result<()> { + }} + #[inline] pub fn remove_attribute_ns(&self, namespaceUri: &IInspectable, localName: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveAttributeNS)(self as *const _ as *mut _, namespaceUri as *const _ as *mut _, localName.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_attribute_node_ns(&self, newAttribute: &XmlAttribute) -> Result> { + }} + #[inline] pub fn set_attribute_node_ns(&self, newAttribute: &XmlAttribute) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetAttributeNodeNS)(self as *const _ as *mut _, newAttribute as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_attribute_node_ns(&self, namespaceUri: &IInspectable, localName: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_attribute_node_ns(&self, namespaceUri: &IInspectable, localName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAttributeNodeNS)(self as *const _ as *mut _, namespaceUri as *const _ as *mut _, localName.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class XmlElement: IXmlElement} DEFINE_IID!(IID_IXmlEntityReference, 774850492, 50128, 19663, 187, 134, 10, 184, 195, 106, 97, 207); @@ -788,51 +788,51 @@ RT_INTERFACE!{interface IXmlLoadSettings(IXmlLoadSettingsVtbl): IInspectable(IIn fn put_ElementContentWhiteSpace(&self, value: bool) -> HRESULT }} impl IXmlLoadSettings { - #[inline] pub unsafe fn get_max_element_depth(&self) -> Result { + #[inline] pub fn get_max_element_depth(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxElementDepth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_element_depth(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_max_element_depth(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxElementDepth)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_prohibit_dtd(&self) -> Result { + }} + #[inline] pub fn get_prohibit_dtd(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProhibitDtd)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_prohibit_dtd(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_prohibit_dtd(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ProhibitDtd)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_resolve_externals(&self) -> Result { + }} + #[inline] pub fn get_resolve_externals(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ResolveExternals)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_resolve_externals(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_resolve_externals(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ResolveExternals)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_validate_on_parse(&self) -> Result { + }} + #[inline] pub fn get_validate_on_parse(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ValidateOnParse)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_validate_on_parse(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_validate_on_parse(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ValidateOnParse)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_element_content_white_space(&self) -> Result { + }} + #[inline] pub fn get_element_content_white_space(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ElementContentWhiteSpace)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_element_content_white_space(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_element_content_white_space(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ElementContentWhiteSpace)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class XmlLoadSettings: IXmlLoadSettings} impl RtActivatable for XmlLoadSettings {} @@ -849,46 +849,46 @@ RT_INTERFACE!{interface IXmlNamedNodeMap(IXmlNamedNodeMapVtbl): IInspectable(IIn fn SetNamedItemNS(&self, node: *mut IXmlNode, out: *mut *mut IXmlNode) -> HRESULT }} impl IXmlNamedNodeMap { - #[inline] pub unsafe fn get_length(&self) -> Result { + #[inline] pub fn get_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Length)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn item(&self, index: u32) -> Result> { + }} + #[inline] pub fn item(&self, index: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Item)(self as *const _ as *mut _, index, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_named_item(&self, name: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_named_item(&self, name: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetNamedItem)(self as *const _ as *mut _, name.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_named_item(&self, node: &IXmlNode) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_named_item(&self, node: &IXmlNode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetNamedItem)(self as *const _ as *mut _, node as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn remove_named_item(&self, name: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn remove_named_item(&self, name: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RemoveNamedItem)(self as *const _ as *mut _, name.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_named_item_ns(&self, namespaceUri: &IInspectable, name: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_named_item_ns(&self, namespaceUri: &IInspectable, name: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetNamedItemNS)(self as *const _ as *mut _, namespaceUri as *const _ as *mut _, name.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn remove_named_item_ns(&self, namespaceUri: &IInspectable, name: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn remove_named_item_ns(&self, namespaceUri: &IInspectable, name: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RemoveNamedItemNS)(self as *const _ as *mut _, namespaceUri as *const _ as *mut _, name.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_named_item_ns(&self, node: &IXmlNode) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_named_item_ns(&self, node: &IXmlNode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetNamedItemNS)(self as *const _ as *mut _, node as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class XmlNamedNodeMap: IXmlNamedNodeMap} DEFINE_IID!(IID_IXmlNode, 477371737, 8482, 18389, 168, 86, 131, 243, 212, 33, 72, 117); @@ -918,118 +918,118 @@ RT_INTERFACE!{interface IXmlNode(IXmlNodeVtbl): IInspectable(IInspectableVtbl) [ fn put_Prefix(&self, value: *mut IInspectable) -> HRESULT }} impl IXmlNode { - #[inline] pub unsafe fn get_node_value(&self) -> Result> { + #[inline] pub fn get_node_value(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NodeValue)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_node_value(&self, value: &IInspectable) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_node_value(&self, value: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_NodeValue)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_node_type(&self) -> Result { + }} + #[inline] pub fn get_node_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NodeType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_node_name(&self) -> Result { + }} + #[inline] pub fn get_node_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NodeName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_parent_node(&self) -> Result> { + }} + #[inline] pub fn get_parent_node(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ParentNode)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_child_nodes(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_child_nodes(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ChildNodes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_first_child(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_first_child(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FirstChild)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_last_child(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_last_child(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LastChild)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_previous_sibling(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_previous_sibling(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PreviousSibling)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_next_sibling(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_next_sibling(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NextSibling)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_attributes(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_attributes(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Attributes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn has_child_nodes(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn has_child_nodes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).HasChildNodes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_owner_document(&self) -> Result> { + }} + #[inline] pub fn get_owner_document(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OwnerDocument)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn insert_before(&self, newChild: &IXmlNode, referenceChild: &IXmlNode) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn insert_before(&self, newChild: &IXmlNode, referenceChild: &IXmlNode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).InsertBefore)(self as *const _ as *mut _, newChild as *const _ as *mut _, referenceChild as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn replace_child(&self, newChild: &IXmlNode, referenceChild: &IXmlNode) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn replace_child(&self, newChild: &IXmlNode, referenceChild: &IXmlNode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReplaceChild)(self as *const _ as *mut _, newChild as *const _ as *mut _, referenceChild as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn remove_child(&self, childNode: &IXmlNode) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn remove_child(&self, childNode: &IXmlNode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RemoveChild)(self as *const _ as *mut _, childNode as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn append_child(&self, newChild: &IXmlNode) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn append_child(&self, newChild: &IXmlNode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AppendChild)(self as *const _ as *mut _, newChild as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn clone_node(&self, deep: bool) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn clone_node(&self, deep: bool) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CloneNode)(self as *const _ as *mut _, deep, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_namespace_uri(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_namespace_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NamespaceUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_local_name(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_local_name(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LocalName)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_prefix(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_prefix(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Prefix)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn normalize(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn normalize(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Normalize)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_prefix(&self, value: &IInspectable) -> Result<()> { + }} + #[inline] pub fn set_prefix(&self, value: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Prefix)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IXmlNodeList, 2355146103, 33700, 20161, 156, 84, 123, 164, 41, 225, 61, 166); RT_INTERFACE!{interface IXmlNodeList(IXmlNodeListVtbl): IInspectable(IInspectableVtbl) [IID_IXmlNodeList] { @@ -1037,16 +1037,16 @@ RT_INTERFACE!{interface IXmlNodeList(IXmlNodeListVtbl): IInspectable(IInspectabl fn Item(&self, index: u32, out: *mut *mut IXmlNode) -> HRESULT }} impl IXmlNodeList { - #[inline] pub unsafe fn get_length(&self) -> Result { + #[inline] pub fn get_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Length)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn item(&self, index: u32) -> Result> { + }} + #[inline] pub fn item(&self, index: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Item)(self as *const _ as *mut _, index, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class XmlNodeList: IXmlNodeList} DEFINE_IID!(IID_IXmlNodeSelector, 1675344523, 53467, 20449, 183, 69, 249, 67, 58, 253, 194, 91); @@ -1057,26 +1057,26 @@ RT_INTERFACE!{interface IXmlNodeSelector(IXmlNodeSelectorVtbl): IInspectable(IIn fn SelectNodesNS(&self, xpath: HSTRING, namespaces: *mut IInspectable, out: *mut *mut XmlNodeList) -> HRESULT }} impl IXmlNodeSelector { - #[inline] pub unsafe fn select_single_node(&self, xpath: &HStringArg) -> Result> { + #[inline] pub fn select_single_node(&self, xpath: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SelectSingleNode)(self as *const _ as *mut _, xpath.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn select_nodes(&self, xpath: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn select_nodes(&self, xpath: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SelectNodes)(self as *const _ as *mut _, xpath.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn select_single_node_ns(&self, xpath: &HStringArg, namespaces: &IInspectable) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn select_single_node_ns(&self, xpath: &HStringArg, namespaces: &IInspectable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SelectSingleNodeNS)(self as *const _ as *mut _, xpath.get(), namespaces as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn select_nodes_ns(&self, xpath: &HStringArg, namespaces: &IInspectable) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn select_nodes_ns(&self, xpath: &HStringArg, namespaces: &IInspectable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SelectNodesNS)(self as *const _ as *mut _, xpath.get(), namespaces as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IXmlNodeSerializer, 1556460418, 59101, 18833, 171, 239, 6, 216, 210, 231, 189, 12); RT_INTERFACE!{interface IXmlNodeSerializer(IXmlNodeSerializerVtbl): IInspectable(IInspectableVtbl) [IID_IXmlNodeSerializer] { @@ -1085,20 +1085,20 @@ RT_INTERFACE!{interface IXmlNodeSerializer(IXmlNodeSerializerVtbl): IInspectable fn put_InnerText(&self, value: HSTRING) -> HRESULT }} impl IXmlNodeSerializer { - #[inline] pub unsafe fn get_xml(&self) -> Result { + #[inline] pub fn get_xml(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetXml)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_inner_text(&self) -> Result { + }} + #[inline] pub fn get_inner_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InnerText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_inner_text(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_inner_text(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InnerText)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IXmlProcessingInstruction, 654834974, 7826, 20174, 182, 244, 38, 240, 105, 7, 141, 220); RT_INTERFACE!{interface IXmlProcessingInstruction(IXmlProcessingInstructionVtbl): IInspectable(IInspectableVtbl) [IID_IXmlProcessingInstruction] { @@ -1107,20 +1107,20 @@ RT_INTERFACE!{interface IXmlProcessingInstruction(IXmlProcessingInstructionVtbl) fn put_Data(&self, value: HSTRING) -> HRESULT }} impl IXmlProcessingInstruction { - #[inline] pub unsafe fn get_target(&self) -> Result { + #[inline] pub fn get_target(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Target)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_data(&self) -> Result { + }} + #[inline] pub fn get_data(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Data)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_data(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_data(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Data)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class XmlProcessingInstruction: IXmlProcessingInstruction} DEFINE_IID!(IID_IXmlText, 4180780235, 12429, 18272, 161, 213, 67, 182, 116, 80, 172, 126); @@ -1128,11 +1128,11 @@ RT_INTERFACE!{interface IXmlText(IXmlTextVtbl): IInspectable(IInspectableVtbl) [ fn SplitText(&self, offset: u32, out: *mut *mut IXmlText) -> HRESULT }} impl IXmlText { - #[inline] pub unsafe fn split_text(&self, offset: u32) -> Result> { + #[inline] pub fn split_text(&self, offset: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SplitText)(self as *const _ as *mut _, offset, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class XmlText: IXmlText} } // Windows.Data.Xml.Dom @@ -1143,18 +1143,18 @@ RT_INTERFACE!{interface IXsltProcessor(IXsltProcessorVtbl): IInspectable(IInspec fn TransformToString(&self, inputNode: *mut super::dom::IXmlNode, out: *mut HSTRING) -> HRESULT }} impl IXsltProcessor { - #[inline] pub unsafe fn transform_to_string(&self, inputNode: &super::dom::IXmlNode) -> Result { + #[inline] pub fn transform_to_string(&self, inputNode: &super::dom::IXmlNode) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TransformToString)(self as *const _ as *mut _, inputNode as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class XsltProcessor: IXsltProcessor} impl RtActivatable for XsltProcessor {} impl XsltProcessor { - #[inline] pub fn create_instance(document: &super::dom::XmlDocument) -> Result> { unsafe { + #[inline] pub fn create_instance(document: &super::dom::XmlDocument) -> Result> { >::get_activation_factory().create_instance(document) - }} + } } DEFINE_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]) [CLSID_XsltProcessor]); DEFINE_IID!(IID_IXsltProcessor2, 2376358998, 38821, 17611, 168, 190, 39, 216, 98, 128, 199, 10); @@ -1162,22 +1162,22 @@ RT_INTERFACE!{interface IXsltProcessor2(IXsltProcessor2Vtbl): IInspectable(IInsp fn TransformToDocument(&self, inputNode: *mut super::dom::IXmlNode, out: *mut *mut super::dom::XmlDocument) -> HRESULT }} impl IXsltProcessor2 { - #[inline] pub unsafe fn transform_to_document(&self, inputNode: &super::dom::IXmlNode) -> Result> { + #[inline] pub fn transform_to_document(&self, inputNode: &super::dom::IXmlNode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TransformToDocument)(self as *const _ as *mut _, inputNode as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, document: *mut super::dom::XmlDocument, out: *mut *mut XsltProcessor) -> HRESULT }} impl IXsltProcessorFactory { - #[inline] pub unsafe fn create_instance(&self, document: &super::dom::XmlDocument) -> Result> { + #[inline] pub fn create_instance(&self, document: &super::dom::XmlDocument) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self as *const _ as *mut _, document as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } } // Windows.Data.Xml.Xsl } // Windows.Data.Xml @@ -1188,18 +1188,18 @@ RT_INTERFACE!{static interface IHtmlUtilities(IHtmlUtilitiesVtbl): IInspectable( fn ConvertToText(&self, html: HSTRING, out: *mut HSTRING) -> HRESULT }} impl IHtmlUtilities { - #[inline] pub unsafe fn convert_to_text(&self, html: &HStringArg) -> Result { + #[inline] pub fn convert_to_text(&self, html: &HStringArg) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConvertToText)(self as *const _ as *mut _, html.get(), &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class HtmlUtilities} impl RtActivatable for HtmlUtilities {} impl HtmlUtilities { - #[inline] pub fn convert_to_text(html: &HStringArg) -> Result { unsafe { + #[inline] pub fn convert_to_text(html: &HStringArg) -> Result { >::get_activation_factory().convert_to_text(html) - }} + } } DEFINE_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]) [CLSID_HtmlUtilities]); } // Windows.Data.Html @@ -1212,164 +1212,164 @@ RT_INTERFACE!{interface IPdfDocument(IPdfDocumentVtbl): IInspectable(IInspectabl fn get_IsPasswordProtected(&self, out: *mut bool) -> HRESULT }} impl IPdfDocument { - #[inline] pub unsafe fn get_page(&self, pageIndex: u32) -> Result> { + #[inline] pub fn get_page(&self, pageIndex: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPage)(self as *const _ as *mut _, pageIndex, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_page_count(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_page_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PageCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_password_protected(&self) -> Result { + }} + #[inline] pub fn get_is_password_protected(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPasswordProtected)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PdfDocument: IPdfDocument} impl RtActivatable for PdfDocument {} impl PdfDocument { - #[cfg(feature="windows-storage")] #[inline] pub fn load_from_file_async(file: &super::super::storage::IStorageFile) -> Result>> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn load_from_file_async(file: &super::super::storage::IStorageFile) -> Result>> { >::get_activation_factory().load_from_file_async(file) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn load_from_file_with_password_async(file: &super::super::storage::IStorageFile, password: &HStringArg) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn load_from_file_with_password_async(file: &super::super::storage::IStorageFile, password: &HStringArg) -> Result>> { >::get_activation_factory().load_from_file_with_password_async(file, password) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn load_from_stream_async(inputStream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn load_from_stream_async(inputStream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { >::get_activation_factory().load_from_stream_async(inputStream) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn load_from_stream_with_password_async(inputStream: &super::super::storage::streams::IRandomAccessStream, password: &HStringArg) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn load_from_stream_with_password_async(inputStream: &super::super::storage::streams::IRandomAccessStream, password: &HStringArg) -> Result>> { >::get_activation_factory().load_from_stream_with_password_async(inputStream, password) - }} + } } DEFINE_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]) [CLSID_PdfDocument]); 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(&self, file: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn LoadFromFileWithPasswordAsync(&self, file: *mut super::super::storage::IStorageFile, password: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn LoadFromStreamAsync(&self, inputStream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn LoadFromStreamWithPasswordAsync(&self, inputStream: *mut super::super::storage::streams::IRandomAccessStream, password: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn LoadFromFileAsync(&self, file: *mut super::super::storage::IStorageFile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn LoadFromFileWithPasswordAsync(&self, file: *mut super::super::storage::IStorageFile, password: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn LoadFromStreamAsync(&self, inputStream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn LoadFromStreamWithPasswordAsync(&self, inputStream: *mut super::super::storage::streams::IRandomAccessStream, password: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IPdfDocumentStatics { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn load_from_file_async(&self, file: &super::super::storage::IStorageFile) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn load_from_file_async(&self, file: &super::super::storage::IStorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LoadFromFileAsync)(self 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 load_from_file_with_password_async(&self, file: &super::super::storage::IStorageFile, password: &HStringArg) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn load_from_file_with_password_async(&self, file: &super::super::storage::IStorageFile, password: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LoadFromFileWithPasswordAsync)(self as *const _ as *mut _, file as *const _ as *mut _, password.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn load_from_stream_async(&self, inputStream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn load_from_stream_async(&self, inputStream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LoadFromStreamAsync)(self as *const _ as *mut _, 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(&self, inputStream: &super::super::storage::streams::IRandomAccessStream, password: &HStringArg) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn load_from_stream_with_password_async(&self, inputStream: &super::super::storage::streams::IRandomAccessStream, password: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LoadFromStreamWithPasswordAsync)(self as *const _ as *mut _, inputStream as *const _ as *mut _, password.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self) -> (), - #[cfg(feature="windows-storage")] fn RenderToStreamAsync(&self, outputStream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + #[cfg(feature="windows-storage")] fn RenderToStreamAsync(&self, outputStream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut foundation::IAsyncAction) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-storage")] fn RenderWithOptionsToStreamAsync(&self, outputStream: *mut super::super::storage::streams::IRandomAccessStream, options: *mut PdfPageRenderOptions, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn PreparePageAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + #[cfg(feature="windows-storage")] fn RenderWithOptionsToStreamAsync(&self, outputStream: *mut super::super::storage::streams::IRandomAccessStream, options: *mut PdfPageRenderOptions, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn PreparePageAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn get_Index(&self, out: *mut u32) -> HRESULT, - fn get_Size(&self, out: *mut super::super::foundation::Size) -> HRESULT, + fn get_Size(&self, out: *mut foundation::Size) -> HRESULT, fn get_Dimensions(&self, out: *mut *mut PdfPageDimensions) -> HRESULT, fn get_Rotation(&self, out: *mut PdfPageRotation) -> HRESULT, fn get_PreferredZoom(&self, out: *mut f32) -> HRESULT }} impl IPdfPage { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn render_to_stream_async(&self, outputStream: &super::super::storage::streams::IRandomAccessStream) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn render_to_stream_async(&self, outputStream: &super::super::storage::streams::IRandomAccessStream) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RenderToStreamAsync)(self as *const _ as *mut _, 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(&self, outputStream: &super::super::storage::streams::IRandomAccessStream, options: &PdfPageRenderOptions) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn render_with_options_to_stream_async(&self, outputStream: &super::super::storage::streams::IRandomAccessStream, options: &PdfPageRenderOptions) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RenderWithOptionsToStreamAsync)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[inline] pub fn prepare_page_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PreparePageAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_index(&self) -> Result { + }} + #[inline] pub fn get_index(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Index)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_size(&self) -> Result { + }} + #[inline] pub fn get_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Size)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_dimensions(&self) -> Result> { + }} + #[inline] pub fn get_dimensions(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Dimensions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rotation(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_rotation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Rotation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_preferred_zoom(&self) -> Result { + }} + #[inline] pub fn get_preferred_zoom(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PreferredZoom)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PdfPage: IPdfPage} 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(&self, out: *mut super::super::foundation::Rect) -> HRESULT, - fn get_CropBox(&self, out: *mut super::super::foundation::Rect) -> HRESULT, - fn get_BleedBox(&self, out: *mut super::super::foundation::Rect) -> HRESULT, - fn get_TrimBox(&self, out: *mut super::super::foundation::Rect) -> HRESULT, - fn get_ArtBox(&self, out: *mut super::super::foundation::Rect) -> HRESULT + fn get_MediaBox(&self, out: *mut foundation::Rect) -> HRESULT, + fn get_CropBox(&self, out: *mut foundation::Rect) -> HRESULT, + fn get_BleedBox(&self, out: *mut foundation::Rect) -> HRESULT, + fn get_TrimBox(&self, out: *mut foundation::Rect) -> HRESULT, + fn get_ArtBox(&self, out: *mut foundation::Rect) -> HRESULT }} impl IPdfPageDimensions { - #[inline] pub unsafe fn get_media_box(&self) -> Result { + #[inline] pub fn get_media_box(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MediaBox)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_crop_box(&self) -> Result { + }} + #[inline] pub fn get_crop_box(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CropBox)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_bleed_box(&self) -> Result { + }} + #[inline] pub fn get_bleed_box(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BleedBox)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_trim_box(&self) -> Result { + }} + #[inline] pub fn get_trim_box(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TrimBox)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_art_box(&self) -> Result { + }} + #[inline] pub fn get_art_box(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ArtBox)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PdfPageDimensions: IPdfPageDimensions} 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(&self, out: *mut super::super::foundation::Rect) -> HRESULT, - fn put_SourceRect(&self, value: super::super::foundation::Rect) -> HRESULT, + fn get_SourceRect(&self, out: *mut foundation::Rect) -> HRESULT, + fn put_SourceRect(&self, value: foundation::Rect) -> HRESULT, fn get_DestinationWidth(&self, out: *mut u32) -> HRESULT, fn put_DestinationWidth(&self, value: u32) -> HRESULT, fn get_DestinationHeight(&self, out: *mut u32) -> HRESULT, @@ -1384,60 +1384,60 @@ RT_INTERFACE!{interface IPdfPageRenderOptions(IPdfPageRenderOptionsVtbl): IInspe fn put_BitmapEncoderId(&self, value: Guid) -> HRESULT }} impl IPdfPageRenderOptions { - #[inline] pub unsafe fn get_source_rect(&self) -> Result { + #[inline] pub fn get_source_rect(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SourceRect)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_source_rect(&self, value: super::super::foundation::Rect) -> Result<()> { + }} + #[inline] pub fn set_source_rect(&self, value: foundation::Rect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SourceRect)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_destination_width(&self) -> Result { + }} + #[inline] pub fn get_destination_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DestinationWidth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_destination_width(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_destination_width(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DestinationWidth)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_destination_height(&self) -> Result { + }} + #[inline] pub fn get_destination_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DestinationHeight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_destination_height(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_destination_height(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DestinationHeight)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_background_color(&self) -> Result { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_background_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BackgroundColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn set_background_color(&self, value: super::super::ui::Color) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_background_color(&self, value: super::super::ui::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BackgroundColor)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_ignoring_high_contrast(&self) -> Result { + }} + #[inline] pub fn get_is_ignoring_high_contrast(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsIgnoringHighContrast)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_ignoring_high_contrast(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_ignoring_high_contrast(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsIgnoringHighContrast)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_bitmap_encoder_id(&self) -> Result { + }} + #[inline] pub fn get_bitmap_encoder_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BitmapEncoderId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_bitmap_encoder_id(&self, value: Guid) -> Result<()> { + }} + #[inline] pub fn set_bitmap_encoder_id(&self, value: Guid) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BitmapEncoderId)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PdfPageRenderOptions: IPdfPageRenderOptions} impl RtActivatable for PdfPageRenderOptions {} @@ -1458,21 +1458,21 @@ RT_INTERFACE!{interface IAlternateWordForm(IAlternateWordFormVtbl): IInspectable fn get_NormalizationFormat(&self, out: *mut AlternateNormalizationFormat) -> HRESULT }} impl IAlternateWordForm { - #[inline] pub unsafe fn get_source_text_segment(&self) -> Result { + #[inline] pub fn get_source_text_segment(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SourceTextSegment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_alternate_text(&self) -> Result { + }} + #[inline] pub fn get_alternate_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AlternateText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_normalization_format(&self) -> Result { + }} + #[inline] pub fn get_normalization_format(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NormalizationFormat)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AlternateWordForm: IAlternateWordForm} DEFINE_IID!(IID_ISelectableWordSegment, 2439662775, 35495, 19576, 179, 116, 93, 237, 183, 82, 230, 11); @@ -1481,62 +1481,62 @@ RT_INTERFACE!{interface ISelectableWordSegment(ISelectableWordSegmentVtbl): IIns fn get_SourceTextSegment(&self, out: *mut TextSegment) -> HRESULT }} impl ISelectableWordSegment { - #[inline] pub unsafe fn get_text(&self) -> Result { + #[inline] pub fn get_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Text)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_source_text_segment(&self) -> Result { + }} + #[inline] pub fn get_source_text_segment(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SourceTextSegment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, precedingWords: *mut super::super::foundation::collections::IIterable, words: *mut super::super::foundation::collections::IIterable) -> HRESULT + fn Invoke(&self, precedingWords: *mut foundation::collections::IIterable, words: *mut foundation::collections::IIterable) -> HRESULT }} impl SelectableWordSegmentsTokenizingHandler { - #[inline] pub unsafe fn invoke(&self, precedingWords: &super::super::foundation::collections::IIterable, words: &super::super::foundation::collections::IIterable) -> Result<()> { + #[inline] pub fn invoke(&self, precedingWords: &foundation::collections::IIterable, words: &foundation::collections::IIterable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, precedingWords as *const _ as *mut _, words as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut HSTRING) -> HRESULT, fn GetTokenAt(&self, text: HSTRING, startIndex: u32, out: *mut *mut SelectableWordSegment) -> HRESULT, - fn GetTokens(&self, text: HSTRING, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn GetTokens(&self, text: HSTRING, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn Tokenize(&self, text: HSTRING, startIndex: u32, handler: *mut SelectableWordSegmentsTokenizingHandler) -> HRESULT }} impl ISelectableWordsSegmenter { - #[inline] pub unsafe fn get_resolved_language(&self) -> Result { + #[inline] pub fn get_resolved_language(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResolvedLanguage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_token_at(&self, text: &HStringArg, startIndex: u32) -> Result> { + }} + #[inline] pub fn get_token_at(&self, text: &HStringArg, startIndex: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetTokenAt)(self as *const _ as *mut _, text.get(), startIndex, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_tokens(&self, text: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_tokens(&self, text: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetTokens)(self as *const _ as *mut _, text.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn tokenize(&self, text: &HStringArg, startIndex: u32, handler: &SelectableWordSegmentsTokenizingHandler) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn tokenize(&self, text: &HStringArg, startIndex: u32, handler: &SelectableWordSegmentsTokenizingHandler) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Tokenize)(self as *const _ as *mut _, text.get(), startIndex, handler as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SelectableWordsSegmenter: ISelectableWordsSegmenter} impl RtActivatable for SelectableWordsSegmenter {} impl SelectableWordsSegmenter { - #[inline] pub fn create_with_language(language: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_with_language(language: &HStringArg) -> Result> { >::get_activation_factory().create_with_language(language) - }} + } } DEFINE_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]) [CLSID_SelectableWordsSegmenter]); DEFINE_IID!(IID_ISelectableWordsSegmenterFactory, 2356835912, 24663, 17209, 188, 112, 242, 16, 1, 10, 65, 80); @@ -1544,38 +1544,38 @@ RT_INTERFACE!{static interface ISelectableWordsSegmenterFactory(ISelectableWords fn CreateWithLanguage(&self, language: HSTRING, out: *mut *mut SelectableWordsSegmenter) -> HRESULT }} impl ISelectableWordsSegmenterFactory { - #[inline] pub unsafe fn create_with_language(&self, language: &HStringArg) -> Result> { + #[inline] pub fn create_with_language(&self, language: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithLanguage)(self as *const _ as *mut _, language.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, content: HSTRING, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn FindInProperty(&self, propertyContent: HSTRING, propertyName: HSTRING, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn Find(&self, content: HSTRING, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn FindInProperty(&self, propertyContent: HSTRING, propertyName: HSTRING, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl ISemanticTextQuery { - #[inline] pub unsafe fn find(&self, content: &HStringArg) -> Result>> { + #[inline] pub fn find(&self, content: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Find)(self as *const _ as *mut _, content.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_in_property(&self, propertyContent: &HStringArg, propertyName: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn find_in_property(&self, propertyContent: &HStringArg, propertyName: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindInProperty)(self as *const _ as *mut _, propertyContent.get(), propertyName.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SemanticTextQuery: ISemanticTextQuery} impl RtActivatable for SemanticTextQuery {} impl SemanticTextQuery { - #[inline] pub fn create(aqsFilter: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(aqsFilter: &HStringArg) -> Result> { >::get_activation_factory().create(aqsFilter) - }} - #[inline] pub fn create_with_language(aqsFilter: &HStringArg, filterLanguage: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_with_language(aqsFilter: &HStringArg, filterLanguage: &HStringArg) -> Result> { >::get_activation_factory().create_with_language(aqsFilter, filterLanguage) - }} + } } DEFINE_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]) [CLSID_SemanticTextQuery]); DEFINE_IID!(IID_ISemanticTextQueryFactory, 596378883, 63893, 17799, 135, 119, 162, 183, 216, 10, 207, 239); @@ -1584,52 +1584,52 @@ RT_INTERFACE!{static interface ISemanticTextQueryFactory(ISemanticTextQueryFacto fn CreateWithLanguage(&self, aqsFilter: HSTRING, filterLanguage: HSTRING, out: *mut *mut SemanticTextQuery) -> HRESULT }} impl ISemanticTextQueryFactory { - #[inline] pub unsafe fn create(&self, aqsFilter: &HStringArg) -> Result> { + #[inline] pub fn create(&self, aqsFilter: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, aqsFilter.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_language(&self, aqsFilter: &HStringArg, filterLanguage: &HStringArg) -> Result> { + }} + #[inline] pub fn create_with_language(&self, aqsFilter: &HStringArg, filterLanguage: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithLanguage)(self as *const _ as *mut _, aqsFilter.get(), filterLanguage.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut HSTRING) -> HRESULT, fn get_LanguageAvailableButNotInstalled(&self, out: *mut bool) -> HRESULT, - fn GetCandidatesAsync(&self, input: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetCandidatesWithMaxCountAsync(&self, input: HSTRING, maxCandidates: u32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn GetCandidatesAsync(&self, input: HSTRING, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetCandidatesWithMaxCountAsync(&self, input: HSTRING, maxCandidates: u32, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl ITextConversionGenerator { - #[inline] pub unsafe fn get_resolved_language(&self) -> Result { + #[inline] pub fn get_resolved_language(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResolvedLanguage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_language_available_but_not_installed(&self) -> Result { + }} + #[inline] pub fn get_language_available_but_not_installed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LanguageAvailableButNotInstalled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_candidates_async(&self, input: &HStringArg) -> Result>>> { + }} + #[inline] pub fn get_candidates_async(&self, input: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCandidatesAsync)(self as *const _ as *mut _, 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(&self, input: &HStringArg, maxCandidates: u32) -> Result>>> { + }} + #[inline] pub fn get_candidates_with_max_count_async(&self, input: &HStringArg, maxCandidates: u32) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCandidatesWithMaxCountAsync)(self as *const _ as *mut _, input.get(), maxCandidates, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class TextConversionGenerator: ITextConversionGenerator} impl RtActivatable for TextConversionGenerator {} impl TextConversionGenerator { - #[inline] pub fn create(languageTag: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(languageTag: &HStringArg) -> Result> { >::get_activation_factory().create(languageTag) - }} + } } DEFINE_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]) [CLSID_TextConversionGenerator]); DEFINE_IID!(IID_ITextConversionGeneratorFactory, 4239013761, 12419, 18859, 190, 21, 86, 223, 187, 183, 77, 111); @@ -1637,11 +1637,11 @@ RT_INTERFACE!{static interface ITextConversionGeneratorFactory(ITextConversionGe fn Create(&self, languageTag: HSTRING, out: *mut *mut TextConversionGenerator) -> HRESULT }} impl ITextConversionGeneratorFactory { - #[inline] pub unsafe fn create(&self, languageTag: &HStringArg) -> Result> { + #[inline] pub fn create(&self, languageTag: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, languageTag.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ITextPhoneme, 2472715274, 39802, 17769, 148, 207, 216, 79, 47, 56, 207, 155); RT_INTERFACE!{interface ITextPhoneme(ITextPhonemeVtbl): IInspectable(IInspectableVtbl) [IID_ITextPhoneme] { @@ -1649,53 +1649,53 @@ RT_INTERFACE!{interface ITextPhoneme(ITextPhonemeVtbl): IInspectable(IInspectabl fn get_ReadingText(&self, out: *mut HSTRING) -> HRESULT }} impl ITextPhoneme { - #[inline] pub unsafe fn get_display_text(&self) -> Result { + #[inline] pub fn get_display_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_reading_text(&self) -> Result { + }} + #[inline] pub fn get_reading_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ReadingText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class TextPhoneme: ITextPhoneme} 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(&self, out: *mut HSTRING) -> HRESULT, fn get_LanguageAvailableButNotInstalled(&self, out: *mut bool) -> HRESULT, - fn GetCandidatesAsync(&self, input: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetCandidatesWithMaxCountAsync(&self, input: HSTRING, maxCandidates: u32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn GetCandidatesAsync(&self, input: HSTRING, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetCandidatesWithMaxCountAsync(&self, input: HSTRING, maxCandidates: u32, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl ITextPredictionGenerator { - #[inline] pub unsafe fn get_resolved_language(&self) -> Result { + #[inline] pub fn get_resolved_language(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResolvedLanguage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_language_available_but_not_installed(&self) -> Result { + }} + #[inline] pub fn get_language_available_but_not_installed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LanguageAvailableButNotInstalled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_candidates_async(&self, input: &HStringArg) -> Result>>> { + }} + #[inline] pub fn get_candidates_async(&self, input: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCandidatesAsync)(self as *const _ as *mut _, 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(&self, input: &HStringArg, maxCandidates: u32) -> Result>>> { + }} + #[inline] pub fn get_candidates_with_max_count_async(&self, input: &HStringArg, maxCandidates: u32) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCandidatesWithMaxCountAsync)(self as *const _ as *mut _, input.get(), maxCandidates, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class TextPredictionGenerator: ITextPredictionGenerator} impl RtActivatable for TextPredictionGenerator {} impl TextPredictionGenerator { - #[inline] pub fn create(languageTag: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(languageTag: &HStringArg) -> Result> { >::get_activation_factory().create(languageTag) - }} + } } DEFINE_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]) [CLSID_TextPredictionGenerator]); DEFINE_IID!(IID_ITextPredictionGeneratorFactory, 1918350358, 35746, 18257, 157, 48, 157, 133, 67, 86, 83, 162); @@ -1703,64 +1703,64 @@ RT_INTERFACE!{static interface ITextPredictionGeneratorFactory(ITextPredictionGe fn Create(&self, languageTag: HSTRING, out: *mut *mut TextPredictionGenerator) -> HRESULT }} impl ITextPredictionGeneratorFactory { - #[inline] pub unsafe fn create(&self, languageTag: &HStringArg) -> Result> { + #[inline] pub fn create(&self, languageTag: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, languageTag.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut HSTRING) -> HRESULT, fn get_LanguageAvailableButNotInstalled(&self, out: *mut bool) -> HRESULT, - fn ConvertBackAsync(&self, input: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn ConvertBackAsync(&self, input: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ITextReverseConversionGenerator { - #[inline] pub unsafe fn get_resolved_language(&self) -> Result { + #[inline] pub fn get_resolved_language(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResolvedLanguage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_language_available_but_not_installed(&self) -> Result { + }} + #[inline] pub fn get_language_available_but_not_installed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LanguageAvailableButNotInstalled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn convert_back_async(&self, input: &HStringArg) -> Result>> { + }} + #[inline] pub fn convert_back_async(&self, input: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConvertBackAsync)(self as *const _ as *mut _, input.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class TextReverseConversionGenerator: ITextReverseConversionGenerator} impl RtActivatable for TextReverseConversionGenerator {} impl TextReverseConversionGenerator { - #[inline] pub fn create(languageTag: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(languageTag: &HStringArg) -> Result> { >::get_activation_factory().create(languageTag) - }} + } } DEFINE_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]) [CLSID_TextReverseConversionGenerator]); 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(&self, input: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn GetPhonemesAsync(&self, input: HSTRING, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl ITextReverseConversionGenerator2 { - #[inline] pub unsafe fn get_phonemes_async(&self, input: &HStringArg) -> Result>>> { + #[inline] pub fn get_phonemes_async(&self, input: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPhonemesAsync)(self as *const _ as *mut _, input.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, languageTag: HSTRING, out: *mut *mut TextReverseConversionGenerator) -> HRESULT }} impl ITextReverseConversionGeneratorFactory { - #[inline] pub unsafe fn create(&self, languageTag: &HStringArg) -> Result> { + #[inline] pub fn create(&self, languageTag: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, languageTag.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_STRUCT! { struct TextSegment { StartPosition: u32, Length: u32, @@ -1768,57 +1768,57 @@ RT_STRUCT! { struct TextSegment { RT_CLASS!{static class UnicodeCharacters} impl RtActivatable for UnicodeCharacters {} impl UnicodeCharacters { - #[inline] pub fn get_codepoint_from_surrogate_pair(highSurrogate: u32, lowSurrogate: u32) -> Result { unsafe { + #[inline] pub fn get_codepoint_from_surrogate_pair(highSurrogate: u32, lowSurrogate: u32) -> Result { >::get_activation_factory().get_codepoint_from_surrogate_pair(highSurrogate, lowSurrogate) - }} - #[inline] pub fn get_surrogate_pair_from_codepoint(codepoint: u32) -> Result<(Char, Char)> { unsafe { + } + #[inline] pub fn get_surrogate_pair_from_codepoint(codepoint: u32) -> Result<(Char, Char)> { >::get_activation_factory().get_surrogate_pair_from_codepoint(codepoint) - }} - #[inline] pub fn is_high_surrogate(codepoint: u32) -> Result { unsafe { + } + #[inline] pub fn is_high_surrogate(codepoint: u32) -> Result { >::get_activation_factory().is_high_surrogate(codepoint) - }} - #[inline] pub fn is_low_surrogate(codepoint: u32) -> Result { unsafe { + } + #[inline] pub fn is_low_surrogate(codepoint: u32) -> Result { >::get_activation_factory().is_low_surrogate(codepoint) - }} - #[inline] pub fn is_supplementary(codepoint: u32) -> Result { unsafe { + } + #[inline] pub fn is_supplementary(codepoint: u32) -> Result { >::get_activation_factory().is_supplementary(codepoint) - }} - #[inline] pub fn is_noncharacter(codepoint: u32) -> Result { unsafe { + } + #[inline] pub fn is_noncharacter(codepoint: u32) -> Result { >::get_activation_factory().is_noncharacter(codepoint) - }} - #[inline] pub fn is_whitespace(codepoint: u32) -> Result { unsafe { + } + #[inline] pub fn is_whitespace(codepoint: u32) -> Result { >::get_activation_factory().is_whitespace(codepoint) - }} - #[inline] pub fn is_alphabetic(codepoint: u32) -> Result { unsafe { + } + #[inline] pub fn is_alphabetic(codepoint: u32) -> Result { >::get_activation_factory().is_alphabetic(codepoint) - }} - #[inline] pub fn is_cased(codepoint: u32) -> Result { unsafe { + } + #[inline] pub fn is_cased(codepoint: u32) -> Result { >::get_activation_factory().is_cased(codepoint) - }} - #[inline] pub fn is_uppercase(codepoint: u32) -> Result { unsafe { + } + #[inline] pub fn is_uppercase(codepoint: u32) -> Result { >::get_activation_factory().is_uppercase(codepoint) - }} - #[inline] pub fn is_lowercase(codepoint: u32) -> Result { unsafe { + } + #[inline] pub fn is_lowercase(codepoint: u32) -> Result { >::get_activation_factory().is_lowercase(codepoint) - }} - #[inline] pub fn is_id_start(codepoint: u32) -> Result { unsafe { + } + #[inline] pub fn is_id_start(codepoint: u32) -> Result { >::get_activation_factory().is_id_start(codepoint) - }} - #[inline] pub fn is_id_continue(codepoint: u32) -> Result { unsafe { + } + #[inline] pub fn is_id_continue(codepoint: u32) -> Result { >::get_activation_factory().is_id_continue(codepoint) - }} - #[inline] pub fn is_grapheme_base(codepoint: u32) -> Result { unsafe { + } + #[inline] pub fn is_grapheme_base(codepoint: u32) -> Result { >::get_activation_factory().is_grapheme_base(codepoint) - }} - #[inline] pub fn is_grapheme_extend(codepoint: u32) -> Result { unsafe { + } + #[inline] pub fn is_grapheme_extend(codepoint: u32) -> Result { >::get_activation_factory().is_grapheme_extend(codepoint) - }} - #[inline] pub fn get_numeric_type(codepoint: u32) -> Result { unsafe { + } + #[inline] pub fn get_numeric_type(codepoint: u32) -> Result { >::get_activation_factory().get_numeric_type(codepoint) - }} - #[inline] pub fn get_general_category(codepoint: u32) -> Result { unsafe { + } + #[inline] pub fn get_general_category(codepoint: u32) -> Result { >::get_activation_factory().get_general_category(codepoint) - }} + } } DEFINE_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]) [CLSID_UnicodeCharacters]); DEFINE_IID!(IID_IUnicodeCharactersStatics, 2542837383, 37521, 20369, 182, 200, 182, 227, 89, 215, 167, 251); @@ -1842,91 +1842,91 @@ RT_INTERFACE!{static interface IUnicodeCharactersStatics(IUnicodeCharactersStati fn GetGeneralCategory(&self, codepoint: u32, out: *mut UnicodeGeneralCategory) -> HRESULT }} impl IUnicodeCharactersStatics { - #[inline] pub unsafe fn get_codepoint_from_surrogate_pair(&self, highSurrogate: u32, lowSurrogate: u32) -> Result { + #[inline] pub fn get_codepoint_from_surrogate_pair(&self, highSurrogate: u32, lowSurrogate: u32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetCodepointFromSurrogatePair)(self as *const _ as *mut _, highSurrogate, lowSurrogate, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_surrogate_pair_from_codepoint(&self, codepoint: u32) -> Result<(Char, Char)> { + }} + #[inline] pub fn get_surrogate_pair_from_codepoint(&self, codepoint: u32) -> Result<(Char, Char)> { unsafe { let mut highSurrogate = zeroed(); let mut lowSurrogate = zeroed(); let hr = ((*self.lpVtbl).GetSurrogatePairFromCodepoint)(self as *const _ as *mut _, codepoint, &mut highSurrogate, &mut lowSurrogate); if hr == S_OK { Ok((highSurrogate, lowSurrogate)) } else { err(hr) } - } - #[inline] pub unsafe fn is_high_surrogate(&self, codepoint: u32) -> Result { + }} + #[inline] pub fn is_high_surrogate(&self, codepoint: u32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsHighSurrogate)(self as *const _ as *mut _, codepoint, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_low_surrogate(&self, codepoint: u32) -> Result { + }} + #[inline] pub fn is_low_surrogate(&self, codepoint: u32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsLowSurrogate)(self as *const _ as *mut _, codepoint, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_supplementary(&self, codepoint: u32) -> Result { + }} + #[inline] pub fn is_supplementary(&self, codepoint: u32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsSupplementary)(self as *const _ as *mut _, codepoint, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_noncharacter(&self, codepoint: u32) -> Result { + }} + #[inline] pub fn is_noncharacter(&self, codepoint: u32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsNoncharacter)(self as *const _ as *mut _, codepoint, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_whitespace(&self, codepoint: u32) -> Result { + }} + #[inline] pub fn is_whitespace(&self, codepoint: u32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsWhitespace)(self as *const _ as *mut _, codepoint, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_alphabetic(&self, codepoint: u32) -> Result { + }} + #[inline] pub fn is_alphabetic(&self, codepoint: u32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsAlphabetic)(self as *const _ as *mut _, codepoint, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_cased(&self, codepoint: u32) -> Result { + }} + #[inline] pub fn is_cased(&self, codepoint: u32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsCased)(self as *const _ as *mut _, codepoint, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_uppercase(&self, codepoint: u32) -> Result { + }} + #[inline] pub fn is_uppercase(&self, codepoint: u32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsUppercase)(self as *const _ as *mut _, codepoint, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_lowercase(&self, codepoint: u32) -> Result { + }} + #[inline] pub fn is_lowercase(&self, codepoint: u32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsLowercase)(self as *const _ as *mut _, codepoint, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_id_start(&self, codepoint: u32) -> Result { + }} + #[inline] pub fn is_id_start(&self, codepoint: u32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsIdStart)(self as *const _ as *mut _, codepoint, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_id_continue(&self, codepoint: u32) -> Result { + }} + #[inline] pub fn is_id_continue(&self, codepoint: u32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsIdContinue)(self as *const _ as *mut _, codepoint, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_grapheme_base(&self, codepoint: u32) -> Result { + }} + #[inline] pub fn is_grapheme_base(&self, codepoint: u32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsGraphemeBase)(self as *const _ as *mut _, codepoint, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_grapheme_extend(&self, codepoint: u32) -> Result { + }} + #[inline] pub fn is_grapheme_extend(&self, codepoint: u32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsGraphemeExtend)(self as *const _ as *mut _, codepoint, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_numeric_type(&self, codepoint: u32) -> Result { + }} + #[inline] pub fn get_numeric_type(&self, codepoint: u32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetNumericType)(self as *const _ as *mut _, codepoint, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_general_category(&self, codepoint: u32) -> Result { + }} + #[inline] pub fn get_general_category(&self, codepoint: u32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetGeneralCategory)(self as *const _ as *mut _, codepoint, &mut out); if hr == S_OK { Ok(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, @@ -1938,70 +1938,70 @@ DEFINE_IID!(IID_IWordSegment, 3537156717, 39036, 19648, 182, 189, 212, 154, 17, RT_INTERFACE!{interface IWordSegment(IWordSegmentVtbl): IInspectable(IInspectableVtbl) [IID_IWordSegment] { fn get_Text(&self, out: *mut HSTRING) -> HRESULT, fn get_SourceTextSegment(&self, out: *mut TextSegment) -> HRESULT, - fn get_AlternateForms(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_AlternateForms(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IWordSegment { - #[inline] pub unsafe fn get_text(&self) -> Result { + #[inline] pub fn get_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Text)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_source_text_segment(&self) -> Result { + }} + #[inline] pub fn get_source_text_segment(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SourceTextSegment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_alternate_forms(&self) -> Result>> { + }} + #[inline] pub fn get_alternate_forms(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AlternateForms)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, precedingWords: *mut super::super::foundation::collections::IIterable, words: *mut super::super::foundation::collections::IIterable) -> HRESULT + fn Invoke(&self, precedingWords: *mut foundation::collections::IIterable, words: *mut foundation::collections::IIterable) -> HRESULT }} impl WordSegmentsTokenizingHandler { - #[inline] pub unsafe fn invoke(&self, precedingWords: &super::super::foundation::collections::IIterable, words: &super::super::foundation::collections::IIterable) -> Result<()> { + #[inline] pub fn invoke(&self, precedingWords: &foundation::collections::IIterable, words: &foundation::collections::IIterable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, 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(&self, out: *mut HSTRING) -> HRESULT, fn GetTokenAt(&self, text: HSTRING, startIndex: u32, out: *mut *mut WordSegment) -> HRESULT, - fn GetTokens(&self, text: HSTRING, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn GetTokens(&self, text: HSTRING, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn Tokenize(&self, text: HSTRING, startIndex: u32, handler: *mut WordSegmentsTokenizingHandler) -> HRESULT }} impl IWordsSegmenter { - #[inline] pub unsafe fn get_resolved_language(&self) -> Result { + #[inline] pub fn get_resolved_language(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResolvedLanguage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_token_at(&self, text: &HStringArg, startIndex: u32) -> Result> { + }} + #[inline] pub fn get_token_at(&self, text: &HStringArg, startIndex: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetTokenAt)(self as *const _ as *mut _, text.get(), startIndex, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_tokens(&self, text: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_tokens(&self, text: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetTokens)(self as *const _ as *mut _, text.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn tokenize(&self, text: &HStringArg, startIndex: u32, handler: &WordSegmentsTokenizingHandler) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn tokenize(&self, text: &HStringArg, startIndex: u32, handler: &WordSegmentsTokenizingHandler) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Tokenize)(self as *const _ as *mut _, text.get(), startIndex, handler as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class WordsSegmenter: IWordsSegmenter} impl RtActivatable for WordsSegmenter {} impl WordsSegmenter { - #[inline] pub fn create_with_language(language: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_with_language(language: &HStringArg) -> Result> { >::get_activation_factory().create_with_language(language) - }} + } } DEFINE_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]) [CLSID_WordsSegmenter]); DEFINE_IID!(IID_IWordsSegmenterFactory, 3868684916, 64565, 17756, 139, 251, 109, 127, 70, 83, 202, 151); @@ -2009,10 +2009,10 @@ RT_INTERFACE!{static interface IWordsSegmenterFactory(IWordsSegmenterFactoryVtbl fn CreateWithLanguage(&self, language: HSTRING, out: *mut *mut WordsSegmenter) -> HRESULT }} impl IWordsSegmenterFactory { - #[inline] pub unsafe fn create_with_language(&self, language: &HStringArg) -> Result> { + #[inline] pub fn create_with_language(&self, language: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithLanguage)(self as *const _ as *mut _, language.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } } // Windows.Data.Text diff --git a/src/rt/gen/windows/devices.rs b/src/rt/gen/windows/devices.rs index ba6601c..335034e 100644 --- a/src/rt/gen/windows/devices.rs +++ b/src/rt/gen/windows/devices.rs @@ -8,38 +8,38 @@ RT_INTERFACE!{interface ILowLevelDevicesAggregateProvider(ILowLevelDevicesAggreg fn get_SpiControllerProvider(&self, out: *mut *mut spi::provider::ISpiControllerProvider) -> HRESULT }} impl ILowLevelDevicesAggregateProvider { - #[inline] pub unsafe fn get_adc_controller_provider(&self) -> Result> { + #[inline] pub fn get_adc_controller_provider(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AdcControllerProvider)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pwm_controller_provider(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_pwm_controller_provider(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PwmControllerProvider)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_gpio_controller_provider(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_gpio_controller_provider(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_GpioControllerProvider)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_i2c_controller_provider(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_i2c_controller_provider(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_I2cControllerProvider)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_spi_controller_provider(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_spi_controller_provider(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SpiControllerProvider)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class LowLevelDevicesAggregateProvider: ILowLevelDevicesAggregateProvider} impl RtActivatable for LowLevelDevicesAggregateProvider {} impl LowLevelDevicesAggregateProvider { - #[inline] pub fn create(adc: &adc::provider::IAdcControllerProvider, pwm: &pwm::provider::IPwmControllerProvider, gpio: &gpio::provider::IGpioControllerProvider, i2c: &i2c::provider::II2cControllerProvider, spi: &spi::provider::ISpiControllerProvider) -> Result> { unsafe { + #[inline] pub fn create(adc: &adc::provider::IAdcControllerProvider, pwm: &pwm::provider::IPwmControllerProvider, gpio: &gpio::provider::IGpioControllerProvider, i2c: &i2c::provider::II2cControllerProvider, spi: &spi::provider::ISpiControllerProvider) -> Result> { >::get_activation_factory().create(adc, pwm, gpio, i2c, spi) - }} + } } DEFINE_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]) [CLSID_LowLevelDevicesAggregateProvider]); DEFINE_IID!(IID_ILowLevelDevicesAggregateProviderFactory, 2596580086, 13427, 18014, 150, 213, 54, 40, 26, 44, 87, 175); @@ -47,11 +47,11 @@ RT_INTERFACE!{static interface ILowLevelDevicesAggregateProviderFactory(ILowLeve fn Create(&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 ILowLevelDevicesAggregateProviderFactory { - #[inline] pub unsafe fn create(&self, adc: &adc::provider::IAdcControllerProvider, pwm: &pwm::provider::IPwmControllerProvider, gpio: &gpio::provider::IGpioControllerProvider, i2c: &i2c::provider::II2cControllerProvider, spi: &spi::provider::ISpiControllerProvider) -> Result> { + #[inline] pub fn create(&self, adc: &adc::provider::IAdcControllerProvider, pwm: &pwm::provider::IPwmControllerProvider, gpio: &gpio::provider::IGpioControllerProvider, i2c: &i2c::provider::II2cControllerProvider, spi: &spi::provider::ISpiControllerProvider) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, 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_ILowLevelDevicesController, 784481748, 6043, 17886, 155, 57, 58, 224, 37, 39, 222, 82); RT_INTERFACE!{interface ILowLevelDevicesController(ILowLevelDevicesControllerVtbl): IInspectable(IInspectableVtbl) [IID_ILowLevelDevicesController] { @@ -60,12 +60,12 @@ RT_INTERFACE!{interface ILowLevelDevicesController(ILowLevelDevicesControllerVtb RT_CLASS!{class LowLevelDevicesController: ILowLevelDevicesController} impl RtActivatable for LowLevelDevicesController {} impl LowLevelDevicesController { - #[inline] pub fn get_default_provider() -> Result> { unsafe { + #[inline] pub fn get_default_provider() -> Result>> { >::get_activation_factory().get_default_provider() - }} - #[inline] pub fn set_default_provider(value: &ILowLevelDevicesAggregateProvider) -> Result<()> { unsafe { + } + #[inline] pub fn set_default_provider(value: &ILowLevelDevicesAggregateProvider) -> Result<()> { >::get_activation_factory().set_default_provider(value) - }} + } } DEFINE_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]) [CLSID_LowLevelDevicesController]); DEFINE_IID!(IID_ILowLevelDevicesControllerStatics, 155095658, 64715, 17300, 166, 151, 25, 222, 99, 124, 45, 179); @@ -74,15 +74,15 @@ RT_INTERFACE!{static interface ILowLevelDevicesControllerStatics(ILowLevelDevice fn put_DefaultProvider(&self, value: *mut ILowLevelDevicesAggregateProvider) -> HRESULT }} impl ILowLevelDevicesControllerStatics { - #[inline] pub unsafe fn get_default_provider(&self) -> Result> { + #[inline] pub fn get_default_provider(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DefaultProvider)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_default_provider(&self, value: &ILowLevelDevicesAggregateProvider) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_default_provider(&self, value: &ILowLevelDevicesAggregateProvider) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DefaultProvider)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } pub mod custom { // Windows.Devices.Custom use ::prelude::*; @@ -90,58 +90,58 @@ DEFINE_IID!(IID_ICustomDevice, 3710919967, 50315, 17341, 188, 177, 222, 200, 143 RT_INTERFACE!{interface ICustomDevice(ICustomDeviceVtbl): IInspectable(IInspectableVtbl) [IID_ICustomDevice] { #[cfg(feature="windows-storage")] fn get_InputStream(&self, out: *mut *mut super::super::storage::streams::IInputStream) -> HRESULT, #[cfg(feature="windows-storage")] fn get_OutputStream(&self, out: *mut *mut super::super::storage::streams::IOutputStream) -> HRESULT, - #[cfg(feature="windows-storage")] fn SendIOControlAsync(&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(&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 SendIOControlAsync(&self, ioControlCode: *mut IIOControlCode, inputBuffer: *mut super::super::storage::streams::IBuffer, outputBuffer: *mut super::super::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn TrySendIOControlAsync(&self, ioControlCode: *mut IIOControlCode, inputBuffer: *mut super::super::storage::streams::IBuffer, outputBuffer: *mut super::super::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ICustomDevice { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_input_stream(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_input_stream(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InputStream)(self 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(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_output_stream(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OutputStream)(self 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(&self, ioControlCode: &IIOControlCode, inputBuffer: &super::super::storage::streams::IBuffer, outputBuffer: &super::super::storage::streams::IBuffer) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn send_iocontrol_async(&self, ioControlCode: &IIOControlCode, inputBuffer: &super::super::storage::streams::IBuffer, outputBuffer: &super::super::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SendIOControlAsync)(self as *const _ as *mut _, 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) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn try_send_iocontrol_async(&self, ioControlCode: &IIOControlCode, inputBuffer: &super::super::storage::streams::IBuffer, outputBuffer: &super::super::storage::streams::IBuffer) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn try_send_iocontrol_async(&self, ioControlCode: &IIOControlCode, inputBuffer: &super::super::storage::streams::IBuffer, outputBuffer: &super::super::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TrySendIOControlAsync)(self as *const _ as *mut _, 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 CustomDevice: ICustomDevice} impl RtActivatable for CustomDevice {} impl CustomDevice { - #[inline] pub fn get_device_selector(classGuid: Guid) -> Result { unsafe { + #[inline] pub fn get_device_selector(classGuid: Guid) -> Result { >::get_activation_factory().get_device_selector(classGuid) - }} - #[inline] pub fn from_id_async(deviceId: &HStringArg, desiredAccess: DeviceAccessMode, sharingMode: DeviceSharingMode) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(deviceId: &HStringArg, desiredAccess: DeviceAccessMode, sharingMode: DeviceSharingMode) -> Result>> { >::get_activation_factory().from_id_async(deviceId, desiredAccess, sharingMode) - }} + } } DEFINE_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]) [CLSID_CustomDevice]); 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(&self, classGuid: Guid, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&self, deviceId: HSTRING, desiredAccess: DeviceAccessMode, sharingMode: DeviceSharingMode, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FromIdAsync(&self, deviceId: HSTRING, desiredAccess: DeviceAccessMode, sharingMode: DeviceSharingMode, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ICustomDeviceStatics { - #[inline] pub unsafe fn get_device_selector(&self, classGuid: Guid) -> Result { + #[inline] pub fn get_device_selector(&self, classGuid: Guid) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, classGuid, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg, desiredAccess: DeviceAccessMode, sharingMode: DeviceSharingMode) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg, desiredAccess: DeviceAccessMode, sharingMode: DeviceSharingMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), desiredAccess, sharingMode, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum DeviceAccessMode: i32 { Read (DeviceAccessMode_Read) = 0, Write (DeviceAccessMode_Write) = 1, ReadWrite (DeviceAccessMode_ReadWrite) = 2, @@ -158,49 +158,49 @@ RT_INTERFACE!{interface IIOControlCode(IIOControlCodeVtbl): IInspectable(IInspec fn get_ControlCode(&self, out: *mut u32) -> HRESULT }} impl IIOControlCode { - #[inline] pub unsafe fn get_access_mode(&self) -> Result { + #[inline] pub fn get_access_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AccessMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_buffering_method(&self) -> Result { + }} + #[inline] pub fn get_buffering_method(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BufferingMethod)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_function(&self) -> Result { + }} + #[inline] pub fn get_function(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Function)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_type(&self) -> Result { + }} + #[inline] pub fn get_device_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DeviceType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_control_code(&self) -> Result { + }} + #[inline] pub fn get_control_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ControlCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(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(&self, deviceType: u16, function: u16, accessMode: IOControlAccessMode, bufferingMethod: IOControlBufferingMethod, out: *mut *mut IOControlCode) -> HRESULT }} impl IIOControlCodeFactory { - #[inline] pub unsafe fn create_iocontrol_code(&self, deviceType: u16, function: u16, accessMode: IOControlAccessMode, bufferingMethod: IOControlBufferingMethod) -> Result> { + #[inline] pub fn create_iocontrol_code(&self, deviceType: u16, function: u16, accessMode: IOControlAccessMode, bufferingMethod: IOControlBufferingMethod) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateIOControlCode)(self as *const _ as *mut _, deviceType, function, accessMode, bufferingMethod, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class KnownDeviceTypes} impl RtActivatable for KnownDeviceTypes {} impl KnownDeviceTypes { - #[inline] pub fn get_unknown() -> Result { unsafe { + #[inline] pub fn get_unknown() -> Result { >::get_activation_factory().get_unknown() - }} + } } DEFINE_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]) [CLSID_KnownDeviceTypes]); DEFINE_IID!(IID_IKnownDeviceTypesStatics, 3998513602, 21576, 17882, 173, 27, 36, 148, 140, 35, 144, 148); @@ -208,11 +208,11 @@ RT_INTERFACE!{static interface IKnownDeviceTypesStatics(IKnownDeviceTypesStatics fn get_Unknown(&self, out: *mut u16) -> HRESULT }} impl IKnownDeviceTypesStatics { - #[inline] pub unsafe fn get_unknown(&self) -> Result { + #[inline] pub fn get_unknown(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Unknown)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum IOControlAccessMode: i32 { Any (IOControlAccessMode_Any) = 0, Read (IOControlAccessMode_Read) = 1, Write (IOControlAccessMode_Write) = 2, ReadWrite (IOControlAccessMode_ReadWrite) = 3, @@ -223,9 +223,9 @@ RT_ENUM! { enum IOControlBufferingMethod: i32 { RT_CLASS!{class IOControlCode: IIOControlCode} impl RtActivatable for IOControlCode {} impl IOControlCode { - #[inline] pub fn create_iocontrol_code(deviceType: u16, function: u16, accessMode: IOControlAccessMode, bufferingMethod: IOControlBufferingMethod) -> Result> { unsafe { + #[inline] pub fn create_iocontrol_code(deviceType: u16, function: u16, accessMode: IOControlAccessMode, bufferingMethod: IOControlBufferingMethod) -> Result> { >::get_activation_factory().create_iocontrol_code(deviceType, function, accessMode, bufferingMethod) - }} + } } DEFINE_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]) [CLSID_IOControlCode]); } // Windows.Devices.Custom @@ -236,62 +236,62 @@ RT_INTERFACE!{interface IPrint3DDevice(IPrint3DDeviceVtbl): IInspectable(IInspec fn get_PrintSchema(&self, out: *mut *mut PrintSchema) -> HRESULT }} impl IPrint3DDevice { - #[inline] pub unsafe fn get_print_schema(&self) -> Result> { + #[inline] pub fn get_print_schema(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PrintSchema)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class Print3DDevice: IPrint3DDevice} impl RtActivatable for Print3DDevice {} impl Print3DDevice { - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} - #[inline] pub fn get_device_selector() -> Result { unsafe { + } + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} + } } DEFINE_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]) [CLSID_Print3DDevice]); 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(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetDeviceSelector(&self, out: *mut HSTRING) -> HRESULT }} impl IPrint3DDeviceStatics { - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + }} + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn GetCapabilitiesAsync(&self, constrainTicket: *mut super::super::storage::streams::IRandomAccessStreamWithContentType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn MergeAndValidateWithDefaultPrintTicketAsync(&self, deltaTicket: *mut super::super::storage::streams::IRandomAccessStreamWithContentType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn GetDefaultPrintTicketAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn GetCapabilitiesAsync(&self, constrainTicket: *mut super::super::storage::streams::IRandomAccessStreamWithContentType, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn MergeAndValidateWithDefaultPrintTicketAsync(&self, deltaTicket: *mut super::super::storage::streams::IRandomAccessStreamWithContentType, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IPrintSchema { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_default_print_ticket_async(&self) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_default_print_ticket_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefaultPrintTicketAsync)(self 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(&self, constrainTicket: &super::super::storage::streams::IRandomAccessStreamWithContentType) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_capabilities_async(&self, constrainTicket: &super::super::storage::streams::IRandomAccessStreamWithContentType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCapabilitiesAsync)(self as *const _ as *mut _, constrainTicket 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 merge_and_validate_with_default_print_ticket_async(&self, deltaTicket: &super::super::storage::streams::IRandomAccessStreamWithContentType) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn merge_and_validate_with_default_print_ticket_async(&self, deltaTicket: &super::super::storage::streams::IRandomAccessStreamWithContentType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MergeAndValidateWithDefaultPrintTicketAsync)(self as *const _ as *mut _, deltaTicket as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PrintSchema: IPrintSchema} pub mod extensions { // Windows.Devices.Printers.Extensions @@ -302,55 +302,55 @@ RT_INTERFACE!{interface IPrint3DWorkflow(IPrint3DWorkflowVtbl): IInspectable(IIn fn GetPrintModelPackage(&self, out: *mut *mut IInspectable) -> HRESULT, fn get_IsPrintReady(&self, out: *mut bool) -> HRESULT, fn put_IsPrintReady(&self, value: bool) -> HRESULT, - fn add_PrintRequested(&self, eventHandler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PrintRequested(&self, eventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn add_PrintRequested(&self, eventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PrintRequested(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT }} impl IPrint3DWorkflow { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceID)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_print_model_package(&self) -> Result> { + }} + #[inline] pub fn get_print_model_package(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPrintModelPackage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_print_ready(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_print_ready(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPrintReady)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_print_ready(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_print_ready(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsPrintReady)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_print_requested(&self, eventHandler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_print_requested(&self, eventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PrintRequested)(self as *const _ as *mut _, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_print_requested(&self, eventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_print_requested(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PrintRequested)(self as *const _ as *mut _, 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(&self, eventHandler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PrinterChanged(&self, eventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn add_PrinterChanged(&self, eventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PrinterChanged(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT }} impl IPrint3DWorkflow2 { - #[inline] pub unsafe fn add_printer_changed(&self, eventHandler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub fn add_printer_changed(&self, eventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PrinterChanged)(self as *const _ as *mut _, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_printer_changed(&self, eventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_printer_changed(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PrinterChanged)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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, @@ -360,11 +360,11 @@ RT_INTERFACE!{interface IPrint3DWorkflowPrinterChangedEventArgs(IPrint3DWorkflow fn get_NewDeviceId(&self, out: *mut HSTRING) -> HRESULT }} impl IPrint3DWorkflowPrinterChangedEventArgs { - #[inline] pub unsafe fn get_new_device_id(&self) -> Result { + #[inline] pub fn get_new_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NewDeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class Print3DWorkflowPrinterChangedEventArgs: IPrint3DWorkflowPrinterChangedEventArgs} DEFINE_IID!(IID_IPrint3DWorkflowPrintRequestedEventArgs, 435734616, 23240, 19285, 138, 95, 230, 21, 103, 218, 251, 77); @@ -375,23 +375,23 @@ RT_INTERFACE!{interface IPrint3DWorkflowPrintRequestedEventArgs(IPrint3DWorkflow fn SetSourceChanged(&self, value: bool) -> HRESULT }} impl IPrint3DWorkflowPrintRequestedEventArgs { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_extended_status(&self, value: Print3DWorkflowDetail) -> Result<()> { + }} + #[inline] pub fn set_extended_status(&self, value: Print3DWorkflowDetail) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetExtendedStatus)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_source(&self, source: &IInspectable) -> Result<()> { + }} + #[inline] pub fn set_source(&self, source: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetSource)(self as *const _ as *mut _, source as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_source_changed(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_source_changed(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetSourceChanged)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Print3DWorkflowPrintRequestedEventArgs: IPrint3DWorkflowPrintRequestedEventArgs} RT_ENUM! { enum Print3DWorkflowStatus: i32 { @@ -400,9 +400,9 @@ RT_ENUM! { enum Print3DWorkflowStatus: i32 { RT_CLASS!{static class PrintExtensionContext} impl RtActivatable for PrintExtensionContext {} impl PrintExtensionContext { - #[inline] pub fn from_device_id(deviceId: &HStringArg) -> Result> { unsafe { + #[inline] pub fn from_device_id(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_device_id(deviceId) - }} + } } DEFINE_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]) [CLSID_PrintExtensionContext]); DEFINE_IID!(IID_IPrintExtensionContextStatic, 3876429761, 65401, 19108, 140, 155, 12, 147, 174, 223, 222, 138); @@ -410,11 +410,11 @@ RT_INTERFACE!{static interface IPrintExtensionContextStatic(IPrintExtensionConte fn FromDeviceId(&self, deviceId: HSTRING, out: *mut *mut IInspectable) -> HRESULT }} impl IPrintExtensionContextStatic { - #[inline] pub unsafe fn from_device_id(&self, deviceId: &HStringArg) -> Result> { + #[inline] pub fn from_device_id(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromDeviceId)(self as *const _ as *mut _, deviceId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IPrintNotificationEventDetails, 3759033482, 18472, 19873, 139, 184, 134, 114, 223, 133, 21, 231); RT_INTERFACE!{interface IPrintNotificationEventDetails(IPrintNotificationEventDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IPrintNotificationEventDetails] { @@ -423,43 +423,43 @@ RT_INTERFACE!{interface IPrintNotificationEventDetails(IPrintNotificationEventDe fn put_EventData(&self, value: HSTRING) -> HRESULT }} impl IPrintNotificationEventDetails { - #[inline] pub unsafe fn get_printer_name(&self) -> Result { + #[inline] pub fn get_printer_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PrinterName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_event_data(&self) -> Result { + }} + #[inline] pub fn get_event_data(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EventData)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_event_data(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_event_data(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_EventData)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PrintNotificationEventDetails: IPrintNotificationEventDetails} 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(&self, out: *mut *mut IInspectable) -> HRESULT, - fn add_SaveRequested(&self, eventHandler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SaveRequested(&self, eventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn add_SaveRequested(&self, eventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SaveRequested(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT }} impl IPrintTaskConfiguration { - #[inline] pub unsafe fn get_printer_extension_context(&self) -> Result> { + #[inline] pub fn get_printer_extension_context(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PrinterExtensionContext)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_save_requested(&self, eventHandler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_save_requested(&self, eventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SaveRequested)(self as *const _ as *mut _, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_save_requested(&self, eventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_save_requested(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SaveRequested)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PrintTaskConfiguration: IPrintTaskConfiguration} DEFINE_IID!(IID_IPrintTaskConfigurationSaveRequest, 4004458443, 25118, 19298, 172, 119, 178, 129, 204, 224, 141, 96); @@ -467,27 +467,27 @@ RT_INTERFACE!{interface IPrintTaskConfigurationSaveRequest(IPrintTaskConfigurati fn Cancel(&self) -> HRESULT, fn Save(&self, printerExtensionContext: *mut IInspectable) -> HRESULT, fn GetDeferral(&self, out: *mut *mut PrintTaskConfigurationSaveRequestedDeferral) -> HRESULT, - fn get_Deadline(&self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT + fn get_Deadline(&self, out: *mut foundation::DateTime) -> HRESULT }} impl IPrintTaskConfigurationSaveRequest { - #[inline] pub unsafe fn cancel(&self) -> Result<()> { + #[inline] pub fn cancel(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Cancel)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn save(&self, printerExtensionContext: &IInspectable) -> Result<()> { + }} + #[inline] pub fn save(&self, printerExtensionContext: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Save)(self as *const _ as *mut _, printerExtensionContext as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deadline(&self) -> Result<::rt::gen::windows::foundation::DateTime> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deadline(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Deadline)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PrintTaskConfigurationSaveRequest: IPrintTaskConfigurationSaveRequest} DEFINE_IID!(IID_IPrintTaskConfigurationSaveRequestedDeferral, 3914978664, 63273, 17572, 135, 29, 189, 6, 40, 105, 106, 51); @@ -495,10 +495,10 @@ RT_INTERFACE!{interface IPrintTaskConfigurationSaveRequestedDeferral(IPrintTaskC fn Complete(&self) -> HRESULT }} impl IPrintTaskConfigurationSaveRequestedDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PrintTaskConfigurationSaveRequestedDeferral: IPrintTaskConfigurationSaveRequestedDeferral} DEFINE_IID!(IID_IPrintTaskConfigurationSaveRequestedEventArgs, 3765184633, 3425, 18744, 145, 208, 150, 164, 91, 238, 132, 121); @@ -506,11 +506,11 @@ RT_INTERFACE!{interface IPrintTaskConfigurationSaveRequestedEventArgs(IPrintTask fn get_Request(&self, out: *mut *mut PrintTaskConfigurationSaveRequest) -> HRESULT }} impl IPrintTaskConfigurationSaveRequestedEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PrintTaskConfigurationSaveRequestedEventArgs: IPrintTaskConfigurationSaveRequestedEventArgs} } // Windows.Devices.Printers.Extensions @@ -524,21 +524,21 @@ RT_INTERFACE!{interface IAdcChannel(IAdcChannelVtbl): IInspectable(IInspectableV fn ReadRatio(&self, out: *mut f64) -> HRESULT }} impl IAdcChannel { - #[inline] pub unsafe fn get_controller(&self) -> Result> { + #[inline] pub fn get_controller(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Controller)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn read_value(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn read_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ReadValue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn read_ratio(&self) -> Result { + }} + #[inline] pub fn read_ratio(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ReadRatio)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AdcChannel: IAdcChannel} RT_ENUM! { enum AdcChannelMode: i32 { @@ -556,79 +556,79 @@ RT_INTERFACE!{interface IAdcController(IAdcControllerVtbl): IInspectable(IInspec fn OpenChannel(&self, channelNumber: i32, out: *mut *mut AdcChannel) -> HRESULT }} impl IAdcController { - #[inline] pub unsafe fn get_channel_count(&self) -> Result { + #[inline] pub fn get_channel_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ChannelCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_resolution_in_bits(&self) -> Result { + }} + #[inline] pub fn get_resolution_in_bits(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ResolutionInBits)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_value(&self) -> Result { + }} + #[inline] pub fn get_min_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinValue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_value(&self) -> Result { + }} + #[inline] pub fn get_max_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxValue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_channel_mode(&self) -> Result { + }} + #[inline] pub fn get_channel_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ChannelMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_channel_mode(&self, value: AdcChannelMode) -> Result<()> { + }} + #[inline] pub fn set_channel_mode(&self, value: AdcChannelMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ChannelMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn is_channel_mode_supported(&self, channelMode: AdcChannelMode) -> Result { + }} + #[inline] pub fn is_channel_mode_supported(&self, channelMode: AdcChannelMode) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsChannelModeSupported)(self as *const _ as *mut _, channelMode, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn open_channel(&self, channelNumber: i32) -> Result> { + }} + #[inline] pub fn open_channel(&self, channelNumber: i32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenChannel)(self as *const _ as *mut _, channelNumber, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AdcController: IAdcController} impl RtActivatable for AdcController {} impl RtActivatable for AdcController {} impl AdcController { - #[inline] pub fn get_controllers_async(provider: &provider::IAdcProvider) -> Result>>> { unsafe { + #[inline] pub fn get_controllers_async(provider: &provider::IAdcProvider) -> Result>>> { >::get_activation_factory().get_controllers_async(provider) - }} - #[inline] pub fn get_default_async() -> Result>> { unsafe { + } + #[inline] pub fn get_default_async() -> Result>> { >::get_activation_factory().get_default_async() - }} + } } DEFINE_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]) [CLSID_AdcController]); 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(&self, provider: *mut provider::IAdcProvider, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn GetControllersAsync(&self, provider: *mut provider::IAdcProvider, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IAdcControllerStatics { - #[inline] pub unsafe fn get_controllers_async(&self, provider: &provider::IAdcProvider) -> Result>>> { + #[inline] pub fn get_controllers_async(&self, provider: &provider::IAdcProvider) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetControllersAsync)(self as *const _ as *mut _, provider as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetDefaultAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IAdcControllerStatics2 { - #[inline] pub unsafe fn get_default_async(&self) -> Result>> { + #[inline] pub fn get_default_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefaultAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } pub mod provider { // Windows.Devices.Adc.Provider use ::prelude::*; @@ -646,64 +646,64 @@ RT_INTERFACE!{interface IAdcControllerProvider(IAdcControllerProviderVtbl): IIns fn ReadValue(&self, channelNumber: i32, out: *mut i32) -> HRESULT }} impl IAdcControllerProvider { - #[inline] pub unsafe fn get_channel_count(&self) -> Result { + #[inline] pub fn get_channel_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ChannelCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_resolution_in_bits(&self) -> Result { + }} + #[inline] pub fn get_resolution_in_bits(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ResolutionInBits)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_value(&self) -> Result { + }} + #[inline] pub fn get_min_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinValue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_value(&self) -> Result { + }} + #[inline] pub fn get_max_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxValue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_channel_mode(&self) -> Result { + }} + #[inline] pub fn get_channel_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ChannelMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_channel_mode(&self, value: ProviderAdcChannelMode) -> Result<()> { + }} + #[inline] pub fn set_channel_mode(&self, value: ProviderAdcChannelMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ChannelMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn is_channel_mode_supported(&self, channelMode: ProviderAdcChannelMode) -> Result { + }} + #[inline] pub fn is_channel_mode_supported(&self, channelMode: ProviderAdcChannelMode) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsChannelModeSupported)(self as *const _ as *mut _, channelMode, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn acquire_channel(&self, channel: i32) -> Result<()> { + }} + #[inline] pub fn acquire_channel(&self, channel: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AcquireChannel)(self as *const _ as *mut _, channel); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn release_channel(&self, channel: i32) -> Result<()> { + }} + #[inline] pub fn release_channel(&self, channel: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReleaseChannel)(self as *const _ as *mut _, channel); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn read_value(&self, channelNumber: i32) -> Result { + }} + #[inline] pub fn read_value(&self, channelNumber: i32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ReadValue)(self as *const _ as *mut _, channelNumber, &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(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn GetControllers(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IAdcProvider { - #[inline] pub unsafe fn get_controllers(&self) -> Result>> { + #[inline] pub fn get_controllers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetControllers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum ProviderAdcChannelMode: i32 { SingleEnded (ProviderAdcChannelMode_SingleEnded) = 0, Differential (ProviderAdcChannelMode_Differential) = 1, @@ -713,7 +713,7 @@ RT_ENUM! { enum ProviderAdcChannelMode: i32 { pub mod gpio { // Windows.Devices.Gpio use ::prelude::*; RT_STRUCT! { struct GpioChangeCount { - Count: u64, RelativeTime: super::super::foundation::TimeSpan, + Count: u64, RelativeTime: foundation::TimeSpan, }} DEFINE_IID!(IID_IGpioChangeCounter, 3411984606, 26625, 17407, 128, 61, 69, 118, 98, 138, 139, 38); RT_INTERFACE!{interface IGpioChangeCounter(IGpioChangeCounterVtbl): IInspectable(IInspectableVtbl) [IID_IGpioChangeCounter] { @@ -726,45 +726,45 @@ RT_INTERFACE!{interface IGpioChangeCounter(IGpioChangeCounterVtbl): IInspectable fn Reset(&self, out: *mut GpioChangeCount) -> HRESULT }} impl IGpioChangeCounter { - #[inline] pub unsafe fn set_polarity(&self, value: GpioChangePolarity) -> Result<()> { + #[inline] pub fn set_polarity(&self, value: GpioChangePolarity) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Polarity)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_polarity(&self) -> Result { + }} + #[inline] pub fn get_polarity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Polarity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_started(&self) -> Result { + }} + #[inline] pub fn get_is_started(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsStarted)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn read(&self) -> Result { + }} + #[inline] pub fn read(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).Read)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn reset(&self) -> Result { + }} + #[inline] pub fn reset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).Reset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class GpioChangeCounter: IGpioChangeCounter} impl RtActivatable for GpioChangeCounter {} impl GpioChangeCounter { - #[inline] pub fn create(pin: &GpioPin) -> Result> { unsafe { + #[inline] pub fn create(pin: &GpioPin) -> Result> { >::get_activation_factory().create(pin) - }} + } } DEFINE_CLSID!(GpioChangeCounter(&[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,104,97,110,103,101,67,111,117,110,116,101,114,0]) [CLSID_GpioChangeCounter]); DEFINE_IID!(IID_IGpioChangeCounterFactory, 343774390, 2718, 16652, 180, 250, 248, 159, 64, 82, 8, 77); @@ -772,11 +772,11 @@ RT_INTERFACE!{static interface IGpioChangeCounterFactory(IGpioChangeCounterFacto fn Create(&self, pin: *mut GpioPin, out: *mut *mut GpioChangeCounter) -> HRESULT }} impl IGpioChangeCounterFactory { - #[inline] pub unsafe fn create(&self, pin: &GpioPin) -> Result> { + #[inline] pub fn create(&self, pin: &GpioPin) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, pin as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum GpioChangePolarity: i32 { Falling (GpioChangePolarity_Falling) = 0, Rising (GpioChangePolarity_Rising) = 1, Both (GpioChangePolarity_Both) = 2, @@ -795,86 +795,86 @@ RT_INTERFACE!{interface IGpioChangeReader(IGpioChangeReaderVtbl): IInspectable(I fn Clear(&self) -> HRESULT, fn GetNextItem(&self, out: *mut GpioChangeRecord) -> HRESULT, fn PeekNextItem(&self, out: *mut GpioChangeRecord) -> HRESULT, - fn GetAllItems(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn WaitForItemsAsync(&self, count: i32, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn GetAllItems(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn WaitForItemsAsync(&self, count: i32, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IGpioChangeReader { - #[inline] pub unsafe fn get_capacity(&self) -> Result { + #[inline] pub fn get_capacity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Capacity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_length(&self) -> Result { + }} + #[inline] pub fn get_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Length)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_empty(&self) -> Result { + }} + #[inline] pub fn get_is_empty(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsEmpty)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_overflowed(&self) -> Result { + }} + #[inline] pub fn get_is_overflowed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsOverflowed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_polarity(&self, value: GpioChangePolarity) -> Result<()> { + }} + #[inline] pub fn set_polarity(&self, value: GpioChangePolarity) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Polarity)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_polarity(&self) -> Result { + }} + #[inline] pub fn get_polarity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Polarity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_started(&self) -> Result { + }} + #[inline] pub fn get_is_started(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsStarted)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn clear(&self) -> Result<()> { + }} + #[inline] pub fn clear(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Clear)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_next_item(&self) -> Result { + }} + #[inline] pub fn get_next_item(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetNextItem)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn peek_next_item(&self) -> Result { + }} + #[inline] pub fn peek_next_item(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).PeekNextItem)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_all_items(&self) -> Result>> { + }} + #[inline] pub fn get_all_items(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAllItems)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn wait_for_items_async(&self, count: i32) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn wait_for_items_async(&self, count: i32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).WaitForItemsAsync)(self as *const _ as *mut _, count, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class GpioChangeReader: IGpioChangeReader} impl RtActivatable for GpioChangeReader {} impl GpioChangeReader { - #[inline] pub fn create(pin: &GpioPin) -> Result> { unsafe { + #[inline] pub fn create(pin: &GpioPin) -> Result> { >::get_activation_factory().create(pin) - }} - #[inline] pub fn create_with_capacity(pin: &GpioPin, minCapacity: i32) -> Result> { unsafe { + } + #[inline] pub fn create_with_capacity(pin: &GpioPin, minCapacity: i32) -> Result> { >::get_activation_factory().create_with_capacity(pin, minCapacity) - }} + } } DEFINE_CLSID!(GpioChangeReader(&[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,104,97,110,103,101,82,101,97,100,101,114,0]) [CLSID_GpioChangeReader]); DEFINE_IID!(IID_IGpioChangeReaderFactory, 2841218803, 14606, 17434, 157, 28, 232, 222, 11, 45, 240, 223); @@ -883,19 +883,19 @@ RT_INTERFACE!{static interface IGpioChangeReaderFactory(IGpioChangeReaderFactory fn CreateWithCapacity(&self, pin: *mut GpioPin, minCapacity: i32, out: *mut *mut GpioChangeReader) -> HRESULT }} impl IGpioChangeReaderFactory { - #[inline] pub unsafe fn create(&self, pin: &GpioPin) -> Result> { + #[inline] pub fn create(&self, pin: &GpioPin) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, pin as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_capacity(&self, pin: &GpioPin, minCapacity: i32) -> Result> { + }} + #[inline] pub fn create_with_capacity(&self, pin: &GpioPin, minCapacity: i32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithCapacity)(self as *const _ as *mut _, pin as *const _ as *mut _, minCapacity, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_STRUCT! { struct GpioChangeRecord { - RelativeTime: super::super::foundation::TimeSpan, Edge: GpioPinEdge, + RelativeTime: foundation::TimeSpan, Edge: GpioPinEdge, }} DEFINE_IID!(IID_IGpioController, 675287779, 29793, 18076, 168, 188, 97, 214, 157, 8, 165, 60); RT_INTERFACE!{interface IGpioController(IGpioControllerVtbl): IInspectable(IInspectableVtbl) [IID_IGpioController] { @@ -905,40 +905,40 @@ RT_INTERFACE!{interface IGpioController(IGpioControllerVtbl): IInspectable(IInsp fn TryOpenPin(&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(&self) -> Result { + #[inline] pub fn get_pin_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PinCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn open_pin(&self, pinNumber: i32) -> Result> { + }} + #[inline] pub fn open_pin(&self, pinNumber: i32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenPin)(self as *const _ as *mut _, pinNumber, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn open_pin_with_sharing_mode(&self, pinNumber: i32, sharingMode: GpioSharingMode) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn open_pin_with_sharing_mode(&self, pinNumber: i32, sharingMode: GpioSharingMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenPinWithSharingMode)(self as *const _ as *mut _, pinNumber, sharingMode, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_open_pin(&self, pinNumber: i32, sharingMode: GpioSharingMode) -> Result<(ComPtr, GpioOpenStatus, bool)> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn try_open_pin(&self, pinNumber: i32, sharingMode: GpioSharingMode) -> Result<(Option>, GpioOpenStatus, bool)> { unsafe { let mut pin = null_mut(); let mut openStatus = zeroed(); let mut out = zeroed(); let hr = ((*self.lpVtbl).TryOpenPin)(self as *const _ as *mut _, pinNumber, sharingMode, &mut pin, &mut openStatus, &mut out); - if hr == S_OK { Ok((ComPtr::wrap(pin), openStatus, out)) } else { err(hr) } - } + if hr == S_OK { Ok((ComPtr::wrap_optional(pin), openStatus, out)) } else { err(hr) } + }} } RT_CLASS!{class GpioController: IGpioController} impl RtActivatable for GpioController {} impl RtActivatable for GpioController {} impl GpioController { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} - #[inline] pub fn get_controllers_async(provider: &provider::IGpioProvider) -> Result>>> { unsafe { + } + #[inline] pub fn get_controllers_async(provider: &provider::IGpioProvider) -> Result>>> { >::get_activation_factory().get_controllers_async(provider) - }} - #[inline] pub fn get_default_async() -> Result>> { unsafe { + } + #[inline] pub fn get_default_async() -> Result>> { >::get_activation_factory().get_default_async() - }} + } } DEFINE_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]) [CLSID_GpioController]); DEFINE_IID!(IID_IGpioControllerStatics, 785839150, 31479, 16662, 149, 51, 196, 61, 153, 161, 251, 100); @@ -946,38 +946,38 @@ RT_INTERFACE!{static interface IGpioControllerStatics(IGpioControllerStaticsVtbl fn GetDefault(&self, out: *mut *mut GpioController) -> HRESULT }} impl IGpioControllerStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, provider: *mut provider::IGpioProvider, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetDefaultAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetControllersAsync(&self, provider: *mut provider::IGpioProvider, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetDefaultAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IGpioControllerStatics2 { - #[inline] pub unsafe fn get_controllers_async(&self, provider: &provider::IGpioProvider) -> Result>>> { + #[inline] pub fn get_controllers_async(&self, provider: &provider::IGpioProvider) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetControllersAsync)(self as *const _ as *mut _, provider as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_async(&self) -> Result>> { + }} + #[inline] pub fn get_default_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefaultAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum GpioOpenStatus: i32 { PinOpened (GpioOpenStatus_PinOpened) = 0, PinUnavailable (GpioOpenStatus_PinUnavailable) = 1, SharingViolation (GpioOpenStatus_SharingViolation) = 2, MuxingConflict (GpioOpenStatus_MuxingConflict) = 3, UnknownError (GpioOpenStatus_UnknownError) = 4, }} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ValueChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_DebounceTimeout(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_DebounceTimeout(&self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn add_ValueChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ValueChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn get_DebounceTimeout(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_DebounceTimeout(&self, value: foundation::TimeSpan) -> HRESULT, fn get_PinNumber(&self, out: *mut i32) -> HRESULT, fn get_SharingMode(&self, out: *mut GpioSharingMode) -> HRESULT, fn IsDriveModeSupported(&self, driveMode: GpioPinDriveMode, out: *mut bool) -> HRESULT, @@ -987,57 +987,57 @@ RT_INTERFACE!{interface IGpioPin(IGpioPinVtbl): IInspectable(IInspectableVtbl) [ fn Read(&self, out: *mut GpioPinValue) -> HRESULT }} impl IGpioPin { - #[inline] pub unsafe fn add_value_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_value_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ValueChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_value_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_value_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ValueChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_debounce_timeout(&self) -> Result { + }} + #[inline] pub fn get_debounce_timeout(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DebounceTimeout)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_debounce_timeout(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_debounce_timeout(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DebounceTimeout)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_pin_number(&self) -> Result { + }} + #[inline] pub fn get_pin_number(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PinNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sharing_mode(&self) -> Result { + }} + #[inline] pub fn get_sharing_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SharingMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_drive_mode_supported(&self, driveMode: GpioPinDriveMode) -> Result { + }} + #[inline] pub fn is_drive_mode_supported(&self, driveMode: GpioPinDriveMode) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsDriveModeSupported)(self as *const _ as *mut _, driveMode, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_drive_mode(&self) -> Result { + }} + #[inline] pub fn get_drive_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetDriveMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_drive_mode(&self, value: GpioPinDriveMode) -> Result<()> { + }} + #[inline] pub fn set_drive_mode(&self, value: GpioPinDriveMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetDriveMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn write(&self, value: GpioPinValue) -> Result<()> { + }} + #[inline] pub fn write(&self, value: GpioPinValue) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Write)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn read(&self) -> Result { + }} + #[inline] pub fn read(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).Read)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class GpioPin: IGpioPin} RT_ENUM! { enum GpioPinDriveMode: i32 { @@ -1054,11 +1054,11 @@ RT_INTERFACE!{interface IGpioPinValueChangedEventArgs(IGpioPinValueChangedEventA fn get_Edge(&self, out: *mut GpioPinEdge) -> HRESULT }} impl IGpioPinValueChangedEventArgs { - #[inline] pub unsafe fn get_edge(&self) -> Result { + #[inline] pub fn get_edge(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Edge)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class GpioPinValueChangedEventArgs: IGpioPinValueChangedEventArgs} RT_ENUM! { enum GpioSharingMode: i32 { @@ -1072,23 +1072,23 @@ RT_INTERFACE!{interface IGpioControllerProvider(IGpioControllerProviderVtbl): II fn OpenPinProvider(&self, pin: i32, sharingMode: ProviderGpioSharingMode, out: *mut *mut IGpioPinProvider) -> HRESULT }} impl IGpioControllerProvider { - #[inline] pub unsafe fn get_pin_count(&self) -> Result { + #[inline] pub fn get_pin_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PinCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn open_pin_provider(&self, pin: i32, sharingMode: ProviderGpioSharingMode) -> Result> { + }} + #[inline] pub fn open_pin_provider(&self, pin: i32, sharingMode: ProviderGpioSharingMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenPinProvider)(self as *const _ as *mut _, pin, sharingMode, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ValueChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn get_DebounceTimeout(&self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn put_DebounceTimeout(&self, value: ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn add_ValueChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ValueChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn get_DebounceTimeout(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_DebounceTimeout(&self, value: foundation::TimeSpan) -> HRESULT, fn get_PinNumber(&self, out: *mut i32) -> HRESULT, fn get_SharingMode(&self, out: *mut ProviderGpioSharingMode) -> HRESULT, fn IsDriveModeSupported(&self, driveMode: ProviderGpioPinDriveMode, out: *mut bool) -> HRESULT, @@ -1098,75 +1098,75 @@ RT_INTERFACE!{interface IGpioPinProvider(IGpioPinProviderVtbl): IInspectable(IIn fn Read(&self, out: *mut ProviderGpioPinValue) -> HRESULT }} impl IGpioPinProvider { - #[inline] pub unsafe fn add_value_changed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub fn add_value_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ValueChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_value_changed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_value_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ValueChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_debounce_timeout(&self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + }} + #[inline] pub fn get_debounce_timeout(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DebounceTimeout)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_debounce_timeout(&self, value: ::rt::gen::windows::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_debounce_timeout(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DebounceTimeout)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_pin_number(&self) -> Result { + }} + #[inline] pub fn get_pin_number(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PinNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sharing_mode(&self) -> Result { + }} + #[inline] pub fn get_sharing_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SharingMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_drive_mode_supported(&self, driveMode: ProviderGpioPinDriveMode) -> Result { + }} + #[inline] pub fn is_drive_mode_supported(&self, driveMode: ProviderGpioPinDriveMode) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsDriveModeSupported)(self as *const _ as *mut _, driveMode, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_drive_mode(&self) -> Result { + }} + #[inline] pub fn get_drive_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetDriveMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_drive_mode(&self, value: ProviderGpioPinDriveMode) -> Result<()> { + }} + #[inline] pub fn set_drive_mode(&self, value: ProviderGpioPinDriveMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetDriveMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn write(&self, value: ProviderGpioPinValue) -> Result<()> { + }} + #[inline] pub fn write(&self, value: ProviderGpioPinValue) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Write)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn read(&self) -> Result { + }} + #[inline] pub fn read(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).Read)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, out: *mut ProviderGpioPinEdge) -> HRESULT }} impl IGpioPinProviderValueChangedEventArgs { - #[inline] pub unsafe fn get_edge(&self) -> Result { + #[inline] pub fn get_edge(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Edge)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class GpioPinProviderValueChangedEventArgs: IGpioPinProviderValueChangedEventArgs} impl RtActivatable for GpioPinProviderValueChangedEventArgs {} impl GpioPinProviderValueChangedEventArgs { - #[inline] pub fn create(edge: ProviderGpioPinEdge) -> Result> { unsafe { + #[inline] pub fn create(edge: ProviderGpioPinEdge) -> Result> { >::get_activation_factory().create(edge) - }} + } } DEFINE_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]) [CLSID_GpioPinProviderValueChangedEventArgs]); DEFINE_IID!(IID_IGpioPinProviderValueChangedEventArgsFactory, 1053494105, 22156, 17298, 178, 74, 138, 89, 169, 2, 177, 241); @@ -1174,22 +1174,22 @@ RT_INTERFACE!{static interface IGpioPinProviderValueChangedEventArgsFactory(IGpi fn Create(&self, edge: ProviderGpioPinEdge, out: *mut *mut GpioPinProviderValueChangedEventArgs) -> HRESULT }} impl IGpioPinProviderValueChangedEventArgsFactory { - #[inline] pub unsafe fn create(&self, edge: ProviderGpioPinEdge) -> Result> { + #[inline] pub fn create(&self, edge: ProviderGpioPinEdge) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, edge, &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(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn GetControllers(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IGpioProvider { - #[inline] pub unsafe fn get_controllers(&self) -> Result>> { + #[inline] pub fn get_controllers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetControllers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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, @@ -1220,40 +1220,40 @@ RT_INTERFACE!{interface II2cConnectionSettings(II2cConnectionSettingsVtbl): IIns fn put_SharingMode(&self, value: I2cSharingMode) -> HRESULT }} impl II2cConnectionSettings { - #[inline] pub unsafe fn get_slave_address(&self) -> Result { + #[inline] pub fn get_slave_address(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SlaveAddress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_slave_address(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_slave_address(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SlaveAddress)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_bus_speed(&self) -> Result { + }} + #[inline] pub fn get_bus_speed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BusSpeed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_bus_speed(&self, value: I2cBusSpeed) -> Result<()> { + }} + #[inline] pub fn set_bus_speed(&self, value: I2cBusSpeed) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BusSpeed)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_sharing_mode(&self) -> Result { + }} + #[inline] pub fn get_sharing_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SharingMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_sharing_mode(&self, value: I2cSharingMode) -> Result<()> { + }} + #[inline] pub fn set_sharing_mode(&self, value: I2cSharingMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SharingMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class I2cConnectionSettings: II2cConnectionSettings} impl RtActivatable for I2cConnectionSettings {} impl I2cConnectionSettings { - #[inline] pub fn create(slaveAddress: i32) -> Result> { unsafe { + #[inline] pub fn create(slaveAddress: i32) -> Result> { >::get_activation_factory().create(slaveAddress) - }} + } } DEFINE_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]) [CLSID_I2cConnectionSettings]); DEFINE_IID!(IID_II2cConnectionSettingsFactory, 2176157363, 38547, 16817, 162, 67, 222, 212, 246, 230, 105, 38); @@ -1261,50 +1261,50 @@ RT_INTERFACE!{static interface II2cConnectionSettingsFactory(II2cConnectionSetti fn Create(&self, slaveAddress: i32, out: *mut *mut I2cConnectionSettings) -> HRESULT }} impl II2cConnectionSettingsFactory { - #[inline] pub unsafe fn create(&self, slaveAddress: i32) -> Result> { + #[inline] pub fn create(&self, slaveAddress: i32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, slaveAddress, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, settings: *mut I2cConnectionSettings, out: *mut *mut I2cDevice) -> HRESULT }} impl II2cController { - #[inline] pub unsafe fn get_device(&self, settings: &I2cConnectionSettings) -> Result> { + #[inline] pub fn get_device(&self, settings: &I2cConnectionSettings) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDevice)(self as *const _ as *mut _, settings as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class I2cController: II2cController} impl RtActivatable for I2cController {} impl I2cController { - #[inline] pub fn get_controllers_async(provider: &provider::II2cProvider) -> Result>>> { unsafe { + #[inline] pub fn get_controllers_async(provider: &provider::II2cProvider) -> Result>>> { >::get_activation_factory().get_controllers_async(provider) - }} - #[inline] pub fn get_default_async() -> Result>> { unsafe { + } + #[inline] pub fn get_default_async() -> Result>> { >::get_activation_factory().get_default_async() - }} + } } DEFINE_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]) [CLSID_I2cController]); 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(&self, provider: *mut provider::II2cProvider, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetDefaultAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetControllersAsync(&self, provider: *mut provider::II2cProvider, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetDefaultAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl II2cControllerStatics { - #[inline] pub unsafe fn get_controllers_async(&self, provider: &provider::II2cProvider) -> Result>>> { + #[inline] pub fn get_controllers_async(&self, provider: &provider::II2cProvider) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetControllersAsync)(self as *const _ as *mut _, provider as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_async(&self) -> Result>> { + }} + #[inline] pub fn get_default_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefaultAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_II2cDevice, 2251735350, 47557, 20336, 148, 73, 204, 70, 220, 111, 87, 235); RT_INTERFACE!{interface II2cDevice(II2cDeviceVtbl): IInspectable(IInspectableVtbl) [IID_II2cDevice] { @@ -1318,80 +1318,80 @@ RT_INTERFACE!{interface II2cDevice(II2cDeviceVtbl): IInspectable(IInspectableVtb fn WriteReadPartial(&self, writeBufferSize: u32, writeBuffer: *mut u8, readBufferSize: u32, readBuffer: *mut u8, out: *mut I2cTransferResult) -> HRESULT }} impl II2cDevice { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_connection_settings(&self) -> Result> { + }} + #[inline] pub fn get_connection_settings(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ConnectionSettings)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn write(&self, buffer: &[u8]) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn write(&self, buffer: &[u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Write)(self as *const _ as *mut _, buffer.len() as u32, buffer.as_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn write_partial(&self, buffer: &[u8]) -> Result { + }} + #[inline] pub fn write_partial(&self, buffer: &[u8]) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).WritePartial)(self as *const _ as *mut _, buffer.len() as u32, buffer.as_ptr() as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn read(&self, buffer: &mut [u8]) -> Result<()> { + }} + #[inline] pub fn read(&self, buffer: &mut [u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Read)(self as *const _ as *mut _, buffer.len() as u32, buffer.as_mut_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn read_partial(&self, buffer: &mut [u8]) -> Result { + }} + #[inline] pub fn read_partial(&self, buffer: &mut [u8]) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ReadPartial)(self as *const _ as *mut _, buffer.len() as u32, buffer.as_mut_ptr() as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn write_read(&self, writeBuffer: &[u8], readBuffer: &mut [u8]) -> Result<()> { + }} + #[inline] pub fn write_read(&self, writeBuffer: &[u8], readBuffer: &mut [u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).WriteRead)(self as *const _ as *mut _, writeBuffer.len() as u32, writeBuffer.as_ptr() as *mut _, readBuffer.len() as u32, readBuffer.as_mut_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn write_read_partial(&self, writeBuffer: &[u8], readBuffer: &mut [u8]) -> Result { + }} + #[inline] pub fn write_read_partial(&self, writeBuffer: &[u8], readBuffer: &mut [u8]) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).WriteReadPartial)(self as *const _ as *mut _, writeBuffer.len() as u32, writeBuffer.as_ptr() as *mut _, readBuffer.len() as u32, readBuffer.as_mut_ptr() as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class I2cDevice: II2cDevice} impl RtActivatable for I2cDevice {} impl I2cDevice { - #[inline] pub fn get_device_selector() -> Result { unsafe { + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} - #[inline] pub fn get_device_selector_from_friendly_name(friendlyName: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_from_friendly_name(friendlyName: &HStringArg) -> Result { >::get_activation_factory().get_device_selector_from_friendly_name(friendlyName) - }} - #[inline] pub fn from_id_async(deviceId: &HStringArg, settings: &I2cConnectionSettings) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(deviceId: &HStringArg, settings: &I2cConnectionSettings) -> Result>> { >::get_activation_factory().from_id_async(deviceId, settings) - }} + } } DEFINE_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]) [CLSID_I2cDevice]); 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(&self, out: *mut HSTRING) -> HRESULT, fn GetDeviceSelectorFromFriendlyName(&self, friendlyName: HSTRING, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&self, deviceId: HSTRING, settings: *mut I2cConnectionSettings, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FromIdAsync(&self, deviceId: HSTRING, settings: *mut I2cConnectionSettings, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl II2cDeviceStatics { - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector_from_friendly_name(&self, friendlyName: &HStringArg) -> Result { + }} + #[inline] pub fn get_device_selector_from_friendly_name(&self, friendlyName: &HStringArg) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorFromFriendlyName)(self as *const _ as *mut _, friendlyName.get(), &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg, settings: &I2cConnectionSettings) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg, settings: &I2cConnectionSettings) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), settings as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum I2cSharingMode: i32 { Exclusive (I2cSharingMode_Exclusive) = 0, Shared (I2cSharingMode_Shared) = 1, @@ -1409,11 +1409,11 @@ RT_INTERFACE!{interface II2cControllerProvider(II2cControllerProviderVtbl): IIns fn GetDeviceProvider(&self, settings: *mut ProviderI2cConnectionSettings, out: *mut *mut II2cDeviceProvider) -> HRESULT }} impl II2cControllerProvider { - #[inline] pub unsafe fn get_device_provider(&self, settings: &ProviderI2cConnectionSettings) -> Result> { + #[inline] pub fn get_device_provider(&self, settings: &ProviderI2cConnectionSettings) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceProvider)(self as *const _ as *mut _, settings as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } 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] { @@ -1426,49 +1426,49 @@ RT_INTERFACE!{interface II2cDeviceProvider(II2cDeviceProviderVtbl): IInspectable fn WriteReadPartial(&self, writeBufferSize: u32, writeBuffer: *mut u8, readBufferSize: u32, readBuffer: *mut u8, out: *mut ProviderI2cTransferResult) -> HRESULT }} impl II2cDeviceProvider { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn write(&self, buffer: &[u8]) -> Result<()> { + }} + #[inline] pub fn write(&self, buffer: &[u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Write)(self as *const _ as *mut _, buffer.len() as u32, buffer.as_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn write_partial(&self, buffer: &[u8]) -> Result { + }} + #[inline] pub fn write_partial(&self, buffer: &[u8]) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).WritePartial)(self as *const _ as *mut _, buffer.len() as u32, buffer.as_ptr() as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn read(&self, buffer: &mut [u8]) -> Result<()> { + }} + #[inline] pub fn read(&self, buffer: &mut [u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Read)(self as *const _ as *mut _, buffer.len() as u32, buffer.as_mut_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn read_partial(&self, buffer: &mut [u8]) -> Result { + }} + #[inline] pub fn read_partial(&self, buffer: &mut [u8]) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ReadPartial)(self as *const _ as *mut _, buffer.len() as u32, buffer.as_mut_ptr() as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn write_read(&self, writeBuffer: &[u8], readBuffer: &mut [u8]) -> Result<()> { + }} + #[inline] pub fn write_read(&self, writeBuffer: &[u8], readBuffer: &mut [u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).WriteRead)(self as *const _ as *mut _, writeBuffer.len() as u32, writeBuffer.as_ptr() as *mut _, readBuffer.len() as u32, readBuffer.as_mut_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn write_read_partial(&self, writeBuffer: &[u8], readBuffer: &mut [u8]) -> Result { + }} + #[inline] pub fn write_read_partial(&self, writeBuffer: &[u8], readBuffer: &mut [u8]) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).WriteReadPartial)(self as *const _ as *mut _, writeBuffer.len() as u32, writeBuffer.as_ptr() as *mut _, readBuffer.len() as u32, readBuffer.as_mut_ptr() as *mut _, &mut out); if hr == S_OK { Ok(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(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT + fn GetControllersAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl II2cProvider { - #[inline] pub unsafe fn get_controllers_async(&self) -> Result>>> { + #[inline] pub fn get_controllers_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetControllersAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum ProviderI2cBusSpeed: i32 { StandardMode (ProviderI2cBusSpeed_StandardMode) = 0, FastMode (ProviderI2cBusSpeed_FastMode) = 1, @@ -1483,33 +1483,33 @@ RT_INTERFACE!{interface IProviderI2cConnectionSettings(IProviderI2cConnectionSet fn put_SharingMode(&self, value: ProviderI2cSharingMode) -> HRESULT }} impl IProviderI2cConnectionSettings { - #[inline] pub unsafe fn get_slave_address(&self) -> Result { + #[inline] pub fn get_slave_address(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SlaveAddress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_slave_address(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_slave_address(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SlaveAddress)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_bus_speed(&self) -> Result { + }} + #[inline] pub fn get_bus_speed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BusSpeed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_bus_speed(&self, value: ProviderI2cBusSpeed) -> Result<()> { + }} + #[inline] pub fn set_bus_speed(&self, value: ProviderI2cBusSpeed) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BusSpeed)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_sharing_mode(&self) -> Result { + }} + #[inline] pub fn get_sharing_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SharingMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_sharing_mode(&self, value: ProviderI2cSharingMode) -> Result<()> { + }} + #[inline] pub fn set_sharing_mode(&self, value: ProviderI2cSharingMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SharingMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ProviderI2cConnectionSettings: IProviderI2cConnectionSettings} RT_ENUM! { enum ProviderI2cSharingMode: i32 { @@ -1535,103 +1535,103 @@ RT_INTERFACE!{interface IPwmController(IPwmControllerVtbl): IInspectable(IInspec fn OpenPin(&self, pinNumber: i32, out: *mut *mut PwmPin) -> HRESULT }} impl IPwmController { - #[inline] pub unsafe fn get_pin_count(&self) -> Result { + #[inline] pub fn get_pin_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PinCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_actual_frequency(&self) -> Result { + }} + #[inline] pub fn get_actual_frequency(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ActualFrequency)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_desired_frequency(&self, desiredFrequency: f64) -> Result { + }} + #[inline] pub fn set_desired_frequency(&self, desiredFrequency: f64) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).SetDesiredFrequency)(self as *const _ as *mut _, desiredFrequency, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_frequency(&self) -> Result { + }} + #[inline] pub fn get_min_frequency(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinFrequency)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_frequency(&self) -> Result { + }} + #[inline] pub fn get_max_frequency(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxFrequency)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn open_pin(&self, pinNumber: i32) -> Result> { + }} + #[inline] pub fn open_pin(&self, pinNumber: i32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenPin)(self as *const _ as *mut _, pinNumber, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PwmController: IPwmController} impl RtActivatable for PwmController {} impl RtActivatable for PwmController {} impl RtActivatable for PwmController {} impl PwmController { - #[inline] pub fn get_controllers_async(provider: &provider::IPwmProvider) -> Result>>> { unsafe { + #[inline] pub fn get_controllers_async(provider: &provider::IPwmProvider) -> Result>>> { >::get_activation_factory().get_controllers_async(provider) - }} - #[inline] pub fn get_default_async() -> Result>> { unsafe { + } + #[inline] pub fn get_default_async() -> Result>> { >::get_activation_factory().get_default_async() - }} - #[inline] pub fn get_device_selector() -> Result { unsafe { + } + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} - #[inline] pub fn get_device_selector_from_friendly_name(friendlyName: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_from_friendly_name(friendlyName: &HStringArg) -> Result { >::get_activation_factory().get_device_selector_from_friendly_name(friendlyName) - }} - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} + } } DEFINE_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]) [CLSID_PwmController]); 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(&self, provider: *mut provider::IPwmProvider, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn GetControllersAsync(&self, provider: *mut provider::IPwmProvider, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IPwmControllerStatics { - #[inline] pub unsafe fn get_controllers_async(&self, provider: &provider::IPwmProvider) -> Result>>> { + #[inline] pub fn get_controllers_async(&self, provider: &provider::IPwmProvider) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetControllersAsync)(self as *const _ as *mut _, provider as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetDefaultAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IPwmControllerStatics2 { - #[inline] pub unsafe fn get_default_async(&self) -> Result>> { + #[inline] pub fn get_default_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefaultAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IPwmControllerStatics3, 2992117873, 553, 17220, 174, 63, 155, 124, 208, 230, 107, 148); RT_INTERFACE!{static interface IPwmControllerStatics3(IPwmControllerStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IPwmControllerStatics3] { fn GetDeviceSelector(&self, out: *mut HSTRING) -> HRESULT, fn GetDeviceSelectorFromFriendlyName(&self, friendlyName: HSTRING, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IPwmControllerStatics3 { - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector_from_friendly_name(&self, friendlyName: &HStringArg) -> Result { + }} + #[inline] pub fn get_device_selector_from_friendly_name(&self, friendlyName: &HStringArg) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorFromFriendlyName)(self as *const _ as *mut _, friendlyName.get(), &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &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] { @@ -1645,42 +1645,42 @@ RT_INTERFACE!{interface IPwmPin(IPwmPinVtbl): IInspectable(IInspectableVtbl) [II fn get_IsStarted(&self, out: *mut bool) -> HRESULT }} impl IPwmPin { - #[inline] pub unsafe fn get_controller(&self) -> Result> { + #[inline] pub fn get_controller(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Controller)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_active_duty_cycle_percentage(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_active_duty_cycle_percentage(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetActiveDutyCyclePercentage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_active_duty_cycle_percentage(&self, dutyCyclePercentage: f64) -> Result<()> { + }} + #[inline] pub fn set_active_duty_cycle_percentage(&self, dutyCyclePercentage: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetActiveDutyCyclePercentage)(self as *const _ as *mut _, dutyCyclePercentage); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_polarity(&self) -> Result { + }} + #[inline] pub fn get_polarity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Polarity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_polarity(&self, value: PwmPulsePolarity) -> Result<()> { + }} + #[inline] pub fn set_polarity(&self, value: PwmPulsePolarity) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Polarity)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_started(&self) -> Result { + }} + #[inline] pub fn get_is_started(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsStarted)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PwmPin: IPwmPin} RT_ENUM! { enum PwmPulsePolarity: i32 { @@ -1702,62 +1702,62 @@ RT_INTERFACE!{interface IPwmControllerProvider(IPwmControllerProviderVtbl): IIns fn SetPulseParameters(&self, pin: i32, dutyCycle: f64, invertPolarity: bool) -> HRESULT }} impl IPwmControllerProvider { - #[inline] pub unsafe fn get_pin_count(&self) -> Result { + #[inline] pub fn get_pin_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PinCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_actual_frequency(&self) -> Result { + }} + #[inline] pub fn get_actual_frequency(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ActualFrequency)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_desired_frequency(&self, frequency: f64) -> Result { + }} + #[inline] pub fn set_desired_frequency(&self, frequency: f64) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).SetDesiredFrequency)(self as *const _ as *mut _, frequency, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_frequency(&self) -> Result { + }} + #[inline] pub fn get_max_frequency(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxFrequency)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_frequency(&self) -> Result { + }} + #[inline] pub fn get_min_frequency(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinFrequency)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn acquire_pin(&self, pin: i32) -> Result<()> { + }} + #[inline] pub fn acquire_pin(&self, pin: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AcquirePin)(self as *const _ as *mut _, pin); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn release_pin(&self, pin: i32) -> Result<()> { + }} + #[inline] pub fn release_pin(&self, pin: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReleasePin)(self as *const _ as *mut _, pin); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn enable_pin(&self, pin: i32) -> Result<()> { + }} + #[inline] pub fn enable_pin(&self, pin: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).EnablePin)(self as *const _ as *mut _, pin); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn disable_pin(&self, pin: i32) -> Result<()> { + }} + #[inline] pub fn disable_pin(&self, pin: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).DisablePin)(self as *const _ as *mut _, pin); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_pulse_parameters(&self, pin: i32, dutyCycle: f64, invertPolarity: bool) -> Result<()> { + }} + #[inline] pub fn set_pulse_parameters(&self, pin: i32, dutyCycle: f64, invertPolarity: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetPulseParameters)(self as *const _ as *mut _, pin, dutyCycle, invertPolarity); 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(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn GetControllers(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IPwmProvider { - #[inline] pub unsafe fn get_controllers(&self) -> Result>> { + #[inline] pub fn get_controllers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetControllers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } } // Windows.Devices.Pwm.Provider } // Windows.Devices.Pwm @@ -1768,29 +1768,29 @@ RT_INTERFACE!{interface ISpiBusInfo(ISpiBusInfoVtbl): IInspectable(IInspectableV fn get_ChipSelectLineCount(&self, out: *mut i32) -> HRESULT, fn get_MinClockFrequency(&self, out: *mut i32) -> HRESULT, fn get_MaxClockFrequency(&self, out: *mut i32) -> HRESULT, - fn get_SupportedDataBitLengths(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_SupportedDataBitLengths(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl ISpiBusInfo { - #[inline] pub unsafe fn get_chip_select_line_count(&self) -> Result { + #[inline] pub fn get_chip_select_line_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ChipSelectLineCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_clock_frequency(&self) -> Result { + }} + #[inline] pub fn get_min_clock_frequency(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinClockFrequency)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_clock_frequency(&self) -> Result { + }} + #[inline] pub fn get_max_clock_frequency(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxClockFrequency)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_data_bit_lengths(&self) -> Result>> { + }} + #[inline] pub fn get_supported_data_bit_lengths(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedDataBitLengths)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SpiBusInfo: ISpiBusInfo} DEFINE_IID!(IID_ISpiConnectionSettings, 1384358783, 63797, 19359, 167, 167, 58, 120, 144, 175, 165, 206); @@ -1807,58 +1807,58 @@ RT_INTERFACE!{interface ISpiConnectionSettings(ISpiConnectionSettingsVtbl): IIns fn put_SharingMode(&self, value: SpiSharingMode) -> HRESULT }} impl ISpiConnectionSettings { - #[inline] pub unsafe fn get_chip_select_line(&self) -> Result { + #[inline] pub fn get_chip_select_line(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ChipSelectLine)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_chip_select_line(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_chip_select_line(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ChipSelectLine)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_mode(&self) -> Result { + }} + #[inline] pub fn get_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Mode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_mode(&self, value: SpiMode) -> Result<()> { + }} + #[inline] pub fn set_mode(&self, value: SpiMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Mode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_data_bit_length(&self) -> Result { + }} + #[inline] pub fn get_data_bit_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DataBitLength)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_data_bit_length(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_data_bit_length(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DataBitLength)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_clock_frequency(&self) -> Result { + }} + #[inline] pub fn get_clock_frequency(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ClockFrequency)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_clock_frequency(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_clock_frequency(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ClockFrequency)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_sharing_mode(&self) -> Result { + }} + #[inline] pub fn get_sharing_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SharingMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_sharing_mode(&self, value: SpiSharingMode) -> Result<()> { + }} + #[inline] pub fn set_sharing_mode(&self, value: SpiSharingMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SharingMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SpiConnectionSettings: ISpiConnectionSettings} impl RtActivatable for SpiConnectionSettings {} impl SpiConnectionSettings { - #[inline] pub fn create(chipSelectLine: i32) -> Result> { unsafe { + #[inline] pub fn create(chipSelectLine: i32) -> Result> { >::get_activation_factory().create(chipSelectLine) - }} + } } DEFINE_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]) [CLSID_SpiConnectionSettings]); DEFINE_IID!(IID_ISpiConnectionSettingsFactory, 4288219166, 4292, 17591, 159, 234, 167, 72, 181, 164, 111, 49); @@ -1866,50 +1866,50 @@ RT_INTERFACE!{static interface ISpiConnectionSettingsFactory(ISpiConnectionSetti fn Create(&self, chipSelectLine: i32, out: *mut *mut SpiConnectionSettings) -> HRESULT }} impl ISpiConnectionSettingsFactory { - #[inline] pub unsafe fn create(&self, chipSelectLine: i32) -> Result> { + #[inline] pub fn create(&self, chipSelectLine: i32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, chipSelectLine, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, settings: *mut SpiConnectionSettings, out: *mut *mut SpiDevice) -> HRESULT }} impl ISpiController { - #[inline] pub unsafe fn get_device(&self, settings: &SpiConnectionSettings) -> Result> { + #[inline] pub fn get_device(&self, settings: &SpiConnectionSettings) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDevice)(self as *const _ as *mut _, settings as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SpiController: ISpiController} impl RtActivatable for SpiController {} impl SpiController { - #[inline] pub fn get_default_async() -> Result>> { unsafe { + #[inline] pub fn get_default_async() -> Result>> { >::get_activation_factory().get_default_async() - }} - #[inline] pub fn get_controllers_async(provider: &provider::ISpiProvider) -> Result>>> { unsafe { + } + #[inline] pub fn get_controllers_async(provider: &provider::ISpiProvider) -> Result>>> { >::get_activation_factory().get_controllers_async(provider) - }} + } } DEFINE_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]) [CLSID_SpiController]); 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetControllersAsync(&self, provider: *mut provider::ISpiProvider, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn GetDefaultAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetControllersAsync(&self, provider: *mut provider::ISpiProvider, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl ISpiControllerStatics { - #[inline] pub unsafe fn get_default_async(&self) -> Result>> { + #[inline] pub fn get_default_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefaultAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_controllers_async(&self, provider: &provider::ISpiProvider) -> Result>>> { + }} + #[inline] pub fn get_controllers_async(&self, provider: &provider::ISpiProvider) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetControllersAsync)(self as *const _ as *mut _, provider as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ISpiDevice, 97858925, 4534, 19769, 132, 213, 149, 223, 180, 201, 242, 206); RT_INTERFACE!{interface ISpiDevice(ISpiDeviceVtbl): IInspectable(IInspectableVtbl) [IID_ISpiDevice] { @@ -1921,48 +1921,48 @@ RT_INTERFACE!{interface ISpiDevice(ISpiDeviceVtbl): IInspectable(IInspectableVtb fn TransferFullDuplex(&self, writeBufferSize: u32, writeBuffer: *mut u8, readBufferSize: u32, readBuffer: *mut u8) -> HRESULT }} impl ISpiDevice { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_connection_settings(&self) -> Result> { + }} + #[inline] pub fn get_connection_settings(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ConnectionSettings)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn write(&self, buffer: &[u8]) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn write(&self, buffer: &[u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Write)(self as *const _ as *mut _, buffer.len() as u32, buffer.as_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn read(&self, buffer: &mut [u8]) -> Result<()> { + }} + #[inline] pub fn read(&self, buffer: &mut [u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Read)(self as *const _ as *mut _, buffer.len() as u32, buffer.as_mut_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn transfer_sequential(&self, writeBuffer: &[u8], readBuffer: &mut [u8]) -> Result<()> { + }} + #[inline] pub fn transfer_sequential(&self, writeBuffer: &[u8], readBuffer: &mut [u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).TransferSequential)(self as *const _ as *mut _, writeBuffer.len() as u32, writeBuffer.as_ptr() as *mut _, readBuffer.len() as u32, readBuffer.as_mut_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn transfer_full_duplex(&self, writeBuffer: &[u8], readBuffer: &mut [u8]) -> Result<()> { + }} + #[inline] pub fn transfer_full_duplex(&self, writeBuffer: &[u8], readBuffer: &mut [u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).TransferFullDuplex)(self as *const _ as *mut _, writeBuffer.len() as u32, writeBuffer.as_ptr() as *mut _, readBuffer.len() as u32, readBuffer.as_mut_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SpiDevice: ISpiDevice} impl RtActivatable for SpiDevice {} impl SpiDevice { - #[inline] pub fn get_device_selector() -> Result { unsafe { + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} - #[inline] pub fn get_device_selector_from_friendly_name(friendlyName: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_from_friendly_name(friendlyName: &HStringArg) -> Result { >::get_activation_factory().get_device_selector_from_friendly_name(friendlyName) - }} - #[inline] pub fn get_bus_info(busId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn get_bus_info(busId: &HStringArg) -> Result>> { >::get_activation_factory().get_bus_info(busId) - }} - #[inline] pub fn from_id_async(busId: &HStringArg, settings: &SpiConnectionSettings) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(busId: &HStringArg, settings: &SpiConnectionSettings) -> Result>> { >::get_activation_factory().from_id_async(busId, settings) - }} + } } DEFINE_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]) [CLSID_SpiDevice]); DEFINE_IID!(IID_ISpiDeviceStatics, 2725832025, 22304, 19775, 189, 147, 86, 245, 255, 90, 88, 121); @@ -1970,29 +1970,29 @@ RT_INTERFACE!{static interface ISpiDeviceStatics(ISpiDeviceStaticsVtbl): IInspec fn GetDeviceSelector(&self, out: *mut HSTRING) -> HRESULT, fn GetDeviceSelectorFromFriendlyName(&self, friendlyName: HSTRING, out: *mut HSTRING) -> HRESULT, fn GetBusInfo(&self, busId: HSTRING, out: *mut *mut SpiBusInfo) -> HRESULT, - fn FromIdAsync(&self, busId: HSTRING, settings: *mut SpiConnectionSettings, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FromIdAsync(&self, busId: HSTRING, settings: *mut SpiConnectionSettings, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ISpiDeviceStatics { - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector_from_friendly_name(&self, friendlyName: &HStringArg) -> Result { + }} + #[inline] pub fn get_device_selector_from_friendly_name(&self, friendlyName: &HStringArg) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorFromFriendlyName)(self as *const _ as *mut _, friendlyName.get(), &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_bus_info(&self, busId: &HStringArg) -> Result> { + }} + #[inline] pub fn get_bus_info(&self, busId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetBusInfo)(self as *const _ as *mut _, busId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, busId: &HStringArg, settings: &SpiConnectionSettings) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn from_id_async(&self, busId: &HStringArg, settings: &SpiConnectionSettings) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, busId.get(), settings as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum SpiMode: i32 { Mode0 (SpiMode_Mode0) = 0, Mode1 (SpiMode_Mode1) = 1, Mode2 (SpiMode_Mode2) = 2, Mode3 (SpiMode_Mode3) = 3, @@ -2016,58 +2016,58 @@ RT_INTERFACE!{interface IProviderSpiConnectionSettings(IProviderSpiConnectionSet fn put_SharingMode(&self, value: ProviderSpiSharingMode) -> HRESULT }} impl IProviderSpiConnectionSettings { - #[inline] pub unsafe fn get_chip_select_line(&self) -> Result { + #[inline] pub fn get_chip_select_line(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ChipSelectLine)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_chip_select_line(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_chip_select_line(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ChipSelectLine)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_mode(&self) -> Result { + }} + #[inline] pub fn get_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Mode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_mode(&self, value: ProviderSpiMode) -> Result<()> { + }} + #[inline] pub fn set_mode(&self, value: ProviderSpiMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Mode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_data_bit_length(&self) -> Result { + }} + #[inline] pub fn get_data_bit_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DataBitLength)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_data_bit_length(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_data_bit_length(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DataBitLength)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_clock_frequency(&self) -> Result { + }} + #[inline] pub fn get_clock_frequency(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ClockFrequency)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_clock_frequency(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_clock_frequency(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ClockFrequency)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_sharing_mode(&self) -> Result { + }} + #[inline] pub fn get_sharing_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SharingMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_sharing_mode(&self, value: ProviderSpiSharingMode) -> Result<()> { + }} + #[inline] pub fn set_sharing_mode(&self, value: ProviderSpiSharingMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SharingMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ProviderSpiConnectionSettings: IProviderSpiConnectionSettings} impl RtActivatable for ProviderSpiConnectionSettings {} impl ProviderSpiConnectionSettings { - #[inline] pub fn create(chipSelectLine: i32) -> Result> { unsafe { + #[inline] pub fn create(chipSelectLine: i32) -> Result> { >::get_activation_factory().create(chipSelectLine) - }} + } } DEFINE_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]) [CLSID_ProviderSpiConnectionSettings]); DEFINE_IID!(IID_IProviderSpiConnectionSettingsFactory, 1715825498, 3193, 17379, 159, 60, 229, 151, 128, 172, 24, 250); @@ -2075,11 +2075,11 @@ RT_INTERFACE!{static interface IProviderSpiConnectionSettingsFactory(IProviderSp fn Create(&self, chipSelectLine: i32, out: *mut *mut ProviderSpiConnectionSettings) -> HRESULT }} impl IProviderSpiConnectionSettingsFactory { - #[inline] pub unsafe fn create(&self, chipSelectLine: i32) -> Result> { + #[inline] pub fn create(&self, chipSelectLine: i32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, chipSelectLine, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum ProviderSpiMode: i32 { Mode0 (ProviderSpiMode_Mode0) = 0, Mode1 (ProviderSpiMode_Mode1) = 1, Mode2 (ProviderSpiMode_Mode2) = 2, Mode3 (ProviderSpiMode_Mode3) = 3, @@ -2092,11 +2092,11 @@ RT_INTERFACE!{interface ISpiControllerProvider(ISpiControllerProviderVtbl): IIns fn GetDeviceProvider(&self, settings: *mut ProviderSpiConnectionSettings, out: *mut *mut ISpiDeviceProvider) -> HRESULT }} impl ISpiControllerProvider { - #[inline] pub unsafe fn get_device_provider(&self, settings: &ProviderSpiConnectionSettings) -> Result> { + #[inline] pub fn get_device_provider(&self, settings: &ProviderSpiConnectionSettings) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceProvider)(self as *const _ as *mut _, settings as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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] { @@ -2108,43 +2108,43 @@ RT_INTERFACE!{interface ISpiDeviceProvider(ISpiDeviceProviderVtbl): IInspectable fn TransferFullDuplex(&self, writeBufferSize: u32, writeBuffer: *mut u8, readBufferSize: u32, readBuffer: *mut u8) -> HRESULT }} impl ISpiDeviceProvider { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_connection_settings(&self) -> Result> { + }} + #[inline] pub fn get_connection_settings(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ConnectionSettings)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn write(&self, buffer: &[u8]) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn write(&self, buffer: &[u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Write)(self as *const _ as *mut _, buffer.len() as u32, buffer.as_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn read(&self, buffer: &mut [u8]) -> Result<()> { + }} + #[inline] pub fn read(&self, buffer: &mut [u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Read)(self as *const _ as *mut _, buffer.len() as u32, buffer.as_mut_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn transfer_sequential(&self, writeBuffer: &[u8], readBuffer: &mut [u8]) -> Result<()> { + }} + #[inline] pub fn transfer_sequential(&self, writeBuffer: &[u8], readBuffer: &mut [u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).TransferSequential)(self as *const _ as *mut _, writeBuffer.len() as u32, writeBuffer.as_ptr() as *mut _, readBuffer.len() as u32, readBuffer.as_mut_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn transfer_full_duplex(&self, writeBuffer: &[u8], readBuffer: &mut [u8]) -> Result<()> { + }} + #[inline] pub fn transfer_full_duplex(&self, writeBuffer: &[u8], readBuffer: &mut [u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).TransferFullDuplex)(self as *const _ as *mut _, writeBuffer.len() as u32, writeBuffer.as_ptr() as *mut _, readBuffer.len() as u32, readBuffer.as_mut_ptr() as *mut _); if hr == S_OK { Ok(()) } 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(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT + fn GetControllersAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl ISpiProvider { - #[inline] pub unsafe fn get_controllers_async(&self) -> Result>>> { + #[inline] pub fn get_controllers_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetControllersAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } } // Windows.Devices.Spi.Provider } // Windows.Devices.Spi @@ -2155,11 +2155,11 @@ RT_INTERFACE!{interface ICardAddedEventArgs(ICardAddedEventArgsVtbl): IInspectab fn get_SmartCard(&self, out: *mut *mut SmartCard) -> HRESULT }} impl ICardAddedEventArgs { - #[inline] pub unsafe fn get_smart_card(&self) -> Result> { + #[inline] pub fn get_smart_card(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SmartCard)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CardAddedEventArgs: ICardAddedEventArgs} DEFINE_IID!(IID_ICardRemovedEventArgs, 355670703, 8919, 18757, 175, 201, 3, 180, 111, 66, 166, 205); @@ -2167,35 +2167,35 @@ RT_INTERFACE!{interface ICardRemovedEventArgs(ICardRemovedEventArgsVtbl): IInspe fn get_SmartCard(&self, out: *mut *mut SmartCard) -> HRESULT }} impl ICardRemovedEventArgs { - #[inline] pub unsafe fn get_smart_card(&self) -> Result> { + #[inline] pub fn get_smart_card(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SmartCard)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CardRemovedEventArgs: ICardRemovedEventArgs} 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(&self, out: *mut *mut SmartCardReader) -> HRESULT, - fn GetStatusAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn GetAnswerToResetAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetStatusAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn GetAnswerToResetAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ISmartCard { - #[inline] pub unsafe fn get_reader(&self) -> Result> { + #[inline] pub fn get_reader(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Reader)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_status_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_status_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetStatusAsync)(self 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_answer_to_reset_async(&self) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_answer_to_reset_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAnswerToResetAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class SmartCard: ISmartCard} RT_ENUM! { enum SmartCardActivationPolicyChangeResult: i32 { @@ -2206,7 +2206,7 @@ RT_INTERFACE!{interface ISmartCardAppletIdGroup(ISmartCardAppletIdGroupVtbl): II fn get_DisplayName(&self, out: *mut HSTRING) -> HRESULT, fn put_DisplayName(&self, value: HSTRING) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy2(&self) -> (), - #[cfg(feature="windows-storage")] fn get_AppletIds(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + #[cfg(feature="windows-storage")] fn get_AppletIds(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_SmartCardEmulationCategory(&self, out: *mut SmartCardEmulationCategory) -> HRESULT, fn put_SmartCardEmulationCategory(&self, value: SmartCardEmulationCategory) -> HRESULT, fn get_SmartCardEmulationType(&self, out: *mut SmartCardEmulationType) -> HRESULT, @@ -2215,59 +2215,59 @@ RT_INTERFACE!{interface ISmartCardAppletIdGroup(ISmartCardAppletIdGroupVtbl): II fn put_AutomaticEnablement(&self, value: bool) -> HRESULT }} impl ISmartCardAppletIdGroup { - #[inline] pub unsafe fn get_display_name(&self) -> Result { + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_display_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_applet_ids(&self) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_applet_ids(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppletIds)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_smart_card_emulation_category(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_smart_card_emulation_category(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SmartCardEmulationCategory)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_smart_card_emulation_category(&self, value: SmartCardEmulationCategory) -> Result<()> { + }} + #[inline] pub fn set_smart_card_emulation_category(&self, value: SmartCardEmulationCategory) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SmartCardEmulationCategory)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_smart_card_emulation_type(&self) -> Result { + }} + #[inline] pub fn get_smart_card_emulation_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SmartCardEmulationType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_smart_card_emulation_type(&self, value: SmartCardEmulationType) -> Result<()> { + }} + #[inline] pub fn set_smart_card_emulation_type(&self, value: SmartCardEmulationType) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SmartCardEmulationType)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_automatic_enablement(&self) -> Result { + }} + #[inline] pub fn get_automatic_enablement(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AutomaticEnablement)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_automatic_enablement(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_automatic_enablement(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AutomaticEnablement)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SmartCardAppletIdGroup: ISmartCardAppletIdGroup} impl RtActivatable for SmartCardAppletIdGroup {} impl RtActivatable for SmartCardAppletIdGroup {} impl RtActivatable for SmartCardAppletIdGroup {} impl SmartCardAppletIdGroup { - #[cfg(feature="windows-storage")] #[inline] pub fn create(displayName: &HStringArg, appletIds: &super::super::foundation::collections::IVector, emulationCategory: SmartCardEmulationCategory, emulationType: SmartCardEmulationType) -> Result> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn create(displayName: &HStringArg, appletIds: &foundation::collections::IVector, emulationCategory: SmartCardEmulationCategory, emulationType: SmartCardEmulationType) -> Result> { >::get_activation_factory().create(displayName, appletIds, emulationCategory, emulationType) - }} - #[inline] pub fn get_max_applet_ids() -> Result { unsafe { + } + #[inline] pub fn get_max_applet_ids() -> Result { >::get_activation_factory().get_max_applet_ids() - }} + } } DEFINE_CLSID!(SmartCardAppletIdGroup(&[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,65,112,112,108,101,116,73,100,71,114,111,117,112,0]) [CLSID_SmartCardAppletIdGroup]); RT_ENUM! { enum SmartCardAppletIdGroupActivationPolicy: i32 { @@ -2275,49 +2275,49 @@ RT_ENUM! { enum SmartCardAppletIdGroupActivationPolicy: i32 { }} DEFINE_IID!(IID_ISmartCardAppletIdGroupFactory, 2433084237, 19045, 20033, 128, 97, 203, 232, 63, 54, 149, 229); RT_INTERFACE!{static interface ISmartCardAppletIdGroupFactory(ISmartCardAppletIdGroupFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardAppletIdGroupFactory] { - #[cfg(feature="windows-storage")] fn Create(&self, displayName: HSTRING, appletIds: *mut super::super::foundation::collections::IVector, emulationCategory: SmartCardEmulationCategory, emulationType: SmartCardEmulationType, out: *mut *mut SmartCardAppletIdGroup) -> HRESULT + #[cfg(feature="windows-storage")] fn Create(&self, displayName: HSTRING, appletIds: *mut foundation::collections::IVector, emulationCategory: SmartCardEmulationCategory, emulationType: SmartCardEmulationType, out: *mut *mut SmartCardAppletIdGroup) -> HRESULT }} impl ISmartCardAppletIdGroupFactory { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn create(&self, displayName: &HStringArg, appletIds: &super::super::foundation::collections::IVector, emulationCategory: SmartCardEmulationCategory, emulationType: SmartCardEmulationType) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn create(&self, displayName: &HStringArg, appletIds: &foundation::collections::IVector, emulationCategory: SmartCardEmulationCategory, emulationType: SmartCardEmulationType) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, displayName.get(), appletIds as *const _ as *mut _, emulationCategory, emulationType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ISmartCardAppletIdGroupRegistration, 3742501073, 12731, 21910, 67, 177, 109, 105, 160, 37, 123, 58); RT_INTERFACE!{interface ISmartCardAppletIdGroupRegistration(ISmartCardAppletIdGroupRegistrationVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardAppletIdGroupRegistration] { fn get_ActivationPolicy(&self, out: *mut SmartCardAppletIdGroupActivationPolicy) -> HRESULT, fn get_AppletIdGroup(&self, out: *mut *mut SmartCardAppletIdGroup) -> HRESULT, - fn RequestActivationPolicyChangeAsync(&self, policy: SmartCardAppletIdGroupActivationPolicy, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestActivationPolicyChangeAsync(&self, policy: SmartCardAppletIdGroupActivationPolicy, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn get_Id(&self, out: *mut Guid) -> HRESULT, - fn SetAutomaticResponseApdusAsync(&self, apdus: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn SetAutomaticResponseApdusAsync(&self, apdus: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl ISmartCardAppletIdGroupRegistration { - #[inline] pub unsafe fn get_activation_policy(&self) -> Result { + #[inline] pub fn get_activation_policy(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ActivationPolicy)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_applet_id_group(&self) -> Result> { + }} + #[inline] pub fn get_applet_id_group(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppletIdGroup)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_activation_policy_change_async(&self, policy: SmartCardAppletIdGroupActivationPolicy) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn request_activation_policy_change_async(&self, policy: SmartCardAppletIdGroupActivationPolicy) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestActivationPolicyChangeAsync)(self as *const _ as *mut _, policy, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&self) -> Result { + }} + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_automatic_response_apdus_async(&self, apdus: &super::super::foundation::collections::IIterable) -> Result> { + }} + #[inline] pub fn set_automatic_response_apdus_async(&self, apdus: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetAutomaticResponseApdusAsync)(self as *const _ as *mut _, apdus as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class SmartCardAppletIdGroupRegistration: ISmartCardAppletIdGroupRegistration} DEFINE_IID!(IID_ISmartCardAppletIdGroupStatics, 2871564713, 59244, 17871, 191, 29, 144, 234, 166, 32, 89, 39); @@ -2325,11 +2325,11 @@ RT_INTERFACE!{static interface ISmartCardAppletIdGroupStatics(ISmartCardAppletId fn get_MaxAppletIds(&self, out: *mut u16) -> HRESULT }} impl ISmartCardAppletIdGroupStatics { - #[inline] pub unsafe fn get_max_applet_ids(&self) -> Result { + #[inline] pub fn get_max_applet_ids(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxAppletIds)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ISmartCardAutomaticResponseApdu, 1377119147, 50750, 17713, 168, 87, 215, 86, 217, 155, 152, 106); RT_INTERFACE!{interface ISmartCardAutomaticResponseApdu(ISmartCardAutomaticResponseApduVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardAutomaticResponseApdu] { @@ -2345,86 +2345,86 @@ RT_INTERFACE!{interface ISmartCardAutomaticResponseApdu(ISmartCardAutomaticRespo #[cfg(feature="windows-storage")] fn put_ResponseApdu(&self, value: *mut super::super::storage::streams::IBuffer) -> HRESULT }} impl ISmartCardAutomaticResponseApdu { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_command_apdu(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_command_apdu(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CommandApdu)(self 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_command_apdu(&self, value: &super::super::storage::streams::IBuffer) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_command_apdu(&self, value: &super::super::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CommandApdu)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_command_apdu_bit_mask(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_command_apdu_bit_mask(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CommandApduBitMask)(self 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_command_apdu_bit_mask(&self, value: &super::super::storage::streams::IBuffer) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_command_apdu_bit_mask(&self, value: &super::super::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CommandApduBitMask)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_should_match_length(&self) -> Result { + }} + #[inline] pub fn get_should_match_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ShouldMatchLength)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_should_match_length(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_should_match_length(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ShouldMatchLength)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_applet_id(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_applet_id(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppletId)(self 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_applet_id(&self, value: &super::super::storage::streams::IBuffer) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_applet_id(&self, value: &super::super::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AppletId)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_response_apdu(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_response_apdu(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResponseApdu)(self 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_response_apdu(&self, value: &super::super::storage::streams::IBuffer) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_response_apdu(&self, value: &super::super::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ResponseApdu)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SmartCardAutomaticResponseApdu: ISmartCardAutomaticResponseApdu} impl RtActivatable for SmartCardAutomaticResponseApdu {} impl SmartCardAutomaticResponseApdu { - #[cfg(feature="windows-storage")] #[inline] pub fn create(commandApdu: &super::super::storage::streams::IBuffer, responseApdu: &super::super::storage::streams::IBuffer) -> Result> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn create(commandApdu: &super::super::storage::streams::IBuffer, responseApdu: &super::super::storage::streams::IBuffer) -> Result> { >::get_activation_factory().create(commandApdu, responseApdu) - }} + } } DEFINE_CLSID!(SmartCardAutomaticResponseApdu(&[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,65,117,116,111,109,97,116,105,99,82,101,115,112,111,110,115,101,65,112,100,117,0]) [CLSID_SmartCardAutomaticResponseApdu]); DEFINE_IID!(IID_ISmartCardAutomaticResponseApdu2, 1152301844, 21917, 17713, 78, 81, 137, 219, 111, 168, 165, 122); RT_INTERFACE!{interface ISmartCardAutomaticResponseApdu2(ISmartCardAutomaticResponseApdu2Vtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardAutomaticResponseApdu2] { - fn get_InputState(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_InputState(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_OutputState(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_OutputState(&self, value: *mut super::super::foundation::IReference) -> HRESULT + fn get_InputState(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_InputState(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_OutputState(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_OutputState(&self, value: *mut foundation::IReference) -> HRESULT }} impl ISmartCardAutomaticResponseApdu2 { - #[inline] pub unsafe fn get_input_state(&self) -> Result>> { + #[inline] pub fn get_input_state(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InputState)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_input_state(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_input_state(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InputState)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_output_state(&self) -> Result>> { + }} + #[inline] pub fn get_output_state(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OutputState)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_output_state(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_output_state(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OutputState)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ISmartCardAutomaticResponseApdu3, 3208895092, 25974, 17298, 147, 103, 254, 59, 201, 226, 212, 150); RT_INTERFACE!{interface ISmartCardAutomaticResponseApdu3(ISmartCardAutomaticResponseApdu3Vtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardAutomaticResponseApdu3] { @@ -2432,26 +2432,26 @@ RT_INTERFACE!{interface ISmartCardAutomaticResponseApdu3(ISmartCardAutomaticResp fn put_AllowWhenCryptogramGeneratorNotPrepared(&self, value: bool) -> HRESULT }} impl ISmartCardAutomaticResponseApdu3 { - #[inline] pub unsafe fn get_allow_when_cryptogram_generator_not_prepared(&self) -> Result { + #[inline] pub fn get_allow_when_cryptogram_generator_not_prepared(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AllowWhenCryptogramGeneratorNotPrepared)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_allow_when_cryptogram_generator_not_prepared(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_allow_when_cryptogram_generator_not_prepared(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AllowWhenCryptogramGeneratorNotPrepared)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ISmartCardAutomaticResponseApduFactory, 3917390586, 53292, 19541, 176, 42, 140, 255, 127, 169, 240, 91); RT_INTERFACE!{static interface ISmartCardAutomaticResponseApduFactory(ISmartCardAutomaticResponseApduFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardAutomaticResponseApduFactory] { #[cfg(feature="windows-storage")] fn Create(&self, commandApdu: *mut super::super::storage::streams::IBuffer, responseApdu: *mut super::super::storage::streams::IBuffer, out: *mut *mut SmartCardAutomaticResponseApdu) -> HRESULT }} impl ISmartCardAutomaticResponseApduFactory { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn create(&self, commandApdu: &super::super::storage::streams::IBuffer, responseApdu: &super::super::storage::streams::IBuffer) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn create(&self, commandApdu: &super::super::storage::streams::IBuffer, responseApdu: &super::super::storage::streams::IBuffer) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, commandApdu as *const _ as *mut _, responseApdu as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum SmartCardAutomaticResponseStatus: i32 { None (SmartCardAutomaticResponseStatus_None) = 0, Success (SmartCardAutomaticResponseStatus_Success) = 1, UnknownError (SmartCardAutomaticResponseStatus_UnknownError) = 2, @@ -2459,60 +2459,60 @@ RT_ENUM! { enum SmartCardAutomaticResponseStatus: i32 { 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(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, - #[cfg(feature="windows-storage")] fn VerifyResponseAsync(&self, response: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn ProvisionAsync(&self, response: *mut super::super::storage::streams::IBuffer, formatCard: bool, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - #[cfg(feature="windows-storage")] fn ProvisionAsyncWithNewCardId(&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(&self, response: *mut super::super::storage::streams::IBuffer, newAdministrativeKey: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + #[cfg(feature="windows-storage")] fn VerifyResponseAsync(&self, response: *mut super::super::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn ProvisionAsync(&self, response: *mut super::super::storage::streams::IBuffer, formatCard: bool, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + #[cfg(feature="windows-storage")] fn ProvisionAsyncWithNewCardId(&self, response: *mut super::super::storage::streams::IBuffer, formatCard: bool, newCardId: Guid, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + #[cfg(feature="windows-storage")] fn ChangeAdministrativeKeyAsync(&self, response: *mut super::super::storage::streams::IBuffer, newAdministrativeKey: *mut super::super::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl ISmartCardChallengeContext { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_challenge(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_challenge(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Challenge)(self 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_response_async(&self, response: &super::super::storage::streams::IBuffer) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn verify_response_async(&self, response: &super::super::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).VerifyResponseAsync)(self as *const _ as *mut _, 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(&self, response: &super::super::storage::streams::IBuffer, formatCard: bool) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn provision_async(&self, response: &super::super::storage::streams::IBuffer, formatCard: bool) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ProvisionAsync)(self as *const _ as *mut _, 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(&self, response: &super::super::storage::streams::IBuffer, formatCard: bool, newCardId: Guid) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn provision_async_with_new_card_id(&self, response: &super::super::storage::streams::IBuffer, formatCard: bool, newCardId: Guid) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ProvisionAsyncWithNewCardId)(self as *const _ as *mut _, 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(&self, response: &super::super::storage::streams::IBuffer, newAdministrativeKey: &super::super::storage::streams::IBuffer) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn change_administrative_key_async(&self, response: &super::super::storage::streams::IBuffer, newAdministrativeKey: &super::super::storage::streams::IBuffer) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ChangeAdministrativeKeyAsync)(self as *const _ as *mut _, response as *const _ as *mut _, newAdministrativeKey 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_ISmartCardConnect, 803178469, 653, 18718, 160, 88, 51, 130, 195, 152, 111, 64); RT_INTERFACE!{interface ISmartCardConnect(ISmartCardConnectVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardConnect] { - fn ConnectAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn ConnectAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ISmartCardConnect { - #[inline] pub unsafe fn connect_async(&self) -> Result>> { + #[inline] pub fn connect_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConnectAsync)(self 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(&self, command: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn TransmitAsync(&self, command: *mut super::super::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ISmartCardConnection { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn transmit_async(&self, command: &super::super::storage::streams::IBuffer) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn transmit_async(&self, command: &super::super::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TransmitAsync)(self as *const _ as *mut _, command as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class SmartCardConnection: ISmartCardConnection} RT_ENUM! { enum SmartCardCryptogramAlgorithm: i32 { @@ -2520,173 +2520,173 @@ RT_ENUM! { enum SmartCardCryptogramAlgorithm: i32 { }} DEFINE_IID!(IID_ISmartCardCryptogramGenerator, 3818870907, 60883, 20041, 181, 148, 15, 245, 228, 208, 199, 111); RT_INTERFACE!{interface ISmartCardCryptogramGenerator(ISmartCardCryptogramGeneratorVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardCryptogramGenerator] { - fn get_SupportedCryptogramMaterialTypes(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_SupportedCryptogramAlgorithms(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_SupportedCryptogramMaterialPackageFormats(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_SupportedCryptogramMaterialPackageConfirmationResponseFormats(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_SupportedSmartCardCryptogramStorageKeyCapabilities(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn DeleteCryptogramMaterialStorageKeyAsync(&self, storageKeyName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CreateCryptogramMaterialStorageKeyAsync(&self, promptingBehavior: SmartCardUnlockPromptingBehavior, storageKeyName: HSTRING, algorithm: SmartCardCryptogramStorageKeyAlgorithm, capabilities: SmartCardCryptogramStorageKeyCapabilities, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn get_SupportedCryptogramMaterialTypes(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedCryptogramAlgorithms(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedCryptogramMaterialPackageFormats(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedCryptogramMaterialPackageConfirmationResponseFormats(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedSmartCardCryptogramStorageKeyCapabilities(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn DeleteCryptogramMaterialStorageKeyAsync(&self, storageKeyName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreateCryptogramMaterialStorageKeyAsync(&self, promptingBehavior: SmartCardUnlockPromptingBehavior, storageKeyName: HSTRING, algorithm: SmartCardCryptogramStorageKeyAlgorithm, capabilities: SmartCardCryptogramStorageKeyCapabilities, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-security"))] fn __Dummy7(&self) -> (), - #[cfg(feature="windows-security")] fn RequestCryptogramMaterialStorageKeyInfoAsync(&self, promptingBehavior: SmartCardUnlockPromptingBehavior, storageKeyName: HSTRING, format: super::super::security::cryptography::core::CryptographicPublicKeyBlobType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-security")] fn RequestCryptogramMaterialStorageKeyInfoAsync(&self, promptingBehavior: SmartCardUnlockPromptingBehavior, storageKeyName: HSTRING, format: super::super::security::cryptography::core::CryptographicPublicKeyBlobType, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy8(&self) -> (), - #[cfg(feature="windows-storage")] fn ImportCryptogramMaterialPackageAsync(&self, format: SmartCardCryptogramMaterialPackageFormat, storageKeyName: HSTRING, materialPackageName: HSTRING, cryptogramMaterialPackage: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn ImportCryptogramMaterialPackageAsync(&self, format: SmartCardCryptogramMaterialPackageFormat, storageKeyName: HSTRING, materialPackageName: HSTRING, cryptogramMaterialPackage: *mut super::super::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy9(&self) -> (), - #[cfg(feature="windows-storage")] fn TryProvePossessionOfCryptogramMaterialPackageAsync(&self, promptingBehavior: SmartCardUnlockPromptingBehavior, responseFormat: SmartCardCryptogramMaterialPackageConfirmationResponseFormat, materialPackageName: HSTRING, materialName: HSTRING, challenge: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestUnlockCryptogramMaterialForUseAsync(&self, promptingBehavior: SmartCardUnlockPromptingBehavior, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn DeleteCryptogramMaterialPackageAsync(&self, materialPackageName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn TryProvePossessionOfCryptogramMaterialPackageAsync(&self, promptingBehavior: SmartCardUnlockPromptingBehavior, responseFormat: SmartCardCryptogramMaterialPackageConfirmationResponseFormat, materialPackageName: HSTRING, materialName: HSTRING, challenge: *mut super::super::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestUnlockCryptogramMaterialForUseAsync(&self, promptingBehavior: SmartCardUnlockPromptingBehavior, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn DeleteCryptogramMaterialPackageAsync(&self, materialPackageName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ISmartCardCryptogramGenerator { - #[inline] pub unsafe fn get_supported_cryptogram_material_types(&self) -> Result>> { + #[inline] pub fn get_supported_cryptogram_material_types(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedCryptogramMaterialTypes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_cryptogram_algorithms(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_supported_cryptogram_algorithms(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedCryptogramAlgorithms)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_cryptogram_material_package_formats(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_supported_cryptogram_material_package_formats(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedCryptogramMaterialPackageFormats)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_cryptogram_material_package_confirmation_response_formats(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_supported_cryptogram_material_package_confirmation_response_formats(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedCryptogramMaterialPackageConfirmationResponseFormats)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_smart_card_cryptogram_storage_key_capabilities(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_supported_smart_card_cryptogram_storage_key_capabilities(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedSmartCardCryptogramStorageKeyCapabilities)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete_cryptogram_material_storage_key_async(&self, storageKeyName: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn delete_cryptogram_material_storage_key_async(&self, storageKeyName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteCryptogramMaterialStorageKeyAsync)(self as *const _ as *mut _, storageKeyName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_cryptogram_material_storage_key_async(&self, promptingBehavior: SmartCardUnlockPromptingBehavior, storageKeyName: &HStringArg, algorithm: SmartCardCryptogramStorageKeyAlgorithm, capabilities: SmartCardCryptogramStorageKeyCapabilities) -> Result>> { + }} + #[inline] pub fn create_cryptogram_material_storage_key_async(&self, promptingBehavior: SmartCardUnlockPromptingBehavior, storageKeyName: &HStringArg, algorithm: SmartCardCryptogramStorageKeyAlgorithm, capabilities: SmartCardCryptogramStorageKeyCapabilities) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateCryptogramMaterialStorageKeyAsync)(self as *const _ as *mut _, promptingBehavior, storageKeyName.get(), algorithm, capabilities, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-security")] #[inline] pub unsafe fn request_cryptogram_material_storage_key_info_async(&self, promptingBehavior: SmartCardUnlockPromptingBehavior, storageKeyName: &HStringArg, format: super::super::security::cryptography::core::CryptographicPublicKeyBlobType) -> Result>> { + }} + #[cfg(feature="windows-security")] #[inline] pub fn request_cryptogram_material_storage_key_info_async(&self, promptingBehavior: SmartCardUnlockPromptingBehavior, storageKeyName: &HStringArg, format: super::super::security::cryptography::core::CryptographicPublicKeyBlobType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestCryptogramMaterialStorageKeyInfoAsync)(self as *const _ as *mut _, promptingBehavior, storageKeyName.get(), format, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn import_cryptogram_material_package_async(&self, format: SmartCardCryptogramMaterialPackageFormat, storageKeyName: &HStringArg, materialPackageName: &HStringArg, cryptogramMaterialPackage: &super::super::storage::streams::IBuffer) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn import_cryptogram_material_package_async(&self, format: SmartCardCryptogramMaterialPackageFormat, storageKeyName: &HStringArg, materialPackageName: &HStringArg, cryptogramMaterialPackage: &super::super::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ImportCryptogramMaterialPackageAsync)(self as *const _ as *mut _, format, storageKeyName.get(), materialPackageName.get(), cryptogramMaterialPackage 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_prove_possession_of_cryptogram_material_package_async(&self, promptingBehavior: SmartCardUnlockPromptingBehavior, responseFormat: SmartCardCryptogramMaterialPackageConfirmationResponseFormat, materialPackageName: &HStringArg, materialName: &HStringArg, challenge: &super::super::storage::streams::IBuffer) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn try_prove_possession_of_cryptogram_material_package_async(&self, promptingBehavior: SmartCardUnlockPromptingBehavior, responseFormat: SmartCardCryptogramMaterialPackageConfirmationResponseFormat, materialPackageName: &HStringArg, materialName: &HStringArg, challenge: &super::super::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryProvePossessionOfCryptogramMaterialPackageAsync)(self as *const _ as *mut _, promptingBehavior, responseFormat, materialPackageName.get(), materialName.get(), challenge as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_unlock_cryptogram_material_for_use_async(&self, promptingBehavior: SmartCardUnlockPromptingBehavior) -> Result>> { + }} + #[inline] pub fn request_unlock_cryptogram_material_for_use_async(&self, promptingBehavior: SmartCardUnlockPromptingBehavior) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestUnlockCryptogramMaterialForUseAsync)(self as *const _ as *mut _, promptingBehavior, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete_cryptogram_material_package_async(&self, materialPackageName: &HStringArg) -> Result>> { + }} + #[inline] pub fn delete_cryptogram_material_package_async(&self, materialPackageName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteCryptogramMaterialPackageAsync)(self as *const _ as *mut _, materialPackageName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class SmartCardCryptogramGenerator: ISmartCardCryptogramGenerator} impl RtActivatable for SmartCardCryptogramGenerator {} impl RtActivatable for SmartCardCryptogramGenerator {} impl SmartCardCryptogramGenerator { - #[inline] pub fn get_smart_card_cryptogram_generator_async() -> Result>> { unsafe { + #[inline] pub fn get_smart_card_cryptogram_generator_async() -> Result>> { >::get_activation_factory().get_smart_card_cryptogram_generator_async() - }} - #[inline] pub fn is_supported() -> Result { unsafe { + } + #[inline] pub fn is_supported() -> Result { >::get_activation_factory().is_supported() - }} + } } DEFINE_CLSID!(SmartCardCryptogramGenerator(&[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,67,114,121,112,116,111,103,114,97,109,71,101,110,101,114,97,116,111,114,0]) [CLSID_SmartCardCryptogramGenerator]); DEFINE_IID!(IID_ISmartCardCryptogramGenerator2, 1897310772, 23917, 19274, 150, 163, 239, 164, 125, 42, 126, 37); RT_INTERFACE!{interface ISmartCardCryptogramGenerator2(ISmartCardCryptogramGenerator2Vtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardCryptogramGenerator2] { #[cfg(not(feature="windows-storage"))] fn __Dummy0(&self) -> (), - #[cfg(feature="windows-storage")] fn ValidateRequestApduAsync(&self, promptingBehavior: SmartCardUnlockPromptingBehavior, apduToValidate: *mut super::super::storage::streams::IBuffer, cryptogramPlacementSteps: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetAllCryptogramStorageKeyCharacteristicsAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetAllCryptogramMaterialPackageCharacteristicsAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetAllCryptogramMaterialPackageCharacteristicsWithStorageKeyAsync(&self, storageKeyName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetAllCryptogramMaterialCharacteristicsAsync(&self, promptingBehavior: SmartCardUnlockPromptingBehavior, materialPackageName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn ValidateRequestApduAsync(&self, promptingBehavior: SmartCardUnlockPromptingBehavior, apduToValidate: *mut super::super::storage::streams::IBuffer, cryptogramPlacementSteps: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetAllCryptogramStorageKeyCharacteristicsAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetAllCryptogramMaterialPackageCharacteristicsAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetAllCryptogramMaterialPackageCharacteristicsWithStorageKeyAsync(&self, storageKeyName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetAllCryptogramMaterialCharacteristicsAsync(&self, promptingBehavior: SmartCardUnlockPromptingBehavior, materialPackageName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ISmartCardCryptogramGenerator2 { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn validate_request_apdu_async(&self, promptingBehavior: SmartCardUnlockPromptingBehavior, apduToValidate: &super::super::storage::streams::IBuffer, cryptogramPlacementSteps: &super::super::foundation::collections::IIterable) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn validate_request_apdu_async(&self, promptingBehavior: SmartCardUnlockPromptingBehavior, apduToValidate: &super::super::storage::streams::IBuffer, cryptogramPlacementSteps: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ValidateRequestApduAsync)(self as *const _ as *mut _, promptingBehavior, apduToValidate as *const _ as *mut _, cryptogramPlacementSteps as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_all_cryptogram_storage_key_characteristics_async(&self) -> Result>> { + }} + #[inline] pub fn get_all_cryptogram_storage_key_characteristics_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAllCryptogramStorageKeyCharacteristicsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_all_cryptogram_material_package_characteristics_async(&self) -> Result>> { + }} + #[inline] pub fn get_all_cryptogram_material_package_characteristics_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAllCryptogramMaterialPackageCharacteristicsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_all_cryptogram_material_package_characteristics_with_storage_key_async(&self, storageKeyName: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_all_cryptogram_material_package_characteristics_with_storage_key_async(&self, storageKeyName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAllCryptogramMaterialPackageCharacteristicsWithStorageKeyAsync)(self as *const _ as *mut _, storageKeyName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_all_cryptogram_material_characteristics_async(&self, promptingBehavior: SmartCardUnlockPromptingBehavior, materialPackageName: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_all_cryptogram_material_characteristics_async(&self, promptingBehavior: SmartCardUnlockPromptingBehavior, materialPackageName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAllCryptogramMaterialCharacteristicsAsync)(self as *const _ as *mut _, promptingBehavior, materialPackageName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum SmartCardCryptogramGeneratorOperationStatus: i32 { Success (SmartCardCryptogramGeneratorOperationStatus_Success) = 0, AuthorizationFailed (SmartCardCryptogramGeneratorOperationStatus_AuthorizationFailed) = 1, AuthorizationCanceled (SmartCardCryptogramGeneratorOperationStatus_AuthorizationCanceled) = 2, AuthorizationRequired (SmartCardCryptogramGeneratorOperationStatus_AuthorizationRequired) = 3, CryptogramMaterialPackageStorageKeyExists (SmartCardCryptogramGeneratorOperationStatus_CryptogramMaterialPackageStorageKeyExists) = 4, NoCryptogramMaterialPackageStorageKey (SmartCardCryptogramGeneratorOperationStatus_NoCryptogramMaterialPackageStorageKey) = 5, NoCryptogramMaterialPackage (SmartCardCryptogramGeneratorOperationStatus_NoCryptogramMaterialPackage) = 6, UnsupportedCryptogramMaterialPackage (SmartCardCryptogramGeneratorOperationStatus_UnsupportedCryptogramMaterialPackage) = 7, UnknownCryptogramMaterialName (SmartCardCryptogramGeneratorOperationStatus_UnknownCryptogramMaterialName) = 8, InvalidCryptogramMaterialUsage (SmartCardCryptogramGeneratorOperationStatus_InvalidCryptogramMaterialUsage) = 9, ApduResponseNotSent (SmartCardCryptogramGeneratorOperationStatus_ApduResponseNotSent) = 10, OtherError (SmartCardCryptogramGeneratorOperationStatus_OtherError) = 11, ValidationFailed (SmartCardCryptogramGeneratorOperationStatus_ValidationFailed) = 12, NotSupported (SmartCardCryptogramGeneratorOperationStatus_NotSupported) = 13, }} DEFINE_IID!(IID_ISmartCardCryptogramGeneratorStatics, 160643344, 52124, 16405, 150, 125, 82, 52, 243, 176, 41, 0); RT_INTERFACE!{static interface ISmartCardCryptogramGeneratorStatics(ISmartCardCryptogramGeneratorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardCryptogramGeneratorStatics] { - fn GetSmartCardCryptogramGeneratorAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetSmartCardCryptogramGeneratorAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ISmartCardCryptogramGeneratorStatics { - #[inline] pub unsafe fn get_smart_card_cryptogram_generator_async(&self) -> Result>> { + #[inline] pub fn get_smart_card_cryptogram_generator_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSmartCardCryptogramGeneratorAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ISmartCardCryptogramGeneratorStatics2, 163444197, 46269, 20003, 165, 136, 116, 70, 146, 4, 193, 40); RT_INTERFACE!{static interface ISmartCardCryptogramGeneratorStatics2(ISmartCardCryptogramGeneratorStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardCryptogramGeneratorStatics2] { fn IsSupported(&self, out: *mut bool) -> HRESULT }} impl ISmartCardCryptogramGeneratorStatics2 { - #[inline] pub unsafe fn is_supported(&self) -> Result { + #[inline] pub fn is_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ISmartCardCryptogramGetAllCryptogramMaterialCharacteristicsResult, 664330281, 54919, 19602, 134, 198, 57, 158, 154, 14, 203, 9); RT_INTERFACE!{interface ISmartCardCryptogramGetAllCryptogramMaterialCharacteristicsResult(ISmartCardCryptogramGetAllCryptogramMaterialCharacteristicsResultVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardCryptogramGetAllCryptogramMaterialCharacteristicsResult] { fn get_OperationStatus(&self, out: *mut SmartCardCryptogramGeneratorOperationStatus) -> HRESULT, - fn get_Characteristics(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_Characteristics(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl ISmartCardCryptogramGetAllCryptogramMaterialCharacteristicsResult { - #[inline] pub unsafe fn get_operation_status(&self) -> Result { + #[inline] pub fn get_operation_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OperationStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_characteristics(&self) -> Result>> { + }} + #[inline] pub fn get_characteristics(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Characteristics)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SmartCardCryptogramGetAllCryptogramMaterialCharacteristicsResult: ISmartCardCryptogramGetAllCryptogramMaterialCharacteristicsResult} impl RtActivatable for SmartCardCryptogramGetAllCryptogramMaterialCharacteristicsResult {} @@ -2694,19 +2694,19 @@ DEFINE_CLSID!(SmartCardCryptogramGetAllCryptogramMaterialCharacteristicsResult(& DEFINE_IID!(IID_ISmartCardCryptogramGetAllCryptogramMaterialPackageCharacteristicsResult, 1315605084, 38771, 18116, 163, 47, 177, 229, 67, 21, 158, 4); RT_INTERFACE!{interface ISmartCardCryptogramGetAllCryptogramMaterialPackageCharacteristicsResult(ISmartCardCryptogramGetAllCryptogramMaterialPackageCharacteristicsResultVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardCryptogramGetAllCryptogramMaterialPackageCharacteristicsResult] { fn get_OperationStatus(&self, out: *mut SmartCardCryptogramGeneratorOperationStatus) -> HRESULT, - fn get_Characteristics(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_Characteristics(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl ISmartCardCryptogramGetAllCryptogramMaterialPackageCharacteristicsResult { - #[inline] pub unsafe fn get_operation_status(&self) -> Result { + #[inline] pub fn get_operation_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OperationStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_characteristics(&self) -> Result>> { + }} + #[inline] pub fn get_characteristics(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Characteristics)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SmartCardCryptogramGetAllCryptogramMaterialPackageCharacteristicsResult: ISmartCardCryptogramGetAllCryptogramMaterialPackageCharacteristicsResult} impl RtActivatable for SmartCardCryptogramGetAllCryptogramMaterialPackageCharacteristicsResult {} @@ -2714,19 +2714,19 @@ DEFINE_CLSID!(SmartCardCryptogramGetAllCryptogramMaterialPackageCharacteristicsR DEFINE_IID!(IID_ISmartCardCryptogramGetAllCryptogramStorageKeyCharacteristicsResult, 2356996183, 42983, 18589, 185, 214, 54, 128, 97, 81, 80, 18); RT_INTERFACE!{interface ISmartCardCryptogramGetAllCryptogramStorageKeyCharacteristicsResult(ISmartCardCryptogramGetAllCryptogramStorageKeyCharacteristicsResultVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardCryptogramGetAllCryptogramStorageKeyCharacteristicsResult] { fn get_OperationStatus(&self, out: *mut SmartCardCryptogramGeneratorOperationStatus) -> HRESULT, - fn get_Characteristics(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_Characteristics(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl ISmartCardCryptogramGetAllCryptogramStorageKeyCharacteristicsResult { - #[inline] pub unsafe fn get_operation_status(&self) -> Result { + #[inline] pub fn get_operation_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OperationStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_characteristics(&self) -> Result>> { + }} + #[inline] pub fn get_characteristics(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Characteristics)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SmartCardCryptogramGetAllCryptogramStorageKeyCharacteristicsResult: ISmartCardCryptogramGetAllCryptogramStorageKeyCharacteristicsResult} impl RtActivatable for SmartCardCryptogramGetAllCryptogramStorageKeyCharacteristicsResult {} @@ -2734,55 +2734,55 @@ DEFINE_CLSID!(SmartCardCryptogramGetAllCryptogramStorageKeyCharacteristicsResult DEFINE_IID!(IID_ISmartCardCryptogramMaterialCharacteristics, 4238001612, 49623, 16723, 146, 59, 162, 212, 60, 108, 141, 73); RT_INTERFACE!{interface ISmartCardCryptogramMaterialCharacteristics(ISmartCardCryptogramMaterialCharacteristicsVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardCryptogramMaterialCharacteristics] { fn get_MaterialName(&self, out: *mut HSTRING) -> HRESULT, - fn get_AllowedAlgorithms(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_AllowedProofOfPossessionAlgorithms(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_AllowedValidations(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_AllowedAlgorithms(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_AllowedProofOfPossessionAlgorithms(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_AllowedValidations(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_MaterialType(&self, out: *mut SmartCardCryptogramMaterialType) -> HRESULT, fn get_ProtectionMethod(&self, out: *mut SmartCardCryptogramMaterialProtectionMethod) -> HRESULT, fn get_ProtectionVersion(&self, out: *mut i32) -> HRESULT, fn get_MaterialLength(&self, out: *mut i32) -> HRESULT }} impl ISmartCardCryptogramMaterialCharacteristics { - #[inline] pub unsafe fn get_material_name(&self) -> Result { + #[inline] pub fn get_material_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaterialName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_allowed_algorithms(&self) -> Result>> { + }} + #[inline] pub fn get_allowed_algorithms(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AllowedAlgorithms)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_allowed_proof_of_possession_algorithms(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_allowed_proof_of_possession_algorithms(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AllowedProofOfPossessionAlgorithms)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_allowed_validations(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_allowed_validations(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AllowedValidations)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_material_type(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_material_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaterialType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_protection_method(&self) -> Result { + }} + #[inline] pub fn get_protection_method(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProtectionMethod)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_protection_version(&self) -> Result { + }} + #[inline] pub fn get_protection_version(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProtectionVersion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_material_length(&self) -> Result { + }} + #[inline] pub fn get_material_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaterialLength)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SmartCardCryptogramMaterialCharacteristics: ISmartCardCryptogramMaterialCharacteristics} impl RtActivatable for SmartCardCryptogramMaterialCharacteristics {} @@ -2791,30 +2791,30 @@ DEFINE_IID!(IID_ISmartCardCryptogramMaterialPackageCharacteristics, 4290088479, RT_INTERFACE!{interface ISmartCardCryptogramMaterialPackageCharacteristics(ISmartCardCryptogramMaterialPackageCharacteristicsVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardCryptogramMaterialPackageCharacteristics] { fn get_PackageName(&self, out: *mut HSTRING) -> HRESULT, fn get_StorageKeyName(&self, out: *mut HSTRING) -> HRESULT, - fn get_DateImported(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_DateImported(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_PackageFormat(&self, out: *mut SmartCardCryptogramMaterialPackageFormat) -> HRESULT }} impl ISmartCardCryptogramMaterialPackageCharacteristics { - #[inline] pub unsafe fn get_package_name(&self) -> Result { + #[inline] pub fn get_package_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PackageName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_storage_key_name(&self) -> Result { + }} + #[inline] pub fn get_storage_key_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StorageKeyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_date_imported(&self) -> Result { + }} + #[inline] pub fn get_date_imported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DateImported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_package_format(&self) -> Result { + }} + #[inline] pub fn get_package_format(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PackageFormat)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SmartCardCryptogramMaterialPackageCharacteristics: ISmartCardCryptogramMaterialPackageCharacteristics} impl RtActivatable for SmartCardCryptogramMaterialPackageCharacteristics {} @@ -2831,16 +2831,16 @@ RT_INTERFACE!{interface ISmartCardCryptogramMaterialPossessionProof(ISmartCardCr #[cfg(feature="windows-storage")] fn get_Proof(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT }} impl ISmartCardCryptogramMaterialPossessionProof { - #[inline] pub unsafe fn get_operation_status(&self) -> Result { + #[inline] pub fn get_operation_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OperationStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_proof(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_proof(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Proof)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SmartCardCryptogramMaterialPossessionProof: ISmartCardCryptogramMaterialPossessionProof} RT_ENUM! { enum SmartCardCryptogramMaterialProtectionMethod: i32 { @@ -2876,87 +2876,87 @@ RT_INTERFACE!{interface ISmartCardCryptogramPlacementStep(ISmartCardCryptogramPl fn put_ChainedOutputStep(&self, value: *mut SmartCardCryptogramPlacementStep) -> HRESULT }} impl ISmartCardCryptogramPlacementStep { - #[inline] pub unsafe fn get_algorithm(&self) -> Result { + #[inline] pub fn get_algorithm(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Algorithm)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_algorithm(&self, value: SmartCardCryptogramAlgorithm) -> Result<()> { + }} + #[inline] pub fn set_algorithm(&self, value: SmartCardCryptogramAlgorithm) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Algorithm)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_source_data(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_source_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SourceData)(self 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_source_data(&self, value: &super::super::storage::streams::IBuffer) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_source_data(&self, value: &super::super::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SourceData)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_cryptogram_material_package_name(&self) -> Result { + }} + #[inline] pub fn get_cryptogram_material_package_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CryptogramMaterialPackageName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_cryptogram_material_package_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_cryptogram_material_package_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CryptogramMaterialPackageName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_cryptogram_material_name(&self) -> Result { + }} + #[inline] pub fn get_cryptogram_material_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CryptogramMaterialName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_cryptogram_material_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_cryptogram_material_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CryptogramMaterialName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_template_offset(&self) -> Result { + }} + #[inline] pub fn get_template_offset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TemplateOffset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_template_offset(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_template_offset(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TemplateOffset)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_cryptogram_offset(&self) -> Result { + }} + #[inline] pub fn get_cryptogram_offset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CryptogramOffset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_cryptogram_offset(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_cryptogram_offset(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CryptogramOffset)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_cryptogram_length(&self) -> Result { + }} + #[inline] pub fn get_cryptogram_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CryptogramLength)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_cryptogram_length(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_cryptogram_length(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CryptogramLength)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_cryptogram_placement_options(&self) -> Result { + }} + #[inline] pub fn get_cryptogram_placement_options(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CryptogramPlacementOptions)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_cryptogram_placement_options(&self, value: SmartCardCryptogramPlacementOptions) -> Result<()> { + }} + #[inline] pub fn set_cryptogram_placement_options(&self, value: SmartCardCryptogramPlacementOptions) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CryptogramPlacementOptions)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_chained_output_step(&self) -> Result> { + }} + #[inline] pub fn get_chained_output_step(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ChainedOutputStep)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_chained_output_step(&self, value: &SmartCardCryptogramPlacementStep) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_chained_output_step(&self, value: &SmartCardCryptogramPlacementStep) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ChainedOutputStep)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SmartCardCryptogramPlacementStep: ISmartCardCryptogramPlacementStep} impl RtActivatable for SmartCardCryptogramPlacementStep {} @@ -2970,31 +2970,31 @@ RT_ENUM! { enum SmartCardCryptogramStorageKeyCapabilities: u32 { DEFINE_IID!(IID_ISmartCardCryptogramStorageKeyCharacteristics, 2236765294, 17495, 18469, 180, 100, 99, 84, 113, 163, 159, 92); RT_INTERFACE!{interface ISmartCardCryptogramStorageKeyCharacteristics(ISmartCardCryptogramStorageKeyCharacteristicsVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardCryptogramStorageKeyCharacteristics] { fn get_StorageKeyName(&self, out: *mut HSTRING) -> HRESULT, - fn get_DateCreated(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_DateCreated(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_Algorithm(&self, out: *mut SmartCardCryptogramStorageKeyAlgorithm) -> HRESULT, fn get_Capabilities(&self, out: *mut SmartCardCryptogramStorageKeyCapabilities) -> HRESULT }} impl ISmartCardCryptogramStorageKeyCharacteristics { - #[inline] pub unsafe fn get_storage_key_name(&self) -> Result { + #[inline] pub fn get_storage_key_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StorageKeyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_date_created(&self) -> Result { + }} + #[inline] pub fn get_date_created(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DateCreated)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_algorithm(&self) -> Result { + }} + #[inline] pub fn get_algorithm(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Algorithm)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_capabilities(&self) -> Result { + }} + #[inline] pub fn get_capabilities(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Capabilities)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SmartCardCryptogramStorageKeyCharacteristics: ISmartCardCryptogramStorageKeyCharacteristics} impl RtActivatable for SmartCardCryptogramStorageKeyCharacteristics {} @@ -3014,41 +3014,41 @@ RT_INTERFACE!{interface ISmartCardCryptogramStorageKeyInfo(ISmartCardCryptogramS fn get_Capabilities(&self, out: *mut SmartCardCryptogramStorageKeyCapabilities) -> HRESULT }} impl ISmartCardCryptogramStorageKeyInfo { - #[inline] pub unsafe fn get_operation_status(&self) -> Result { + #[inline] pub fn get_operation_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OperationStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-security")] #[inline] pub unsafe fn get_public_key_blob_type(&self) -> Result { + }} + #[cfg(feature="windows-security")] #[inline] pub fn get_public_key_blob_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PublicKeyBlobType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_public_key(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_public_key(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PublicKey)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_attestation_status(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_attestation_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AttestationStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_attestation(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_attestation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Attestation)(self 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_attestation_certificate_chain(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_attestation_certificate_chain(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AttestationCertificateChain)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_capabilities(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_capabilities(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Capabilities)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SmartCardCryptogramStorageKeyInfo: ISmartCardCryptogramStorageKeyInfo} DEFINE_IID!(IID_ISmartCardCryptogramStorageKeyInfo2, 278777, 63485, 16765, 137, 225, 251, 176, 56, 42, 220, 77); @@ -3056,11 +3056,11 @@ RT_INTERFACE!{interface ISmartCardCryptogramStorageKeyInfo2(ISmartCardCryptogram fn get_OperationalRequirements(&self, out: *mut HSTRING) -> HRESULT }} impl ISmartCardCryptogramStorageKeyInfo2 { - #[inline] pub unsafe fn get_operational_requirements(&self) -> Result { + #[inline] pub fn get_operational_requirements(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OperationalRequirements)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum SmartCardCryptographicKeyAttestationStatus: i32 { NoAttestation (SmartCardCryptographicKeyAttestationStatus_NoAttestation) = 0, SoftwareKeyWithoutTpm (SmartCardCryptographicKeyAttestationStatus_SoftwareKeyWithoutTpm) = 1, SoftwareKeyWithTpm (SmartCardCryptographicKeyAttestationStatus_SoftwareKeyWithTpm) = 2, TpmKeyUnknownAttestationStatus (SmartCardCryptographicKeyAttestationStatus_TpmKeyUnknownAttestationStatus) = 3, TpmKeyWithoutAttestationCapability (SmartCardCryptographicKeyAttestationStatus_TpmKeyWithoutAttestationCapability) = 4, TpmKeyWithTemporaryAttestationFailure (SmartCardCryptographicKeyAttestationStatus_TpmKeyWithTemporaryAttestationFailure) = 5, TpmKeyWithLongTermAttestationFailure (SmartCardCryptographicKeyAttestationStatus_TpmKeyWithLongTermAttestationFailure) = 6, TpmKeyWithAttestation (SmartCardCryptographicKeyAttestationStatus_TpmKeyWithAttestation) = 7, @@ -3076,74 +3076,74 @@ RT_INTERFACE!{interface ISmartCardEmulator(ISmartCardEmulatorVtbl): IInspectable fn get_EnablementPolicy(&self, out: *mut SmartCardEmulatorEnablementPolicy) -> HRESULT }} impl ISmartCardEmulator { - #[inline] pub unsafe fn get_enablement_policy(&self) -> Result { + #[inline] pub fn get_enablement_policy(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EnablementPolicy)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SmartCardEmulator: ISmartCardEmulator} impl RtActivatable for SmartCardEmulator {} impl RtActivatable for SmartCardEmulator {} impl RtActivatable for SmartCardEmulator {} impl SmartCardEmulator { - #[inline] pub fn get_default_async() -> Result>> { unsafe { + #[inline] pub fn get_default_async() -> Result>> { >::get_activation_factory().get_default_async() - }} - #[inline] pub fn get_applet_id_group_registrations_async() -> Result>>> { unsafe { + } + #[inline] pub fn get_applet_id_group_registrations_async() -> Result>>> { >::get_activation_factory().get_applet_id_group_registrations_async() - }} - #[inline] pub fn register_applet_id_group_async(appletIdGroup: &SmartCardAppletIdGroup) -> Result>> { unsafe { + } + #[inline] pub fn register_applet_id_group_async(appletIdGroup: &SmartCardAppletIdGroup) -> Result>> { >::get_activation_factory().register_applet_id_group_async(appletIdGroup) - }} - #[inline] pub fn unregister_applet_id_group_async(registration: &SmartCardAppletIdGroupRegistration) -> Result> { unsafe { + } + #[inline] pub fn unregister_applet_id_group_async(registration: &SmartCardAppletIdGroupRegistration) -> Result> { >::get_activation_factory().unregister_applet_id_group_async(registration) - }} - #[inline] pub fn get_max_applet_id_group_registrations() -> Result { unsafe { + } + #[inline] pub fn get_max_applet_id_group_registrations() -> Result { >::get_activation_factory().get_max_applet_id_group_registrations() - }} - #[inline] pub fn is_supported() -> Result { unsafe { + } + #[inline] pub fn is_supported() -> Result { >::get_activation_factory().is_supported() - }} + } } DEFINE_CLSID!(SmartCardEmulator(&[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,69,109,117,108,97,116,111,114,0]) [CLSID_SmartCardEmulator]); DEFINE_IID!(IID_ISmartCardEmulator2, 4265590968, 34089, 16666, 128, 123, 72, 237, 194, 160, 171, 68); RT_INTERFACE!{interface ISmartCardEmulator2(ISmartCardEmulator2Vtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardEmulator2] { - fn add_ApduReceived(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ApduReceived(&self, value: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ConnectionDeactivated(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ConnectionDeactivated(&self, value: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ApduReceived(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ApduReceived(&self, value: foundation::EventRegistrationToken) -> HRESULT, + fn add_ConnectionDeactivated(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ConnectionDeactivated(&self, value: foundation::EventRegistrationToken) -> HRESULT, fn Start(&self) -> HRESULT, fn IsHostCardEmulationSupported(&self, out: *mut bool) -> HRESULT }} impl ISmartCardEmulator2 { - #[inline] pub unsafe fn add_apdu_received(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_apdu_received(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ApduReceived)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_apdu_received(&self, value: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_apdu_received(&self, value: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ApduReceived)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_connection_deactivated(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_connection_deactivated(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ConnectionDeactivated)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_connection_deactivated(&self, value: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_connection_deactivated(&self, value: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ConnectionDeactivated)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn is_host_card_emulation_supported(&self) -> Result { + }} + #[inline] pub fn is_host_card_emulation_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsHostCardEmulationSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ISmartCardEmulatorApduReceivedEventArgs, 3579647350, 27090, 21299, 91, 95, 248, 192, 214, 233, 240, 159); RT_INTERFACE!{interface ISmartCardEmulatorApduReceivedEventArgs(ISmartCardEmulatorApduReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardEmulatorApduReceivedEventArgs] { @@ -3151,65 +3151,65 @@ RT_INTERFACE!{interface ISmartCardEmulatorApduReceivedEventArgs(ISmartCardEmulat #[cfg(feature="windows-storage")] fn get_CommandApdu(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, fn get_ConnectionProperties(&self, out: *mut *mut SmartCardEmulatorConnectionProperties) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy2(&self) -> (), - #[cfg(feature="windows-storage")] fn TryRespondAsync(&self, responseApdu: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn TryRespondAsync(&self, responseApdu: *mut super::super::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn get_AutomaticResponseStatus(&self, out: *mut SmartCardAutomaticResponseStatus) -> HRESULT }} impl ISmartCardEmulatorApduReceivedEventArgs { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_command_apdu(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_command_apdu(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CommandApdu)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_connection_properties(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_connection_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ConnectionProperties)(self 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_respond_async(&self, responseApdu: &super::super::storage::streams::IBuffer) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn try_respond_async(&self, responseApdu: &super::super::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryRespondAsync)(self as *const _ as *mut _, responseApdu as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_automatic_response_status(&self) -> Result { + }} + #[inline] pub fn get_automatic_response_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AutomaticResponseStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SmartCardEmulatorApduReceivedEventArgs: ISmartCardEmulatorApduReceivedEventArgs} DEFINE_IID!(IID_ISmartCardEmulatorApduReceivedEventArgs2, 2348367344, 8929, 16952, 134, 16, 148, 206, 74, 150, 84, 37); RT_INTERFACE!{interface ISmartCardEmulatorApduReceivedEventArgs2(ISmartCardEmulatorApduReceivedEventArgs2Vtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardEmulatorApduReceivedEventArgs2] { fn get_State(&self, out: *mut u32) -> HRESULT, - #[cfg(feature="windows-storage")] fn TryRespondWithStateAsync(&self, responseApdu: *mut super::super::storage::streams::IBuffer, nextState: *mut super::super::foundation::IReference, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn TryRespondWithStateAsync(&self, responseApdu: *mut super::super::storage::streams::IBuffer, nextState: *mut foundation::IReference, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ISmartCardEmulatorApduReceivedEventArgs2 { - #[inline] pub unsafe fn get_state(&self) -> Result { + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn try_respond_with_state_async(&self, responseApdu: &super::super::storage::streams::IBuffer, nextState: &super::super::foundation::IReference) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn try_respond_with_state_async(&self, responseApdu: &super::super::storage::streams::IBuffer, nextState: &foundation::IReference) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryRespondWithStateAsync)(self as *const _ as *mut _, responseApdu as *const _ as *mut _, nextState as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ISmartCardEmulatorApduReceivedEventArgsWithCryptograms, 3578837703, 47039, 20009, 146, 148, 12, 74, 195, 201, 65, 189); RT_INTERFACE!{interface ISmartCardEmulatorApduReceivedEventArgsWithCryptograms(ISmartCardEmulatorApduReceivedEventArgsWithCryptogramsVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardEmulatorApduReceivedEventArgsWithCryptograms] { - #[cfg(feature="windows-storage")] fn TryRespondWithCryptogramsAsync(&self, responseTemplate: *mut super::super::storage::streams::IBuffer, cryptogramPlacementSteps: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn TryRespondWithCryptogramsAndStateAsync(&self, responseTemplate: *mut super::super::storage::streams::IBuffer, cryptogramPlacementSteps: *mut super::super::foundation::collections::IIterable, nextState: *mut super::super::foundation::IReference, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn TryRespondWithCryptogramsAsync(&self, responseTemplate: *mut super::super::storage::streams::IBuffer, cryptogramPlacementSteps: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn TryRespondWithCryptogramsAndStateAsync(&self, responseTemplate: *mut super::super::storage::streams::IBuffer, cryptogramPlacementSteps: *mut foundation::collections::IIterable, nextState: *mut foundation::IReference, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ISmartCardEmulatorApduReceivedEventArgsWithCryptograms { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn try_respond_with_cryptograms_async(&self, responseTemplate: &super::super::storage::streams::IBuffer, cryptogramPlacementSteps: &super::super::foundation::collections::IIterable) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn try_respond_with_cryptograms_async(&self, responseTemplate: &super::super::storage::streams::IBuffer, cryptogramPlacementSteps: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryRespondWithCryptogramsAsync)(self as *const _ as *mut _, responseTemplate as *const _ as *mut _, cryptogramPlacementSteps 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_respond_with_cryptograms_and_state_async(&self, responseTemplate: &super::super::storage::streams::IBuffer, cryptogramPlacementSteps: &super::super::foundation::collections::IIterable, nextState: &super::super::foundation::IReference) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn try_respond_with_cryptograms_and_state_async(&self, responseTemplate: &super::super::storage::streams::IBuffer, cryptogramPlacementSteps: &foundation::collections::IIterable, nextState: &foundation::IReference) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryRespondWithCryptogramsAndStateAsync)(self as *const _ as *mut _, responseTemplate as *const _ as *mut _, cryptogramPlacementSteps as *const _ as *mut _, nextState as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ISmartCardEmulatorConnectionDeactivatedEventArgs, 562485459, 50667, 21090, 67, 223, 98, 160, 161, 181, 85, 87); RT_INTERFACE!{interface ISmartCardEmulatorConnectionDeactivatedEventArgs(ISmartCardEmulatorConnectionDeactivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardEmulatorConnectionDeactivatedEventArgs] { @@ -3217,16 +3217,16 @@ RT_INTERFACE!{interface ISmartCardEmulatorConnectionDeactivatedEventArgs(ISmartC fn get_Reason(&self, out: *mut SmartCardEmulatorConnectionDeactivatedReason) -> HRESULT }} impl ISmartCardEmulatorConnectionDeactivatedEventArgs { - #[inline] pub unsafe fn get_connection_properties(&self) -> Result> { + #[inline] pub fn get_connection_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ConnectionProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_reason(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_reason(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Reason)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SmartCardEmulatorConnectionDeactivatedEventArgs: ISmartCardEmulatorConnectionDeactivatedEventArgs} RT_ENUM! { enum SmartCardEmulatorConnectionDeactivatedReason: i32 { @@ -3238,16 +3238,16 @@ RT_INTERFACE!{interface ISmartCardEmulatorConnectionProperties(ISmartCardEmulato fn get_Source(&self, out: *mut SmartCardEmulatorConnectionSource) -> HRESULT }} impl ISmartCardEmulatorConnectionProperties { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_source(&self) -> Result { + }} + #[inline] pub fn get_source(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Source)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SmartCardEmulatorConnectionProperties: ISmartCardEmulatorConnectionProperties} RT_ENUM! { enum SmartCardEmulatorConnectionSource: i32 { @@ -3258,54 +3258,54 @@ RT_ENUM! { enum SmartCardEmulatorEnablementPolicy: i32 { }} DEFINE_IID!(IID_ISmartCardEmulatorStatics, 2057043019, 50387, 18767, 184, 162, 98, 21, 216, 30, 133, 178); RT_INTERFACE!{static interface ISmartCardEmulatorStatics(ISmartCardEmulatorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardEmulatorStatics] { - fn GetDefaultAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetDefaultAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ISmartCardEmulatorStatics { - #[inline] pub unsafe fn get_default_async(&self) -> Result>> { + #[inline] pub fn get_default_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefaultAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ISmartCardEmulatorStatics2, 1773051786, 46965, 18571, 132, 54, 108, 30, 40, 237, 115, 31); RT_INTERFACE!{static interface ISmartCardEmulatorStatics2(ISmartCardEmulatorStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardEmulatorStatics2] { - fn GetAppletIdGroupRegistrationsAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn RegisterAppletIdGroupAsync(&self, appletIdGroup: *mut SmartCardAppletIdGroup, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn UnregisterAppletIdGroupAsync(&self, registration: *mut SmartCardAppletIdGroupRegistration, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn GetAppletIdGroupRegistrationsAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn RegisterAppletIdGroupAsync(&self, appletIdGroup: *mut SmartCardAppletIdGroup, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn UnregisterAppletIdGroupAsync(&self, registration: *mut SmartCardAppletIdGroupRegistration, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn get_MaxAppletIdGroupRegistrations(&self, out: *mut u16) -> HRESULT }} impl ISmartCardEmulatorStatics2 { - #[inline] pub unsafe fn get_applet_id_group_registrations_async(&self) -> Result>>> { + #[inline] pub fn get_applet_id_group_registrations_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAppletIdGroupRegistrationsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn register_applet_id_group_async(&self, appletIdGroup: &SmartCardAppletIdGroup) -> Result>> { + }} + #[inline] pub fn register_applet_id_group_async(&self, appletIdGroup: &SmartCardAppletIdGroup) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RegisterAppletIdGroupAsync)(self as *const _ as *mut _, appletIdGroup as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn unregister_applet_id_group_async(&self, registration: &SmartCardAppletIdGroupRegistration) -> Result> { + }} + #[inline] pub fn unregister_applet_id_group_async(&self, registration: &SmartCardAppletIdGroupRegistration) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UnregisterAppletIdGroupAsync)(self as *const _ as *mut _, registration as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_applet_id_group_registrations(&self) -> Result { + }} + #[inline] pub fn get_max_applet_id_group_registrations(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxAppletIdGroupRegistrations)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ISmartCardEmulatorStatics3, 1508512810, 40713, 17397, 133, 101, 207, 168, 20, 142, 76, 178); RT_INTERFACE!{static interface ISmartCardEmulatorStatics3(ISmartCardEmulatorStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardEmulatorStatics3] { fn IsSupported(&self, out: *mut bool) -> HRESULT }} impl ISmartCardEmulatorStatics3 { - #[inline] pub unsafe fn is_supported(&self) -> Result { + #[inline] pub fn is_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum SmartCardLaunchBehavior: i32 { Default (SmartCardLaunchBehavior_Default) = 0, AboveLock (SmartCardLaunchBehavior_AboveLock) = 1, @@ -3329,60 +3329,60 @@ RT_INTERFACE!{interface ISmartCardPinPolicy(ISmartCardPinPolicyVtbl): IInspectab fn put_SpecialCharacters(&self, value: SmartCardPinCharacterPolicyOption) -> HRESULT }} impl ISmartCardPinPolicy { - #[inline] pub unsafe fn get_min_length(&self) -> Result { + #[inline] pub fn get_min_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinLength)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_min_length(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_min_length(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MinLength)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_length(&self) -> Result { + }} + #[inline] pub fn get_max_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxLength)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_length(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_max_length(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxLength)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_uppercase_letters(&self) -> Result { + }} + #[inline] pub fn get_uppercase_letters(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UppercaseLetters)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_uppercase_letters(&self, value: SmartCardPinCharacterPolicyOption) -> Result<()> { + }} + #[inline] pub fn set_uppercase_letters(&self, value: SmartCardPinCharacterPolicyOption) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_UppercaseLetters)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_lowercase_letters(&self) -> Result { + }} + #[inline] pub fn get_lowercase_letters(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LowercaseLetters)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_lowercase_letters(&self, value: SmartCardPinCharacterPolicyOption) -> Result<()> { + }} + #[inline] pub fn set_lowercase_letters(&self, value: SmartCardPinCharacterPolicyOption) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LowercaseLetters)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_digits(&self) -> Result { + }} + #[inline] pub fn get_digits(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Digits)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_digits(&self, value: SmartCardPinCharacterPolicyOption) -> Result<()> { + }} + #[inline] pub fn set_digits(&self, value: SmartCardPinCharacterPolicyOption) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Digits)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_special_characters(&self) -> Result { + }} + #[inline] pub fn get_special_characters(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SpecialCharacters)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_special_characters(&self, value: SmartCardPinCharacterPolicyOption) -> Result<()> { + }} + #[inline] pub fn set_special_characters(&self, value: SmartCardPinCharacterPolicyOption) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SpecialCharacters)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SmartCardPinPolicy: ISmartCardPinPolicy} impl RtActivatable for SmartCardPinPolicy {} @@ -3392,10 +3392,10 @@ RT_INTERFACE!{interface ISmartCardPinResetDeferral(ISmartCardPinResetDeferralVtb fn Complete(&self) -> HRESULT }} impl ISmartCardPinResetDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SmartCardPinResetDeferral: ISmartCardPinResetDeferral} DEFINE_IID!(IID_SmartCardPinResetHandler, 328031808, 62396, 19036, 180, 29, 75, 78, 246, 132, 226, 55); @@ -3403,233 +3403,233 @@ RT_DELEGATE!{delegate SmartCardPinResetHandler(SmartCardPinResetHandlerVtbl, Sma fn Invoke(&self, sender: *mut SmartCardProvisioning, request: *mut SmartCardPinResetRequest) -> HRESULT }} impl SmartCardPinResetHandler { - #[inline] pub unsafe fn invoke(&self, sender: &SmartCardProvisioning, request: &SmartCardPinResetRequest) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &SmartCardProvisioning, request: &SmartCardPinResetRequest) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, request as *const _ as *mut _); if hr == S_OK { Ok(()) } 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(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, - fn get_Deadline(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Deadline(&self, out: *mut foundation::DateTime) -> HRESULT, fn GetDeferral(&self, out: *mut *mut SmartCardPinResetDeferral) -> HRESULT, #[cfg(feature="windows-storage")] fn SetResponse(&self, response: *mut super::super::storage::streams::IBuffer) -> HRESULT }} impl ISmartCardPinResetRequest { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_challenge(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_challenge(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Challenge)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deadline(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deadline(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Deadline)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self 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_response(&self, response: &super::super::storage::streams::IBuffer) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_response(&self, response: &super::super::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetResponse)(self as *const _ as *mut _, response as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SmartCardPinResetRequest: ISmartCardPinResetRequest} 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(&self, out: *mut *mut SmartCard) -> HRESULT, - fn GetIdAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetNameAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetChallengeContextAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestPinChangeAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestPinResetAsync(&self, handler: *mut SmartCardPinResetHandler, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetIdAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetNameAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetChallengeContextAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestPinChangeAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestPinResetAsync(&self, handler: *mut SmartCardPinResetHandler, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ISmartCardProvisioning { - #[inline] pub unsafe fn get_smart_card(&self) -> Result> { + #[inline] pub fn get_smart_card(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SmartCard)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_id_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_id_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetIdAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_name_async(&self) -> Result>> { + }} + #[inline] pub fn get_name_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetNameAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_challenge_context_async(&self) -> Result>> { + }} + #[inline] pub fn get_challenge_context_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetChallengeContextAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_pin_change_async(&self) -> Result>> { + }} + #[inline] pub fn request_pin_change_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestPinChangeAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_pin_reset_async(&self, handler: &SmartCardPinResetHandler) -> Result>> { + }} + #[inline] pub fn request_pin_reset_async(&self, handler: &SmartCardPinResetHandler) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestPinResetAsync)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class SmartCardProvisioning: ISmartCardProvisioning} impl RtActivatable for SmartCardProvisioning {} impl RtActivatable for SmartCardProvisioning {} impl SmartCardProvisioning { - #[inline] pub fn from_smart_card_async(card: &SmartCard) -> Result>> { unsafe { + #[inline] pub fn from_smart_card_async(card: &SmartCard) -> Result>> { >::get_activation_factory().from_smart_card_async(card) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn request_virtual_smart_card_creation_async(friendlyName: &HStringArg, administrativeKey: &super::super::storage::streams::IBuffer, pinPolicy: &SmartCardPinPolicy) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn request_virtual_smart_card_creation_async(friendlyName: &HStringArg, administrativeKey: &super::super::storage::streams::IBuffer, pinPolicy: &SmartCardPinPolicy) -> Result>> { >::get_activation_factory().request_virtual_smart_card_creation_async(friendlyName, administrativeKey, pinPolicy) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn request_virtual_smart_card_creation_async_with_card_id(friendlyName: &HStringArg, administrativeKey: &super::super::storage::streams::IBuffer, pinPolicy: &SmartCardPinPolicy, cardId: Guid) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn request_virtual_smart_card_creation_async_with_card_id(friendlyName: &HStringArg, administrativeKey: &super::super::storage::streams::IBuffer, pinPolicy: &SmartCardPinPolicy, cardId: Guid) -> Result>> { >::get_activation_factory().request_virtual_smart_card_creation_async_with_card_id(friendlyName, administrativeKey, pinPolicy, cardId) - }} - #[inline] pub fn request_virtual_smart_card_deletion_async(card: &SmartCard) -> Result>> { unsafe { + } + #[inline] pub fn request_virtual_smart_card_deletion_async(card: &SmartCard) -> Result>> { >::get_activation_factory().request_virtual_smart_card_deletion_async(card) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn request_attested_virtual_smart_card_creation_async(friendlyName: &HStringArg, administrativeKey: &super::super::storage::streams::IBuffer, pinPolicy: &SmartCardPinPolicy) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn request_attested_virtual_smart_card_creation_async(friendlyName: &HStringArg, administrativeKey: &super::super::storage::streams::IBuffer, pinPolicy: &SmartCardPinPolicy) -> Result>> { >::get_activation_factory().request_attested_virtual_smart_card_creation_async(friendlyName, administrativeKey, pinPolicy) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn request_attested_virtual_smart_card_creation_async_with_card_id(friendlyName: &HStringArg, administrativeKey: &super::super::storage::streams::IBuffer, pinPolicy: &SmartCardPinPolicy, cardId: Guid) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn request_attested_virtual_smart_card_creation_async_with_card_id(friendlyName: &HStringArg, administrativeKey: &super::super::storage::streams::IBuffer, pinPolicy: &SmartCardPinPolicy, cardId: Guid) -> Result>> { >::get_activation_factory().request_attested_virtual_smart_card_creation_async_with_card_id(friendlyName, administrativeKey, pinPolicy, cardId) - }} + } } DEFINE_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]) [CLSID_SmartCardProvisioning]); 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetAuthorityKeyContainerNameAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ISmartCardProvisioning2 { - #[inline] pub unsafe fn get_authority_key_container_name_async(&self) -> Result>> { + #[inline] pub fn get_authority_key_container_name_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAuthorityKeyContainerNameAsync)(self as *const _ as *mut _, &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(&self, card: *mut SmartCard, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FromSmartCardAsync(&self, card: *mut SmartCard, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-storage")] fn RequestVirtualSmartCardCreationAsync(&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 RequestVirtualSmartCardCreationAsync(&self, friendlyName: HSTRING, administrativeKey: *mut super::super::storage::streams::IBuffer, pinPolicy: *mut SmartCardPinPolicy, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy2(&self) -> (), - #[cfg(feature="windows-storage")] fn RequestVirtualSmartCardCreationAsyncWithCardId(&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(&self, card: *mut SmartCard, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn RequestVirtualSmartCardCreationAsyncWithCardId(&self, friendlyName: HSTRING, administrativeKey: *mut super::super::storage::streams::IBuffer, pinPolicy: *mut SmartCardPinPolicy, cardId: Guid, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestVirtualSmartCardDeletionAsync(&self, card: *mut SmartCard, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ISmartCardProvisioningStatics { - #[inline] pub unsafe fn from_smart_card_async(&self, card: &SmartCard) -> Result>> { + #[inline] pub fn from_smart_card_async(&self, card: &SmartCard) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromSmartCardAsync)(self as *const _ as *mut _, 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(&self, friendlyName: &HStringArg, administrativeKey: &super::super::storage::streams::IBuffer, pinPolicy: &SmartCardPinPolicy) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn request_virtual_smart_card_creation_async(&self, friendlyName: &HStringArg, administrativeKey: &super::super::storage::streams::IBuffer, pinPolicy: &SmartCardPinPolicy) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestVirtualSmartCardCreationAsync)(self as *const _ as *mut _, 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(&self, friendlyName: &HStringArg, administrativeKey: &super::super::storage::streams::IBuffer, pinPolicy: &SmartCardPinPolicy, cardId: Guid) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn request_virtual_smart_card_creation_async_with_card_id(&self, friendlyName: &HStringArg, administrativeKey: &super::super::storage::streams::IBuffer, pinPolicy: &SmartCardPinPolicy, cardId: Guid) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestVirtualSmartCardCreationAsyncWithCardId)(self as *const _ as *mut _, 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(&self, card: &SmartCard) -> Result>> { + }} + #[inline] pub fn request_virtual_smart_card_deletion_async(&self, card: &SmartCard) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestVirtualSmartCardDeletionAsync)(self as *const _ as *mut _, card as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&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(&self, friendlyName: HSTRING, administrativeKey: *mut super::super::storage::streams::IBuffer, pinPolicy: *mut SmartCardPinPolicy, cardId: Guid, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn RequestAttestedVirtualSmartCardCreationAsync(&self, friendlyName: HSTRING, administrativeKey: *mut super::super::storage::streams::IBuffer, pinPolicy: *mut SmartCardPinPolicy, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn RequestAttestedVirtualSmartCardCreationAsyncWithCardId(&self, friendlyName: HSTRING, administrativeKey: *mut super::super::storage::streams::IBuffer, pinPolicy: *mut SmartCardPinPolicy, cardId: Guid, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ISmartCardProvisioningStatics2 { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn request_attested_virtual_smart_card_creation_async(&self, friendlyName: &HStringArg, administrativeKey: &super::super::storage::streams::IBuffer, pinPolicy: &SmartCardPinPolicy) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn request_attested_virtual_smart_card_creation_async(&self, friendlyName: &HStringArg, administrativeKey: &super::super::storage::streams::IBuffer, pinPolicy: &SmartCardPinPolicy) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAttestedVirtualSmartCardCreationAsync)(self as *const _ as *mut _, 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(&self, friendlyName: &HStringArg, administrativeKey: &super::super::storage::streams::IBuffer, pinPolicy: &SmartCardPinPolicy, cardId: Guid) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn request_attested_virtual_smart_card_creation_async_with_card_id(&self, friendlyName: &HStringArg, administrativeKey: &super::super::storage::streams::IBuffer, pinPolicy: &SmartCardPinPolicy, cardId: Guid) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAttestedVirtualSmartCardCreationAsyncWithCardId)(self as *const _ as *mut _, 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_ISmartCardReader, 276083936, 21698, 19952, 129, 122, 20, 193, 67, 120, 240, 108); RT_INTERFACE!{interface ISmartCardReader(ISmartCardReaderVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardReader] { fn get_DeviceId(&self, out: *mut HSTRING) -> HRESULT, fn get_Name(&self, out: *mut HSTRING) -> HRESULT, fn get_Kind(&self, out: *mut SmartCardReaderKind) -> HRESULT, - fn GetStatusAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FindAllCardsAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn add_CardAdded(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CardAdded(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_CardRemoved(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CardRemoved(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn GetStatusAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn FindAllCardsAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn add_CardAdded(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CardAdded(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_CardRemoved(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CardRemoved(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl ISmartCardReader { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_name(&self) -> Result { + }} + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_kind(&self) -> Result { + }} + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_status_async(&self) -> Result>> { + }} + #[inline] pub fn get_status_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetStatusAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_all_cards_async(&self) -> Result>>> { + }} + #[inline] pub fn find_all_cards_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllCardsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_card_added(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_card_added(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CardAdded)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_card_added(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_card_added(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CardAdded)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_card_removed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_card_removed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CardRemoved)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_card_removed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_card_removed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CardRemoved)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SmartCardReader: ISmartCardReader} impl RtActivatable for SmartCardReader {} impl SmartCardReader { - #[inline] pub fn get_device_selector() -> Result { unsafe { + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} - #[inline] pub fn get_device_selector_with_kind(kind: SmartCardReaderKind) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_with_kind(kind: SmartCardReaderKind) -> Result { >::get_activation_factory().get_device_selector_with_kind(kind) - }} - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} + } } DEFINE_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]) [CLSID_SmartCardReader]); RT_ENUM! { enum SmartCardReaderKind: i32 { @@ -3639,24 +3639,24 @@ DEFINE_IID!(IID_ISmartCardReaderStatics, 272368865, 41418, 18674, 162, 129, 91, RT_INTERFACE!{static interface ISmartCardReaderStatics(ISmartCardReaderStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardReaderStatics] { fn GetDeviceSelector(&self, out: *mut HSTRING) -> HRESULT, fn GetDeviceSelectorWithKind(&self, kind: SmartCardReaderKind, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ISmartCardReaderStatics { - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector_with_kind(&self, kind: SmartCardReaderKind) -> Result { + }} + #[inline] pub fn get_device_selector_with_kind(&self, kind: SmartCardReaderKind) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorWithKind)(self as *const _ as *mut _, kind, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum SmartCardReaderStatus: i32 { Disconnected (SmartCardReaderStatus_Disconnected) = 0, Ready (SmartCardReaderStatus_Ready) = 1, Exclusive (SmartCardReaderStatus_Exclusive) = 2, @@ -3671,56 +3671,56 @@ RT_INTERFACE!{interface ISmartCardTriggerDetails(ISmartCardTriggerDetailsVtbl): #[cfg(feature="windows-storage")] fn get_TriggerData(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT }} impl ISmartCardTriggerDetails { - #[inline] pub unsafe fn get_trigger_type(&self) -> Result { + #[inline] pub fn get_trigger_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TriggerType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_source_applet_id(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_source_applet_id(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SourceAppletId)(self 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_trigger_data(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_trigger_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TriggerData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SmartCardTriggerDetails: ISmartCardTriggerDetails} DEFINE_IID!(IID_ISmartCardTriggerDetails2, 692438377, 35189, 19025, 158, 26, 95, 138, 118, 238, 81, 175); RT_INTERFACE!{interface ISmartCardTriggerDetails2(ISmartCardTriggerDetails2Vtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardTriggerDetails2] { fn get_Emulator(&self, out: *mut *mut SmartCardEmulator) -> HRESULT, - fn TryLaunchCurrentAppAsync(&self, arguments: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryLaunchCurrentAppWithBehaviorAsync(&self, arguments: HSTRING, behavior: SmartCardLaunchBehavior, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn TryLaunchCurrentAppAsync(&self, arguments: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryLaunchCurrentAppWithBehaviorAsync(&self, arguments: HSTRING, behavior: SmartCardLaunchBehavior, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ISmartCardTriggerDetails2 { - #[inline] pub unsafe fn get_emulator(&self) -> Result> { + #[inline] pub fn get_emulator(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Emulator)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_launch_current_app_async(&self, arguments: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn try_launch_current_app_async(&self, arguments: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryLaunchCurrentAppAsync)(self as *const _ as *mut _, arguments.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_launch_current_app_with_behavior_async(&self, arguments: &HStringArg, behavior: SmartCardLaunchBehavior) -> Result>> { + }} + #[inline] pub fn try_launch_current_app_with_behavior_async(&self, arguments: &HStringArg, behavior: SmartCardLaunchBehavior) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryLaunchCurrentAppWithBehaviorAsync)(self as *const _ as *mut _, arguments.get(), behavior, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ISmartCardTriggerDetails3, 3017982589, 6342, 19368, 131, 118, 239, 3, 212, 145, 38, 102); RT_INTERFACE!{interface ISmartCardTriggerDetails3(ISmartCardTriggerDetails3Vtbl): IInspectable(IInspectableVtbl) [IID_ISmartCardTriggerDetails3] { fn get_SmartCard(&self, out: *mut *mut SmartCard) -> HRESULT }} impl ISmartCardTriggerDetails3 { - #[inline] pub unsafe fn get_smart_card(&self) -> Result> { + #[inline] pub fn get_smart_card(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SmartCard)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum SmartCardTriggerType: i32 { EmulatorTransaction (SmartCardTriggerType_EmulatorTransaction) = 0, EmulatorNearFieldEntry (SmartCardTriggerType_EmulatorNearFieldEntry) = 1, EmulatorNearFieldExit (SmartCardTriggerType_EmulatorNearFieldExit) = 2, EmulatorHostApplicationActivated (SmartCardTriggerType_EmulatorHostApplicationActivated) = 3, EmulatorAppletIdGroupRegistrationChanged (SmartCardTriggerType_EmulatorAppletIdGroupRegistrationChanged) = 4, ReaderCardAdded (SmartCardTriggerType_ReaderCardAdded) = 5, @@ -3735,102 +3735,102 @@ DEFINE_IID!(IID_IBattery, 3163115462, 114, 18376, 139, 93, 97, 74, 170, 122, 67, RT_INTERFACE!{interface IBattery(IBatteryVtbl): IInspectable(IInspectableVtbl) [IID_IBattery] { fn get_DeviceId(&self, out: *mut HSTRING) -> HRESULT, fn GetReport(&self, out: *mut *mut BatteryReport) -> HRESULT, - fn add_ReportUpdated(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReportUpdated(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ReportUpdated(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReportUpdated(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IBattery { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_report(&self) -> Result> { + }} + #[inline] pub fn get_report(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetReport)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_report_updated(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_report_updated(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ReportUpdated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_report_updated(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_report_updated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ReportUpdated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Battery: IBattery} impl RtActivatable for Battery {} impl Battery { - #[inline] pub fn get_aggregate_battery() -> Result> { unsafe { + #[inline] pub fn get_aggregate_battery() -> Result>> { >::get_activation_factory().get_aggregate_battery() - }} - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} - #[inline] pub fn get_device_selector() -> Result { unsafe { + } + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} + } } DEFINE_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]) [CLSID_Battery]); 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(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_DesignCapacityInMilliwattHours(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_FullChargeCapacityInMilliwattHours(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_RemainingCapacityInMilliwattHours(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_ChargeRateInMilliwatts(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_DesignCapacityInMilliwattHours(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_FullChargeCapacityInMilliwattHours(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_RemainingCapacityInMilliwattHours(&self, out: *mut *mut foundation::IReference) -> HRESULT, #[cfg(feature="windows-system")] fn get_Status(&self, out: *mut super::super::system::power::BatteryStatus) -> HRESULT }} impl IBatteryReport { - #[inline] pub unsafe fn get_charge_rate_in_milliwatts(&self) -> Result>> { + #[inline] pub fn get_charge_rate_in_milliwatts(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ChargeRateInMilliwatts)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_design_capacity_in_milliwatt_hours(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_design_capacity_in_milliwatt_hours(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DesignCapacityInMilliwattHours)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_full_charge_capacity_in_milliwatt_hours(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_full_charge_capacity_in_milliwatt_hours(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FullChargeCapacityInMilliwattHours)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_remaining_capacity_in_milliwatt_hours(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_remaining_capacity_in_milliwatt_hours(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemainingCapacityInMilliwattHours)(self 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 get_status(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class BatteryReport: IBatteryReport} 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(&self, out: *mut *mut Battery) -> HRESULT, - fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetDeviceSelector(&self, out: *mut HSTRING) -> HRESULT }} impl IBatteryStatics { - #[inline] pub unsafe fn get_aggregate_battery(&self) -> Result> { + #[inline] pub fn get_aggregate_battery(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AggregateBattery)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + }} + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } } // Windows.Devices.Power pub mod sms { // Windows.Devices.Sms @@ -3838,15 +3838,15 @@ use ::prelude::*; RT_ENUM! { enum CellularClass: i32 { None (CellularClass_None) = 0, Gsm (CellularClass_Gsm) = 1, Cdma (CellularClass_Cdma) = 2, }} -RT_CLASS!{class DeleteSmsMessageOperation: super::super::foundation::IAsyncAction} -RT_CLASS!{class DeleteSmsMessagesOperation: super::super::foundation::IAsyncAction} -RT_CLASS!{class GetSmsDeviceOperation: super::super::foundation::IAsyncOperation} -RT_CLASS!{class GetSmsMessageOperation: super::super::foundation::IAsyncOperation} -RT_CLASS!{class GetSmsMessagesOperation: super::super::foundation::IAsyncOperationWithProgress, i32>} -RT_CLASS!{class SendSmsMessageOperation: super::super::foundation::IAsyncAction} +RT_CLASS!{class DeleteSmsMessageOperation: foundation::IAsyncAction} +RT_CLASS!{class DeleteSmsMessagesOperation: foundation::IAsyncAction} +RT_CLASS!{class GetSmsDeviceOperation: foundation::IAsyncOperation} +RT_CLASS!{class GetSmsMessageOperation: foundation::IAsyncOperation} +RT_CLASS!{class GetSmsMessagesOperation: foundation::IAsyncOperationWithProgress, i32>} +RT_CLASS!{class SendSmsMessageOperation: foundation::IAsyncAction} 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(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_To(&self, out: *mut HSTRING) -> HRESULT, fn put_To(&self, value: HSTRING) -> HRESULT, fn get_From(&self, out: *mut HSTRING) -> HRESULT, @@ -3870,106 +3870,106 @@ RT_INTERFACE!{interface ISmsAppMessage(ISmsAppMessageVtbl): IInspectable(IInspec #[cfg(feature="windows-storage")] fn put_BinaryBody(&self, value: *mut super::super::storage::streams::IBuffer) -> HRESULT }} impl ISmsAppMessage { - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_to(&self) -> Result { + }} + #[inline] pub fn get_to(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_To)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_to(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_to(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_To)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_from(&self) -> Result { + }} + #[inline] pub fn get_from(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_From)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_body(&self) -> Result { + }} + #[inline] pub fn get_body(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Body)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_body(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_body(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Body)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_callback_number(&self) -> Result { + }} + #[inline] pub fn get_callback_number(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CallbackNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_callback_number(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_callback_number(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CallbackNumber)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_delivery_notification_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_delivery_notification_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDeliveryNotificationEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_delivery_notification_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_delivery_notification_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsDeliveryNotificationEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_retry_attempt_count(&self) -> Result { + }} + #[inline] pub fn get_retry_attempt_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RetryAttemptCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_retry_attempt_count(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_retry_attempt_count(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RetryAttemptCount)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_encoding(&self) -> Result { + }} + #[inline] pub fn get_encoding(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Encoding)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_encoding(&self, value: SmsEncoding) -> Result<()> { + }} + #[inline] pub fn set_encoding(&self, value: SmsEncoding) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Encoding)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_port_number(&self) -> Result { + }} + #[inline] pub fn get_port_number(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PortNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_port_number(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_port_number(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PortNumber)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_teleservice_id(&self) -> Result { + }} + #[inline] pub fn get_teleservice_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TeleserviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_teleservice_id(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_teleservice_id(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TeleserviceId)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_protocol_id(&self) -> Result { + }} + #[inline] pub fn get_protocol_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProtocolId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_protocol_id(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_protocol_id(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ProtocolId)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_binary_body(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_binary_body(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BinaryBody)(self 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_binary_body(&self, value: &super::super::storage::streams::IBuffer) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_binary_body(&self, value: &super::super::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BinaryBody)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SmsAppMessage: ISmsAppMessage} impl RtActivatable for SmsAppMessage {} @@ -3982,31 +3982,31 @@ RT_INTERFACE!{interface ISmsBinaryMessage(ISmsBinaryMessageVtbl): IInspectable(I fn SetData(&self, valueSize: u32, value: *mut u8) -> HRESULT }} impl ISmsBinaryMessage { - #[inline] pub unsafe fn get_format(&self) -> Result { + #[inline] pub fn get_format(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Format)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_format(&self, value: SmsDataFormat) -> Result<()> { + }} + #[inline] pub fn set_format(&self, value: SmsDataFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Format)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_data(&self) -> Result> { + }} + #[inline] pub fn get_data(&self) -> Result> { unsafe { let mut outSize = 0; let mut out = null_mut(); let hr = ((*self.lpVtbl).GetData)(self as *const _ as *mut _, &mut outSize, &mut out); if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_data(&self, value: &[u8]) -> Result<()> { + }} + #[inline] pub fn set_data(&self, value: &[u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetData)(self as *const _ as *mut _, value.len() as u32, value.as_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SmsBinaryMessage: ISmsBinaryMessage} impl RtActivatable for SmsBinaryMessage {} DEFINE_CLSID!(SmsBinaryMessage(&[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,83,109,115,46,83,109,115,66,105,110,97,114,121,77,101,115,115,97,103,101,0]) [CLSID_SmsBinaryMessage]); 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(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_To(&self, out: *mut HSTRING) -> HRESULT, fn get_Body(&self, out: *mut HSTRING) -> HRESULT, fn get_Channel(&self, out: *mut i32) -> HRESULT, @@ -4018,56 +4018,56 @@ RT_INTERFACE!{interface ISmsBroadcastMessage(ISmsBroadcastMessageVtbl): IInspect fn get_IsUserPopupRequested(&self, out: *mut bool) -> HRESULT }} impl ISmsBroadcastMessage { - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_to(&self) -> Result { + }} + #[inline] pub fn get_to(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_To)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_body(&self) -> Result { + }} + #[inline] pub fn get_body(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Body)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_channel(&self) -> Result { + }} + #[inline] pub fn get_channel(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Channel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_geographical_scope(&self) -> Result { + }} + #[inline] pub fn get_geographical_scope(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_GeographicalScope)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_message_code(&self) -> Result { + }} + #[inline] pub fn get_message_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MessageCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_update_number(&self) -> Result { + }} + #[inline] pub fn get_update_number(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UpdateNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_broadcast_type(&self) -> Result { + }} + #[inline] pub fn get_broadcast_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BroadcastType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_emergency_alert(&self) -> Result { + }} + #[inline] pub fn get_is_emergency_alert(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsEmergencyAlert)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_user_popup_requested(&self) -> Result { + }} + #[inline] pub fn get_is_user_popup_requested(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsUserPopupRequested)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SmsBroadcastMessage: ISmsBroadcastMessage} RT_ENUM! { enum SmsBroadcastType: i32 { @@ -4084,77 +4084,77 @@ RT_INTERFACE!{interface ISmsDevice(ISmsDeviceVtbl): IInspectable(IInspectableVtb fn get_CellularClass(&self, out: *mut CellularClass) -> HRESULT, fn get_MessageStore(&self, out: *mut *mut SmsDeviceMessageStore) -> HRESULT, fn get_DeviceStatus(&self, out: *mut SmsDeviceStatus) -> HRESULT, - fn add_SmsMessageReceived(&self, eventHandler: *mut SmsMessageReceivedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SmsMessageReceived(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_SmsDeviceStatusChanged(&self, eventHandler: *mut SmsDeviceStatusChangedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SmsDeviceStatusChanged(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_SmsMessageReceived(&self, eventHandler: *mut SmsMessageReceivedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SmsMessageReceived(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_SmsDeviceStatusChanged(&self, eventHandler: *mut SmsDeviceStatusChangedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SmsDeviceStatusChanged(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT }} impl ISmsDevice { - #[inline] pub unsafe fn send_message_async(&self, message: &ISmsMessage) -> Result> { + #[inline] pub fn send_message_async(&self, message: &ISmsMessage) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SendMessageAsync)(self as *const _ as *mut _, message as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn calculate_length(&self, message: &SmsTextMessage) -> Result { + }} + #[inline] pub fn calculate_length(&self, message: &SmsTextMessage) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).CalculateLength)(self as *const _ as *mut _, message as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_account_phone_number(&self) -> Result { + }} + #[inline] pub fn get_account_phone_number(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AccountPhoneNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_cellular_class(&self) -> Result { + }} + #[inline] pub fn get_cellular_class(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CellularClass)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_message_store(&self) -> Result> { + }} + #[inline] pub fn get_message_store(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MessageStore)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_status(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_device_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DeviceStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_sms_message_received(&self, eventHandler: &SmsMessageReceivedEventHandler) -> Result { + }} + #[inline] pub fn add_sms_message_received(&self, eventHandler: &SmsMessageReceivedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SmsMessageReceived)(self as *const _ as *mut _, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_sms_message_received(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_sms_message_received(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SmsMessageReceived)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_sms_device_status_changed(&self, eventHandler: &SmsDeviceStatusChangedEventHandler) -> Result { + }} + #[inline] pub fn add_sms_device_status_changed(&self, eventHandler: &SmsDeviceStatusChangedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SmsDeviceStatusChanged)(self as *const _ as *mut _, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_sms_device_status_changed(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_sms_device_status_changed(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SmsDeviceStatusChanged)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SmsDevice: ISmsDevice} impl RtActivatable for SmsDevice {} impl RtActivatable for SmsDevice {} impl SmsDevice { - #[inline] pub fn get_device_selector() -> Result { unsafe { + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} - #[inline] pub fn get_default_async() -> Result>> { unsafe { + } + #[inline] pub fn get_default_async() -> Result>> { >::get_activation_factory().get_default_async() - }} - #[inline] pub fn from_network_account_id_async(networkAccountId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_network_account_id_async(networkAccountId: &HStringArg) -> Result>> { >::get_activation_factory().from_network_account_id_async(networkAccountId) - }} + } } DEFINE_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]) [CLSID_SmsDevice]); DEFINE_IID!(IID_ISmsDevice2, 3179961363, 58658, 18123, 184, 213, 158, 173, 48, 251, 108, 71); @@ -4167,80 +4167,80 @@ RT_INTERFACE!{interface ISmsDevice2(ISmsDevice2Vtbl): IInspectable(IInspectableV fn get_CellularClass(&self, out: *mut CellularClass) -> HRESULT, fn get_DeviceStatus(&self, out: *mut SmsDeviceStatus) -> HRESULT, fn CalculateLength(&self, message: *mut ISmsMessageBase, out: *mut SmsEncodedLength) -> HRESULT, - fn SendMessageAndGetResultAsync(&self, message: *mut ISmsMessageBase, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_DeviceStatusChanged(&self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DeviceStatusChanged(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn SendMessageAndGetResultAsync(&self, message: *mut ISmsMessageBase, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_DeviceStatusChanged(&self, eventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DeviceStatusChanged(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT }} impl ISmsDevice2 { - #[inline] pub unsafe fn get_smsc_address(&self) -> Result { + #[inline] pub fn get_smsc_address(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SmscAddress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_smsc_address(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_smsc_address(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SmscAddress)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_id(&self) -> Result { + }} + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_parent_device_id(&self) -> Result { + }} + #[inline] pub fn get_parent_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ParentDeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_account_phone_number(&self) -> Result { + }} + #[inline] pub fn get_account_phone_number(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AccountPhoneNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_cellular_class(&self) -> Result { + }} + #[inline] pub fn get_cellular_class(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CellularClass)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_status(&self) -> Result { + }} + #[inline] pub fn get_device_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DeviceStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn calculate_length(&self, message: &ISmsMessageBase) -> Result { + }} + #[inline] pub fn calculate_length(&self, message: &ISmsMessageBase) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).CalculateLength)(self as *const _ as *mut _, message as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn send_message_and_get_result_async(&self, message: &ISmsMessageBase) -> Result>> { + }} + #[inline] pub fn send_message_and_get_result_async(&self, message: &ISmsMessageBase) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SendMessageAndGetResultAsync)(self as *const _ as *mut _, message as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_device_status_changed(&self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_device_status_changed(&self, eventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DeviceStatusChanged)(self as *const _ as *mut _, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_device_status_changed(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_device_status_changed(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DeviceStatusChanged)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SmsDevice2: ISmsDevice2} impl RtActivatable for SmsDevice2 {} impl SmsDevice2 { - #[inline] pub fn get_device_selector() -> Result { unsafe { + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} - #[inline] pub fn from_id(deviceId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn from_id(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id(deviceId) - }} - #[inline] pub fn get_default() -> Result> { unsafe { + } + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} - #[inline] pub fn from_parent_id(parentDeviceId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn from_parent_id(parentDeviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_parent_id(parentDeviceId) - }} + } } DEFINE_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]) [CLSID_SmsDevice2]); DEFINE_IID!(IID_ISmsDevice2Statics, 1707574053, 4145, 18718, 143, 182, 239, 153, 145, 175, 227, 99); @@ -4251,96 +4251,96 @@ RT_INTERFACE!{static interface ISmsDevice2Statics(ISmsDevice2StaticsVtbl): IInsp fn FromParentId(&self, parentDeviceId: HSTRING, out: *mut *mut SmsDevice2) -> HRESULT }} impl ISmsDevice2Statics { - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id(&self, deviceId: &HStringArg) -> Result> { + }} + #[inline] pub fn from_id(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromId)(self as *const _ as *mut _, deviceId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_default(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_parent_id(&self, parentDeviceId: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn from_parent_id(&self, parentDeviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromParentId)(self as *const _ as *mut _, parentDeviceId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, messageId: u32, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn DeleteMessagesAsync(&self, messageFilter: SmsMessageFilter, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn GetMessageAsync(&self, messageId: u32, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetMessagesAsync(&self, messageFilter: SmsMessageFilter, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress, i32>) -> HRESULT, + fn DeleteMessageAsync(&self, messageId: u32, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn DeleteMessagesAsync(&self, messageFilter: SmsMessageFilter, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn GetMessageAsync(&self, messageId: u32, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetMessagesAsync(&self, messageFilter: SmsMessageFilter, out: *mut *mut foundation::IAsyncOperationWithProgress, i32>) -> HRESULT, fn get_MaxMessages(&self, out: *mut u32) -> HRESULT }} impl ISmsDeviceMessageStore { - #[inline] pub unsafe fn delete_message_async(&self, messageId: u32) -> Result> { + #[inline] pub fn delete_message_async(&self, messageId: u32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteMessageAsync)(self as *const _ as *mut _, messageId, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete_messages_async(&self, messageFilter: SmsMessageFilter) -> Result> { + }} + #[inline] pub fn delete_messages_async(&self, messageFilter: SmsMessageFilter) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteMessagesAsync)(self as *const _ as *mut _, messageFilter, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_message_async(&self, messageId: u32) -> Result>> { + }} + #[inline] pub fn get_message_async(&self, messageId: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetMessageAsync)(self as *const _ as *mut _, messageId, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_messages_async(&self, messageFilter: SmsMessageFilter) -> Result, i32>>> { + }} + #[inline] pub fn get_messages_async(&self, messageFilter: SmsMessageFilter) -> Result, i32>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetMessagesAsync)(self as *const _ as *mut _, messageFilter, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_messages(&self) -> Result { + }} + #[inline] pub fn get_max_messages(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxMessages)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SmsDeviceMessageStore: ISmsDeviceMessageStore} 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(&self, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetDefaultAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetDefaultAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ISmsDeviceStatics { - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_async(&self) -> Result>> { + }} + #[inline] pub fn get_default_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefaultAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::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(&self, networkAccountId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FromNetworkAccountIdAsync(&self, networkAccountId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ISmsDeviceStatics2 { - #[inline] pub unsafe fn from_network_account_id_async(&self, networkAccountId: &HStringArg) -> Result>> { + #[inline] pub fn from_network_account_id_async(&self, networkAccountId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromNetworkAccountIdAsync)(self as *const _ as *mut _, networkAccountId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -4350,10 +4350,10 @@ RT_DELEGATE!{delegate SmsDeviceStatusChangedEventHandler(SmsDeviceStatusChangedE fn Invoke(&self, sender: *mut SmsDevice) -> HRESULT }} impl SmsDeviceStatusChangedEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &SmsDevice) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &SmsDevice) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_STRUCT! { struct SmsEncodedLength { SegmentCount: u32, CharacterCountLastSegment: u32, CharactersPerSegment: u32, ByteCountLastSegment: u32, BytesPerSegment: u32, @@ -4367,97 +4367,97 @@ RT_ENUM! { enum SmsFilterActionType: i32 { 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(&self, out: *mut SmsMessageType) -> HRESULT, - fn get_ImsiPrefixes(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_DeviceIds(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_SenderNumbers(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_TextMessagePrefixes(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_PortNumbers(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_ImsiPrefixes(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_DeviceIds(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_SenderNumbers(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_TextMessagePrefixes(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_PortNumbers(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_CellularClass(&self, out: *mut CellularClass) -> HRESULT, fn put_CellularClass(&self, value: CellularClass) -> HRESULT, - fn get_ProtocolIds(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_TeleserviceIds(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_WapApplicationIds(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_WapContentTypes(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_BroadcastTypes(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_BroadcastChannels(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_ProtocolIds(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_TeleserviceIds(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_WapApplicationIds(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_WapContentTypes(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_BroadcastTypes(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_BroadcastChannels(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl ISmsFilterRule { - #[inline] pub unsafe fn get_message_type(&self) -> Result { + #[inline] pub fn get_message_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MessageType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_imsi_prefixes(&self) -> Result>> { + }} + #[inline] pub fn get_imsi_prefixes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ImsiPrefixes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_ids(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_device_ids(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceIds)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sender_numbers(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_sender_numbers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SenderNumbers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_text_message_prefixes(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_text_message_prefixes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TextMessagePrefixes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_port_numbers(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_port_numbers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PortNumbers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_cellular_class(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_cellular_class(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CellularClass)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_cellular_class(&self, value: CellularClass) -> Result<()> { + }} + #[inline] pub fn set_cellular_class(&self, value: CellularClass) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CellularClass)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_protocol_ids(&self) -> Result>> { + }} + #[inline] pub fn get_protocol_ids(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProtocolIds)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_teleservice_ids(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_teleservice_ids(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TeleserviceIds)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_wap_application_ids(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_wap_application_ids(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WapApplicationIds)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_wap_content_types(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_wap_content_types(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WapContentTypes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_broadcast_types(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_broadcast_types(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BroadcastTypes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_broadcast_channels(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_broadcast_channels(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BroadcastChannels)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SmsFilterRule: ISmsFilterRule} impl RtActivatable for SmsFilterRule {} impl SmsFilterRule { - #[inline] pub fn create_filter_rule(messageType: SmsMessageType) -> Result> { unsafe { + #[inline] pub fn create_filter_rule(messageType: SmsMessageType) -> Result> { >::get_activation_factory().create_filter_rule(messageType) - }} + } } DEFINE_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]) [CLSID_SmsFilterRule]); DEFINE_IID!(IID_ISmsFilterRuleFactory, 12805384, 25238, 20265, 154, 173, 137, 32, 206, 186, 60, 232); @@ -4465,35 +4465,35 @@ RT_INTERFACE!{static interface ISmsFilterRuleFactory(ISmsFilterRuleFactoryVtbl): fn CreateFilterRule(&self, messageType: SmsMessageType, out: *mut *mut SmsFilterRule) -> HRESULT }} impl ISmsFilterRuleFactory { - #[inline] pub unsafe fn create_filter_rule(&self, messageType: SmsMessageType) -> Result> { + #[inline] pub fn create_filter_rule(&self, messageType: SmsMessageType) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFilterRule)(self as *const _ as *mut _, messageType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut SmsFilterActionType) -> HRESULT, - fn get_Rules(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_Rules(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl ISmsFilterRules { - #[inline] pub unsafe fn get_action_type(&self) -> Result { + #[inline] pub fn get_action_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ActionType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_rules(&self) -> Result>> { + }} + #[inline] pub fn get_rules(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Rules)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SmsFilterRules: ISmsFilterRules} impl RtActivatable for SmsFilterRules {} impl SmsFilterRules { - #[inline] pub fn create_filter_rules(actionType: SmsFilterActionType) -> Result> { unsafe { + #[inline] pub fn create_filter_rules(actionType: SmsFilterActionType) -> Result> { >::get_activation_factory().create_filter_rules(actionType) - }} + } } DEFINE_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]) [CLSID_SmsFilterRules]); DEFINE_IID!(IID_ISmsFilterRulesFactory, 2694391021, 28206, 17712, 159, 222, 70, 93, 2, 238, 208, 14); @@ -4501,11 +4501,11 @@ RT_INTERFACE!{static interface ISmsFilterRulesFactory(ISmsFilterRulesFactoryVtbl fn CreateFilterRules(&self, actionType: SmsFilterActionType, out: *mut *mut SmsFilterRules) -> HRESULT }} impl ISmsFilterRulesFactory { - #[inline] pub unsafe fn create_filter_rules(&self, actionType: SmsFilterActionType) -> Result> { + #[inline] pub fn create_filter_rules(&self, actionType: SmsFilterActionType) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFilterRules)(self as *const _ as *mut _, actionType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -4516,16 +4516,16 @@ RT_INTERFACE!{interface ISmsMessage(ISmsMessageVtbl): IInspectable(IInspectableV fn get_MessageClass(&self, out: *mut SmsMessageClass) -> HRESULT }} impl ISmsMessage { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_message_class(&self) -> Result { + }} + #[inline] pub fn get_message_class(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MessageClass)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ISmsMessageBase, 753991216, 65104, 20422, 170, 136, 76, 207, 226, 122, 41, 234); RT_INTERFACE!{interface ISmsMessageBase(ISmsMessageBaseVtbl): IInspectable(IInspectableVtbl) [IID_ISmsMessageBase] { @@ -4536,31 +4536,31 @@ RT_INTERFACE!{interface ISmsMessageBase(ISmsMessageBaseVtbl): IInspectable(IInsp fn get_SimIccId(&self, out: *mut HSTRING) -> HRESULT }} impl ISmsMessageBase { - #[inline] pub unsafe fn get_message_type(&self) -> Result { + #[inline] pub fn get_message_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MessageType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_id(&self) -> Result { + }} + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_cellular_class(&self) -> Result { + }} + #[inline] pub fn get_cellular_class(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CellularClass)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_message_class(&self) -> Result { + }} + #[inline] pub fn get_message_class(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MessageClass)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sim_icc_id(&self) -> Result { + }} + #[inline] pub fn get_sim_icc_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SimIccId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -4574,16 +4574,16 @@ RT_INTERFACE!{interface ISmsMessageReceivedEventArgs(ISmsMessageReceivedEventArg fn get_BinaryMessage(&self, out: *mut *mut SmsBinaryMessage) -> HRESULT }} impl ISmsMessageReceivedEventArgs { - #[inline] pub unsafe fn get_text_message(&self) -> Result> { + #[inline] pub fn get_text_message(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TextMessage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_binary_message(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_binary_message(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BinaryMessage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SmsMessageReceivedEventArgs: ISmsMessageReceivedEventArgs} DEFINE_IID!(IID_SmsMessageReceivedEventHandler, 192599049, 60461, 18382, 162, 83, 115, 43, 238, 235, 202, 205); @@ -4591,10 +4591,10 @@ RT_DELEGATE!{delegate SmsMessageReceivedEventHandler(SmsMessageReceivedEventHand fn Invoke(&self, sender: *mut SmsDevice, e: *mut SmsMessageReceivedEventArgs) -> HRESULT }} impl SmsMessageReceivedEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &SmsDevice, e: &SmsMessageReceivedEventArgs) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &SmsDevice, e: &SmsMessageReceivedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, e as *const _ as *mut _); 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] { @@ -4609,105 +4609,105 @@ RT_INTERFACE!{interface ISmsMessageReceivedTriggerDetails(ISmsMessageReceivedTri fn Accept(&self) -> HRESULT }} impl ISmsMessageReceivedTriggerDetails { - #[inline] pub unsafe fn get_message_type(&self) -> Result { + #[inline] pub fn get_message_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MessageType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_text_message(&self) -> Result> { + }} + #[inline] pub fn get_text_message(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TextMessage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_wap_message(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_wap_message(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WapMessage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_message(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_app_message(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppMessage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_broadcast_message(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_broadcast_message(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BroadcastMessage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_voicemail_message(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_voicemail_message(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VoicemailMessage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_status_message(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_status_message(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StatusMessage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn drop(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn drop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Drop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn accept(&self) -> Result<()> { + }} + #[inline] pub fn accept(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Accept)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SmsMessageReceivedTriggerDetails: ISmsMessageReceivedTriggerDetails} 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(&self, out: *mut HSTRING) -> HRESULT, fn Unregister(&self) -> HRESULT, - fn add_MessageReceived(&self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_MessageReceived(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_MessageReceived(&self, eventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_MessageReceived(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT }} impl ISmsMessageRegistration { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn unregister(&self) -> Result<()> { + }} + #[inline] pub fn unregister(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Unregister)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_message_received(&self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_message_received(&self, eventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_MessageReceived)(self as *const _ as *mut _, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_message_received(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_message_received(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_MessageReceived)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SmsMessageRegistration: ISmsMessageRegistration} impl RtActivatable for SmsMessageRegistration {} impl SmsMessageRegistration { - #[inline] pub fn get_all_registrations() -> Result>> { unsafe { + #[inline] pub fn get_all_registrations() -> Result>>> { >::get_activation_factory().get_all_registrations() - }} - #[inline] pub fn register(id: &HStringArg, filterRules: &SmsFilterRules) -> Result> { unsafe { + } + #[inline] pub fn register(id: &HStringArg, filterRules: &SmsFilterRules) -> Result>> { >::get_activation_factory().register(id, filterRules) - }} + } } DEFINE_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]) [CLSID_SmsMessageRegistration]); 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_AllRegistrations(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn Register(&self, id: HSTRING, filterRules: *mut SmsFilterRules, out: *mut *mut SmsMessageRegistration) -> HRESULT }} impl ISmsMessageRegistrationStatics { - #[inline] pub unsafe fn get_all_registrations(&self) -> Result>> { + #[inline] pub fn get_all_registrations(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AllRegistrations)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn register(&self, id: &HStringArg, filterRules: &SmsFilterRules) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn register(&self, id: &HStringArg, filterRules: &SmsFilterRules) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Register)(self as *const _ as *mut _, id.get(), filterRules as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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, @@ -4721,16 +4721,16 @@ RT_INTERFACE!{interface ISmsReceivedEventDetails(ISmsReceivedEventDetailsVtbl): fn get_MessageIndex(&self, out: *mut u32) -> HRESULT }} impl ISmsReceivedEventDetails { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_message_index(&self) -> Result { + }} + #[inline] pub fn get_message_index(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MessageIndex)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SmsReceivedEventDetails: ISmsReceivedEventDetails} DEFINE_IID!(IID_ISmsReceivedEventDetails2, 1088445574, 42932, 18289, 154, 231, 11, 95, 251, 18, 192, 58); @@ -4739,21 +4739,21 @@ RT_INTERFACE!{interface ISmsReceivedEventDetails2(ISmsReceivedEventDetails2Vtbl) fn get_BinaryMessage(&self, out: *mut *mut SmsBinaryMessage) -> HRESULT }} impl ISmsReceivedEventDetails2 { - #[inline] pub unsafe fn get_message_class(&self) -> Result { + #[inline] pub fn get_message_class(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MessageClass)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_binary_message(&self) -> Result> { + }} + #[inline] pub fn get_binary_message(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BinaryMessage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut bool) -> HRESULT, - fn get_MessageReferenceNumbers(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_MessageReferenceNumbers(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_CellularClass(&self, out: *mut CellularClass) -> HRESULT, fn get_ModemErrorCode(&self, out: *mut SmsModemErrorCode) -> HRESULT, fn get_IsErrorTransient(&self, out: *mut bool) -> HRESULT, @@ -4761,41 +4761,41 @@ RT_INTERFACE!{interface ISmsSendMessageResult(ISmsSendMessageResultVtbl): IInspe fn get_TransportFailureCause(&self, out: *mut i32) -> HRESULT }} impl ISmsSendMessageResult { - #[inline] pub unsafe fn get_is_successful(&self) -> Result { + #[inline] pub fn get_is_successful(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSuccessful)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_message_reference_numbers(&self) -> Result>> { + }} + #[inline] pub fn get_message_reference_numbers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MessageReferenceNumbers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_cellular_class(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_cellular_class(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CellularClass)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_modem_error_code(&self) -> Result { + }} + #[inline] pub fn get_modem_error_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ModemErrorCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_error_transient(&self) -> Result { + }} + #[inline] pub fn get_is_error_transient(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsErrorTransient)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_network_cause_code(&self) -> Result { + }} + #[inline] pub fn get_network_cause_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NetworkCauseCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_transport_failure_cause(&self) -> Result { + }} + #[inline] pub fn get_transport_failure_cause(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TransportFailureCause)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SmsSendMessageResult: ISmsSendMessageResult} DEFINE_IID!(IID_ISmsStatusMessage, 3872555842, 46859, 18039, 147, 121, 201, 120, 63, 223, 248, 244); @@ -4805,50 +4805,50 @@ RT_INTERFACE!{interface ISmsStatusMessage(ISmsStatusMessageVtbl): IInspectable(I fn get_Body(&self, out: *mut HSTRING) -> HRESULT, fn get_Status(&self, out: *mut i32) -> HRESULT, fn get_MessageReferenceNumber(&self, out: *mut i32) -> HRESULT, - fn get_ServiceCenterTimestamp(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_DischargeTime(&self, out: *mut super::super::foundation::DateTime) -> HRESULT + fn get_ServiceCenterTimestamp(&self, out: *mut foundation::DateTime) -> HRESULT, + fn get_DischargeTime(&self, out: *mut foundation::DateTime) -> HRESULT }} impl ISmsStatusMessage { - #[inline] pub unsafe fn get_to(&self) -> Result { + #[inline] pub fn get_to(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_To)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_from(&self) -> Result { + }} + #[inline] pub fn get_from(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_From)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_body(&self) -> Result { + }} + #[inline] pub fn get_body(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Body)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_message_reference_number(&self) -> Result { + }} + #[inline] pub fn get_message_reference_number(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MessageReferenceNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_center_timestamp(&self) -> Result { + }} + #[inline] pub fn get_service_center_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ServiceCenterTimestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_discharge_time(&self) -> Result { + }} + #[inline] pub fn get_discharge_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DischargeTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SmsStatusMessage: ISmsStatusMessage} 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(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_PartReferenceId(&self, out: *mut u32) -> HRESULT, fn get_PartNumber(&self, out: *mut u32) -> HRESULT, fn get_PartCount(&self, out: *mut u32) -> HRESULT, @@ -4860,86 +4860,86 @@ RT_INTERFACE!{interface ISmsTextMessage(ISmsTextMessageVtbl): IInspectable(IInsp fn put_Body(&self, value: HSTRING) -> HRESULT, fn get_Encoding(&self, out: *mut SmsEncoding) -> HRESULT, fn put_Encoding(&self, value: SmsEncoding) -> HRESULT, - fn ToBinaryMessages(&self, format: SmsDataFormat, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn ToBinaryMessages(&self, format: SmsDataFormat, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl ISmsTextMessage { - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_part_reference_id(&self) -> Result { + }} + #[inline] pub fn get_part_reference_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PartReferenceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_part_number(&self) -> Result { + }} + #[inline] pub fn get_part_number(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PartNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_part_count(&self) -> Result { + }} + #[inline] pub fn get_part_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PartCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_to(&self) -> Result { + }} + #[inline] pub fn get_to(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_To)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_to(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_to(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_To)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_from(&self) -> Result { + }} + #[inline] pub fn get_from(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_From)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_from(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_from(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_From)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_body(&self) -> Result { + }} + #[inline] pub fn get_body(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Body)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_body(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_body(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Body)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_encoding(&self) -> Result { + }} + #[inline] pub fn get_encoding(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Encoding)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_encoding(&self, value: SmsEncoding) -> Result<()> { + }} + #[inline] pub fn set_encoding(&self, value: SmsEncoding) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Encoding)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn to_binary_messages(&self, format: SmsDataFormat) -> Result>> { + }} + #[inline] pub fn to_binary_messages(&self, format: SmsDataFormat) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ToBinaryMessages)(self as *const _ as *mut _, format, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SmsTextMessage: ISmsTextMessage} impl RtActivatable for SmsTextMessage {} impl RtActivatable for SmsTextMessage {} impl SmsTextMessage { - #[inline] pub fn from_binary_message(binaryMessage: &SmsBinaryMessage) -> Result> { unsafe { + #[inline] pub fn from_binary_message(binaryMessage: &SmsBinaryMessage) -> Result>> { >::get_activation_factory().from_binary_message(binaryMessage) - }} - #[inline] pub fn from_binary_data(format: SmsDataFormat, value: &[u8]) -> Result> { unsafe { + } + #[inline] pub fn from_binary_data(format: SmsDataFormat, value: &[u8]) -> Result>> { >::get_activation_factory().from_binary_data(format, value) - }} + } } DEFINE_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]) [CLSID_SmsTextMessage]); 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(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_To(&self, out: *mut HSTRING) -> HRESULT, fn put_To(&self, value: HSTRING) -> HRESULT, fn get_From(&self, out: *mut HSTRING) -> HRESULT, @@ -4957,80 +4957,80 @@ RT_INTERFACE!{interface ISmsTextMessage2(ISmsTextMessage2Vtbl): IInspectable(IIn fn get_ProtocolId(&self, out: *mut i32) -> HRESULT }} impl ISmsTextMessage2 { - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_to(&self) -> Result { + }} + #[inline] pub fn get_to(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_To)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_to(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_to(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_To)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_from(&self) -> Result { + }} + #[inline] pub fn get_from(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_From)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_body(&self) -> Result { + }} + #[inline] pub fn get_body(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Body)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_body(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_body(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Body)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_encoding(&self) -> Result { + }} + #[inline] pub fn get_encoding(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Encoding)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_encoding(&self, value: SmsEncoding) -> Result<()> { + }} + #[inline] pub fn set_encoding(&self, value: SmsEncoding) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Encoding)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_callback_number(&self) -> Result { + }} + #[inline] pub fn get_callback_number(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CallbackNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_callback_number(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_callback_number(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CallbackNumber)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_delivery_notification_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_delivery_notification_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDeliveryNotificationEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_delivery_notification_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_delivery_notification_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsDeliveryNotificationEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_retry_attempt_count(&self) -> Result { + }} + #[inline] pub fn get_retry_attempt_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RetryAttemptCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_retry_attempt_count(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_retry_attempt_count(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RetryAttemptCount)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_teleservice_id(&self) -> Result { + }} + #[inline] pub fn get_teleservice_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TeleserviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_protocol_id(&self) -> Result { + }} + #[inline] pub fn get_protocol_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProtocolId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SmsTextMessage2: ISmsTextMessage2} impl RtActivatable for SmsTextMessage2 {} @@ -5041,94 +5041,94 @@ RT_INTERFACE!{static interface ISmsTextMessageStatics(ISmsTextMessageStaticsVtbl fn FromBinaryData(&self, format: SmsDataFormat, valueSize: u32, value: *mut u8, out: *mut *mut SmsTextMessage) -> HRESULT }} impl ISmsTextMessageStatics { - #[inline] pub unsafe fn from_binary_message(&self, binaryMessage: &SmsBinaryMessage) -> Result> { + #[inline] pub fn from_binary_message(&self, binaryMessage: &SmsBinaryMessage) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromBinaryMessage)(self as *const _ as *mut _, binaryMessage as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_binary_data(&self, format: SmsDataFormat, value: &[u8]) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn from_binary_data(&self, format: SmsDataFormat, value: &[u8]) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromBinaryData)(self as *const _ as *mut _, format, value.len() as u32, value.as_ptr() as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_To(&self, out: *mut HSTRING) -> HRESULT, fn get_Body(&self, out: *mut HSTRING) -> HRESULT, - fn get_MessageCount(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn get_MessageCount(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl ISmsVoicemailMessage { - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_to(&self) -> Result { + }} + #[inline] pub fn get_to(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_To)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_body(&self) -> Result { + }} + #[inline] pub fn get_body(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Body)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_message_count(&self) -> Result>> { + }} + #[inline] pub fn get_message_count(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MessageCount)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SmsVoicemailMessage: ISmsVoicemailMessage} 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(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_To(&self, out: *mut HSTRING) -> HRESULT, fn get_From(&self, out: *mut HSTRING) -> HRESULT, fn get_ApplicationId(&self, out: *mut HSTRING) -> HRESULT, fn get_ContentType(&self, out: *mut HSTRING) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy5(&self) -> (), #[cfg(feature="windows-storage")] fn get_BinaryBody(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, - fn get_Headers(&self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT + fn get_Headers(&self, out: *mut *mut foundation::collections::IMap) -> HRESULT }} impl ISmsWapMessage { - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_to(&self) -> Result { + }} + #[inline] pub fn get_to(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_To)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_from(&self) -> Result { + }} + #[inline] pub fn get_from(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_From)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_application_id(&self) -> Result { + }} + #[inline] pub fn get_application_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ApplicationId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_content_type(&self) -> Result { + }} + #[inline] pub fn get_content_type(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContentType)(self 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 get_binary_body(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_binary_body(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BinaryBody)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_headers(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_headers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Headers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SmsWapMessage: ISmsWapMessage} } // Windows.Devices.Sms @@ -5140,130 +5140,130 @@ RT_INTERFACE!{interface IAllJoynAboutData(IAllJoynAboutDataVtbl): IInspectable(I fn put_IsEnabled(&self, value: bool) -> HRESULT, fn get_DefaultAppName(&self, out: *mut HSTRING) -> HRESULT, fn put_DefaultAppName(&self, value: HSTRING) -> HRESULT, - fn get_AppNames(&self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, - fn get_DateOfManufacture(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_DateOfManufacture(&self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_AppNames(&self, out: *mut *mut foundation::collections::IMap) -> HRESULT, + fn get_DateOfManufacture(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_DateOfManufacture(&self, value: *mut foundation::IReference) -> HRESULT, fn get_DefaultDescription(&self, out: *mut HSTRING) -> HRESULT, fn put_DefaultDescription(&self, value: HSTRING) -> HRESULT, - fn get_Descriptions(&self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, + fn get_Descriptions(&self, out: *mut *mut foundation::collections::IMap) -> HRESULT, fn get_DefaultManufacturer(&self, out: *mut HSTRING) -> HRESULT, fn put_DefaultManufacturer(&self, value: HSTRING) -> HRESULT, - fn get_Manufacturers(&self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, + fn get_Manufacturers(&self, out: *mut *mut foundation::collections::IMap) -> HRESULT, fn get_ModelNumber(&self, out: *mut HSTRING) -> HRESULT, fn put_ModelNumber(&self, value: HSTRING) -> HRESULT, fn get_SoftwareVersion(&self, out: *mut HSTRING) -> HRESULT, fn put_SoftwareVersion(&self, value: HSTRING) -> HRESULT, - fn get_SupportUrl(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_SupportUrl(&self, value: *mut super::super::foundation::Uri) -> HRESULT, + fn get_SupportUrl(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_SupportUrl(&self, value: *mut foundation::Uri) -> HRESULT, fn get_AppId(&self, out: *mut Guid) -> HRESULT, fn put_AppId(&self, value: Guid) -> HRESULT }} impl IAllJoynAboutData { - #[inline] pub unsafe fn get_is_enabled(&self) -> Result { + #[inline] pub fn get_is_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_app_name(&self) -> Result { + }} + #[inline] pub fn get_default_app_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DefaultAppName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_default_app_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_default_app_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DefaultAppName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_names(&self) -> Result>> { + }} + #[inline] pub fn get_app_names(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppNames)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_date_of_manufacture(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_date_of_manufacture(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DateOfManufacture)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_date_of_manufacture(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_date_of_manufacture(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DateOfManufacture)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_description(&self) -> Result { + }} + #[inline] pub fn get_default_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DefaultDescription)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_default_description(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_default_description(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DefaultDescription)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_descriptions(&self) -> Result>> { + }} + #[inline] pub fn get_descriptions(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Descriptions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_manufacturer(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_default_manufacturer(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DefaultManufacturer)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_default_manufacturer(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_default_manufacturer(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DefaultManufacturer)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_manufacturers(&self) -> Result>> { + }} + #[inline] pub fn get_manufacturers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Manufacturers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_model_number(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_model_number(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ModelNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_model_number(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_model_number(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ModelNumber)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_software_version(&self) -> Result { + }} + #[inline] pub fn get_software_version(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SoftwareVersion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_software_version(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_software_version(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SoftwareVersion)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_support_url(&self) -> Result> { + }} + #[inline] pub fn get_support_url(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportUrl)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_support_url(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_support_url(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SupportUrl)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_id(&self) -> Result { + }} + #[inline] pub fn get_app_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AppId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_app_id(&self, value: Guid) -> Result<()> { + }} + #[inline] pub fn set_app_id(&self, value: Guid) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AppId)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AllJoynAboutData: IAllJoynAboutData} 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(&self, out: *mut i32) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, + fn get_Properties(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT, fn get_AJSoftwareVersion(&self, out: *mut HSTRING) -> HRESULT, fn get_AppId(&self, out: *mut Guid) -> HRESULT, - fn get_DateOfManufacture(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_DateOfManufacture(&self, out: *mut *mut foundation::IReference) -> HRESULT, #[cfg(not(feature="windows-globalization"))] fn __Dummy5(&self) -> (), #[cfg(feature="windows-globalization")] fn get_DefaultLanguage(&self, out: *mut *mut super::super::globalization::Language) -> HRESULT, fn get_DeviceId(&self, out: *mut HSTRING) -> HRESULT, @@ -5271,132 +5271,132 @@ RT_INTERFACE!{interface IAllJoynAboutDataView(IAllJoynAboutDataViewVtbl): IInspe fn get_ModelNumber(&self, out: *mut HSTRING) -> HRESULT, fn get_SoftwareVersion(&self, out: *mut HSTRING) -> HRESULT, #[cfg(not(feature="windows-globalization"))] fn __Dummy10(&self) -> (), - #[cfg(feature="windows-globalization")] fn get_SupportedLanguages(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_SupportUrl(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + #[cfg(feature="windows-globalization")] fn get_SupportedLanguages(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_SupportUrl(&self, out: *mut *mut foundation::Uri) -> HRESULT, fn get_AppName(&self, out: *mut HSTRING) -> HRESULT, fn get_Description(&self, out: *mut HSTRING) -> HRESULT, fn get_DeviceName(&self, out: *mut HSTRING) -> HRESULT, fn get_Manufacturer(&self, out: *mut HSTRING) -> HRESULT }} impl IAllJoynAboutDataView { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ajsoftware_version(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_ajsoftware_version(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AJSoftwareVersion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_id(&self) -> Result { + }} + #[inline] pub fn get_app_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AppId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_date_of_manufacture(&self) -> Result>> { + }} + #[inline] pub fn get_date_of_manufacture(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DateOfManufacture)(self 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_default_language(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-globalization")] #[inline] pub fn get_default_language(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DefaultLanguage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_hardware_version(&self) -> Result { + }} + #[inline] pub fn get_hardware_version(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HardwareVersion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_model_number(&self) -> Result { + }} + #[inline] pub fn get_model_number(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ModelNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_software_version(&self) -> Result { + }} + #[inline] pub fn get_software_version(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SoftwareVersion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-globalization")] #[inline] pub unsafe fn get_supported_languages(&self) -> Result>> { + }} + #[cfg(feature="windows-globalization")] #[inline] pub fn get_supported_languages(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedLanguages)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_support_url(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_support_url(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportUrl)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_app_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_description(&self) -> Result { + }} + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_name(&self) -> Result { + }} + #[inline] pub fn get_device_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_manufacturer(&self) -> Result { + }} + #[inline] pub fn get_manufacturer(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Manufacturer)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class AllJoynAboutDataView: IAllJoynAboutDataView} impl RtActivatable for AllJoynAboutDataView {} impl AllJoynAboutDataView { - #[inline] pub fn get_data_by_session_port_async(uniqueName: &HStringArg, busAttachment: &AllJoynBusAttachment, sessionPort: u16) -> Result>> { unsafe { + #[inline] pub fn get_data_by_session_port_async(uniqueName: &HStringArg, busAttachment: &AllJoynBusAttachment, sessionPort: u16) -> Result>> { >::get_activation_factory().get_data_by_session_port_async(uniqueName, busAttachment, sessionPort) - }} - #[cfg(feature="windows-globalization")] #[inline] pub fn get_data_by_session_port_with_language_async(uniqueName: &HStringArg, busAttachment: &AllJoynBusAttachment, sessionPort: u16, language: &super::super::globalization::Language) -> Result>> { unsafe { + } + #[cfg(feature="windows-globalization")] #[inline] pub fn get_data_by_session_port_with_language_async(uniqueName: &HStringArg, busAttachment: &AllJoynBusAttachment, sessionPort: u16, language: &super::super::globalization::Language) -> Result>> { >::get_activation_factory().get_data_by_session_port_with_language_async(uniqueName, busAttachment, sessionPort, language) - }} + } } DEFINE_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]) [CLSID_AllJoynAboutDataView]); 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(&self, uniqueName: HSTRING, busAttachment: *mut AllJoynBusAttachment, sessionPort: u16, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-globalization")] fn GetDataBySessionPortWithLanguageAsync(&self, uniqueName: HSTRING, busAttachment: *mut AllJoynBusAttachment, sessionPort: u16, language: *mut super::super::globalization::Language, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetDataBySessionPortAsync(&self, uniqueName: HSTRING, busAttachment: *mut AllJoynBusAttachment, sessionPort: u16, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-globalization")] fn GetDataBySessionPortWithLanguageAsync(&self, uniqueName: HSTRING, busAttachment: *mut AllJoynBusAttachment, sessionPort: u16, language: *mut super::super::globalization::Language, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IAllJoynAboutDataViewStatics { - #[inline] pub unsafe fn get_data_by_session_port_async(&self, uniqueName: &HStringArg, busAttachment: &AllJoynBusAttachment, sessionPort: u16) -> Result>> { + #[inline] pub fn get_data_by_session_port_async(&self, uniqueName: &HStringArg, busAttachment: &AllJoynBusAttachment, sessionPort: u16) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDataBySessionPortAsync)(self as *const _ as *mut _, uniqueName.get(), busAttachment as *const _ as *mut _, sessionPort, &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(&self, uniqueName: &HStringArg, busAttachment: &AllJoynBusAttachment, sessionPort: u16, language: &super::super::globalization::Language) -> Result>> { + }} + #[cfg(feature="windows-globalization")] #[inline] pub fn get_data_by_session_port_with_language_async(&self, uniqueName: &HStringArg, busAttachment: &AllJoynBusAttachment, sessionPort: u16, language: &super::super::globalization::Language) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDataBySessionPortWithLanguageAsync)(self as *const _ as *mut _, 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) } - } + }} } 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(&self) -> HRESULT }} impl IAllJoynAcceptSessionJoiner { - #[inline] pub unsafe fn accept(&self) -> Result<()> { + #[inline] pub fn accept(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Accept)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IAllJoynAcceptSessionJoinerEventArgs, 1325093733, 16010, 16983, 143, 16, 83, 156, 224, 213, 108, 15); RT_INTERFACE!{interface IAllJoynAcceptSessionJoinerEventArgs(IAllJoynAcceptSessionJoinerEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynAcceptSessionJoinerEventArgs] { @@ -5408,42 +5408,42 @@ RT_INTERFACE!{interface IAllJoynAcceptSessionJoinerEventArgs(IAllJoynAcceptSessi fn Accept(&self) -> HRESULT }} impl IAllJoynAcceptSessionJoinerEventArgs { - #[inline] pub unsafe fn get_unique_name(&self) -> Result { + #[inline] pub fn get_unique_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UniqueName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_session_port(&self) -> Result { + }} + #[inline] pub fn get_session_port(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SessionPort)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_traffic_type(&self) -> Result { + }} + #[inline] pub fn get_traffic_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TrafficType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_same_physical_node(&self) -> Result { + }} + #[inline] pub fn get_same_physical_node(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SamePhysicalNode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_same_network(&self) -> Result { + }} + #[inline] pub fn get_same_network(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SameNetwork)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn accept(&self) -> Result<()> { + }} + #[inline] pub fn accept(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Accept)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AllJoynAcceptSessionJoinerEventArgs: IAllJoynAcceptSessionJoinerEventArgs} impl RtActivatable for AllJoynAcceptSessionJoinerEventArgs {} impl AllJoynAcceptSessionJoinerEventArgs { - #[inline] pub fn create(uniqueName: &HStringArg, sessionPort: u16, trafficType: AllJoynTrafficType, proximity: u8, acceptSessionJoiner: &IAllJoynAcceptSessionJoiner) -> Result> { unsafe { + #[inline] pub fn create(uniqueName: &HStringArg, sessionPort: u16, trafficType: AllJoynTrafficType, proximity: u8, acceptSessionJoiner: &IAllJoynAcceptSessionJoiner) -> Result> { >::get_activation_factory().create(uniqueName, sessionPort, trafficType, proximity, acceptSessionJoiner) - }} + } } DEFINE_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]) [CLSID_AllJoynAcceptSessionJoinerEventArgs]); DEFINE_IID!(IID_IAllJoynAcceptSessionJoinerEventArgsFactory, 3024313280, 24901, 17054, 132, 219, 213, 191, 231, 114, 177, 79); @@ -5451,11 +5451,11 @@ RT_INTERFACE!{static interface IAllJoynAcceptSessionJoinerEventArgsFactory(IAllJ fn Create(&self, uniqueName: HSTRING, sessionPort: u16, trafficType: AllJoynTrafficType, proximity: u8, acceptSessionJoiner: *mut IAllJoynAcceptSessionJoiner, out: *mut *mut AllJoynAcceptSessionJoinerEventArgs) -> HRESULT }} impl IAllJoynAcceptSessionJoinerEventArgsFactory { - #[inline] pub unsafe fn create(&self, uniqueName: &HStringArg, sessionPort: u16, trafficType: AllJoynTrafficType, proximity: u8, acceptSessionJoiner: &IAllJoynAcceptSessionJoiner) -> Result> { + #[inline] pub fn create(&self, uniqueName: &HStringArg, sessionPort: u16, trafficType: AllJoynTrafficType, proximity: u8, acceptSessionJoiner: &IAllJoynAcceptSessionJoiner) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, uniqueName.get(), sessionPort, trafficType, proximity, acceptSessionJoiner as *const _ as *mut _, &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] { @@ -5464,21 +5464,21 @@ RT_INTERFACE!{interface IAllJoynAuthenticationCompleteEventArgs(IAllJoynAuthenti fn get_Succeeded(&self, out: *mut bool) -> HRESULT }} impl IAllJoynAuthenticationCompleteEventArgs { - #[inline] pub unsafe fn get_authentication_mechanism(&self) -> Result { + #[inline] pub fn get_authentication_mechanism(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AuthenticationMechanism)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_peer_unique_name(&self) -> Result { + }} + #[inline] pub fn get_peer_unique_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PeerUniqueName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_succeeded(&self) -> Result { + }} + #[inline] pub fn get_succeeded(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Succeeded)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AllJoynAuthenticationCompleteEventArgs: IAllJoynAuthenticationCompleteEventArgs} RT_ENUM! { enum AllJoynAuthenticationMechanism: i32 { @@ -5490,161 +5490,161 @@ RT_INTERFACE!{interface IAllJoynBusAttachment(IAllJoynBusAttachmentVtbl): IInspe fn get_ConnectionSpecification(&self, out: *mut HSTRING) -> HRESULT, fn get_State(&self, out: *mut AllJoynBusAttachmentState) -> HRESULT, fn get_UniqueName(&self, out: *mut HSTRING) -> HRESULT, - fn PingAsync(&self, uniqueName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn PingAsync(&self, uniqueName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn Connect(&self) -> HRESULT, fn Disconnect(&self) -> HRESULT, - fn add_StateChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StateChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_AuthenticationMechanisms(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn add_CredentialsRequested(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CredentialsRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_CredentialsVerificationRequested(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CredentialsVerificationRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_AuthenticationComplete(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AuthenticationComplete(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_StateChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StateChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn get_AuthenticationMechanisms(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn add_CredentialsRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CredentialsRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_CredentialsVerificationRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CredentialsVerificationRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_AuthenticationComplete(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AuthenticationComplete(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IAllJoynBusAttachment { - #[inline] pub unsafe fn get_about_data(&self) -> Result> { + #[inline] pub fn get_about_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AboutData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_connection_specification(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_connection_specification(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ConnectionSpecification)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_state(&self) -> Result { + }} + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_unique_name(&self) -> Result { + }} + #[inline] pub fn get_unique_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UniqueName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn ping_async(&self, uniqueName: &HStringArg) -> Result>> { + }} + #[inline] pub fn ping_async(&self, uniqueName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PingAsync)(self as *const _ as *mut _, uniqueName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn connect(&self) -> Result<()> { + }} + #[inline] pub fn connect(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Connect)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn disconnect(&self) -> Result<()> { + }} + #[inline] pub fn disconnect(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Disconnect)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_state_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_state_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StateChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_state_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_state_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StateChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_authentication_mechanisms(&self) -> Result>> { + }} + #[inline] pub fn get_authentication_mechanisms(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AuthenticationMechanisms)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_credentials_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_credentials_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CredentialsRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_credentials_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_credentials_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CredentialsRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_credentials_verification_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_credentials_verification_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CredentialsVerificationRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_credentials_verification_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_credentials_verification_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CredentialsVerificationRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_authentication_complete(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_authentication_complete(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AuthenticationComplete)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_authentication_complete(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_authentication_complete(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AuthenticationComplete)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AllJoynBusAttachment: IAllJoynBusAttachment} impl RtActivatable for AllJoynBusAttachment {} impl RtActivatable for AllJoynBusAttachment {} impl RtActivatable for AllJoynBusAttachment {} impl AllJoynBusAttachment { - #[inline] pub fn create(connectionSpecification: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(connectionSpecification: &HStringArg) -> Result> { >::get_activation_factory().create(connectionSpecification) - }} - #[inline] pub fn get_default() -> Result> { unsafe { + } + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} - #[inline] pub fn get_watcher(requiredInterfaces: &super::super::foundation::collections::IIterable) -> Result> { unsafe { + } + #[inline] pub fn get_watcher(requiredInterfaces: &foundation::collections::IIterable) -> Result>> { >::get_activation_factory().get_watcher(requiredInterfaces) - }} + } } DEFINE_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]) [CLSID_AllJoynBusAttachment]); 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(&self, serviceInfo: *mut AllJoynServiceInfo, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetAboutDataAsync(&self, serviceInfo: *mut AllJoynServiceInfo, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-globalization"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-globalization")] fn GetAboutDataWithLanguageAsync(&self, serviceInfo: *mut AllJoynServiceInfo, language: *mut super::super::globalization::Language, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_AcceptSessionJoinerRequested(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AcceptSessionJoinerRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_SessionJoined(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SessionJoined(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + #[cfg(feature="windows-globalization")] fn GetAboutDataWithLanguageAsync(&self, serviceInfo: *mut AllJoynServiceInfo, language: *mut super::super::globalization::Language, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_AcceptSessionJoinerRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AcceptSessionJoinerRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_SessionJoined(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SessionJoined(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IAllJoynBusAttachment2 { - #[inline] pub unsafe fn get_about_data_async(&self, serviceInfo: &AllJoynServiceInfo) -> Result>> { + #[inline] pub fn get_about_data_async(&self, serviceInfo: &AllJoynServiceInfo) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAboutDataAsync)(self as *const _ as *mut _, serviceInfo 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_about_data_with_language_async(&self, serviceInfo: &AllJoynServiceInfo, language: &super::super::globalization::Language) -> Result>> { + }} + #[cfg(feature="windows-globalization")] #[inline] pub fn get_about_data_with_language_async(&self, serviceInfo: &AllJoynServiceInfo, language: &super::super::globalization::Language) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAboutDataWithLanguageAsync)(self as *const _ as *mut _, 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(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_accept_session_joiner_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AcceptSessionJoinerRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_accept_session_joiner_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_accept_session_joiner_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AcceptSessionJoinerRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_session_joined(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_session_joined(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SessionJoined)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_session_joined(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_session_joined(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SessionJoined)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } 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(&self, connectionSpecification: HSTRING, out: *mut *mut AllJoynBusAttachment) -> HRESULT }} impl IAllJoynBusAttachmentFactory { - #[inline] pub unsafe fn create(&self, connectionSpecification: &HStringArg) -> Result> { + #[inline] pub fn create(&self, connectionSpecification: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, connectionSpecification.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum AllJoynBusAttachmentState: i32 { Disconnected (AllJoynBusAttachmentState_Disconnected) = 0, Connecting (AllJoynBusAttachmentState_Connecting) = 1, Connected (AllJoynBusAttachmentState_Connected) = 2, Disconnecting (AllJoynBusAttachmentState_Disconnecting) = 3, @@ -5655,34 +5655,34 @@ RT_INTERFACE!{interface IAllJoynBusAttachmentStateChangedEventArgs(IAllJoynBusAt fn get_Status(&self, out: *mut i32) -> HRESULT }} impl IAllJoynBusAttachmentStateChangedEventArgs { - #[inline] pub unsafe fn get_state(&self) -> Result { + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AllJoynBusAttachmentStateChangedEventArgs: IAllJoynBusAttachmentStateChangedEventArgs} 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(&self, out: *mut *mut AllJoynBusAttachment) -> HRESULT, - fn GetWatcher(&self, requiredInterfaces: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::enumeration::DeviceWatcher) -> HRESULT + fn GetWatcher(&self, requiredInterfaces: *mut foundation::collections::IIterable, out: *mut *mut super::enumeration::DeviceWatcher) -> HRESULT }} impl IAllJoynBusAttachmentStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_watcher(&self, requiredInterfaces: &super::super::foundation::collections::IIterable) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_watcher(&self, requiredInterfaces: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetWatcher)(self as *const _ as *mut _, requiredInterfaces as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IAllJoynBusObject, 3908928094, 63290, 18700, 136, 4, 4, 224, 38, 100, 48, 71); RT_INTERFACE!{interface IAllJoynBusObject(IAllJoynBusObjectVtbl): IInspectable(IInspectableVtbl) [IID_IAllJoynBusObject] { @@ -5691,52 +5691,52 @@ RT_INTERFACE!{interface IAllJoynBusObject(IAllJoynBusObjectVtbl): IInspectable(I fn AddProducer(&self, producer: *mut IAllJoynProducer) -> HRESULT, fn get_BusAttachment(&self, out: *mut *mut AllJoynBusAttachment) -> HRESULT, fn get_Session(&self, out: *mut *mut AllJoynSession) -> HRESULT, - fn add_Stopped(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Stopped(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_Stopped(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Stopped(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IAllJoynBusObject { - #[inline] pub unsafe fn start(&self) -> Result<()> { + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_producer(&self, producer: &IAllJoynProducer) -> Result<()> { + }} + #[inline] pub fn add_producer(&self, producer: &IAllJoynProducer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddProducer)(self as *const _ as *mut _, producer as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_bus_attachment(&self) -> Result> { + }} + #[inline] pub fn get_bus_attachment(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BusAttachment)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_session(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_session(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Session)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_stopped(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_stopped(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Stopped)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_stopped(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_stopped(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Stopped)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AllJoynBusObject: IAllJoynBusObject} impl RtActivatable for AllJoynBusObject {} impl RtActivatable for AllJoynBusObject {} impl AllJoynBusObject { - #[inline] pub fn create(objectPath: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(objectPath: &HStringArg) -> Result> { >::get_activation_factory().create(objectPath) - }} - #[inline] pub fn create_with_bus_attachment(objectPath: &HStringArg, busAttachment: &AllJoynBusAttachment) -> Result> { unsafe { + } + #[inline] pub fn create_with_bus_attachment(objectPath: &HStringArg, busAttachment: &AllJoynBusAttachment) -> Result> { >::get_activation_factory().create_with_bus_attachment(objectPath, busAttachment) - }} + } } DEFINE_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]) [CLSID_AllJoynBusObject]); DEFINE_IID!(IID_IAllJoynBusObjectFactory, 741318411, 36354, 20380, 172, 39, 234, 109, 173, 93, 59, 80); @@ -5745,34 +5745,34 @@ RT_INTERFACE!{static interface IAllJoynBusObjectFactory(IAllJoynBusObjectFactory fn CreateWithBusAttachment(&self, objectPath: HSTRING, busAttachment: *mut AllJoynBusAttachment, out: *mut *mut AllJoynBusObject) -> HRESULT }} impl IAllJoynBusObjectFactory { - #[inline] pub unsafe fn create(&self, objectPath: &HStringArg) -> Result> { + #[inline] pub fn create(&self, objectPath: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, objectPath.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_bus_attachment(&self, objectPath: &HStringArg, busAttachment: &AllJoynBusAttachment) -> Result> { + }} + #[inline] pub fn create_with_bus_attachment(&self, objectPath: &HStringArg, busAttachment: &AllJoynBusAttachment) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithBusAttachment)(self as *const _ as *mut _, objectPath.get(), busAttachment as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut i32) -> HRESULT }} impl IAllJoynBusObjectStoppedEventArgs { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AllJoynBusObjectStoppedEventArgs: IAllJoynBusObjectStoppedEventArgs} impl RtActivatable for AllJoynBusObjectStoppedEventArgs {} impl AllJoynBusObjectStoppedEventArgs { - #[inline] pub fn create(status: i32) -> Result> { unsafe { + #[inline] pub fn create(status: i32) -> Result> { >::get_activation_factory().create(status) - }} + } } DEFINE_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]) [CLSID_AllJoynBusObjectStoppedEventArgs]); DEFINE_IID!(IID_IAllJoynBusObjectStoppedEventArgsFactory, 1797455176, 53411, 16981, 149, 58, 71, 114, 180, 2, 128, 115); @@ -5780,11 +5780,11 @@ RT_INTERFACE!{static interface IAllJoynBusObjectStoppedEventArgsFactory(IAllJoyn fn Create(&self, status: i32, out: *mut *mut AllJoynBusObjectStoppedEventArgs) -> HRESULT }} impl IAllJoynBusObjectStoppedEventArgsFactory { - #[inline] pub unsafe fn create(&self, status: i32) -> Result> { + #[inline] pub fn create(&self, status: i32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, status, &mut out); if hr == S_OK { Ok(ComPtr::wrap(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] { @@ -5797,42 +5797,42 @@ RT_INTERFACE!{interface IAllJoynCredentials(IAllJoynCredentialsVtbl): IInspectab #[cfg(feature="windows-security")] fn get_PasswordCredential(&self, out: *mut *mut super::super::security::credentials::PasswordCredential) -> HRESULT, #[cfg(not(feature="windows-security"))] fn __Dummy4(&self) -> (), #[cfg(feature="windows-security")] fn put_PasswordCredential(&self, value: *mut super::super::security::credentials::PasswordCredential) -> HRESULT, - fn get_Timeout(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_Timeout(&self, value: super::super::foundation::TimeSpan) -> HRESULT + fn get_Timeout(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_Timeout(&self, value: foundation::TimeSpan) -> HRESULT }} impl IAllJoynCredentials { - #[inline] pub unsafe fn get_authentication_mechanism(&self) -> Result { + #[inline] pub fn get_authentication_mechanism(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AuthenticationMechanism)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-security")] #[inline] pub unsafe fn get_certificate(&self) -> Result> { + }} + #[cfg(feature="windows-security")] #[inline] pub fn get_certificate(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Certificate)(self 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 set_certificate(&self, value: &super::super::security::cryptography::certificates::Certificate) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-security")] #[inline] pub fn set_certificate(&self, value: &super::super::security::cryptography::certificates::Certificate) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Certificate)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-security")] #[inline] pub unsafe fn get_password_credential(&self) -> Result> { + }} + #[cfg(feature="windows-security")] #[inline] pub fn get_password_credential(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PasswordCredential)(self 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 set_password_credential(&self, value: &super::super::security::credentials::PasswordCredential) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-security")] #[inline] pub fn set_password_credential(&self, value: &super::super::security::credentials::PasswordCredential) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PasswordCredential)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_timeout(&self) -> Result { + }} + #[inline] pub fn get_timeout(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timeout)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_timeout(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_timeout(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Timeout)(self as *const _ as *mut _, value); 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); @@ -5841,34 +5841,34 @@ RT_INTERFACE!{interface IAllJoynCredentialsRequestedEventArgs(IAllJoynCredential fn get_Credentials(&self, out: *mut *mut AllJoynCredentials) -> HRESULT, fn get_PeerUniqueName(&self, out: *mut HSTRING) -> HRESULT, fn get_RequestedUserName(&self, out: *mut HSTRING) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IAllJoynCredentialsRequestedEventArgs { - #[inline] pub unsafe fn get_attempt_count(&self) -> Result { + #[inline] pub fn get_attempt_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AttemptCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_credentials(&self) -> Result> { + }} + #[inline] pub fn get_credentials(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Credentials)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_peer_unique_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_peer_unique_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PeerUniqueName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_requested_user_name(&self) -> Result { + }} + #[inline] pub fn get_requested_user_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RequestedUserName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AllJoynCredentialsRequestedEventArgs: IAllJoynCredentialsRequestedEventArgs} DEFINE_IID!(IID_IAllJoynCredentialsVerificationRequestedEventArgs, 2148169234, 47109, 17583, 162, 225, 121, 42, 182, 85, 162, 208); @@ -5880,52 +5880,52 @@ RT_INTERFACE!{interface IAllJoynCredentialsVerificationRequestedEventArgs(IAllJo #[cfg(not(feature="windows-networking"))] fn __Dummy3(&self) -> (), #[cfg(feature="windows-networking")] fn get_PeerCertificateErrorSeverity(&self, out: *mut super::super::networking::sockets::SocketSslErrorSeverity) -> HRESULT, #[cfg(not(feature="windows-security"))] fn __Dummy4(&self) -> (), - #[cfg(feature="windows-security")] fn get_PeerCertificateErrors(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + #[cfg(feature="windows-security")] fn get_PeerCertificateErrors(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, #[cfg(not(feature="windows-security"))] fn __Dummy5(&self) -> (), - #[cfg(feature="windows-security")] fn get_PeerIntermediateCertificates(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + #[cfg(feature="windows-security")] fn get_PeerIntermediateCertificates(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn Accept(&self) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IAllJoynCredentialsVerificationRequestedEventArgs { - #[inline] pub unsafe fn get_authentication_mechanism(&self) -> Result { + #[inline] pub fn get_authentication_mechanism(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AuthenticationMechanism)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_peer_unique_name(&self) -> Result { + }} + #[inline] pub fn get_peer_unique_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PeerUniqueName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-security")] #[inline] pub unsafe fn get_peer_certificate(&self) -> Result> { + }} + #[cfg(feature="windows-security")] #[inline] pub fn get_peer_certificate(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PeerCertificate)(self 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 get_peer_certificate_error_severity(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-networking")] #[inline] pub fn get_peer_certificate_error_severity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PeerCertificateErrorSeverity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-security")] #[inline] pub unsafe fn get_peer_certificate_errors(&self) -> Result>> { + }} + #[cfg(feature="windows-security")] #[inline] pub fn get_peer_certificate_errors(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PeerCertificateErrors)(self 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 get_peer_intermediate_certificates(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-security")] #[inline] pub fn get_peer_intermediate_certificates(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PeerIntermediateCertificates)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn accept(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn accept(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Accept)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AllJoynCredentialsVerificationRequestedEventArgs: IAllJoynCredentialsVerificationRequestedEventArgs} DEFINE_IID!(IID_IAllJoynMessageInfo, 4281008423, 11282, 18521, 170, 58, 199, 68, 97, 238, 129, 76); @@ -5933,18 +5933,18 @@ RT_INTERFACE!{interface IAllJoynMessageInfo(IAllJoynMessageInfoVtbl): IInspectab fn get_SenderUniqueName(&self, out: *mut HSTRING) -> HRESULT }} impl IAllJoynMessageInfo { - #[inline] pub unsafe fn get_sender_unique_name(&self) -> Result { + #[inline] pub fn get_sender_unique_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SenderUniqueName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class AllJoynMessageInfo: IAllJoynMessageInfo} impl RtActivatable for AllJoynMessageInfo {} impl AllJoynMessageInfo { - #[inline] pub fn create(senderUniqueName: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(senderUniqueName: &HStringArg) -> Result> { >::get_activation_factory().create(senderUniqueName) - }} + } } DEFINE_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]) [CLSID_AllJoynMessageInfo]); DEFINE_IID!(IID_IAllJoynMessageInfoFactory, 879119402, 33417, 17364, 180, 168, 63, 77, 227, 89, 240, 67); @@ -5952,39 +5952,39 @@ RT_INTERFACE!{static interface IAllJoynMessageInfoFactory(IAllJoynMessageInfoFac fn Create(&self, senderUniqueName: HSTRING, out: *mut *mut AllJoynMessageInfo) -> HRESULT }} impl IAllJoynMessageInfoFactory { - #[inline] pub unsafe fn create(&self, senderUniqueName: &HStringArg) -> Result> { + #[inline] pub fn create(&self, senderUniqueName: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, senderUniqueName.get(), &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(&self, busObject: *mut AllJoynBusObject) -> HRESULT }} impl IAllJoynProducer { - #[inline] pub unsafe fn set_bus_object(&self, busObject: &AllJoynBusObject) -> Result<()> { + #[inline] pub fn set_bus_object(&self, busObject: &AllJoynBusObject) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetBusObject)(self as *const _ as *mut _, busObject as *const _ as *mut _); if hr == S_OK { Ok(()) } 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(&self, out: *mut i32) -> HRESULT }} impl IAllJoynProducerStoppedEventArgs { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AllJoynProducerStoppedEventArgs: IAllJoynProducerStoppedEventArgs} impl RtActivatable for AllJoynProducerStoppedEventArgs {} impl AllJoynProducerStoppedEventArgs { - #[inline] pub fn create(status: i32) -> Result> { unsafe { + #[inline] pub fn create(status: i32) -> Result> { >::get_activation_factory().create(status) - }} + } } DEFINE_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]) [CLSID_AllJoynProducerStoppedEventArgs]); DEFINE_IID!(IID_IAllJoynProducerStoppedEventArgsFactory, 1448253793, 45593, 19822, 159, 120, 250, 63, 153, 250, 143, 229); @@ -5992,11 +5992,11 @@ RT_INTERFACE!{static interface IAllJoynProducerStoppedEventArgsFactory(IAllJoynP fn Create(&self, status: i32, out: *mut *mut AllJoynProducerStoppedEventArgs) -> HRESULT }} impl IAllJoynProducerStoppedEventArgsFactory { - #[inline] pub unsafe fn create(&self, status: i32) -> Result> { + #[inline] pub fn create(&self, status: i32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, status, &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] { @@ -6005,32 +6005,32 @@ RT_INTERFACE!{interface IAllJoynServiceInfo(IAllJoynServiceInfoVtbl): IInspectab fn get_SessionPort(&self, out: *mut u16) -> HRESULT }} impl IAllJoynServiceInfo { - #[inline] pub unsafe fn get_unique_name(&self) -> Result { + #[inline] pub fn get_unique_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UniqueName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_object_path(&self) -> Result { + }} + #[inline] pub fn get_object_path(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ObjectPath)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_session_port(&self) -> Result { + }} + #[inline] pub fn get_session_port(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SessionPort)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AllJoynServiceInfo: IAllJoynServiceInfo} impl RtActivatable for AllJoynServiceInfo {} impl RtActivatable for AllJoynServiceInfo {} impl AllJoynServiceInfo { - #[inline] pub fn create(uniqueName: &HStringArg, objectPath: &HStringArg, sessionPort: u16) -> Result> { unsafe { + #[inline] pub fn create(uniqueName: &HStringArg, objectPath: &HStringArg, sessionPort: u16) -> Result> { >::get_activation_factory().create(uniqueName, objectPath, sessionPort) - }} - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} + } } DEFINE_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]) [CLSID_AllJoynServiceInfo]); DEFINE_IID!(IID_IAllJoynServiceInfoFactory, 1971444413, 65027, 20299, 148, 164, 240, 47, 220, 189, 17, 184); @@ -6038,29 +6038,29 @@ RT_INTERFACE!{static interface IAllJoynServiceInfoFactory(IAllJoynServiceInfoFac fn Create(&self, uniqueName: HSTRING, objectPath: HSTRING, sessionPort: u16, out: *mut *mut AllJoynServiceInfo) -> HRESULT }} impl IAllJoynServiceInfoFactory { - #[inline] pub unsafe fn create(&self, uniqueName: &HStringArg, objectPath: &HStringArg, sessionPort: u16) -> Result> { + #[inline] pub fn create(&self, uniqueName: &HStringArg, objectPath: &HStringArg, sessionPort: u16) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, uniqueName.get(), objectPath.get(), sessionPort, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut HSTRING) -> HRESULT }} impl IAllJoynServiceInfoRemovedEventArgs { - #[inline] pub unsafe fn get_unique_name(&self) -> Result { + #[inline] pub fn get_unique_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UniqueName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class AllJoynServiceInfoRemovedEventArgs: IAllJoynServiceInfoRemovedEventArgs} impl RtActivatable for AllJoynServiceInfoRemovedEventArgs {} impl AllJoynServiceInfoRemovedEventArgs { - #[inline] pub fn create(uniqueName: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(uniqueName: &HStringArg) -> Result> { >::get_activation_factory().create(uniqueName) - }} + } } DEFINE_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]) [CLSID_AllJoynServiceInfoRemovedEventArgs]); DEFINE_IID!(IID_IAllJoynServiceInfoRemovedEventArgsFactory, 230655527, 39679, 18773, 146, 39, 105, 83, 186, 244, 21, 105); @@ -6068,88 +6068,88 @@ RT_INTERFACE!{static interface IAllJoynServiceInfoRemovedEventArgsFactory(IAllJo fn Create(&self, uniqueName: HSTRING, out: *mut *mut AllJoynServiceInfoRemovedEventArgs) -> HRESULT }} impl IAllJoynServiceInfoRemovedEventArgsFactory { - #[inline] pub unsafe fn create(&self, uniqueName: &HStringArg) -> Result> { + #[inline] pub fn create(&self, uniqueName: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, uniqueName.get(), &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(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IAllJoynServiceInfoStatics { - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &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(&self, out: *mut i32) -> HRESULT, fn get_Status(&self, out: *mut i32) -> HRESULT, - fn RemoveMemberAsync(&self, uniqueName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_MemberAdded(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_MemberAdded(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_MemberRemoved(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_MemberRemoved(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Lost(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Lost(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn RemoveMemberAsync(&self, uniqueName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_MemberAdded(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_MemberAdded(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_MemberRemoved(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_MemberRemoved(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Lost(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Lost(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IAllJoynSession { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_member_async(&self, uniqueName: &HStringArg) -> Result>> { + }} + #[inline] pub fn remove_member_async(&self, uniqueName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RemoveMemberAsync)(self as *const _ as *mut _, uniqueName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_member_added(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_member_added(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_MemberAdded)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_member_added(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_member_added(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_MemberAdded)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_member_removed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_member_removed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_MemberRemoved)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_member_removed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_member_removed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_MemberRemoved)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_lost(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_lost(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Lost)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_lost(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_lost(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Lost)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AllJoynSession: IAllJoynSession} impl RtActivatable for AllJoynSession {} impl AllJoynSession { - #[inline] pub fn get_from_service_info_async(serviceInfo: &AllJoynServiceInfo) -> Result>> { unsafe { + #[inline] pub fn get_from_service_info_async(serviceInfo: &AllJoynServiceInfo) -> Result>> { >::get_activation_factory().get_from_service_info_async(serviceInfo) - }} - #[inline] pub fn get_from_service_info_and_bus_attachment_async(serviceInfo: &AllJoynServiceInfo, busAttachment: &AllJoynBusAttachment) -> Result>> { unsafe { + } + #[inline] pub fn get_from_service_info_and_bus_attachment_async(serviceInfo: &AllJoynServiceInfo, busAttachment: &AllJoynBusAttachment) -> Result>> { >::get_activation_factory().get_from_service_info_and_bus_attachment_async(serviceInfo, busAttachment) - }} + } } DEFINE_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]) [CLSID_AllJoynSession]); DEFINE_IID!(IID_IAllJoynSessionJoinedEventArgs, 2661243856, 46551, 18373, 141, 171, 176, 64, 204, 25, 40, 113); @@ -6157,18 +6157,18 @@ RT_INTERFACE!{interface IAllJoynSessionJoinedEventArgs(IAllJoynSessionJoinedEven fn get_Session(&self, out: *mut *mut AllJoynSession) -> HRESULT }} impl IAllJoynSessionJoinedEventArgs { - #[inline] pub unsafe fn get_session(&self) -> Result> { + #[inline] pub fn get_session(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Session)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AllJoynSessionJoinedEventArgs: IAllJoynSessionJoinedEventArgs} impl RtActivatable for AllJoynSessionJoinedEventArgs {} impl AllJoynSessionJoinedEventArgs { - #[inline] pub fn create(session: &AllJoynSession) -> Result> { unsafe { + #[inline] pub fn create(session: &AllJoynSession) -> Result> { >::get_activation_factory().create(session) - }} + } } DEFINE_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]) [CLSID_AllJoynSessionJoinedEventArgs]); DEFINE_IID!(IID_IAllJoynSessionJoinedEventArgsFactory, 1747244681, 54987, 19870, 160, 158, 53, 128, 104, 112, 177, 127); @@ -6176,29 +6176,29 @@ RT_INTERFACE!{static interface IAllJoynSessionJoinedEventArgsFactory(IAllJoynSes fn Create(&self, session: *mut AllJoynSession, out: *mut *mut AllJoynSessionJoinedEventArgs) -> HRESULT }} impl IAllJoynSessionJoinedEventArgsFactory { - #[inline] pub unsafe fn create(&self, session: &AllJoynSession) -> Result> { + #[inline] pub fn create(&self, session: &AllJoynSession) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, session 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(&self, out: *mut AllJoynSessionLostReason) -> HRESULT }} impl IAllJoynSessionLostEventArgs { - #[inline] pub unsafe fn get_reason(&self) -> Result { + #[inline] pub fn get_reason(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Reason)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AllJoynSessionLostEventArgs: IAllJoynSessionLostEventArgs} impl RtActivatable for AllJoynSessionLostEventArgs {} impl AllJoynSessionLostEventArgs { - #[inline] pub fn create(reason: AllJoynSessionLostReason) -> Result> { unsafe { + #[inline] pub fn create(reason: AllJoynSessionLostReason) -> Result> { >::get_activation_factory().create(reason) - }} + } } DEFINE_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]) [CLSID_AllJoynSessionLostEventArgs]); DEFINE_IID!(IID_IAllJoynSessionLostEventArgsFactory, 331087154, 54004, 18889, 152, 14, 40, 5, 225, 53, 134, 177); @@ -6206,11 +6206,11 @@ RT_INTERFACE!{static interface IAllJoynSessionLostEventArgsFactory(IAllJoynSessi fn Create(&self, reason: AllJoynSessionLostReason, out: *mut *mut AllJoynSessionLostEventArgs) -> HRESULT }} impl IAllJoynSessionLostEventArgsFactory { - #[inline] pub unsafe fn create(&self, reason: AllJoynSessionLostReason) -> Result> { + #[inline] pub fn create(&self, reason: AllJoynSessionLostReason) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, reason, &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, @@ -6220,18 +6220,18 @@ RT_INTERFACE!{interface IAllJoynSessionMemberAddedEventArgs(IAllJoynSessionMembe fn get_UniqueName(&self, out: *mut HSTRING) -> HRESULT }} impl IAllJoynSessionMemberAddedEventArgs { - #[inline] pub unsafe fn get_unique_name(&self) -> Result { + #[inline] pub fn get_unique_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UniqueName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class AllJoynSessionMemberAddedEventArgs: IAllJoynSessionMemberAddedEventArgs} impl RtActivatable for AllJoynSessionMemberAddedEventArgs {} impl AllJoynSessionMemberAddedEventArgs { - #[inline] pub fn create(uniqueName: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(uniqueName: &HStringArg) -> Result> { >::get_activation_factory().create(uniqueName) - }} + } } DEFINE_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]) [CLSID_AllJoynSessionMemberAddedEventArgs]); DEFINE_IID!(IID_IAllJoynSessionMemberAddedEventArgsFactory, 874373970, 7475, 16545, 161, 211, 229, 119, 112, 32, 225, 241); @@ -6239,29 +6239,29 @@ RT_INTERFACE!{static interface IAllJoynSessionMemberAddedEventArgsFactory(IAllJo fn Create(&self, uniqueName: HSTRING, out: *mut *mut AllJoynSessionMemberAddedEventArgs) -> HRESULT }} impl IAllJoynSessionMemberAddedEventArgsFactory { - #[inline] pub unsafe fn create(&self, uniqueName: &HStringArg) -> Result> { + #[inline] pub fn create(&self, uniqueName: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, uniqueName.get(), &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(&self, out: *mut HSTRING) -> HRESULT }} impl IAllJoynSessionMemberRemovedEventArgs { - #[inline] pub unsafe fn get_unique_name(&self) -> Result { + #[inline] pub fn get_unique_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UniqueName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class AllJoynSessionMemberRemovedEventArgs: IAllJoynSessionMemberRemovedEventArgs} impl RtActivatable for AllJoynSessionMemberRemovedEventArgs {} impl AllJoynSessionMemberRemovedEventArgs { - #[inline] pub fn create(uniqueName: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(uniqueName: &HStringArg) -> Result> { >::get_activation_factory().create(uniqueName) - }} + } } DEFINE_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]) [CLSID_AllJoynSessionMemberRemovedEventArgs]); DEFINE_IID!(IID_IAllJoynSessionMemberRemovedEventArgsFactory, 3302184424, 17080, 19303, 183, 87, 208, 207, 202, 213, 146, 128); @@ -6269,86 +6269,86 @@ RT_INTERFACE!{static interface IAllJoynSessionMemberRemovedEventArgsFactory(IAll fn Create(&self, uniqueName: HSTRING, out: *mut *mut AllJoynSessionMemberRemovedEventArgs) -> HRESULT }} impl IAllJoynSessionMemberRemovedEventArgsFactory { - #[inline] pub unsafe fn create(&self, uniqueName: &HStringArg) -> Result> { + #[inline] pub fn create(&self, uniqueName: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, uniqueName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, serviceInfo: *mut AllJoynServiceInfo, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetFromServiceInfoAndBusAttachmentAsync(&self, serviceInfo: *mut AllJoynServiceInfo, busAttachment: *mut AllJoynBusAttachment, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetFromServiceInfoAsync(&self, serviceInfo: *mut AllJoynServiceInfo, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetFromServiceInfoAndBusAttachmentAsync(&self, serviceInfo: *mut AllJoynServiceInfo, busAttachment: *mut AllJoynBusAttachment, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IAllJoynSessionStatics { - #[inline] pub unsafe fn get_from_service_info_async(&self, serviceInfo: &AllJoynServiceInfo) -> Result>> { + #[inline] pub fn get_from_service_info_async(&self, serviceInfo: &AllJoynServiceInfo) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFromServiceInfoAsync)(self as *const _ as *mut _, 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(&self, serviceInfo: &AllJoynServiceInfo, busAttachment: &AllJoynBusAttachment) -> Result>> { + }} + #[inline] pub fn get_from_service_info_and_bus_attachment_async(&self, serviceInfo: &AllJoynServiceInfo, busAttachment: &AllJoynBusAttachment) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFromServiceInfoAndBusAttachmentAsync)(self as *const _ as *mut _, serviceInfo as *const _ as *mut _, busAttachment as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class AllJoynStatus} impl RtActivatable for AllJoynStatus {} impl AllJoynStatus { - #[inline] pub fn get_ok() -> Result { unsafe { + #[inline] pub fn get_ok() -> Result { >::get_activation_factory().get_ok() - }} - #[inline] pub fn get_fail() -> Result { unsafe { + } + #[inline] pub fn get_fail() -> Result { >::get_activation_factory().get_fail() - }} - #[inline] pub fn get_operation_timed_out() -> Result { unsafe { + } + #[inline] pub fn get_operation_timed_out() -> Result { >::get_activation_factory().get_operation_timed_out() - }} - #[inline] pub fn get_other_end_closed() -> Result { unsafe { + } + #[inline] pub fn get_other_end_closed() -> Result { >::get_activation_factory().get_other_end_closed() - }} - #[inline] pub fn get_connection_refused() -> Result { unsafe { + } + #[inline] pub fn get_connection_refused() -> Result { >::get_activation_factory().get_connection_refused() - }} - #[inline] pub fn get_authentication_failed() -> Result { unsafe { + } + #[inline] pub fn get_authentication_failed() -> Result { >::get_activation_factory().get_authentication_failed() - }} - #[inline] pub fn get_authentication_rejected_by_user() -> Result { unsafe { + } + #[inline] pub fn get_authentication_rejected_by_user() -> Result { >::get_activation_factory().get_authentication_rejected_by_user() - }} - #[inline] pub fn get_ssl_connect_failed() -> Result { unsafe { + } + #[inline] pub fn get_ssl_connect_failed() -> Result { >::get_activation_factory().get_ssl_connect_failed() - }} - #[inline] pub fn get_ssl_identity_verification_failed() -> Result { unsafe { + } + #[inline] pub fn get_ssl_identity_verification_failed() -> Result { >::get_activation_factory().get_ssl_identity_verification_failed() - }} - #[inline] pub fn get_insufficient_security() -> Result { unsafe { + } + #[inline] pub fn get_insufficient_security() -> Result { >::get_activation_factory().get_insufficient_security() - }} - #[inline] pub fn get_invalid_argument1() -> Result { unsafe { + } + #[inline] pub fn get_invalid_argument1() -> Result { >::get_activation_factory().get_invalid_argument1() - }} - #[inline] pub fn get_invalid_argument2() -> Result { unsafe { + } + #[inline] pub fn get_invalid_argument2() -> Result { >::get_activation_factory().get_invalid_argument2() - }} - #[inline] pub fn get_invalid_argument3() -> Result { unsafe { + } + #[inline] pub fn get_invalid_argument3() -> Result { >::get_activation_factory().get_invalid_argument3() - }} - #[inline] pub fn get_invalid_argument4() -> Result { unsafe { + } + #[inline] pub fn get_invalid_argument4() -> Result { >::get_activation_factory().get_invalid_argument4() - }} - #[inline] pub fn get_invalid_argument5() -> Result { unsafe { + } + #[inline] pub fn get_invalid_argument5() -> Result { >::get_activation_factory().get_invalid_argument5() - }} - #[inline] pub fn get_invalid_argument6() -> Result { unsafe { + } + #[inline] pub fn get_invalid_argument6() -> Result { >::get_activation_factory().get_invalid_argument6() - }} - #[inline] pub fn get_invalid_argument7() -> Result { unsafe { + } + #[inline] pub fn get_invalid_argument7() -> Result { >::get_activation_factory().get_invalid_argument7() - }} - #[inline] pub fn get_invalid_argument8() -> Result { unsafe { + } + #[inline] pub fn get_invalid_argument8() -> Result { >::get_activation_factory().get_invalid_argument8() - }} + } } DEFINE_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]) [CLSID_AllJoynStatus]); DEFINE_IID!(IID_IAllJoynStatusStatics, 3501695358, 3369, 19881, 138, 198, 84, 197, 84, 190, 219, 197); @@ -6373,96 +6373,96 @@ RT_INTERFACE!{static interface IAllJoynStatusStatics(IAllJoynStatusStaticsVtbl): fn get_InvalidArgument8(&self, out: *mut i32) -> HRESULT }} impl IAllJoynStatusStatics { - #[inline] pub unsafe fn get_ok(&self) -> Result { + #[inline] pub fn get_ok(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Ok)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_fail(&self) -> Result { + }} + #[inline] pub fn get_fail(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Fail)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_operation_timed_out(&self) -> Result { + }} + #[inline] pub fn get_operation_timed_out(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OperationTimedOut)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_other_end_closed(&self) -> Result { + }} + #[inline] pub fn get_other_end_closed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OtherEndClosed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_connection_refused(&self) -> Result { + }} + #[inline] pub fn get_connection_refused(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ConnectionRefused)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_authentication_failed(&self) -> Result { + }} + #[inline] pub fn get_authentication_failed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AuthenticationFailed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_authentication_rejected_by_user(&self) -> Result { + }} + #[inline] pub fn get_authentication_rejected_by_user(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AuthenticationRejectedByUser)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ssl_connect_failed(&self) -> Result { + }} + #[inline] pub fn get_ssl_connect_failed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SslConnectFailed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ssl_identity_verification_failed(&self) -> Result { + }} + #[inline] pub fn get_ssl_identity_verification_failed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SslIdentityVerificationFailed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_insufficient_security(&self) -> Result { + }} + #[inline] pub fn get_insufficient_security(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InsufficientSecurity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_invalid_argument1(&self) -> Result { + }} + #[inline] pub fn get_invalid_argument1(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InvalidArgument1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_invalid_argument2(&self) -> Result { + }} + #[inline] pub fn get_invalid_argument2(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InvalidArgument2)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_invalid_argument3(&self) -> Result { + }} + #[inline] pub fn get_invalid_argument3(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InvalidArgument3)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_invalid_argument4(&self) -> Result { + }} + #[inline] pub fn get_invalid_argument4(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InvalidArgument4)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_invalid_argument5(&self) -> Result { + }} + #[inline] pub fn get_invalid_argument5(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InvalidArgument5)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_invalid_argument6(&self) -> Result { + }} + #[inline] pub fn get_invalid_argument6(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InvalidArgument6)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_invalid_argument7(&self) -> Result { + }} + #[inline] pub fn get_invalid_argument7(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InvalidArgument7)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_invalid_argument8(&self) -> Result { + }} + #[inline] pub fn get_invalid_argument8(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InvalidArgument8)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum AllJoynTrafficType: i32 { Unknown (AllJoynTrafficType_Unknown) = 0, Messages (AllJoynTrafficType_Messages) = 1, RawUnreliable (AllJoynTrafficType_RawUnreliable) = 2, RawReliable (AllJoynTrafficType_RawReliable) = 4, @@ -6472,18 +6472,18 @@ RT_INTERFACE!{interface IAllJoynWatcherStoppedEventArgs(IAllJoynWatcherStoppedEv fn get_Status(&self, out: *mut i32) -> HRESULT }} impl IAllJoynWatcherStoppedEventArgs { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AllJoynWatcherStoppedEventArgs: IAllJoynWatcherStoppedEventArgs} impl RtActivatable for AllJoynWatcherStoppedEventArgs {} impl AllJoynWatcherStoppedEventArgs { - #[inline] pub fn create(status: i32) -> Result> { unsafe { + #[inline] pub fn create(status: i32) -> Result> { >::get_activation_factory().create(status) - }} + } } DEFINE_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]) [CLSID_AllJoynWatcherStoppedEventArgs]); DEFINE_IID!(IID_IAllJoynWatcherStoppedEventArgsFactory, 2274338216, 11600, 18401, 144, 74, 32, 191, 13, 72, 199, 130); @@ -6491,11 +6491,11 @@ RT_INTERFACE!{static interface IAllJoynWatcherStoppedEventArgsFactory(IAllJoynWa fn Create(&self, status: i32, out: *mut *mut AllJoynWatcherStoppedEventArgs) -> HRESULT }} impl IAllJoynWatcherStoppedEventArgsFactory { - #[inline] pub unsafe fn create(&self, status: i32) -> Result> { + #[inline] pub fn create(&self, status: i32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, status, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } } // Windows.Devices.AllJoyn pub mod background { // Windows.Devices.Background @@ -6504,24 +6504,24 @@ DEFINE_IID!(IID_IDeviceServicingDetails, 1252781609, 9028, 19140, 133, 39, 74, 1 RT_INTERFACE!{interface IDeviceServicingDetails(IDeviceServicingDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceServicingDetails] { fn get_DeviceId(&self, out: *mut HSTRING) -> HRESULT, fn get_Arguments(&self, out: *mut HSTRING) -> HRESULT, - fn get_ExpectedDuration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + fn get_ExpectedDuration(&self, out: *mut foundation::TimeSpan) -> HRESULT }} impl IDeviceServicingDetails { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_arguments(&self) -> Result { + }} + #[inline] pub fn get_arguments(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Arguments)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_expected_duration(&self) -> Result { + }} + #[inline] pub fn get_expected_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExpectedDuration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class DeviceServicingDetails: IDeviceServicingDetails} DEFINE_IID!(IID_IDeviceUseDetails, 2102808897, 21886, 16724, 185, 148, 228, 247, 161, 31, 179, 35); @@ -6530,16 +6530,16 @@ RT_INTERFACE!{interface IDeviceUseDetails(IDeviceUseDetailsVtbl): IInspectable(I fn get_Arguments(&self, out: *mut HSTRING) -> HRESULT }} impl IDeviceUseDetails { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_arguments(&self) -> Result { + }} + #[inline] pub fn get_arguments(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Arguments)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class DeviceUseDetails: IDeviceUseDetails} } // Windows.Devices.Background @@ -6554,86 +6554,86 @@ RT_INTERFACE!{interface IBluetoothAdapter(IBluetoothAdapterVtbl): IInspectable(I fn get_IsPeripheralRoleSupported(&self, out: *mut bool) -> HRESULT, fn get_IsCentralRoleSupported(&self, out: *mut bool) -> HRESULT, fn get_IsAdvertisementOffloadSupported(&self, out: *mut bool) -> HRESULT, - fn GetRadioAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetRadioAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IBluetoothAdapter { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_bluetooth_address(&self) -> Result { + }} + #[inline] pub fn get_bluetooth_address(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BluetoothAddress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_classic_supported(&self) -> Result { + }} + #[inline] pub fn get_is_classic_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsClassicSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_low_energy_supported(&self) -> Result { + }} + #[inline] pub fn get_is_low_energy_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsLowEnergySupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_peripheral_role_supported(&self) -> Result { + }} + #[inline] pub fn get_is_peripheral_role_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPeripheralRoleSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_central_role_supported(&self) -> Result { + }} + #[inline] pub fn get_is_central_role_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCentralRoleSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_advertisement_offload_supported(&self) -> Result { + }} + #[inline] pub fn get_is_advertisement_offload_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsAdvertisementOffloadSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_radio_async(&self) -> Result>> { + }} + #[inline] pub fn get_radio_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetRadioAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class BluetoothAdapter: IBluetoothAdapter} impl RtActivatable for BluetoothAdapter {} impl BluetoothAdapter { - #[inline] pub fn get_device_selector() -> Result { unsafe { + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} - #[inline] pub fn get_default_async() -> Result>> { unsafe { + } + #[inline] pub fn get_default_async() -> Result>> { >::get_activation_factory().get_default_async() - }} + } } DEFINE_CLSID!(BluetoothAdapter(&[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,65,100,97,112,116,101,114,0]) [CLSID_BluetoothAdapter]); DEFINE_IID!(IID_IBluetoothAdapterStatics, 2332228458, 44108, 18241, 134, 97, 142, 171, 125, 23, 234, 159); RT_INTERFACE!{static interface IBluetoothAdapterStatics(IBluetoothAdapterStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothAdapterStatics] { fn GetDeviceSelector(&self, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetDefaultAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetDefaultAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IBluetoothAdapterStatics { - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_async(&self) -> Result>> { + }} + #[inline] pub fn get_default_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefaultAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum BluetoothAddressType: i32 { Public (BluetoothAddressType_Public) = 0, Random (BluetoothAddressType_Random) = 1, Unspecified (BluetoothAddressType_Unspecified) = 2, @@ -6649,36 +6649,36 @@ RT_INTERFACE!{interface IBluetoothClassOfDevice(IBluetoothClassOfDeviceVtbl): II fn get_ServiceCapabilities(&self, out: *mut BluetoothServiceCapabilities) -> HRESULT }} impl IBluetoothClassOfDevice { - #[inline] pub unsafe fn get_raw_value(&self) -> Result { + #[inline] pub fn get_raw_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RawValue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_major_class(&self) -> Result { + }} + #[inline] pub fn get_major_class(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MajorClass)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_minor_class(&self) -> Result { + }} + #[inline] pub fn get_minor_class(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinorClass)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_capabilities(&self) -> Result { + }} + #[inline] pub fn get_service_capabilities(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ServiceCapabilities)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class BluetoothClassOfDevice: IBluetoothClassOfDevice} impl RtActivatable for BluetoothClassOfDevice {} impl BluetoothClassOfDevice { - #[inline] pub fn from_raw_value(rawValue: u32) -> Result> { unsafe { + #[inline] pub fn from_raw_value(rawValue: u32) -> Result>> { >::get_activation_factory().from_raw_value(rawValue) - }} - #[inline] pub fn from_parts(majorClass: BluetoothMajorClass, minorClass: BluetoothMinorClass, serviceCapabilities: BluetoothServiceCapabilities) -> Result> { unsafe { + } + #[inline] pub fn from_parts(majorClass: BluetoothMajorClass, minorClass: BluetoothMinorClass, serviceCapabilities: BluetoothServiceCapabilities) -> Result>> { >::get_activation_factory().from_parts(majorClass, minorClass, serviceCapabilities) - }} + } } DEFINE_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]) [CLSID_BluetoothClassOfDevice]); DEFINE_IID!(IID_IBluetoothClassOfDeviceStatics, 3831575997, 4002, 16748, 145, 180, 193, 228, 140, 160, 97, 193); @@ -6687,16 +6687,16 @@ RT_INTERFACE!{static interface IBluetoothClassOfDeviceStatics(IBluetoothClassOfD fn FromParts(&self, majorClass: BluetoothMajorClass, minorClass: BluetoothMinorClass, serviceCapabilities: BluetoothServiceCapabilities, out: *mut *mut BluetoothClassOfDevice) -> HRESULT }} impl IBluetoothClassOfDeviceStatics { - #[inline] pub unsafe fn from_raw_value(&self, rawValue: u32) -> Result> { + #[inline] pub fn from_raw_value(&self, rawValue: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromRawValue)(self as *const _ as *mut _, rawValue, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_parts(&self, majorClass: BluetoothMajorClass, minorClass: BluetoothMinorClass, serviceCapabilities: BluetoothServiceCapabilities) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn from_parts(&self, majorClass: BluetoothMajorClass, minorClass: BluetoothMinorClass, serviceCapabilities: BluetoothServiceCapabilities) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromParts)(self as *const _ as *mut _, majorClass, minorClass, serviceCapabilities, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum BluetoothConnectionStatus: i32 { Disconnected (BluetoothConnectionStatus_Disconnected) = 0, Connected (BluetoothConnectionStatus_Connected) = 1, @@ -6709,117 +6709,117 @@ RT_INTERFACE!{interface IBluetoothDevice(IBluetoothDeviceVtbl): IInspectable(IIn fn get_Name(&self, out: *mut HSTRING) -> HRESULT, fn get_ClassOfDevice(&self, out: *mut *mut BluetoothClassOfDevice) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy4(&self) -> (), - #[cfg(feature="windows-storage")] fn get_SdpRecords(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_RfcommServices(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + #[cfg(feature="windows-storage")] fn get_SdpRecords(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_RfcommServices(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_ConnectionStatus(&self, out: *mut BluetoothConnectionStatus) -> HRESULT, fn get_BluetoothAddress(&self, out: *mut u64) -> HRESULT, - fn add_NameChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_NameChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_SdpRecordsChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SdpRecordsChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ConnectionStatusChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ConnectionStatusChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_NameChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_NameChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_SdpRecordsChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SdpRecordsChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ConnectionStatusChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ConnectionStatusChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IBluetoothDevice { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-networking")] #[inline] pub unsafe fn get_host_name(&self) -> Result> { + }} + #[cfg(feature="windows-networking")] #[inline] pub fn get_host_name(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HostName)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_class_of_device(&self) -> Result> { + }} + #[inline] pub fn get_class_of_device(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ClassOfDevice)(self 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_sdp_records(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_sdp_records(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SdpRecords)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rfcomm_services(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_rfcomm_services(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RfcommServices)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_connection_status(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_connection_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ConnectionStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_bluetooth_address(&self) -> Result { + }} + #[inline] pub fn get_bluetooth_address(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BluetoothAddress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_name_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_name_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_NameChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_name_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_name_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_NameChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_sdp_records_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_sdp_records_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SdpRecordsChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_sdp_records_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_sdp_records_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SdpRecordsChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_connection_status_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_connection_status_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ConnectionStatusChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_connection_status_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_connection_status_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ConnectionStatusChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class BluetoothDevice: IBluetoothDevice} impl RtActivatable for BluetoothDevice {} impl RtActivatable for BluetoothDevice {} impl BluetoothDevice { - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} - #[cfg(feature="windows-networking")] #[inline] pub fn from_host_name_async(hostName: &super::super::networking::HostName) -> Result>> { unsafe { + } + #[cfg(feature="windows-networking")] #[inline] pub fn from_host_name_async(hostName: &super::super::networking::HostName) -> Result>> { >::get_activation_factory().from_host_name_async(hostName) - }} - #[inline] pub fn from_bluetooth_address_async(address: u64) -> Result>> { unsafe { + } + #[inline] pub fn from_bluetooth_address_async(address: u64) -> Result>> { >::get_activation_factory().from_bluetooth_address_async(address) - }} - #[inline] pub fn get_device_selector() -> Result { unsafe { + } + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} - #[inline] pub fn get_device_selector_from_pairing_state(pairingState: bool) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_from_pairing_state(pairingState: bool) -> Result { >::get_activation_factory().get_device_selector_from_pairing_state(pairingState) - }} - #[inline] pub fn get_device_selector_from_connection_status(connectionStatus: BluetoothConnectionStatus) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_from_connection_status(connectionStatus: BluetoothConnectionStatus) -> Result { >::get_activation_factory().get_device_selector_from_connection_status(connectionStatus) - }} - #[inline] pub fn get_device_selector_from_device_name(deviceName: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_from_device_name(deviceName: &HStringArg) -> Result { >::get_activation_factory().get_device_selector_from_device_name(deviceName) - }} - #[inline] pub fn get_device_selector_from_bluetooth_address(bluetoothAddress: u64) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_from_bluetooth_address(bluetoothAddress: u64) -> Result { >::get_activation_factory().get_device_selector_from_bluetooth_address(bluetoothAddress) - }} - #[inline] pub fn get_device_selector_from_class_of_device(classOfDevice: &BluetoothClassOfDevice) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_from_class_of_device(classOfDevice: &BluetoothClassOfDevice) -> Result { >::get_activation_factory().get_device_selector_from_class_of_device(classOfDevice) - }} + } } DEFINE_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]) [CLSID_BluetoothDevice]); DEFINE_IID!(IID_IBluetoothDevice2, 20183380, 45398, 19920, 177, 245, 193, 27, 195, 26, 81, 99); @@ -6827,63 +6827,63 @@ RT_INTERFACE!{interface IBluetoothDevice2(IBluetoothDevice2Vtbl): IInspectable(I fn get_DeviceInformation(&self, out: *mut *mut super::enumeration::DeviceInformation) -> HRESULT }} impl IBluetoothDevice2 { - #[inline] pub unsafe fn get_device_information(&self) -> Result> { + #[inline] pub fn get_device_information(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceInformation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut super::enumeration::DeviceAccessInformation) -> HRESULT, - fn RequestAccessAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetRfcommServicesAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetRfcommServicesWithCacheModeAsync(&self, cacheMode: BluetoothCacheMode, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetRfcommServicesForIdAsync(&self, serviceId: *mut rfcomm::RfcommServiceId, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetRfcommServicesForIdWithCacheModeAsync(&self, serviceId: *mut rfcomm::RfcommServiceId, cacheMode: BluetoothCacheMode, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn RequestAccessAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetRfcommServicesAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetRfcommServicesWithCacheModeAsync(&self, cacheMode: BluetoothCacheMode, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetRfcommServicesForIdAsync(&self, serviceId: *mut rfcomm::RfcommServiceId, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetRfcommServicesForIdWithCacheModeAsync(&self, serviceId: *mut rfcomm::RfcommServiceId, cacheMode: BluetoothCacheMode, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IBluetoothDevice3 { - #[inline] pub unsafe fn get_device_access_information(&self) -> Result> { + #[inline] pub fn get_device_access_information(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceAccessInformation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_access_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn request_access_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rfcomm_services_async(&self) -> Result>> { + }} + #[inline] pub fn get_rfcomm_services_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetRfcommServicesAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rfcomm_services_with_cache_mode_async(&self, cacheMode: BluetoothCacheMode) -> Result>> { + }} + #[inline] pub fn get_rfcomm_services_with_cache_mode_async(&self, cacheMode: BluetoothCacheMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetRfcommServicesWithCacheModeAsync)(self as *const _ as *mut _, cacheMode, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rfcomm_services_for_id_async(&self, serviceId: &rfcomm::RfcommServiceId) -> Result>> { + }} + #[inline] pub fn get_rfcomm_services_for_id_async(&self, serviceId: &rfcomm::RfcommServiceId) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetRfcommServicesForIdAsync)(self as *const _ as *mut _, 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(&self, serviceId: &rfcomm::RfcommServiceId, cacheMode: BluetoothCacheMode) -> Result>> { + }} + #[inline] pub fn get_rfcomm_services_for_id_with_cache_mode_async(&self, serviceId: &rfcomm::RfcommServiceId, cacheMode: BluetoothCacheMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetRfcommServicesForIdWithCacheModeAsync)(self as *const _ as *mut _, serviceId as *const _ as *mut _, cacheMode, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IBluetoothDevice4, 2172400813, 3740, 17074, 168, 220, 62, 128, 148, 148, 13, 18); RT_INTERFACE!{interface IBluetoothDevice4(IBluetoothDevice4Vtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothDevice4] { fn get_BluetoothDeviceId(&self, out: *mut *mut BluetoothDeviceId) -> HRESULT }} impl IBluetoothDevice4 { - #[inline] pub unsafe fn get_bluetooth_device_id(&self) -> Result> { + #[inline] pub fn get_bluetooth_device_id(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BluetoothDeviceId)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IBluetoothDeviceId, 3245951407, 22465, 17986, 188, 206, 230, 192, 107, 32, 174, 118); RT_INTERFACE!{interface IBluetoothDeviceId(IBluetoothDeviceIdVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothDeviceId] { @@ -6892,28 +6892,28 @@ RT_INTERFACE!{interface IBluetoothDeviceId(IBluetoothDeviceIdVtbl): IInspectable fn get_IsLowEnergyDevice(&self, out: *mut bool) -> HRESULT }} impl IBluetoothDeviceId { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_classic_device(&self) -> Result { + }} + #[inline] pub fn get_is_classic_device(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsClassicDevice)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_low_energy_device(&self) -> Result { + }} + #[inline] pub fn get_is_low_energy_device(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsLowEnergyDevice)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class BluetoothDeviceId: IBluetoothDeviceId} impl RtActivatable for BluetoothDeviceId {} impl BluetoothDeviceId { - #[inline] pub fn from_id(deviceId: &HStringArg) -> Result> { unsafe { + #[inline] pub fn from_id(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id(deviceId) - }} + } } DEFINE_CLSID!(BluetoothDeviceId(&[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,73,100,0]) [CLSID_BluetoothDeviceId]); DEFINE_IID!(IID_IBluetoothDeviceIdStatics, 2810728039, 16123, 20273, 187, 194, 129, 14, 9, 151, 116, 4); @@ -6921,41 +6921,41 @@ RT_INTERFACE!{static interface IBluetoothDeviceIdStatics(IBluetoothDeviceIdStati fn FromId(&self, deviceId: HSTRING, out: *mut *mut BluetoothDeviceId) -> HRESULT }} impl IBluetoothDeviceIdStatics { - #[inline] pub unsafe fn from_id(&self, deviceId: &HStringArg) -> Result> { + #[inline] pub fn from_id(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromId)(self as *const _ as *mut _, deviceId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-networking"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-networking")] fn FromHostNameAsync(&self, hostName: *mut super::super::networking::HostName, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FromBluetoothAddressAsync(&self, address: u64, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-networking")] fn FromHostNameAsync(&self, hostName: *mut super::super::networking::HostName, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn FromBluetoothAddressAsync(&self, address: u64, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetDeviceSelector(&self, out: *mut HSTRING) -> HRESULT }} impl IBluetoothDeviceStatics { - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, 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(&self, hostName: &super::super::networking::HostName) -> Result>> { + }} + #[cfg(feature="windows-networking")] #[inline] pub fn from_host_name_async(&self, hostName: &super::super::networking::HostName) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromHostNameAsync)(self as *const _ as *mut _, hostName as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_bluetooth_address_async(&self, address: u64) -> Result>> { + }} + #[inline] pub fn from_bluetooth_address_async(&self, address: u64) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromBluetoothAddressAsync)(self as *const _ as *mut _, address, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + }} + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } 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] { @@ -6966,31 +6966,31 @@ RT_INTERFACE!{static interface IBluetoothDeviceStatics2(IBluetoothDeviceStatics2 fn GetDeviceSelectorFromClassOfDevice(&self, classOfDevice: *mut BluetoothClassOfDevice, out: *mut HSTRING) -> HRESULT }} impl IBluetoothDeviceStatics2 { - #[inline] pub unsafe fn get_device_selector_from_pairing_state(&self, pairingState: bool) -> Result { + #[inline] pub fn get_device_selector_from_pairing_state(&self, pairingState: bool) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorFromPairingState)(self as *const _ as *mut _, pairingState, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector_from_connection_status(&self, connectionStatus: BluetoothConnectionStatus) -> Result { + }} + #[inline] pub fn get_device_selector_from_connection_status(&self, connectionStatus: BluetoothConnectionStatus) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorFromConnectionStatus)(self as *const _ as *mut _, connectionStatus, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector_from_device_name(&self, deviceName: &HStringArg) -> Result { + }} + #[inline] pub fn get_device_selector_from_device_name(&self, deviceName: &HStringArg) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorFromDeviceName)(self as *const _ as *mut _, 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(&self, bluetoothAddress: u64) -> Result { + }} + #[inline] pub fn get_device_selector_from_bluetooth_address(&self, bluetoothAddress: u64) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorFromBluetoothAddress)(self as *const _ as *mut _, 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(&self, classOfDevice: &BluetoothClassOfDevice) -> Result { + }} + #[inline] pub fn get_device_selector_from_class_of_device(&self, classOfDevice: &BluetoothClassOfDevice) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorFromClassOfDevice)(self as *const _ as *mut _, classOfDevice as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } 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, TransportNotSupported (BluetoothError_TransportNotSupported) = 9, @@ -7002,102 +7002,102 @@ RT_INTERFACE!{interface IBluetoothLEAppearance(IBluetoothLEAppearanceVtbl): IIns fn get_SubCategory(&self, out: *mut u16) -> HRESULT }} impl IBluetoothLEAppearance { - #[inline] pub unsafe fn get_raw_value(&self) -> Result { + #[inline] pub fn get_raw_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RawValue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_category(&self) -> Result { + }} + #[inline] pub fn get_category(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Category)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sub_category(&self) -> Result { + }} + #[inline] pub fn get_sub_category(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SubCategory)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class BluetoothLEAppearance: IBluetoothLEAppearance} impl RtActivatable for BluetoothLEAppearance {} impl BluetoothLEAppearance { - #[inline] pub fn from_raw_value(rawValue: u16) -> Result> { unsafe { + #[inline] pub fn from_raw_value(rawValue: u16) -> Result>> { >::get_activation_factory().from_raw_value(rawValue) - }} - #[inline] pub fn from_parts(appearanceCategory: u16, appearanceSubCategory: u16) -> Result> { unsafe { + } + #[inline] pub fn from_parts(appearanceCategory: u16, appearanceSubCategory: u16) -> Result>> { >::get_activation_factory().from_parts(appearanceCategory, appearanceSubCategory) - }} + } } DEFINE_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]) [CLSID_BluetoothLEAppearance]); RT_CLASS!{static class BluetoothLEAppearanceCategories} impl RtActivatable for BluetoothLEAppearanceCategories {} impl BluetoothLEAppearanceCategories { - #[inline] pub fn get_uncategorized() -> Result { unsafe { + #[inline] pub fn get_uncategorized() -> Result { >::get_activation_factory().get_uncategorized() - }} - #[inline] pub fn get_phone() -> Result { unsafe { + } + #[inline] pub fn get_phone() -> Result { >::get_activation_factory().get_phone() - }} - #[inline] pub fn get_computer() -> Result { unsafe { + } + #[inline] pub fn get_computer() -> Result { >::get_activation_factory().get_computer() - }} - #[inline] pub fn get_watch() -> Result { unsafe { + } + #[inline] pub fn get_watch() -> Result { >::get_activation_factory().get_watch() - }} - #[inline] pub fn get_clock() -> Result { unsafe { + } + #[inline] pub fn get_clock() -> Result { >::get_activation_factory().get_clock() - }} - #[inline] pub fn get_display() -> Result { unsafe { + } + #[inline] pub fn get_display() -> Result { >::get_activation_factory().get_display() - }} - #[inline] pub fn get_remote_control() -> Result { unsafe { + } + #[inline] pub fn get_remote_control() -> Result { >::get_activation_factory().get_remote_control() - }} - #[inline] pub fn get_eye_glasses() -> Result { unsafe { + } + #[inline] pub fn get_eye_glasses() -> Result { >::get_activation_factory().get_eye_glasses() - }} - #[inline] pub fn get_tag() -> Result { unsafe { + } + #[inline] pub fn get_tag() -> Result { >::get_activation_factory().get_tag() - }} - #[inline] pub fn get_keyring() -> Result { unsafe { + } + #[inline] pub fn get_keyring() -> Result { >::get_activation_factory().get_keyring() - }} - #[inline] pub fn get_media_player() -> Result { unsafe { + } + #[inline] pub fn get_media_player() -> Result { >::get_activation_factory().get_media_player() - }} - #[inline] pub fn get_barcode_scanner() -> Result { unsafe { + } + #[inline] pub fn get_barcode_scanner() -> Result { >::get_activation_factory().get_barcode_scanner() - }} - #[inline] pub fn get_thermometer() -> Result { unsafe { + } + #[inline] pub fn get_thermometer() -> Result { >::get_activation_factory().get_thermometer() - }} - #[inline] pub fn get_heart_rate() -> Result { unsafe { + } + #[inline] pub fn get_heart_rate() -> Result { >::get_activation_factory().get_heart_rate() - }} - #[inline] pub fn get_blood_pressure() -> Result { unsafe { + } + #[inline] pub fn get_blood_pressure() -> Result { >::get_activation_factory().get_blood_pressure() - }} - #[inline] pub fn get_human_interface_device() -> Result { unsafe { + } + #[inline] pub fn get_human_interface_device() -> Result { >::get_activation_factory().get_human_interface_device() - }} - #[inline] pub fn get_glucose_meter() -> Result { unsafe { + } + #[inline] pub fn get_glucose_meter() -> Result { >::get_activation_factory().get_glucose_meter() - }} - #[inline] pub fn get_running_walking() -> Result { unsafe { + } + #[inline] pub fn get_running_walking() -> Result { >::get_activation_factory().get_running_walking() - }} - #[inline] pub fn get_cycling() -> Result { unsafe { + } + #[inline] pub fn get_cycling() -> Result { >::get_activation_factory().get_cycling() - }} - #[inline] pub fn get_pulse_oximeter() -> Result { unsafe { + } + #[inline] pub fn get_pulse_oximeter() -> Result { >::get_activation_factory().get_pulse_oximeter() - }} - #[inline] pub fn get_weight_scale() -> Result { unsafe { + } + #[inline] pub fn get_weight_scale() -> Result { >::get_activation_factory().get_weight_scale() - }} - #[inline] pub fn get_outdoor_sport_activity() -> Result { unsafe { + } + #[inline] pub fn get_outdoor_sport_activity() -> Result { >::get_activation_factory().get_outdoor_sport_activity() - }} + } } DEFINE_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]) [CLSID_BluetoothLEAppearanceCategories]); DEFINE_IID!(IID_IBluetoothLEAppearanceCategoriesStatics, 1833784574, 1130, 16773, 170, 182, 130, 76, 240, 97, 8, 97); @@ -7126,116 +7126,116 @@ RT_INTERFACE!{static interface IBluetoothLEAppearanceCategoriesStatics(IBluetoot fn get_OutdoorSportActivity(&self, out: *mut u16) -> HRESULT }} impl IBluetoothLEAppearanceCategoriesStatics { - #[inline] pub unsafe fn get_uncategorized(&self) -> Result { + #[inline] pub fn get_uncategorized(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Uncategorized)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_phone(&self) -> Result { + }} + #[inline] pub fn get_phone(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Phone)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_computer(&self) -> Result { + }} + #[inline] pub fn get_computer(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Computer)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_watch(&self) -> Result { + }} + #[inline] pub fn get_watch(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Watch)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_clock(&self) -> Result { + }} + #[inline] pub fn get_clock(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Clock)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_display(&self) -> Result { + }} + #[inline] pub fn get_display(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Display)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_control(&self) -> Result { + }} + #[inline] pub fn get_remote_control(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RemoteControl)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_eye_glasses(&self) -> Result { + }} + #[inline] pub fn get_eye_glasses(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EyeGlasses)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_tag(&self) -> Result { + }} + #[inline] pub fn get_tag(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Tag)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_keyring(&self) -> Result { + }} + #[inline] pub fn get_keyring(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Keyring)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_media_player(&self) -> Result { + }} + #[inline] pub fn get_media_player(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MediaPlayer)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_barcode_scanner(&self) -> Result { + }} + #[inline] pub fn get_barcode_scanner(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BarcodeScanner)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_thermometer(&self) -> Result { + }} + #[inline] pub fn get_thermometer(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Thermometer)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_heart_rate(&self) -> Result { + }} + #[inline] pub fn get_heart_rate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HeartRate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_blood_pressure(&self) -> Result { + }} + #[inline] pub fn get_blood_pressure(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BloodPressure)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_human_interface_device(&self) -> Result { + }} + #[inline] pub fn get_human_interface_device(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HumanInterfaceDevice)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_glucose_meter(&self) -> Result { + }} + #[inline] pub fn get_glucose_meter(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_GlucoseMeter)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_running_walking(&self) -> Result { + }} + #[inline] pub fn get_running_walking(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RunningWalking)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_cycling(&self) -> Result { + }} + #[inline] pub fn get_cycling(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Cycling)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pulse_oximeter(&self) -> Result { + }} + #[inline] pub fn get_pulse_oximeter(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PulseOximeter)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_weight_scale(&self) -> Result { + }} + #[inline] pub fn get_weight_scale(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_WeightScale)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_outdoor_sport_activity(&self) -> Result { + }} + #[inline] pub fn get_outdoor_sport_activity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OutdoorSportActivity)(self as *const _ as *mut _, &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] { @@ -7243,104 +7243,104 @@ RT_INTERFACE!{static interface IBluetoothLEAppearanceStatics(IBluetoothLEAppeara fn FromParts(&self, appearanceCategory: u16, appearanceSubCategory: u16, out: *mut *mut BluetoothLEAppearance) -> HRESULT }} impl IBluetoothLEAppearanceStatics { - #[inline] pub unsafe fn from_raw_value(&self, rawValue: u16) -> Result> { + #[inline] pub fn from_raw_value(&self, rawValue: u16) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromRawValue)(self as *const _ as *mut _, rawValue, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_parts(&self, appearanceCategory: u16, appearanceSubCategory: u16) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn from_parts(&self, appearanceCategory: u16, appearanceSubCategory: u16) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromParts)(self as *const _ as *mut _, appearanceCategory, appearanceSubCategory, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{static class BluetoothLEAppearanceSubcategories} impl RtActivatable for BluetoothLEAppearanceSubcategories {} impl BluetoothLEAppearanceSubcategories { - #[inline] pub fn get_generic() -> Result { unsafe { + #[inline] pub fn get_generic() -> Result { >::get_activation_factory().get_generic() - }} - #[inline] pub fn get_sports_watch() -> Result { unsafe { + } + #[inline] pub fn get_sports_watch() -> Result { >::get_activation_factory().get_sports_watch() - }} - #[inline] pub fn get_thermometer_ear() -> Result { unsafe { + } + #[inline] pub fn get_thermometer_ear() -> Result { >::get_activation_factory().get_thermometer_ear() - }} - #[inline] pub fn get_heart_rate_belt() -> Result { unsafe { + } + #[inline] pub fn get_heart_rate_belt() -> Result { >::get_activation_factory().get_heart_rate_belt() - }} - #[inline] pub fn get_blood_pressure_arm() -> Result { unsafe { + } + #[inline] pub fn get_blood_pressure_arm() -> Result { >::get_activation_factory().get_blood_pressure_arm() - }} - #[inline] pub fn get_blood_pressure_wrist() -> Result { unsafe { + } + #[inline] pub fn get_blood_pressure_wrist() -> Result { >::get_activation_factory().get_blood_pressure_wrist() - }} - #[inline] pub fn get_keyboard() -> Result { unsafe { + } + #[inline] pub fn get_keyboard() -> Result { >::get_activation_factory().get_keyboard() - }} - #[inline] pub fn get_mouse() -> Result { unsafe { + } + #[inline] pub fn get_mouse() -> Result { >::get_activation_factory().get_mouse() - }} - #[inline] pub fn get_joystick() -> Result { unsafe { + } + #[inline] pub fn get_joystick() -> Result { >::get_activation_factory().get_joystick() - }} - #[inline] pub fn get_gamepad() -> Result { unsafe { + } + #[inline] pub fn get_gamepad() -> Result { >::get_activation_factory().get_gamepad() - }} - #[inline] pub fn get_digitizer_tablet() -> Result { unsafe { + } + #[inline] pub fn get_digitizer_tablet() -> Result { >::get_activation_factory().get_digitizer_tablet() - }} - #[inline] pub fn get_card_reader() -> Result { unsafe { + } + #[inline] pub fn get_card_reader() -> Result { >::get_activation_factory().get_card_reader() - }} - #[inline] pub fn get_digital_pen() -> Result { unsafe { + } + #[inline] pub fn get_digital_pen() -> Result { >::get_activation_factory().get_digital_pen() - }} - #[inline] pub fn get_barcode_scanner() -> Result { unsafe { + } + #[inline] pub fn get_barcode_scanner() -> Result { >::get_activation_factory().get_barcode_scanner() - }} - #[inline] pub fn get_running_walking_in_shoe() -> Result { unsafe { + } + #[inline] pub fn get_running_walking_in_shoe() -> Result { >::get_activation_factory().get_running_walking_in_shoe() - }} - #[inline] pub fn get_running_walking_on_shoe() -> Result { unsafe { + } + #[inline] pub fn get_running_walking_on_shoe() -> Result { >::get_activation_factory().get_running_walking_on_shoe() - }} - #[inline] pub fn get_running_walking_on_hip() -> Result { unsafe { + } + #[inline] pub fn get_running_walking_on_hip() -> Result { >::get_activation_factory().get_running_walking_on_hip() - }} - #[inline] pub fn get_cycling_computer() -> Result { unsafe { + } + #[inline] pub fn get_cycling_computer() -> Result { >::get_activation_factory().get_cycling_computer() - }} - #[inline] pub fn get_cycling_speed_sensor() -> Result { unsafe { + } + #[inline] pub fn get_cycling_speed_sensor() -> Result { >::get_activation_factory().get_cycling_speed_sensor() - }} - #[inline] pub fn get_cycling_cadence_sensor() -> Result { unsafe { + } + #[inline] pub fn get_cycling_cadence_sensor() -> Result { >::get_activation_factory().get_cycling_cadence_sensor() - }} - #[inline] pub fn get_cycling_power_sensor() -> Result { unsafe { + } + #[inline] pub fn get_cycling_power_sensor() -> Result { >::get_activation_factory().get_cycling_power_sensor() - }} - #[inline] pub fn get_cycling_speed_cadence_sensor() -> Result { unsafe { + } + #[inline] pub fn get_cycling_speed_cadence_sensor() -> Result { >::get_activation_factory().get_cycling_speed_cadence_sensor() - }} - #[inline] pub fn get_oximeter_fingertip() -> Result { unsafe { + } + #[inline] pub fn get_oximeter_fingertip() -> Result { >::get_activation_factory().get_oximeter_fingertip() - }} - #[inline] pub fn get_oximeter_wrist_worn() -> Result { unsafe { + } + #[inline] pub fn get_oximeter_wrist_worn() -> Result { >::get_activation_factory().get_oximeter_wrist_worn() - }} - #[inline] pub fn get_location_display() -> Result { unsafe { + } + #[inline] pub fn get_location_display() -> Result { >::get_activation_factory().get_location_display() - }} - #[inline] pub fn get_location_navigation_display() -> Result { unsafe { + } + #[inline] pub fn get_location_navigation_display() -> Result { >::get_activation_factory().get_location_navigation_display() - }} - #[inline] pub fn get_location_pod() -> Result { unsafe { + } + #[inline] pub fn get_location_pod() -> Result { >::get_activation_factory().get_location_pod() - }} - #[inline] pub fn get_location_navigation_pod() -> Result { unsafe { + } + #[inline] pub fn get_location_navigation_pod() -> Result { >::get_activation_factory().get_location_navigation_pod() - }} + } } DEFINE_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]) [CLSID_BluetoothLEAppearanceSubcategories]); DEFINE_IID!(IID_IBluetoothLEAppearanceSubcategoriesStatics, 3850085894, 8516, 16730, 131, 18, 113, 204, 242, 145, 248, 209); @@ -7375,255 +7375,255 @@ RT_INTERFACE!{static interface IBluetoothLEAppearanceSubcategoriesStatics(IBluet fn get_LocationNavigationPod(&self, out: *mut u16) -> HRESULT }} impl IBluetoothLEAppearanceSubcategoriesStatics { - #[inline] pub unsafe fn get_generic(&self) -> Result { + #[inline] pub fn get_generic(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Generic)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sports_watch(&self) -> Result { + }} + #[inline] pub fn get_sports_watch(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SportsWatch)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_thermometer_ear(&self) -> Result { + }} + #[inline] pub fn get_thermometer_ear(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ThermometerEar)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_heart_rate_belt(&self) -> Result { + }} + #[inline] pub fn get_heart_rate_belt(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HeartRateBelt)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_blood_pressure_arm(&self) -> Result { + }} + #[inline] pub fn get_blood_pressure_arm(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BloodPressureArm)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_blood_pressure_wrist(&self) -> Result { + }} + #[inline] pub fn get_blood_pressure_wrist(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BloodPressureWrist)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_keyboard(&self) -> Result { + }} + #[inline] pub fn get_keyboard(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Keyboard)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_mouse(&self) -> Result { + }} + #[inline] pub fn get_mouse(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Mouse)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_joystick(&self) -> Result { + }} + #[inline] pub fn get_joystick(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Joystick)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_gamepad(&self) -> Result { + }} + #[inline] pub fn get_gamepad(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Gamepad)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_digitizer_tablet(&self) -> Result { + }} + #[inline] pub fn get_digitizer_tablet(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DigitizerTablet)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_card_reader(&self) -> Result { + }} + #[inline] pub fn get_card_reader(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CardReader)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_digital_pen(&self) -> Result { + }} + #[inline] pub fn get_digital_pen(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DigitalPen)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_barcode_scanner(&self) -> Result { + }} + #[inline] pub fn get_barcode_scanner(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BarcodeScanner)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_running_walking_in_shoe(&self) -> Result { + }} + #[inline] pub fn get_running_walking_in_shoe(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RunningWalkingInShoe)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_running_walking_on_shoe(&self) -> Result { + }} + #[inline] pub fn get_running_walking_on_shoe(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RunningWalkingOnShoe)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_running_walking_on_hip(&self) -> Result { + }} + #[inline] pub fn get_running_walking_on_hip(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RunningWalkingOnHip)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_cycling_computer(&self) -> Result { + }} + #[inline] pub fn get_cycling_computer(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CyclingComputer)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_cycling_speed_sensor(&self) -> Result { + }} + #[inline] pub fn get_cycling_speed_sensor(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CyclingSpeedSensor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_cycling_cadence_sensor(&self) -> Result { + }} + #[inline] pub fn get_cycling_cadence_sensor(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CyclingCadenceSensor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_cycling_power_sensor(&self) -> Result { + }} + #[inline] pub fn get_cycling_power_sensor(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CyclingPowerSensor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_cycling_speed_cadence_sensor(&self) -> Result { + }} + #[inline] pub fn get_cycling_speed_cadence_sensor(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CyclingSpeedCadenceSensor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_oximeter_fingertip(&self) -> Result { + }} + #[inline] pub fn get_oximeter_fingertip(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OximeterFingertip)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_oximeter_wrist_worn(&self) -> Result { + }} + #[inline] pub fn get_oximeter_wrist_worn(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OximeterWristWorn)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_location_display(&self) -> Result { + }} + #[inline] pub fn get_location_display(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LocationDisplay)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_location_navigation_display(&self) -> Result { + }} + #[inline] pub fn get_location_navigation_display(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LocationNavigationDisplay)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_location_pod(&self) -> Result { + }} + #[inline] pub fn get_location_pod(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LocationPod)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_location_navigation_pod(&self) -> Result { + }} + #[inline] pub fn get_location_navigation_pod(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LocationNavigationPod)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, out: *mut HSTRING) -> HRESULT, fn get_Name(&self, out: *mut HSTRING) -> HRESULT, - fn get_GattServices(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_GattServices(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_ConnectionStatus(&self, out: *mut BluetoothConnectionStatus) -> HRESULT, fn get_BluetoothAddress(&self, out: *mut u64) -> HRESULT, fn GetGattService(&self, serviceUuid: Guid, out: *mut *mut genericattributeprofile::GattDeviceService) -> HRESULT, - fn add_NameChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_NameChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_GattServicesChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_GattServicesChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ConnectionStatusChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ConnectionStatusChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_NameChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_NameChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_GattServicesChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_GattServicesChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ConnectionStatusChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ConnectionStatusChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IBluetoothLEDevice { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_name(&self) -> Result { + }} + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_gatt_services(&self) -> Result>> { + }} + #[inline] pub fn get_gatt_services(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_GattServices)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_connection_status(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_connection_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ConnectionStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_bluetooth_address(&self) -> Result { + }} + #[inline] pub fn get_bluetooth_address(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BluetoothAddress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_gatt_service(&self, serviceUuid: Guid) -> Result> { + }} + #[inline] pub fn get_gatt_service(&self, serviceUuid: Guid) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetGattService)(self as *const _ as *mut _, serviceUuid, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_name_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_name_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_NameChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_name_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_name_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_NameChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_gatt_services_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_gatt_services_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_GattServicesChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_gatt_services_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_gatt_services_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_GattServicesChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_connection_status_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_connection_status_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ConnectionStatusChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_connection_status_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_connection_status_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ConnectionStatusChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class BluetoothLEDevice: IBluetoothLEDevice} impl RtActivatable for BluetoothLEDevice {} impl RtActivatable for BluetoothLEDevice {} impl BluetoothLEDevice { - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} - #[inline] pub fn from_bluetooth_address_async(bluetoothAddress: u64) -> Result>> { unsafe { + } + #[inline] pub fn from_bluetooth_address_async(bluetoothAddress: u64) -> Result>> { >::get_activation_factory().from_bluetooth_address_async(bluetoothAddress) - }} - #[inline] pub fn get_device_selector() -> Result { unsafe { + } + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} - #[inline] pub fn get_device_selector_from_pairing_state(pairingState: bool) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_from_pairing_state(pairingState: bool) -> Result { >::get_activation_factory().get_device_selector_from_pairing_state(pairingState) - }} - #[inline] pub fn get_device_selector_from_connection_status(connectionStatus: BluetoothConnectionStatus) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_from_connection_status(connectionStatus: BluetoothConnectionStatus) -> Result { >::get_activation_factory().get_device_selector_from_connection_status(connectionStatus) - }} - #[inline] pub fn get_device_selector_from_device_name(deviceName: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_from_device_name(deviceName: &HStringArg) -> Result { >::get_activation_factory().get_device_selector_from_device_name(deviceName) - }} - #[inline] pub fn get_device_selector_from_bluetooth_address(bluetoothAddress: u64) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_from_bluetooth_address(bluetoothAddress: u64) -> Result { >::get_activation_factory().get_device_selector_from_bluetooth_address(bluetoothAddress) - }} - #[inline] pub fn get_device_selector_from_bluetooth_address_with_bluetooth_address_type(bluetoothAddress: u64, bluetoothAddressType: BluetoothAddressType) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_from_bluetooth_address_with_bluetooth_address_type(bluetoothAddress: u64, bluetoothAddressType: BluetoothAddressType) -> Result { >::get_activation_factory().get_device_selector_from_bluetooth_address_with_bluetooth_address_type(bluetoothAddress, bluetoothAddressType) - }} - #[inline] pub fn get_device_selector_from_appearance(appearance: &BluetoothLEAppearance) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_from_appearance(appearance: &BluetoothLEAppearance) -> Result { >::get_activation_factory().get_device_selector_from_appearance(appearance) - }} - #[inline] pub fn from_bluetooth_address_with_bluetooth_address_type_async(bluetoothAddress: u64, bluetoothAddressType: BluetoothAddressType) -> Result>> { unsafe { + } + #[inline] pub fn from_bluetooth_address_with_bluetooth_address_type_async(bluetoothAddress: u64, bluetoothAddressType: BluetoothAddressType) -> Result>> { >::get_activation_factory().from_bluetooth_address_with_bluetooth_address_type_async(bluetoothAddress, bluetoothAddressType) - }} + } } DEFINE_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]) [CLSID_BluetoothLEDevice]); DEFINE_IID!(IID_IBluetoothLEDevice2, 653288115, 31470, 19761, 186, 186, 177, 185, 119, 95, 89, 22); @@ -7633,96 +7633,96 @@ RT_INTERFACE!{interface IBluetoothLEDevice2(IBluetoothLEDevice2Vtbl): IInspectab fn get_BluetoothAddressType(&self, out: *mut BluetoothAddressType) -> HRESULT }} impl IBluetoothLEDevice2 { - #[inline] pub unsafe fn get_device_information(&self) -> Result> { + #[inline] pub fn get_device_information(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceInformation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_appearance(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_appearance(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Appearance)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_bluetooth_address_type(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_bluetooth_address_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BluetoothAddressType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IBluetoothLEDevice3, 2934563987, 17580, 16604, 175, 51, 178, 193, 60, 1, 202, 70); RT_INTERFACE!{interface IBluetoothLEDevice3(IBluetoothLEDevice3Vtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEDevice3] { fn get_DeviceAccessInformation(&self, out: *mut *mut super::enumeration::DeviceAccessInformation) -> HRESULT, - fn RequestAccessAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetGattServicesAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetGattServicesWithCacheModeAsync(&self, cacheMode: BluetoothCacheMode, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetGattServicesForUuidAsync(&self, serviceUuid: Guid, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetGattServicesForUuidWithCacheModeAsync(&self, serviceUuid: Guid, cacheMode: BluetoothCacheMode, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn RequestAccessAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetGattServicesAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetGattServicesWithCacheModeAsync(&self, cacheMode: BluetoothCacheMode, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetGattServicesForUuidAsync(&self, serviceUuid: Guid, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetGattServicesForUuidWithCacheModeAsync(&self, serviceUuid: Guid, cacheMode: BluetoothCacheMode, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IBluetoothLEDevice3 { - #[inline] pub unsafe fn get_device_access_information(&self) -> Result> { + #[inline] pub fn get_device_access_information(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceAccessInformation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_access_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn request_access_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_gatt_services_async(&self) -> Result>> { + }} + #[inline] pub fn get_gatt_services_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetGattServicesAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_gatt_services_with_cache_mode_async(&self, cacheMode: BluetoothCacheMode) -> Result>> { + }} + #[inline] pub fn get_gatt_services_with_cache_mode_async(&self, cacheMode: BluetoothCacheMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetGattServicesWithCacheModeAsync)(self as *const _ as *mut _, cacheMode, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_gatt_services_for_uuid_async(&self, serviceUuid: Guid) -> Result>> { + }} + #[inline] pub fn get_gatt_services_for_uuid_async(&self, serviceUuid: Guid) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetGattServicesForUuidAsync)(self as *const _ as *mut _, serviceUuid, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_gatt_services_for_uuid_with_cache_mode_async(&self, serviceUuid: Guid, cacheMode: BluetoothCacheMode) -> Result>> { + }} + #[inline] pub fn get_gatt_services_for_uuid_with_cache_mode_async(&self, serviceUuid: Guid, cacheMode: BluetoothCacheMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetGattServicesForUuidWithCacheModeAsync)(self as *const _ as *mut _, serviceUuid, cacheMode, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IBluetoothLEDevice4, 727732273, 8776, 19247, 172, 240, 124, 238, 54, 252, 88, 112); RT_INTERFACE!{interface IBluetoothLEDevice4(IBluetoothLEDevice4Vtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothLEDevice4] { fn get_BluetoothDeviceId(&self, out: *mut *mut BluetoothDeviceId) -> HRESULT }} impl IBluetoothLEDevice4 { - #[inline] pub unsafe fn get_bluetooth_device_id(&self) -> Result> { + #[inline] pub fn get_bluetooth_device_id(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BluetoothDeviceId)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FromBluetoothAddressAsync(&self, bluetoothAddress: u64, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn FromBluetoothAddressAsync(&self, bluetoothAddress: u64, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetDeviceSelector(&self, out: *mut HSTRING) -> HRESULT }} impl IBluetoothLEDeviceStatics { - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_bluetooth_address_async(&self, bluetoothAddress: u64) -> Result>> { + }} + #[inline] pub fn from_bluetooth_address_async(&self, bluetoothAddress: u64) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromBluetoothAddressAsync)(self as *const _ as *mut _, bluetoothAddress, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + }} + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &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] { @@ -7732,44 +7732,44 @@ RT_INTERFACE!{static interface IBluetoothLEDeviceStatics2(IBluetoothLEDeviceStat fn GetDeviceSelectorFromBluetoothAddress(&self, bluetoothAddress: u64, out: *mut HSTRING) -> HRESULT, fn GetDeviceSelectorFromBluetoothAddressWithBluetoothAddressType(&self, bluetoothAddress: u64, bluetoothAddressType: BluetoothAddressType, out: *mut HSTRING) -> HRESULT, fn GetDeviceSelectorFromAppearance(&self, appearance: *mut BluetoothLEAppearance, out: *mut HSTRING) -> HRESULT, - fn FromBluetoothAddressWithBluetoothAddressTypeAsync(&self, bluetoothAddress: u64, bluetoothAddressType: BluetoothAddressType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FromBluetoothAddressWithBluetoothAddressTypeAsync(&self, bluetoothAddress: u64, bluetoothAddressType: BluetoothAddressType, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IBluetoothLEDeviceStatics2 { - #[inline] pub unsafe fn get_device_selector_from_pairing_state(&self, pairingState: bool) -> Result { + #[inline] pub fn get_device_selector_from_pairing_state(&self, pairingState: bool) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorFromPairingState)(self as *const _ as *mut _, pairingState, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector_from_connection_status(&self, connectionStatus: BluetoothConnectionStatus) -> Result { + }} + #[inline] pub fn get_device_selector_from_connection_status(&self, connectionStatus: BluetoothConnectionStatus) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorFromConnectionStatus)(self as *const _ as *mut _, connectionStatus, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector_from_device_name(&self, deviceName: &HStringArg) -> Result { + }} + #[inline] pub fn get_device_selector_from_device_name(&self, deviceName: &HStringArg) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorFromDeviceName)(self as *const _ as *mut _, 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(&self, bluetoothAddress: u64) -> Result { + }} + #[inline] pub fn get_device_selector_from_bluetooth_address(&self, bluetoothAddress: u64) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorFromBluetoothAddress)(self as *const _ as *mut _, 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(&self, bluetoothAddress: u64, bluetoothAddressType: BluetoothAddressType) -> Result { + }} + #[inline] pub fn get_device_selector_from_bluetooth_address_with_bluetooth_address_type(&self, bluetoothAddress: u64, bluetoothAddressType: BluetoothAddressType) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorFromBluetoothAddressWithBluetoothAddressType)(self as *const _ as *mut _, bluetoothAddress, bluetoothAddressType, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector_from_appearance(&self, appearance: &BluetoothLEAppearance) -> Result { + }} + #[inline] pub fn get_device_selector_from_appearance(&self, appearance: &BluetoothLEAppearance) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorFromAppearance)(self as *const _ as *mut _, 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(&self, bluetoothAddress: u64, bluetoothAddressType: BluetoothAddressType) -> Result>> { + }} + #[inline] pub fn from_bluetooth_address_with_bluetooth_address_type_async(&self, bluetoothAddress: u64, bluetoothAddressType: BluetoothAddressType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromBluetoothAddressWithBluetoothAddressTypeAsync)(self as *const _ as *mut _, bluetoothAddress, bluetoothAddressType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -7782,52 +7782,52 @@ RT_ENUM! { enum BluetoothServiceCapabilities: u32 { }} 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(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_InRangeThresholdInDBm(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_OutOfRangeThresholdInDBm(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_OutOfRangeThresholdInDBm(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_OutOfRangeTimeout(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_OutOfRangeTimeout(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_SamplingInterval(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_SamplingInterval(&self, value: *mut super::super::foundation::IReference) -> HRESULT + fn get_InRangeThresholdInDBm(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_InRangeThresholdInDBm(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_OutOfRangeThresholdInDBm(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_OutOfRangeThresholdInDBm(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_OutOfRangeTimeout(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_OutOfRangeTimeout(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_SamplingInterval(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_SamplingInterval(&self, value: *mut foundation::IReference) -> HRESULT }} impl IBluetoothSignalStrengthFilter { - #[inline] pub unsafe fn get_in_range_threshold_in_dbm(&self) -> Result>> { + #[inline] pub fn get_in_range_threshold_in_dbm(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InRangeThresholdInDBm)(self 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(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_in_range_threshold_in_dbm(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InRangeThresholdInDBm)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_out_of_range_threshold_in_dbm(&self) -> Result>> { + }} + #[inline] pub fn get_out_of_range_threshold_in_dbm(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OutOfRangeThresholdInDBm)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_out_of_range_threshold_in_dbm(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_out_of_range_threshold_in_dbm(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OutOfRangeThresholdInDBm)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_out_of_range_timeout(&self) -> Result>> { + }} + #[inline] pub fn get_out_of_range_timeout(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OutOfRangeTimeout)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_out_of_range_timeout(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_out_of_range_timeout(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OutOfRangeTimeout)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_sampling_interval(&self) -> Result>> { + }} + #[inline] pub fn get_sampling_interval(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SamplingInterval)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_sampling_interval(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_sampling_interval(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SamplingInterval)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class BluetoothSignalStrengthFilter: IBluetoothSignalStrengthFilter} impl RtActivatable for BluetoothSignalStrengthFilter {} @@ -7835,30 +7835,30 @@ DEFINE_CLSID!(BluetoothSignalStrengthFilter(&[87,105,110,100,111,119,115,46,68,1 RT_CLASS!{static class BluetoothUuidHelper} impl RtActivatable for BluetoothUuidHelper {} impl BluetoothUuidHelper { - #[inline] pub fn from_short_id(shortId: u32) -> Result { unsafe { + #[inline] pub fn from_short_id(shortId: u32) -> Result { >::get_activation_factory().from_short_id(shortId) - }} - #[inline] pub fn try_get_short_id(uuid: Guid) -> Result>> { unsafe { + } + #[inline] pub fn try_get_short_id(uuid: Guid) -> Result>>> { >::get_activation_factory().try_get_short_id(uuid) - }} + } } DEFINE_CLSID!(BluetoothUuidHelper(&[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,85,117,105,100,72,101,108,112,101,114,0]) [CLSID_BluetoothUuidHelper]); DEFINE_IID!(IID_IBluetoothUuidHelperStatics, 400493784, 53108, 19233, 175, 230, 245, 122, 17, 188, 222, 160); RT_INTERFACE!{static interface IBluetoothUuidHelperStatics(IBluetoothUuidHelperStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBluetoothUuidHelperStatics] { fn FromShortId(&self, shortId: u32, out: *mut Guid) -> HRESULT, - fn TryGetShortId(&self, uuid: Guid, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn TryGetShortId(&self, uuid: Guid, out: *mut *mut foundation::IReference) -> HRESULT }} impl IBluetoothUuidHelperStatics { - #[inline] pub unsafe fn from_short_id(&self, shortId: u32) -> Result { + #[inline] pub fn from_short_id(&self, shortId: u32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).FromShortId)(self as *const _ as *mut _, shortId, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn try_get_short_id(&self, uuid: Guid) -> Result>> { + }} + #[inline] pub fn try_get_short_id(&self, uuid: Guid) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetShortId)(self as *const _ as *mut _, uuid, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } pub mod rfcomm { // Windows.Devices.Bluetooth.Rfcomm use ::prelude::*; @@ -7872,68 +7872,68 @@ RT_INTERFACE!{interface IRfcommDeviceService(IRfcommDeviceServiceVtbl): IInspect #[cfg(feature="windows-networking")] fn get_ProtectionLevel(&self, out: *mut ::rt::gen::windows::networking::sockets::SocketProtectionLevel) -> HRESULT, #[cfg(not(feature="windows-networking"))] fn __Dummy4(&self) -> (), #[cfg(feature="windows-networking")] fn get_MaxProtectionLevel(&self, out: *mut ::rt::gen::windows::networking::sockets::SocketProtectionLevel) -> HRESULT, - #[cfg(feature="windows-storage")] fn GetSdpRawAttributesAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IMapView>) -> HRESULT, - #[cfg(feature="windows-storage")] fn GetSdpRawAttributesWithCacheModeAsync(&self, cacheMode: super::BluetoothCacheMode, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IMapView>) -> HRESULT + #[cfg(feature="windows-storage")] fn GetSdpRawAttributesAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + #[cfg(feature="windows-storage")] fn GetSdpRawAttributesWithCacheModeAsync(&self, cacheMode: super::BluetoothCacheMode, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IRfcommDeviceService { - #[cfg(feature="windows-networking")] #[inline] pub unsafe fn get_connection_host_name(&self) -> Result> { + #[cfg(feature="windows-networking")] #[inline] pub fn get_connection_host_name(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ConnectionHostName)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_connection_service_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_connection_service_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ConnectionServiceName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_id(&self) -> Result> { + }} + #[inline] pub fn get_service_id(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServiceId)(self 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 get_protection_level(&self) -> Result<::rt::gen::windows::networking::sockets::SocketProtectionLevel> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-networking")] #[inline] pub fn get_protection_level(&self) -> Result<::rt::gen::windows::networking::sockets::SocketProtectionLevel> { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProtectionLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-networking")] #[inline] pub unsafe fn get_max_protection_level(&self) -> Result<::rt::gen::windows::networking::sockets::SocketProtectionLevel> { + }} + #[cfg(feature="windows-networking")] #[inline] pub fn get_max_protection_level(&self) -> Result<::rt::gen::windows::networking::sockets::SocketProtectionLevel> { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxProtectionLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_sdp_raw_attributes_async(&self) -> Result>>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_sdp_raw_attributes_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSdpRawAttributesAsync)(self 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_sdp_raw_attributes_with_cache_mode_async(&self, cacheMode: super::BluetoothCacheMode) -> Result>>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_sdp_raw_attributes_with_cache_mode_async(&self, cacheMode: super::BluetoothCacheMode) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSdpRawAttributesWithCacheModeAsync)(self as *const _ as *mut _, cacheMode, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class RfcommDeviceService: IRfcommDeviceService} impl RtActivatable for RfcommDeviceService {} impl RtActivatable for RfcommDeviceService {} impl RfcommDeviceService { - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} - #[inline] pub fn get_device_selector(serviceId: &RfcommServiceId) -> Result { unsafe { + } + #[inline] pub fn get_device_selector(serviceId: &RfcommServiceId) -> Result { >::get_activation_factory().get_device_selector(serviceId) - }} - #[inline] pub fn get_device_selector_for_bluetooth_device(bluetoothDevice: &super::BluetoothDevice) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_for_bluetooth_device(bluetoothDevice: &super::BluetoothDevice) -> Result { >::get_activation_factory().get_device_selector_for_bluetooth_device(bluetoothDevice) - }} - #[inline] pub fn get_device_selector_for_bluetooth_device_with_cache_mode(bluetoothDevice: &super::BluetoothDevice, cacheMode: super::BluetoothCacheMode) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_for_bluetooth_device_with_cache_mode(bluetoothDevice: &super::BluetoothDevice, cacheMode: super::BluetoothCacheMode) -> Result { >::get_activation_factory().get_device_selector_for_bluetooth_device_with_cache_mode(bluetoothDevice, cacheMode) - }} - #[inline] pub fn get_device_selector_for_bluetooth_device_and_service_id(bluetoothDevice: &super::BluetoothDevice, serviceId: &RfcommServiceId) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_for_bluetooth_device_and_service_id(bluetoothDevice: &super::BluetoothDevice, serviceId: &RfcommServiceId) -> Result { >::get_activation_factory().get_device_selector_for_bluetooth_device_and_service_id(bluetoothDevice, serviceId) - }} - #[inline] pub fn get_device_selector_for_bluetooth_device_and_service_id_with_cache_mode(bluetoothDevice: &super::BluetoothDevice, serviceId: &RfcommServiceId, cacheMode: super::BluetoothCacheMode) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_for_bluetooth_device_and_service_id_with_cache_mode(bluetoothDevice: &super::BluetoothDevice, serviceId: &RfcommServiceId, cacheMode: super::BluetoothCacheMode) -> Result { >::get_activation_factory().get_device_selector_for_bluetooth_device_and_service_id_with_cache_mode(bluetoothDevice, serviceId, cacheMode) - }} + } } DEFINE_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]) [CLSID_RfcommDeviceService]); DEFINE_IID!(IID_IRfcommDeviceService2, 1399647508, 60365, 18942, 191, 159, 64, 239, 198, 137, 178, 13); @@ -7941,63 +7941,63 @@ RT_INTERFACE!{interface IRfcommDeviceService2(IRfcommDeviceService2Vtbl): IInspe fn get_Device(&self, out: *mut *mut super::BluetoothDevice) -> HRESULT }} impl IRfcommDeviceService2 { - #[inline] pub unsafe fn get_device(&self) -> Result> { + #[inline] pub fn get_device(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Device)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut super::super::enumeration::DeviceAccessInformation) -> HRESULT, - fn RequestAccessAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn RequestAccessAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IRfcommDeviceService3 { - #[inline] pub unsafe fn get_device_access_information(&self) -> Result> { + #[inline] pub fn get_device_access_information(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceAccessInformation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_access_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn request_access_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessAsync)(self as *const _ as *mut _, &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(&self, out: *mut super::BluetoothError) -> HRESULT, - fn get_Services(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn get_Services(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IRfcommDeviceServicesResult { - #[inline] pub unsafe fn get_error(&self) -> Result { + #[inline] pub fn get_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Error)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_services(&self) -> Result>> { + }} + #[inline] pub fn get_services(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Services)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RfcommDeviceServicesResult: IRfcommDeviceServicesResult} 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(&self, deviceId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetDeviceSelector(&self, serviceId: *mut RfcommServiceId, out: *mut HSTRING) -> HRESULT }} impl IRfcommDeviceServiceStatics { - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector(&self, serviceId: &RfcommServiceId) -> Result { + }} + #[inline] pub fn get_device_selector(&self, serviceId: &RfcommServiceId) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, 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] { @@ -8007,26 +8007,26 @@ RT_INTERFACE!{static interface IRfcommDeviceServiceStatics2(IRfcommDeviceService fn GetDeviceSelectorForBluetoothDeviceAndServiceIdWithCacheMode(&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(&self, bluetoothDevice: &super::BluetoothDevice) -> Result { + #[inline] pub fn get_device_selector_for_bluetooth_device(&self, bluetoothDevice: &super::BluetoothDevice) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorForBluetoothDevice)(self as *const _ as *mut _, 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(&self, bluetoothDevice: &super::BluetoothDevice, cacheMode: super::BluetoothCacheMode) -> Result { + }} + #[inline] pub fn get_device_selector_for_bluetooth_device_with_cache_mode(&self, bluetoothDevice: &super::BluetoothDevice, cacheMode: super::BluetoothCacheMode) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorForBluetoothDeviceWithCacheMode)(self as *const _ as *mut _, 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(&self, bluetoothDevice: &super::BluetoothDevice, serviceId: &RfcommServiceId) -> Result { + }} + #[inline] pub fn get_device_selector_for_bluetooth_device_and_service_id(&self, bluetoothDevice: &super::BluetoothDevice, serviceId: &RfcommServiceId) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorForBluetoothDeviceAndServiceId)(self as *const _ as *mut _, 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(&self, bluetoothDevice: &super::BluetoothDevice, serviceId: &RfcommServiceId, cacheMode: super::BluetoothCacheMode) -> Result { + }} + #[inline] pub fn get_device_selector_for_bluetooth_device_and_service_id_with_cache_mode(&self, bluetoothDevice: &super::BluetoothDevice, serviceId: &RfcommServiceId, cacheMode: super::BluetoothCacheMode) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorForBluetoothDeviceAndServiceIdWithCacheMode)(self as *const _ as *mut _, 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_IRfcommServiceId, 576885252, 32258, 16407, 129, 54, 218, 27, 106, 27, 155, 191); RT_INTERFACE!{interface IRfcommServiceId(IRfcommServiceIdVtbl): IInspectable(IInspectableVtbl) [IID_IRfcommServiceId] { @@ -8035,49 +8035,49 @@ RT_INTERFACE!{interface IRfcommServiceId(IRfcommServiceIdVtbl): IInspectable(IIn fn AsString(&self, out: *mut HSTRING) -> HRESULT }} impl IRfcommServiceId { - #[inline] pub unsafe fn get_uuid(&self) -> Result { + #[inline] pub fn get_uuid(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Uuid)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn as_short_id(&self) -> Result { + }} + #[inline] pub fn as_short_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).AsShortId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn as_string(&self) -> Result { + }} + #[inline] pub fn as_string(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AsString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class RfcommServiceId: IRfcommServiceId} impl RtActivatable for RfcommServiceId {} impl RfcommServiceId { - #[inline] pub fn from_uuid(uuid: Guid) -> Result> { unsafe { + #[inline] pub fn from_uuid(uuid: Guid) -> Result>> { >::get_activation_factory().from_uuid(uuid) - }} - #[inline] pub fn from_short_id(shortId: u32) -> Result> { unsafe { + } + #[inline] pub fn from_short_id(shortId: u32) -> Result>> { >::get_activation_factory().from_short_id(shortId) - }} - #[inline] pub fn get_serial_port() -> Result> { unsafe { + } + #[inline] pub fn get_serial_port() -> Result>> { >::get_activation_factory().get_serial_port() - }} - #[inline] pub fn get_obex_object_push() -> Result> { unsafe { + } + #[inline] pub fn get_obex_object_push() -> Result>> { >::get_activation_factory().get_obex_object_push() - }} - #[inline] pub fn get_obex_file_transfer() -> Result> { unsafe { + } + #[inline] pub fn get_obex_file_transfer() -> Result>> { >::get_activation_factory().get_obex_file_transfer() - }} - #[inline] pub fn get_phone_book_access_pce() -> Result> { unsafe { + } + #[inline] pub fn get_phone_book_access_pce() -> Result>> { >::get_activation_factory().get_phone_book_access_pce() - }} - #[inline] pub fn get_phone_book_access_pse() -> Result> { unsafe { + } + #[inline] pub fn get_phone_book_access_pse() -> Result>> { >::get_activation_factory().get_phone_book_access_pse() - }} - #[inline] pub fn get_generic_file_transfer() -> Result> { unsafe { + } + #[inline] pub fn get_generic_file_transfer() -> Result>> { >::get_activation_factory().get_generic_file_transfer() - }} + } } DEFINE_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]) [CLSID_RfcommServiceId]); DEFINE_IID!(IID_IRfcommServiceIdStatics, 706191034, 43381, 18147, 181, 107, 8, 255, 215, 131, 165, 254); @@ -8092,82 +8092,82 @@ RT_INTERFACE!{static interface IRfcommServiceIdStatics(IRfcommServiceIdStaticsVt fn get_GenericFileTransfer(&self, out: *mut *mut RfcommServiceId) -> HRESULT }} impl IRfcommServiceIdStatics { - #[inline] pub unsafe fn from_uuid(&self, uuid: Guid) -> Result> { + #[inline] pub fn from_uuid(&self, uuid: Guid) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromUuid)(self as *const _ as *mut _, uuid, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_short_id(&self, shortId: u32) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn from_short_id(&self, shortId: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromShortId)(self as *const _ as *mut _, shortId, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_serial_port(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_serial_port(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SerialPort)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_obex_object_push(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_obex_object_push(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ObexObjectPush)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_obex_file_transfer(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_obex_file_transfer(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ObexFileTransfer)(self 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_pce(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_phone_book_access_pce(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PhoneBookAccessPce)(self 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(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_phone_book_access_pse(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PhoneBookAccessPse)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_generic_file_transfer(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_generic_file_transfer(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_GenericFileTransfer)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut *mut RfcommServiceId) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-storage")] fn get_SdpRawAttributes(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMap) -> HRESULT, + #[cfg(feature="windows-storage")] fn get_SdpRawAttributes(&self, out: *mut *mut foundation::collections::IMap) -> HRESULT, #[cfg(not(feature="windows-networking"))] fn __Dummy2(&self) -> (), #[cfg(feature="windows-networking")] fn StartAdvertising(&self, listener: *mut ::rt::gen::windows::networking::sockets::StreamSocketListener) -> HRESULT, fn StopAdvertising(&self) -> HRESULT }} impl IRfcommServiceProvider { - #[inline] pub unsafe fn get_service_id(&self) -> Result> { + #[inline] pub fn get_service_id(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServiceId)(self 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_sdp_raw_attributes(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_sdp_raw_attributes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SdpRawAttributes)(self 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 start_advertising(&self, listener: &::rt::gen::windows::networking::sockets::StreamSocketListener) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-networking")] #[inline] pub fn start_advertising(&self, listener: &::rt::gen::windows::networking::sockets::StreamSocketListener) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StartAdvertising)(self as *const _ as *mut _, listener as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop_advertising(&self) -> Result<()> { + }} + #[inline] pub fn stop_advertising(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StopAdvertising)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class RfcommServiceProvider: IRfcommServiceProvider} impl RtActivatable for RfcommServiceProvider {} impl RfcommServiceProvider { - #[inline] pub fn create_async(serviceId: &RfcommServiceId) -> Result>> { unsafe { + #[inline] pub fn create_async(serviceId: &RfcommServiceId) -> Result>> { >::get_activation_factory().create_async(serviceId) - }} + } } DEFINE_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]) [CLSID_RfcommServiceProvider]); DEFINE_IID!(IID_IRfcommServiceProvider2, 1936449478, 15489, 19742, 186, 242, 221, 187, 129, 40, 69, 18); @@ -8175,199 +8175,199 @@ RT_INTERFACE!{interface IRfcommServiceProvider2(IRfcommServiceProvider2Vtbl): II #[cfg(feature="windows-networking")] fn StartAdvertisingWithRadioDiscoverability(&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(&self, listener: &::rt::gen::windows::networking::sockets::StreamSocketListener, radioDiscoverable: bool) -> Result<()> { + #[cfg(feature="windows-networking")] #[inline] pub fn start_advertising_with_radio_discoverability(&self, listener: &::rt::gen::windows::networking::sockets::StreamSocketListener, radioDiscoverable: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StartAdvertisingWithRadioDiscoverability)(self as *const _ as *mut _, listener as *const _ as *mut _, radioDiscoverable); if hr == S_OK { Ok(()) } 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(&self, serviceId: *mut RfcommServiceId, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn CreateAsync(&self, serviceId: *mut RfcommServiceId, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IRfcommServiceProviderStatics { - #[inline] pub unsafe fn create_async(&self, serviceId: &RfcommServiceId) -> Result>> { + #[inline] pub fn create_async(&self, serviceId: &RfcommServiceId) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAsync)(self as *const _ as *mut _, serviceId as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } } // Windows.Devices.Bluetooth.Rfcomm pub mod genericattributeprofile { // Windows.Devices.Bluetooth.GenericAttributeProfile use ::prelude::*; 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(&self, descriptorUuid: Guid, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn GetDescriptors(&self, descriptorUuid: Guid, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_CharacteristicProperties(&self, out: *mut GattCharacteristicProperties) -> HRESULT, fn get_ProtectionLevel(&self, out: *mut GattProtectionLevel) -> HRESULT, fn put_ProtectionLevel(&self, value: GattProtectionLevel) -> HRESULT, fn get_UserDescription(&self, out: *mut HSTRING) -> HRESULT, fn get_Uuid(&self, out: *mut Guid) -> HRESULT, fn get_AttributeHandle(&self, out: *mut u16) -> HRESULT, - fn get_PresentationFormats(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn ReadValueAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn ReadValueWithCacheModeAsync(&self, cacheMode: super::BluetoothCacheMode, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn get_PresentationFormats(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn ReadValueAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ReadValueWithCacheModeAsync(&self, cacheMode: super::BluetoothCacheMode, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy10(&self) -> (), - #[cfg(feature="windows-storage")] fn WriteValueAsync(&self, value: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn WriteValueAsync(&self, value: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy11(&self) -> (), - #[cfg(feature="windows-storage")] fn WriteValueWithOptionAsync(&self, value: *mut ::rt::gen::windows::storage::streams::IBuffer, writeOption: GattWriteOption, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn ReadClientCharacteristicConfigurationDescriptorAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn WriteClientCharacteristicConfigurationDescriptorAsync(&self, clientCharacteristicConfigurationDescriptorValue: GattClientCharacteristicConfigurationDescriptorValue, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn add_ValueChanged(&self, valueChangedHandler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ValueChanged(&self, valueChangedEventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + #[cfg(feature="windows-storage")] fn WriteValueWithOptionAsync(&self, value: *mut ::rt::gen::windows::storage::streams::IBuffer, writeOption: GattWriteOption, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ReadClientCharacteristicConfigurationDescriptorAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn WriteClientCharacteristicConfigurationDescriptorAsync(&self, clientCharacteristicConfigurationDescriptorValue: GattClientCharacteristicConfigurationDescriptorValue, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_ValueChanged(&self, valueChangedHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ValueChanged(&self, valueChangedEventCookie: foundation::EventRegistrationToken) -> HRESULT }} impl IGattCharacteristic { - #[inline] pub unsafe fn get_descriptors(&self, descriptorUuid: Guid) -> Result>> { + #[inline] pub fn get_descriptors(&self, descriptorUuid: Guid) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDescriptors)(self as *const _ as *mut _, descriptorUuid, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_characteristic_properties(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_characteristic_properties(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CharacteristicProperties)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_protection_level(&self) -> Result { + }} + #[inline] pub fn get_protection_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProtectionLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_protection_level(&self, value: GattProtectionLevel) -> Result<()> { + }} + #[inline] pub fn set_protection_level(&self, value: GattProtectionLevel) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ProtectionLevel)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_user_description(&self) -> Result { + }} + #[inline] pub fn get_user_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UserDescription)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_uuid(&self) -> Result { + }} + #[inline] pub fn get_uuid(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Uuid)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_attribute_handle(&self) -> Result { + }} + #[inline] pub fn get_attribute_handle(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AttributeHandle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_presentation_formats(&self) -> Result>> { + }} + #[inline] pub fn get_presentation_formats(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PresentationFormats)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn read_value_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn read_value_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadValueAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn read_value_with_cache_mode_async(&self, cacheMode: super::BluetoothCacheMode) -> Result>> { + }} + #[inline] pub fn read_value_with_cache_mode_async(&self, cacheMode: super::BluetoothCacheMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadValueWithCacheModeAsync)(self as *const _ as *mut _, 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(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn write_value_async(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).WriteValueAsync)(self as *const _ as *mut _, 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(&self, value: &::rt::gen::windows::storage::streams::IBuffer, writeOption: GattWriteOption) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn write_value_with_option_async(&self, value: &::rt::gen::windows::storage::streams::IBuffer, writeOption: GattWriteOption) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).WriteValueWithOptionAsync)(self as *const _ as *mut _, 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(&self) -> Result>> { + }} + #[inline] pub fn read_client_characteristic_configuration_descriptor_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadClientCharacteristicConfigurationDescriptorAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn write_client_characteristic_configuration_descriptor_async(&self, clientCharacteristicConfigurationDescriptorValue: GattClientCharacteristicConfigurationDescriptorValue) -> Result>> { + }} + #[inline] pub fn write_client_characteristic_configuration_descriptor_async(&self, clientCharacteristicConfigurationDescriptorValue: GattClientCharacteristicConfigurationDescriptorValue) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).WriteClientCharacteristicConfigurationDescriptorAsync)(self as *const _ as *mut _, clientCharacteristicConfigurationDescriptorValue, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_value_changed(&self, valueChangedHandler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_value_changed(&self, valueChangedHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ValueChanged)(self as *const _ as *mut _, valueChangedHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_value_changed(&self, valueChangedEventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_value_changed(&self, valueChangedEventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ValueChanged)(self as *const _ as *mut _, valueChangedEventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class GattCharacteristic: IGattCharacteristic} impl RtActivatable for GattCharacteristic {} impl GattCharacteristic { - #[inline] pub fn convert_short_id_to_uuid(shortId: u16) -> Result { unsafe { + #[inline] pub fn convert_short_id_to_uuid(shortId: u16) -> Result { >::get_activation_factory().convert_short_id_to_uuid(shortId) - }} + } } DEFINE_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]) [CLSID_GattCharacteristic]); 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(&self, out: *mut *mut GattDeviceService) -> HRESULT, - fn GetAllDescriptors(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn GetAllDescriptors(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IGattCharacteristic2 { - #[inline] pub unsafe fn get_service(&self) -> Result> { + #[inline] pub fn get_service(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Service)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_all_descriptors(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_all_descriptors(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAllDescriptors)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IGattCharacteristic3, 1060922942, 37844, 16491, 184, 23, 219, 129, 248, 237, 83, 179); RT_INTERFACE!{interface IGattCharacteristic3(IGattCharacteristic3Vtbl): IInspectable(IInspectableVtbl) [IID_IGattCharacteristic3] { - fn GetDescriptorsAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn GetDescriptorsWithCacheModeAsync(&self, cacheMode: super::BluetoothCacheMode, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn GetDescriptorsForUuidAsync(&self, descriptorUuid: Guid, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn GetDescriptorsForUuidWithCacheModeAsync(&self, descriptorUuid: Guid, cacheMode: super::BluetoothCacheMode, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn GetDescriptorsAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetDescriptorsWithCacheModeAsync(&self, cacheMode: super::BluetoothCacheMode, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetDescriptorsForUuidAsync(&self, descriptorUuid: Guid, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetDescriptorsForUuidWithCacheModeAsync(&self, descriptorUuid: Guid, cacheMode: super::BluetoothCacheMode, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy4(&self) -> (), - #[cfg(feature="windows-storage")] fn WriteValueWithResultAsync(&self, value: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn WriteValueWithResultAsync(&self, value: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy5(&self) -> (), - #[cfg(feature="windows-storage")] fn WriteValueWithResultAndOptionAsync(&self, value: *mut ::rt::gen::windows::storage::streams::IBuffer, writeOption: GattWriteOption, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn WriteClientCharacteristicConfigurationDescriptorWithResultAsync(&self, clientCharacteristicConfigurationDescriptorValue: GattClientCharacteristicConfigurationDescriptorValue, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn WriteValueWithResultAndOptionAsync(&self, value: *mut ::rt::gen::windows::storage::streams::IBuffer, writeOption: GattWriteOption, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn WriteClientCharacteristicConfigurationDescriptorWithResultAsync(&self, clientCharacteristicConfigurationDescriptorValue: GattClientCharacteristicConfigurationDescriptorValue, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IGattCharacteristic3 { - #[inline] pub unsafe fn get_descriptors_async(&self) -> Result>> { + #[inline] pub fn get_descriptors_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDescriptorsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_descriptors_with_cache_mode_async(&self, cacheMode: super::BluetoothCacheMode) -> Result>> { + }} + #[inline] pub fn get_descriptors_with_cache_mode_async(&self, cacheMode: super::BluetoothCacheMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDescriptorsWithCacheModeAsync)(self as *const _ as *mut _, cacheMode, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_descriptors_for_uuid_async(&self, descriptorUuid: Guid) -> Result>> { + }} + #[inline] pub fn get_descriptors_for_uuid_async(&self, descriptorUuid: Guid) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDescriptorsForUuidAsync)(self as *const _ as *mut _, descriptorUuid, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_descriptors_for_uuid_with_cache_mode_async(&self, descriptorUuid: Guid, cacheMode: super::BluetoothCacheMode) -> Result>> { + }} + #[inline] pub fn get_descriptors_for_uuid_with_cache_mode_async(&self, descriptorUuid: Guid, cacheMode: super::BluetoothCacheMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDescriptorsForUuidWithCacheModeAsync)(self as *const _ as *mut _, descriptorUuid, cacheMode, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn write_value_with_result_async(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn write_value_with_result_async(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).WriteValueWithResultAsync)(self as *const _ as *mut _, 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_result_and_option_async(&self, value: &::rt::gen::windows::storage::streams::IBuffer, writeOption: GattWriteOption) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn write_value_with_result_and_option_async(&self, value: &::rt::gen::windows::storage::streams::IBuffer, writeOption: GattWriteOption) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).WriteValueWithResultAndOptionAsync)(self as *const _ as *mut _, value as *const _ as *mut _, writeOption, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn write_client_characteristic_configuration_descriptor_with_result_async(&self, clientCharacteristicConfigurationDescriptorValue: GattClientCharacteristicConfigurationDescriptorValue) -> Result>> { + }} + #[inline] pub fn write_client_characteristic_configuration_descriptor_with_result_async(&self, clientCharacteristicConfigurationDescriptorValue: GattClientCharacteristicConfigurationDescriptorValue) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).WriteClientCharacteristicConfigurationDescriptorWithResultAsync)(self as *const _ as *mut _, clientCharacteristicConfigurationDescriptorValue, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -8375,25 +8375,25 @@ RT_ENUM! { enum GattCharacteristicProperties: u32 { DEFINE_IID!(IID_IGattCharacteristicsResult, 294949980, 45655, 20286, 157, 183, 246, 139, 201, 169, 174, 242); RT_INTERFACE!{interface IGattCharacteristicsResult(IGattCharacteristicsResultVtbl): IInspectable(IInspectableVtbl) [IID_IGattCharacteristicsResult] { fn get_Status(&self, out: *mut GattCommunicationStatus) -> HRESULT, - fn get_ProtocolError(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn get_Characteristics(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn get_ProtocolError(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_Characteristics(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IGattCharacteristicsResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_protocol_error(&self) -> Result>> { + }} + #[inline] pub fn get_protocol_error(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProtocolError)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_characteristics(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_characteristics(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Characteristics)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class GattCharacteristicsResult: IGattCharacteristicsResult} DEFINE_IID!(IID_IGattCharacteristicStatics, 1506496707, 22836, 20328, 161, 152, 235, 134, 79, 164, 78, 107); @@ -8401,259 +8401,259 @@ RT_INTERFACE!{static interface IGattCharacteristicStatics(IGattCharacteristicSta fn ConvertShortIdToUuid(&self, shortId: u16, out: *mut Guid) -> HRESULT }} impl IGattCharacteristicStatics { - #[inline] pub unsafe fn convert_short_id_to_uuid(&self, shortId: u16) -> Result { + #[inline] pub fn convert_short_id_to_uuid(&self, shortId: u16) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ConvertShortIdToUuid)(self as *const _ as *mut _, shortId, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{static class GattCharacteristicUuids} impl RtActivatable for GattCharacteristicUuids {} impl RtActivatable for GattCharacteristicUuids {} impl GattCharacteristicUuids { - #[inline] pub fn get_battery_level() -> Result { unsafe { + #[inline] pub fn get_battery_level() -> Result { >::get_activation_factory().get_battery_level() - }} - #[inline] pub fn get_blood_pressure_feature() -> Result { unsafe { + } + #[inline] pub fn get_blood_pressure_feature() -> Result { >::get_activation_factory().get_blood_pressure_feature() - }} - #[inline] pub fn get_blood_pressure_measurement() -> Result { unsafe { + } + #[inline] pub fn get_blood_pressure_measurement() -> Result { >::get_activation_factory().get_blood_pressure_measurement() - }} - #[inline] pub fn get_body_sensor_location() -> Result { unsafe { + } + #[inline] pub fn get_body_sensor_location() -> Result { >::get_activation_factory().get_body_sensor_location() - }} - #[inline] pub fn get_csc_feature() -> Result { unsafe { + } + #[inline] pub fn get_csc_feature() -> Result { >::get_activation_factory().get_csc_feature() - }} - #[inline] pub fn get_csc_measurement() -> Result { unsafe { + } + #[inline] pub fn get_csc_measurement() -> Result { >::get_activation_factory().get_csc_measurement() - }} - #[inline] pub fn get_glucose_feature() -> Result { unsafe { + } + #[inline] pub fn get_glucose_feature() -> Result { >::get_activation_factory().get_glucose_feature() - }} - #[inline] pub fn get_glucose_measurement() -> Result { unsafe { + } + #[inline] pub fn get_glucose_measurement() -> Result { >::get_activation_factory().get_glucose_measurement() - }} - #[inline] pub fn get_glucose_measurement_context() -> Result { unsafe { + } + #[inline] pub fn get_glucose_measurement_context() -> Result { >::get_activation_factory().get_glucose_measurement_context() - }} - #[inline] pub fn get_heart_rate_control_point() -> Result { unsafe { + } + #[inline] pub fn get_heart_rate_control_point() -> Result { >::get_activation_factory().get_heart_rate_control_point() - }} - #[inline] pub fn get_heart_rate_measurement() -> Result { unsafe { + } + #[inline] pub fn get_heart_rate_measurement() -> Result { >::get_activation_factory().get_heart_rate_measurement() - }} - #[inline] pub fn get_intermediate_cuff_pressure() -> Result { unsafe { + } + #[inline] pub fn get_intermediate_cuff_pressure() -> Result { >::get_activation_factory().get_intermediate_cuff_pressure() - }} - #[inline] pub fn get_intermediate_temperature() -> Result { unsafe { + } + #[inline] pub fn get_intermediate_temperature() -> Result { >::get_activation_factory().get_intermediate_temperature() - }} - #[inline] pub fn get_measurement_interval() -> Result { unsafe { + } + #[inline] pub fn get_measurement_interval() -> Result { >::get_activation_factory().get_measurement_interval() - }} - #[inline] pub fn get_record_access_control_point() -> Result { unsafe { + } + #[inline] pub fn get_record_access_control_point() -> Result { >::get_activation_factory().get_record_access_control_point() - }} - #[inline] pub fn get_rsc_feature() -> Result { unsafe { + } + #[inline] pub fn get_rsc_feature() -> Result { >::get_activation_factory().get_rsc_feature() - }} - #[inline] pub fn get_rsc_measurement() -> Result { unsafe { + } + #[inline] pub fn get_rsc_measurement() -> Result { >::get_activation_factory().get_rsc_measurement() - }} - #[inline] pub fn get_sccontrol_point() -> Result { unsafe { + } + #[inline] pub fn get_sccontrol_point() -> Result { >::get_activation_factory().get_sccontrol_point() - }} - #[inline] pub fn get_sensor_location() -> Result { unsafe { + } + #[inline] pub fn get_sensor_location() -> Result { >::get_activation_factory().get_sensor_location() - }} - #[inline] pub fn get_temperature_measurement() -> Result { unsafe { + } + #[inline] pub fn get_temperature_measurement() -> Result { >::get_activation_factory().get_temperature_measurement() - }} - #[inline] pub fn get_temperature_type() -> Result { unsafe { + } + #[inline] pub fn get_temperature_type() -> Result { >::get_activation_factory().get_temperature_type() - }} - #[inline] pub fn get_alert_category_id() -> Result { unsafe { + } + #[inline] pub fn get_alert_category_id() -> Result { >::get_activation_factory().get_alert_category_id() - }} - #[inline] pub fn get_alert_category_id_bit_mask() -> Result { unsafe { + } + #[inline] pub fn get_alert_category_id_bit_mask() -> Result { >::get_activation_factory().get_alert_category_id_bit_mask() - }} - #[inline] pub fn get_alert_level() -> Result { unsafe { + } + #[inline] pub fn get_alert_level() -> Result { >::get_activation_factory().get_alert_level() - }} - #[inline] pub fn get_alert_notification_control_point() -> Result { unsafe { + } + #[inline] pub fn get_alert_notification_control_point() -> Result { >::get_activation_factory().get_alert_notification_control_point() - }} - #[inline] pub fn get_alert_status() -> Result { unsafe { + } + #[inline] pub fn get_alert_status() -> Result { >::get_activation_factory().get_alert_status() - }} - #[inline] pub fn get_gap_appearance() -> Result { unsafe { + } + #[inline] pub fn get_gap_appearance() -> Result { >::get_activation_factory().get_gap_appearance() - }} - #[inline] pub fn get_boot_keyboard_input_report() -> Result { unsafe { + } + #[inline] pub fn get_boot_keyboard_input_report() -> Result { >::get_activation_factory().get_boot_keyboard_input_report() - }} - #[inline] pub fn get_boot_keyboard_output_report() -> Result { unsafe { + } + #[inline] pub fn get_boot_keyboard_output_report() -> Result { >::get_activation_factory().get_boot_keyboard_output_report() - }} - #[inline] pub fn get_boot_mouse_input_report() -> Result { unsafe { + } + #[inline] pub fn get_boot_mouse_input_report() -> Result { >::get_activation_factory().get_boot_mouse_input_report() - }} - #[inline] pub fn get_current_time() -> Result { unsafe { + } + #[inline] pub fn get_current_time() -> Result { >::get_activation_factory().get_current_time() - }} - #[inline] pub fn get_cycling_power_control_point() -> Result { unsafe { + } + #[inline] pub fn get_cycling_power_control_point() -> Result { >::get_activation_factory().get_cycling_power_control_point() - }} - #[inline] pub fn get_cycling_power_feature() -> Result { unsafe { + } + #[inline] pub fn get_cycling_power_feature() -> Result { >::get_activation_factory().get_cycling_power_feature() - }} - #[inline] pub fn get_cycling_power_measurement() -> Result { unsafe { + } + #[inline] pub fn get_cycling_power_measurement() -> Result { >::get_activation_factory().get_cycling_power_measurement() - }} - #[inline] pub fn get_cycling_power_vector() -> Result { unsafe { + } + #[inline] pub fn get_cycling_power_vector() -> Result { >::get_activation_factory().get_cycling_power_vector() - }} - #[inline] pub fn get_date_time() -> Result { unsafe { + } + #[inline] pub fn get_date_time() -> Result { >::get_activation_factory().get_date_time() - }} - #[inline] pub fn get_day_date_time() -> Result { unsafe { + } + #[inline] pub fn get_day_date_time() -> Result { >::get_activation_factory().get_day_date_time() - }} - #[inline] pub fn get_day_of_week() -> Result { unsafe { + } + #[inline] pub fn get_day_of_week() -> Result { >::get_activation_factory().get_day_of_week() - }} - #[inline] pub fn get_gap_device_name() -> Result { unsafe { + } + #[inline] pub fn get_gap_device_name() -> Result { >::get_activation_factory().get_gap_device_name() - }} - #[inline] pub fn get_dst_offset() -> Result { unsafe { + } + #[inline] pub fn get_dst_offset() -> Result { >::get_activation_factory().get_dst_offset() - }} - #[inline] pub fn get_exact_time256() -> Result { unsafe { + } + #[inline] pub fn get_exact_time256() -> Result { >::get_activation_factory().get_exact_time256() - }} - #[inline] pub fn get_firmware_revision_string() -> Result { unsafe { + } + #[inline] pub fn get_firmware_revision_string() -> Result { >::get_activation_factory().get_firmware_revision_string() - }} - #[inline] pub fn get_hardware_revision_string() -> Result { unsafe { + } + #[inline] pub fn get_hardware_revision_string() -> Result { >::get_activation_factory().get_hardware_revision_string() - }} - #[inline] pub fn get_hid_control_point() -> Result { unsafe { + } + #[inline] pub fn get_hid_control_point() -> Result { >::get_activation_factory().get_hid_control_point() - }} - #[inline] pub fn get_hid_information() -> Result { unsafe { + } + #[inline] pub fn get_hid_information() -> Result { >::get_activation_factory().get_hid_information() - }} - #[inline] pub fn get_ieee1107320601_regulatory_certification_data_list() -> Result { unsafe { + } + #[inline] pub fn get_ieee1107320601_regulatory_certification_data_list() -> Result { >::get_activation_factory().get_ieee1107320601_regulatory_certification_data_list() - }} - #[inline] pub fn get_ln_control_point() -> Result { unsafe { + } + #[inline] pub fn get_ln_control_point() -> Result { >::get_activation_factory().get_ln_control_point() - }} - #[inline] pub fn get_ln_feature() -> Result { unsafe { + } + #[inline] pub fn get_ln_feature() -> Result { >::get_activation_factory().get_ln_feature() - }} - #[inline] pub fn get_local_time_information() -> Result { unsafe { + } + #[inline] pub fn get_local_time_information() -> Result { >::get_activation_factory().get_local_time_information() - }} - #[inline] pub fn get_location_and_speed() -> Result { unsafe { + } + #[inline] pub fn get_location_and_speed() -> Result { >::get_activation_factory().get_location_and_speed() - }} - #[inline] pub fn get_manufacturer_name_string() -> Result { unsafe { + } + #[inline] pub fn get_manufacturer_name_string() -> Result { >::get_activation_factory().get_manufacturer_name_string() - }} - #[inline] pub fn get_model_number_string() -> Result { unsafe { + } + #[inline] pub fn get_model_number_string() -> Result { >::get_activation_factory().get_model_number_string() - }} - #[inline] pub fn get_navigation() -> Result { unsafe { + } + #[inline] pub fn get_navigation() -> Result { >::get_activation_factory().get_navigation() - }} - #[inline] pub fn get_new_alert() -> Result { unsafe { + } + #[inline] pub fn get_new_alert() -> Result { >::get_activation_factory().get_new_alert() - }} - #[inline] pub fn get_gap_peripheral_preferred_connection_parameters() -> Result { unsafe { + } + #[inline] pub fn get_gap_peripheral_preferred_connection_parameters() -> Result { >::get_activation_factory().get_gap_peripheral_preferred_connection_parameters() - }} - #[inline] pub fn get_gap_peripheral_privacy_flag() -> Result { unsafe { + } + #[inline] pub fn get_gap_peripheral_privacy_flag() -> Result { >::get_activation_factory().get_gap_peripheral_privacy_flag() - }} - #[inline] pub fn get_pnp_id() -> Result { unsafe { + } + #[inline] pub fn get_pnp_id() -> Result { >::get_activation_factory().get_pnp_id() - }} - #[inline] pub fn get_position_quality() -> Result { unsafe { + } + #[inline] pub fn get_position_quality() -> Result { >::get_activation_factory().get_position_quality() - }} - #[inline] pub fn get_protocol_mode() -> Result { unsafe { + } + #[inline] pub fn get_protocol_mode() -> Result { >::get_activation_factory().get_protocol_mode() - }} - #[inline] pub fn get_gap_reconnection_address() -> Result { unsafe { + } + #[inline] pub fn get_gap_reconnection_address() -> Result { >::get_activation_factory().get_gap_reconnection_address() - }} - #[inline] pub fn get_reference_time_information() -> Result { unsafe { + } + #[inline] pub fn get_reference_time_information() -> Result { >::get_activation_factory().get_reference_time_information() - }} - #[inline] pub fn get_report() -> Result { unsafe { + } + #[inline] pub fn get_report() -> Result { >::get_activation_factory().get_report() - }} - #[inline] pub fn get_report_map() -> Result { unsafe { + } + #[inline] pub fn get_report_map() -> Result { >::get_activation_factory().get_report_map() - }} - #[inline] pub fn get_ringer_control_point() -> Result { unsafe { + } + #[inline] pub fn get_ringer_control_point() -> Result { >::get_activation_factory().get_ringer_control_point() - }} - #[inline] pub fn get_ringer_setting() -> Result { unsafe { + } + #[inline] pub fn get_ringer_setting() -> Result { >::get_activation_factory().get_ringer_setting() - }} - #[inline] pub fn get_scan_interval_window() -> Result { unsafe { + } + #[inline] pub fn get_scan_interval_window() -> Result { >::get_activation_factory().get_scan_interval_window() - }} - #[inline] pub fn get_scan_refresh() -> Result { unsafe { + } + #[inline] pub fn get_scan_refresh() -> Result { >::get_activation_factory().get_scan_refresh() - }} - #[inline] pub fn get_serial_number_string() -> Result { unsafe { + } + #[inline] pub fn get_serial_number_string() -> Result { >::get_activation_factory().get_serial_number_string() - }} - #[inline] pub fn get_gatt_service_changed() -> Result { unsafe { + } + #[inline] pub fn get_gatt_service_changed() -> Result { >::get_activation_factory().get_gatt_service_changed() - }} - #[inline] pub fn get_software_revision_string() -> Result { unsafe { + } + #[inline] pub fn get_software_revision_string() -> Result { >::get_activation_factory().get_software_revision_string() - }} - #[inline] pub fn get_supported_new_alert_category() -> Result { unsafe { + } + #[inline] pub fn get_supported_new_alert_category() -> Result { >::get_activation_factory().get_supported_new_alert_category() - }} - #[inline] pub fn get_support_unread_alert_category() -> Result { unsafe { + } + #[inline] pub fn get_support_unread_alert_category() -> Result { >::get_activation_factory().get_support_unread_alert_category() - }} - #[inline] pub fn get_system_id() -> Result { unsafe { + } + #[inline] pub fn get_system_id() -> Result { >::get_activation_factory().get_system_id() - }} - #[inline] pub fn get_time_accuracy() -> Result { unsafe { + } + #[inline] pub fn get_time_accuracy() -> Result { >::get_activation_factory().get_time_accuracy() - }} - #[inline] pub fn get_time_source() -> Result { unsafe { + } + #[inline] pub fn get_time_source() -> Result { >::get_activation_factory().get_time_source() - }} - #[inline] pub fn get_time_update_control_point() -> Result { unsafe { + } + #[inline] pub fn get_time_update_control_point() -> Result { >::get_activation_factory().get_time_update_control_point() - }} - #[inline] pub fn get_time_update_state() -> Result { unsafe { + } + #[inline] pub fn get_time_update_state() -> Result { >::get_activation_factory().get_time_update_state() - }} - #[inline] pub fn get_time_with_dst() -> Result { unsafe { + } + #[inline] pub fn get_time_with_dst() -> Result { >::get_activation_factory().get_time_with_dst() - }} - #[inline] pub fn get_time_zone() -> Result { unsafe { + } + #[inline] pub fn get_time_zone() -> Result { >::get_activation_factory().get_time_zone() - }} - #[inline] pub fn get_tx_power_level() -> Result { unsafe { + } + #[inline] pub fn get_tx_power_level() -> Result { >::get_activation_factory().get_tx_power_level() - }} - #[inline] pub fn get_unread_alert_status() -> Result { unsafe { + } + #[inline] pub fn get_unread_alert_status() -> Result { >::get_activation_factory().get_unread_alert_status() - }} + } } DEFINE_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]) [CLSID_GattCharacteristicUuids]); DEFINE_IID!(IID_IGattCharacteristicUuidsStatics, 1492796806, 45534, 18188, 183, 222, 13, 17, 255, 68, 244, 183); @@ -8681,111 +8681,111 @@ RT_INTERFACE!{static interface IGattCharacteristicUuidsStatics(IGattCharacterist fn get_TemperatureType(&self, out: *mut Guid) -> HRESULT }} impl IGattCharacteristicUuidsStatics { - #[inline] pub unsafe fn get_battery_level(&self) -> Result { + #[inline] pub fn get_battery_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BatteryLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_blood_pressure_feature(&self) -> Result { + }} + #[inline] pub fn get_blood_pressure_feature(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BloodPressureFeature)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_blood_pressure_measurement(&self) -> Result { + }} + #[inline] pub fn get_blood_pressure_measurement(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BloodPressureMeasurement)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_body_sensor_location(&self) -> Result { + }} + #[inline] pub fn get_body_sensor_location(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BodySensorLocation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_csc_feature(&self) -> Result { + }} + #[inline] pub fn get_csc_feature(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CscFeature)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_csc_measurement(&self) -> Result { + }} + #[inline] pub fn get_csc_measurement(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CscMeasurement)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_glucose_feature(&self) -> Result { + }} + #[inline] pub fn get_glucose_feature(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_GlucoseFeature)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_glucose_measurement(&self) -> Result { + }} + #[inline] pub fn get_glucose_measurement(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_GlucoseMeasurement)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_glucose_measurement_context(&self) -> Result { + }} + #[inline] pub fn get_glucose_measurement_context(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_GlucoseMeasurementContext)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_heart_rate_control_point(&self) -> Result { + }} + #[inline] pub fn get_heart_rate_control_point(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HeartRateControlPoint)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_heart_rate_measurement(&self) -> Result { + }} + #[inline] pub fn get_heart_rate_measurement(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HeartRateMeasurement)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_intermediate_cuff_pressure(&self) -> Result { + }} + #[inline] pub fn get_intermediate_cuff_pressure(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IntermediateCuffPressure)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_intermediate_temperature(&self) -> Result { + }} + #[inline] pub fn get_intermediate_temperature(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IntermediateTemperature)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_measurement_interval(&self) -> Result { + }} + #[inline] pub fn get_measurement_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MeasurementInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_record_access_control_point(&self) -> Result { + }} + #[inline] pub fn get_record_access_control_point(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RecordAccessControlPoint)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_rsc_feature(&self) -> Result { + }} + #[inline] pub fn get_rsc_feature(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RscFeature)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_rsc_measurement(&self) -> Result { + }} + #[inline] pub fn get_rsc_measurement(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RscMeasurement)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sccontrol_point(&self) -> Result { + }} + #[inline] pub fn get_sccontrol_point(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SCControlPoint)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sensor_location(&self) -> Result { + }} + #[inline] pub fn get_sensor_location(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SensorLocation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_temperature_measurement(&self) -> Result { + }} + #[inline] pub fn get_temperature_measurement(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TemperatureMeasurement)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_temperature_type(&self) -> Result { + }} + #[inline] pub fn get_temperature_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TemperatureType)(self as *const _ as *mut _, &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] { @@ -8851,306 +8851,306 @@ RT_INTERFACE!{static interface IGattCharacteristicUuidsStatics2(IGattCharacteris fn get_UnreadAlertStatus(&self, out: *mut Guid) -> HRESULT }} impl IGattCharacteristicUuidsStatics2 { - #[inline] pub unsafe fn get_alert_category_id(&self) -> Result { + #[inline] pub fn get_alert_category_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AlertCategoryId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_alert_category_id_bit_mask(&self) -> Result { + }} + #[inline] pub fn get_alert_category_id_bit_mask(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AlertCategoryIdBitMask)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_alert_level(&self) -> Result { + }} + #[inline] pub fn get_alert_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AlertLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_alert_notification_control_point(&self) -> Result { + }} + #[inline] pub fn get_alert_notification_control_point(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AlertNotificationControlPoint)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_alert_status(&self) -> Result { + }} + #[inline] pub fn get_alert_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AlertStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_gap_appearance(&self) -> Result { + }} + #[inline] pub fn get_gap_appearance(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_GapAppearance)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_boot_keyboard_input_report(&self) -> Result { + }} + #[inline] pub fn get_boot_keyboard_input_report(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BootKeyboardInputReport)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_boot_keyboard_output_report(&self) -> Result { + }} + #[inline] pub fn get_boot_keyboard_output_report(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BootKeyboardOutputReport)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_boot_mouse_input_report(&self) -> Result { + }} + #[inline] pub fn get_boot_mouse_input_report(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BootMouseInputReport)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_time(&self) -> Result { + }} + #[inline] pub fn get_current_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CurrentTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_cycling_power_control_point(&self) -> Result { + }} + #[inline] pub fn get_cycling_power_control_point(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CyclingPowerControlPoint)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_cycling_power_feature(&self) -> Result { + }} + #[inline] pub fn get_cycling_power_feature(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CyclingPowerFeature)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_cycling_power_measurement(&self) -> Result { + }} + #[inline] pub fn get_cycling_power_measurement(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CyclingPowerMeasurement)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_cycling_power_vector(&self) -> Result { + }} + #[inline] pub fn get_cycling_power_vector(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CyclingPowerVector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_date_time(&self) -> Result { + }} + #[inline] pub fn get_date_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DateTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_day_date_time(&self) -> Result { + }} + #[inline] pub fn get_day_date_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DayDateTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_day_of_week(&self) -> Result { + }} + #[inline] pub fn get_day_of_week(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DayOfWeek)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_gap_device_name(&self) -> Result { + }} + #[inline] pub fn get_gap_device_name(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_GapDeviceName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_dst_offset(&self) -> Result { + }} + #[inline] pub fn get_dst_offset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DstOffset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_exact_time256(&self) -> Result { + }} + #[inline] pub fn get_exact_time256(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExactTime256)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_firmware_revision_string(&self) -> Result { + }} + #[inline] pub fn get_firmware_revision_string(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FirmwareRevisionString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_hardware_revision_string(&self) -> Result { + }} + #[inline] pub fn get_hardware_revision_string(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HardwareRevisionString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_hid_control_point(&self) -> Result { + }} + #[inline] pub fn get_hid_control_point(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HidControlPoint)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_hid_information(&self) -> Result { + }} + #[inline] pub fn get_hid_information(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HidInformation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ieee1107320601_regulatory_certification_data_list(&self) -> Result { + }} + #[inline] pub fn get_ieee1107320601_regulatory_certification_data_list(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Ieee1107320601RegulatoryCertificationDataList)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ln_control_point(&self) -> Result { + }} + #[inline] pub fn get_ln_control_point(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LnControlPoint)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ln_feature(&self) -> Result { + }} + #[inline] pub fn get_ln_feature(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LnFeature)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_local_time_information(&self) -> Result { + }} + #[inline] pub fn get_local_time_information(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LocalTimeInformation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_location_and_speed(&self) -> Result { + }} + #[inline] pub fn get_location_and_speed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LocationAndSpeed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_manufacturer_name_string(&self) -> Result { + }} + #[inline] pub fn get_manufacturer_name_string(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ManufacturerNameString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_model_number_string(&self) -> Result { + }} + #[inline] pub fn get_model_number_string(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ModelNumberString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_navigation(&self) -> Result { + }} + #[inline] pub fn get_navigation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Navigation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_new_alert(&self) -> Result { + }} + #[inline] pub fn get_new_alert(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NewAlert)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_gap_peripheral_preferred_connection_parameters(&self) -> Result { + }} + #[inline] pub fn get_gap_peripheral_preferred_connection_parameters(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_GapPeripheralPreferredConnectionParameters)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_gap_peripheral_privacy_flag(&self) -> Result { + }} + #[inline] pub fn get_gap_peripheral_privacy_flag(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_GapPeripheralPrivacyFlag)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pnp_id(&self) -> Result { + }} + #[inline] pub fn get_pnp_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PnpId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_position_quality(&self) -> Result { + }} + #[inline] pub fn get_position_quality(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PositionQuality)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_protocol_mode(&self) -> Result { + }} + #[inline] pub fn get_protocol_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProtocolMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_gap_reconnection_address(&self) -> Result { + }} + #[inline] pub fn get_gap_reconnection_address(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_GapReconnectionAddress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_reference_time_information(&self) -> Result { + }} + #[inline] pub fn get_reference_time_information(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReferenceTimeInformation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_report(&self) -> Result { + }} + #[inline] pub fn get_report(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Report)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_map(&self) -> Result { + }} + #[inline] pub fn get_report_map(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReportMap)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ringer_control_point(&self) -> Result { + }} + #[inline] pub fn get_ringer_control_point(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RingerControlPoint)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ringer_setting(&self) -> Result { + }} + #[inline] pub fn get_ringer_setting(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RingerSetting)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_scan_interval_window(&self) -> Result { + }} + #[inline] pub fn get_scan_interval_window(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ScanIntervalWindow)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_scan_refresh(&self) -> Result { + }} + #[inline] pub fn get_scan_refresh(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ScanRefresh)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_serial_number_string(&self) -> Result { + }} + #[inline] pub fn get_serial_number_string(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SerialNumberString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_gatt_service_changed(&self) -> Result { + }} + #[inline] pub fn get_gatt_service_changed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_GattServiceChanged)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_software_revision_string(&self) -> Result { + }} + #[inline] pub fn get_software_revision_string(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SoftwareRevisionString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_new_alert_category(&self) -> Result { + }} + #[inline] pub fn get_supported_new_alert_category(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SupportedNewAlertCategory)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_support_unread_alert_category(&self) -> Result { + }} + #[inline] pub fn get_support_unread_alert_category(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SupportUnreadAlertCategory)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_system_id(&self) -> Result { + }} + #[inline] pub fn get_system_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SystemId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_time_accuracy(&self) -> Result { + }} + #[inline] pub fn get_time_accuracy(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TimeAccuracy)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_time_source(&self) -> Result { + }} + #[inline] pub fn get_time_source(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TimeSource)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_time_update_control_point(&self) -> Result { + }} + #[inline] pub fn get_time_update_control_point(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TimeUpdateControlPoint)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_time_update_state(&self) -> Result { + }} + #[inline] pub fn get_time_update_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TimeUpdateState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_time_with_dst(&self) -> Result { + }} + #[inline] pub fn get_time_with_dst(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TimeWithDst)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_time_zone(&self) -> Result { + }} + #[inline] pub fn get_time_zone(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TimeZone)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_tx_power_level(&self) -> Result { + }} + #[inline] pub fn get_tx_power_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TxPowerLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_unread_alert_status(&self) -> Result { + }} + #[inline] pub fn get_unread_alert_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UnreadAlertStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum GattClientCharacteristicConfigurationDescriptorValue: i32 { None (GattClientCharacteristicConfigurationDescriptorValue_None) = 0, Notify (GattClientCharacteristicConfigurationDescriptorValue_Notify) = 1, Indicate (GattClientCharacteristicConfigurationDescriptorValue_Indicate) = 2, @@ -9159,24 +9159,24 @@ DEFINE_IID!(IID_IGattClientNotificationResult, 1349342617, 274, 16794, 142, 59, RT_INTERFACE!{interface IGattClientNotificationResult(IGattClientNotificationResultVtbl): IInspectable(IInspectableVtbl) [IID_IGattClientNotificationResult] { fn get_SubscribedClient(&self, out: *mut *mut GattSubscribedClient) -> HRESULT, fn get_Status(&self, out: *mut GattCommunicationStatus) -> HRESULT, - fn get_ProtocolError(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT + fn get_ProtocolError(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IGattClientNotificationResult { - #[inline] pub unsafe fn get_subscribed_client(&self) -> Result> { + #[inline] pub fn get_subscribed_client(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SubscribedClient)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_protocol_error(&self) -> Result>> { + }} + #[inline] pub fn get_protocol_error(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProtocolError)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class GattClientNotificationResult: IGattClientNotificationResult} DEFINE_IID!(IID_IGattClientNotificationResult2, 2410595479, 17888, 18814, 149, 130, 41, 161, 254, 40, 26, 213); @@ -9184,11 +9184,11 @@ RT_INTERFACE!{interface IGattClientNotificationResult2(IGattClientNotificationRe fn get_BytesSent(&self, out: *mut u16) -> HRESULT }} impl IGattClientNotificationResult2 { - #[inline] pub unsafe fn get_bytes_sent(&self) -> Result { + #[inline] pub fn get_bytes_sent(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BytesSent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum GattCommunicationStatus: i32 { Success (GattCommunicationStatus_Success) = 0, Unreachable (GattCommunicationStatus_Unreachable) = 1, ProtocolError (GattCommunicationStatus_ProtocolError) = 2, AccessDenied (GattCommunicationStatus_AccessDenied) = 3, @@ -9199,87 +9199,87 @@ RT_INTERFACE!{interface IGattDescriptor(IGattDescriptorVtbl): IInspectable(IInsp fn put_ProtectionLevel(&self, value: GattProtectionLevel) -> HRESULT, fn get_Uuid(&self, out: *mut Guid) -> HRESULT, fn get_AttributeHandle(&self, out: *mut u16) -> HRESULT, - fn ReadValueAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn ReadValueWithCacheModeAsync(&self, cacheMode: super::BluetoothCacheMode, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn WriteValueAsync(&self, value: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn ReadValueAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ReadValueWithCacheModeAsync(&self, cacheMode: super::BluetoothCacheMode, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn WriteValueAsync(&self, value: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IGattDescriptor { - #[inline] pub unsafe fn get_protection_level(&self) -> Result { + #[inline] pub fn get_protection_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProtectionLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_protection_level(&self, value: GattProtectionLevel) -> Result<()> { + }} + #[inline] pub fn set_protection_level(&self, value: GattProtectionLevel) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ProtectionLevel)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_uuid(&self) -> Result { + }} + #[inline] pub fn get_uuid(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Uuid)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_attribute_handle(&self) -> Result { + }} + #[inline] pub fn get_attribute_handle(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AttributeHandle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn read_value_async(&self) -> Result>> { + }} + #[inline] pub fn read_value_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadValueAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn read_value_with_cache_mode_async(&self, cacheMode: super::BluetoothCacheMode) -> Result>> { + }} + #[inline] pub fn read_value_with_cache_mode_async(&self, cacheMode: super::BluetoothCacheMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadValueWithCacheModeAsync)(self as *const _ as *mut _, 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(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn write_value_async(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).WriteValueAsync)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class GattDescriptor: IGattDescriptor} impl RtActivatable for GattDescriptor {} impl GattDescriptor { - #[inline] pub fn convert_short_id_to_uuid(shortId: u16) -> Result { unsafe { + #[inline] pub fn convert_short_id_to_uuid(shortId: u16) -> Result { >::get_activation_factory().convert_short_id_to_uuid(shortId) - }} + } } DEFINE_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]) [CLSID_GattDescriptor]); DEFINE_IID!(IID_IGattDescriptor2, 2404793657, 54832, 16492, 186, 17, 16, 205, 209, 107, 14, 94); RT_INTERFACE!{interface IGattDescriptor2(IGattDescriptor2Vtbl): IInspectable(IInspectableVtbl) [IID_IGattDescriptor2] { - #[cfg(feature="windows-storage")] fn WriteValueWithResultAsync(&self, value: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn WriteValueWithResultAsync(&self, value: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IGattDescriptor2 { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn write_value_with_result_async(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn write_value_with_result_async(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).WriteValueWithResultAsync)(self 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_IGattDescriptorsResult, 2613088755, 38375, 17545, 141, 37, 255, 129, 149, 90, 87, 185); RT_INTERFACE!{interface IGattDescriptorsResult(IGattDescriptorsResultVtbl): IInspectable(IInspectableVtbl) [IID_IGattDescriptorsResult] { fn get_Status(&self, out: *mut GattCommunicationStatus) -> HRESULT, - fn get_ProtocolError(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn get_Descriptors(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn get_ProtocolError(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_Descriptors(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IGattDescriptorsResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_protocol_error(&self) -> Result>> { + }} + #[inline] pub fn get_protocol_error(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProtocolError)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_descriptors(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_descriptors(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Descriptors)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class GattDescriptorsResult: IGattDescriptorsResult} DEFINE_IID!(IID_IGattDescriptorStatics, 2449825581, 32900, 17220, 180, 194, 40, 77, 225, 154, 133, 6); @@ -9287,33 +9287,33 @@ RT_INTERFACE!{static interface IGattDescriptorStatics(IGattDescriptorStaticsVtbl fn ConvertShortIdToUuid(&self, shortId: u16, out: *mut Guid) -> HRESULT }} impl IGattDescriptorStatics { - #[inline] pub unsafe fn convert_short_id_to_uuid(&self, shortId: u16) -> Result { + #[inline] pub fn convert_short_id_to_uuid(&self, shortId: u16) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ConvertShortIdToUuid)(self as *const _ as *mut _, shortId, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{static class GattDescriptorUuids} impl RtActivatable for GattDescriptorUuids {} impl GattDescriptorUuids { - #[inline] pub fn get_characteristic_aggregate_format() -> Result { unsafe { + #[inline] pub fn get_characteristic_aggregate_format() -> Result { >::get_activation_factory().get_characteristic_aggregate_format() - }} - #[inline] pub fn get_characteristic_extended_properties() -> Result { unsafe { + } + #[inline] pub fn get_characteristic_extended_properties() -> Result { >::get_activation_factory().get_characteristic_extended_properties() - }} - #[inline] pub fn get_characteristic_presentation_format() -> Result { unsafe { + } + #[inline] pub fn get_characteristic_presentation_format() -> Result { >::get_activation_factory().get_characteristic_presentation_format() - }} - #[inline] pub fn get_characteristic_user_description() -> Result { unsafe { + } + #[inline] pub fn get_characteristic_user_description() -> Result { >::get_activation_factory().get_characteristic_user_description() - }} - #[inline] pub fn get_client_characteristic_configuration() -> Result { unsafe { + } + #[inline] pub fn get_client_characteristic_configuration() -> Result { >::get_activation_factory().get_client_characteristic_configuration() - }} - #[inline] pub fn get_server_characteristic_configuration() -> Result { unsafe { + } + #[inline] pub fn get_server_characteristic_configuration() -> Result { >::get_activation_factory().get_server_characteristic_configuration() - }} + } } DEFINE_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]) [CLSID_GattDescriptorUuids]); DEFINE_IID!(IID_IGattDescriptorUuidsStatics, 2801296078, 40188, 17137, 145, 133, 255, 55, 183, 81, 129, 211); @@ -9326,304 +9326,304 @@ RT_INTERFACE!{static interface IGattDescriptorUuidsStatics(IGattDescriptorUuidsS fn get_ServerCharacteristicConfiguration(&self, out: *mut Guid) -> HRESULT }} impl IGattDescriptorUuidsStatics { - #[inline] pub unsafe fn get_characteristic_aggregate_format(&self) -> Result { + #[inline] pub fn get_characteristic_aggregate_format(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CharacteristicAggregateFormat)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_characteristic_extended_properties(&self) -> Result { + }} + #[inline] pub fn get_characteristic_extended_properties(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CharacteristicExtendedProperties)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_characteristic_presentation_format(&self) -> Result { + }} + #[inline] pub fn get_characteristic_presentation_format(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CharacteristicPresentationFormat)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_characteristic_user_description(&self) -> Result { + }} + #[inline] pub fn get_characteristic_user_description(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CharacteristicUserDescription)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_client_characteristic_configuration(&self) -> Result { + }} + #[inline] pub fn get_client_characteristic_configuration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ClientCharacteristicConfiguration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_server_characteristic_configuration(&self) -> Result { + }} + #[inline] pub fn get_server_characteristic_configuration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ServerCharacteristicConfiguration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, characteristicUuid: Guid, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn GetIncludedServices(&self, serviceUuid: Guid, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn GetCharacteristics(&self, characteristicUuid: Guid, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn GetIncludedServices(&self, serviceUuid: Guid, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_DeviceId(&self, out: *mut HSTRING) -> HRESULT, fn get_Uuid(&self, out: *mut Guid) -> HRESULT, fn get_AttributeHandle(&self, out: *mut u16) -> HRESULT }} impl IGattDeviceService { - #[inline] pub unsafe fn get_characteristics(&self, characteristicUuid: Guid) -> Result>> { + #[inline] pub fn get_characteristics(&self, characteristicUuid: Guid) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCharacteristics)(self as *const _ as *mut _, characteristicUuid, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_included_services(&self, serviceUuid: Guid) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_included_services(&self, serviceUuid: Guid) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetIncludedServices)(self as *const _ as *mut _, serviceUuid, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_uuid(&self) -> Result { + }} + #[inline] pub fn get_uuid(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Uuid)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_attribute_handle(&self) -> Result { + }} + #[inline] pub fn get_attribute_handle(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AttributeHandle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class GattDeviceService: IGattDeviceService} impl RtActivatable for GattDeviceService {} impl RtActivatable for GattDeviceService {} impl GattDeviceService { - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} - #[inline] pub fn get_device_selector_from_uuid(serviceUuid: Guid) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_from_uuid(serviceUuid: Guid) -> Result { >::get_activation_factory().get_device_selector_from_uuid(serviceUuid) - }} - #[inline] pub fn get_device_selector_from_short_id(serviceShortId: u16) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_from_short_id(serviceShortId: u16) -> Result { >::get_activation_factory().get_device_selector_from_short_id(serviceShortId) - }} - #[inline] pub fn convert_short_id_to_uuid(shortId: u16) -> Result { unsafe { + } + #[inline] pub fn convert_short_id_to_uuid(shortId: u16) -> Result { >::get_activation_factory().convert_short_id_to_uuid(shortId) - }} - #[inline] pub fn from_id_with_sharing_mode_async(deviceId: &HStringArg, sharingMode: GattSharingMode) -> Result>> { unsafe { + } + #[inline] pub fn from_id_with_sharing_mode_async(deviceId: &HStringArg, sharingMode: GattSharingMode) -> Result>> { >::get_activation_factory().from_id_with_sharing_mode_async(deviceId, sharingMode) - }} - #[inline] pub fn get_device_selector_for_bluetooth_device_id(bluetoothDeviceId: &super::BluetoothDeviceId) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_for_bluetooth_device_id(bluetoothDeviceId: &super::BluetoothDeviceId) -> Result { >::get_activation_factory().get_device_selector_for_bluetooth_device_id(bluetoothDeviceId) - }} - #[inline] pub fn get_device_selector_for_bluetooth_device_id_with_cache_mode(bluetoothDeviceId: &super::BluetoothDeviceId, cacheMode: super::BluetoothCacheMode) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_for_bluetooth_device_id_with_cache_mode(bluetoothDeviceId: &super::BluetoothDeviceId, cacheMode: super::BluetoothCacheMode) -> Result { >::get_activation_factory().get_device_selector_for_bluetooth_device_id_with_cache_mode(bluetoothDeviceId, cacheMode) - }} - #[inline] pub fn get_device_selector_for_bluetooth_device_id_and_uuid(bluetoothDeviceId: &super::BluetoothDeviceId, serviceUuid: Guid) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_for_bluetooth_device_id_and_uuid(bluetoothDeviceId: &super::BluetoothDeviceId, serviceUuid: Guid) -> Result { >::get_activation_factory().get_device_selector_for_bluetooth_device_id_and_uuid(bluetoothDeviceId, serviceUuid) - }} - #[inline] pub fn get_device_selector_for_bluetooth_device_id_and_uuid_with_cache_mode(bluetoothDeviceId: &super::BluetoothDeviceId, serviceUuid: Guid, cacheMode: super::BluetoothCacheMode) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_for_bluetooth_device_id_and_uuid_with_cache_mode(bluetoothDeviceId: &super::BluetoothDeviceId, serviceUuid: Guid, cacheMode: super::BluetoothCacheMode) -> Result { >::get_activation_factory().get_device_selector_for_bluetooth_device_id_and_uuid_with_cache_mode(bluetoothDeviceId, serviceUuid, cacheMode) - }} + } } DEFINE_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]) [CLSID_GattDeviceService]); 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(&self, out: *mut *mut super::BluetoothLEDevice) -> HRESULT, - fn get_ParentServices(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn GetAllCharacteristics(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn GetAllIncludedServices(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn get_ParentServices(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn GetAllCharacteristics(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn GetAllIncludedServices(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IGattDeviceService2 { - #[inline] pub unsafe fn get_device(&self) -> Result> { + #[inline] pub fn get_device(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Device)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_parent_services(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_parent_services(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ParentServices)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_all_characteristics(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_all_characteristics(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAllCharacteristics)(self 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(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_all_included_services(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAllIncludedServices)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IGattDeviceService3, 2996021584, 3155, 17276, 169, 179, 92, 50, 16, 198, 229, 105); RT_INTERFACE!{interface IGattDeviceService3(IGattDeviceService3Vtbl): IInspectable(IInspectableVtbl) [IID_IGattDeviceService3] { fn get_DeviceAccessInformation(&self, out: *mut *mut super::super::enumeration::DeviceAccessInformation) -> HRESULT, fn get_Session(&self, out: *mut *mut GattSession) -> HRESULT, fn get_SharingMode(&self, out: *mut GattSharingMode) -> HRESULT, - fn RequestAccessAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn OpenAsync(&self, sharingMode: GattSharingMode, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn GetCharacteristicsAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn GetCharacteristicsWithCacheModeAsync(&self, cacheMode: super::BluetoothCacheMode, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn GetCharacteristicsForUuidAsync(&self, characteristicUuid: Guid, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn GetCharacteristicsForUuidWithCacheModeAsync(&self, characteristicUuid: Guid, cacheMode: super::BluetoothCacheMode, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn GetIncludedServicesAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn GetIncludedServicesWithCacheModeAsync(&self, cacheMode: super::BluetoothCacheMode, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn GetIncludedServicesForUuidAsync(&self, serviceUuid: Guid, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn GetIncludedServicesForUuidWithCacheModeAsync(&self, serviceUuid: Guid, cacheMode: super::BluetoothCacheMode, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn RequestAccessAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn OpenAsync(&self, sharingMode: GattSharingMode, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetCharacteristicsAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetCharacteristicsWithCacheModeAsync(&self, cacheMode: super::BluetoothCacheMode, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetCharacteristicsForUuidAsync(&self, characteristicUuid: Guid, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetCharacteristicsForUuidWithCacheModeAsync(&self, characteristicUuid: Guid, cacheMode: super::BluetoothCacheMode, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetIncludedServicesAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetIncludedServicesWithCacheModeAsync(&self, cacheMode: super::BluetoothCacheMode, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetIncludedServicesForUuidAsync(&self, serviceUuid: Guid, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetIncludedServicesForUuidWithCacheModeAsync(&self, serviceUuid: Guid, cacheMode: super::BluetoothCacheMode, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IGattDeviceService3 { - #[inline] pub unsafe fn get_device_access_information(&self) -> Result> { + #[inline] pub fn get_device_access_information(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceAccessInformation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_session(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_session(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Session)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sharing_mode(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_sharing_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SharingMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn request_access_async(&self) -> Result>> { + }} + #[inline] pub fn request_access_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn open_async(&self, sharingMode: GattSharingMode) -> Result>> { + }} + #[inline] pub fn open_async(&self, sharingMode: GattSharingMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenAsync)(self as *const _ as *mut _, sharingMode, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_characteristics_async(&self) -> Result>> { + }} + #[inline] pub fn get_characteristics_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCharacteristicsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_characteristics_with_cache_mode_async(&self, cacheMode: super::BluetoothCacheMode) -> Result>> { + }} + #[inline] pub fn get_characteristics_with_cache_mode_async(&self, cacheMode: super::BluetoothCacheMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCharacteristicsWithCacheModeAsync)(self as *const _ as *mut _, cacheMode, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_characteristics_for_uuid_async(&self, characteristicUuid: Guid) -> Result>> { + }} + #[inline] pub fn get_characteristics_for_uuid_async(&self, characteristicUuid: Guid) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCharacteristicsForUuidAsync)(self as *const _ as *mut _, characteristicUuid, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_characteristics_for_uuid_with_cache_mode_async(&self, characteristicUuid: Guid, cacheMode: super::BluetoothCacheMode) -> Result>> { + }} + #[inline] pub fn get_characteristics_for_uuid_with_cache_mode_async(&self, characteristicUuid: Guid, cacheMode: super::BluetoothCacheMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCharacteristicsForUuidWithCacheModeAsync)(self as *const _ as *mut _, characteristicUuid, cacheMode, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_included_services_async(&self) -> Result>> { + }} + #[inline] pub fn get_included_services_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetIncludedServicesAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_included_services_with_cache_mode_async(&self, cacheMode: super::BluetoothCacheMode) -> Result>> { + }} + #[inline] pub fn get_included_services_with_cache_mode_async(&self, cacheMode: super::BluetoothCacheMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetIncludedServicesWithCacheModeAsync)(self as *const _ as *mut _, cacheMode, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_included_services_for_uuid_async(&self, serviceUuid: Guid) -> Result>> { + }} + #[inline] pub fn get_included_services_for_uuid_async(&self, serviceUuid: Guid) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetIncludedServicesForUuidAsync)(self as *const _ as *mut _, serviceUuid, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_included_services_for_uuid_with_cache_mode_async(&self, serviceUuid: Guid, cacheMode: super::BluetoothCacheMode) -> Result>> { + }} + #[inline] pub fn get_included_services_for_uuid_with_cache_mode_async(&self, serviceUuid: Guid, cacheMode: super::BluetoothCacheMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetIncludedServicesForUuidWithCacheModeAsync)(self as *const _ as *mut _, serviceUuid, cacheMode, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IGattDeviceServicesResult, 387830766, 365, 16797, 131, 138, 87, 108, 244, 117, 163, 216); RT_INTERFACE!{interface IGattDeviceServicesResult(IGattDeviceServicesResultVtbl): IInspectable(IInspectableVtbl) [IID_IGattDeviceServicesResult] { fn get_Status(&self, out: *mut GattCommunicationStatus) -> HRESULT, - fn get_ProtocolError(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn get_Services(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn get_ProtocolError(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_Services(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IGattDeviceServicesResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_protocol_error(&self) -> Result>> { + }} + #[inline] pub fn get_protocol_error(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProtocolError)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_services(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_services(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Services)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class GattDeviceServicesResult: IGattDeviceServicesResult} 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(&self, deviceId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetDeviceSelectorFromUuid(&self, serviceUuid: Guid, out: *mut HSTRING) -> HRESULT, fn GetDeviceSelectorFromShortId(&self, serviceShortId: u16, out: *mut HSTRING) -> HRESULT, fn ConvertShortIdToUuid(&self, shortId: u16, out: *mut Guid) -> HRESULT }} impl IGattDeviceServiceStatics { - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector_from_uuid(&self, serviceUuid: Guid) -> Result { + }} + #[inline] pub fn get_device_selector_from_uuid(&self, serviceUuid: Guid) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorFromUuid)(self as *const _ as *mut _, serviceUuid, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector_from_short_id(&self, serviceShortId: u16) -> Result { + }} + #[inline] pub fn get_device_selector_from_short_id(&self, serviceShortId: u16) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorFromShortId)(self as *const _ as *mut _, serviceShortId, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn convert_short_id_to_uuid(&self, shortId: u16) -> Result { + }} + #[inline] pub fn convert_short_id_to_uuid(&self, shortId: u16) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ConvertShortIdToUuid)(self as *const _ as *mut _, shortId, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IGattDeviceServiceStatics2, 100931694, 9382, 19213, 162, 242, 48, 204, 1, 84, 93, 37); RT_INTERFACE!{static interface IGattDeviceServiceStatics2(IGattDeviceServiceStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IGattDeviceServiceStatics2] { - fn FromIdWithSharingModeAsync(&self, deviceId: HSTRING, sharingMode: GattSharingMode, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn FromIdWithSharingModeAsync(&self, deviceId: HSTRING, sharingMode: GattSharingMode, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetDeviceSelectorForBluetoothDeviceId(&self, bluetoothDeviceId: *mut super::BluetoothDeviceId, out: *mut HSTRING) -> HRESULT, fn GetDeviceSelectorForBluetoothDeviceIdWithCacheMode(&self, bluetoothDeviceId: *mut super::BluetoothDeviceId, cacheMode: super::BluetoothCacheMode, out: *mut HSTRING) -> HRESULT, fn GetDeviceSelectorForBluetoothDeviceIdAndUuid(&self, bluetoothDeviceId: *mut super::BluetoothDeviceId, serviceUuid: Guid, out: *mut HSTRING) -> HRESULT, fn GetDeviceSelectorForBluetoothDeviceIdAndUuidWithCacheMode(&self, bluetoothDeviceId: *mut super::BluetoothDeviceId, serviceUuid: Guid, cacheMode: super::BluetoothCacheMode, out: *mut HSTRING) -> HRESULT }} impl IGattDeviceServiceStatics2 { - #[inline] pub unsafe fn from_id_with_sharing_mode_async(&self, deviceId: &HStringArg, sharingMode: GattSharingMode) -> Result>> { + #[inline] pub fn from_id_with_sharing_mode_async(&self, deviceId: &HStringArg, sharingMode: GattSharingMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdWithSharingModeAsync)(self as *const _ as *mut _, deviceId.get(), sharingMode, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector_for_bluetooth_device_id(&self, bluetoothDeviceId: &super::BluetoothDeviceId) -> Result { + }} + #[inline] pub fn get_device_selector_for_bluetooth_device_id(&self, bluetoothDeviceId: &super::BluetoothDeviceId) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorForBluetoothDeviceId)(self as *const _ as *mut _, bluetoothDeviceId 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_id_with_cache_mode(&self, bluetoothDeviceId: &super::BluetoothDeviceId, cacheMode: super::BluetoothCacheMode) -> Result { + }} + #[inline] pub fn get_device_selector_for_bluetooth_device_id_with_cache_mode(&self, bluetoothDeviceId: &super::BluetoothDeviceId, cacheMode: super::BluetoothCacheMode) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorForBluetoothDeviceIdWithCacheMode)(self as *const _ as *mut _, bluetoothDeviceId 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_id_and_uuid(&self, bluetoothDeviceId: &super::BluetoothDeviceId, serviceUuid: Guid) -> Result { + }} + #[inline] pub fn get_device_selector_for_bluetooth_device_id_and_uuid(&self, bluetoothDeviceId: &super::BluetoothDeviceId, serviceUuid: Guid) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorForBluetoothDeviceIdAndUuid)(self as *const _ as *mut _, bluetoothDeviceId as *const _ as *mut _, serviceUuid, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector_for_bluetooth_device_id_and_uuid_with_cache_mode(&self, bluetoothDeviceId: &super::BluetoothDeviceId, serviceUuid: Guid, cacheMode: super::BluetoothCacheMode) -> Result { + }} + #[inline] pub fn get_device_selector_for_bluetooth_device_id_and_uuid_with_cache_mode(&self, bluetoothDeviceId: &super::BluetoothDeviceId, serviceUuid: Guid, cacheMode: super::BluetoothCacheMode) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorForBluetoothDeviceIdAndUuidWithCacheMode)(self as *const _ as *mut _, bluetoothDeviceId as *const _ as *mut _, serviceUuid, cacheMode, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IGattLocalCharacteristic, 2933798765, 21522, 19828, 146, 168, 141, 235, 133, 38, 130, 156); RT_INTERFACE!{interface IGattLocalCharacteristic(IGattLocalCharacteristicVtbl): IInspectable(IInspectableVtbl) [IID_IGattLocalCharacteristic] { @@ -9632,108 +9632,108 @@ RT_INTERFACE!{interface IGattLocalCharacteristic(IGattLocalCharacteristicVtbl): fn get_CharacteristicProperties(&self, out: *mut GattCharacteristicProperties) -> HRESULT, fn get_ReadProtectionLevel(&self, out: *mut GattProtectionLevel) -> HRESULT, fn get_WriteProtectionLevel(&self, out: *mut GattProtectionLevel) -> HRESULT, - fn CreateDescriptorAsync(&self, descriptorUuid: Guid, parameters: *mut GattLocalDescriptorParameters, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn get_Descriptors(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn CreateDescriptorAsync(&self, descriptorUuid: Guid, parameters: *mut GattLocalDescriptorParameters, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn get_Descriptors(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_UserDescription(&self, out: *mut HSTRING) -> HRESULT, - fn get_PresentationFormats(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn get_SubscribedClients(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn add_SubscribedClientsChanged(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SubscribedClientsChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_ReadRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReadRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_WriteRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_WriteRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - #[cfg(feature="windows-storage")] fn NotifyValueAsync(&self, value: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, - #[cfg(feature="windows-storage")] fn NotifyValueForSubscribedClientAsync(&self, value: *mut ::rt::gen::windows::storage::streams::IBuffer, subscribedClient: *mut GattSubscribedClient, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn get_PresentationFormats(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_SubscribedClients(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn add_SubscribedClientsChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SubscribedClientsChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ReadRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReadRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_WriteRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_WriteRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + #[cfg(feature="windows-storage")] fn NotifyValueAsync(&self, value: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + #[cfg(feature="windows-storage")] fn NotifyValueForSubscribedClientAsync(&self, value: *mut ::rt::gen::windows::storage::streams::IBuffer, subscribedClient: *mut GattSubscribedClient, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IGattLocalCharacteristic { - #[inline] pub unsafe fn get_uuid(&self) -> Result { + #[inline] pub fn get_uuid(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Uuid)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_static_value(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_static_value(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StaticValue)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_characteristic_properties(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_characteristic_properties(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CharacteristicProperties)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_read_protection_level(&self) -> Result { + }} + #[inline] pub fn get_read_protection_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReadProtectionLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_write_protection_level(&self) -> Result { + }} + #[inline] pub fn get_write_protection_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_WriteProtectionLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn create_descriptor_async(&self, descriptorUuid: Guid, parameters: &GattLocalDescriptorParameters) -> Result>> { + }} + #[inline] pub fn create_descriptor_async(&self, descriptorUuid: Guid, parameters: &GattLocalDescriptorParameters) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDescriptorAsync)(self as *const _ as *mut _, descriptorUuid, parameters as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_descriptors(&self) -> Result>> { + }} + #[inline] pub fn get_descriptors(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Descriptors)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_user_description(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_user_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UserDescription)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_presentation_formats(&self) -> Result>> { + }} + #[inline] pub fn get_presentation_formats(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PresentationFormats)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_subscribed_clients(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_subscribed_clients(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SubscribedClients)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_subscribed_clients_changed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_subscribed_clients_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SubscribedClientsChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_subscribed_clients_changed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_subscribed_clients_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SubscribedClientsChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_read_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_read_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ReadRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_read_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_read_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ReadRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_write_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_write_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_WriteRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_write_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_write_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_WriteRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn notify_value_async(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result>>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn notify_value_async(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).NotifyValueAsync)(self as *const _ as *mut _, 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 notify_value_for_subscribed_client_async(&self, value: &::rt::gen::windows::storage::streams::IBuffer, subscribedClient: &GattSubscribedClient) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn notify_value_for_subscribed_client_async(&self, value: &::rt::gen::windows::storage::streams::IBuffer, subscribedClient: &GattSubscribedClient) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).NotifyValueForSubscribedClientAsync)(self as *const _ as *mut _, value as *const _ as *mut _, subscribedClient as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class GattLocalCharacteristic: IGattLocalCharacteristic} DEFINE_IID!(IID_IGattLocalCharacteristicParameters, 4210507188, 19711, 17607, 132, 69, 4, 14, 110, 173, 0, 99); @@ -9750,59 +9750,59 @@ RT_INTERFACE!{interface IGattLocalCharacteristicParameters(IGattLocalCharacteris fn get_WriteProtectionLevel(&self, out: *mut GattProtectionLevel) -> HRESULT, fn put_UserDescription(&self, value: HSTRING) -> HRESULT, fn get_UserDescription(&self, out: *mut HSTRING) -> HRESULT, - fn get_PresentationFormats(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT + fn get_PresentationFormats(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IGattLocalCharacteristicParameters { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn set_static_value(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { + #[cfg(feature="windows-storage")] #[inline] pub fn set_static_value(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StaticValue)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_static_value(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_static_value(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StaticValue)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_characteristic_properties(&self, value: GattCharacteristicProperties) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_characteristic_properties(&self, value: GattCharacteristicProperties) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CharacteristicProperties)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_characteristic_properties(&self) -> Result { + }} + #[inline] pub fn get_characteristic_properties(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CharacteristicProperties)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_read_protection_level(&self, value: GattProtectionLevel) -> Result<()> { + }} + #[inline] pub fn set_read_protection_level(&self, value: GattProtectionLevel) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReadProtectionLevel)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_read_protection_level(&self) -> Result { + }} + #[inline] pub fn get_read_protection_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReadProtectionLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_write_protection_level(&self, value: GattProtectionLevel) -> Result<()> { + }} + #[inline] pub fn set_write_protection_level(&self, value: GattProtectionLevel) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_WriteProtectionLevel)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_write_protection_level(&self) -> Result { + }} + #[inline] pub fn get_write_protection_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_WriteProtectionLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_user_description(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_user_description(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_UserDescription)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_user_description(&self) -> Result { + }} + #[inline] pub fn get_user_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UserDescription)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_presentation_formats(&self) -> Result>> { + }} + #[inline] pub fn get_presentation_formats(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PresentationFormats)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class GattLocalCharacteristicParameters: IGattLocalCharacteristicParameters} impl RtActivatable for GattLocalCharacteristicParameters {} @@ -9813,16 +9813,16 @@ RT_INTERFACE!{interface IGattLocalCharacteristicResult(IGattLocalCharacteristicR fn get_Error(&self, out: *mut super::BluetoothError) -> HRESULT }} impl IGattLocalCharacteristicResult { - #[inline] pub unsafe fn get_characteristic(&self) -> Result> { + #[inline] pub fn get_characteristic(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Characteristic)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_error(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Error)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class GattLocalCharacteristicResult: IGattLocalCharacteristicResult} DEFINE_IID!(IID_IGattLocalDescriptor, 4102995462, 30877, 19019, 134, 82, 189, 1, 123, 93, 47, 198); @@ -9832,50 +9832,50 @@ RT_INTERFACE!{interface IGattLocalDescriptor(IGattLocalDescriptorVtbl): IInspect #[cfg(feature="windows-storage")] fn get_StaticValue(&self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, fn get_ReadProtectionLevel(&self, out: *mut GattProtectionLevel) -> HRESULT, fn get_WriteProtectionLevel(&self, out: *mut GattProtectionLevel) -> HRESULT, - fn add_ReadRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReadRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_WriteRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_WriteRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn add_ReadRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReadRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_WriteRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_WriteRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IGattLocalDescriptor { - #[inline] pub unsafe fn get_uuid(&self) -> Result { + #[inline] pub fn get_uuid(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Uuid)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_static_value(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_static_value(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StaticValue)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_read_protection_level(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_read_protection_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReadProtectionLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_write_protection_level(&self) -> Result { + }} + #[inline] pub fn get_write_protection_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_WriteProtectionLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_read_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_read_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ReadRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_read_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_read_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ReadRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_write_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_write_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_WriteRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_write_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_write_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_WriteRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class GattLocalDescriptor: IGattLocalDescriptor} DEFINE_IID!(IID_IGattLocalDescriptorParameters, 1608441450, 62401, 19302, 140, 75, 227, 210, 41, 59, 64, 233); @@ -9890,33 +9890,33 @@ RT_INTERFACE!{interface IGattLocalDescriptorParameters(IGattLocalDescriptorParam fn get_WriteProtectionLevel(&self, out: *mut GattProtectionLevel) -> HRESULT }} impl IGattLocalDescriptorParameters { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn set_static_value(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { + #[cfg(feature="windows-storage")] #[inline] pub fn set_static_value(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StaticValue)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_static_value(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_static_value(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StaticValue)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_read_protection_level(&self, value: GattProtectionLevel) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_read_protection_level(&self, value: GattProtectionLevel) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReadProtectionLevel)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_read_protection_level(&self) -> Result { + }} + #[inline] pub fn get_read_protection_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReadProtectionLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_write_protection_level(&self, value: GattProtectionLevel) -> Result<()> { + }} + #[inline] pub fn set_write_protection_level(&self, value: GattProtectionLevel) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_WriteProtectionLevel)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_write_protection_level(&self) -> Result { + }} + #[inline] pub fn get_write_protection_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_WriteProtectionLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class GattLocalDescriptorParameters: IGattLocalDescriptorParameters} impl RtActivatable for GattLocalDescriptorParameters {} @@ -9927,40 +9927,40 @@ RT_INTERFACE!{interface IGattLocalDescriptorResult(IGattLocalDescriptorResultVtb fn get_Error(&self, out: *mut super::BluetoothError) -> HRESULT }} impl IGattLocalDescriptorResult { - #[inline] pub unsafe fn get_descriptor(&self) -> Result> { + #[inline] pub fn get_descriptor(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Descriptor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_error(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Error)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class GattLocalDescriptorResult: IGattLocalDescriptorResult} DEFINE_IID!(IID_IGattLocalService, 4111721048, 63479, 18690, 184, 3, 87, 252, 199, 214, 254, 131); RT_INTERFACE!{interface IGattLocalService(IGattLocalServiceVtbl): IInspectable(IInspectableVtbl) [IID_IGattLocalService] { fn get_Uuid(&self, out: *mut Guid) -> HRESULT, - fn CreateCharacteristicAsync(&self, characteristicUuid: Guid, parameters: *mut GattLocalCharacteristicParameters, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn get_Characteristics(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn CreateCharacteristicAsync(&self, characteristicUuid: Guid, parameters: *mut GattLocalCharacteristicParameters, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn get_Characteristics(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IGattLocalService { - #[inline] pub unsafe fn get_uuid(&self) -> Result { + #[inline] pub fn get_uuid(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Uuid)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn create_characteristic_async(&self, characteristicUuid: Guid, parameters: &GattLocalCharacteristicParameters) -> Result>> { + }} + #[inline] pub fn create_characteristic_async(&self, characteristicUuid: Guid, parameters: &GattLocalCharacteristicParameters) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateCharacteristicAsync)(self as *const _ as *mut _, characteristicUuid, parameters as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_characteristics(&self) -> Result>> { + }} + #[inline] pub fn get_characteristics(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Characteristics)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class GattLocalService: IGattLocalService} RT_ENUM! { enum GattOpenStatus: i32 { @@ -9975,42 +9975,42 @@ RT_INTERFACE!{interface IGattPresentationFormat(IGattPresentationFormatVtbl): II fn get_Description(&self, out: *mut u16) -> HRESULT }} impl IGattPresentationFormat { - #[inline] pub unsafe fn get_format_type(&self) -> Result { + #[inline] pub fn get_format_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FormatType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_exponent(&self) -> Result { + }} + #[inline] pub fn get_exponent(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Exponent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_unit(&self) -> Result { + }} + #[inline] pub fn get_unit(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Unit)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_namespace(&self) -> Result { + }} + #[inline] pub fn get_namespace(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Namespace)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_description(&self) -> Result { + }} + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class GattPresentationFormat: IGattPresentationFormat} impl RtActivatable for GattPresentationFormat {} impl RtActivatable for GattPresentationFormat {} impl GattPresentationFormat { - #[inline] pub fn get_bluetooth_sig_assigned_numbers() -> Result { unsafe { + #[inline] pub fn get_bluetooth_sig_assigned_numbers() -> Result { >::get_activation_factory().get_bluetooth_sig_assigned_numbers() - }} - #[inline] pub fn from_parts(formatType: u8, exponent: i32, unit: u16, namespaceId: u8, description: u16) -> Result> { unsafe { + } + #[inline] pub fn from_parts(formatType: u8, exponent: i32, unit: u16, namespaceId: u8, description: u16) -> Result>> { >::get_activation_factory().from_parts(formatType, exponent, unit, namespaceId, description) - }} + } } DEFINE_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]) [CLSID_GattPresentationFormat]); DEFINE_IID!(IID_IGattPresentationFormatStatics, 426573856, 64173, 17884, 174, 91, 42, 195, 24, 78, 132, 219); @@ -10018,107 +10018,107 @@ RT_INTERFACE!{static interface IGattPresentationFormatStatics(IGattPresentationF fn get_BluetoothSigAssignedNumbers(&self, out: *mut u8) -> HRESULT }} impl IGattPresentationFormatStatics { - #[inline] pub unsafe fn get_bluetooth_sig_assigned_numbers(&self) -> Result { + #[inline] pub fn get_bluetooth_sig_assigned_numbers(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BluetoothSigAssignedNumbers)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IGattPresentationFormatStatics2, 2848069395, 47151, 17246, 182, 52, 33, 253, 133, 164, 60, 7); RT_INTERFACE!{static interface IGattPresentationFormatStatics2(IGattPresentationFormatStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IGattPresentationFormatStatics2] { fn FromParts(&self, formatType: u8, exponent: i32, unit: u16, namespaceId: u8, description: u16, out: *mut *mut GattPresentationFormat) -> HRESULT }} impl IGattPresentationFormatStatics2 { - #[inline] pub unsafe fn from_parts(&self, formatType: u8, exponent: i32, unit: u16, namespaceId: u8, description: u16) -> Result> { + #[inline] pub fn from_parts(&self, formatType: u8, exponent: i32, unit: u16, namespaceId: u8, description: u16) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromParts)(self as *const _ as *mut _, formatType, exponent, unit, namespaceId, description, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{static class GattPresentationFormatTypes} impl RtActivatable for GattPresentationFormatTypes {} impl GattPresentationFormatTypes { - #[inline] pub fn get_boolean() -> Result { unsafe { + #[inline] pub fn get_boolean() -> Result { >::get_activation_factory().get_boolean() - }} - #[inline] pub fn get_bit2() -> Result { unsafe { + } + #[inline] pub fn get_bit2() -> Result { >::get_activation_factory().get_bit2() - }} - #[inline] pub fn get_nibble() -> Result { unsafe { + } + #[inline] pub fn get_nibble() -> Result { >::get_activation_factory().get_nibble() - }} - #[inline] pub fn get_uint8() -> Result { unsafe { + } + #[inline] pub fn get_uint8() -> Result { >::get_activation_factory().get_uint8() - }} - #[inline] pub fn get_uint12() -> Result { unsafe { + } + #[inline] pub fn get_uint12() -> Result { >::get_activation_factory().get_uint12() - }} - #[inline] pub fn get_uint16() -> Result { unsafe { + } + #[inline] pub fn get_uint16() -> Result { >::get_activation_factory().get_uint16() - }} - #[inline] pub fn get_uint24() -> Result { unsafe { + } + #[inline] pub fn get_uint24() -> Result { >::get_activation_factory().get_uint24() - }} - #[inline] pub fn get_uint32() -> Result { unsafe { + } + #[inline] pub fn get_uint32() -> Result { >::get_activation_factory().get_uint32() - }} - #[inline] pub fn get_uint48() -> Result { unsafe { + } + #[inline] pub fn get_uint48() -> Result { >::get_activation_factory().get_uint48() - }} - #[inline] pub fn get_uint64() -> Result { unsafe { + } + #[inline] pub fn get_uint64() -> Result { >::get_activation_factory().get_uint64() - }} - #[inline] pub fn get_uint128() -> Result { unsafe { + } + #[inline] pub fn get_uint128() -> Result { >::get_activation_factory().get_uint128() - }} - #[inline] pub fn get_sint8() -> Result { unsafe { + } + #[inline] pub fn get_sint8() -> Result { >::get_activation_factory().get_sint8() - }} - #[inline] pub fn get_sint12() -> Result { unsafe { + } + #[inline] pub fn get_sint12() -> Result { >::get_activation_factory().get_sint12() - }} - #[inline] pub fn get_sint16() -> Result { unsafe { + } + #[inline] pub fn get_sint16() -> Result { >::get_activation_factory().get_sint16() - }} - #[inline] pub fn get_sint24() -> Result { unsafe { + } + #[inline] pub fn get_sint24() -> Result { >::get_activation_factory().get_sint24() - }} - #[inline] pub fn get_sint32() -> Result { unsafe { + } + #[inline] pub fn get_sint32() -> Result { >::get_activation_factory().get_sint32() - }} - #[inline] pub fn get_sint48() -> Result { unsafe { + } + #[inline] pub fn get_sint48() -> Result { >::get_activation_factory().get_sint48() - }} - #[inline] pub fn get_sint64() -> Result { unsafe { + } + #[inline] pub fn get_sint64() -> Result { >::get_activation_factory().get_sint64() - }} - #[inline] pub fn get_sint128() -> Result { unsafe { + } + #[inline] pub fn get_sint128() -> Result { >::get_activation_factory().get_sint128() - }} - #[inline] pub fn get_float32() -> Result { unsafe { + } + #[inline] pub fn get_float32() -> Result { >::get_activation_factory().get_float32() - }} - #[inline] pub fn get_float64() -> Result { unsafe { + } + #[inline] pub fn get_float64() -> Result { >::get_activation_factory().get_float64() - }} - #[inline] pub fn get_sfloat() -> Result { unsafe { + } + #[inline] pub fn get_sfloat() -> Result { >::get_activation_factory().get_sfloat() - }} - #[inline] pub fn get_float() -> Result { unsafe { + } + #[inline] pub fn get_float() -> Result { >::get_activation_factory().get_float() - }} - #[inline] pub fn get_duint16() -> Result { unsafe { + } + #[inline] pub fn get_duint16() -> Result { >::get_activation_factory().get_duint16() - }} - #[inline] pub fn get_utf8() -> Result { unsafe { + } + #[inline] pub fn get_utf8() -> Result { >::get_activation_factory().get_utf8() - }} - #[inline] pub fn get_utf16() -> Result { unsafe { + } + #[inline] pub fn get_utf16() -> Result { >::get_activation_factory().get_utf16() - }} - #[inline] pub fn get_struct() -> Result { unsafe { + } + #[inline] pub fn get_struct() -> Result { >::get_activation_factory().get_struct() - }} + } } DEFINE_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]) [CLSID_GattPresentationFormatTypes]); DEFINE_IID!(IID_IGattPresentationFormatTypesStatics, 4210145802, 12474, 16540, 190, 247, 207, 251, 109, 3, 184, 251); @@ -10152,141 +10152,141 @@ RT_INTERFACE!{static interface IGattPresentationFormatTypesStatics(IGattPresenta fn get_Struct(&self, out: *mut u8) -> HRESULT }} impl IGattPresentationFormatTypesStatics { - #[inline] pub unsafe fn get_boolean(&self) -> Result { + #[inline] pub fn get_boolean(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Boolean)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_bit2(&self) -> Result { + }} + #[inline] pub fn get_bit2(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Bit2)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_nibble(&self) -> Result { + }} + #[inline] pub fn get_nibble(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Nibble)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_uint8(&self) -> Result { + }} + #[inline] pub fn get_uint8(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UInt8)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_uint12(&self) -> Result { + }} + #[inline] pub fn get_uint12(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UInt12)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_uint16(&self) -> Result { + }} + #[inline] pub fn get_uint16(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UInt16)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_uint24(&self) -> Result { + }} + #[inline] pub fn get_uint24(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UInt24)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_uint32(&self) -> Result { + }} + #[inline] pub fn get_uint32(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UInt32)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_uint48(&self) -> Result { + }} + #[inline] pub fn get_uint48(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UInt48)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_uint64(&self) -> Result { + }} + #[inline] pub fn get_uint64(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UInt64)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_uint128(&self) -> Result { + }} + #[inline] pub fn get_uint128(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UInt128)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sint8(&self) -> Result { + }} + #[inline] pub fn get_sint8(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SInt8)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sint12(&self) -> Result { + }} + #[inline] pub fn get_sint12(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SInt12)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sint16(&self) -> Result { + }} + #[inline] pub fn get_sint16(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SInt16)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sint24(&self) -> Result { + }} + #[inline] pub fn get_sint24(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SInt24)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sint32(&self) -> Result { + }} + #[inline] pub fn get_sint32(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SInt32)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sint48(&self) -> Result { + }} + #[inline] pub fn get_sint48(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SInt48)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sint64(&self) -> Result { + }} + #[inline] pub fn get_sint64(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SInt64)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sint128(&self) -> Result { + }} + #[inline] pub fn get_sint128(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SInt128)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_float32(&self) -> Result { + }} + #[inline] pub fn get_float32(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Float32)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_float64(&self) -> Result { + }} + #[inline] pub fn get_float64(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Float64)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sfloat(&self) -> Result { + }} + #[inline] pub fn get_sfloat(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SFloat)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_float(&self) -> Result { + }} + #[inline] pub fn get_float(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Float)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_duint16(&self) -> Result { + }} + #[inline] pub fn get_duint16(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DUInt16)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_utf8(&self) -> Result { + }} + #[inline] pub fn get_utf8(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Utf8)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_utf16(&self) -> Result { + }} + #[inline] pub fn get_utf16(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Utf16)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_struct(&self) -> Result { + }} + #[inline] pub fn get_struct(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Struct)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum GattProtectionLevel: i32 { Plain (GattProtectionLevel_Plain) = 0, AuthenticationRequired (GattProtectionLevel_AuthenticationRequired) = 1, EncryptionRequired (GattProtectionLevel_EncryptionRequired) = 2, EncryptionAndAuthenticationRequired (GattProtectionLevel_EncryptionAndAuthenticationRequired) = 3, @@ -10294,57 +10294,57 @@ RT_ENUM! { enum GattProtectionLevel: i32 { RT_CLASS!{static class GattProtocolError} impl RtActivatable for GattProtocolError {} impl GattProtocolError { - #[inline] pub fn get_invalid_handle() -> Result { unsafe { + #[inline] pub fn get_invalid_handle() -> Result { >::get_activation_factory().get_invalid_handle() - }} - #[inline] pub fn get_read_not_permitted() -> Result { unsafe { + } + #[inline] pub fn get_read_not_permitted() -> Result { >::get_activation_factory().get_read_not_permitted() - }} - #[inline] pub fn get_write_not_permitted() -> Result { unsafe { + } + #[inline] pub fn get_write_not_permitted() -> Result { >::get_activation_factory().get_write_not_permitted() - }} - #[inline] pub fn get_invalid_pdu() -> Result { unsafe { + } + #[inline] pub fn get_invalid_pdu() -> Result { >::get_activation_factory().get_invalid_pdu() - }} - #[inline] pub fn get_insufficient_authentication() -> Result { unsafe { + } + #[inline] pub fn get_insufficient_authentication() -> Result { >::get_activation_factory().get_insufficient_authentication() - }} - #[inline] pub fn get_request_not_supported() -> Result { unsafe { + } + #[inline] pub fn get_request_not_supported() -> Result { >::get_activation_factory().get_request_not_supported() - }} - #[inline] pub fn get_invalid_offset() -> Result { unsafe { + } + #[inline] pub fn get_invalid_offset() -> Result { >::get_activation_factory().get_invalid_offset() - }} - #[inline] pub fn get_insufficient_authorization() -> Result { unsafe { + } + #[inline] pub fn get_insufficient_authorization() -> Result { >::get_activation_factory().get_insufficient_authorization() - }} - #[inline] pub fn get_prepare_queue_full() -> Result { unsafe { + } + #[inline] pub fn get_prepare_queue_full() -> Result { >::get_activation_factory().get_prepare_queue_full() - }} - #[inline] pub fn get_attribute_not_found() -> Result { unsafe { + } + #[inline] pub fn get_attribute_not_found() -> Result { >::get_activation_factory().get_attribute_not_found() - }} - #[inline] pub fn get_attribute_not_long() -> Result { unsafe { + } + #[inline] pub fn get_attribute_not_long() -> Result { >::get_activation_factory().get_attribute_not_long() - }} - #[inline] pub fn get_insufficient_encryption_key_size() -> Result { unsafe { + } + #[inline] pub fn get_insufficient_encryption_key_size() -> Result { >::get_activation_factory().get_insufficient_encryption_key_size() - }} - #[inline] pub fn get_invalid_attribute_value_length() -> Result { unsafe { + } + #[inline] pub fn get_invalid_attribute_value_length() -> Result { >::get_activation_factory().get_invalid_attribute_value_length() - }} - #[inline] pub fn get_unlikely_error() -> Result { unsafe { + } + #[inline] pub fn get_unlikely_error() -> Result { >::get_activation_factory().get_unlikely_error() - }} - #[inline] pub fn get_insufficient_encryption() -> Result { unsafe { + } + #[inline] pub fn get_insufficient_encryption() -> Result { >::get_activation_factory().get_insufficient_encryption() - }} - #[inline] pub fn get_unsupported_group_type() -> Result { unsafe { + } + #[inline] pub fn get_unsupported_group_type() -> Result { >::get_activation_factory().get_unsupported_group_type() - }} - #[inline] pub fn get_insufficient_resources() -> Result { unsafe { + } + #[inline] pub fn get_insufficient_resources() -> Result { >::get_activation_factory().get_insufficient_resources() - }} + } } DEFINE_CLSID!(GattProtocolError(&[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,111,116,111,99,111,108,69,114,114,111,114,0]) [CLSID_GattProtocolError]); DEFINE_IID!(IID_IGattProtocolErrorStatics, 3393635781, 3788, 18441, 190, 163, 207, 121, 188, 153, 30, 55); @@ -10368,91 +10368,91 @@ RT_INTERFACE!{static interface IGattProtocolErrorStatics(IGattProtocolErrorStati fn get_InsufficientResources(&self, out: *mut u8) -> HRESULT }} impl IGattProtocolErrorStatics { - #[inline] pub unsafe fn get_invalid_handle(&self) -> Result { + #[inline] pub fn get_invalid_handle(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InvalidHandle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_read_not_permitted(&self) -> Result { + }} + #[inline] pub fn get_read_not_permitted(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReadNotPermitted)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_write_not_permitted(&self) -> Result { + }} + #[inline] pub fn get_write_not_permitted(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_WriteNotPermitted)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_invalid_pdu(&self) -> Result { + }} + #[inline] pub fn get_invalid_pdu(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InvalidPdu)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_insufficient_authentication(&self) -> Result { + }} + #[inline] pub fn get_insufficient_authentication(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InsufficientAuthentication)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_request_not_supported(&self) -> Result { + }} + #[inline] pub fn get_request_not_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RequestNotSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_invalid_offset(&self) -> Result { + }} + #[inline] pub fn get_invalid_offset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InvalidOffset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_insufficient_authorization(&self) -> Result { + }} + #[inline] pub fn get_insufficient_authorization(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InsufficientAuthorization)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_prepare_queue_full(&self) -> Result { + }} + #[inline] pub fn get_prepare_queue_full(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PrepareQueueFull)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_attribute_not_found(&self) -> Result { + }} + #[inline] pub fn get_attribute_not_found(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AttributeNotFound)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_attribute_not_long(&self) -> Result { + }} + #[inline] pub fn get_attribute_not_long(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AttributeNotLong)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_insufficient_encryption_key_size(&self) -> Result { + }} + #[inline] pub fn get_insufficient_encryption_key_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InsufficientEncryptionKeySize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_invalid_attribute_value_length(&self) -> Result { + }} + #[inline] pub fn get_invalid_attribute_value_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InvalidAttributeValueLength)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_unlikely_error(&self) -> Result { + }} + #[inline] pub fn get_unlikely_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UnlikelyError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_insufficient_encryption(&self) -> Result { + }} + #[inline] pub fn get_insufficient_encryption(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InsufficientEncryption)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_unsupported_group_type(&self) -> Result { + }} + #[inline] pub fn get_unsupported_group_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UnsupportedGroupType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_insufficient_resources(&self) -> Result { + }} + #[inline] pub fn get_insufficient_resources(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InsufficientResources)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(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] { @@ -10460,97 +10460,97 @@ RT_INTERFACE!{interface IGattReadClientCharacteristicConfigurationDescriptorResu fn get_ClientCharacteristicConfigurationDescriptor(&self, out: *mut GattClientCharacteristicConfigurationDescriptorValue) -> HRESULT }} impl IGattReadClientCharacteristicConfigurationDescriptorResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_client_characteristic_configuration_descriptor(&self) -> Result { + }} + #[inline] pub fn get_client_characteristic_configuration_descriptor(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ClientCharacteristicConfigurationDescriptor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class GattReadClientCharacteristicConfigurationDescriptorResult: IGattReadClientCharacteristicConfigurationDescriptorResult} DEFINE_IID!(IID_IGattReadClientCharacteristicConfigurationDescriptorResult2, 468821405, 47693, 17954, 134, 81, 244, 238, 21, 13, 10, 93); RT_INTERFACE!{interface IGattReadClientCharacteristicConfigurationDescriptorResult2(IGattReadClientCharacteristicConfigurationDescriptorResult2Vtbl): IInspectable(IInspectableVtbl) [IID_IGattReadClientCharacteristicConfigurationDescriptorResult2] { - fn get_ProtocolError(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT + fn get_ProtocolError(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IGattReadClientCharacteristicConfigurationDescriptorResult2 { - #[inline] pub unsafe fn get_protocol_error(&self) -> Result>> { + #[inline] pub fn get_protocol_error(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProtocolError)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IGattReadRequest, 4057818421, 27341, 17062, 164, 187, 215, 137, 218, 224, 4, 62); RT_INTERFACE!{interface IGattReadRequest(IGattReadRequestVtbl): IInspectable(IInspectableVtbl) [IID_IGattReadRequest] { fn get_Offset(&self, out: *mut u32) -> HRESULT, fn get_Length(&self, out: *mut u32) -> HRESULT, fn get_State(&self, out: *mut GattRequestState) -> HRESULT, - fn add_StateChanged(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StateChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_StateChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StateChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy5(&self) -> (), #[cfg(feature="windows-storage")] fn RespondWithValue(&self, value: *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, fn RespondWithProtocolError(&self, protocolError: u8) -> HRESULT }} impl IGattReadRequest { - #[inline] pub unsafe fn get_offset(&self) -> Result { + #[inline] pub fn get_offset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Offset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_length(&self) -> Result { + }} + #[inline] pub fn get_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Length)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_state(&self) -> Result { + }} + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_state_changed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_state_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StateChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_state_changed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_state_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StateChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn respond_with_value(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn respond_with_value(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RespondWithValue)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn respond_with_protocol_error(&self, protocolError: u8) -> Result<()> { + }} + #[inline] pub fn respond_with_protocol_error(&self, protocolError: u8) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RespondWithProtocolError)(self as *const _ as *mut _, protocolError); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class GattReadRequest: IGattReadRequest} DEFINE_IID!(IID_IGattReadRequestedEventArgs, 2471064131, 62364, 18507, 138, 182, 153, 107, 164, 134, 207, 163); RT_INTERFACE!{interface IGattReadRequestedEventArgs(IGattReadRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IGattReadRequestedEventArgs] { fn get_Session(&self, out: *mut *mut GattSession) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT, - fn GetRequestAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT, + fn GetRequestAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IGattReadRequestedEventArgs { - #[inline] pub unsafe fn get_session(&self) -> Result> { + #[inline] pub fn get_session(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Session)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_request_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_request_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetRequestAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class GattReadRequestedEventArgs: IGattReadRequestedEventArgs} DEFINE_IID!(IID_IGattReadResult, 1671851784, 6890, 19532, 165, 15, 151, 186, 228, 116, 179, 72); @@ -10559,59 +10559,59 @@ RT_INTERFACE!{interface IGattReadResult(IGattReadResultVtbl): IInspectable(IInsp #[cfg(feature="windows-storage")] fn get_Value(&self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT }} impl IGattReadResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_value(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_value(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class GattReadResult: IGattReadResult} DEFINE_IID!(IID_IGattReadResult2, 2702135456, 64323, 18607, 186, 170, 99, 138, 92, 99, 41, 254); RT_INTERFACE!{interface IGattReadResult2(IGattReadResult2Vtbl): IInspectable(IInspectableVtbl) [IID_IGattReadResult2] { - fn get_ProtocolError(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT + fn get_ProtocolError(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IGattReadResult2 { - #[inline] pub unsafe fn get_protocol_error(&self) -> Result>> { + #[inline] pub fn get_protocol_error(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProtocolError)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self) -> (), #[cfg(feature="windows-storage")] fn WriteValue(&self, characteristic: *mut GattCharacteristic, value: *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, - fn CommitAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn CommitAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IGattReliableWriteTransaction { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn write_value(&self, characteristic: &GattCharacteristic, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { + #[cfg(feature="windows-storage")] #[inline] pub fn write_value(&self, characteristic: &GattCharacteristic, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).WriteValue)(self as *const _ as *mut _, characteristic as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn commit_async(&self) -> Result>> { + }} + #[inline] pub fn commit_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CommitAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class GattReliableWriteTransaction: IGattReliableWriteTransaction} impl RtActivatable for GattReliableWriteTransaction {} DEFINE_CLSID!(GattReliableWriteTransaction(&[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,82,101,108,105,97,98,108,101,87,114,105,116,101,84,114,97,110,115,97,99,116,105,111,110,0]) [CLSID_GattReliableWriteTransaction]); DEFINE_IID!(IID_IGattReliableWriteTransaction2, 1360083335, 61202, 17967, 159, 178, 161, 164, 58, 103, 148, 22); RT_INTERFACE!{interface IGattReliableWriteTransaction2(IGattReliableWriteTransaction2Vtbl): IInspectable(IInspectableVtbl) [IID_IGattReliableWriteTransaction2] { - fn CommitWithResultAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn CommitWithResultAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IGattReliableWriteTransaction2 { - #[inline] pub unsafe fn commit_with_result_async(&self) -> Result>> { + #[inline] pub fn commit_with_result_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CommitWithResultAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum GattRequestState: i32 { Pending (GattRequestState_Pending) = 0, Completed (GattRequestState_Completed) = 1, Canceled (GattRequestState_Canceled) = 2, @@ -10622,67 +10622,67 @@ RT_INTERFACE!{interface IGattRequestStateChangedEventArgs(IGattRequestStateChang fn get_Error(&self, out: *mut super::BluetoothError) -> HRESULT }} impl IGattRequestStateChangedEventArgs { - #[inline] pub unsafe fn get_state(&self) -> Result { + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_error(&self) -> Result { + }} + #[inline] pub fn get_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Error)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class GattRequestStateChangedEventArgs: IGattRequestStateChangedEventArgs} DEFINE_IID!(IID_IGattServiceProvider, 2015540173, 10377, 20358, 160, 81, 63, 10, 237, 28, 39, 96); RT_INTERFACE!{interface IGattServiceProvider(IGattServiceProviderVtbl): IInspectable(IInspectableVtbl) [IID_IGattServiceProvider] { fn get_Service(&self, out: *mut *mut GattLocalService) -> HRESULT, fn get_AdvertisementStatus(&self, out: *mut GattServiceProviderAdvertisementStatus) -> HRESULT, - fn add_AdvertisementStatusChanged(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AdvertisementStatusChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_AdvertisementStatusChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AdvertisementStatusChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn StartAdvertising(&self) -> HRESULT, fn StartAdvertisingWithParameters(&self, parameters: *mut GattServiceProviderAdvertisingParameters) -> HRESULT, fn StopAdvertising(&self) -> HRESULT }} impl IGattServiceProvider { - #[inline] pub unsafe fn get_service(&self) -> Result> { + #[inline] pub fn get_service(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Service)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_advertisement_status(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_advertisement_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AdvertisementStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_advertisement_status_changed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_advertisement_status_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AdvertisementStatusChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_advertisement_status_changed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_advertisement_status_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AdvertisementStatusChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start_advertising(&self) -> Result<()> { + }} + #[inline] pub fn start_advertising(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StartAdvertising)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start_advertising_with_parameters(&self, parameters: &GattServiceProviderAdvertisingParameters) -> Result<()> { + }} + #[inline] pub fn start_advertising_with_parameters(&self, parameters: &GattServiceProviderAdvertisingParameters) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StartAdvertisingWithParameters)(self as *const _ as *mut _, parameters as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop_advertising(&self) -> Result<()> { + }} + #[inline] pub fn stop_advertising(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StopAdvertising)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class GattServiceProvider: IGattServiceProvider} impl RtActivatable for GattServiceProvider {} impl GattServiceProvider { - #[inline] pub fn create_async(serviceUuid: Guid) -> Result>> { unsafe { + #[inline] pub fn create_async(serviceUuid: Guid) -> Result>> { >::get_activation_factory().create_async(serviceUuid) - }} + } } DEFINE_CLSID!(GattServiceProvider(&[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,80,114,111,118,105,100,101,114,0]) [CLSID_GattServiceProvider]); RT_ENUM! { enum GattServiceProviderAdvertisementStatus: i32 { @@ -10694,16 +10694,16 @@ RT_INTERFACE!{interface IGattServiceProviderAdvertisementStatusChangedEventArgs( fn get_Status(&self, out: *mut GattServiceProviderAdvertisementStatus) -> HRESULT }} impl IGattServiceProviderAdvertisementStatusChangedEventArgs { - #[inline] pub unsafe fn get_error(&self) -> Result { + #[inline] pub fn get_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Error)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class GattServiceProviderAdvertisementStatusChangedEventArgs: IGattServiceProviderAdvertisementStatusChangedEventArgs} DEFINE_IID!(IID_IGattServiceProviderAdvertisingParameters, 3805163947, 25365, 19490, 155, 215, 120, 29, 188, 61, 141, 130); @@ -10714,24 +10714,24 @@ RT_INTERFACE!{interface IGattServiceProviderAdvertisingParameters(IGattServicePr fn get_IsDiscoverable(&self, out: *mut bool) -> HRESULT }} impl IGattServiceProviderAdvertisingParameters { - #[inline] pub unsafe fn set_is_connectable(&self, value: bool) -> Result<()> { + #[inline] pub fn set_is_connectable(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsConnectable)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_connectable(&self) -> Result { + }} + #[inline] pub fn get_is_connectable(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsConnectable)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_discoverable(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_discoverable(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsDiscoverable)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_discoverable(&self) -> Result { + }} + #[inline] pub fn get_is_discoverable(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDiscoverable)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class GattServiceProviderAdvertisingParameters: IGattServiceProviderAdvertisingParameters} impl RtActivatable for GattServiceProviderAdvertisingParameters {} @@ -10742,99 +10742,99 @@ RT_INTERFACE!{interface IGattServiceProviderResult(IGattServiceProviderResultVtb fn get_ServiceProvider(&self, out: *mut *mut GattServiceProvider) -> HRESULT }} impl IGattServiceProviderResult { - #[inline] pub unsafe fn get_error(&self) -> Result { + #[inline] pub fn get_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Error)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_provider(&self) -> Result> { + }} + #[inline] pub fn get_service_provider(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServiceProvider)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class GattServiceProviderResult: IGattServiceProviderResult} DEFINE_IID!(IID_IGattServiceProviderStatics, 830029923, 21078, 16468, 164, 244, 123, 190, 119, 85, 165, 126); RT_INTERFACE!{static interface IGattServiceProviderStatics(IGattServiceProviderStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGattServiceProviderStatics] { - fn CreateAsync(&self, serviceUuid: Guid, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn CreateAsync(&self, serviceUuid: Guid, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IGattServiceProviderStatics { - #[inline] pub unsafe fn create_async(&self, serviceUuid: Guid) -> Result>> { + #[inline] pub fn create_async(&self, serviceUuid: Guid) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAsync)(self as *const _ as *mut _, serviceUuid, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class GattServiceUuids} impl RtActivatable for GattServiceUuids {} impl RtActivatable for GattServiceUuids {} impl GattServiceUuids { - #[inline] pub fn get_battery() -> Result { unsafe { + #[inline] pub fn get_battery() -> Result { >::get_activation_factory().get_battery() - }} - #[inline] pub fn get_blood_pressure() -> Result { unsafe { + } + #[inline] pub fn get_blood_pressure() -> Result { >::get_activation_factory().get_blood_pressure() - }} - #[inline] pub fn get_cycling_speed_and_cadence() -> Result { unsafe { + } + #[inline] pub fn get_cycling_speed_and_cadence() -> Result { >::get_activation_factory().get_cycling_speed_and_cadence() - }} - #[inline] pub fn get_generic_access() -> Result { unsafe { + } + #[inline] pub fn get_generic_access() -> Result { >::get_activation_factory().get_generic_access() - }} - #[inline] pub fn get_generic_attribute() -> Result { unsafe { + } + #[inline] pub fn get_generic_attribute() -> Result { >::get_activation_factory().get_generic_attribute() - }} - #[inline] pub fn get_glucose() -> Result { unsafe { + } + #[inline] pub fn get_glucose() -> Result { >::get_activation_factory().get_glucose() - }} - #[inline] pub fn get_health_thermometer() -> Result { unsafe { + } + #[inline] pub fn get_health_thermometer() -> Result { >::get_activation_factory().get_health_thermometer() - }} - #[inline] pub fn get_heart_rate() -> Result { unsafe { + } + #[inline] pub fn get_heart_rate() -> Result { >::get_activation_factory().get_heart_rate() - }} - #[inline] pub fn get_running_speed_and_cadence() -> Result { unsafe { + } + #[inline] pub fn get_running_speed_and_cadence() -> Result { >::get_activation_factory().get_running_speed_and_cadence() - }} - #[inline] pub fn get_alert_notification() -> Result { unsafe { + } + #[inline] pub fn get_alert_notification() -> Result { >::get_activation_factory().get_alert_notification() - }} - #[inline] pub fn get_current_time() -> Result { unsafe { + } + #[inline] pub fn get_current_time() -> Result { >::get_activation_factory().get_current_time() - }} - #[inline] pub fn get_cycling_power() -> Result { unsafe { + } + #[inline] pub fn get_cycling_power() -> Result { >::get_activation_factory().get_cycling_power() - }} - #[inline] pub fn get_device_information() -> Result { unsafe { + } + #[inline] pub fn get_device_information() -> Result { >::get_activation_factory().get_device_information() - }} - #[inline] pub fn get_human_interface_device() -> Result { unsafe { + } + #[inline] pub fn get_human_interface_device() -> Result { >::get_activation_factory().get_human_interface_device() - }} - #[inline] pub fn get_immediate_alert() -> Result { unsafe { + } + #[inline] pub fn get_immediate_alert() -> Result { >::get_activation_factory().get_immediate_alert() - }} - #[inline] pub fn get_link_loss() -> Result { unsafe { + } + #[inline] pub fn get_link_loss() -> Result { >::get_activation_factory().get_link_loss() - }} - #[inline] pub fn get_location_and_navigation() -> Result { unsafe { + } + #[inline] pub fn get_location_and_navigation() -> Result { >::get_activation_factory().get_location_and_navigation() - }} - #[inline] pub fn get_next_dst_change() -> Result { unsafe { + } + #[inline] pub fn get_next_dst_change() -> Result { >::get_activation_factory().get_next_dst_change() - }} - #[inline] pub fn get_phone_alert_status() -> Result { unsafe { + } + #[inline] pub fn get_phone_alert_status() -> Result { >::get_activation_factory().get_phone_alert_status() - }} - #[inline] pub fn get_reference_time_update() -> Result { unsafe { + } + #[inline] pub fn get_reference_time_update() -> Result { >::get_activation_factory().get_reference_time_update() - }} - #[inline] pub fn get_scan_parameters() -> Result { unsafe { + } + #[inline] pub fn get_scan_parameters() -> Result { >::get_activation_factory().get_scan_parameters() - }} - #[inline] pub fn get_tx_power() -> Result { unsafe { + } + #[inline] pub fn get_tx_power() -> Result { >::get_activation_factory().get_tx_power() - }} + } } DEFINE_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]) [CLSID_GattServiceUuids]); DEFINE_IID!(IID_IGattServiceUuidsStatics, 1841655896, 39610, 17431, 184, 242, 220, 224, 22, 211, 78, 226); @@ -10850,51 +10850,51 @@ RT_INTERFACE!{static interface IGattServiceUuidsStatics(IGattServiceUuidsStatics fn get_RunningSpeedAndCadence(&self, out: *mut Guid) -> HRESULT }} impl IGattServiceUuidsStatics { - #[inline] pub unsafe fn get_battery(&self) -> Result { + #[inline] pub fn get_battery(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Battery)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_blood_pressure(&self) -> Result { + }} + #[inline] pub fn get_blood_pressure(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BloodPressure)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_cycling_speed_and_cadence(&self) -> Result { + }} + #[inline] pub fn get_cycling_speed_and_cadence(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CyclingSpeedAndCadence)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_generic_access(&self) -> Result { + }} + #[inline] pub fn get_generic_access(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_GenericAccess)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_generic_attribute(&self) -> Result { + }} + #[inline] pub fn get_generic_attribute(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_GenericAttribute)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_glucose(&self) -> Result { + }} + #[inline] pub fn get_glucose(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Glucose)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_health_thermometer(&self) -> Result { + }} + #[inline] pub fn get_health_thermometer(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HealthThermometer)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_heart_rate(&self) -> Result { + }} + #[inline] pub fn get_heart_rate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HeartRate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_running_speed_and_cadence(&self) -> Result { + }} + #[inline] pub fn get_running_speed_and_cadence(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RunningSpeedAndCadence)(self as *const _ as *mut _, &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] { @@ -10913,71 +10913,71 @@ RT_INTERFACE!{static interface IGattServiceUuidsStatics2(IGattServiceUuidsStatic fn get_TxPower(&self, out: *mut Guid) -> HRESULT }} impl IGattServiceUuidsStatics2 { - #[inline] pub unsafe fn get_alert_notification(&self) -> Result { + #[inline] pub fn get_alert_notification(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AlertNotification)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_time(&self) -> Result { + }} + #[inline] pub fn get_current_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CurrentTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_cycling_power(&self) -> Result { + }} + #[inline] pub fn get_cycling_power(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CyclingPower)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_information(&self) -> Result { + }} + #[inline] pub fn get_device_information(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DeviceInformation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_human_interface_device(&self) -> Result { + }} + #[inline] pub fn get_human_interface_device(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HumanInterfaceDevice)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_immediate_alert(&self) -> Result { + }} + #[inline] pub fn get_immediate_alert(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ImmediateAlert)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_link_loss(&self) -> Result { + }} + #[inline] pub fn get_link_loss(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LinkLoss)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_location_and_navigation(&self) -> Result { + }} + #[inline] pub fn get_location_and_navigation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LocationAndNavigation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_next_dst_change(&self) -> Result { + }} + #[inline] pub fn get_next_dst_change(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NextDstChange)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_phone_alert_status(&self) -> Result { + }} + #[inline] pub fn get_phone_alert_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PhoneAlertStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_reference_time_update(&self) -> Result { + }} + #[inline] pub fn get_reference_time_update(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReferenceTimeUpdate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_scan_parameters(&self) -> Result { + }} + #[inline] pub fn get_scan_parameters(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ScanParameters)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_tx_power(&self) -> Result { + }} + #[inline] pub fn get_tx_power(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TxPower)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IGattSession, 3527102787, 57422, 19492, 153, 156, 156, 37, 111, 152, 86, 177); RT_INTERFACE!{interface IGattSession(IGattSessionVtbl): IInspectable(IInspectableVtbl) [IID_IGattSession] { @@ -10987,78 +10987,78 @@ RT_INTERFACE!{interface IGattSession(IGattSessionVtbl): IInspectable(IInspectabl fn get_MaintainConnection(&self, out: *mut bool) -> HRESULT, fn get_MaxPduSize(&self, out: *mut u16) -> HRESULT, fn get_SessionStatus(&self, out: *mut GattSessionStatus) -> HRESULT, - fn add_MaxPduSizeChanged(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_MaxPduSizeChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_SessionStatusChanged(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SessionStatusChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn add_MaxPduSizeChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_MaxPduSizeChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_SessionStatusChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SessionStatusChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IGattSession { - #[inline] pub unsafe fn get_device_id(&self) -> Result> { + #[inline] pub fn get_device_id(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_maintain_connection(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_can_maintain_connection(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanMaintainConnection)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_maintain_connection(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_maintain_connection(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaintainConnection)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_maintain_connection(&self) -> Result { + }} + #[inline] pub fn get_maintain_connection(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaintainConnection)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_pdu_size(&self) -> Result { + }} + #[inline] pub fn get_max_pdu_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxPduSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_session_status(&self) -> Result { + }} + #[inline] pub fn get_session_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SessionStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_max_pdu_size_changed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_max_pdu_size_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_MaxPduSizeChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_max_pdu_size_changed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_max_pdu_size_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_MaxPduSizeChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_session_status_changed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_session_status_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SessionStatusChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_session_status_changed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_session_status_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SessionStatusChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class GattSession: IGattSession} impl RtActivatable for GattSession {} impl GattSession { - #[inline] pub fn from_device_id_async(deviceId: &super::BluetoothDeviceId) -> Result>> { unsafe { + #[inline] pub fn from_device_id_async(deviceId: &super::BluetoothDeviceId) -> Result>> { >::get_activation_factory().from_device_id_async(deviceId) - }} + } } DEFINE_CLSID!(GattSession(&[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,115,115,105,111,110,0]) [CLSID_GattSession]); DEFINE_IID!(IID_IGattSessionStatics, 778418524, 21407, 19895, 130, 168, 115, 189, 187, 247, 62, 191); RT_INTERFACE!{static interface IGattSessionStatics(IGattSessionStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGattSessionStatics] { - fn FromDeviceIdAsync(&self, deviceId: *mut super::BluetoothDeviceId, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn FromDeviceIdAsync(&self, deviceId: *mut super::BluetoothDeviceId, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IGattSessionStatics { - #[inline] pub unsafe fn from_device_id_async(&self, deviceId: &super::BluetoothDeviceId) -> Result>> { + #[inline] pub fn from_device_id_async(&self, deviceId: &super::BluetoothDeviceId) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromDeviceIdAsync)(self as *const _ as *mut _, deviceId as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum GattSessionStatus: i32 { Closed (GattSessionStatus_Closed) = 0, Active (GattSessionStatus_Active) = 1, @@ -11069,16 +11069,16 @@ RT_INTERFACE!{interface IGattSessionStatusChangedEventArgs(IGattSessionStatusCha fn get_Status(&self, out: *mut GattSessionStatus) -> HRESULT }} impl IGattSessionStatusChangedEventArgs { - #[inline] pub unsafe fn get_error(&self) -> Result { + #[inline] pub fn get_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Error)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class GattSessionStatusChangedEventArgs: IGattSessionStatusChangedEventArgs} RT_ENUM! { enum GattSharingMode: i32 { @@ -11088,48 +11088,48 @@ DEFINE_IID!(IID_IGattSubscribedClient, 1936625665, 5540, 20162, 146, 72, 227, 24 RT_INTERFACE!{interface IGattSubscribedClient(IGattSubscribedClientVtbl): IInspectable(IInspectableVtbl) [IID_IGattSubscribedClient] { fn get_Session(&self, out: *mut *mut GattSession) -> HRESULT, fn get_MaxNotificationSize(&self, out: *mut u16) -> HRESULT, - fn add_MaxNotificationSizeChanged(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_MaxNotificationSizeChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn add_MaxNotificationSizeChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_MaxNotificationSizeChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IGattSubscribedClient { - #[inline] pub unsafe fn get_session(&self) -> Result> { + #[inline] pub fn get_session(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Session)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_notification_size(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_max_notification_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxNotificationSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_max_notification_size_changed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_max_notification_size_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_MaxNotificationSizeChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_max_notification_size_changed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_max_notification_size_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_MaxNotificationSizeChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class GattSubscribedClient: IGattSubscribedClient} 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(&self) -> (), #[cfg(feature="windows-storage")] fn get_CharacteristicValue(&self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, - fn get_Timestamp(&self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT }} impl IGattValueChangedEventArgs { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_characteristic_value(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_characteristic_value(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CharacteristicValue)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_timestamp(&self) -> Result<::rt::gen::windows::foundation::DateTime> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class GattValueChangedEventArgs: IGattValueChangedEventArgs} RT_ENUM! { enum GattWriteOption: i32 { @@ -11142,91 +11142,91 @@ RT_INTERFACE!{interface IGattWriteRequest(IGattWriteRequestVtbl): IInspectable(I fn get_Offset(&self, out: *mut u32) -> HRESULT, fn get_Option(&self, out: *mut GattWriteOption) -> HRESULT, fn get_State(&self, out: *mut GattRequestState) -> HRESULT, - fn add_StateChanged(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StateChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_StateChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StateChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn Respond(&self) -> HRESULT, fn RespondWithProtocolError(&self, protocolError: u8) -> HRESULT }} impl IGattWriteRequest { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_value(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_value(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_offset(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_offset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Offset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_option(&self) -> Result { + }} + #[inline] pub fn get_option(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Option)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_state(&self) -> Result { + }} + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_state_changed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_state_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StateChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_state_changed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_state_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StateChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn respond(&self) -> Result<()> { + }} + #[inline] pub fn respond(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Respond)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn respond_with_protocol_error(&self, protocolError: u8) -> Result<()> { + }} + #[inline] pub fn respond_with_protocol_error(&self, protocolError: u8) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RespondWithProtocolError)(self as *const _ as *mut _, protocolError); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class GattWriteRequest: IGattWriteRequest} DEFINE_IID!(IID_IGattWriteRequestedEventArgs, 770476990, 42810, 18202, 148, 213, 3, 125, 234, 221, 8, 6); RT_INTERFACE!{interface IGattWriteRequestedEventArgs(IGattWriteRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IGattWriteRequestedEventArgs] { fn get_Session(&self, out: *mut *mut GattSession) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT, - fn GetRequestAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT, + fn GetRequestAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IGattWriteRequestedEventArgs { - #[inline] pub unsafe fn get_session(&self) -> Result> { + #[inline] pub fn get_session(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Session)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_request_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_request_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetRequestAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class GattWriteRequestedEventArgs: IGattWriteRequestedEventArgs} DEFINE_IID!(IID_IGattWriteResult, 1234296241, 52011, 17655, 153, 252, 210, 154, 40, 113, 220, 155); RT_INTERFACE!{interface IGattWriteResult(IGattWriteResultVtbl): IInspectable(IInspectableVtbl) [IID_IGattWriteResult] { fn get_Status(&self, out: *mut GattCommunicationStatus) -> HRESULT, - fn get_ProtocolError(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT + fn get_ProtocolError(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IGattWriteResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_protocol_error(&self) -> Result>> { + }} + #[inline] pub fn get_protocol_error(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProtocolError)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class GattWriteResult: IGattWriteResult} } // Windows.Devices.Bluetooth.GenericAttributeProfile @@ -11234,60 +11234,60 @@ pub mod advertisement { // Windows.Devices.Bluetooth.Advertisement use ::prelude::*; 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(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn put_Flags(&self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_Flags(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_Flags(&self, value: *mut foundation::IReference) -> HRESULT, fn get_LocalName(&self, out: *mut HSTRING) -> HRESULT, fn put_LocalName(&self, value: HSTRING) -> HRESULT, - fn get_ServiceUuids(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, - fn get_ManufacturerData(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, - fn get_DataSections(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, - fn GetManufacturerDataByCompanyId(&self, companyId: u16, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn GetSectionsByType(&self, type_: u8, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn get_ServiceUuids(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_ManufacturerData(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_DataSections(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn GetManufacturerDataByCompanyId(&self, companyId: u16, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn GetSectionsByType(&self, type_: u8, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IBluetoothLEAdvertisement { - #[inline] pub unsafe fn get_flags(&self) -> Result>> { + #[inline] pub fn get_flags(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Flags)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_flags(&self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_flags(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Flags)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_local_name(&self) -> Result { + }} + #[inline] pub fn get_local_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LocalName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_local_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_local_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LocalName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_uuids(&self) -> Result>> { + }} + #[inline] pub fn get_service_uuids(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServiceUuids)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_manufacturer_data(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_manufacturer_data(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ManufacturerData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_data_sections(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_data_sections(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DataSections)(self 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(&self, companyId: u16) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_manufacturer_data_by_company_id(&self, companyId: u16) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetManufacturerDataByCompanyId)(self as *const _ as *mut _, companyId, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sections_by_type(&self, type_: u8) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_sections_by_type(&self, type_: u8) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSectionsByType)(self as *const _ as *mut _, type_, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class BluetoothLEAdvertisement: IBluetoothLEAdvertisement} impl RtActivatable for BluetoothLEAdvertisement {} @@ -11302,41 +11302,41 @@ RT_INTERFACE!{interface IBluetoothLEAdvertisementBytePattern(IBluetoothLEAdverti #[cfg(feature="windows-storage")] fn put_Data(&self, value: *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT }} impl IBluetoothLEAdvertisementBytePattern { - #[inline] pub unsafe fn get_data_type(&self) -> Result { + #[inline] pub fn get_data_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DataType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_data_type(&self, value: u8) -> Result<()> { + }} + #[inline] pub fn set_data_type(&self, value: u8) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DataType)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_offset(&self) -> Result { + }} + #[inline] pub fn get_offset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Offset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_offset(&self, value: i16) -> Result<()> { + }} + #[inline] pub fn set_offset(&self, value: i16) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Offset)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_data(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Data)(self 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_data(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_data(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Data)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class BluetoothLEAdvertisementBytePattern: IBluetoothLEAdvertisementBytePattern} impl RtActivatable for BluetoothLEAdvertisementBytePattern {} impl RtActivatable for BluetoothLEAdvertisementBytePattern {} impl BluetoothLEAdvertisementBytePattern { - #[cfg(feature="windows-storage")] #[inline] pub fn create(dataType: u8, offset: i16, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn create(dataType: u8, offset: i16, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { >::get_activation_factory().create(dataType, offset, data) - }} + } } DEFINE_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]) [CLSID_BluetoothLEAdvertisementBytePattern]); DEFINE_IID!(IID_IBluetoothLEAdvertisementBytePatternFactory, 3269610867, 64860, 20163, 190, 42, 156, 166, 250, 17, 183, 189); @@ -11344,11 +11344,11 @@ RT_INTERFACE!{static interface IBluetoothLEAdvertisementBytePatternFactory(IBlue #[cfg(feature="windows-storage")] fn Create(&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(&self, dataType: u8, offset: i16, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn create(&self, dataType: u8, offset: i16, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, dataType, offset, 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] { @@ -11358,32 +11358,32 @@ RT_INTERFACE!{interface IBluetoothLEAdvertisementDataSection(IBluetoothLEAdverti #[cfg(feature="windows-storage")] fn put_Data(&self, value: *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT }} impl IBluetoothLEAdvertisementDataSection { - #[inline] pub unsafe fn get_data_type(&self) -> Result { + #[inline] pub fn get_data_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DataType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_data_type(&self, value: u8) -> Result<()> { + }} + #[inline] pub fn set_data_type(&self, value: u8) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DataType)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_data(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Data)(self 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_data(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_data(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Data)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class BluetoothLEAdvertisementDataSection: IBluetoothLEAdvertisementDataSection} impl RtActivatable for BluetoothLEAdvertisementDataSection {} impl RtActivatable for BluetoothLEAdvertisementDataSection {} impl BluetoothLEAdvertisementDataSection { - #[cfg(feature="windows-storage")] #[inline] pub fn create(dataType: u8, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn create(dataType: u8, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { >::get_activation_factory().create(dataType, data) - }} + } } DEFINE_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]) [CLSID_BluetoothLEAdvertisementDataSection]); DEFINE_IID!(IID_IBluetoothLEAdvertisementDataSectionFactory, 3886287170, 43077, 16453, 191, 126, 62, 153, 113, 219, 138, 107); @@ -11391,81 +11391,81 @@ RT_INTERFACE!{static interface IBluetoothLEAdvertisementDataSectionFactory(IBlue #[cfg(feature="windows-storage")] fn Create(&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(&self, dataType: u8, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn create(&self, dataType: u8, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, dataType, data as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class BluetoothLEAdvertisementDataTypes} impl RtActivatable for BluetoothLEAdvertisementDataTypes {} impl BluetoothLEAdvertisementDataTypes { - #[inline] pub fn get_flags() -> Result { unsafe { + #[inline] pub fn get_flags() -> Result { >::get_activation_factory().get_flags() - }} - #[inline] pub fn get_incomplete_service16_bit_uuids() -> Result { unsafe { + } + #[inline] pub fn get_incomplete_service16_bit_uuids() -> Result { >::get_activation_factory().get_incomplete_service16_bit_uuids() - }} - #[inline] pub fn get_complete_service16_bit_uuids() -> Result { unsafe { + } + #[inline] pub fn get_complete_service16_bit_uuids() -> Result { >::get_activation_factory().get_complete_service16_bit_uuids() - }} - #[inline] pub fn get_incomplete_service32_bit_uuids() -> Result { unsafe { + } + #[inline] pub fn get_incomplete_service32_bit_uuids() -> Result { >::get_activation_factory().get_incomplete_service32_bit_uuids() - }} - #[inline] pub fn get_complete_service32_bit_uuids() -> Result { unsafe { + } + #[inline] pub fn get_complete_service32_bit_uuids() -> Result { >::get_activation_factory().get_complete_service32_bit_uuids() - }} - #[inline] pub fn get_incomplete_service128_bit_uuids() -> Result { unsafe { + } + #[inline] pub fn get_incomplete_service128_bit_uuids() -> Result { >::get_activation_factory().get_incomplete_service128_bit_uuids() - }} - #[inline] pub fn get_complete_service128_bit_uuids() -> Result { unsafe { + } + #[inline] pub fn get_complete_service128_bit_uuids() -> Result { >::get_activation_factory().get_complete_service128_bit_uuids() - }} - #[inline] pub fn get_shortened_local_name() -> Result { unsafe { + } + #[inline] pub fn get_shortened_local_name() -> Result { >::get_activation_factory().get_shortened_local_name() - }} - #[inline] pub fn get_complete_local_name() -> Result { unsafe { + } + #[inline] pub fn get_complete_local_name() -> Result { >::get_activation_factory().get_complete_local_name() - }} - #[inline] pub fn get_tx_power_level() -> Result { unsafe { + } + #[inline] pub fn get_tx_power_level() -> Result { >::get_activation_factory().get_tx_power_level() - }} - #[inline] pub fn get_slave_connection_interval_range() -> Result { unsafe { + } + #[inline] pub fn get_slave_connection_interval_range() -> Result { >::get_activation_factory().get_slave_connection_interval_range() - }} - #[inline] pub fn get_service_solicitation16_bit_uuids() -> Result { unsafe { + } + #[inline] pub fn get_service_solicitation16_bit_uuids() -> Result { >::get_activation_factory().get_service_solicitation16_bit_uuids() - }} - #[inline] pub fn get_service_solicitation32_bit_uuids() -> Result { unsafe { + } + #[inline] pub fn get_service_solicitation32_bit_uuids() -> Result { >::get_activation_factory().get_service_solicitation32_bit_uuids() - }} - #[inline] pub fn get_service_solicitation128_bit_uuids() -> Result { unsafe { + } + #[inline] pub fn get_service_solicitation128_bit_uuids() -> Result { >::get_activation_factory().get_service_solicitation128_bit_uuids() - }} - #[inline] pub fn get_service_data16_bit_uuids() -> Result { unsafe { + } + #[inline] pub fn get_service_data16_bit_uuids() -> Result { >::get_activation_factory().get_service_data16_bit_uuids() - }} - #[inline] pub fn get_service_data32_bit_uuids() -> Result { unsafe { + } + #[inline] pub fn get_service_data32_bit_uuids() -> Result { >::get_activation_factory().get_service_data32_bit_uuids() - }} - #[inline] pub fn get_service_data128_bit_uuids() -> Result { unsafe { + } + #[inline] pub fn get_service_data128_bit_uuids() -> Result { >::get_activation_factory().get_service_data128_bit_uuids() - }} - #[inline] pub fn get_public_target_address() -> Result { unsafe { + } + #[inline] pub fn get_public_target_address() -> Result { >::get_activation_factory().get_public_target_address() - }} - #[inline] pub fn get_random_target_address() -> Result { unsafe { + } + #[inline] pub fn get_random_target_address() -> Result { >::get_activation_factory().get_random_target_address() - }} - #[inline] pub fn get_appearance() -> Result { unsafe { + } + #[inline] pub fn get_appearance() -> Result { >::get_activation_factory().get_appearance() - }} - #[inline] pub fn get_advertising_interval() -> Result { unsafe { + } + #[inline] pub fn get_advertising_interval() -> Result { >::get_activation_factory().get_advertising_interval() - }} - #[inline] pub fn get_manufacturer_specific_data() -> Result { unsafe { + } + #[inline] pub fn get_manufacturer_specific_data() -> Result { >::get_activation_factory().get_manufacturer_specific_data() - }} + } } DEFINE_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]) [CLSID_BluetoothLEAdvertisementDataTypes]); DEFINE_IID!(IID_IBluetoothLEAdvertisementDataTypesStatics, 1001801519, 1542, 17227, 167, 110, 116, 21, 159, 6, 132, 211); @@ -11494,138 +11494,138 @@ RT_INTERFACE!{static interface IBluetoothLEAdvertisementDataTypesStatics(IBlueto fn get_ManufacturerSpecificData(&self, out: *mut u8) -> HRESULT }} impl IBluetoothLEAdvertisementDataTypesStatics { - #[inline] pub unsafe fn get_flags(&self) -> Result { + #[inline] pub fn get_flags(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Flags)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_incomplete_service16_bit_uuids(&self) -> Result { + }} + #[inline] pub fn get_incomplete_service16_bit_uuids(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IncompleteService16BitUuids)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_complete_service16_bit_uuids(&self) -> Result { + }} + #[inline] pub fn get_complete_service16_bit_uuids(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CompleteService16BitUuids)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_incomplete_service32_bit_uuids(&self) -> Result { + }} + #[inline] pub fn get_incomplete_service32_bit_uuids(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IncompleteService32BitUuids)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_complete_service32_bit_uuids(&self) -> Result { + }} + #[inline] pub fn get_complete_service32_bit_uuids(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CompleteService32BitUuids)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_incomplete_service128_bit_uuids(&self) -> Result { + }} + #[inline] pub fn get_incomplete_service128_bit_uuids(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IncompleteService128BitUuids)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_complete_service128_bit_uuids(&self) -> Result { + }} + #[inline] pub fn get_complete_service128_bit_uuids(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CompleteService128BitUuids)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_shortened_local_name(&self) -> Result { + }} + #[inline] pub fn get_shortened_local_name(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ShortenedLocalName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_complete_local_name(&self) -> Result { + }} + #[inline] pub fn get_complete_local_name(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CompleteLocalName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_tx_power_level(&self) -> Result { + }} + #[inline] pub fn get_tx_power_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TxPowerLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_slave_connection_interval_range(&self) -> Result { + }} + #[inline] pub fn get_slave_connection_interval_range(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SlaveConnectionIntervalRange)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_solicitation16_bit_uuids(&self) -> Result { + }} + #[inline] pub fn get_service_solicitation16_bit_uuids(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ServiceSolicitation16BitUuids)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_solicitation32_bit_uuids(&self) -> Result { + }} + #[inline] pub fn get_service_solicitation32_bit_uuids(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ServiceSolicitation32BitUuids)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_solicitation128_bit_uuids(&self) -> Result { + }} + #[inline] pub fn get_service_solicitation128_bit_uuids(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ServiceSolicitation128BitUuids)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_data16_bit_uuids(&self) -> Result { + }} + #[inline] pub fn get_service_data16_bit_uuids(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ServiceData16BitUuids)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_data32_bit_uuids(&self) -> Result { + }} + #[inline] pub fn get_service_data32_bit_uuids(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ServiceData32BitUuids)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_data128_bit_uuids(&self) -> Result { + }} + #[inline] pub fn get_service_data128_bit_uuids(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ServiceData128BitUuids)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_public_target_address(&self) -> Result { + }} + #[inline] pub fn get_public_target_address(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PublicTargetAddress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_random_target_address(&self) -> Result { + }} + #[inline] pub fn get_random_target_address(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RandomTargetAddress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_appearance(&self) -> Result { + }} + #[inline] pub fn get_appearance(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Appearance)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_advertising_interval(&self) -> Result { + }} + #[inline] pub fn get_advertising_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AdvertisingInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_manufacturer_specific_data(&self) -> Result { + }} + #[inline] pub fn get_manufacturer_specific_data(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ManufacturerSpecificData)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut BluetoothLEAdvertisement) -> HRESULT, fn put_Advertisement(&self, value: *mut BluetoothLEAdvertisement) -> HRESULT, - fn get_BytePatterns(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT + fn get_BytePatterns(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IBluetoothLEAdvertisementFilter { - #[inline] pub unsafe fn get_advertisement(&self) -> Result> { + #[inline] pub fn get_advertisement(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Advertisement)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_advertisement(&self, value: &BluetoothLEAdvertisement) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_advertisement(&self, value: &BluetoothLEAdvertisement) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Advertisement)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_byte_patterns(&self) -> Result>> { + }} + #[inline] pub fn get_byte_patterns(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BytePatterns)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class BluetoothLEAdvertisementFilter: IBluetoothLEAdvertisementFilter} impl RtActivatable for BluetoothLEAdvertisementFilter {} @@ -11639,45 +11639,45 @@ RT_INTERFACE!{interface IBluetoothLEAdvertisementPublisher(IBluetoothLEAdvertise fn get_Advertisement(&self, out: *mut *mut BluetoothLEAdvertisement) -> HRESULT, fn Start(&self) -> HRESULT, fn Stop(&self) -> HRESULT, - fn add_StatusChanged(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StatusChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn add_StatusChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StatusChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IBluetoothLEAdvertisementPublisher { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_advertisement(&self) -> Result> { + }} + #[inline] pub fn get_advertisement(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Advertisement)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_status_changed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_status_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StatusChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_status_changed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_status_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StatusChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class BluetoothLEAdvertisementPublisher: IBluetoothLEAdvertisementPublisher} impl RtActivatable for BluetoothLEAdvertisementPublisher {} impl RtActivatable for BluetoothLEAdvertisementPublisher {} impl BluetoothLEAdvertisementPublisher { - #[inline] pub fn create(advertisement: &BluetoothLEAdvertisement) -> Result> { unsafe { + #[inline] pub fn create(advertisement: &BluetoothLEAdvertisement) -> Result> { >::get_activation_factory().create(advertisement) - }} + } } DEFINE_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]) [CLSID_BluetoothLEAdvertisementPublisher]); DEFINE_IID!(IID_IBluetoothLEAdvertisementPublisherFactory, 1549731422, 47203, 18817, 161, 175, 28, 84, 77, 139, 12, 13); @@ -11685,11 +11685,11 @@ RT_INTERFACE!{static interface IBluetoothLEAdvertisementPublisherFactory(IBlueto fn Create(&self, advertisement: *mut BluetoothLEAdvertisement, out: *mut *mut BluetoothLEAdvertisementPublisher) -> HRESULT }} impl IBluetoothLEAdvertisementPublisherFactory { - #[inline] pub unsafe fn create(&self, advertisement: &BluetoothLEAdvertisement) -> Result> { + #[inline] pub fn create(&self, advertisement: &BluetoothLEAdvertisement) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, advertisement as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -11700,16 +11700,16 @@ RT_INTERFACE!{interface IBluetoothLEAdvertisementPublisherStatusChangedEventArgs fn get_Error(&self, out: *mut super::BluetoothError) -> HRESULT }} impl IBluetoothLEAdvertisementPublisherStatusChangedEventArgs { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_error(&self) -> Result { + }} + #[inline] pub fn get_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Error)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class BluetoothLEAdvertisementPublisherStatusChangedEventArgs: IBluetoothLEAdvertisementPublisherStatusChangedEventArgs} DEFINE_IID!(IID_IBluetoothLEAdvertisementReceivedEventArgs, 664305119, 58774, 16830, 141, 67, 158, 103, 49, 212, 169, 19); @@ -11717,35 +11717,35 @@ RT_INTERFACE!{interface IBluetoothLEAdvertisementReceivedEventArgs(IBluetoothLEA fn get_RawSignalStrengthInDBm(&self, out: *mut i16) -> HRESULT, fn get_BluetoothAddress(&self, out: *mut u64) -> HRESULT, fn get_AdvertisementType(&self, out: *mut BluetoothLEAdvertisementType) -> HRESULT, - fn get_Timestamp(&self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_Advertisement(&self, out: *mut *mut BluetoothLEAdvertisement) -> HRESULT }} impl IBluetoothLEAdvertisementReceivedEventArgs { - #[inline] pub unsafe fn get_raw_signal_strength_in_dbm(&self) -> Result { + #[inline] pub fn get_raw_signal_strength_in_dbm(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RawSignalStrengthInDBm)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_bluetooth_address(&self) -> Result { + }} + #[inline] pub fn get_bluetooth_address(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BluetoothAddress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_advertisement_type(&self) -> Result { + }} + #[inline] pub fn get_advertisement_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AdvertisementType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_timestamp(&self) -> Result<::rt::gen::windows::foundation::DateTime> { + }} + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_advertisement(&self) -> Result> { + }} + #[inline] pub fn get_advertisement(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Advertisement)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class BluetoothLEAdvertisementReceivedEventArgs: IBluetoothLEAdvertisementReceivedEventArgs} RT_ENUM! { enum BluetoothLEAdvertisementType: i32 { @@ -11753,10 +11753,10 @@ RT_ENUM! { enum BluetoothLEAdvertisementType: i32 { }} 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(&self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn get_MaxSamplingInterval(&self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn get_MinOutOfRangeTimeout(&self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn get_MaxOutOfRangeTimeout(&self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_MinSamplingInterval(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_MaxSamplingInterval(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_MinOutOfRangeTimeout(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_MaxOutOfRangeTimeout(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn get_Status(&self, out: *mut BluetoothLEAdvertisementWatcherStatus) -> HRESULT, fn get_ScanningMode(&self, out: *mut BluetoothLEScanningMode) -> HRESULT, fn put_ScanningMode(&self, value: BluetoothLEScanningMode) -> HRESULT, @@ -11766,98 +11766,98 @@ RT_INTERFACE!{interface IBluetoothLEAdvertisementWatcher(IBluetoothLEAdvertiseme fn put_AdvertisementFilter(&self, value: *mut BluetoothLEAdvertisementFilter) -> HRESULT, fn Start(&self) -> HRESULT, fn Stop(&self) -> HRESULT, - fn add_Received(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Received(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_Stopped(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Stopped(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn add_Received(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Received(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Stopped(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Stopped(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IBluetoothLEAdvertisementWatcher { - #[inline] pub unsafe fn get_min_sampling_interval(&self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + #[inline] pub fn get_min_sampling_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinSamplingInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_sampling_interval(&self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + }} + #[inline] pub fn get_max_sampling_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxSamplingInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_out_of_range_timeout(&self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + }} + #[inline] pub fn get_min_out_of_range_timeout(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinOutOfRangeTimeout)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_out_of_range_timeout(&self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + }} + #[inline] pub fn get_max_out_of_range_timeout(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxOutOfRangeTimeout)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_scanning_mode(&self) -> Result { + }} + #[inline] pub fn get_scanning_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ScanningMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_scanning_mode(&self, value: BluetoothLEScanningMode) -> Result<()> { + }} + #[inline] pub fn set_scanning_mode(&self, value: BluetoothLEScanningMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ScanningMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_signal_strength_filter(&self) -> Result> { + }} + #[inline] pub fn get_signal_strength_filter(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SignalStrengthFilter)(self 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(&self, value: &super::BluetoothSignalStrengthFilter) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_signal_strength_filter(&self, value: &super::BluetoothSignalStrengthFilter) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SignalStrengthFilter)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_advertisement_filter(&self) -> Result> { + }} + #[inline] pub fn get_advertisement_filter(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AdvertisementFilter)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_advertisement_filter(&self, value: &BluetoothLEAdvertisementFilter) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_advertisement_filter(&self, value: &BluetoothLEAdvertisementFilter) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AdvertisementFilter)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_received(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_received(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Received)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_received(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_received(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Received)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_stopped(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_stopped(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Stopped)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_stopped(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_stopped(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Stopped)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class BluetoothLEAdvertisementWatcher: IBluetoothLEAdvertisementWatcher} impl RtActivatable for BluetoothLEAdvertisementWatcher {} impl RtActivatable for BluetoothLEAdvertisementWatcher {} impl BluetoothLEAdvertisementWatcher { - #[inline] pub fn create(advertisementFilter: &BluetoothLEAdvertisementFilter) -> Result> { unsafe { + #[inline] pub fn create(advertisementFilter: &BluetoothLEAdvertisementFilter) -> Result> { >::get_activation_factory().create(advertisementFilter) - }} + } } DEFINE_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]) [CLSID_BluetoothLEAdvertisementWatcher]); DEFINE_IID!(IID_IBluetoothLEAdvertisementWatcherFactory, 2595171670, 14764, 17726, 179, 42, 133, 198, 87, 224, 23, 241); @@ -11865,11 +11865,11 @@ RT_INTERFACE!{static interface IBluetoothLEAdvertisementWatcherFactory(IBluetoot fn Create(&self, advertisementFilter: *mut BluetoothLEAdvertisementFilter, out: *mut *mut BluetoothLEAdvertisementWatcher) -> HRESULT }} impl IBluetoothLEAdvertisementWatcherFactory { - #[inline] pub unsafe fn create(&self, advertisementFilter: &BluetoothLEAdvertisementFilter) -> Result> { + #[inline] pub fn create(&self, advertisementFilter: &BluetoothLEAdvertisementFilter) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, advertisementFilter as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -11879,11 +11879,11 @@ RT_INTERFACE!{interface IBluetoothLEAdvertisementWatcherStoppedEventArgs(IBlueto fn get_Error(&self, out: *mut super::BluetoothError) -> HRESULT }} impl IBluetoothLEAdvertisementWatcherStoppedEventArgs { - #[inline] pub unsafe fn get_error(&self) -> Result { + #[inline] pub fn get_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Error)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class BluetoothLEAdvertisementWatcherStoppedEventArgs: IBluetoothLEAdvertisementWatcherStoppedEventArgs} DEFINE_IID!(IID_IBluetoothLEManufacturerData, 2435693080, 26979, 17715, 176, 97, 70, 148, 218, 251, 52, 229); @@ -11894,32 +11894,32 @@ RT_INTERFACE!{interface IBluetoothLEManufacturerData(IBluetoothLEManufacturerDat #[cfg(feature="windows-storage")] fn put_Data(&self, value: *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT }} impl IBluetoothLEManufacturerData { - #[inline] pub unsafe fn get_company_id(&self) -> Result { + #[inline] pub fn get_company_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CompanyId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_company_id(&self, value: u16) -> Result<()> { + }} + #[inline] pub fn set_company_id(&self, value: u16) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CompanyId)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_data(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Data)(self 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_data(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_data(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Data)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class BluetoothLEManufacturerData: IBluetoothLEManufacturerData} impl RtActivatable for BluetoothLEManufacturerData {} impl RtActivatable for BluetoothLEManufacturerData {} impl BluetoothLEManufacturerData { - #[cfg(feature="windows-storage")] #[inline] pub fn create(companyId: u16, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn create(companyId: u16, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { >::get_activation_factory().create(companyId, data) - }} + } } DEFINE_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]) [CLSID_BluetoothLEManufacturerData]); DEFINE_IID!(IID_IBluetoothLEManufacturerDataFactory, 3231398392, 12698, 17438, 141, 229, 102, 168, 30, 135, 122, 108); @@ -11927,11 +11927,11 @@ RT_INTERFACE!{static interface IBluetoothLEManufacturerDataFactory(IBluetoothLEM #[cfg(feature="windows-storage")] fn Create(&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(&self, companyId: u16, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn create(&self, companyId: u16, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, companyId, data as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum BluetoothLEScanningMode: i32 { Passive (BluetoothLEScanningMode_Passive) = 0, Active (BluetoothLEScanningMode_Active) = 1, @@ -11948,40 +11948,40 @@ RT_INTERFACE!{interface IBluetoothLEAdvertisementPublisherTriggerDetails(IBlueto fn get_Error(&self, out: *mut super::BluetoothError) -> HRESULT }} impl IBluetoothLEAdvertisementPublisherTriggerDetails { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_error(&self) -> Result { + }} + #[inline] pub fn get_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Error)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class BluetoothLEAdvertisementPublisherTriggerDetails: IBluetoothLEAdvertisementPublisherTriggerDetails} 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(&self, out: *mut super::BluetoothError) -> HRESULT, - fn get_Advertisements(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_Advertisements(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_SignalStrengthFilter(&self, out: *mut *mut super::BluetoothSignalStrengthFilter) -> HRESULT }} impl IBluetoothLEAdvertisementWatcherTriggerDetails { - #[inline] pub unsafe fn get_error(&self) -> Result { + #[inline] pub fn get_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Error)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_advertisements(&self) -> Result>> { + }} + #[inline] pub fn get_advertisements(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Advertisements)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_signal_strength_filter(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_signal_strength_filter(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SignalStrengthFilter)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class BluetoothLEAdvertisementWatcherTriggerDetails: IBluetoothLEAdvertisementWatcherTriggerDetails} DEFINE_IID!(IID_IGattCharacteristicNotificationTriggerDetails, 2610969368, 4076, 17258, 147, 177, 244, 108, 105, 117, 50, 162); @@ -11990,40 +11990,40 @@ RT_INTERFACE!{interface IGattCharacteristicNotificationTriggerDetails(IGattChara #[cfg(feature="windows-storage")] fn get_Value(&self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT }} impl IGattCharacteristicNotificationTriggerDetails { - #[inline] pub unsafe fn get_characteristic(&self) -> Result> { + #[inline] pub fn get_characteristic(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Characteristic)(self 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_value(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_value(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class GattCharacteristicNotificationTriggerDetails: IGattCharacteristicNotificationTriggerDetails} DEFINE_IID!(IID_IGattCharacteristicNotificationTriggerDetails2, 1920618716, 38045, 17738, 177, 146, 152, 52, 103, 227, 213, 15); RT_INTERFACE!{interface IGattCharacteristicNotificationTriggerDetails2(IGattCharacteristicNotificationTriggerDetails2Vtbl): IInspectable(IInspectableVtbl) [IID_IGattCharacteristicNotificationTriggerDetails2] { fn get_Error(&self, out: *mut super::BluetoothError) -> HRESULT, fn get_EventTriggeringMode(&self, out: *mut BluetoothEventTriggeringMode) -> HRESULT, - fn get_ValueChangedEvents(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn get_ValueChangedEvents(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IGattCharacteristicNotificationTriggerDetails2 { - #[inline] pub unsafe fn get_error(&self) -> Result { + #[inline] pub fn get_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Error)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_event_triggering_mode(&self) -> Result { + }} + #[inline] pub fn get_event_triggering_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EventTriggeringMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_value_changed_events(&self) -> Result>> { + }} + #[inline] pub fn get_value_changed_events(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ValueChangedEvents)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IGattServiceProviderConnection, 2141305273, 12051, 16565, 149, 130, 142, 183, 142, 152, 239, 19); RT_INTERFACE!{interface IGattServiceProviderConnection(IGattServiceProviderConnectionVtbl): IInspectable(IInspectableVtbl) [IID_IGattServiceProviderConnection] { @@ -12032,50 +12032,50 @@ RT_INTERFACE!{interface IGattServiceProviderConnection(IGattServiceProviderConne fn Start(&self) -> HRESULT }} impl IGattServiceProviderConnection { - #[inline] pub unsafe fn get_trigger_id(&self) -> Result { + #[inline] pub fn get_trigger_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TriggerId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_service(&self) -> Result> { + }} + #[inline] pub fn get_service(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Service)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class GattServiceProviderConnection: IGattServiceProviderConnection} impl RtActivatable for GattServiceProviderConnection {} impl GattServiceProviderConnection { - #[inline] pub fn get_all_services() -> Result>> { unsafe { + #[inline] pub fn get_all_services() -> Result>>> { >::get_activation_factory().get_all_services() - }} + } } DEFINE_CLSID!(GattServiceProviderConnection(&[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,97,99,107,103,114,111,117,110,100,46,71,97,116,116,83,101,114,118,105,99,101,80,114,111,118,105,100,101,114,67,111,110,110,101,99,116,105,111,110,0]) [CLSID_GattServiceProviderConnection]); DEFINE_IID!(IID_IGattServiceProviderConnectionStatics, 1028693835, 2830, 17510, 184, 205, 110, 189, 218, 31, 161, 125); RT_INTERFACE!{static interface IGattServiceProviderConnectionStatics(IGattServiceProviderConnectionStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGattServiceProviderConnectionStatics] { - fn get_AllServices(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMapView) -> HRESULT + fn get_AllServices(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT }} impl IGattServiceProviderConnectionStatics { - #[inline] pub unsafe fn get_all_services(&self) -> Result>> { + #[inline] pub fn get_all_services(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AllServices)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IGattServiceProviderTriggerDetails, 2928412197, 1535, 19195, 177, 106, 222, 149, 243, 207, 1, 88); RT_INTERFACE!{interface IGattServiceProviderTriggerDetails(IGattServiceProviderTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IGattServiceProviderTriggerDetails] { fn get_Connection(&self, out: *mut *mut GattServiceProviderConnection) -> HRESULT }} impl IGattServiceProviderTriggerDetails { - #[inline] pub unsafe fn get_connection(&self) -> Result> { + #[inline] pub fn get_connection(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Connection)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class GattServiceProviderTriggerDetails: IGattServiceProviderTriggerDetails} DEFINE_IID!(IID_IRfcommConnectionTriggerDetails, 4179784525, 11836, 20220, 171, 89, 252, 92, 249, 111, 151, 227); @@ -12086,21 +12086,21 @@ RT_INTERFACE!{interface IRfcommConnectionTriggerDetails(IRfcommConnectionTrigger fn get_RemoteDevice(&self, out: *mut *mut super::BluetoothDevice) -> HRESULT }} impl IRfcommConnectionTriggerDetails { - #[cfg(feature="windows-networking")] #[inline] pub unsafe fn get_socket(&self) -> Result> { + #[cfg(feature="windows-networking")] #[inline] pub fn get_socket(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Socket)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_incoming(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_incoming(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Incoming)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_device(&self) -> Result> { + }} + #[inline] pub fn get_remote_device(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteDevice)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RfcommConnectionTriggerDetails: IRfcommConnectionTriggerDetails} DEFINE_IID!(IID_IRfcommInboundConnectionInformation, 1832809896, 21545, 16473, 146, 227, 30, 139, 101, 82, 135, 7); @@ -12115,33 +12115,33 @@ RT_INTERFACE!{interface IRfcommInboundConnectionInformation(IRfcommInboundConnec fn put_ServiceCapabilities(&self, value: super::BluetoothServiceCapabilities) -> HRESULT }} impl IRfcommInboundConnectionInformation { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_sdp_record(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_sdp_record(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SdpRecord)(self 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_sdp_record(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_sdp_record(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SdpRecord)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_local_service_id(&self) -> Result> { + }} + #[inline] pub fn get_local_service_id(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LocalServiceId)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_local_service_id(&self, value: &super::rfcomm::RfcommServiceId) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_local_service_id(&self, value: &super::rfcomm::RfcommServiceId) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LocalServiceId)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_capabilities(&self) -> Result { + }} + #[inline] pub fn get_service_capabilities(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ServiceCapabilities)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_service_capabilities(&self, value: super::BluetoothServiceCapabilities) -> Result<()> { + }} + #[inline] pub fn set_service_capabilities(&self, value: super::BluetoothServiceCapabilities) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ServiceCapabilities)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class RfcommInboundConnectionInformation: IRfcommInboundConnectionInformation} DEFINE_IID!(IID_IRfcommOutboundConnectionInformation, 2962301563, 62516, 19632, 153, 177, 74, 184, 206, 218, 237, 215); @@ -12150,15 +12150,15 @@ RT_INTERFACE!{interface IRfcommOutboundConnectionInformation(IRfcommOutboundConn fn put_RemoteServiceId(&self, value: *mut super::rfcomm::RfcommServiceId) -> HRESULT }} impl IRfcommOutboundConnectionInformation { - #[inline] pub unsafe fn get_remote_service_id(&self) -> Result> { + #[inline] pub fn get_remote_service_id(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteServiceId)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_remote_service_id(&self, value: &super::rfcomm::RfcommServiceId) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_remote_service_id(&self, value: &super::rfcomm::RfcommServiceId) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RemoteServiceId)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class RfcommOutboundConnectionInformation: IRfcommOutboundConnectionInformation} } // Windows.Devices.Bluetooth.Background @@ -12170,11 +12170,11 @@ RT_INTERFACE!{interface IDeviceAccessChangedEventArgs(IDeviceAccessChangedEventA fn get_Status(&self, out: *mut DeviceAccessStatus) -> HRESULT }} impl IDeviceAccessChangedEventArgs { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class DeviceAccessChangedEventArgs: IDeviceAccessChangedEventArgs} DEFINE_IID!(IID_IDeviceAccessChangedEventArgs2, 2186424930, 37707, 19248, 161, 120, 173, 195, 159, 47, 43, 227); @@ -12182,46 +12182,46 @@ RT_INTERFACE!{interface IDeviceAccessChangedEventArgs2(IDeviceAccessChangedEvent fn get_Id(&self, out: *mut HSTRING) -> HRESULT }} impl IDeviceAccessChangedEventArgs2 { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AccessChanged(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_AccessChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AccessChanged(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, fn get_CurrentStatus(&self, out: *mut DeviceAccessStatus) -> HRESULT }} impl IDeviceAccessInformation { - #[inline] pub unsafe fn add_access_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_access_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AccessChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_access_changed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_access_changed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AccessChanged)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_status(&self) -> Result { + }} + #[inline] pub fn get_current_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CurrentStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class DeviceAccessInformation: IDeviceAccessInformation} impl RtActivatable for DeviceAccessInformation {} impl DeviceAccessInformation { - #[inline] pub fn create_from_id(deviceId: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_from_id(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().create_from_id(deviceId) - }} - #[inline] pub fn create_from_device_class_id(deviceClassId: Guid) -> Result> { unsafe { + } + #[inline] pub fn create_from_device_class_id(deviceClassId: Guid) -> Result>> { >::get_activation_factory().create_from_device_class_id(deviceClassId) - }} - #[inline] pub fn create_from_device_class(deviceClass: DeviceClass) -> Result> { unsafe { + } + #[inline] pub fn create_from_device_class(deviceClass: DeviceClass) -> Result>> { >::get_activation_factory().create_from_device_class(deviceClass) - }} + } } DEFINE_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]) [CLSID_DeviceAccessInformation]); DEFINE_IID!(IID_IDeviceAccessInformationStatics, 1464587219, 24368, 17869, 138, 148, 114, 79, 229, 151, 48, 132); @@ -12231,21 +12231,21 @@ RT_INTERFACE!{static interface IDeviceAccessInformationStatics(IDeviceAccessInfo fn CreateFromDeviceClass(&self, deviceClass: DeviceClass, out: *mut *mut DeviceAccessInformation) -> HRESULT }} impl IDeviceAccessInformationStatics { - #[inline] pub unsafe fn create_from_id(&self, deviceId: &HStringArg) -> Result> { + #[inline] pub fn create_from_id(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromId)(self as *const _ as *mut _, deviceId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_from_device_class_id(&self, deviceClassId: Guid) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_from_device_class_id(&self, deviceClassId: Guid) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromDeviceClassId)(self as *const _ as *mut _, deviceClassId, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_from_device_class(&self, deviceClass: DeviceClass) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_from_device_class(&self, deviceClass: DeviceClass) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromDeviceClass)(self as *const _ as *mut _, deviceClass, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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, @@ -12258,11 +12258,11 @@ RT_INTERFACE!{interface IDeviceConnectionChangeTriggerDetails(IDeviceConnectionC fn get_DeviceId(&self, out: *mut HSTRING) -> HRESULT }} impl IDeviceConnectionChangeTriggerDetails { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class DeviceConnectionChangeTriggerDetails: IDeviceConnectionChangeTriggerDetails} DEFINE_IID!(IID_IDeviceDisconnectButtonClickedEventArgs, 2386867565, 63746, 18944, 181, 54, 243, 121, 146, 230, 162, 167); @@ -12270,11 +12270,11 @@ RT_INTERFACE!{interface IDeviceDisconnectButtonClickedEventArgs(IDeviceDisconnec fn get_Device(&self, out: *mut *mut DeviceInformation) -> HRESULT }} impl IDeviceDisconnectButtonClickedEventArgs { - #[inline] pub unsafe fn get_device(&self) -> Result> { + #[inline] pub fn get_device(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Device)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DeviceDisconnectButtonClickedEventArgs: IDeviceDisconnectButtonClickedEventArgs} DEFINE_IID!(IID_IDeviceInformation, 2879454101, 17304, 18589, 142, 68, 230, 19, 9, 39, 1, 31); @@ -12284,103 +12284,103 @@ RT_INTERFACE!{interface IDeviceInformation(IDeviceInformationVtbl): IInspectable fn get_IsEnabled(&self, out: *mut bool) -> HRESULT, fn get_IsDefault(&self, out: *mut bool) -> HRESULT, fn get_EnclosureLocation(&self, out: *mut *mut EnclosureLocation) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, + fn get_Properties(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT, fn Update(&self, updateInfo: *mut DeviceInformationUpdate) -> HRESULT, - fn GetThumbnailAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetGlyphThumbnailAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetThumbnailAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetGlyphThumbnailAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IDeviceInformation { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_name(&self) -> Result { + }} + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_default(&self) -> Result { + }} + #[inline] pub fn get_is_default(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDefault)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_enclosure_location(&self) -> Result> { + }} + #[inline] pub fn get_enclosure_location(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EnclosureLocation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn update(&self, updateInfo: &DeviceInformationUpdate) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn update(&self, updateInfo: &DeviceInformationUpdate) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Update)(self as *const _ as *mut _, updateInfo as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_thumbnail_async(&self) -> Result>> { + }} + #[inline] pub fn get_thumbnail_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetThumbnailAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_glyph_thumbnail_async(&self) -> Result>> { + }} + #[inline] pub fn get_glyph_thumbnail_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetGlyphThumbnailAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class DeviceInformation: IDeviceInformation} impl RtActivatable for DeviceInformation {} impl RtActivatable for DeviceInformation {} impl DeviceInformation { - #[inline] pub fn create_from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + #[inline] pub fn create_from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().create_from_id_async(deviceId) - }} - #[inline] pub fn create_from_id_async_additional_properties(deviceId: &HStringArg, additionalProperties: &super::super::foundation::collections::IIterable) -> Result>> { unsafe { + } + #[inline] pub fn create_from_id_async_additional_properties(deviceId: &HStringArg, additionalProperties: &foundation::collections::IIterable) -> Result>> { >::get_activation_factory().create_from_id_async_additional_properties(deviceId, additionalProperties) - }} - #[inline] pub fn find_all_async() -> Result>> { unsafe { + } + #[inline] pub fn find_all_async() -> Result>> { >::get_activation_factory().find_all_async() - }} - #[inline] pub fn find_all_async_device_class(deviceClass: DeviceClass) -> Result>> { unsafe { + } + #[inline] pub fn find_all_async_device_class(deviceClass: DeviceClass) -> Result>> { >::get_activation_factory().find_all_async_device_class(deviceClass) - }} - #[inline] pub fn find_all_async_aqs_filter(aqsFilter: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn find_all_async_aqs_filter(aqsFilter: &HStringArg) -> Result>> { >::get_activation_factory().find_all_async_aqs_filter(aqsFilter) - }} - #[inline] pub fn find_all_async_aqs_filter_and_additional_properties(aqsFilter: &HStringArg, additionalProperties: &super::super::foundation::collections::IIterable) -> Result>> { unsafe { + } + #[inline] pub fn find_all_async_aqs_filter_and_additional_properties(aqsFilter: &HStringArg, additionalProperties: &foundation::collections::IIterable) -> Result>> { >::get_activation_factory().find_all_async_aqs_filter_and_additional_properties(aqsFilter, additionalProperties) - }} - #[inline] pub fn create_watcher() -> Result> { unsafe { + } + #[inline] pub fn create_watcher() -> Result>> { >::get_activation_factory().create_watcher() - }} - #[inline] pub fn create_watcher_device_class(deviceClass: DeviceClass) -> Result> { unsafe { + } + #[inline] pub fn create_watcher_device_class(deviceClass: DeviceClass) -> Result>> { >::get_activation_factory().create_watcher_device_class(deviceClass) - }} - #[inline] pub fn create_watcher_aqs_filter(aqsFilter: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_watcher_aqs_filter(aqsFilter: &HStringArg) -> Result>> { >::get_activation_factory().create_watcher_aqs_filter(aqsFilter) - }} - #[inline] pub fn create_watcher_aqs_filter_and_additional_properties(aqsFilter: &HStringArg, additionalProperties: &super::super::foundation::collections::IIterable) -> Result> { unsafe { + } + #[inline] pub fn create_watcher_aqs_filter_and_additional_properties(aqsFilter: &HStringArg, additionalProperties: &foundation::collections::IIterable) -> Result>> { >::get_activation_factory().create_watcher_aqs_filter_and_additional_properties(aqsFilter, additionalProperties) - }} - #[inline] pub fn get_aqs_filter_from_device_class(deviceClass: DeviceClass) -> Result { unsafe { + } + #[inline] pub fn get_aqs_filter_from_device_class(deviceClass: DeviceClass) -> Result { >::get_activation_factory().get_aqs_filter_from_device_class(deviceClass) - }} - #[inline] pub fn create_from_id_async_with_kind_and_additional_properties(deviceId: &HStringArg, additionalProperties: &super::super::foundation::collections::IIterable, kind: DeviceInformationKind) -> Result>> { unsafe { + } + #[inline] pub fn create_from_id_async_with_kind_and_additional_properties(deviceId: &HStringArg, additionalProperties: &foundation::collections::IIterable, kind: DeviceInformationKind) -> Result>> { >::get_activation_factory().create_from_id_async_with_kind_and_additional_properties(deviceId, additionalProperties, kind) - }} - #[inline] pub fn find_all_async_with_kind_aqs_filter_and_additional_properties(aqsFilter: &HStringArg, additionalProperties: &super::super::foundation::collections::IIterable, kind: DeviceInformationKind) -> Result>> { unsafe { + } + #[inline] pub fn find_all_async_with_kind_aqs_filter_and_additional_properties(aqsFilter: &HStringArg, additionalProperties: &foundation::collections::IIterable, kind: DeviceInformationKind) -> Result>> { >::get_activation_factory().find_all_async_with_kind_aqs_filter_and_additional_properties(aqsFilter, additionalProperties, kind) - }} - #[inline] pub fn create_watcher_with_kind_aqs_filter_and_additional_properties(aqsFilter: &HStringArg, additionalProperties: &super::super::foundation::collections::IIterable, kind: DeviceInformationKind) -> Result> { unsafe { + } + #[inline] pub fn create_watcher_with_kind_aqs_filter_and_additional_properties(aqsFilter: &HStringArg, additionalProperties: &foundation::collections::IIterable, kind: DeviceInformationKind) -> Result>> { >::get_activation_factory().create_watcher_with_kind_aqs_filter_and_additional_properties(aqsFilter, additionalProperties, kind) - }} + } } DEFINE_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]) [CLSID_DeviceInformation]); DEFINE_IID!(IID_IDeviceInformation2, 4048987704, 31127, 18649, 161, 12, 38, 157, 70, 83, 63, 72); @@ -12389,51 +12389,51 @@ RT_INTERFACE!{interface IDeviceInformation2(IDeviceInformation2Vtbl): IInspectab fn get_Pairing(&self, out: *mut *mut DeviceInformationPairing) -> HRESULT }} impl IDeviceInformation2 { - #[inline] pub unsafe fn get_kind(&self) -> Result { + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pairing(&self) -> Result> { + }} + #[inline] pub fn get_pairing(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Pairing)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } -RT_CLASS!{class DeviceInformationCollection: super::super::foundation::collections::IVectorView} +RT_CLASS!{class DeviceInformationCollection: foundation::collections::IVectorView} 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(&self, pairingKindsSupported: DevicePairingKinds, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn PairWithProtectionLevelAsync(&self, pairingKindsSupported: DevicePairingKinds, minProtectionLevel: DevicePairingProtectionLevel, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn PairWithProtectionLevelAndSettingsAsync(&self, pairingKindsSupported: DevicePairingKinds, minProtectionLevel: DevicePairingProtectionLevel, devicePairingSettings: *mut IDevicePairingSettings, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_PairingRequested(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PairingRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn PairAsync(&self, pairingKindsSupported: DevicePairingKinds, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn PairWithProtectionLevelAsync(&self, pairingKindsSupported: DevicePairingKinds, minProtectionLevel: DevicePairingProtectionLevel, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn PairWithProtectionLevelAndSettingsAsync(&self, pairingKindsSupported: DevicePairingKinds, minProtectionLevel: DevicePairingProtectionLevel, devicePairingSettings: *mut IDevicePairingSettings, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_PairingRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PairingRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IDeviceInformationCustomPairing { - #[inline] pub unsafe fn pair_async(&self, pairingKindsSupported: DevicePairingKinds) -> Result>> { + #[inline] pub fn pair_async(&self, pairingKindsSupported: DevicePairingKinds) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PairAsync)(self as *const _ as *mut _, pairingKindsSupported, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn pair_with_protection_level_async(&self, pairingKindsSupported: DevicePairingKinds, minProtectionLevel: DevicePairingProtectionLevel) -> Result>> { + }} + #[inline] pub fn pair_with_protection_level_async(&self, pairingKindsSupported: DevicePairingKinds, minProtectionLevel: DevicePairingProtectionLevel) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PairWithProtectionLevelAsync)(self as *const _ as *mut _, 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(&self, pairingKindsSupported: DevicePairingKinds, minProtectionLevel: DevicePairingProtectionLevel, devicePairingSettings: &IDevicePairingSettings) -> Result>> { + }} + #[inline] pub fn pair_with_protection_level_and_settings_async(&self, pairingKindsSupported: DevicePairingKinds, minProtectionLevel: DevicePairingProtectionLevel, devicePairingSettings: &IDevicePairingSettings) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PairWithProtectionLevelAndSettingsAsync)(self as *const _ as *mut _, 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(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_pairing_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PairingRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pairing_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pairing_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PairingRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DeviceInformationCustomPairing: IDeviceInformationCustomPairing} RT_ENUM! { enum DeviceInformationKind: i32 { @@ -12443,189 +12443,189 @@ DEFINE_IID!(IID_IDeviceInformationPairing, 742877685, 63108, 16597, 132, 105, 23 RT_INTERFACE!{interface IDeviceInformationPairing(IDeviceInformationPairingVtbl): IInspectable(IInspectableVtbl) [IID_IDeviceInformationPairing] { fn get_IsPaired(&self, out: *mut bool) -> HRESULT, fn get_CanPair(&self, out: *mut bool) -> HRESULT, - fn PairAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn PairWithProtectionLevelAsync(&self, minProtectionLevel: DevicePairingProtectionLevel, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn PairAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn PairWithProtectionLevelAsync(&self, minProtectionLevel: DevicePairingProtectionLevel, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IDeviceInformationPairing { - #[inline] pub unsafe fn get_is_paired(&self) -> Result { + #[inline] pub fn get_is_paired(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPaired)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_pair(&self) -> Result { + }} + #[inline] pub fn get_can_pair(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanPair)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn pair_async(&self) -> Result>> { + }} + #[inline] pub fn pair_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PairAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn pair_with_protection_level_async(&self, minProtectionLevel: DevicePairingProtectionLevel) -> Result>> { + }} + #[inline] pub fn pair_with_protection_level_async(&self, minProtectionLevel: DevicePairingProtectionLevel) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PairWithProtectionLevelAsync)(self as *const _ as *mut _, minProtectionLevel, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class DeviceInformationPairing: IDeviceInformationPairing} impl RtActivatable for DeviceInformationPairing {} impl DeviceInformationPairing { - #[inline] pub fn try_register_for_all_inbound_pairing_requests(pairingKindsSupported: DevicePairingKinds) -> Result { unsafe { + #[inline] pub fn try_register_for_all_inbound_pairing_requests(pairingKindsSupported: DevicePairingKinds) -> Result { >::get_activation_factory().try_register_for_all_inbound_pairing_requests(pairingKindsSupported) - }} + } } DEFINE_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]) [CLSID_DeviceInformationPairing]); 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(&self, out: *mut DevicePairingProtectionLevel) -> HRESULT, fn get_Custom(&self, out: *mut *mut DeviceInformationCustomPairing) -> HRESULT, - fn PairWithProtectionLevelAndSettingsAsync(&self, minProtectionLevel: DevicePairingProtectionLevel, devicePairingSettings: *mut IDevicePairingSettings, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn UnpairAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn PairWithProtectionLevelAndSettingsAsync(&self, minProtectionLevel: DevicePairingProtectionLevel, devicePairingSettings: *mut IDevicePairingSettings, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn UnpairAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IDeviceInformationPairing2 { - #[inline] pub unsafe fn get_protection_level(&self) -> Result { + #[inline] pub fn get_protection_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProtectionLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_custom(&self) -> Result> { + }} + #[inline] pub fn get_custom(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Custom)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn pair_with_protection_level_and_settings_async(&self, minProtectionLevel: DevicePairingProtectionLevel, devicePairingSettings: &IDevicePairingSettings) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn pair_with_protection_level_and_settings_async(&self, minProtectionLevel: DevicePairingProtectionLevel, devicePairingSettings: &IDevicePairingSettings) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PairWithProtectionLevelAndSettingsAsync)(self as *const _ as *mut _, 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(&self) -> Result>> { + }} + #[inline] pub fn unpair_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UnpairAsync)(self as *const _ as *mut _, &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(&self, pairingKindsSupported: DevicePairingKinds, out: *mut bool) -> HRESULT }} impl IDeviceInformationPairingStatics { - #[inline] pub unsafe fn try_register_for_all_inbound_pairing_requests(&self, pairingKindsSupported: DevicePairingKinds) -> Result { + #[inline] pub fn try_register_for_all_inbound_pairing_requests(&self, pairingKindsSupported: DevicePairingKinds) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TryRegisterForAllInboundPairingRequests)(self as *const _ as *mut _, pairingKindsSupported, &mut out); if hr == S_OK { Ok(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(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CreateFromIdAsyncAdditionalProperties(&self, deviceId: HSTRING, additionalProperties: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FindAllAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FindAllAsyncDeviceClass(&self, deviceClass: DeviceClass, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FindAllAsyncAqsFilter(&self, aqsFilter: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FindAllAsyncAqsFilterAndAdditionalProperties(&self, aqsFilter: HSTRING, additionalProperties: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateFromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreateFromIdAsyncAdditionalProperties(&self, deviceId: HSTRING, additionalProperties: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn FindAllAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn FindAllAsyncDeviceClass(&self, deviceClass: DeviceClass, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn FindAllAsyncAqsFilter(&self, aqsFilter: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn FindAllAsyncAqsFilterAndAdditionalProperties(&self, aqsFilter: HSTRING, additionalProperties: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn CreateWatcher(&self, out: *mut *mut DeviceWatcher) -> HRESULT, fn CreateWatcherDeviceClass(&self, deviceClass: DeviceClass, out: *mut *mut DeviceWatcher) -> HRESULT, fn CreateWatcherAqsFilter(&self, aqsFilter: HSTRING, out: *mut *mut DeviceWatcher) -> HRESULT, - fn CreateWatcherAqsFilterAndAdditionalProperties(&self, aqsFilter: HSTRING, additionalProperties: *mut super::super::foundation::collections::IIterable, out: *mut *mut DeviceWatcher) -> HRESULT + fn CreateWatcherAqsFilterAndAdditionalProperties(&self, aqsFilter: HSTRING, additionalProperties: *mut foundation::collections::IIterable, out: *mut *mut DeviceWatcher) -> HRESULT }} impl IDeviceInformationStatics { - #[inline] pub unsafe fn create_from_id_async(&self, deviceId: &HStringArg) -> Result>> { + #[inline] pub fn create_from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromIdAsync)(self as *const _ as *mut _, 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(&self, deviceId: &HStringArg, additionalProperties: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn create_from_id_async_additional_properties(&self, deviceId: &HStringArg, additionalProperties: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromIdAsyncAdditionalProperties)(self as *const _ as *mut _, 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(&self) -> Result>> { + }} + #[inline] pub fn find_all_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_all_async_device_class(&self, deviceClass: DeviceClass) -> Result>> { + }} + #[inline] pub fn find_all_async_device_class(&self, deviceClass: DeviceClass) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllAsyncDeviceClass)(self as *const _ as *mut _, deviceClass, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_all_async_aqs_filter(&self, aqsFilter: &HStringArg) -> Result>> { + }} + #[inline] pub fn find_all_async_aqs_filter(&self, aqsFilter: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllAsyncAqsFilter)(self as *const _ as *mut _, 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(&self, aqsFilter: &HStringArg, additionalProperties: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn find_all_async_aqs_filter_and_additional_properties(&self, aqsFilter: &HStringArg, additionalProperties: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllAsyncAqsFilterAndAdditionalProperties)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[inline] pub fn create_watcher(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWatcher)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_watcher_device_class(&self, deviceClass: DeviceClass) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_watcher_device_class(&self, deviceClass: DeviceClass) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWatcherDeviceClass)(self as *const _ as *mut _, deviceClass, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_watcher_aqs_filter(&self, aqsFilter: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_watcher_aqs_filter(&self, aqsFilter: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWatcherAqsFilter)(self 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_aqs_filter_and_additional_properties(&self, aqsFilter: &HStringArg, additionalProperties: &super::super::foundation::collections::IIterable) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_watcher_aqs_filter_and_additional_properties(&self, aqsFilter: &HStringArg, additionalProperties: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWatcherAqsFilterAndAdditionalProperties)(self as *const _ as *mut _, aqsFilter.get(), additionalProperties as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, deviceClass: DeviceClass, out: *mut HSTRING) -> HRESULT, - fn CreateFromIdAsyncWithKindAndAdditionalProperties(&self, deviceId: HSTRING, additionalProperties: *mut super::super::foundation::collections::IIterable, kind: DeviceInformationKind, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FindAllAsyncWithKindAqsFilterAndAdditionalProperties(&self, aqsFilter: HSTRING, additionalProperties: *mut super::super::foundation::collections::IIterable, kind: DeviceInformationKind, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CreateWatcherWithKindAqsFilterAndAdditionalProperties(&self, aqsFilter: HSTRING, additionalProperties: *mut super::super::foundation::collections::IIterable, kind: DeviceInformationKind, out: *mut *mut DeviceWatcher) -> HRESULT + fn CreateFromIdAsyncWithKindAndAdditionalProperties(&self, deviceId: HSTRING, additionalProperties: *mut foundation::collections::IIterable, kind: DeviceInformationKind, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn FindAllAsyncWithKindAqsFilterAndAdditionalProperties(&self, aqsFilter: HSTRING, additionalProperties: *mut foundation::collections::IIterable, kind: DeviceInformationKind, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreateWatcherWithKindAqsFilterAndAdditionalProperties(&self, aqsFilter: HSTRING, additionalProperties: *mut foundation::collections::IIterable, kind: DeviceInformationKind, out: *mut *mut DeviceWatcher) -> HRESULT }} impl IDeviceInformationStatics2 { - #[inline] pub unsafe fn get_aqs_filter_from_device_class(&self, deviceClass: DeviceClass) -> Result { + #[inline] pub fn get_aqs_filter_from_device_class(&self, deviceClass: DeviceClass) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAqsFilterFromDeviceClass)(self as *const _ as *mut _, 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(&self, deviceId: &HStringArg, additionalProperties: &super::super::foundation::collections::IIterable, kind: DeviceInformationKind) -> Result>> { + }} + #[inline] pub fn create_from_id_async_with_kind_and_additional_properties(&self, deviceId: &HStringArg, additionalProperties: &foundation::collections::IIterable, kind: DeviceInformationKind) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromIdAsyncWithKindAndAdditionalProperties)(self as *const _ as *mut _, 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(&self, aqsFilter: &HStringArg, additionalProperties: &super::super::foundation::collections::IIterable, kind: DeviceInformationKind) -> Result>> { + }} + #[inline] pub fn find_all_async_with_kind_aqs_filter_and_additional_properties(&self, aqsFilter: &HStringArg, additionalProperties: &foundation::collections::IIterable, kind: DeviceInformationKind) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllAsyncWithKindAqsFilterAndAdditionalProperties)(self as *const _ as *mut _, 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(&self, aqsFilter: &HStringArg, additionalProperties: &super::super::foundation::collections::IIterable, kind: DeviceInformationKind) -> Result> { + }} + #[inline] pub fn create_watcher_with_kind_aqs_filter_and_additional_properties(&self, aqsFilter: &HStringArg, additionalProperties: &foundation::collections::IIterable, kind: DeviceInformationKind) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWatcherWithKindAqsFilterAndAdditionalProperties)(self as *const _ as *mut _, aqsFilter.get(), additionalProperties as *const _ as *mut _, kind, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut HSTRING) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT + fn get_Properties(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT }} impl IDeviceInformationUpdate { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DeviceInformationUpdate: IDeviceInformationUpdate} DEFINE_IID!(IID_IDeviceInformationUpdate2, 1570575500, 43123, 18526, 186, 166, 170, 98, 7, 136, 227, 204); @@ -12633,11 +12633,11 @@ RT_INTERFACE!{interface IDeviceInformationUpdate2(IDeviceInformationUpdate2Vtbl) fn get_Kind(&self, out: *mut DeviceInformationKind) -> HRESULT }} impl IDeviceInformationUpdate2 { - #[inline] pub unsafe fn get_kind(&self) -> Result { + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(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, @@ -12652,37 +12652,37 @@ RT_INTERFACE!{interface IDevicePairingRequestedEventArgs(IDevicePairingRequested fn get_Pin(&self, out: *mut HSTRING) -> HRESULT, fn Accept(&self) -> HRESULT, fn AcceptWithPin(&self, pin: HSTRING) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IDevicePairingRequestedEventArgs { - #[inline] pub unsafe fn get_device_information(&self) -> Result> { + #[inline] pub fn get_device_information(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceInformation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pairing_kind(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_pairing_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PairingKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pin(&self) -> Result { + }} + #[inline] pub fn get_pin(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Pin)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn accept(&self) -> Result<()> { + }} + #[inline] pub fn accept(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Accept)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn accept_with_pin(&self, pin: &HStringArg) -> Result<()> { + }} + #[inline] pub fn accept_with_pin(&self, pin: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AcceptWithPin)(self as *const _ as *mut _, pin.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DevicePairingRequestedEventArgs: IDevicePairingRequestedEventArgs} DEFINE_IID!(IID_IDevicePairingResult, 120259263, 56725, 16421, 155, 55, 222, 81, 173, 186, 55, 183); @@ -12691,16 +12691,16 @@ RT_INTERFACE!{interface IDevicePairingResult(IDevicePairingResultVtbl): IInspect fn get_ProtectionLevelUsed(&self, out: *mut DevicePairingProtectionLevel) -> HRESULT }} impl IDevicePairingResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_protection_level_used(&self) -> Result { + }} + #[inline] pub fn get_protection_level_used(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProtectionLevelUsed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class DevicePairingResult: IDevicePairingResult} RT_ENUM! { enum DevicePairingResultStatus: i32 { @@ -12714,91 +12714,91 @@ DEFINE_IID!(IID_IDevicePicker, 2224650914, 842, 17472, 136, 19, 125, 11, 212, 12 RT_INTERFACE!{interface IDevicePicker(IDevicePickerVtbl): IInspectable(IInspectableVtbl) [IID_IDevicePicker] { fn get_Filter(&self, out: *mut *mut DevicePickerFilter) -> HRESULT, fn get_Appearance(&self, out: *mut *mut DevicePickerAppearance) -> HRESULT, - fn get_RequestedProperties(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn add_DeviceSelected(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DeviceSelected(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_DisconnectButtonClicked(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DisconnectButtonClicked(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_DevicePickerDismissed(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DevicePickerDismissed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn Show(&self, selection: super::super::foundation::Rect) -> HRESULT, + fn get_RequestedProperties(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn add_DeviceSelected(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DeviceSelected(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_DisconnectButtonClicked(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DisconnectButtonClicked(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_DevicePickerDismissed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DevicePickerDismissed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn Show(&self, selection: foundation::Rect) -> HRESULT, #[cfg(not(feature="windows-ui"))] fn __Dummy10(&self) -> (), - #[cfg(feature="windows-ui")] fn ShowWithPlacement(&self, selection: super::super::foundation::Rect, placement: super::super::ui::popups::Placement) -> HRESULT, - fn PickSingleDeviceAsync(&self, selection: super::super::foundation::Rect, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-ui")] fn ShowWithPlacement(&self, selection: foundation::Rect, placement: super::super::ui::popups::Placement) -> HRESULT, + fn PickSingleDeviceAsync(&self, selection: foundation::Rect, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-ui"))] fn __Dummy12(&self) -> (), - #[cfg(feature="windows-ui")] fn PickSingleDeviceAsyncWithPlacement(&self, selection: super::super::foundation::Rect, placement: super::super::ui::popups::Placement, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-ui")] fn PickSingleDeviceAsyncWithPlacement(&self, selection: foundation::Rect, placement: super::super::ui::popups::Placement, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn Hide(&self) -> HRESULT, fn SetDisplayStatus(&self, device: *mut DeviceInformation, status: HSTRING, options: DevicePickerDisplayStatusOptions) -> HRESULT }} impl IDevicePicker { - #[inline] pub unsafe fn get_filter(&self) -> Result> { + #[inline] pub fn get_filter(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Filter)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_appearance(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_appearance(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Appearance)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_requested_properties(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_requested_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RequestedProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_device_selected(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_device_selected(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DeviceSelected)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_device_selected(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_device_selected(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DeviceSelected)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_disconnect_button_clicked(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_disconnect_button_clicked(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DisconnectButtonClicked)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_disconnect_button_clicked(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_disconnect_button_clicked(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DisconnectButtonClicked)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_device_picker_dismissed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_device_picker_dismissed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DevicePickerDismissed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_device_picker_dismissed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_device_picker_dismissed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DevicePickerDismissed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn show(&self, selection: super::super::foundation::Rect) -> Result<()> { + }} + #[inline] pub fn show(&self, selection: foundation::Rect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Show)(self as *const _ as *mut _, selection); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn show_with_placement(&self, selection: super::super::foundation::Rect, placement: super::super::ui::popups::Placement) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn show_with_placement(&self, selection: foundation::Rect, placement: super::super::ui::popups::Placement) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ShowWithPlacement)(self as *const _ as *mut _, selection, placement); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn pick_single_device_async(&self, selection: super::super::foundation::Rect) -> Result>> { + }} + #[inline] pub fn pick_single_device_async(&self, selection: foundation::Rect) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PickSingleDeviceAsync)(self as *const _ as *mut _, 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(&self, selection: super::super::foundation::Rect, placement: super::super::ui::popups::Placement) -> Result>> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn pick_single_device_async_with_placement(&self, selection: foundation::Rect, placement: super::super::ui::popups::Placement) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PickSingleDeviceAsyncWithPlacement)(self as *const _ as *mut _, selection, placement, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn hide(&self) -> Result<()> { + }} + #[inline] pub fn hide(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Hide)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_status(&self, device: &DeviceInformation, status: &HStringArg, options: DevicePickerDisplayStatusOptions) -> Result<()> { + }} + #[inline] pub fn set_display_status(&self, device: &DeviceInformation, status: &HStringArg, options: DevicePickerDisplayStatusOptions) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetDisplayStatus)(self as *const _ as *mut _, device as *const _ as *mut _, status.get(), options); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DevicePicker: IDevicePicker} impl RtActivatable for DevicePicker {} @@ -12821,69 +12821,69 @@ RT_INTERFACE!{interface IDevicePickerAppearance(IDevicePickerAppearanceVtbl): II #[cfg(feature="windows-ui")] fn put_SelectedAccentColor(&self, value: super::super::ui::Color) -> HRESULT }} impl IDevicePickerAppearance { - #[inline] pub unsafe fn get_title(&self) -> Result { + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_title(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_title(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Title)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_foreground_color(&self) -> Result { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_foreground_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ForegroundColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn set_foreground_color(&self, value: super::super::ui::Color) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_foreground_color(&self, value: super::super::ui::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ForegroundColor)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_background_color(&self) -> Result { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_background_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BackgroundColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn set_background_color(&self, value: super::super::ui::Color) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_background_color(&self, value: super::super::ui::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BackgroundColor)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_accent_color(&self) -> Result { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_accent_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AccentColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn set_accent_color(&self, value: super::super::ui::Color) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_accent_color(&self, value: super::super::ui::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AccentColor)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_selected_foreground_color(&self) -> Result { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_selected_foreground_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SelectedForegroundColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn set_selected_foreground_color(&self, value: super::super::ui::Color) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_selected_foreground_color(&self, value: super::super::ui::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SelectedForegroundColor)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_selected_background_color(&self) -> Result { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_selected_background_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SelectedBackgroundColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn set_selected_background_color(&self, value: super::super::ui::Color) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_selected_background_color(&self, value: super::super::ui::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SelectedBackgroundColor)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_selected_accent_color(&self) -> Result { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_selected_accent_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SelectedAccentColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn set_selected_accent_color(&self, value: super::super::ui::Color) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_selected_accent_color(&self, value: super::super::ui::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SelectedAccentColor)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DevicePickerAppearance: IDevicePickerAppearance} RT_ENUM! { enum DevicePickerDisplayStatusOptions: u32 { @@ -12891,20 +12891,20 @@ RT_ENUM! { enum DevicePickerDisplayStatusOptions: u32 { }} 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_SupportedDeviceSelectors(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_SupportedDeviceClasses(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_SupportedDeviceSelectors(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IDevicePickerFilter { - #[inline] pub unsafe fn get_supported_device_classes(&self) -> Result>> { + #[inline] pub fn get_supported_device_classes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedDeviceClasses)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_device_selectors(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_supported_device_selectors(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedDeviceSelectors)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DevicePickerFilter: IDevicePickerFilter} DEFINE_IID!(IID_IDeviceSelectedEventArgs, 647944926, 7471, 18752, 132, 2, 65, 86, 184, 29, 60, 119); @@ -12912,11 +12912,11 @@ RT_INTERFACE!{interface IDeviceSelectedEventArgs(IDeviceSelectedEventArgsVtbl): fn get_SelectedDevice(&self, out: *mut *mut DeviceInformation) -> HRESULT }} impl IDeviceSelectedEventArgs { - #[inline] pub unsafe fn get_selected_device(&self) -> Result> { + #[inline] pub fn get_selected_device(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SelectedDevice)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DeviceSelectedEventArgs: IDeviceSelectedEventArgs} #[cfg(feature="windows-storage")] RT_CLASS!{class DeviceThumbnail: super::super::storage::streams::IRandomAccessStreamWithContentType} @@ -12926,11 +12926,11 @@ RT_INTERFACE!{interface IDeviceUnpairingResult(IDeviceUnpairingResultVtbl): IIns fn get_Status(&self, out: *mut DeviceUnpairingResultStatus) -> HRESULT }} impl IDeviceUnpairingResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class DeviceUnpairingResult: IDeviceUnpairingResult} RT_ENUM! { enum DeviceUnpairingResultStatus: i32 { @@ -12938,91 +12938,91 @@ RT_ENUM! { enum DeviceUnpairingResultStatus: i32 { }} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Added(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Updated(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Updated(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Removed(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Removed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_EnumerationCompleted(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_EnumerationCompleted(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Stopped(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Stopped(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Added(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Added(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Updated(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Updated(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Removed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Removed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_EnumerationCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnumerationCompleted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Stopped(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Stopped(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_Status(&self, out: *mut DeviceWatcherStatus) -> HRESULT, fn Start(&self) -> HRESULT, fn Stop(&self) -> HRESULT }} impl IDeviceWatcher { - #[inline] pub unsafe fn add_added(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_added(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Added)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_added(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_added(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Added)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_updated(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_updated(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Updated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_updated(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_updated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Updated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_removed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_removed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Removed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_removed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_removed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Removed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_enumeration_completed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_enumeration_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_EnumerationCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_enumeration_completed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_enumeration_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_EnumerationCompleted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_stopped(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_stopped(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Stopped)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_stopped(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_stopped(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Stopped)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DeviceWatcher: IDeviceWatcher} 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(&self, requestedEventKinds: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::applicationmodel::background::DeviceWatcherTrigger) -> HRESULT + #[cfg(feature="windows-applicationmodel")] fn GetBackgroundTrigger(&self, requestedEventKinds: *mut 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(&self, requestedEventKinds: &super::super::foundation::collections::IIterable) -> Result> { + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn get_background_trigger(&self, requestedEventKinds: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetBackgroundTrigger)(self as *const _ as *mut _, requestedEventKinds as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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] { @@ -13031,21 +13031,21 @@ RT_INTERFACE!{interface IDeviceWatcherEvent(IDeviceWatcherEventVtbl): IInspectab fn get_DeviceInformationUpdate(&self, out: *mut *mut DeviceInformationUpdate) -> HRESULT }} impl IDeviceWatcherEvent { - #[inline] pub unsafe fn get_kind(&self) -> Result { + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_information(&self) -> Result> { + }} + #[inline] pub fn get_device_information(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceInformation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_information_update(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_device_information_update(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceInformationUpdate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DeviceWatcherEvent: IDeviceWatcherEvent} RT_ENUM! { enum DeviceWatcherEventKind: i32 { @@ -13056,14 +13056,14 @@ RT_ENUM! { enum DeviceWatcherStatus: i32 { }} 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_DeviceWatcherEvents(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IDeviceWatcherTriggerDetails { - #[inline] pub unsafe fn get_device_watcher_events(&self) -> Result>> { + #[inline] pub fn get_device_watcher_events(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceWatcherEvents)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DeviceWatcherTriggerDetails: IDeviceWatcherTriggerDetails} DEFINE_IID!(IID_IEnclosureLocation, 1110706727, 22544, 17820, 170, 187, 198, 94, 31, 129, 62, 207); @@ -13073,21 +13073,21 @@ RT_INTERFACE!{interface IEnclosureLocation(IEnclosureLocationVtbl): IInspectable fn get_Panel(&self, out: *mut Panel) -> HRESULT }} impl IEnclosureLocation { - #[inline] pub unsafe fn get_in_dock(&self) -> Result { + #[inline] pub fn get_in_dock(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InDock)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_in_lid(&self) -> Result { + }} + #[inline] pub fn get_in_lid(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InLid)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_panel(&self) -> Result { + }} + #[inline] pub fn get_panel(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Panel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class EnclosureLocation: IEnclosureLocation} DEFINE_IID!(IID_IEnclosureLocation2, 679844187, 57469, 18525, 138, 158, 189, 242, 154, 239, 79, 102); @@ -13095,11 +13095,11 @@ RT_INTERFACE!{interface IEnclosureLocation2(IEnclosureLocation2Vtbl): IInspectab fn get_RotationAngleInDegreesClockwise(&self, out: *mut u32) -> HRESULT }} impl IEnclosureLocation2 { - #[inline] pub unsafe fn get_rotation_angle_in_degrees_clockwise(&self) -> Result { + #[inline] pub fn get_rotation_angle_in_degrees_clockwise(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RotationAngleInDegreesClockwise)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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, @@ -13110,85 +13110,85 @@ DEFINE_IID!(IID_IPnpObject, 2512806488, 29499, 19087, 147, 163, 219, 7, 138, 200 RT_INTERFACE!{interface IPnpObject(IPnpObjectVtbl): IInspectable(IInspectableVtbl) [IID_IPnpObject] { fn get_Type(&self, out: *mut PnpObjectType) -> HRESULT, fn get_Id(&self, out: *mut HSTRING) -> HRESULT, - fn get_Properties(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMapView) -> HRESULT, + fn get_Properties(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT, fn Update(&self, updateInfo: *mut PnpObjectUpdate) -> HRESULT }} impl IPnpObject { - #[inline] pub unsafe fn get_type(&self) -> Result { + #[inline] pub fn get_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Type)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&self) -> Result { + }} + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn update(&self, updateInfo: &PnpObjectUpdate) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn update(&self, updateInfo: &PnpObjectUpdate) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Update)(self as *const _ as *mut _, updateInfo as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PnpObject: IPnpObject} impl RtActivatable for PnpObject {} impl PnpObject { - #[inline] pub fn create_from_id_async(type_: PnpObjectType, id: &HStringArg, requestedProperties: &::rt::gen::windows::foundation::collections::IIterable) -> Result>> { unsafe { + #[inline] pub fn create_from_id_async(type_: PnpObjectType, id: &HStringArg, requestedProperties: &foundation::collections::IIterable) -> Result>> { >::get_activation_factory().create_from_id_async(type_, id, requestedProperties) - }} - #[inline] pub fn find_all_async(type_: PnpObjectType, requestedProperties: &::rt::gen::windows::foundation::collections::IIterable) -> Result>> { unsafe { + } + #[inline] pub fn find_all_async(type_: PnpObjectType, requestedProperties: &foundation::collections::IIterable) -> Result>> { >::get_activation_factory().find_all_async(type_, requestedProperties) - }} - #[inline] pub fn find_all_async_aqs_filter(type_: PnpObjectType, requestedProperties: &::rt::gen::windows::foundation::collections::IIterable, aqsFilter: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn find_all_async_aqs_filter(type_: PnpObjectType, requestedProperties: &foundation::collections::IIterable, aqsFilter: &HStringArg) -> Result>> { >::get_activation_factory().find_all_async_aqs_filter(type_, requestedProperties, aqsFilter) - }} - #[inline] pub fn create_watcher(type_: PnpObjectType, requestedProperties: &::rt::gen::windows::foundation::collections::IIterable) -> Result> { unsafe { + } + #[inline] pub fn create_watcher(type_: PnpObjectType, requestedProperties: &foundation::collections::IIterable) -> Result>> { >::get_activation_factory().create_watcher(type_, requestedProperties) - }} - #[inline] pub fn create_watcher_aqs_filter(type_: PnpObjectType, requestedProperties: &::rt::gen::windows::foundation::collections::IIterable, aqsFilter: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_watcher_aqs_filter(type_: PnpObjectType, requestedProperties: &foundation::collections::IIterable, aqsFilter: &HStringArg) -> Result>> { >::get_activation_factory().create_watcher_aqs_filter(type_, requestedProperties, aqsFilter) - }} + } } DEFINE_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]) [CLSID_PnpObject]); -RT_CLASS!{class PnpObjectCollection: ::rt::gen::windows::foundation::collections::IVectorView} +RT_CLASS!{class PnpObjectCollection: foundation::collections::IVectorView} 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(&self, type_: PnpObjectType, id: HSTRING, requestedProperties: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn FindAllAsync(&self, type_: PnpObjectType, requestedProperties: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn FindAllAsyncAqsFilter(&self, type_: PnpObjectType, requestedProperties: *mut ::rt::gen::windows::foundation::collections::IIterable, aqsFilter: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn CreateWatcher(&self, type_: PnpObjectType, requestedProperties: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut PnpObjectWatcher) -> HRESULT, - fn CreateWatcherAqsFilter(&self, type_: PnpObjectType, requestedProperties: *mut ::rt::gen::windows::foundation::collections::IIterable, aqsFilter: HSTRING, out: *mut *mut PnpObjectWatcher) -> HRESULT + fn CreateFromIdAsync(&self, type_: PnpObjectType, id: HSTRING, requestedProperties: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn FindAllAsync(&self, type_: PnpObjectType, requestedProperties: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn FindAllAsyncAqsFilter(&self, type_: PnpObjectType, requestedProperties: *mut foundation::collections::IIterable, aqsFilter: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreateWatcher(&self, type_: PnpObjectType, requestedProperties: *mut foundation::collections::IIterable, out: *mut *mut PnpObjectWatcher) -> HRESULT, + fn CreateWatcherAqsFilter(&self, type_: PnpObjectType, requestedProperties: *mut foundation::collections::IIterable, aqsFilter: HSTRING, out: *mut *mut PnpObjectWatcher) -> HRESULT }} impl IPnpObjectStatics { - #[inline] pub unsafe fn create_from_id_async(&self, type_: PnpObjectType, id: &HStringArg, requestedProperties: &::rt::gen::windows::foundation::collections::IIterable) -> Result>> { + #[inline] pub fn create_from_id_async(&self, type_: PnpObjectType, id: &HStringArg, requestedProperties: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromIdAsync)(self as *const _ as *mut _, 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(&self, type_: PnpObjectType, requestedProperties: &::rt::gen::windows::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn find_all_async(&self, type_: PnpObjectType, requestedProperties: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllAsync)(self as *const _ as *mut _, 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(&self, type_: PnpObjectType, requestedProperties: &::rt::gen::windows::foundation::collections::IIterable, aqsFilter: &HStringArg) -> Result>> { + }} + #[inline] pub fn find_all_async_aqs_filter(&self, type_: PnpObjectType, requestedProperties: &foundation::collections::IIterable, aqsFilter: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllAsyncAqsFilter)(self as *const _ as *mut _, 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(&self, type_: PnpObjectType, requestedProperties: &::rt::gen::windows::foundation::collections::IIterable) -> Result> { + }} + #[inline] pub fn create_watcher(&self, type_: PnpObjectType, requestedProperties: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWatcher)(self as *const _ as *mut _, 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(&self, type_: PnpObjectType, requestedProperties: &::rt::gen::windows::foundation::collections::IIterable, aqsFilter: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_watcher_aqs_filter(&self, type_: PnpObjectType, requestedProperties: &foundation::collections::IIterable, aqsFilter: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWatcherAqsFilter)(self as *const _ as *mut _, type_, requestedProperties as *const _ as *mut _, aqsFilter.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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, @@ -13197,101 +13197,101 @@ DEFINE_IID!(IID_IPnpObjectUpdate, 1868163090, 30, 18500, 188, 198, 67, 40, 134, RT_INTERFACE!{interface IPnpObjectUpdate(IPnpObjectUpdateVtbl): IInspectable(IInspectableVtbl) [IID_IPnpObjectUpdate] { fn get_Type(&self, out: *mut PnpObjectType) -> HRESULT, fn get_Id(&self, out: *mut HSTRING) -> HRESULT, - fn get_Properties(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMapView) -> HRESULT + fn get_Properties(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT }} impl IPnpObjectUpdate { - #[inline] pub unsafe fn get_type(&self) -> Result { + #[inline] pub fn get_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Type)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&self) -> Result { + }} + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PnpObjectUpdate: IPnpObjectUpdate} 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(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Added(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_Updated(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Updated(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_Removed(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Removed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_EnumerationCompleted(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_EnumerationCompleted(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_Stopped(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Stopped(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_Added(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Added(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Updated(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Updated(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Removed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Removed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_EnumerationCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnumerationCompleted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Stopped(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Stopped(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_Status(&self, out: *mut super::DeviceWatcherStatus) -> HRESULT, fn Start(&self) -> HRESULT, fn Stop(&self) -> HRESULT }} impl IPnpObjectWatcher { - #[inline] pub unsafe fn add_added(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub fn add_added(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Added)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_added(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_added(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Added)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_updated(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_updated(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Updated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_updated(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_updated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Updated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_removed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_removed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Removed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_removed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_removed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Removed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_enumeration_completed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_enumeration_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_EnumerationCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_enumeration_completed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_enumeration_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_EnumerationCompleted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_stopped(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_stopped(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Stopped)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_stopped(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_stopped(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Stopped)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PnpObjectWatcher: IPnpObjectWatcher} } // Windows.Devices.Enumeration.Pnp @@ -13310,34 +13310,34 @@ RT_INTERFACE!{interface ICivicAddress(ICivicAddressVtbl): IInspectable(IInspecta fn get_State(&self, out: *mut HSTRING) -> HRESULT, fn get_City(&self, out: *mut HSTRING) -> HRESULT, fn get_PostalCode(&self, out: *mut HSTRING) -> HRESULT, - fn get_Timestamp(&self, out: *mut super::super::foundation::DateTime) -> HRESULT + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT }} impl ICivicAddress { - #[inline] pub unsafe fn get_country(&self) -> Result { + #[inline] pub fn get_country(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Country)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_state(&self) -> Result { + }} + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_city(&self) -> Result { + }} + #[inline] pub fn get_city(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_City)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_postal_code(&self) -> Result { + }} + #[inline] pub fn get_postal_code(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PostalCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + }} + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class CivicAddress: ICivicAddress} DEFINE_IID!(IID_IGeoboundingBox, 144099339, 10063, 17370, 154, 6, 203, 252, 218, 235, 78, 194); @@ -13349,54 +13349,54 @@ RT_INTERFACE!{interface IGeoboundingBox(IGeoboundingBoxVtbl): IInspectable(IInsp fn get_MaxAltitude(&self, out: *mut f64) -> HRESULT }} impl IGeoboundingBox { - #[inline] pub unsafe fn get_northwest_corner(&self) -> Result { + #[inline] pub fn get_northwest_corner(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NorthwestCorner)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_southeast_corner(&self) -> Result { + }} + #[inline] pub fn get_southeast_corner(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SoutheastCorner)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_center(&self) -> Result { + }} + #[inline] pub fn get_center(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Center)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_altitude(&self) -> Result { + }} + #[inline] pub fn get_min_altitude(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinAltitude)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_altitude(&self) -> Result { + }} + #[inline] pub fn get_max_altitude(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxAltitude)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class GeoboundingBox: IGeoboundingBox} impl RtActivatable for GeoboundingBox {} impl RtActivatable for GeoboundingBox {} impl GeoboundingBox { - #[inline] pub fn create(northwestCorner: BasicGeoposition, southeastCorner: BasicGeoposition) -> Result> { unsafe { + #[inline] pub fn create(northwestCorner: BasicGeoposition, southeastCorner: BasicGeoposition) -> Result> { >::get_activation_factory().create(northwestCorner, southeastCorner) - }} - #[inline] pub fn create_with_altitude_reference(northwestCorner: BasicGeoposition, southeastCorner: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem) -> Result> { unsafe { + } + #[inline] pub fn create_with_altitude_reference(northwestCorner: BasicGeoposition, southeastCorner: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem) -> Result> { >::get_activation_factory().create_with_altitude_reference(northwestCorner, southeastCorner, altitudeReferenceSystem) - }} - #[inline] pub fn create_with_altitude_reference_and_spatial_reference(northwestCorner: BasicGeoposition, southeastCorner: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32) -> Result> { unsafe { + } + #[inline] pub fn create_with_altitude_reference_and_spatial_reference(northwestCorner: BasicGeoposition, southeastCorner: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32) -> Result> { >::get_activation_factory().create_with_altitude_reference_and_spatial_reference(northwestCorner, southeastCorner, altitudeReferenceSystem, spatialReferenceId) - }} - #[inline] pub fn try_compute(positions: &super::super::foundation::collections::IIterable) -> Result> { unsafe { + } + #[inline] pub fn try_compute(positions: &foundation::collections::IIterable) -> Result>> { >::get_activation_factory().try_compute(positions) - }} - #[inline] pub fn try_compute_with_altitude_reference(positions: &super::super::foundation::collections::IIterable, altitudeRefSystem: AltitudeReferenceSystem) -> Result> { unsafe { + } + #[inline] pub fn try_compute_with_altitude_reference(positions: &foundation::collections::IIterable, altitudeRefSystem: AltitudeReferenceSystem) -> Result>> { >::get_activation_factory().try_compute_with_altitude_reference(positions, altitudeRefSystem) - }} - #[inline] pub fn try_compute_with_altitude_reference_and_spatial_reference(positions: &super::super::foundation::collections::IIterable, altitudeRefSystem: AltitudeReferenceSystem, spatialReferenceId: u32) -> Result> { unsafe { + } + #[inline] pub fn try_compute_with_altitude_reference_and_spatial_reference(positions: &foundation::collections::IIterable, altitudeRefSystem: AltitudeReferenceSystem, spatialReferenceId: u32) -> Result>> { >::get_activation_factory().try_compute_with_altitude_reference_and_spatial_reference(positions, altitudeRefSystem, spatialReferenceId) - }} + } } DEFINE_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]) [CLSID_GeoboundingBox]); DEFINE_IID!(IID_IGeoboundingBoxFactory, 1308337545, 1041, 19132, 179, 181, 91, 188, 203, 87, 217, 140); @@ -13406,44 +13406,44 @@ RT_INTERFACE!{static interface IGeoboundingBoxFactory(IGeoboundingBoxFactoryVtbl fn CreateWithAltitudeReferenceAndSpatialReference(&self, northwestCorner: BasicGeoposition, southeastCorner: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32, out: *mut *mut GeoboundingBox) -> HRESULT }} impl IGeoboundingBoxFactory { - #[inline] pub unsafe fn create(&self, northwestCorner: BasicGeoposition, southeastCorner: BasicGeoposition) -> Result> { + #[inline] pub fn create(&self, northwestCorner: BasicGeoposition, southeastCorner: BasicGeoposition) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, northwestCorner, southeastCorner, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_altitude_reference(&self, northwestCorner: BasicGeoposition, southeastCorner: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem) -> Result> { + }} + #[inline] pub fn create_with_altitude_reference(&self, northwestCorner: BasicGeoposition, southeastCorner: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithAltitudeReference)(self as *const _ as *mut _, 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(&self, northwestCorner: BasicGeoposition, southeastCorner: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32) -> Result> { + }} + #[inline] pub fn create_with_altitude_reference_and_spatial_reference(&self, northwestCorner: BasicGeoposition, southeastCorner: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithAltitudeReferenceAndSpatialReference)(self as *const _ as *mut _, northwestCorner, southeastCorner, altitudeReferenceSystem, spatialReferenceId, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, positions: *mut super::super::foundation::collections::IIterable, out: *mut *mut GeoboundingBox) -> HRESULT, - fn TryComputeWithAltitudeReference(&self, positions: *mut super::super::foundation::collections::IIterable, altitudeRefSystem: AltitudeReferenceSystem, out: *mut *mut GeoboundingBox) -> HRESULT, - fn TryComputeWithAltitudeReferenceAndSpatialReference(&self, positions: *mut super::super::foundation::collections::IIterable, altitudeRefSystem: AltitudeReferenceSystem, spatialReferenceId: u32, out: *mut *mut GeoboundingBox) -> HRESULT + fn TryCompute(&self, positions: *mut foundation::collections::IIterable, out: *mut *mut GeoboundingBox) -> HRESULT, + fn TryComputeWithAltitudeReference(&self, positions: *mut foundation::collections::IIterable, altitudeRefSystem: AltitudeReferenceSystem, out: *mut *mut GeoboundingBox) -> HRESULT, + fn TryComputeWithAltitudeReferenceAndSpatialReference(&self, positions: *mut foundation::collections::IIterable, altitudeRefSystem: AltitudeReferenceSystem, spatialReferenceId: u32, out: *mut *mut GeoboundingBox) -> HRESULT }} impl IGeoboundingBoxStatics { - #[inline] pub unsafe fn try_compute(&self, positions: &super::super::foundation::collections::IIterable) -> Result> { + #[inline] pub fn try_compute(&self, positions: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryCompute)(self as *const _ as *mut _, 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(&self, positions: &super::super::foundation::collections::IIterable, altitudeRefSystem: AltitudeReferenceSystem) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn try_compute_with_altitude_reference(&self, positions: &foundation::collections::IIterable, altitudeRefSystem: AltitudeReferenceSystem) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryComputeWithAltitudeReference)(self as *const _ as *mut _, 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(&self, positions: &super::super::foundation::collections::IIterable, altitudeRefSystem: AltitudeReferenceSystem, spatialReferenceId: u32) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn try_compute_with_altitude_reference_and_spatial_reference(&self, positions: &foundation::collections::IIterable, altitudeRefSystem: AltitudeReferenceSystem, spatialReferenceId: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryComputeWithAltitudeReferenceAndSpatialReference)(self as *const _ as *mut _, positions as *const _ as *mut _, altitudeRefSystem, spatialReferenceId, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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] { @@ -13451,29 +13451,29 @@ RT_INTERFACE!{interface IGeocircle(IGeocircleVtbl): IInspectable(IInspectableVtb fn get_Radius(&self, out: *mut f64) -> HRESULT }} impl IGeocircle { - #[inline] pub unsafe fn get_center(&self) -> Result { + #[inline] pub fn get_center(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Center)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_radius(&self) -> Result { + }} + #[inline] pub fn get_radius(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Radius)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class Geocircle: IGeocircle} impl RtActivatable for Geocircle {} impl Geocircle { - #[inline] pub fn create(position: BasicGeoposition, radius: f64) -> Result> { unsafe { + #[inline] pub fn create(position: BasicGeoposition, radius: f64) -> Result> { >::get_activation_factory().create(position, radius) - }} - #[inline] pub fn create_with_altitude_reference_system(position: BasicGeoposition, radius: f64, altitudeReferenceSystem: AltitudeReferenceSystem) -> Result> { unsafe { + } + #[inline] pub fn create_with_altitude_reference_system(position: BasicGeoposition, radius: f64, altitudeReferenceSystem: AltitudeReferenceSystem) -> Result> { >::get_activation_factory().create_with_altitude_reference_system(position, radius, altitudeReferenceSystem) - }} - #[inline] pub fn create_with_altitude_reference_system_and_spatial_reference_id(position: BasicGeoposition, radius: f64, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32) -> Result> { unsafe { + } + #[inline] pub fn create_with_altitude_reference_system_and_spatial_reference_id(position: BasicGeoposition, radius: f64, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32) -> Result> { >::get_activation_factory().create_with_altitude_reference_system_and_spatial_reference_id(position, radius, altitudeReferenceSystem, spatialReferenceId) - }} + } } DEFINE_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]) [CLSID_Geocircle]); DEFINE_IID!(IID_IGeocircleFactory, 2950058783, 29361, 20349, 135, 204, 78, 212, 201, 132, 156, 5); @@ -13483,98 +13483,98 @@ RT_INTERFACE!{static interface IGeocircleFactory(IGeocircleFactoryVtbl): IInspec fn CreateWithAltitudeReferenceSystemAndSpatialReferenceId(&self, position: BasicGeoposition, radius: f64, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32, out: *mut *mut Geocircle) -> HRESULT }} impl IGeocircleFactory { - #[inline] pub unsafe fn create(&self, position: BasicGeoposition, radius: f64) -> Result> { + #[inline] pub fn create(&self, position: BasicGeoposition, radius: f64) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, position, radius, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_altitude_reference_system(&self, position: BasicGeoposition, radius: f64, altitudeReferenceSystem: AltitudeReferenceSystem) -> Result> { + }} + #[inline] pub fn create_with_altitude_reference_system(&self, position: BasicGeoposition, radius: f64, altitudeReferenceSystem: AltitudeReferenceSystem) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithAltitudeReferenceSystem)(self as *const _ as *mut _, 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(&self, position: BasicGeoposition, radius: f64, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32) -> Result> { + }} + #[inline] pub fn create_with_altitude_reference_system_and_spatial_reference_id(&self, position: BasicGeoposition, radius: f64, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithAltitudeReferenceSystemAndSpatialReferenceId)(self as *const _ as *mut _, position, radius, altitudeReferenceSystem, spatialReferenceId, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut f64) -> HRESULT, fn get_Longitude(&self, out: *mut f64) -> HRESULT, - fn get_Altitude(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_Altitude(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn get_Accuracy(&self, out: *mut f64) -> HRESULT, - fn get_AltitudeAccuracy(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_Heading(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_Speed(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_Timestamp(&self, out: *mut super::super::foundation::DateTime) -> HRESULT + fn get_AltitudeAccuracy(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_Heading(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_Speed(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT }} impl IGeocoordinate { - #[inline] pub unsafe fn get_latitude(&self) -> Result { + #[inline] pub fn get_latitude(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Latitude)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_longitude(&self) -> Result { + }} + #[inline] pub fn get_longitude(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Longitude)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_altitude(&self) -> Result>> { + }} + #[inline] pub fn get_altitude(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Altitude)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_accuracy(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_accuracy(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Accuracy)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_altitude_accuracy(&self) -> Result>> { + }} + #[inline] pub fn get_altitude_accuracy(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AltitudeAccuracy)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_heading(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_heading(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Heading)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_speed(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_speed(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Speed)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class Geocoordinate: IGeocoordinate} 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(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_HorizontalDilutionOfPrecision(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_VerticalDilutionOfPrecision(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn get_PositionDilutionOfPrecision(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_HorizontalDilutionOfPrecision(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_VerticalDilutionOfPrecision(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IGeocoordinateSatelliteData { - #[inline] pub unsafe fn get_position_dilution_of_precision(&self) -> Result>> { + #[inline] pub fn get_position_dilution_of_precision(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PositionDilutionOfPrecision)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_horizontal_dilution_of_precision(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_horizontal_dilution_of_precision(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HorizontalDilutionOfPrecision)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_vertical_dilution_of_precision(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_vertical_dilution_of_precision(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VerticalDilutionOfPrecision)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class GeocoordinateSatelliteData: IGeocoordinateSatelliteData} DEFINE_IID!(IID_IGeocoordinateWithPoint, 4276749605, 53804, 19782, 181, 39, 11, 150, 6, 111, 199, 219); @@ -13582,11 +13582,11 @@ RT_INTERFACE!{interface IGeocoordinateWithPoint(IGeocoordinateWithPointVtbl): II fn get_Point(&self, out: *mut *mut Geopoint) -> HRESULT }} impl IGeocoordinateWithPoint { - #[inline] pub unsafe fn get_point(&self) -> Result> { + #[inline] pub fn get_point(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Point)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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] { @@ -13594,27 +13594,27 @@ RT_INTERFACE!{interface IGeocoordinateWithPositionData(IGeocoordinateWithPositio fn get_SatelliteData(&self, out: *mut *mut GeocoordinateSatelliteData) -> HRESULT }} impl IGeocoordinateWithPositionData { - #[inline] pub unsafe fn get_position_source(&self) -> Result { + #[inline] pub fn get_position_source(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PositionSource)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_satellite_data(&self) -> Result> { + }} + #[inline] pub fn get_satellite_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SatelliteData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn get_PositionSourceTimestamp(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IGeocoordinateWithPositionSourceTimestamp { - #[inline] pub unsafe fn get_position_source_timestamp(&self) -> Result>> { + #[inline] pub fn get_position_source_timestamp(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PositionSourceTimestamp)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum GeolocationAccessStatus: i32 { Unspecified (GeolocationAccessStatus_Unspecified) = 0, Allowed (GeolocationAccessStatus_Allowed) = 1, Denied (GeolocationAccessStatus_Denied) = 2, @@ -13628,98 +13628,98 @@ RT_INTERFACE!{interface IGeolocator(IGeolocatorVtbl): IInspectable(IInspectableV fn get_ReportInterval(&self, out: *mut u32) -> HRESULT, fn put_ReportInterval(&self, value: u32) -> HRESULT, fn get_LocationStatus(&self, out: *mut PositionStatus) -> HRESULT, - fn GetGeopositionAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetGeopositionAsyncWithAgeAndTimeout(&self, maximumAge: super::super::foundation::TimeSpan, timeout: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_PositionChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PositionChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_StatusChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StatusChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn GetGeopositionAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetGeopositionAsyncWithAgeAndTimeout(&self, maximumAge: foundation::TimeSpan, timeout: foundation::TimeSpan, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_PositionChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PositionChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_StatusChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StatusChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IGeolocator { - #[inline] pub unsafe fn get_desired_accuracy(&self) -> Result { + #[inline] pub fn get_desired_accuracy(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DesiredAccuracy)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_desired_accuracy(&self, value: PositionAccuracy) -> Result<()> { + }} + #[inline] pub fn set_desired_accuracy(&self, value: PositionAccuracy) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DesiredAccuracy)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_movement_threshold(&self) -> Result { + }} + #[inline] pub fn get_movement_threshold(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MovementThreshold)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_movement_threshold(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_movement_threshold(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MovementThreshold)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_interval(&self) -> Result { + }} + #[inline] pub fn get_report_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReportInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_report_interval(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_report_interval(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReportInterval)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_location_status(&self) -> Result { + }} + #[inline] pub fn get_location_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LocationStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_geoposition_async(&self) -> Result>> { + }} + #[inline] pub fn get_geoposition_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetGeopositionAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_geoposition_async_with_age_and_timeout(&self, maximumAge: super::super::foundation::TimeSpan, timeout: super::super::foundation::TimeSpan) -> Result>> { + }} + #[inline] pub fn get_geoposition_async_with_age_and_timeout(&self, maximumAge: foundation::TimeSpan, timeout: foundation::TimeSpan) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetGeopositionAsyncWithAgeAndTimeout)(self as *const _ as *mut _, maximumAge, timeout, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_position_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_position_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PositionChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_position_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_position_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PositionChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_status_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_status_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StatusChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_status_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_status_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StatusChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Geolocator: IGeolocator} impl RtActivatable for Geolocator {} impl RtActivatable for Geolocator {} impl RtActivatable for Geolocator {} impl Geolocator { - #[inline] pub fn request_access_async() -> Result>> { unsafe { + #[inline] pub fn request_access_async() -> Result>> { >::get_activation_factory().request_access_async() - }} - #[inline] pub fn get_geoposition_history_async(startTime: super::super::foundation::DateTime) -> Result>>> { unsafe { + } + #[inline] pub fn get_geoposition_history_async(startTime: foundation::DateTime) -> Result>>> { >::get_activation_factory().get_geoposition_history_async(startTime) - }} - #[inline] pub fn get_geoposition_history_with_duration_async(startTime: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan) -> Result>>> { unsafe { + } + #[inline] pub fn get_geoposition_history_with_duration_async(startTime: foundation::DateTime, duration: foundation::TimeSpan) -> Result>>> { >::get_activation_factory().get_geoposition_history_with_duration_async(startTime, duration) - }} - #[inline] pub fn get_is_default_geoposition_recommended() -> Result { unsafe { + } + #[inline] pub fn get_is_default_geoposition_recommended() -> Result { >::get_activation_factory().get_is_default_geoposition_recommended() - }} - #[inline] pub fn set_default_geoposition(value: &super::super::foundation::IReference) -> Result<()> { unsafe { + } + #[inline] pub fn set_default_geoposition(value: &foundation::IReference) -> Result<()> { >::get_activation_factory().set_default_geoposition(value) - }} - #[inline] pub fn get_default_geoposition() -> Result>> { unsafe { + } + #[inline] pub fn get_default_geoposition() -> Result>>> { >::get_activation_factory().get_default_geoposition() - }} + } } DEFINE_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]) [CLSID_Geolocator]); DEFINE_IID!(IID_IGeolocator2, 3518246509, 34961, 17332, 173, 54, 39, 198, 254, 154, 151, 177); @@ -13727,143 +13727,143 @@ RT_INTERFACE!{interface IGeolocator2(IGeolocator2Vtbl): IInspectable(IInspectabl fn AllowFallbackToConsentlessPositions(&self) -> HRESULT }} impl IGeolocator2 { - #[inline] pub unsafe fn allow_fallback_to_consentless_positions(&self) -> Result<()> { + #[inline] pub fn allow_fallback_to_consentless_positions(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AllowFallbackToConsentlessPositions)(self as *const _ as *mut _); 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetGeopositionHistoryAsync(&self, startTime: super::super::foundation::DateTime, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetGeopositionHistoryWithDurationAsync(&self, startTime: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn RequestAccessAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetGeopositionHistoryAsync(&self, startTime: foundation::DateTime, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetGeopositionHistoryWithDurationAsync(&self, startTime: foundation::DateTime, duration: foundation::TimeSpan, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IGeolocatorStatics { - #[inline] pub unsafe fn request_access_async(&self) -> Result>> { + #[inline] pub fn request_access_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_geoposition_history_async(&self, startTime: super::super::foundation::DateTime) -> Result>>> { + }} + #[inline] pub fn get_geoposition_history_async(&self, startTime: foundation::DateTime) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetGeopositionHistoryAsync)(self as *const _ as *mut _, startTime, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_geoposition_history_with_duration_async(&self, startTime: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan) -> Result>>> { + }} + #[inline] pub fn get_geoposition_history_with_duration_async(&self, startTime: foundation::DateTime, duration: foundation::TimeSpan) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetGeopositionHistoryWithDurationAsync)(self as *const _ as *mut _, 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(&self, out: *mut bool) -> HRESULT, - fn put_DefaultGeoposition(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_DefaultGeoposition(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn put_DefaultGeoposition(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_DefaultGeoposition(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IGeolocatorStatics2 { - #[inline] pub unsafe fn get_is_default_geoposition_recommended(&self) -> Result { + #[inline] pub fn get_is_default_geoposition_recommended(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDefaultGeopositionRecommended)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_default_geoposition(&self, value: &super::super::foundation::IReference) -> Result<()> { + }} + #[inline] pub fn set_default_geoposition(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DefaultGeoposition)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_geoposition(&self) -> Result>> { + }} + #[inline] pub fn get_default_geoposition(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DefaultGeoposition)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_DesiredAccuracyInMeters(&self, value: *mut super::super::foundation::IReference) -> HRESULT + fn get_DesiredAccuracyInMeters(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_DesiredAccuracyInMeters(&self, value: *mut foundation::IReference) -> HRESULT }} impl IGeolocatorWithScalarAccuracy { - #[inline] pub unsafe fn get_desired_accuracy_in_meters(&self) -> Result>> { + #[inline] pub fn get_desired_accuracy_in_meters(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DesiredAccuracyInMeters)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_desired_accuracy_in_meters(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_desired_accuracy_in_meters(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DesiredAccuracyInMeters)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_Positions(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IGeopath { - #[inline] pub unsafe fn get_positions(&self) -> Result>> { + #[inline] pub fn get_positions(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Positions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class Geopath: IGeopath} impl RtActivatable for Geopath {} impl Geopath { - #[inline] pub fn create(positions: &super::super::foundation::collections::IIterable) -> Result> { unsafe { + #[inline] pub fn create(positions: &foundation::collections::IIterable) -> Result> { >::get_activation_factory().create(positions) - }} - #[inline] pub fn create_with_altitude_reference(positions: &super::super::foundation::collections::IIterable, altitudeReferenceSystem: AltitudeReferenceSystem) -> Result> { unsafe { + } + #[inline] pub fn create_with_altitude_reference(positions: &foundation::collections::IIterable, altitudeReferenceSystem: AltitudeReferenceSystem) -> Result> { >::get_activation_factory().create_with_altitude_reference(positions, altitudeReferenceSystem) - }} - #[inline] pub fn create_with_altitude_reference_and_spatial_reference(positions: &super::super::foundation::collections::IIterable, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32) -> Result> { unsafe { + } + #[inline] pub fn create_with_altitude_reference_and_spatial_reference(positions: &foundation::collections::IIterable, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32) -> Result> { >::get_activation_factory().create_with_altitude_reference_and_spatial_reference(positions, altitudeReferenceSystem, spatialReferenceId) - }} + } } DEFINE_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]) [CLSID_Geopath]); 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(&self, positions: *mut super::super::foundation::collections::IIterable, out: *mut *mut Geopath) -> HRESULT, - fn CreateWithAltitudeReference(&self, positions: *mut super::super::foundation::collections::IIterable, altitudeReferenceSystem: AltitudeReferenceSystem, out: *mut *mut Geopath) -> HRESULT, - fn CreateWithAltitudeReferenceAndSpatialReference(&self, positions: *mut super::super::foundation::collections::IIterable, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32, out: *mut *mut Geopath) -> HRESULT + fn Create(&self, positions: *mut foundation::collections::IIterable, out: *mut *mut Geopath) -> HRESULT, + fn CreateWithAltitudeReference(&self, positions: *mut foundation::collections::IIterable, altitudeReferenceSystem: AltitudeReferenceSystem, out: *mut *mut Geopath) -> HRESULT, + fn CreateWithAltitudeReferenceAndSpatialReference(&self, positions: *mut foundation::collections::IIterable, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32, out: *mut *mut Geopath) -> HRESULT }} impl IGeopathFactory { - #[inline] pub unsafe fn create(&self, positions: &super::super::foundation::collections::IIterable) -> Result> { + #[inline] pub fn create(&self, positions: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, 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(&self, positions: &super::super::foundation::collections::IIterable, altitudeReferenceSystem: AltitudeReferenceSystem) -> Result> { + }} + #[inline] pub fn create_with_altitude_reference(&self, positions: &foundation::collections::IIterable, altitudeReferenceSystem: AltitudeReferenceSystem) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithAltitudeReference)(self as *const _ as *mut _, 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(&self, positions: &super::super::foundation::collections::IIterable, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32) -> Result> { + }} + #[inline] pub fn create_with_altitude_reference_and_spatial_reference(&self, positions: &foundation::collections::IIterable, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithAltitudeReferenceAndSpatialReference)(self as *const _ as *mut _, positions as *const _ as *mut _, altitudeReferenceSystem, spatialReferenceId, &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(&self, out: *mut BasicGeoposition) -> HRESULT }} impl IGeopoint { - #[inline] pub unsafe fn get_position(&self) -> Result { + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class Geopoint: IGeopoint} impl RtActivatable for Geopoint {} impl Geopoint { - #[inline] pub fn create(position: BasicGeoposition) -> Result> { unsafe { + #[inline] pub fn create(position: BasicGeoposition) -> Result> { >::get_activation_factory().create(position) - }} - #[inline] pub fn create_with_altitude_reference_system(position: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem) -> Result> { unsafe { + } + #[inline] pub fn create_with_altitude_reference_system(position: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem) -> Result> { >::get_activation_factory().create_with_altitude_reference_system(position, altitudeReferenceSystem) - }} - #[inline] pub fn create_with_altitude_reference_system_and_spatial_reference_id(position: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32) -> Result> { unsafe { + } + #[inline] pub fn create_with_altitude_reference_system_and_spatial_reference_id(position: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32) -> Result> { >::get_activation_factory().create_with_altitude_reference_system_and_spatial_reference_id(position, altitudeReferenceSystem, spatialReferenceId) - }} + } } DEFINE_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]) [CLSID_Geopoint]); DEFINE_IID!(IID_IGeopointFactory, 3681258803, 30397, 20016, 138, 247, 168, 68, 220, 55, 183, 160); @@ -13873,21 +13873,21 @@ RT_INTERFACE!{static interface IGeopointFactory(IGeopointFactoryVtbl): IInspecta fn CreateWithAltitudeReferenceSystemAndSpatialReferenceId(&self, position: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32, out: *mut *mut Geopoint) -> HRESULT }} impl IGeopointFactory { - #[inline] pub unsafe fn create(&self, position: BasicGeoposition) -> Result> { + #[inline] pub fn create(&self, position: BasicGeoposition) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, position, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_altitude_reference_system(&self, position: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem) -> Result> { + }} + #[inline] pub fn create_with_altitude_reference_system(&self, position: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithAltitudeReferenceSystem)(self as *const _ as *mut _, 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(&self, position: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32) -> Result> { + }} + #[inline] pub fn create_with_altitude_reference_system_and_spatial_reference_id(&self, position: BasicGeoposition, altitudeReferenceSystem: AltitudeReferenceSystem, spatialReferenceId: u32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithAltitudeReferenceSystemAndSpatialReferenceId)(self as *const _ as *mut _, position, altitudeReferenceSystem, spatialReferenceId, &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] { @@ -13895,16 +13895,16 @@ RT_INTERFACE!{interface IGeoposition(IGeopositionVtbl): IInspectable(IInspectabl fn get_CivicAddress(&self, out: *mut *mut CivicAddress) -> HRESULT }} impl IGeoposition { - #[inline] pub unsafe fn get_coordinate(&self) -> Result> { + #[inline] pub fn get_coordinate(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Coordinate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_civic_address(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_civic_address(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CivicAddress)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class Geoposition: IGeoposition} DEFINE_IID!(IID_IGeoposition2, 2137192087, 34417, 19213, 134, 248, 71, 74, 132, 150, 24, 124); @@ -13912,11 +13912,11 @@ RT_INTERFACE!{interface IGeoposition2(IGeoposition2Vtbl): IInspectable(IInspecta fn get_VenueData(&self, out: *mut *mut VenueData) -> HRESULT }} impl IGeoposition2 { - #[inline] pub unsafe fn get_venue_data(&self) -> Result> { + #[inline] pub fn get_venue_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VenueData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IGeoshape, 3382485679, 50985, 17345, 143, 171, 214, 222, 201, 20, 223, 126); RT_INTERFACE!{interface IGeoshape(IGeoshapeVtbl): IInspectable(IInspectableVtbl) [IID_IGeoshape] { @@ -13925,21 +13925,21 @@ RT_INTERFACE!{interface IGeoshape(IGeoshapeVtbl): IInspectable(IInspectableVtbl) fn get_AltitudeReferenceSystem(&self, out: *mut AltitudeReferenceSystem) -> HRESULT }} impl IGeoshape { - #[inline] pub unsafe fn get_geoshape_type(&self) -> Result { + #[inline] pub fn get_geoshape_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_GeoshapeType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_spatial_reference_id(&self) -> Result { + }} + #[inline] pub fn get_spatial_reference_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SpatialReferenceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_altitude_reference_system(&self) -> Result { + }} + #[inline] pub fn get_altitude_reference_system(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AltitudeReferenceSystem)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum GeoshapeType: i32 { Geopoint (GeoshapeType_Geopoint) = 0, Geocircle (GeoshapeType_Geocircle) = 1, Geopath (GeoshapeType_Geopath) = 2, GeoboundingBox (GeoshapeType_GeoboundingBox) = 3, @@ -13948,24 +13948,24 @@ DEFINE_IID!(IID_IGeovisit, 2978445942, 40694, 16811, 160, 221, 121, 62, 206, 118 RT_INTERFACE!{interface IGeovisit(IGeovisitVtbl): IInspectable(IInspectableVtbl) [IID_IGeovisit] { fn get_Position(&self, out: *mut *mut Geoposition) -> HRESULT, fn get_StateChange(&self, out: *mut VisitStateChange) -> HRESULT, - fn get_Timestamp(&self, out: *mut super::super::foundation::DateTime) -> HRESULT + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT }} impl IGeovisit { - #[inline] pub unsafe fn get_position(&self) -> Result> { + #[inline] pub fn get_position(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_state_change(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_state_change(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StateChange)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + }} + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class Geovisit: IGeovisit} DEFINE_IID!(IID_IGeovisitMonitor, 2148633263, 22852, 17809, 131, 193, 57, 102, 71, 245, 79, 44); @@ -13973,75 +13973,75 @@ RT_INTERFACE!{interface IGeovisitMonitor(IGeovisitMonitorVtbl): IInspectable(IIn fn get_MonitoringScope(&self, out: *mut VisitMonitoringScope) -> HRESULT, fn Start(&self, value: VisitMonitoringScope) -> HRESULT, fn Stop(&self) -> HRESULT, - fn add_VisitStateChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_VisitStateChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_VisitStateChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_VisitStateChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IGeovisitMonitor { - #[inline] pub unsafe fn get_monitoring_scope(&self) -> Result { + #[inline] pub fn get_monitoring_scope(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MonitoringScope)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self, value: VisitMonitoringScope) -> Result<()> { + }} + #[inline] pub fn start(&self, value: VisitMonitoringScope) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_visit_state_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_visit_state_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_VisitStateChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_visit_state_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_visit_state_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_VisitStateChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class GeovisitMonitor: IGeovisitMonitor} impl RtActivatable for GeovisitMonitor {} impl RtActivatable for GeovisitMonitor {} impl GeovisitMonitor { - #[inline] pub fn get_last_report_async() -> Result>> { unsafe { + #[inline] pub fn get_last_report_async() -> Result>> { >::get_activation_factory().get_last_report_async() - }} + } } DEFINE_CLSID!(GeovisitMonitor(&[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,118,105,115,105,116,77,111,110,105,116,111,114,0]) [CLSID_GeovisitMonitor]); DEFINE_IID!(IID_IGeovisitMonitorStatics, 3170465447, 48114, 19677, 149, 207, 85, 76, 130, 237, 251, 135); RT_INTERFACE!{static interface IGeovisitMonitorStatics(IGeovisitMonitorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IGeovisitMonitorStatics] { - fn GetLastReportAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetLastReportAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IGeovisitMonitorStatics { - #[inline] pub unsafe fn get_last_report_async(&self) -> Result>> { + #[inline] pub fn get_last_report_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetLastReportAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IGeovisitStateChangedEventArgs, 3467956735, 35667, 18792, 190, 237, 76, 236, 208, 41, 206, 21); RT_INTERFACE!{interface IGeovisitStateChangedEventArgs(IGeovisitStateChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IGeovisitStateChangedEventArgs] { fn get_Visit(&self, out: *mut *mut Geovisit) -> HRESULT }} impl IGeovisitStateChangedEventArgs { - #[inline] pub unsafe fn get_visit(&self) -> Result> { + #[inline] pub fn get_visit(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Visit)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class GeovisitStateChangedEventArgs: IGeovisitStateChangedEventArgs} DEFINE_IID!(IID_IGeovisitTriggerDetails, 3933670814, 53705, 17739, 153, 183, 178, 248, 205, 210, 72, 47); RT_INTERFACE!{interface IGeovisitTriggerDetails(IGeovisitTriggerDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IGeovisitTriggerDetails] { - fn ReadReports(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn ReadReports(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IGeovisitTriggerDetails { - #[inline] pub unsafe fn read_reports(&self) -> Result>> { + #[inline] pub fn read_reports(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadReports)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class GeovisitTriggerDetails: IGeovisitTriggerDetails} RT_ENUM! { enum PositionAccuracy: i32 { @@ -14052,11 +14052,11 @@ RT_INTERFACE!{interface IPositionChangedEventArgs(IPositionChangedEventArgsVtbl) fn get_Position(&self, out: *mut *mut Geoposition) -> HRESULT }} impl IPositionChangedEventArgs { - #[inline] pub unsafe fn get_position(&self) -> Result> { + #[inline] pub fn get_position(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PositionChangedEventArgs: IPositionChangedEventArgs} RT_ENUM! { enum PositionSource: i32 { @@ -14070,11 +14070,11 @@ RT_INTERFACE!{interface IStatusChangedEventArgs(IStatusChangedEventArgsVtbl): II fn get_Status(&self, out: *mut PositionStatus) -> HRESULT }} impl IStatusChangedEventArgs { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class StatusChangedEventArgs: IStatusChangedEventArgs} DEFINE_IID!(IID_IVenueData, 1727238535, 24803, 19247, 181, 39, 79, 83, 241, 195, 198, 119); @@ -14083,16 +14083,16 @@ RT_INTERFACE!{interface IVenueData(IVenueDataVtbl): IInspectable(IInspectableVtb fn get_Level(&self, out: *mut HSTRING) -> HRESULT }} impl IVenueData { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_level(&self) -> Result { + }} + #[inline] pub fn get_level(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Level)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class VenueData: IVenueData} RT_ENUM! { enum VisitMonitoringScope: i32 { @@ -14105,154 +14105,154 @@ pub mod geofencing { // Windows.Devices.Geolocation.Geofencing use ::prelude::*; 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(&self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, - fn get_Duration(&self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn get_DwellTime(&self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_StartTime(&self, out: *mut foundation::DateTime) -> HRESULT, + fn get_Duration(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_DwellTime(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn get_Id(&self, out: *mut HSTRING) -> HRESULT, fn get_MonitoredStates(&self, out: *mut MonitoredGeofenceStates) -> HRESULT, fn get_Geoshape(&self, out: *mut *mut super::IGeoshape) -> HRESULT, fn get_SingleUse(&self, out: *mut bool) -> HRESULT }} impl IGeofence { - #[inline] pub unsafe fn get_start_time(&self) -> Result<::rt::gen::windows::foundation::DateTime> { + #[inline] pub fn get_start_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StartTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_duration(&self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + }} + #[inline] pub fn get_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Duration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_dwell_time(&self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + }} + #[inline] pub fn get_dwell_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DwellTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&self) -> Result { + }} + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_monitored_states(&self) -> Result { + }} + #[inline] pub fn get_monitored_states(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MonitoredStates)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_geoshape(&self) -> Result> { + }} + #[inline] pub fn get_geoshape(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Geoshape)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_single_use(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_single_use(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SingleUse)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class Geofence: IGeofence} impl RtActivatable for Geofence {} impl Geofence { - #[inline] pub fn create(id: &HStringArg, geoshape: &super::IGeoshape) -> Result> { unsafe { + #[inline] pub fn create(id: &HStringArg, geoshape: &super::IGeoshape) -> Result> { >::get_activation_factory().create(id, geoshape) - }} - #[inline] pub fn create_with_monitor_states(id: &HStringArg, geoshape: &super::IGeoshape, monitoredStates: MonitoredGeofenceStates, singleUse: bool) -> Result> { unsafe { + } + #[inline] pub fn create_with_monitor_states(id: &HStringArg, geoshape: &super::IGeoshape, monitoredStates: MonitoredGeofenceStates, singleUse: bool) -> Result> { >::get_activation_factory().create_with_monitor_states(id, geoshape, monitoredStates, singleUse) - }} - #[inline] pub fn create_with_monitor_states_and_dwell_time(id: &HStringArg, geoshape: &super::IGeoshape, monitoredStates: MonitoredGeofenceStates, singleUse: bool, dwellTime: ::rt::gen::windows::foundation::TimeSpan) -> Result> { unsafe { + } + #[inline] pub fn create_with_monitor_states_and_dwell_time(id: &HStringArg, geoshape: &super::IGeoshape, monitoredStates: MonitoredGeofenceStates, singleUse: bool, dwellTime: foundation::TimeSpan) -> Result> { >::get_activation_factory().create_with_monitor_states_and_dwell_time(id, geoshape, monitoredStates, singleUse, dwellTime) - }} - #[inline] pub fn create_with_monitor_states_dwell_time_start_time_and_duration(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> { unsafe { + } + #[inline] pub fn create_with_monitor_states_dwell_time_start_time_and_duration(id: &HStringArg, geoshape: &super::IGeoshape, monitoredStates: MonitoredGeofenceStates, singleUse: bool, dwellTime: foundation::TimeSpan, startTime: foundation::DateTime, duration: foundation::TimeSpan) -> Result> { >::get_activation_factory().create_with_monitor_states_dwell_time_start_time_and_duration(id, geoshape, monitoredStates, singleUse, dwellTime, startTime, duration) - }} + } } DEFINE_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]) [CLSID_Geofence]); 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(&self, id: HSTRING, geoshape: *mut super::IGeoshape, out: *mut *mut Geofence) -> HRESULT, fn CreateWithMonitorStates(&self, id: HSTRING, geoshape: *mut super::IGeoshape, monitoredStates: MonitoredGeofenceStates, singleUse: bool, out: *mut *mut Geofence) -> HRESULT, - fn CreateWithMonitorStatesAndDwellTime(&self, id: HSTRING, geoshape: *mut super::IGeoshape, monitoredStates: MonitoredGeofenceStates, singleUse: bool, dwellTime: ::rt::gen::windows::foundation::TimeSpan, out: *mut *mut Geofence) -> HRESULT, - fn CreateWithMonitorStatesDwellTimeStartTimeAndDuration(&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 + fn CreateWithMonitorStatesAndDwellTime(&self, id: HSTRING, geoshape: *mut super::IGeoshape, monitoredStates: MonitoredGeofenceStates, singleUse: bool, dwellTime: foundation::TimeSpan, out: *mut *mut Geofence) -> HRESULT, + fn CreateWithMonitorStatesDwellTimeStartTimeAndDuration(&self, id: HSTRING, geoshape: *mut super::IGeoshape, monitoredStates: MonitoredGeofenceStates, singleUse: bool, dwellTime: foundation::TimeSpan, startTime: foundation::DateTime, duration: foundation::TimeSpan, out: *mut *mut Geofence) -> HRESULT }} impl IGeofenceFactory { - #[inline] pub unsafe fn create(&self, id: &HStringArg, geoshape: &super::IGeoshape) -> Result> { + #[inline] pub fn create(&self, id: &HStringArg, geoshape: &super::IGeoshape) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, 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(&self, id: &HStringArg, geoshape: &super::IGeoshape, monitoredStates: MonitoredGeofenceStates, singleUse: bool) -> Result> { + }} + #[inline] pub fn create_with_monitor_states(&self, id: &HStringArg, geoshape: &super::IGeoshape, monitoredStates: MonitoredGeofenceStates, singleUse: bool) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithMonitorStates)(self as *const _ as *mut _, 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(&self, id: &HStringArg, geoshape: &super::IGeoshape, monitoredStates: MonitoredGeofenceStates, singleUse: bool, dwellTime: ::rt::gen::windows::foundation::TimeSpan) -> Result> { + }} + #[inline] pub fn create_with_monitor_states_and_dwell_time(&self, id: &HStringArg, geoshape: &super::IGeoshape, monitoredStates: MonitoredGeofenceStates, singleUse: bool, dwellTime: foundation::TimeSpan) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithMonitorStatesAndDwellTime)(self as *const _ as *mut _, 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(&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 fn create_with_monitor_states_dwell_time_start_time_and_duration(&self, id: &HStringArg, geoshape: &super::IGeoshape, monitoredStates: MonitoredGeofenceStates, singleUse: bool, dwellTime: foundation::TimeSpan, startTime: foundation::DateTime, duration: foundation::TimeSpan) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithMonitorStatesDwellTimeStartTimeAndDuration)(self as *const _ as *mut _, 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) } - } + }} } 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(&self, out: *mut GeofenceMonitorStatus) -> HRESULT, - fn get_Geofences(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, + fn get_Geofences(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_LastKnownGeoposition(&self, out: *mut *mut super::Geoposition) -> HRESULT, - fn add_GeofenceStateChanged(&self, eventHandler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_GeofenceStateChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn ReadReports(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn add_StatusChanged(&self, eventHandler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StatusChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn add_GeofenceStateChanged(&self, eventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_GeofenceStateChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn ReadReports(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn add_StatusChanged(&self, eventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StatusChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IGeofenceMonitor { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_geofences(&self) -> Result>> { + }} + #[inline] pub fn get_geofences(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Geofences)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_last_known_geoposition(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_last_known_geoposition(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LastKnownGeoposition)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_geofence_state_changed(&self, eventHandler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_geofence_state_changed(&self, eventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_GeofenceStateChanged)(self as *const _ as *mut _, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_geofence_state_changed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_geofence_state_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_GeofenceStateChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn read_reports(&self) -> Result>> { + }} + #[inline] pub fn read_reports(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadReports)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_status_changed(&self, eventHandler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_status_changed(&self, eventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StatusChanged)(self as *const _ as *mut _, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_status_changed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_status_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StatusChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class GeofenceMonitor: IGeofenceMonitor} impl RtActivatable for GeofenceMonitor {} impl GeofenceMonitor { - #[inline] pub fn get_current() -> Result> { unsafe { + #[inline] pub fn get_current() -> Result>> { >::get_activation_factory().get_current() - }} + } } DEFINE_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]) [CLSID_GeofenceMonitor]); DEFINE_IID!(IID_IGeofenceMonitorStatics, 768815055, 32373, 18585, 172, 227, 43, 208, 166, 92, 206, 6); @@ -14260,11 +14260,11 @@ RT_INTERFACE!{static interface IGeofenceMonitorStatics(IGeofenceMonitorStaticsVt fn get_Current(&self, out: *mut *mut GeofenceMonitor) -> HRESULT }} impl IGeofenceMonitorStatics { - #[inline] pub unsafe fn get_current(&self) -> Result> { + #[inline] pub fn get_current(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Current)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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, @@ -14283,26 +14283,26 @@ RT_INTERFACE!{interface IGeofenceStateChangeReport(IGeofenceStateChangeReportVtb fn get_RemovalReason(&self, out: *mut GeofenceRemovalReason) -> HRESULT }} impl IGeofenceStateChangeReport { - #[inline] pub unsafe fn get_new_state(&self) -> Result { + #[inline] pub fn get_new_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NewState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_geofence(&self) -> Result> { + }} + #[inline] pub fn get_geofence(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Geofence)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_geoposition(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_geoposition(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Geoposition)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_removal_reason(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_removal_reason(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RemovalReason)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class GeofenceStateChangeReport: IGeofenceStateChangeReport} RT_ENUM! { enum MonitoredGeofenceStates: u32 { @@ -14315,21 +14315,21 @@ use ::prelude::*; RT_CLASS!{static class KnownSimpleHapticsControllerWaveforms} impl RtActivatable for KnownSimpleHapticsControllerWaveforms {} impl KnownSimpleHapticsControllerWaveforms { - #[inline] pub fn get_click() -> Result { unsafe { + #[inline] pub fn get_click() -> Result { >::get_activation_factory().get_click() - }} - #[inline] pub fn get_buzz_continuous() -> Result { unsafe { + } + #[inline] pub fn get_buzz_continuous() -> Result { >::get_activation_factory().get_buzz_continuous() - }} - #[inline] pub fn get_rumble_continuous() -> Result { unsafe { + } + #[inline] pub fn get_rumble_continuous() -> Result { >::get_activation_factory().get_rumble_continuous() - }} - #[inline] pub fn get_press() -> Result { unsafe { + } + #[inline] pub fn get_press() -> Result { >::get_activation_factory().get_press() - }} - #[inline] pub fn get_release() -> Result { unsafe { + } + #[inline] pub fn get_release() -> Result { >::get_activation_factory().get_release() - }} + } } DEFINE_CLSID!(KnownSimpleHapticsControllerWaveforms(&[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,72,97,112,116,105,99,115,46,75,110,111,119,110,83,105,109,112,108,101,72,97,112,116,105,99,115,67,111,110,116,114,111,108,108,101,114,87,97,118,101,102,111,114,109,115,0]) [CLSID_KnownSimpleHapticsControllerWaveforms]); DEFINE_IID!(IID_IKnownSimpleHapticsControllerWaveformsStatics, 1029144311, 19694, 4582, 181, 53, 0, 27, 220, 6, 171, 59); @@ -14341,36 +14341,36 @@ RT_INTERFACE!{static interface IKnownSimpleHapticsControllerWaveformsStatics(IKn fn get_Release(&self, out: *mut u16) -> HRESULT }} impl IKnownSimpleHapticsControllerWaveformsStatics { - #[inline] pub unsafe fn get_click(&self) -> Result { + #[inline] pub fn get_click(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Click)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_buzz_continuous(&self) -> Result { + }} + #[inline] pub fn get_buzz_continuous(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BuzzContinuous)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_rumble_continuous(&self) -> Result { + }} + #[inline] pub fn get_rumble_continuous(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RumbleContinuous)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_press(&self) -> Result { + }} + #[inline] pub fn get_press(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Press)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_release(&self) -> Result { + }} + #[inline] pub fn get_release(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Release)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ISimpleHapticsController, 1029144313, 19694, 4582, 181, 53, 0, 27, 220, 6, 171, 59); RT_INTERFACE!{interface ISimpleHapticsController(ISimpleHapticsControllerVtbl): IInspectable(IInspectableVtbl) [IID_ISimpleHapticsController] { fn get_Id(&self, out: *mut HSTRING) -> HRESULT, - fn get_SupportedFeedback(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedFeedback(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_IsIntensitySupported(&self, out: *mut bool) -> HRESULT, fn get_IsPlayCountSupported(&self, out: *mut bool) -> HRESULT, fn get_IsPlayDurationSupported(&self, out: *mut bool) -> HRESULT, @@ -14378,78 +14378,78 @@ RT_INTERFACE!{interface ISimpleHapticsController(ISimpleHapticsControllerVtbl): fn StopFeedback(&self) -> HRESULT, fn SendHapticFeedback(&self, feedback: *mut SimpleHapticsControllerFeedback) -> HRESULT, fn SendHapticFeedbackWithIntensity(&self, feedback: *mut SimpleHapticsControllerFeedback, intensity: f64) -> HRESULT, - fn SendHapticFeedbackForDuration(&self, feedback: *mut SimpleHapticsControllerFeedback, intensity: f64, playDuration: super::super::foundation::TimeSpan) -> HRESULT, - fn SendHapticFeedbackForPlayCount(&self, feedback: *mut SimpleHapticsControllerFeedback, intensity: f64, playCount: i32, replayPauseInterval: super::super::foundation::TimeSpan) -> HRESULT + fn SendHapticFeedbackForDuration(&self, feedback: *mut SimpleHapticsControllerFeedback, intensity: f64, playDuration: foundation::TimeSpan) -> HRESULT, + fn SendHapticFeedbackForPlayCount(&self, feedback: *mut SimpleHapticsControllerFeedback, intensity: f64, playCount: i32, replayPauseInterval: foundation::TimeSpan) -> HRESULT }} impl ISimpleHapticsController { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_feedback(&self) -> Result>> { + }} + #[inline] pub fn get_supported_feedback(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedFeedback)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_intensity_supported(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_intensity_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsIntensitySupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_play_count_supported(&self) -> Result { + }} + #[inline] pub fn get_is_play_count_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPlayCountSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_play_duration_supported(&self) -> Result { + }} + #[inline] pub fn get_is_play_duration_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPlayDurationSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_replay_pause_interval_supported(&self) -> Result { + }} + #[inline] pub fn get_is_replay_pause_interval_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsReplayPauseIntervalSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn stop_feedback(&self) -> Result<()> { + }} + #[inline] pub fn stop_feedback(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StopFeedback)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn send_haptic_feedback(&self, feedback: &SimpleHapticsControllerFeedback) -> Result<()> { + }} + #[inline] pub fn send_haptic_feedback(&self, feedback: &SimpleHapticsControllerFeedback) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SendHapticFeedback)(self as *const _ as *mut _, feedback as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn send_haptic_feedback_with_intensity(&self, feedback: &SimpleHapticsControllerFeedback, intensity: f64) -> Result<()> { + }} + #[inline] pub fn send_haptic_feedback_with_intensity(&self, feedback: &SimpleHapticsControllerFeedback, intensity: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SendHapticFeedbackWithIntensity)(self as *const _ as *mut _, feedback as *const _ as *mut _, intensity); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn send_haptic_feedback_for_duration(&self, feedback: &SimpleHapticsControllerFeedback, intensity: f64, playDuration: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn send_haptic_feedback_for_duration(&self, feedback: &SimpleHapticsControllerFeedback, intensity: f64, playDuration: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SendHapticFeedbackForDuration)(self as *const _ as *mut _, feedback as *const _ as *mut _, intensity, playDuration); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn send_haptic_feedback_for_play_count(&self, feedback: &SimpleHapticsControllerFeedback, intensity: f64, playCount: i32, replayPauseInterval: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn send_haptic_feedback_for_play_count(&self, feedback: &SimpleHapticsControllerFeedback, intensity: f64, playCount: i32, replayPauseInterval: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SendHapticFeedbackForPlayCount)(self as *const _ as *mut _, feedback as *const _ as *mut _, intensity, playCount, replayPauseInterval); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SimpleHapticsController: ISimpleHapticsController} DEFINE_IID!(IID_ISimpleHapticsControllerFeedback, 1029144312, 19694, 4582, 181, 53, 0, 27, 220, 6, 171, 59); RT_INTERFACE!{interface ISimpleHapticsControllerFeedback(ISimpleHapticsControllerFeedbackVtbl): IInspectable(IInspectableVtbl) [IID_ISimpleHapticsControllerFeedback] { fn get_Waveform(&self, out: *mut u16) -> HRESULT, - fn get_Duration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + fn get_Duration(&self, out: *mut foundation::TimeSpan) -> HRESULT }} impl ISimpleHapticsControllerFeedback { - #[inline] pub unsafe fn get_waveform(&self) -> Result { + #[inline] pub fn get_waveform(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Waveform)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_duration(&self) -> Result { + }} + #[inline] pub fn get_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Duration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SimpleHapticsControllerFeedback: ISimpleHapticsControllerFeedback} RT_ENUM! { enum VibrationAccessStatus: i32 { @@ -14461,71 +14461,71 @@ RT_INTERFACE!{interface IVibrationDevice(IVibrationDeviceVtbl): IInspectable(IIn fn get_SimpleHapticsController(&self, out: *mut *mut SimpleHapticsController) -> HRESULT }} impl IVibrationDevice { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_simple_haptics_controller(&self) -> Result> { + }} + #[inline] pub fn get_simple_haptics_controller(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SimpleHapticsController)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class VibrationDevice: IVibrationDevice} impl RtActivatable for VibrationDevice {} impl VibrationDevice { - #[inline] pub fn request_access_async() -> Result>> { unsafe { + #[inline] pub fn request_access_async() -> Result>> { >::get_activation_factory().request_access_async() - }} - #[inline] pub fn get_device_selector() -> Result { unsafe { + } + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} - #[inline] pub fn get_default_async() -> Result>> { unsafe { + } + #[inline] pub fn get_default_async() -> Result>> { >::get_activation_factory().get_default_async() - }} - #[inline] pub fn find_all_async() -> Result>>> { unsafe { + } + #[inline] pub fn find_all_async() -> Result>>> { >::get_activation_factory().find_all_async() - }} + } } DEFINE_CLSID!(VibrationDevice(&[87,105,110,100,111,119,115,46,68,101,118,105,99,101,115,46,72,97,112,116,105,99,115,46,86,105,98,114,97,116,105,111,110,68,101,118,105,99,101,0]) [CLSID_VibrationDevice]); DEFINE_IID!(IID_IVibrationDeviceStatics, 1407380973, 8848, 19145, 142, 179, 26, 132, 18, 46, 183, 28); RT_INTERFACE!{static interface IVibrationDeviceStatics(IVibrationDeviceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IVibrationDeviceStatics] { - fn RequestAccessAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestAccessAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetDeviceSelector(&self, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetDefaultAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FindAllAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetDefaultAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn FindAllAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IVibrationDeviceStatics { - #[inline] pub unsafe fn request_access_async(&self) -> Result>> { + #[inline] pub fn request_access_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + }} + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_async(&self) -> Result>> { + }} + #[inline] pub fn get_default_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefaultAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_all_async(&self) -> Result>>> { + }} + #[inline] pub fn find_all_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } } // Windows.Devices.Haptics pub mod humaninterfacedevice { // Windows.Devices.HumanInterfaceDevice @@ -14540,35 +14540,35 @@ RT_INTERFACE!{interface IHidBooleanControl(IHidBooleanControlVtbl): IInspectable fn get_ControlDescription(&self, out: *mut *mut HidBooleanControlDescription) -> HRESULT }} impl IHidBooleanControl { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_usage_page(&self) -> Result { + }} + #[inline] pub fn get_usage_page(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UsagePage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_usage_id(&self) -> Result { + }} + #[inline] pub fn get_usage_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UsageId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_active(&self) -> Result { + }} + #[inline] pub fn get_is_active(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsActive)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_active(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_active(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsActive)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_control_description(&self) -> Result> { + }} + #[inline] pub fn get_control_description(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ControlDescription)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class HidBooleanControl: IHidBooleanControl} DEFINE_IID!(IID_IHidBooleanControlDescription, 1637279043, 10712, 18986, 134, 131, 132, 158, 32, 123, 190, 49); @@ -14578,39 +14578,39 @@ RT_INTERFACE!{interface IHidBooleanControlDescription(IHidBooleanControlDescript fn get_ReportType(&self, out: *mut HidReportType) -> HRESULT, fn get_UsagePage(&self, out: *mut u16) -> HRESULT, fn get_UsageId(&self, out: *mut u16) -> HRESULT, - fn get_ParentCollections(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_ParentCollections(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IHidBooleanControlDescription { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_id(&self) -> Result { + }} + #[inline] pub fn get_report_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReportId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_type(&self) -> Result { + }} + #[inline] pub fn get_report_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReportType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_usage_page(&self) -> Result { + }} + #[inline] pub fn get_usage_page(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UsagePage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_usage_id(&self) -> Result { + }} + #[inline] pub fn get_usage_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UsageId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_parent_collections(&self) -> Result>> { + }} + #[inline] pub fn get_parent_collections(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ParentCollections)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class HidBooleanControlDescription: IHidBooleanControlDescription} DEFINE_IID!(IID_IHidBooleanControlDescription2, 3371094762, 35447, 19510, 170, 0, 95, 240, 68, 157, 62, 115); @@ -14618,11 +14618,11 @@ RT_INTERFACE!{interface IHidBooleanControlDescription2(IHidBooleanControlDescrip fn get_IsAbsolute(&self, out: *mut bool) -> HRESULT }} impl IHidBooleanControlDescription2 { - #[inline] pub unsafe fn get_is_absolute(&self) -> Result { + #[inline] pub fn get_is_absolute(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsAbsolute)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(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] { @@ -14632,26 +14632,26 @@ RT_INTERFACE!{interface IHidCollection(IHidCollectionVtbl): IInspectable(IInspec fn get_UsageId(&self, out: *mut u32) -> HRESULT }} impl IHidCollection { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_type(&self) -> Result { + }} + #[inline] pub fn get_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Type)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_usage_page(&self) -> Result { + }} + #[inline] pub fn get_usage_page(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UsagePage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_usage_id(&self) -> Result { + }} + #[inline] pub fn get_usage_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UsageId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class HidCollection: IHidCollection} RT_ENUM! { enum HidCollectionType: i32 { @@ -14664,153 +14664,153 @@ RT_INTERFACE!{interface IHidDevice(IHidDeviceVtbl): IInspectable(IInspectableVtb fn get_Version(&self, out: *mut u16) -> HRESULT, fn get_UsagePage(&self, out: *mut u16) -> HRESULT, fn get_UsageId(&self, out: *mut u16) -> HRESULT, - fn GetInputReportAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetInputReportByIdAsync(&self, reportId: u16, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetFeatureReportAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetFeatureReportByIdAsync(&self, reportId: u16, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetInputReportAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetInputReportByIdAsync(&self, reportId: u16, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetFeatureReportAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetFeatureReportByIdAsync(&self, reportId: u16, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn CreateOutputReport(&self, out: *mut *mut HidOutputReport) -> HRESULT, fn CreateOutputReportById(&self, reportId: u16, out: *mut *mut HidOutputReport) -> HRESULT, fn CreateFeatureReport(&self, out: *mut *mut HidFeatureReport) -> HRESULT, fn CreateFeatureReportById(&self, reportId: u16, out: *mut *mut HidFeatureReport) -> HRESULT, - fn SendOutputReportAsync(&self, outputReport: *mut HidOutputReport, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn SendFeatureReportAsync(&self, featureReport: *mut HidFeatureReport, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetBooleanControlDescriptions(&self, reportType: HidReportType, usagePage: u16, usageId: u16, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn GetNumericControlDescriptions(&self, reportType: HidReportType, usagePage: u16, usageId: u16, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn add_InputReportReceived(&self, reportHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_InputReportReceived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn SendOutputReportAsync(&self, outputReport: *mut HidOutputReport, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn SendFeatureReportAsync(&self, featureReport: *mut HidFeatureReport, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetBooleanControlDescriptions(&self, reportType: HidReportType, usagePage: u16, usageId: u16, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn GetNumericControlDescriptions(&self, reportType: HidReportType, usagePage: u16, usageId: u16, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn add_InputReportReceived(&self, reportHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_InputReportReceived(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IHidDevice { - #[inline] pub unsafe fn get_vendor_id(&self) -> Result { + #[inline] pub fn get_vendor_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VendorId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_product_id(&self) -> Result { + }} + #[inline] pub fn get_product_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProductId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_version(&self) -> Result { + }} + #[inline] pub fn get_version(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Version)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_usage_page(&self) -> Result { + }} + #[inline] pub fn get_usage_page(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UsagePage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_usage_id(&self) -> Result { + }} + #[inline] pub fn get_usage_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UsageId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_input_report_async(&self) -> Result>> { + }} + #[inline] pub fn get_input_report_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetInputReportAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_input_report_by_id_async(&self, reportId: u16) -> Result>> { + }} + #[inline] pub fn get_input_report_by_id_async(&self, reportId: u16) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetInputReportByIdAsync)(self as *const _ as *mut _, reportId, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_feature_report_async(&self) -> Result>> { + }} + #[inline] pub fn get_feature_report_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFeatureReportAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_feature_report_by_id_async(&self, reportId: u16) -> Result>> { + }} + #[inline] pub fn get_feature_report_by_id_async(&self, reportId: u16) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFeatureReportByIdAsync)(self as *const _ as *mut _, reportId, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_output_report(&self) -> Result> { + }} + #[inline] pub fn create_output_report(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateOutputReport)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_output_report_by_id(&self, reportId: u16) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_output_report_by_id(&self, reportId: u16) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateOutputReportById)(self as *const _ as *mut _, reportId, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_feature_report(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_feature_report(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFeatureReport)(self 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(&self, reportId: u16) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_feature_report_by_id(&self, reportId: u16) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFeatureReportById)(self as *const _ as *mut _, reportId, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn send_output_report_async(&self, outputReport: &HidOutputReport) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn send_output_report_async(&self, outputReport: &HidOutputReport) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SendOutputReportAsync)(self as *const _ as *mut _, 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(&self, featureReport: &HidFeatureReport) -> Result>> { + }} + #[inline] pub fn send_feature_report_async(&self, featureReport: &HidFeatureReport) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SendFeatureReportAsync)(self as *const _ as *mut _, 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(&self, reportType: HidReportType, usagePage: u16, usageId: u16) -> Result>> { + }} + #[inline] pub fn get_boolean_control_descriptions(&self, reportType: HidReportType, usagePage: u16, usageId: u16) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetBooleanControlDescriptions)(self as *const _ as *mut _, reportType, usagePage, usageId, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_numeric_control_descriptions(&self, reportType: HidReportType, usagePage: u16, usageId: u16) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_numeric_control_descriptions(&self, reportType: HidReportType, usagePage: u16, usageId: u16) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetNumericControlDescriptions)(self as *const _ as *mut _, reportType, usagePage, usageId, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_input_report_received(&self, reportHandler: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_input_report_received(&self, reportHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_InputReportReceived)(self as *const _ as *mut _, reportHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_input_report_received(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_input_report_received(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_InputReportReceived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class HidDevice: IHidDevice} impl RtActivatable for HidDevice {} impl HidDevice { - #[inline] pub fn get_device_selector(usagePage: u16, usageId: u16) -> Result { unsafe { + #[inline] pub fn get_device_selector(usagePage: u16, usageId: u16) -> Result { >::get_activation_factory().get_device_selector(usagePage, usageId) - }} - #[inline] pub fn get_device_selector_vid_pid(usagePage: u16, usageId: u16, vendorId: u16, productId: u16) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_vid_pid(usagePage: u16, usageId: u16, vendorId: u16, productId: u16) -> Result { >::get_activation_factory().get_device_selector_vid_pid(usagePage, usageId, vendorId, productId) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn from_id_async(deviceId: &HStringArg, accessMode: super::super::storage::FileAccessMode) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn from_id_async(deviceId: &HStringArg, accessMode: super::super::storage::FileAccessMode) -> Result>> { >::get_activation_factory().from_id_async(deviceId, accessMode) - }} + } } DEFINE_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]) [CLSID_HidDevice]); 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(&self, usagePage: u16, usageId: u16, out: *mut HSTRING) -> HRESULT, fn GetDeviceSelectorVidPid(&self, usagePage: u16, usageId: u16, vendorId: u16, productId: u16, out: *mut HSTRING) -> HRESULT, - #[cfg(feature="windows-storage")] fn FromIdAsync(&self, deviceId: HSTRING, accessMode: super::super::storage::FileAccessMode, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn FromIdAsync(&self, deviceId: HSTRING, accessMode: super::super::storage::FileAccessMode, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IHidDeviceStatics { - #[inline] pub unsafe fn get_device_selector(&self, usagePage: u16, usageId: u16) -> Result { + #[inline] pub fn get_device_selector(&self, usagePage: u16, usageId: u16) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, usagePage, usageId, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector_vid_pid(&self, usagePage: u16, usageId: u16, vendorId: u16, productId: u16) -> Result { + }} + #[inline] pub fn get_device_selector_vid_pid(&self, usagePage: u16, usageId: u16, vendorId: u16, productId: u16) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorVidPid)(self as *const _ as *mut _, 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(&self, deviceId: &HStringArg, accessMode: super::super::storage::FileAccessMode) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn from_id_async(&self, deviceId: &HStringArg, accessMode: super::super::storage::FileAccessMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), accessMode, &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] { @@ -14825,40 +14825,40 @@ RT_INTERFACE!{interface IHidFeatureReport(IHidFeatureReportVtbl): IInspectable(I fn GetNumericControlByDescription(&self, controlDescription: *mut HidNumericControlDescription, out: *mut *mut HidNumericControl) -> HRESULT }} impl IHidFeatureReport { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_data(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Data)(self 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_data(&self, value: &super::super::storage::streams::IBuffer) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_data(&self, value: &super::super::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Data)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_boolean_control(&self, usagePage: u16, usageId: u16) -> Result> { + }} + #[inline] pub fn get_boolean_control(&self, usagePage: u16, usageId: u16) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetBooleanControl)(self as *const _ as *mut _, usagePage, usageId, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_boolean_control_by_description(&self, controlDescription: &HidBooleanControlDescription) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_boolean_control_by_description(&self, controlDescription: &HidBooleanControlDescription) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetBooleanControlByDescription)(self as *const _ as *mut _, 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(&self, usagePage: u16, usageId: u16) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_numeric_control(&self, usagePage: u16, usageId: u16) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetNumericControl)(self as *const _ as *mut _, usagePage, usageId, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_numeric_control_by_description(&self, controlDescription: &HidNumericControlDescription) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_numeric_control_by_description(&self, controlDescription: &HidNumericControlDescription) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetNumericControlByDescription)(self as *const _ as *mut _, controlDescription as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class HidFeatureReport: IHidFeatureReport} DEFINE_IID!(IID_IHidInputReport, 3277655632, 63463, 20109, 178, 62, 202, 187, 229, 107, 144, 233); @@ -14866,54 +14866,54 @@ RT_INTERFACE!{interface IHidInputReport(IHidInputReportVtbl): IInspectable(IInsp fn get_Id(&self, out: *mut u16) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy1(&self) -> (), #[cfg(feature="windows-storage")] fn get_Data(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, - fn get_ActivatedBooleanControls(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_TransitionedBooleanControls(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_ActivatedBooleanControls(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_TransitionedBooleanControls(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn GetBooleanControl(&self, usagePage: u16, usageId: u16, out: *mut *mut HidBooleanControl) -> HRESULT, fn GetBooleanControlByDescription(&self, controlDescription: *mut HidBooleanControlDescription, out: *mut *mut HidBooleanControl) -> HRESULT, fn GetNumericControl(&self, usagePage: u16, usageId: u16, out: *mut *mut HidNumericControl) -> HRESULT, fn GetNumericControlByDescription(&self, controlDescription: *mut HidNumericControlDescription, out: *mut *mut HidNumericControl) -> HRESULT }} impl IHidInputReport { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_data(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Data)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_activated_boolean_controls(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_activated_boolean_controls(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ActivatedBooleanControls)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_transitioned_boolean_controls(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_transitioned_boolean_controls(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TransitionedBooleanControls)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_boolean_control(&self, usagePage: u16, usageId: u16) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_boolean_control(&self, usagePage: u16, usageId: u16) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetBooleanControl)(self as *const _ as *mut _, usagePage, usageId, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_boolean_control_by_description(&self, controlDescription: &HidBooleanControlDescription) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_boolean_control_by_description(&self, controlDescription: &HidBooleanControlDescription) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetBooleanControlByDescription)(self as *const _ as *mut _, 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(&self, usagePage: u16, usageId: u16) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_numeric_control(&self, usagePage: u16, usageId: u16) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetNumericControl)(self as *const _ as *mut _, usagePage, usageId, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_numeric_control_by_description(&self, controlDescription: &HidNumericControlDescription) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_numeric_control_by_description(&self, controlDescription: &HidNumericControlDescription) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetNumericControlByDescription)(self as *const _ as *mut _, controlDescription as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class HidInputReport: IHidInputReport} DEFINE_IID!(IID_IHidInputReportReceivedEventArgs, 1884931531, 22962, 19906, 152, 92, 10, 220, 97, 54, 250, 45); @@ -14921,11 +14921,11 @@ RT_INTERFACE!{interface IHidInputReportReceivedEventArgs(IHidInputReportReceived fn get_Report(&self, out: *mut *mut HidInputReport) -> HRESULT }} impl IHidInputReportReceivedEventArgs { - #[inline] pub unsafe fn get_report(&self) -> Result> { + #[inline] pub fn get_report(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Report)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class HidInputReportReceivedEventArgs: IHidInputReportReceivedEventArgs} DEFINE_IID!(IID_IHidNumericControl, 3817476773, 13735, 19317, 137, 200, 251, 31, 40, 177, 8, 35); @@ -14941,49 +14941,49 @@ RT_INTERFACE!{interface IHidNumericControl(IHidNumericControlVtbl): IInspectable fn get_ControlDescription(&self, out: *mut *mut HidNumericControlDescription) -> HRESULT }} impl IHidNumericControl { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_grouped(&self) -> Result { + }} + #[inline] pub fn get_is_grouped(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsGrouped)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_usage_page(&self) -> Result { + }} + #[inline] pub fn get_usage_page(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UsagePage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_usage_id(&self) -> Result { + }} + #[inline] pub fn get_usage_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UsageId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result { + }} + #[inline] pub fn get_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_value(&self, value: i64) -> Result<()> { + }} + #[inline] pub fn set_value(&self, value: i64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Value)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_scaled_value(&self) -> Result { + }} + #[inline] pub fn get_scaled_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ScaledValue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_scaled_value(&self, value: i64) -> Result<()> { + }} + #[inline] pub fn set_scaled_value(&self, value: i64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ScaledValue)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_control_description(&self) -> Result> { + }} + #[inline] pub fn get_control_description(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ControlDescription)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class HidNumericControl: IHidNumericControl} DEFINE_IID!(IID_IHidNumericControlDescription, 1670209158, 7575, 19573, 146, 127, 95, 245, 139, 160, 94, 50); @@ -15003,89 +15003,89 @@ RT_INTERFACE!{interface IHidNumericControlDescription(IHidNumericControlDescript fn get_Unit(&self, out: *mut u32) -> HRESULT, fn get_IsAbsolute(&self, out: *mut bool) -> HRESULT, fn get_HasNull(&self, out: *mut bool) -> HRESULT, - fn get_ParentCollections(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_ParentCollections(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IHidNumericControlDescription { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_id(&self) -> Result { + }} + #[inline] pub fn get_report_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReportId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_type(&self) -> Result { + }} + #[inline] pub fn get_report_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReportType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_size(&self) -> Result { + }} + #[inline] pub fn get_report_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReportSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_count(&self) -> Result { + }} + #[inline] pub fn get_report_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReportCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_usage_page(&self) -> Result { + }} + #[inline] pub fn get_usage_page(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UsagePage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_usage_id(&self) -> Result { + }} + #[inline] pub fn get_usage_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UsageId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_logical_minimum(&self) -> Result { + }} + #[inline] pub fn get_logical_minimum(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LogicalMinimum)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_logical_maximum(&self) -> Result { + }} + #[inline] pub fn get_logical_maximum(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LogicalMaximum)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_physical_minimum(&self) -> Result { + }} + #[inline] pub fn get_physical_minimum(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PhysicalMinimum)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_physical_maximum(&self) -> Result { + }} + #[inline] pub fn get_physical_maximum(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PhysicalMaximum)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_unit_exponent(&self) -> Result { + }} + #[inline] pub fn get_unit_exponent(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UnitExponent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_unit(&self) -> Result { + }} + #[inline] pub fn get_unit(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Unit)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_absolute(&self) -> Result { + }} + #[inline] pub fn get_is_absolute(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsAbsolute)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_null(&self) -> Result { + }} + #[inline] pub fn get_has_null(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasNull)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_parent_collections(&self) -> Result>> { + }} + #[inline] pub fn get_parent_collections(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ParentCollections)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class HidNumericControlDescription: IHidNumericControlDescription} DEFINE_IID!(IID_IHidOutputReport, 1657480516, 51350, 17507, 147, 193, 223, 157, 176, 83, 196, 80); @@ -15101,40 +15101,40 @@ RT_INTERFACE!{interface IHidOutputReport(IHidOutputReportVtbl): IInspectable(IIn fn GetNumericControlByDescription(&self, controlDescription: *mut HidNumericControlDescription, out: *mut *mut HidNumericControl) -> HRESULT }} impl IHidOutputReport { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_data(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Data)(self 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_data(&self, value: &super::super::storage::streams::IBuffer) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_data(&self, value: &super::super::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Data)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_boolean_control(&self, usagePage: u16, usageId: u16) -> Result> { + }} + #[inline] pub fn get_boolean_control(&self, usagePage: u16, usageId: u16) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetBooleanControl)(self as *const _ as *mut _, usagePage, usageId, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_boolean_control_by_description(&self, controlDescription: &HidBooleanControlDescription) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_boolean_control_by_description(&self, controlDescription: &HidBooleanControlDescription) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetBooleanControlByDescription)(self as *const _ as *mut _, 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(&self, usagePage: u16, usageId: u16) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_numeric_control(&self, usagePage: u16, usageId: u16) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetNumericControl)(self as *const _ as *mut _, usagePage, usageId, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_numeric_control_by_description(&self, controlDescription: &HidNumericControlDescription) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_numeric_control_by_description(&self, controlDescription: &HidNumericControlDescription) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetNumericControlByDescription)(self as *const _ as *mut _, controlDescription as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class HidOutputReport: IHidOutputReport} RT_ENUM! { enum HidReportType: i32 { @@ -15148,11 +15148,11 @@ RT_INTERFACE!{interface IKeyboardCapabilities(IKeyboardCapabilitiesVtbl): IInspe fn get_KeyboardPresent(&self, out: *mut i32) -> HRESULT }} impl IKeyboardCapabilities { - #[inline] pub unsafe fn get_keyboard_present(&self) -> Result { + #[inline] pub fn get_keyboard_present(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_KeyboardPresent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class KeyboardCapabilities: IKeyboardCapabilities} impl RtActivatable for KeyboardCapabilities {} @@ -15166,31 +15166,31 @@ RT_INTERFACE!{interface IMouseCapabilities(IMouseCapabilitiesVtbl): IInspectable fn get_NumberOfButtons(&self, out: *mut u32) -> HRESULT }} impl IMouseCapabilities { - #[inline] pub unsafe fn get_mouse_present(&self) -> Result { + #[inline] pub fn get_mouse_present(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MousePresent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_vertical_wheel_present(&self) -> Result { + }} + #[inline] pub fn get_vertical_wheel_present(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VerticalWheelPresent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_horizontal_wheel_present(&self) -> Result { + }} + #[inline] pub fn get_horizontal_wheel_present(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HorizontalWheelPresent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_swap_buttons(&self) -> Result { + }} + #[inline] pub fn get_swap_buttons(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SwapButtons)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_number_of_buttons(&self) -> Result { + }} + #[inline] pub fn get_number_of_buttons(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NumberOfButtons)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MouseCapabilities: IMouseCapabilities} impl RtActivatable for MouseCapabilities {} @@ -15200,26 +15200,26 @@ RT_STRUCT! { struct MouseDelta { }} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_MouseMoved(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_MouseMoved(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_MouseMoved(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl IMouseDevice { - #[inline] pub unsafe fn add_mouse_moved(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_mouse_moved(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_MouseMoved)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_mouse_moved(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_mouse_moved(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_MouseMoved)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MouseDevice: IMouseDevice} impl RtActivatable for MouseDevice {} impl MouseDevice { - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} + } } DEFINE_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]) [CLSID_MouseDevice]); DEFINE_IID!(IID_IMouseDeviceStatics, 1212846149, 28016, 18907, 142, 104, 70, 255, 189, 23, 211, 141); @@ -15227,22 +15227,22 @@ RT_INTERFACE!{static interface IMouseDeviceStatics(IMouseDeviceStaticsVtbl): IIn fn GetForCurrentView(&self, out: *mut *mut MouseDevice) -> HRESULT }} impl IMouseDeviceStatics { - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut MouseDelta) -> HRESULT }} impl IMouseEventArgs { - #[inline] pub unsafe fn get_mouse_delta(&self) -> Result { + #[inline] pub fn get_mouse_delta(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MouseDelta)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MouseEventArgs: IMouseEventArgs} DEFINE_IID!(IID_IPointerDevice, 2479471356, 60363, 18046, 130, 198, 39, 111, 234, 227, 107, 90); @@ -15250,51 +15250,51 @@ RT_INTERFACE!{interface IPointerDevice(IPointerDeviceVtbl): IInspectable(IInspec fn get_PointerDeviceType(&self, out: *mut PointerDeviceType) -> HRESULT, fn get_IsIntegrated(&self, out: *mut bool) -> HRESULT, fn get_MaxContacts(&self, out: *mut u32) -> HRESULT, - fn get_PhysicalDeviceRect(&self, out: *mut super::super::foundation::Rect) -> HRESULT, - fn get_ScreenRect(&self, out: *mut super::super::foundation::Rect) -> HRESULT, - fn get_SupportedUsages(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_PhysicalDeviceRect(&self, out: *mut foundation::Rect) -> HRESULT, + fn get_ScreenRect(&self, out: *mut foundation::Rect) -> HRESULT, + fn get_SupportedUsages(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IPointerDevice { - #[inline] pub unsafe fn get_pointer_device_type(&self) -> Result { + #[inline] pub fn get_pointer_device_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PointerDeviceType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_integrated(&self) -> Result { + }} + #[inline] pub fn get_is_integrated(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsIntegrated)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_contacts(&self) -> Result { + }} + #[inline] pub fn get_max_contacts(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxContacts)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_physical_device_rect(&self) -> Result { + }} + #[inline] pub fn get_physical_device_rect(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PhysicalDeviceRect)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_screen_rect(&self) -> Result { + }} + #[inline] pub fn get_screen_rect(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ScreenRect)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_usages(&self) -> Result>> { + }} + #[inline] pub fn get_supported_usages(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedUsages)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PointerDevice: IPointerDevice} impl RtActivatable for PointerDevice {} impl PointerDevice { - #[inline] pub fn get_pointer_device(pointerId: u32) -> Result> { unsafe { + #[inline] pub fn get_pointer_device(pointerId: u32) -> Result>> { >::get_activation_factory().get_pointer_device(pointerId) - }} - #[inline] pub fn get_pointer_devices() -> Result>> { unsafe { + } + #[inline] pub fn get_pointer_devices() -> Result>>> { >::get_activation_factory().get_pointer_devices() - }} + } } DEFINE_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]) [CLSID_PointerDevice]); DEFINE_IID!(IID_IPointerDevice2, 4171682464, 50308, 18591, 174, 62, 48, 210, 238, 31, 253, 62); @@ -15302,28 +15302,28 @@ RT_INTERFACE!{interface IPointerDevice2(IPointerDevice2Vtbl): IInspectable(IInsp fn get_MaxPointersWithZDistance(&self, out: *mut u32) -> HRESULT }} impl IPointerDevice2 { - #[inline] pub unsafe fn get_max_pointers_with_zdistance(&self) -> Result { + #[inline] pub fn get_max_pointers_with_zdistance(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxPointersWithZDistance)(self as *const _ as *mut _, &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(&self, pointerId: u32, out: *mut *mut PointerDevice) -> HRESULT, - fn GetPointerDevices(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn GetPointerDevices(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IPointerDeviceStatics { - #[inline] pub unsafe fn get_pointer_device(&self, pointerId: u32) -> Result> { + #[inline] pub fn get_pointer_device(&self, pointerId: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPointerDevice)(self as *const _ as *mut _, pointerId, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pointer_devices(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_pointer_devices(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPointerDevices)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum PointerDeviceType: i32 { Touch (PointerDeviceType_Touch) = 0, Pen (PointerDeviceType_Pen) = 1, Mouse (PointerDeviceType_Mouse) = 2, @@ -15337,16 +15337,16 @@ RT_INTERFACE!{interface ITouchCapabilities(ITouchCapabilitiesVtbl): IInspectable fn get_Contacts(&self, out: *mut u32) -> HRESULT }} impl ITouchCapabilities { - #[inline] pub unsafe fn get_touch_present(&self) -> Result { + #[inline] pub fn get_touch_present(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TouchPresent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_contacts(&self) -> Result { + }} + #[inline] pub fn get_contacts(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Contacts)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class TouchCapabilities: ITouchCapabilities} impl RtActivatable for TouchCapabilities {} @@ -15366,69 +15366,69 @@ RT_INTERFACE!{interface ILamp(ILampVtbl): IInspectable(IInspectableVtbl) [IID_IL #[cfg(feature="windows-ui")] fn get_Color(&self, out: *mut super::super::ui::Color) -> HRESULT, #[cfg(not(feature="windows-ui"))] fn __Dummy7(&self) -> (), #[cfg(feature="windows-ui")] fn put_Color(&self, value: super::super::ui::Color) -> HRESULT, - fn add_AvailabilityChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AvailabilityChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_AvailabilityChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AvailabilityChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl ILamp { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_brightness_level(&self) -> Result { + }} + #[inline] pub fn get_brightness_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BrightnessLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_brightness_level(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_brightness_level(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BrightnessLevel)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_color_settable(&self) -> Result { + }} + #[inline] pub fn get_is_color_settable(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsColorSettable)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_color(&self) -> Result { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Color)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn set_color(&self, value: super::super::ui::Color) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_color(&self, value: super::super::ui::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Color)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_availability_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_availability_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AvailabilityChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_availability_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_availability_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AvailabilityChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Lamp: ILamp} impl RtActivatable for Lamp {} impl Lamp { - #[inline] pub fn get_device_selector() -> Result { unsafe { + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} - #[inline] pub fn get_default_async() -> Result>> { unsafe { + } + #[inline] pub fn get_default_async() -> Result>> { >::get_activation_factory().get_default_async() - }} + } } DEFINE_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]) [CLSID_Lamp]); DEFINE_IID!(IID_ILampAvailabilityChangedEventArgs, 1332624877, 1954, 18845, 146, 96, 103, 227, 4, 83, 43, 164); @@ -15436,35 +15436,35 @@ RT_INTERFACE!{interface ILampAvailabilityChangedEventArgs(ILampAvailabilityChang fn get_IsAvailable(&self, out: *mut bool) -> HRESULT }} impl ILampAvailabilityChangedEventArgs { - #[inline] pub unsafe fn get_is_available(&self) -> Result { + #[inline] pub fn get_is_available(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsAvailable)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class LampAvailabilityChangedEventArgs: ILampAvailabilityChangedEventArgs} 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(&self, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetDefaultAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetDefaultAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ILampStatics { - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_async(&self) -> Result>> { + }} + #[inline] pub fn get_default_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefaultAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } } // Windows.Devices.Lights pub mod midi { // Windows.Devices.Midi @@ -15478,23 +15478,23 @@ RT_INTERFACE!{interface IMidiChannelPressureMessage(IMidiChannelPressureMessageV fn get_Pressure(&self, out: *mut u8) -> HRESULT }} impl IMidiChannelPressureMessage { - #[inline] pub unsafe fn get_channel(&self) -> Result { + #[inline] pub fn get_channel(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Channel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pressure(&self) -> Result { + }} + #[inline] pub fn get_pressure(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Pressure)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MidiChannelPressureMessage: IMidiChannelPressureMessage} impl RtActivatable for MidiChannelPressureMessage {} impl MidiChannelPressureMessage { - #[inline] pub fn create_midi_channel_pressure_message(channel: u8, pressure: u8) -> Result> { unsafe { + #[inline] pub fn create_midi_channel_pressure_message(channel: u8, pressure: u8) -> Result> { >::get_activation_factory().create_midi_channel_pressure_message(channel, pressure) - }} + } } DEFINE_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]) [CLSID_MidiChannelPressureMessage]); DEFINE_IID!(IID_IMidiChannelPressureMessageFactory, 1645800751, 8836, 16682, 148, 207, 16, 251, 4, 132, 44, 108); @@ -15502,11 +15502,11 @@ RT_INTERFACE!{static interface IMidiChannelPressureMessageFactory(IMidiChannelPr fn CreateMidiChannelPressureMessage(&self, channel: u8, pressure: u8, out: *mut *mut MidiChannelPressureMessage) -> HRESULT }} impl IMidiChannelPressureMessageFactory { - #[inline] pub unsafe fn create_midi_channel_pressure_message(&self, channel: u8, pressure: u8) -> Result> { + #[inline] pub fn create_midi_channel_pressure_message(&self, channel: u8, pressure: u8) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateMidiChannelPressureMessage)(self as *const _ as *mut _, channel, pressure, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class MidiContinueMessage: IMidiMessage} impl RtActivatable for MidiContinueMessage {} @@ -15518,28 +15518,28 @@ RT_INTERFACE!{interface IMidiControlChangeMessage(IMidiControlChangeMessageVtbl) fn get_ControlValue(&self, out: *mut u8) -> HRESULT }} impl IMidiControlChangeMessage { - #[inline] pub unsafe fn get_channel(&self) -> Result { + #[inline] pub fn get_channel(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Channel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_controller(&self) -> Result { + }} + #[inline] pub fn get_controller(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Controller)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_control_value(&self) -> Result { + }} + #[inline] pub fn get_control_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ControlValue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MidiControlChangeMessage: IMidiControlChangeMessage} impl RtActivatable for MidiControlChangeMessage {} impl MidiControlChangeMessage { - #[inline] pub fn create_midi_control_change_message(channel: u8, controller: u8, controlValue: u8) -> Result> { unsafe { + #[inline] pub fn create_midi_control_change_message(channel: u8, controller: u8, controlValue: u8) -> Result> { >::get_activation_factory().create_midi_control_change_message(channel, controller, controlValue) - }} + } } DEFINE_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]) [CLSID_MidiControlChangeMessage]); DEFINE_IID!(IID_IMidiControlChangeMessageFactory, 716260129, 38252, 18093, 151, 82, 248, 127, 85, 5, 47, 227); @@ -15547,96 +15547,96 @@ RT_INTERFACE!{static interface IMidiControlChangeMessageFactory(IMidiControlChan fn CreateMidiControlChangeMessage(&self, channel: u8, controller: u8, controlValue: u8, out: *mut *mut MidiControlChangeMessage) -> HRESULT }} impl IMidiControlChangeMessageFactory { - #[inline] pub unsafe fn create_midi_control_change_message(&self, channel: u8, controller: u8, controlValue: u8) -> Result> { + #[inline] pub fn create_midi_control_change_message(&self, channel: u8, controller: u8, controlValue: u8) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateMidiControlChangeMessage)(self as *const _ as *mut _, channel, controller, controlValue, &mut out); if hr == S_OK { Ok(ComPtr::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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_MessageReceived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_MessageReceived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_MessageReceived(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_DeviceId(&self, out: *mut HSTRING) -> HRESULT }} impl IMidiInPort { - #[inline] pub unsafe fn add_message_received(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_message_received(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_MessageReceived)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_message_received(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_message_received(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_MessageReceived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_id(&self) -> Result { + }} + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class MidiInPort: IMidiInPort} impl RtActivatable for MidiInPort {} impl MidiInPort { - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} - #[inline] pub fn get_device_selector() -> Result { unsafe { + } + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} + } } DEFINE_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]) [CLSID_MidiInPort]); 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(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetDeviceSelector(&self, out: *mut HSTRING) -> HRESULT }} impl IMidiInPortStatics { - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + }} + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_Timestamp(&self, out: *mut foundation::TimeSpan) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy1(&self) -> (), #[cfg(feature="windows-storage")] fn get_RawData(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, fn get_Type(&self, out: *mut MidiMessageType) -> HRESULT }} impl IMidiMessage { - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_raw_data(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_raw_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RawData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_type(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Type)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut IMidiMessage) -> HRESULT }} impl IMidiMessageReceivedEventArgs { - #[inline] pub unsafe fn get_message(&self) -> Result> { + #[inline] pub fn get_message(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Message)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MidiMessageReceivedEventArgs: IMidiMessageReceivedEventArgs} RT_ENUM! { enum MidiMessageType: i32 { @@ -15649,28 +15649,28 @@ RT_INTERFACE!{interface IMidiNoteOffMessage(IMidiNoteOffMessageVtbl): IInspectab fn get_Velocity(&self, out: *mut u8) -> HRESULT }} impl IMidiNoteOffMessage { - #[inline] pub unsafe fn get_channel(&self) -> Result { + #[inline] pub fn get_channel(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Channel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_note(&self) -> Result { + }} + #[inline] pub fn get_note(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Note)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_velocity(&self) -> Result { + }} + #[inline] pub fn get_velocity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Velocity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MidiNoteOffMessage: IMidiNoteOffMessage} impl RtActivatable for MidiNoteOffMessage {} impl MidiNoteOffMessage { - #[inline] pub fn create_midi_note_off_message(channel: u8, note: u8, velocity: u8) -> Result> { unsafe { + #[inline] pub fn create_midi_note_off_message(channel: u8, note: u8, velocity: u8) -> Result> { >::get_activation_factory().create_midi_note_off_message(channel, note, velocity) - }} + } } DEFINE_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]) [CLSID_MidiNoteOffMessage]); DEFINE_IID!(IID_IMidiNoteOffMessageFactory, 2796699872, 42825, 16991, 138, 244, 164, 217, 121, 204, 21, 181); @@ -15678,11 +15678,11 @@ RT_INTERFACE!{static interface IMidiNoteOffMessageFactory(IMidiNoteOffMessageFac fn CreateMidiNoteOffMessage(&self, channel: u8, note: u8, velocity: u8, out: *mut *mut MidiNoteOffMessage) -> HRESULT }} impl IMidiNoteOffMessageFactory { - #[inline] pub unsafe fn create_midi_note_off_message(&self, channel: u8, note: u8, velocity: u8) -> Result> { + #[inline] pub fn create_midi_note_off_message(&self, channel: u8, note: u8, velocity: u8) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateMidiNoteOffMessage)(self as *const _ as *mut _, channel, note, velocity, &mut out); if hr == S_OK { Ok(ComPtr::wrap(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] { @@ -15691,28 +15691,28 @@ RT_INTERFACE!{interface IMidiNoteOnMessage(IMidiNoteOnMessageVtbl): IInspectable fn get_Velocity(&self, out: *mut u8) -> HRESULT }} impl IMidiNoteOnMessage { - #[inline] pub unsafe fn get_channel(&self) -> Result { + #[inline] pub fn get_channel(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Channel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_note(&self) -> Result { + }} + #[inline] pub fn get_note(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Note)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_velocity(&self) -> Result { + }} + #[inline] pub fn get_velocity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Velocity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MidiNoteOnMessage: IMidiNoteOnMessage} impl RtActivatable for MidiNoteOnMessage {} impl MidiNoteOnMessage { - #[inline] pub fn create_midi_note_on_message(channel: u8, note: u8, velocity: u8) -> Result> { unsafe { + #[inline] pub fn create_midi_note_on_message(channel: u8, note: u8, velocity: u8) -> Result> { >::get_activation_factory().create_midi_note_on_message(channel, note, velocity) - }} + } } DEFINE_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]) [CLSID_MidiNoteOnMessage]); DEFINE_IID!(IID_IMidiNoteOnMessageFactory, 2604826784, 22977, 16910, 181, 23, 21, 161, 10, 169, 96, 107); @@ -15720,11 +15720,11 @@ RT_INTERFACE!{static interface IMidiNoteOnMessageFactory(IMidiNoteOnMessageFacto fn CreateMidiNoteOnMessage(&self, channel: u8, note: u8, velocity: u8, out: *mut *mut MidiNoteOnMessage) -> HRESULT }} impl IMidiNoteOnMessageFactory { - #[inline] pub unsafe fn create_midi_note_on_message(&self, channel: u8, note: u8, velocity: u8) -> Result> { + #[inline] pub fn create_midi_note_on_message(&self, channel: u8, note: u8, velocity: u8) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateMidiNoteOnMessage)(self as *const _ as *mut _, channel, note, velocity, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMidiOutPort, 2468179359, 22434, 19002, 173, 184, 70, 64, 136, 111, 102, 147); RT_INTERFACE!{interface IMidiOutPort(IMidiOutPortVtbl): IInspectable(IInspectableVtbl) [IID_IMidiOutPort] { @@ -15734,47 +15734,47 @@ RT_INTERFACE!{interface IMidiOutPort(IMidiOutPortVtbl): IInspectable(IInspectabl fn get_DeviceId(&self, out: *mut HSTRING) -> HRESULT }} impl IMidiOutPort { - #[inline] pub unsafe fn send_message(&self, midiMessage: &IMidiMessage) -> Result<()> { + #[inline] pub fn send_message(&self, midiMessage: &IMidiMessage) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SendMessage)(self as *const _ as *mut _, midiMessage as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn send_buffer(&self, midiData: &super::super::storage::streams::IBuffer) -> Result<()> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn send_buffer(&self, midiData: &super::super::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SendBuffer)(self as *const _ as *mut _, midiData as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_id(&self) -> Result { + }} + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class MidiOutPort: IMidiOutPort} impl RtActivatable for MidiOutPort {} impl MidiOutPort { - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} - #[inline] pub fn get_device_selector() -> Result { unsafe { + } + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} + } } DEFINE_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]) [CLSID_MidiOutPort]); 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(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetDeviceSelector(&self, out: *mut HSTRING) -> HRESULT }} impl IMidiOutPortStatics { - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + }} + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::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] { @@ -15782,23 +15782,23 @@ RT_INTERFACE!{interface IMidiPitchBendChangeMessage(IMidiPitchBendChangeMessageV fn get_Bend(&self, out: *mut u16) -> HRESULT }} impl IMidiPitchBendChangeMessage { - #[inline] pub unsafe fn get_channel(&self) -> Result { + #[inline] pub fn get_channel(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Channel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_bend(&self) -> Result { + }} + #[inline] pub fn get_bend(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Bend)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MidiPitchBendChangeMessage: IMidiPitchBendChangeMessage} impl RtActivatable for MidiPitchBendChangeMessage {} impl MidiPitchBendChangeMessage { - #[inline] pub fn create_midi_pitch_bend_change_message(channel: u8, bend: u16) -> Result> { unsafe { + #[inline] pub fn create_midi_pitch_bend_change_message(channel: u8, bend: u16) -> Result> { >::get_activation_factory().create_midi_pitch_bend_change_message(channel, bend) - }} + } } DEFINE_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]) [CLSID_MidiPitchBendChangeMessage]); DEFINE_IID!(IID_IMidiPitchBendChangeMessageFactory, 4126072661, 53192, 18726, 179, 14, 163, 98, 35, 147, 48, 108); @@ -15806,11 +15806,11 @@ RT_INTERFACE!{static interface IMidiPitchBendChangeMessageFactory(IMidiPitchBend fn CreateMidiPitchBendChangeMessage(&self, channel: u8, bend: u16, out: *mut *mut MidiPitchBendChangeMessage) -> HRESULT }} impl IMidiPitchBendChangeMessageFactory { - #[inline] pub unsafe fn create_midi_pitch_bend_change_message(&self, channel: u8, bend: u16) -> Result> { + #[inline] pub fn create_midi_pitch_bend_change_message(&self, channel: u8, bend: u16) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateMidiPitchBendChangeMessage)(self as *const _ as *mut _, channel, bend, &mut out); if hr == S_OK { Ok(ComPtr::wrap(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] { @@ -15819,28 +15819,28 @@ RT_INTERFACE!{interface IMidiPolyphonicKeyPressureMessage(IMidiPolyphonicKeyPres fn get_Pressure(&self, out: *mut u8) -> HRESULT }} impl IMidiPolyphonicKeyPressureMessage { - #[inline] pub unsafe fn get_channel(&self) -> Result { + #[inline] pub fn get_channel(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Channel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_note(&self) -> Result { + }} + #[inline] pub fn get_note(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Note)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pressure(&self) -> Result { + }} + #[inline] pub fn get_pressure(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Pressure)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MidiPolyphonicKeyPressureMessage: IMidiPolyphonicKeyPressureMessage} impl RtActivatable for MidiPolyphonicKeyPressureMessage {} impl MidiPolyphonicKeyPressureMessage { - #[inline] pub fn create_midi_polyphonic_key_pressure_message(channel: u8, note: u8, pressure: u8) -> Result> { unsafe { + #[inline] pub fn create_midi_polyphonic_key_pressure_message(channel: u8, note: u8, pressure: u8) -> Result> { >::get_activation_factory().create_midi_polyphonic_key_pressure_message(channel, note, pressure) - }} + } } DEFINE_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]) [CLSID_MidiPolyphonicKeyPressureMessage]); DEFINE_IID!(IID_IMidiPolyphonicKeyPressureMessageFactory, 3918481470, 50355, 19922, 145, 124, 227, 73, 129, 90, 27, 59); @@ -15848,11 +15848,11 @@ RT_INTERFACE!{static interface IMidiPolyphonicKeyPressureMessageFactory(IMidiPol fn CreateMidiPolyphonicKeyPressureMessage(&self, channel: u8, note: u8, pressure: u8, out: *mut *mut MidiPolyphonicKeyPressureMessage) -> HRESULT }} impl IMidiPolyphonicKeyPressureMessageFactory { - #[inline] pub unsafe fn create_midi_polyphonic_key_pressure_message(&self, channel: u8, note: u8, pressure: u8) -> Result> { + #[inline] pub fn create_midi_polyphonic_key_pressure_message(&self, channel: u8, note: u8, pressure: u8) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateMidiPolyphonicKeyPressureMessage)(self as *const _ as *mut _, channel, note, pressure, &mut out); if hr == S_OK { Ok(ComPtr::wrap(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] { @@ -15860,23 +15860,23 @@ RT_INTERFACE!{interface IMidiProgramChangeMessage(IMidiProgramChangeMessageVtbl) fn get_Program(&self, out: *mut u8) -> HRESULT }} impl IMidiProgramChangeMessage { - #[inline] pub unsafe fn get_channel(&self) -> Result { + #[inline] pub fn get_channel(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Channel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_program(&self) -> Result { + }} + #[inline] pub fn get_program(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Program)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MidiProgramChangeMessage: IMidiProgramChangeMessage} impl RtActivatable for MidiProgramChangeMessage {} impl MidiProgramChangeMessage { - #[inline] pub fn create_midi_program_change_message(channel: u8, program: u8) -> Result> { unsafe { + #[inline] pub fn create_midi_program_change_message(channel: u8, program: u8) -> Result> { >::get_activation_factory().create_midi_program_change_message(channel, program) - }} + } } DEFINE_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]) [CLSID_MidiProgramChangeMessage]); DEFINE_IID!(IID_IMidiProgramChangeMessageFactory, 3601875847, 21067, 16644, 156, 153, 101, 114, 191, 210, 226, 97); @@ -15884,29 +15884,29 @@ RT_INTERFACE!{static interface IMidiProgramChangeMessageFactory(IMidiProgramChan fn CreateMidiProgramChangeMessage(&self, channel: u8, program: u8, out: *mut *mut MidiProgramChangeMessage) -> HRESULT }} impl IMidiProgramChangeMessageFactory { - #[inline] pub unsafe fn create_midi_program_change_message(&self, channel: u8, program: u8) -> Result> { + #[inline] pub fn create_midi_program_change_message(&self, channel: u8, program: u8) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateMidiProgramChangeMessage)(self as *const _ as *mut _, channel, program, &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(&self, out: *mut u16) -> HRESULT }} impl IMidiSongPositionPointerMessage { - #[inline] pub unsafe fn get_beats(&self) -> Result { + #[inline] pub fn get_beats(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Beats)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MidiSongPositionPointerMessage: IMidiSongPositionPointerMessage} impl RtActivatable for MidiSongPositionPointerMessage {} impl MidiSongPositionPointerMessage { - #[inline] pub fn create_midi_song_position_pointer_message(beats: u16) -> Result> { unsafe { + #[inline] pub fn create_midi_song_position_pointer_message(beats: u16) -> Result> { >::get_activation_factory().create_midi_song_position_pointer_message(beats) - }} + } } DEFINE_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]) [CLSID_MidiSongPositionPointerMessage]); DEFINE_IID!(IID_IMidiSongPositionPointerMessageFactory, 2617305494, 61707, 20458, 179, 149, 245, 214, 207, 128, 246, 78); @@ -15914,29 +15914,29 @@ RT_INTERFACE!{static interface IMidiSongPositionPointerMessageFactory(IMidiSongP fn CreateMidiSongPositionPointerMessage(&self, beats: u16, out: *mut *mut MidiSongPositionPointerMessage) -> HRESULT }} impl IMidiSongPositionPointerMessageFactory { - #[inline] pub unsafe fn create_midi_song_position_pointer_message(&self, beats: u16) -> Result> { + #[inline] pub fn create_midi_song_position_pointer_message(&self, beats: u16) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateMidiSongPositionPointerMessage)(self as *const _ as *mut _, beats, &mut out); if hr == S_OK { Ok(ComPtr::wrap(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(&self, out: *mut u8) -> HRESULT }} impl IMidiSongSelectMessage { - #[inline] pub unsafe fn get_song(&self) -> Result { + #[inline] pub fn get_song(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Song)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MidiSongSelectMessage: IMidiSongSelectMessage} impl RtActivatable for MidiSongSelectMessage {} impl MidiSongSelectMessage { - #[inline] pub fn create_midi_song_select_message(song: u8) -> Result> { unsafe { + #[inline] pub fn create_midi_song_select_message(song: u8) -> Result> { >::get_activation_factory().create_midi_song_select_message(song) - }} + } } DEFINE_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]) [CLSID_MidiSongSelectMessage]); DEFINE_IID!(IID_IMidiSongSelectMessageFactory, 2223536356, 34632, 16681, 166, 108, 160, 84, 147, 247, 93, 170); @@ -15944,11 +15944,11 @@ RT_INTERFACE!{static interface IMidiSongSelectMessageFactory(IMidiSongSelectMess fn CreateMidiSongSelectMessage(&self, song: u8, out: *mut *mut MidiSongSelectMessage) -> HRESULT }} impl IMidiSongSelectMessageFactory { - #[inline] pub unsafe fn create_midi_song_select_message(&self, song: u8) -> Result> { + #[inline] pub fn create_midi_song_select_message(&self, song: u8) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateMidiSongSelectMessage)(self as *const _ as *mut _, song, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class MidiStartMessage: IMidiMessage} impl RtActivatable for MidiStartMessage {} @@ -15963,64 +15963,64 @@ RT_INTERFACE!{interface IMidiSynthesizer(IMidiSynthesizerVtbl): IInspectable(IIn fn put_Volume(&self, value: f64) -> HRESULT }} impl IMidiSynthesizer { - #[inline] pub unsafe fn get_audio_device(&self) -> Result> { + #[inline] pub fn get_audio_device(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioDevice)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_volume(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_volume(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Volume)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_volume(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_volume(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Volume)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MidiSynthesizer: IMidiSynthesizer} impl RtActivatable for MidiSynthesizer {} impl MidiSynthesizer { - #[inline] pub fn create_async() -> Result>> { unsafe { + #[inline] pub fn create_async() -> Result>> { >::get_activation_factory().create_async() - }} - #[inline] pub fn create_from_audio_device_async(audioDevice: &super::enumeration::DeviceInformation) -> Result>> { unsafe { + } + #[inline] pub fn create_from_audio_device_async(audioDevice: &super::enumeration::DeviceInformation) -> Result>> { >::get_activation_factory().create_from_audio_device_async(audioDevice) - }} - #[inline] pub fn is_synthesizer(midiDevice: &super::enumeration::DeviceInformation) -> Result { unsafe { + } + #[inline] pub fn is_synthesizer(midiDevice: &super::enumeration::DeviceInformation) -> Result { >::get_activation_factory().is_synthesizer(midiDevice) - }} + } } DEFINE_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]) [CLSID_MidiSynthesizer]); 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CreateFromAudioDeviceAsync(&self, audioDevice: *mut super::enumeration::DeviceInformation, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreateFromAudioDeviceAsync(&self, audioDevice: *mut super::enumeration::DeviceInformation, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn IsSynthesizer(&self, midiDevice: *mut super::enumeration::DeviceInformation, out: *mut bool) -> HRESULT }} impl IMidiSynthesizerStatics { - #[inline] pub unsafe fn create_async(&self) -> Result>> { + #[inline] pub fn create_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_from_audio_device_async(&self, audioDevice: &super::enumeration::DeviceInformation) -> Result>> { + }} + #[inline] pub fn create_from_audio_device_async(&self, audioDevice: &super::enumeration::DeviceInformation) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromAudioDeviceAsync)(self as *const _ as *mut _, audioDevice as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn is_synthesizer(&self, midiDevice: &super::enumeration::DeviceInformation) -> Result { + }} + #[inline] pub fn is_synthesizer(&self, midiDevice: &super::enumeration::DeviceInformation) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsSynthesizer)(self as *const _ as *mut _, midiDevice as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MidiSystemExclusiveMessage: IMidiMessage} impl RtActivatable for MidiSystemExclusiveMessage {} impl MidiSystemExclusiveMessage { - #[cfg(feature="windows-storage")] #[inline] pub fn create_midi_system_exclusive_message(rawData: &super::super::storage::streams::IBuffer) -> Result> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn create_midi_system_exclusive_message(rawData: &super::super::storage::streams::IBuffer) -> Result> { >::get_activation_factory().create_midi_system_exclusive_message(rawData) - }} + } } DEFINE_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]) [CLSID_MidiSystemExclusiveMessage]); DEFINE_IID!(IID_IMidiSystemExclusiveMessageFactory, 138273314, 15220, 17184, 155, 66, 12, 168, 84, 95, 138, 36); @@ -16028,11 +16028,11 @@ RT_INTERFACE!{static interface IMidiSystemExclusiveMessageFactory(IMidiSystemExc #[cfg(feature="windows-storage")] fn CreateMidiSystemExclusiveMessage(&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(&self, rawData: &super::super::storage::streams::IBuffer) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn create_midi_system_exclusive_message(&self, rawData: &super::super::storage::streams::IBuffer) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateMidiSystemExclusiveMessage)(self as *const _ as *mut _, rawData as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class MidiSystemResetMessage: IMidiMessage} impl RtActivatable for MidiSystemResetMessage {} @@ -16043,23 +16043,23 @@ RT_INTERFACE!{interface IMidiTimeCodeMessage(IMidiTimeCodeMessageVtbl): IInspect fn get_Values(&self, out: *mut u8) -> HRESULT }} impl IMidiTimeCodeMessage { - #[inline] pub unsafe fn get_frame_type(&self) -> Result { + #[inline] pub fn get_frame_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FrameType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_values(&self) -> Result { + }} + #[inline] pub fn get_values(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Values)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MidiTimeCodeMessage: IMidiTimeCodeMessage} impl RtActivatable for MidiTimeCodeMessage {} impl MidiTimeCodeMessage { - #[inline] pub fn create_midi_time_code_message(frameType: u8, values: u8) -> Result> { unsafe { + #[inline] pub fn create_midi_time_code_message(frameType: u8, values: u8) -> Result> { >::get_activation_factory().create_midi_time_code_message(frameType, values) - }} + } } DEFINE_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]) [CLSID_MidiTimeCodeMessage]); DEFINE_IID!(IID_IMidiTimeCodeMessageFactory, 3945830853, 30492, 16606, 185, 97, 23, 90, 116, 137, 168, 94); @@ -16067,11 +16067,11 @@ RT_INTERFACE!{static interface IMidiTimeCodeMessageFactory(IMidiTimeCodeMessageF fn CreateMidiTimeCodeMessage(&self, frameType: u8, values: u8, out: *mut *mut MidiTimeCodeMessage) -> HRESULT }} impl IMidiTimeCodeMessageFactory { - #[inline] pub unsafe fn create_midi_time_code_message(&self, frameType: u8, values: u8) -> Result> { + #[inline] pub fn create_midi_time_code_message(&self, frameType: u8, values: u8) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateMidiTimeCodeMessage)(self as *const _ as *mut _, frameType, values, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class MidiTimingClockMessage: IMidiMessage} impl RtActivatable for MidiTimingClockMessage {} @@ -16085,18 +16085,18 @@ use ::prelude::*; RT_CLASS!{static class KnownCameraIntrinsicsProperties} impl RtActivatable for KnownCameraIntrinsicsProperties {} impl KnownCameraIntrinsicsProperties { - #[inline] pub fn get_focal_length() -> Result { unsafe { + #[inline] pub fn get_focal_length() -> Result { >::get_activation_factory().get_focal_length() - }} - #[inline] pub fn get_principal_point() -> Result { unsafe { + } + #[inline] pub fn get_principal_point() -> Result { >::get_activation_factory().get_principal_point() - }} - #[inline] pub fn get_radial_distortion() -> Result { unsafe { + } + #[inline] pub fn get_radial_distortion() -> Result { >::get_activation_factory().get_radial_distortion() - }} - #[inline] pub fn get_tangential_distortion() -> Result { unsafe { + } + #[inline] pub fn get_tangential_distortion() -> Result { >::get_activation_factory().get_tangential_distortion() - }} + } } DEFINE_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]) [CLSID_KnownCameraIntrinsicsProperties]); DEFINE_IID!(IID_IKnownCameraIntrinsicsPropertiesStatics, 146815352, 17274, 19863, 166, 99, 253, 49, 149, 96, 2, 73); @@ -16107,39 +16107,39 @@ RT_INTERFACE!{static interface IKnownCameraIntrinsicsPropertiesStatics(IKnownCam fn get_TangentialDistortion(&self, out: *mut HSTRING) -> HRESULT }} impl IKnownCameraIntrinsicsPropertiesStatics { - #[inline] pub unsafe fn get_focal_length(&self) -> Result { + #[inline] pub fn get_focal_length(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FocalLength)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_principal_point(&self) -> Result { + }} + #[inline] pub fn get_principal_point(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PrincipalPoint)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_radial_distortion(&self) -> Result { + }} + #[inline] pub fn get_radial_distortion(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RadialDistortion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_tangential_distortion(&self) -> Result { + }} + #[inline] pub fn get_tangential_distortion(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TangentialDistortion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class KnownPerceptionColorFrameSourceProperties} impl RtActivatable for KnownPerceptionColorFrameSourceProperties {} impl KnownPerceptionColorFrameSourceProperties { - #[inline] pub fn get_exposure() -> Result { unsafe { + #[inline] pub fn get_exposure() -> Result { >::get_activation_factory().get_exposure() - }} - #[inline] pub fn get_auto_exposure_enabled() -> Result { unsafe { + } + #[inline] pub fn get_auto_exposure_enabled() -> Result { >::get_activation_factory().get_auto_exposure_enabled() - }} - #[inline] pub fn get_exposure_compensation() -> Result { unsafe { + } + #[inline] pub fn get_exposure_compensation() -> Result { >::get_activation_factory().get_exposure_compensation() - }} + } } DEFINE_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]) [CLSID_KnownPerceptionColorFrameSourceProperties]); DEFINE_IID!(IID_IKnownPerceptionColorFrameSourcePropertiesStatics, 1576127650, 504, 19079, 184, 89, 213, 229, 183, 225, 222, 75); @@ -16149,31 +16149,31 @@ RT_INTERFACE!{static interface IKnownPerceptionColorFrameSourcePropertiesStatics fn get_ExposureCompensation(&self, out: *mut HSTRING) -> HRESULT }} impl IKnownPerceptionColorFrameSourcePropertiesStatics { - #[inline] pub unsafe fn get_exposure(&self) -> Result { + #[inline] pub fn get_exposure(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Exposure)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_auto_exposure_enabled(&self) -> Result { + }} + #[inline] pub fn get_auto_exposure_enabled(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AutoExposureEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_exposure_compensation(&self) -> Result { + }} + #[inline] pub fn get_exposure_compensation(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExposureCompensation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class KnownPerceptionDepthFrameSourceProperties} impl RtActivatable for KnownPerceptionDepthFrameSourceProperties {} impl KnownPerceptionDepthFrameSourceProperties { - #[inline] pub fn get_min_depth() -> Result { unsafe { + #[inline] pub fn get_min_depth() -> Result { >::get_activation_factory().get_min_depth() - }} - #[inline] pub fn get_max_depth() -> Result { unsafe { + } + #[inline] pub fn get_max_depth() -> Result { >::get_activation_factory().get_max_depth() - }} + } } DEFINE_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]) [CLSID_KnownPerceptionDepthFrameSourceProperties]); DEFINE_IID!(IID_IKnownPerceptionDepthFrameSourcePropertiesStatics, 1576127650, 504, 19079, 184, 89, 213, 229, 183, 225, 222, 74); @@ -16182,39 +16182,39 @@ RT_INTERFACE!{static interface IKnownPerceptionDepthFrameSourcePropertiesStatics fn get_MaxDepth(&self, out: *mut HSTRING) -> HRESULT }} impl IKnownPerceptionDepthFrameSourcePropertiesStatics { - #[inline] pub unsafe fn get_min_depth(&self) -> Result { + #[inline] pub fn get_min_depth(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MinDepth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_depth(&self) -> Result { + }} + #[inline] pub fn get_max_depth(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxDepth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class KnownPerceptionFrameSourceProperties} impl RtActivatable for KnownPerceptionFrameSourceProperties {} impl RtActivatable for KnownPerceptionFrameSourceProperties {} impl KnownPerceptionFrameSourceProperties { - #[inline] pub fn get_id() -> Result { unsafe { + #[inline] pub fn get_id() -> Result { >::get_activation_factory().get_id() - }} - #[inline] pub fn get_physical_device_ids() -> Result { unsafe { + } + #[inline] pub fn get_physical_device_ids() -> Result { >::get_activation_factory().get_physical_device_ids() - }} - #[inline] pub fn get_frame_kind() -> Result { unsafe { + } + #[inline] pub fn get_frame_kind() -> Result { >::get_activation_factory().get_frame_kind() - }} - #[inline] pub fn get_device_model_version() -> Result { unsafe { + } + #[inline] pub fn get_device_model_version() -> Result { >::get_activation_factory().get_device_model_version() - }} - #[inline] pub fn get_enclosure_location() -> Result { unsafe { + } + #[inline] pub fn get_enclosure_location() -> Result { >::get_activation_factory().get_enclosure_location() - }} - #[inline] pub fn get_device_id() -> Result { unsafe { + } + #[inline] pub fn get_device_id() -> Result { >::get_activation_factory().get_device_id() - }} + } } DEFINE_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]) [CLSID_KnownPerceptionFrameSourceProperties]); DEFINE_IID!(IID_IKnownPerceptionFrameSourcePropertiesStatics, 1576127650, 504, 19079, 184, 89, 213, 229, 183, 225, 222, 71); @@ -16226,67 +16226,67 @@ RT_INTERFACE!{static interface IKnownPerceptionFrameSourcePropertiesStatics(IKno fn get_EnclosureLocation(&self, out: *mut HSTRING) -> HRESULT }} impl IKnownPerceptionFrameSourcePropertiesStatics { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_physical_device_ids(&self) -> Result { + }} + #[inline] pub fn get_physical_device_ids(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PhysicalDeviceIds)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_frame_kind(&self) -> Result { + }} + #[inline] pub fn get_frame_kind(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FrameKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_model_version(&self) -> Result { + }} + #[inline] pub fn get_device_model_version(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceModelVersion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_enclosure_location(&self) -> Result { + }} + #[inline] pub fn get_enclosure_location(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EnclosureLocation)(self as *const _ as *mut _, &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(&self, out: *mut HSTRING) -> HRESULT }} impl IKnownPerceptionFrameSourcePropertiesStatics2 { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class KnownPerceptionInfraredFrameSourceProperties} impl RtActivatable for KnownPerceptionInfraredFrameSourceProperties {} impl KnownPerceptionInfraredFrameSourceProperties { - #[inline] pub fn get_exposure() -> Result { unsafe { + #[inline] pub fn get_exposure() -> Result { >::get_activation_factory().get_exposure() - }} - #[inline] pub fn get_auto_exposure_enabled() -> Result { unsafe { + } + #[inline] pub fn get_auto_exposure_enabled() -> Result { >::get_activation_factory().get_auto_exposure_enabled() - }} - #[inline] pub fn get_exposure_compensation() -> Result { unsafe { + } + #[inline] pub fn get_exposure_compensation() -> Result { >::get_activation_factory().get_exposure_compensation() - }} - #[inline] pub fn get_active_illumination_enabled() -> Result { unsafe { + } + #[inline] pub fn get_active_illumination_enabled() -> Result { >::get_activation_factory().get_active_illumination_enabled() - }} - #[inline] pub fn get_ambient_subtraction_enabled() -> Result { unsafe { + } + #[inline] pub fn get_ambient_subtraction_enabled() -> Result { >::get_activation_factory().get_ambient_subtraction_enabled() - }} - #[inline] pub fn get_structure_light_pattern_enabled() -> Result { unsafe { + } + #[inline] pub fn get_structure_light_pattern_enabled() -> Result { >::get_activation_factory().get_structure_light_pattern_enabled() - }} - #[inline] pub fn get_interleaved_illumination_enabled() -> Result { unsafe { + } + #[inline] pub fn get_interleaved_illumination_enabled() -> Result { >::get_activation_factory().get_interleaved_illumination_enabled() - }} + } } DEFINE_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]) [CLSID_KnownPerceptionInfraredFrameSourceProperties]); DEFINE_IID!(IID_IKnownPerceptionInfraredFrameSourcePropertiesStatics, 1576127650, 504, 19079, 184, 89, 213, 229, 183, 225, 222, 73); @@ -16300,60 +16300,60 @@ RT_INTERFACE!{static interface IKnownPerceptionInfraredFrameSourcePropertiesStat fn get_InterleavedIlluminationEnabled(&self, out: *mut HSTRING) -> HRESULT }} impl IKnownPerceptionInfraredFrameSourcePropertiesStatics { - #[inline] pub unsafe fn get_exposure(&self) -> Result { + #[inline] pub fn get_exposure(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Exposure)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_auto_exposure_enabled(&self) -> Result { + }} + #[inline] pub fn get_auto_exposure_enabled(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AutoExposureEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_exposure_compensation(&self) -> Result { + }} + #[inline] pub fn get_exposure_compensation(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExposureCompensation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_active_illumination_enabled(&self) -> Result { + }} + #[inline] pub fn get_active_illumination_enabled(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ActiveIlluminationEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ambient_subtraction_enabled(&self) -> Result { + }} + #[inline] pub fn get_ambient_subtraction_enabled(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AmbientSubtractionEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_structure_light_pattern_enabled(&self) -> Result { + }} + #[inline] pub fn get_structure_light_pattern_enabled(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StructureLightPatternEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_interleaved_illumination_enabled(&self) -> Result { + }} + #[inline] pub fn get_interleaved_illumination_enabled(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InterleavedIlluminationEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class KnownPerceptionVideoFrameSourceProperties} impl RtActivatable for KnownPerceptionVideoFrameSourceProperties {} impl KnownPerceptionVideoFrameSourceProperties { - #[inline] pub fn get_video_profile() -> Result { unsafe { + #[inline] pub fn get_video_profile() -> Result { >::get_activation_factory().get_video_profile() - }} - #[inline] pub fn get_supported_video_profiles() -> Result { unsafe { + } + #[inline] pub fn get_supported_video_profiles() -> Result { >::get_activation_factory().get_supported_video_profiles() - }} - #[inline] pub fn get_available_video_profiles() -> Result { unsafe { + } + #[inline] pub fn get_available_video_profiles() -> Result { >::get_activation_factory().get_available_video_profiles() - }} - #[inline] pub fn get_is_mirrored() -> Result { unsafe { + } + #[inline] pub fn get_is_mirrored() -> Result { >::get_activation_factory().get_is_mirrored() - }} - #[inline] pub fn get_camera_intrinsics() -> Result { unsafe { + } + #[inline] pub fn get_camera_intrinsics() -> Result { >::get_activation_factory().get_camera_intrinsics() - }} + } } DEFINE_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]) [CLSID_KnownPerceptionVideoFrameSourceProperties]); DEFINE_IID!(IID_IKnownPerceptionVideoFrameSourcePropertiesStatics, 1576127650, 504, 19079, 184, 89, 213, 229, 183, 225, 222, 72); @@ -16365,50 +16365,50 @@ RT_INTERFACE!{static interface IKnownPerceptionVideoFrameSourcePropertiesStatics fn get_CameraIntrinsics(&self, out: *mut HSTRING) -> HRESULT }} impl IKnownPerceptionVideoFrameSourcePropertiesStatics { - #[inline] pub unsafe fn get_video_profile(&self) -> Result { + #[inline] pub fn get_video_profile(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoProfile)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_video_profiles(&self) -> Result { + }} + #[inline] pub fn get_supported_video_profiles(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedVideoProfiles)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_available_video_profiles(&self) -> Result { + }} + #[inline] pub fn get_available_video_profiles(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AvailableVideoProfiles)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_mirrored(&self) -> Result { + }} + #[inline] pub fn get_is_mirrored(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsMirrored)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_camera_intrinsics(&self) -> Result { + }} + #[inline] pub fn get_camera_intrinsics(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CameraIntrinsics)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class KnownPerceptionVideoProfileProperties} impl RtActivatable for KnownPerceptionVideoProfileProperties {} impl KnownPerceptionVideoProfileProperties { - #[inline] pub fn get_bitmap_pixel_format() -> Result { unsafe { + #[inline] pub fn get_bitmap_pixel_format() -> Result { >::get_activation_factory().get_bitmap_pixel_format() - }} - #[inline] pub fn get_bitmap_alpha_mode() -> Result { unsafe { + } + #[inline] pub fn get_bitmap_alpha_mode() -> Result { >::get_activation_factory().get_bitmap_alpha_mode() - }} - #[inline] pub fn get_width() -> Result { unsafe { + } + #[inline] pub fn get_width() -> Result { >::get_activation_factory().get_width() - }} - #[inline] pub fn get_height() -> Result { unsafe { + } + #[inline] pub fn get_height() -> Result { >::get_activation_factory().get_height() - }} - #[inline] pub fn get_frame_duration() -> Result { unsafe { + } + #[inline] pub fn get_frame_duration() -> Result { >::get_activation_factory().get_frame_duration() - }} + } } DEFINE_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]) [CLSID_KnownPerceptionVideoProfileProperties]); DEFINE_IID!(IID_IKnownPerceptionVideoProfilePropertiesStatics, 2399724263, 23158, 17379, 161, 58, 218, 61, 145, 169, 239, 152); @@ -16420,292 +16420,292 @@ RT_INTERFACE!{static interface IKnownPerceptionVideoProfilePropertiesStatics(IKn fn get_FrameDuration(&self, out: *mut HSTRING) -> HRESULT }} impl IKnownPerceptionVideoProfilePropertiesStatics { - #[inline] pub unsafe fn get_bitmap_pixel_format(&self) -> Result { + #[inline] pub fn get_bitmap_pixel_format(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BitmapPixelFormat)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_bitmap_alpha_mode(&self) -> Result { + }} + #[inline] pub fn get_bitmap_alpha_mode(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BitmapAlphaMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_width(&self) -> Result { + }} + #[inline] pub fn get_width(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Width)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_height(&self) -> Result { + }} + #[inline] pub fn get_height(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Height)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_frame_duration(&self) -> Result { + }} + #[inline] pub fn get_frame_duration(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FrameDuration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::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(&self, out: *mut *mut super::super::media::VideoFrame) -> HRESULT }} impl IPerceptionColorFrame { - #[cfg(feature="windows-media")] #[inline] pub unsafe fn get_video_frame(&self) -> Result> { + #[cfg(feature="windows-media")] #[inline] pub fn get_video_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFrame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PerceptionColorFrame: IPerceptionColorFrame} 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(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_RelativeTime(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn TryOpenFrame(&self, out: *mut *mut PerceptionColorFrame) -> HRESULT }} impl IPerceptionColorFrameArrivedEventArgs { - #[inline] pub unsafe fn get_relative_time(&self) -> Result { + #[inline] pub fn get_relative_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RelativeTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn try_open_frame(&self) -> Result> { + }} + #[inline] pub fn try_open_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryOpenFrame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PerceptionColorFrameArrivedEventArgs: IPerceptionColorFrameArrivedEventArgs} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_FrameArrived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_FrameArrived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_FrameArrived(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_Source(&self, out: *mut *mut PerceptionColorFrameSource) -> HRESULT, fn get_IsPaused(&self, out: *mut bool) -> HRESULT, fn put_IsPaused(&self, value: bool) -> HRESULT, fn TryReadLatestFrame(&self, out: *mut *mut PerceptionColorFrame) -> HRESULT }} impl IPerceptionColorFrameReader { - #[inline] pub unsafe fn add_frame_arrived(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_frame_arrived(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_FrameArrived)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_frame_arrived(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_frame_arrived(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_FrameArrived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_source(&self) -> Result> { + }} + #[inline] pub fn get_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Source)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_paused(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_paused(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPaused)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_paused(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_paused(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsPaused)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn try_read_latest_frame(&self) -> Result> { + }} + #[inline] pub fn try_read_latest_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryReadLatestFrame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PerceptionColorFrameReader: IPerceptionColorFrameReader} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AvailableChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ActiveChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ActiveChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PropertiesChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PropertiesChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_VideoProfileChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_VideoProfileChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_CameraIntrinsicsChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CameraIntrinsicsChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_AvailableChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AvailableChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ActiveChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ActiveChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PropertiesChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PropertiesChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_VideoProfileChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_VideoProfileChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_CameraIntrinsicsChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CameraIntrinsicsChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_Id(&self, out: *mut HSTRING) -> HRESULT, fn get_DisplayName(&self, out: *mut HSTRING) -> HRESULT, fn get_DeviceKind(&self, out: *mut HSTRING) -> HRESULT, fn get_Available(&self, out: *mut bool) -> HRESULT, fn get_Active(&self, out: *mut bool) -> HRESULT, fn get_IsControlled(&self, out: *mut bool) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, - fn get_SupportedVideoProfiles(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_AvailableVideoProfiles(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Properties(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT, + fn get_SupportedVideoProfiles(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_AvailableVideoProfiles(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_VideoProfile(&self, out: *mut *mut PerceptionVideoProfile) -> HRESULT, #[cfg(not(feature="windows-media"))] fn __Dummy20(&self) -> (), #[cfg(feature="windows-media")] fn get_CameraIntrinsics(&self, out: *mut *mut super::super::media::devices::core::CameraIntrinsics) -> HRESULT, fn AcquireControlSession(&self, out: *mut *mut PerceptionControlSession) -> HRESULT, fn CanControlIndependentlyFrom(&self, targetId: HSTRING, out: *mut bool) -> HRESULT, fn IsCorrelatedWith(&self, targetId: HSTRING, out: *mut bool) -> HRESULT, - fn TryGetTransformTo(&self, targetId: HSTRING, result: *mut super::super::foundation::numerics::Matrix4x4, out: *mut bool) -> HRESULT, - fn TryGetDepthCorrelatedCameraIntrinsicsAsync(&self, correlatedDepthFrameSource: *mut PerceptionDepthFrameSource, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryGetDepthCorrelatedCoordinateMapperAsync(&self, targetSourceId: HSTRING, correlatedDepthFrameSource: *mut PerceptionDepthFrameSource, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TrySetVideoProfileAsync(&self, controlSession: *mut PerceptionControlSession, profile: *mut PerceptionVideoProfile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TryGetTransformTo(&self, targetId: HSTRING, result: *mut foundation::numerics::Matrix4x4, out: *mut bool) -> HRESULT, + fn TryGetDepthCorrelatedCameraIntrinsicsAsync(&self, correlatedDepthFrameSource: *mut PerceptionDepthFrameSource, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryGetDepthCorrelatedCoordinateMapperAsync(&self, targetSourceId: HSTRING, correlatedDepthFrameSource: *mut PerceptionDepthFrameSource, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TrySetVideoProfileAsync(&self, controlSession: *mut PerceptionControlSession, profile: *mut PerceptionVideoProfile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn OpenReader(&self, out: *mut *mut PerceptionColorFrameReader) -> HRESULT }} impl IPerceptionColorFrameSource { - #[inline] pub unsafe fn add_available_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_available_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AvailableChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_available_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_available_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AvailableChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_active_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_active_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ActiveChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_active_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_active_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ActiveChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_properties_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_properties_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PropertiesChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_properties_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_properties_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PropertiesChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_video_profile_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_video_profile_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_VideoProfileChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_video_profile_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_video_profile_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_VideoProfileChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_camera_intrinsics_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_camera_intrinsics_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CameraIntrinsicsChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_camera_intrinsics_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_camera_intrinsics_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CameraIntrinsicsChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&self) -> Result { + }} + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_kind(&self) -> Result { + }} + #[inline] pub fn get_device_kind(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_available(&self) -> Result { + }} + #[inline] pub fn get_available(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Available)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_active(&self) -> Result { + }} + #[inline] pub fn get_active(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Active)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_controlled(&self) -> Result { + }} + #[inline] pub fn get_is_controlled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsControlled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_video_profiles(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_supported_video_profiles(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedVideoProfiles)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_available_video_profiles(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_available_video_profiles(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AvailableVideoProfiles)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_profile(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_video_profile(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoProfile)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-media")] #[inline] pub unsafe fn get_camera_intrinsics(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-media")] #[inline] pub fn get_camera_intrinsics(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CameraIntrinsics)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn acquire_control_session(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn acquire_control_session(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AcquireControlSession)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn can_control_independently_from(&self, targetId: &HStringArg) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn can_control_independently_from(&self, targetId: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).CanControlIndependentlyFrom)(self as *const _ as *mut _, targetId.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_correlated_with(&self, targetId: &HStringArg) -> Result { + }} + #[inline] pub fn is_correlated_with(&self, targetId: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsCorrelatedWith)(self as *const _ as *mut _, targetId.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn try_get_transform_to(&self, targetId: &HStringArg) -> Result<(super::super::foundation::numerics::Matrix4x4, bool)> { + }} + #[inline] pub fn try_get_transform_to(&self, targetId: &HStringArg) -> Result<(foundation::numerics::Matrix4x4, bool)> { unsafe { let mut result = zeroed(); let mut out = zeroed(); let hr = ((*self.lpVtbl).TryGetTransformTo)(self as *const _ as *mut _, 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(&self, correlatedDepthFrameSource: &PerceptionDepthFrameSource) -> Result>> { + }} + #[inline] pub fn try_get_depth_correlated_camera_intrinsics_async(&self, correlatedDepthFrameSource: &PerceptionDepthFrameSource) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetDepthCorrelatedCameraIntrinsicsAsync)(self as *const _ as *mut _, 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(&self, targetSourceId: &HStringArg, correlatedDepthFrameSource: &PerceptionDepthFrameSource) -> Result>> { + }} + #[inline] pub fn try_get_depth_correlated_coordinate_mapper_async(&self, targetSourceId: &HStringArg, correlatedDepthFrameSource: &PerceptionDepthFrameSource) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetDepthCorrelatedCoordinateMapperAsync)(self as *const _ as *mut _, 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(&self, controlSession: &PerceptionControlSession, profile: &PerceptionVideoProfile) -> Result>> { + }} + #[inline] pub fn try_set_video_profile_async(&self, controlSession: &PerceptionControlSession, profile: &PerceptionVideoProfile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TrySetVideoProfileAsync)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[inline] pub fn open_reader(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenReader)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PerceptionColorFrameSource: IPerceptionColorFrameSource} impl RtActivatable for PerceptionColorFrameSource {} impl PerceptionColorFrameSource { - #[inline] pub fn create_watcher() -> Result> { unsafe { + #[inline] pub fn create_watcher() -> Result>> { >::get_activation_factory().create_watcher() - }} - #[inline] pub fn find_all_async() -> Result>>> { unsafe { + } + #[inline] pub fn find_all_async() -> Result>>> { >::get_activation_factory().find_all_async() - }} - #[inline] pub fn from_id_async(id: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(id: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(id) - }} - #[inline] pub fn request_access_async() -> Result>> { unsafe { + } + #[inline] pub fn request_access_async() -> Result>> { >::get_activation_factory().request_access_async() - }} + } } DEFINE_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]) [CLSID_PerceptionColorFrameSource]); DEFINE_IID!(IID_IPerceptionColorFrameSource2, 4169140453, 22065, 17901, 173, 152, 140, 106, 160, 76, 251, 145); @@ -16713,22 +16713,22 @@ RT_INTERFACE!{interface IPerceptionColorFrameSource2(IPerceptionColorFrameSource fn get_DeviceId(&self, out: *mut HSTRING) -> HRESULT }} impl IPerceptionColorFrameSource2 { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut PerceptionColorFrameSource) -> HRESULT }} impl IPerceptionColorFrameSourceAddedEventArgs { - #[inline] pub unsafe fn get_frame_source(&self) -> Result> { + #[inline] pub fn get_frame_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FrameSource)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PerceptionColorFrameSourceAddedEventArgs: IPerceptionColorFrameSourceAddedEventArgs} DEFINE_IID!(IID_IPerceptionColorFrameSourceRemovedEventArgs, 3531078249, 60236, 17135, 186, 79, 40, 143, 97, 92, 147, 193); @@ -16736,187 +16736,187 @@ RT_INTERFACE!{interface IPerceptionColorFrameSourceRemovedEventArgs(IPerceptionC fn get_FrameSource(&self, out: *mut *mut PerceptionColorFrameSource) -> HRESULT }} impl IPerceptionColorFrameSourceRemovedEventArgs { - #[inline] pub unsafe fn get_frame_source(&self) -> Result> { + #[inline] pub fn get_frame_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FrameSource)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PerceptionColorFrameSourceRemovedEventArgs: IPerceptionColorFrameSourceRemovedEventArgs} 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(&self, out: *mut *mut PerceptionColorFrameSourceWatcher) -> HRESULT, - fn FindAllAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn FromIdAsync(&self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestAccessAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FindAllAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn FromIdAsync(&self, id: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestAccessAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IPerceptionColorFrameSourceStatics { - #[inline] pub unsafe fn create_watcher(&self) -> Result> { + #[inline] pub fn create_watcher(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWatcher)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_all_async(&self) -> Result>>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn find_all_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, id: &HStringArg) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, id: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, id.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_access_async(&self) -> Result>> { + }} + #[inline] pub fn request_access_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SourceAdded(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_SourceRemoved(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SourceRemoved(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Stopped(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Stopped(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_EnumerationCompleted(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_EnumerationCompleted(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_SourceAdded(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceAdded(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_SourceRemoved(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceRemoved(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Stopped(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Stopped(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_EnumerationCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnumerationCompleted(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_Status(&self, out: *mut super::enumeration::DeviceWatcherStatus) -> HRESULT, fn Start(&self) -> HRESULT, fn Stop(&self) -> HRESULT }} impl IPerceptionColorFrameSourceWatcher { - #[inline] pub unsafe fn add_source_added(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_source_added(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SourceAdded)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_source_added(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_source_added(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SourceAdded)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_source_removed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_source_removed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SourceRemoved)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_source_removed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_source_removed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SourceRemoved)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_stopped(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_stopped(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Stopped)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_stopped(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_stopped(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Stopped)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_enumeration_completed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_enumeration_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_EnumerationCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_enumeration_completed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_enumeration_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_EnumerationCompleted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PerceptionColorFrameSourceWatcher: IPerceptionColorFrameSourceWatcher} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ControlLost(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn TrySetPropertyAsync(&self, name: HSTRING, value: *mut IInspectable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn add_ControlLost(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ControlLost(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn TrySetPropertyAsync(&self, name: HSTRING, value: *mut IInspectable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IPerceptionControlSession { - #[inline] pub unsafe fn add_control_lost(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_control_lost(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ControlLost)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_control_lost(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_control_lost(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ControlLost)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn try_set_property_async(&self, name: &HStringArg, value: &IInspectable) -> Result>> { + }} + #[inline] pub fn try_set_property_async(&self, name: &HStringArg, value: &IInspectable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TrySetPropertyAsync)(self as *const _ as *mut _, name.get(), value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PerceptionControlSession: IPerceptionControlSession} 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(&self, pixelCoordinate: super::super::foundation::Point, depthFrame: *mut PerceptionDepthFrame, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, - fn UnprojectPixelsAtCorrelatedDepth(&self, sourceCoordinatesSize: u32, sourceCoordinates: *mut super::super::foundation::Point, depthFrame: *mut PerceptionDepthFrame, resultsSize: u32, results: *mut super::super::foundation::numerics::Vector3) -> HRESULT, - fn UnprojectRegionPixelsAtCorrelatedDepthAsync(&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(&self, depthFrame: *mut PerceptionDepthFrame, resultsSize: u32, results: *mut super::super::foundation::numerics::Vector3, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn UnprojectPixelAtCorrelatedDepth(&self, pixelCoordinate: foundation::Point, depthFrame: *mut PerceptionDepthFrame, out: *mut foundation::numerics::Vector3) -> HRESULT, + fn UnprojectPixelsAtCorrelatedDepth(&self, sourceCoordinatesSize: u32, sourceCoordinates: *mut foundation::Point, depthFrame: *mut PerceptionDepthFrame, resultsSize: u32, results: *mut foundation::numerics::Vector3) -> HRESULT, + fn UnprojectRegionPixelsAtCorrelatedDepthAsync(&self, region: foundation::Rect, depthFrame: *mut PerceptionDepthFrame, resultsSize: u32, results: *mut foundation::numerics::Vector3, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn UnprojectAllPixelsAtCorrelatedDepthAsync(&self, depthFrame: *mut PerceptionDepthFrame, resultsSize: u32, results: *mut foundation::numerics::Vector3, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IPerceptionDepthCorrelatedCameraIntrinsics { - #[inline] pub unsafe fn unproject_pixel_at_correlated_depth(&self, pixelCoordinate: super::super::foundation::Point, depthFrame: &PerceptionDepthFrame) -> Result { + #[inline] pub fn unproject_pixel_at_correlated_depth(&self, pixelCoordinate: foundation::Point, depthFrame: &PerceptionDepthFrame) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).UnprojectPixelAtCorrelatedDepth)(self as *const _ as *mut _, 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(&self, sourceCoordinates: &[super::super::foundation::Point], depthFrame: &PerceptionDepthFrame, results: &mut [super::super::foundation::numerics::Vector3]) -> Result<()> { + }} + #[inline] pub fn unproject_pixels_at_correlated_depth(&self, sourceCoordinates: &[foundation::Point], depthFrame: &PerceptionDepthFrame, results: &mut [foundation::numerics::Vector3]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).UnprojectPixelsAtCorrelatedDepth)(self as *const _ as *mut _, sourceCoordinates.len() as u32, sourceCoordinates.as_ptr() as *mut _, depthFrame as *const _ as *mut _, results.len() as u32, results.as_mut_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn unproject_region_pixels_at_correlated_depth_async(&self, region: super::super::foundation::Rect, depthFrame: &PerceptionDepthFrame, results: &mut [super::super::foundation::numerics::Vector3]) -> Result> { + }} + #[inline] pub fn unproject_region_pixels_at_correlated_depth_async(&self, region: foundation::Rect, depthFrame: &PerceptionDepthFrame, results: &mut [foundation::numerics::Vector3]) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UnprojectRegionPixelsAtCorrelatedDepthAsync)(self as *const _ as *mut _, region, depthFrame as *const _ as *mut _, results.len() as u32, results.as_mut_ptr() as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn unproject_all_pixels_at_correlated_depth_async(&self, depthFrame: &PerceptionDepthFrame, results: &mut [super::super::foundation::numerics::Vector3]) -> Result> { + }} + #[inline] pub fn unproject_all_pixels_at_correlated_depth_async(&self, depthFrame: &PerceptionDepthFrame, results: &mut [foundation::numerics::Vector3]) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UnprojectAllPixelsAtCorrelatedDepthAsync)(self as *const _ as *mut _, depthFrame as *const _ as *mut _, results.len() as u32, results.as_mut_ptr() as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PerceptionDepthCorrelatedCameraIntrinsics: IPerceptionDepthCorrelatedCameraIntrinsics} 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(&self, sourcePixelCoordinate: super::super::foundation::Point, depthFrame: *mut PerceptionDepthFrame, out: *mut super::super::foundation::Point) -> HRESULT, - fn MapPixelsToTarget(&self, sourceCoordinatesSize: u32, sourceCoordinates: *mut super::super::foundation::Point, depthFrame: *mut PerceptionDepthFrame, resultsSize: u32, results: *mut super::super::foundation::Point) -> HRESULT, - fn MapRegionOfPixelsToTargetAsync(&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(&self, depthFrame: *mut PerceptionDepthFrame, targetCoordinatesSize: u32, targetCoordinates: *mut super::super::foundation::Point, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn MapPixelToTarget(&self, sourcePixelCoordinate: foundation::Point, depthFrame: *mut PerceptionDepthFrame, out: *mut foundation::Point) -> HRESULT, + fn MapPixelsToTarget(&self, sourceCoordinatesSize: u32, sourceCoordinates: *mut foundation::Point, depthFrame: *mut PerceptionDepthFrame, resultsSize: u32, results: *mut foundation::Point) -> HRESULT, + fn MapRegionOfPixelsToTargetAsync(&self, region: foundation::Rect, depthFrame: *mut PerceptionDepthFrame, targetCoordinatesSize: u32, targetCoordinates: *mut foundation::Point, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn MapAllPixelsToTargetAsync(&self, depthFrame: *mut PerceptionDepthFrame, targetCoordinatesSize: u32, targetCoordinates: *mut foundation::Point, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IPerceptionDepthCorrelatedCoordinateMapper { - #[inline] pub unsafe fn map_pixel_to_target(&self, sourcePixelCoordinate: super::super::foundation::Point, depthFrame: &PerceptionDepthFrame) -> Result { + #[inline] pub fn map_pixel_to_target(&self, sourcePixelCoordinate: foundation::Point, depthFrame: &PerceptionDepthFrame) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).MapPixelToTarget)(self as *const _ as *mut _, 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(&self, sourceCoordinates: &[super::super::foundation::Point], depthFrame: &PerceptionDepthFrame, results: &mut [super::super::foundation::Point]) -> Result<()> { + }} + #[inline] pub fn map_pixels_to_target(&self, sourceCoordinates: &[foundation::Point], depthFrame: &PerceptionDepthFrame, results: &mut [foundation::Point]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).MapPixelsToTarget)(self as *const _ as *mut _, sourceCoordinates.len() as u32, sourceCoordinates.as_ptr() as *mut _, depthFrame as *const _ as *mut _, results.len() as u32, results.as_mut_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn map_region_of_pixels_to_target_async(&self, region: super::super::foundation::Rect, depthFrame: &PerceptionDepthFrame, targetCoordinates: &mut [super::super::foundation::Point]) -> Result> { + }} + #[inline] pub fn map_region_of_pixels_to_target_async(&self, region: foundation::Rect, depthFrame: &PerceptionDepthFrame, targetCoordinates: &mut [foundation::Point]) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MapRegionOfPixelsToTargetAsync)(self as *const _ as *mut _, region, depthFrame as *const _ as *mut _, targetCoordinates.len() as u32, targetCoordinates.as_mut_ptr() as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn map_all_pixels_to_target_async(&self, depthFrame: &PerceptionDepthFrame, targetCoordinates: &mut [super::super::foundation::Point]) -> Result> { + }} + #[inline] pub fn map_all_pixels_to_target_async(&self, depthFrame: &PerceptionDepthFrame, targetCoordinates: &mut [foundation::Point]) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MapAllPixelsToTargetAsync)(self as *const _ as *mut _, depthFrame as *const _ as *mut _, targetCoordinates.len() as u32, targetCoordinates.as_mut_ptr() as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PerceptionDepthCorrelatedCoordinateMapper: IPerceptionDepthCorrelatedCoordinateMapper} DEFINE_IID!(IID_IPerceptionDepthFrame, 2742780412, 39174, 20477, 145, 97, 0, 36, 179, 96, 182, 87); @@ -16924,261 +16924,261 @@ RT_INTERFACE!{interface IPerceptionDepthFrame(IPerceptionDepthFrameVtbl): IInspe #[cfg(feature="windows-media")] fn get_VideoFrame(&self, out: *mut *mut super::super::media::VideoFrame) -> HRESULT }} impl IPerceptionDepthFrame { - #[cfg(feature="windows-media")] #[inline] pub unsafe fn get_video_frame(&self) -> Result> { + #[cfg(feature="windows-media")] #[inline] pub fn get_video_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFrame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PerceptionDepthFrame: IPerceptionDepthFrame} 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(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_RelativeTime(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn TryOpenFrame(&self, out: *mut *mut PerceptionDepthFrame) -> HRESULT }} impl IPerceptionDepthFrameArrivedEventArgs { - #[inline] pub unsafe fn get_relative_time(&self) -> Result { + #[inline] pub fn get_relative_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RelativeTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn try_open_frame(&self) -> Result> { + }} + #[inline] pub fn try_open_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryOpenFrame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PerceptionDepthFrameArrivedEventArgs: IPerceptionDepthFrameArrivedEventArgs} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_FrameArrived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_FrameArrived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_FrameArrived(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_Source(&self, out: *mut *mut PerceptionDepthFrameSource) -> HRESULT, fn get_IsPaused(&self, out: *mut bool) -> HRESULT, fn put_IsPaused(&self, value: bool) -> HRESULT, fn TryReadLatestFrame(&self, out: *mut *mut PerceptionDepthFrame) -> HRESULT }} impl IPerceptionDepthFrameReader { - #[inline] pub unsafe fn add_frame_arrived(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_frame_arrived(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_FrameArrived)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_frame_arrived(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_frame_arrived(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_FrameArrived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_source(&self) -> Result> { + }} + #[inline] pub fn get_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Source)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_paused(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_paused(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPaused)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_paused(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_paused(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsPaused)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn try_read_latest_frame(&self) -> Result> { + }} + #[inline] pub fn try_read_latest_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryReadLatestFrame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PerceptionDepthFrameReader: IPerceptionDepthFrameReader} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AvailableChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ActiveChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ActiveChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PropertiesChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PropertiesChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_VideoProfileChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_VideoProfileChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_CameraIntrinsicsChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CameraIntrinsicsChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_AvailableChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AvailableChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ActiveChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ActiveChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PropertiesChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PropertiesChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_VideoProfileChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_VideoProfileChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_CameraIntrinsicsChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CameraIntrinsicsChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_Id(&self, out: *mut HSTRING) -> HRESULT, fn get_DisplayName(&self, out: *mut HSTRING) -> HRESULT, fn get_DeviceKind(&self, out: *mut HSTRING) -> HRESULT, fn get_Available(&self, out: *mut bool) -> HRESULT, fn get_Active(&self, out: *mut bool) -> HRESULT, fn get_IsControlled(&self, out: *mut bool) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, - fn get_SupportedVideoProfiles(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_AvailableVideoProfiles(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Properties(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT, + fn get_SupportedVideoProfiles(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_AvailableVideoProfiles(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_VideoProfile(&self, out: *mut *mut PerceptionVideoProfile) -> HRESULT, #[cfg(not(feature="windows-media"))] fn __Dummy20(&self) -> (), #[cfg(feature="windows-media")] fn get_CameraIntrinsics(&self, out: *mut *mut super::super::media::devices::core::CameraIntrinsics) -> HRESULT, fn AcquireControlSession(&self, out: *mut *mut PerceptionControlSession) -> HRESULT, fn CanControlIndependentlyFrom(&self, targetId: HSTRING, out: *mut bool) -> HRESULT, fn IsCorrelatedWith(&self, targetId: HSTRING, out: *mut bool) -> HRESULT, - fn TryGetTransformTo(&self, targetId: HSTRING, result: *mut super::super::foundation::numerics::Matrix4x4, out: *mut bool) -> HRESULT, - fn TryGetDepthCorrelatedCameraIntrinsicsAsync(&self, target: *mut PerceptionDepthFrameSource, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryGetDepthCorrelatedCoordinateMapperAsync(&self, targetId: HSTRING, depthFrameSourceToMapWith: *mut PerceptionDepthFrameSource, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TrySetVideoProfileAsync(&self, controlSession: *mut PerceptionControlSession, profile: *mut PerceptionVideoProfile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TryGetTransformTo(&self, targetId: HSTRING, result: *mut foundation::numerics::Matrix4x4, out: *mut bool) -> HRESULT, + fn TryGetDepthCorrelatedCameraIntrinsicsAsync(&self, target: *mut PerceptionDepthFrameSource, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryGetDepthCorrelatedCoordinateMapperAsync(&self, targetId: HSTRING, depthFrameSourceToMapWith: *mut PerceptionDepthFrameSource, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TrySetVideoProfileAsync(&self, controlSession: *mut PerceptionControlSession, profile: *mut PerceptionVideoProfile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn OpenReader(&self, out: *mut *mut PerceptionDepthFrameReader) -> HRESULT }} impl IPerceptionDepthFrameSource { - #[inline] pub unsafe fn add_available_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_available_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AvailableChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_available_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_available_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AvailableChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_active_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_active_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ActiveChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_active_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_active_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ActiveChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_properties_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_properties_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PropertiesChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_properties_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_properties_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PropertiesChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_video_profile_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_video_profile_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_VideoProfileChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_video_profile_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_video_profile_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_VideoProfileChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_camera_intrinsics_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_camera_intrinsics_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CameraIntrinsicsChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_camera_intrinsics_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_camera_intrinsics_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CameraIntrinsicsChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&self) -> Result { + }} + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_kind(&self) -> Result { + }} + #[inline] pub fn get_device_kind(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_available(&self) -> Result { + }} + #[inline] pub fn get_available(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Available)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_active(&self) -> Result { + }} + #[inline] pub fn get_active(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Active)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_controlled(&self) -> Result { + }} + #[inline] pub fn get_is_controlled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsControlled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_video_profiles(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_supported_video_profiles(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedVideoProfiles)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_available_video_profiles(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_available_video_profiles(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AvailableVideoProfiles)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_profile(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_video_profile(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoProfile)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-media")] #[inline] pub unsafe fn get_camera_intrinsics(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-media")] #[inline] pub fn get_camera_intrinsics(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CameraIntrinsics)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn acquire_control_session(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn acquire_control_session(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AcquireControlSession)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn can_control_independently_from(&self, targetId: &HStringArg) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn can_control_independently_from(&self, targetId: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).CanControlIndependentlyFrom)(self as *const _ as *mut _, targetId.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_correlated_with(&self, targetId: &HStringArg) -> Result { + }} + #[inline] pub fn is_correlated_with(&self, targetId: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsCorrelatedWith)(self as *const _ as *mut _, targetId.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn try_get_transform_to(&self, targetId: &HStringArg) -> Result<(super::super::foundation::numerics::Matrix4x4, bool)> { + }} + #[inline] pub fn try_get_transform_to(&self, targetId: &HStringArg) -> Result<(foundation::numerics::Matrix4x4, bool)> { unsafe { let mut result = zeroed(); let mut out = zeroed(); let hr = ((*self.lpVtbl).TryGetTransformTo)(self as *const _ as *mut _, 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(&self, target: &PerceptionDepthFrameSource) -> Result>> { + }} + #[inline] pub fn try_get_depth_correlated_camera_intrinsics_async(&self, target: &PerceptionDepthFrameSource) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetDepthCorrelatedCameraIntrinsicsAsync)(self as *const _ as *mut _, 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(&self, targetId: &HStringArg, depthFrameSourceToMapWith: &PerceptionDepthFrameSource) -> Result>> { + }} + #[inline] pub fn try_get_depth_correlated_coordinate_mapper_async(&self, targetId: &HStringArg, depthFrameSourceToMapWith: &PerceptionDepthFrameSource) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetDepthCorrelatedCoordinateMapperAsync)(self as *const _ as *mut _, 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(&self, controlSession: &PerceptionControlSession, profile: &PerceptionVideoProfile) -> Result>> { + }} + #[inline] pub fn try_set_video_profile_async(&self, controlSession: &PerceptionControlSession, profile: &PerceptionVideoProfile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TrySetVideoProfileAsync)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[inline] pub fn open_reader(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenReader)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PerceptionDepthFrameSource: IPerceptionDepthFrameSource} impl RtActivatable for PerceptionDepthFrameSource {} impl PerceptionDepthFrameSource { - #[inline] pub fn create_watcher() -> Result> { unsafe { + #[inline] pub fn create_watcher() -> Result>> { >::get_activation_factory().create_watcher() - }} - #[inline] pub fn find_all_async() -> Result>>> { unsafe { + } + #[inline] pub fn find_all_async() -> Result>>> { >::get_activation_factory().find_all_async() - }} - #[inline] pub fn from_id_async(id: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(id: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(id) - }} - #[inline] pub fn request_access_async() -> Result>> { unsafe { + } + #[inline] pub fn request_access_async() -> Result>> { >::get_activation_factory().request_access_async() - }} + } } DEFINE_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]) [CLSID_PerceptionDepthFrameSource]); DEFINE_IID!(IID_IPerceptionDepthFrameSource2, 3822206254, 28204, 20077, 145, 217, 112, 76, 216, 223, 247, 157); @@ -17186,22 +17186,22 @@ RT_INTERFACE!{interface IPerceptionDepthFrameSource2(IPerceptionDepthFrameSource fn get_DeviceId(&self, out: *mut HSTRING) -> HRESULT }} impl IPerceptionDepthFrameSource2 { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::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(&self, out: *mut *mut PerceptionDepthFrameSource) -> HRESULT }} impl IPerceptionDepthFrameSourceAddedEventArgs { - #[inline] pub unsafe fn get_frame_source(&self) -> Result> { + #[inline] pub fn get_frame_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FrameSource)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PerceptionDepthFrameSourceAddedEventArgs: IPerceptionDepthFrameSourceAddedEventArgs} DEFINE_IID!(IID_IPerceptionDepthFrameSourceRemovedEventArgs, 2696989773, 59756, 19841, 134, 221, 56, 185, 94, 73, 198, 223); @@ -17209,106 +17209,106 @@ RT_INTERFACE!{interface IPerceptionDepthFrameSourceRemovedEventArgs(IPerceptionD fn get_FrameSource(&self, out: *mut *mut PerceptionDepthFrameSource) -> HRESULT }} impl IPerceptionDepthFrameSourceRemovedEventArgs { - #[inline] pub unsafe fn get_frame_source(&self) -> Result> { + #[inline] pub fn get_frame_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FrameSource)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PerceptionDepthFrameSourceRemovedEventArgs: IPerceptionDepthFrameSourceRemovedEventArgs} 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(&self, out: *mut *mut PerceptionDepthFrameSourceWatcher) -> HRESULT, - fn FindAllAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn FromIdAsync(&self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestAccessAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FindAllAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn FromIdAsync(&self, id: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestAccessAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IPerceptionDepthFrameSourceStatics { - #[inline] pub unsafe fn create_watcher(&self) -> Result> { + #[inline] pub fn create_watcher(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWatcher)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_all_async(&self) -> Result>>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn find_all_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, id: &HStringArg) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, id: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, id.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_access_async(&self) -> Result>> { + }} + #[inline] pub fn request_access_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SourceAdded(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_SourceRemoved(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SourceRemoved(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Stopped(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Stopped(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_EnumerationCompleted(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_EnumerationCompleted(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_SourceAdded(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceAdded(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_SourceRemoved(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceRemoved(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Stopped(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Stopped(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_EnumerationCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnumerationCompleted(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_Status(&self, out: *mut super::enumeration::DeviceWatcherStatus) -> HRESULT, fn Start(&self) -> HRESULT, fn Stop(&self) -> HRESULT }} impl IPerceptionDepthFrameSourceWatcher { - #[inline] pub unsafe fn add_source_added(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_source_added(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SourceAdded)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_source_added(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_source_added(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SourceAdded)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_source_removed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_source_removed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SourceRemoved)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_source_removed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_source_removed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SourceRemoved)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_stopped(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_stopped(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Stopped)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_stopped(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_stopped(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Stopped)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_enumeration_completed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_enumeration_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_EnumerationCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_enumeration_completed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_enumeration_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_EnumerationCompleted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PerceptionDepthFrameSourceWatcher: IPerceptionDepthFrameSourceWatcher} RT_ENUM! { enum PerceptionFrameSourceAccessStatus: i32 { @@ -17316,20 +17316,20 @@ RT_ENUM! { enum PerceptionFrameSourceAccessStatus: i32 { }} 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(&self, out: *mut super::super::foundation::collections::CollectionChange) -> HRESULT, + fn get_CollectionChange(&self, out: *mut foundation::collections::CollectionChange) -> HRESULT, fn get_Key(&self, out: *mut HSTRING) -> HRESULT }} impl IPerceptionFrameSourcePropertiesChangedEventArgs { - #[inline] pub unsafe fn get_collection_change(&self) -> Result { + #[inline] pub fn get_collection_change(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CollectionChange)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_key(&self) -> Result { + }} + #[inline] pub fn get_key(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Key)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PerceptionFrameSourcePropertiesChangedEventArgs: IPerceptionFrameSourcePropertiesChangedEventArgs} DEFINE_IID!(IID_IPerceptionFrameSourcePropertyChangeResult, 506673418, 15504, 19746, 184, 152, 244, 43, 186, 100, 24, 255); @@ -17338,16 +17338,16 @@ RT_INTERFACE!{interface IPerceptionFrameSourcePropertyChangeResult(IPerceptionFr fn get_NewValue(&self, out: *mut *mut IInspectable) -> HRESULT }} impl IPerceptionFrameSourcePropertyChangeResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_new_value(&self) -> Result> { + }} + #[inline] pub fn get_new_value(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NewValue)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PerceptionFrameSourcePropertyChangeResult: IPerceptionFrameSourcePropertyChangeResult} RT_ENUM! { enum PerceptionFrameSourcePropertyChangeStatus: i32 { @@ -17358,261 +17358,261 @@ RT_INTERFACE!{interface IPerceptionInfraredFrame(IPerceptionInfraredFrameVtbl): #[cfg(feature="windows-media")] fn get_VideoFrame(&self, out: *mut *mut super::super::media::VideoFrame) -> HRESULT }} impl IPerceptionInfraredFrame { - #[cfg(feature="windows-media")] #[inline] pub unsafe fn get_video_frame(&self) -> Result> { + #[cfg(feature="windows-media")] #[inline] pub fn get_video_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFrame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PerceptionInfraredFrame: IPerceptionInfraredFrame} 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(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_RelativeTime(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn TryOpenFrame(&self, out: *mut *mut PerceptionInfraredFrame) -> HRESULT }} impl IPerceptionInfraredFrameArrivedEventArgs { - #[inline] pub unsafe fn get_relative_time(&self) -> Result { + #[inline] pub fn get_relative_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RelativeTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn try_open_frame(&self) -> Result> { + }} + #[inline] pub fn try_open_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryOpenFrame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PerceptionInfraredFrameArrivedEventArgs: IPerceptionInfraredFrameArrivedEventArgs} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_FrameArrived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_FrameArrived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_FrameArrived(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_Source(&self, out: *mut *mut PerceptionInfraredFrameSource) -> HRESULT, fn get_IsPaused(&self, out: *mut bool) -> HRESULT, fn put_IsPaused(&self, value: bool) -> HRESULT, fn TryReadLatestFrame(&self, out: *mut *mut PerceptionInfraredFrame) -> HRESULT }} impl IPerceptionInfraredFrameReader { - #[inline] pub unsafe fn add_frame_arrived(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_frame_arrived(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_FrameArrived)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_frame_arrived(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_frame_arrived(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_FrameArrived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_source(&self) -> Result> { + }} + #[inline] pub fn get_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Source)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_paused(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_paused(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPaused)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_paused(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_paused(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsPaused)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn try_read_latest_frame(&self) -> Result> { + }} + #[inline] pub fn try_read_latest_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryReadLatestFrame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PerceptionInfraredFrameReader: IPerceptionInfraredFrameReader} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AvailableChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ActiveChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ActiveChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PropertiesChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PropertiesChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_VideoProfileChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_VideoProfileChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_CameraIntrinsicsChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CameraIntrinsicsChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_AvailableChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AvailableChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ActiveChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ActiveChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PropertiesChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PropertiesChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_VideoProfileChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_VideoProfileChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_CameraIntrinsicsChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CameraIntrinsicsChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_Id(&self, out: *mut HSTRING) -> HRESULT, fn get_DisplayName(&self, out: *mut HSTRING) -> HRESULT, fn get_DeviceKind(&self, out: *mut HSTRING) -> HRESULT, fn get_Available(&self, out: *mut bool) -> HRESULT, fn get_Active(&self, out: *mut bool) -> HRESULT, fn get_IsControlled(&self, out: *mut bool) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, - fn get_SupportedVideoProfiles(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_AvailableVideoProfiles(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Properties(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT, + fn get_SupportedVideoProfiles(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_AvailableVideoProfiles(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_VideoProfile(&self, out: *mut *mut PerceptionVideoProfile) -> HRESULT, #[cfg(not(feature="windows-media"))] fn __Dummy20(&self) -> (), #[cfg(feature="windows-media")] fn get_CameraIntrinsics(&self, out: *mut *mut super::super::media::devices::core::CameraIntrinsics) -> HRESULT, fn AcquireControlSession(&self, out: *mut *mut PerceptionControlSession) -> HRESULT, fn CanControlIndependentlyFrom(&self, targetId: HSTRING, out: *mut bool) -> HRESULT, fn IsCorrelatedWith(&self, targetId: HSTRING, out: *mut bool) -> HRESULT, - fn TryGetTransformTo(&self, targetId: HSTRING, result: *mut super::super::foundation::numerics::Matrix4x4, out: *mut bool) -> HRESULT, - fn TryGetDepthCorrelatedCameraIntrinsicsAsync(&self, target: *mut PerceptionDepthFrameSource, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryGetDepthCorrelatedCoordinateMapperAsync(&self, targetId: HSTRING, depthFrameSourceToMapWith: *mut PerceptionDepthFrameSource, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TrySetVideoProfileAsync(&self, controlSession: *mut PerceptionControlSession, profile: *mut PerceptionVideoProfile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn TryGetTransformTo(&self, targetId: HSTRING, result: *mut foundation::numerics::Matrix4x4, out: *mut bool) -> HRESULT, + fn TryGetDepthCorrelatedCameraIntrinsicsAsync(&self, target: *mut PerceptionDepthFrameSource, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryGetDepthCorrelatedCoordinateMapperAsync(&self, targetId: HSTRING, depthFrameSourceToMapWith: *mut PerceptionDepthFrameSource, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TrySetVideoProfileAsync(&self, controlSession: *mut PerceptionControlSession, profile: *mut PerceptionVideoProfile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn OpenReader(&self, out: *mut *mut PerceptionInfraredFrameReader) -> HRESULT }} impl IPerceptionInfraredFrameSource { - #[inline] pub unsafe fn add_available_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_available_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AvailableChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_available_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_available_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AvailableChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_active_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_active_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ActiveChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_active_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_active_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ActiveChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_properties_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_properties_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PropertiesChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_properties_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_properties_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PropertiesChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_video_profile_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_video_profile_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_VideoProfileChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_video_profile_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_video_profile_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_VideoProfileChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_camera_intrinsics_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_camera_intrinsics_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CameraIntrinsicsChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_camera_intrinsics_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_camera_intrinsics_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CameraIntrinsicsChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&self) -> Result { + }} + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_kind(&self) -> Result { + }} + #[inline] pub fn get_device_kind(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_available(&self) -> Result { + }} + #[inline] pub fn get_available(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Available)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_active(&self) -> Result { + }} + #[inline] pub fn get_active(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Active)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_controlled(&self) -> Result { + }} + #[inline] pub fn get_is_controlled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsControlled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_video_profiles(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_supported_video_profiles(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedVideoProfiles)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_available_video_profiles(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_available_video_profiles(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AvailableVideoProfiles)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_profile(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_video_profile(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoProfile)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-media")] #[inline] pub unsafe fn get_camera_intrinsics(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-media")] #[inline] pub fn get_camera_intrinsics(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CameraIntrinsics)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn acquire_control_session(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn acquire_control_session(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AcquireControlSession)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn can_control_independently_from(&self, targetId: &HStringArg) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn can_control_independently_from(&self, targetId: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).CanControlIndependentlyFrom)(self as *const _ as *mut _, targetId.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_correlated_with(&self, targetId: &HStringArg) -> Result { + }} + #[inline] pub fn is_correlated_with(&self, targetId: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsCorrelatedWith)(self as *const _ as *mut _, targetId.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn try_get_transform_to(&self, targetId: &HStringArg) -> Result<(super::super::foundation::numerics::Matrix4x4, bool)> { + }} + #[inline] pub fn try_get_transform_to(&self, targetId: &HStringArg) -> Result<(foundation::numerics::Matrix4x4, bool)> { unsafe { let mut result = zeroed(); let mut out = zeroed(); let hr = ((*self.lpVtbl).TryGetTransformTo)(self as *const _ as *mut _, 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(&self, target: &PerceptionDepthFrameSource) -> Result>> { + }} + #[inline] pub fn try_get_depth_correlated_camera_intrinsics_async(&self, target: &PerceptionDepthFrameSource) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetDepthCorrelatedCameraIntrinsicsAsync)(self as *const _ as *mut _, 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(&self, targetId: &HStringArg, depthFrameSourceToMapWith: &PerceptionDepthFrameSource) -> Result>> { + }} + #[inline] pub fn try_get_depth_correlated_coordinate_mapper_async(&self, targetId: &HStringArg, depthFrameSourceToMapWith: &PerceptionDepthFrameSource) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetDepthCorrelatedCoordinateMapperAsync)(self as *const _ as *mut _, 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(&self, controlSession: &PerceptionControlSession, profile: &PerceptionVideoProfile) -> Result>> { + }} + #[inline] pub fn try_set_video_profile_async(&self, controlSession: &PerceptionControlSession, profile: &PerceptionVideoProfile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TrySetVideoProfileAsync)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[inline] pub fn open_reader(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenReader)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PerceptionInfraredFrameSource: IPerceptionInfraredFrameSource} impl RtActivatable for PerceptionInfraredFrameSource {} impl PerceptionInfraredFrameSource { - #[inline] pub fn create_watcher() -> Result> { unsafe { + #[inline] pub fn create_watcher() -> Result>> { >::get_activation_factory().create_watcher() - }} - #[inline] pub fn find_all_async() -> Result>>> { unsafe { + } + #[inline] pub fn find_all_async() -> Result>>> { >::get_activation_factory().find_all_async() - }} - #[inline] pub fn from_id_async(id: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(id: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(id) - }} - #[inline] pub fn request_access_async() -> Result>> { unsafe { + } + #[inline] pub fn request_access_async() -> Result>> { >::get_activation_factory().request_access_async() - }} + } } DEFINE_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]) [CLSID_PerceptionInfraredFrameSource]); DEFINE_IID!(IID_IPerceptionInfraredFrameSource2, 3704936344, 19211, 17152, 141, 133, 65, 8, 23, 250, 160, 50); @@ -17620,22 +17620,22 @@ RT_INTERFACE!{interface IPerceptionInfraredFrameSource2(IPerceptionInfraredFrame fn get_DeviceId(&self, out: *mut HSTRING) -> HRESULT }} impl IPerceptionInfraredFrameSource2 { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::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(&self, out: *mut *mut PerceptionInfraredFrameSource) -> HRESULT }} impl IPerceptionInfraredFrameSourceAddedEventArgs { - #[inline] pub unsafe fn get_frame_source(&self) -> Result> { + #[inline] pub fn get_frame_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FrameSource)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PerceptionInfraredFrameSourceAddedEventArgs: IPerceptionInfraredFrameSourceAddedEventArgs} DEFINE_IID!(IID_IPerceptionInfraredFrameSourceRemovedEventArgs, 3927605361, 31344, 19041, 175, 148, 7, 48, 56, 83, 246, 149); @@ -17643,106 +17643,106 @@ RT_INTERFACE!{interface IPerceptionInfraredFrameSourceRemovedEventArgs(IPercepti fn get_FrameSource(&self, out: *mut *mut PerceptionInfraredFrameSource) -> HRESULT }} impl IPerceptionInfraredFrameSourceRemovedEventArgs { - #[inline] pub unsafe fn get_frame_source(&self) -> Result> { + #[inline] pub fn get_frame_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FrameSource)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PerceptionInfraredFrameSourceRemovedEventArgs: IPerceptionInfraredFrameSourceRemovedEventArgs} 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(&self, out: *mut *mut PerceptionInfraredFrameSourceWatcher) -> HRESULT, - fn FindAllAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn FromIdAsync(&self, id: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestAccessAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FindAllAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn FromIdAsync(&self, id: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestAccessAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IPerceptionInfraredFrameSourceStatics { - #[inline] pub unsafe fn create_watcher(&self) -> Result> { + #[inline] pub fn create_watcher(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWatcher)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_all_async(&self) -> Result>>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn find_all_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, id: &HStringArg) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, id: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, id.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_access_async(&self) -> Result>> { + }} + #[inline] pub fn request_access_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SourceAdded(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_SourceRemoved(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SourceRemoved(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Stopped(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Stopped(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_EnumerationCompleted(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_EnumerationCompleted(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_SourceAdded(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceAdded(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_SourceRemoved(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceRemoved(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Stopped(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Stopped(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_EnumerationCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnumerationCompleted(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_Status(&self, out: *mut super::enumeration::DeviceWatcherStatus) -> HRESULT, fn Start(&self) -> HRESULT, fn Stop(&self) -> HRESULT }} impl IPerceptionInfraredFrameSourceWatcher { - #[inline] pub unsafe fn add_source_added(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_source_added(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SourceAdded)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_source_added(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_source_added(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SourceAdded)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_source_removed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_source_removed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SourceRemoved)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_source_removed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_source_removed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SourceRemoved)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_stopped(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_stopped(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Stopped)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_stopped(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_stopped(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Stopped)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_enumeration_completed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_enumeration_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_EnumerationCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_enumeration_completed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_enumeration_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_EnumerationCompleted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PerceptionInfraredFrameSourceWatcher: IPerceptionInfraredFrameSourceWatcher} DEFINE_IID!(IID_IPerceptionVideoProfile, 1970683555, 282, 18190, 130, 37, 111, 5, 173, 226, 86, 72); @@ -17753,40 +17753,40 @@ RT_INTERFACE!{interface IPerceptionVideoProfile(IPerceptionVideoProfileVtbl): II #[cfg(feature="windows-graphics")] fn get_BitmapAlphaMode(&self, out: *mut super::super::graphics::imaging::BitmapAlphaMode) -> HRESULT, fn get_Width(&self, out: *mut i32) -> HRESULT, fn get_Height(&self, out: *mut i32) -> HRESULT, - fn get_FrameDuration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_FrameDuration(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn IsEqual(&self, other: *mut PerceptionVideoProfile, out: *mut bool) -> HRESULT }} impl IPerceptionVideoProfile { - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn get_bitmap_pixel_format(&self) -> Result { + #[cfg(feature="windows-graphics")] #[inline] pub fn get_bitmap_pixel_format(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BitmapPixelFormat)(self 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(&self) -> Result { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_bitmap_alpha_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BitmapAlphaMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_width(&self) -> Result { + }} + #[inline] pub fn get_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Width)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_height(&self) -> Result { + }} + #[inline] pub fn get_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Height)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_frame_duration(&self) -> Result { + }} + #[inline] pub fn get_frame_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FrameDuration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_equal(&self, other: &PerceptionVideoProfile) -> Result { + }} + #[inline] pub fn is_equal(&self, other: &PerceptionVideoProfile) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsEqual)(self as *const _ as *mut _, other as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PerceptionVideoProfile: IPerceptionVideoProfile} pub mod provider { // Windows.Devices.Perception.Provider @@ -17794,15 +17794,15 @@ use ::prelude::*; RT_CLASS!{static class KnownPerceptionFrameKind} impl RtActivatable for KnownPerceptionFrameKind {} impl KnownPerceptionFrameKind { - #[inline] pub fn get_color() -> Result { unsafe { + #[inline] pub fn get_color() -> Result { >::get_activation_factory().get_color() - }} - #[inline] pub fn get_depth() -> Result { unsafe { + } + #[inline] pub fn get_depth() -> Result { >::get_activation_factory().get_depth() - }} - #[inline] pub fn get_infrared() -> Result { unsafe { + } + #[inline] pub fn get_infrared() -> Result { >::get_activation_factory().get_infrared() - }} + } } DEFINE_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]) [CLSID_KnownPerceptionFrameKind]); DEFINE_IID!(IID_IKnownPerceptionFrameKindStatics, 988172758, 38505, 16646, 159, 174, 72, 53, 193, 185, 97, 4); @@ -17812,220 +17812,220 @@ RT_INTERFACE!{static interface IKnownPerceptionFrameKindStatics(IKnownPerception fn get_Infrared(&self, out: *mut HSTRING) -> HRESULT }} impl IKnownPerceptionFrameKindStatics { - #[inline] pub unsafe fn get_color(&self) -> Result { + #[inline] pub fn get_color(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Color)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_depth(&self) -> Result { + }} + #[inline] pub fn get_depth(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Depth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_infrared(&self) -> Result { + }} + #[inline] pub fn get_infrared(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Infrared)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::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(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn get_FrameProviderIds(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IPerceptionControlGroup { - #[inline] pub unsafe fn get_frame_provider_ids(&self) -> Result>> { + #[inline] pub fn get_frame_provider_ids(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FrameProviderIds)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PerceptionControlGroup: IPerceptionControlGroup} impl RtActivatable for PerceptionControlGroup {} impl PerceptionControlGroup { - #[inline] pub fn create(ids: &::rt::gen::windows::foundation::collections::IIterable) -> Result> { unsafe { + #[inline] pub fn create(ids: &foundation::collections::IIterable) -> Result> { >::get_activation_factory().create(ids) - }} + } } DEFINE_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]) [CLSID_PerceptionControlGroup]); 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(&self, ids: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut PerceptionControlGroup) -> HRESULT + fn Create(&self, ids: *mut foundation::collections::IIterable, out: *mut *mut PerceptionControlGroup) -> HRESULT }} impl IPerceptionControlGroupFactory { - #[inline] pub unsafe fn create(&self, ids: &::rt::gen::windows::foundation::collections::IIterable) -> Result> { + #[inline] pub fn create(&self, ids: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, ids as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut HSTRING) -> HRESULT, - fn get_Position(&self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, - fn get_Orientation(&self, out: *mut ::rt::gen::windows::foundation::numerics::Quaternion) -> HRESULT + fn get_Position(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, + fn get_Orientation(&self, out: *mut foundation::numerics::Quaternion) -> HRESULT }} impl IPerceptionCorrelation { - #[inline] pub unsafe fn get_target_id(&self) -> Result { + #[inline] pub fn get_target_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TargetId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_position(&self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + }} + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_orientation(&self) -> Result<::rt::gen::windows::foundation::numerics::Quaternion> { + }} + #[inline] pub fn get_orientation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Orientation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PerceptionCorrelation: IPerceptionCorrelation} impl RtActivatable for PerceptionCorrelation {} impl PerceptionCorrelation { - #[inline] pub fn create(targetId: &HStringArg, position: ::rt::gen::windows::foundation::numerics::Vector3, orientation: ::rt::gen::windows::foundation::numerics::Quaternion) -> Result> { unsafe { + #[inline] pub fn create(targetId: &HStringArg, position: foundation::numerics::Vector3, orientation: foundation::numerics::Quaternion) -> Result> { >::get_activation_factory().create(targetId, position, orientation) - }} + } } DEFINE_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]) [CLSID_PerceptionCorrelation]); 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(&self, targetId: HSTRING, position: ::rt::gen::windows::foundation::numerics::Vector3, orientation: ::rt::gen::windows::foundation::numerics::Quaternion, out: *mut *mut PerceptionCorrelation) -> HRESULT + fn Create(&self, targetId: HSTRING, position: foundation::numerics::Vector3, orientation: foundation::numerics::Quaternion, out: *mut *mut PerceptionCorrelation) -> HRESULT }} impl IPerceptionCorrelationFactory { - #[inline] pub unsafe fn create(&self, targetId: &HStringArg, position: ::rt::gen::windows::foundation::numerics::Vector3, orientation: ::rt::gen::windows::foundation::numerics::Quaternion) -> Result> { + #[inline] pub fn create(&self, targetId: &HStringArg, position: foundation::numerics::Vector3, orientation: foundation::numerics::Quaternion) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, targetId.get(), position, orientation, &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(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn get_RelativeLocations(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IPerceptionCorrelationGroup { - #[inline] pub unsafe fn get_relative_locations(&self) -> Result>> { + #[inline] pub fn get_relative_locations(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RelativeLocations)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PerceptionCorrelationGroup: IPerceptionCorrelationGroup} impl RtActivatable for PerceptionCorrelationGroup {} impl PerceptionCorrelationGroup { - #[inline] pub fn create(relativeLocations: &::rt::gen::windows::foundation::collections::IIterable) -> Result> { unsafe { + #[inline] pub fn create(relativeLocations: &foundation::collections::IIterable) -> Result> { >::get_activation_factory().create(relativeLocations) - }} + } } DEFINE_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]) [CLSID_PerceptionCorrelationGroup]); 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(&self, relativeLocations: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut PerceptionCorrelationGroup) -> HRESULT + fn Create(&self, relativeLocations: *mut foundation::collections::IIterable, out: *mut *mut PerceptionCorrelationGroup) -> HRESULT }} impl IPerceptionCorrelationGroupFactory { - #[inline] pub unsafe fn create(&self, relativeLocations: &::rt::gen::windows::foundation::collections::IIterable) -> Result> { + #[inline] pub fn create(&self, relativeLocations: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, relativeLocations 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(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn get_FrameProviderIds(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IPerceptionFaceAuthenticationGroup { - #[inline] pub unsafe fn get_frame_provider_ids(&self) -> Result>> { + #[inline] pub fn get_frame_provider_ids(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FrameProviderIds)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PerceptionFaceAuthenticationGroup: IPerceptionFaceAuthenticationGroup} impl RtActivatable for PerceptionFaceAuthenticationGroup {} impl PerceptionFaceAuthenticationGroup { - #[inline] pub fn create(ids: &::rt::gen::windows::foundation::collections::IIterable, startHandler: &PerceptionStartFaceAuthenticationHandler, stopHandler: &PerceptionStopFaceAuthenticationHandler) -> Result> { unsafe { + #[inline] pub fn create(ids: &foundation::collections::IIterable, startHandler: &PerceptionStartFaceAuthenticationHandler, stopHandler: &PerceptionStopFaceAuthenticationHandler) -> Result> { >::get_activation_factory().create(ids, startHandler, stopHandler) - }} + } } DEFINE_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]) [CLSID_PerceptionFaceAuthenticationGroup]); 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(&self, ids: *mut ::rt::gen::windows::foundation::collections::IIterable, startHandler: *mut PerceptionStartFaceAuthenticationHandler, stopHandler: *mut PerceptionStopFaceAuthenticationHandler, out: *mut *mut PerceptionFaceAuthenticationGroup) -> HRESULT + fn Create(&self, ids: *mut foundation::collections::IIterable, startHandler: *mut PerceptionStartFaceAuthenticationHandler, stopHandler: *mut PerceptionStopFaceAuthenticationHandler, out: *mut *mut PerceptionFaceAuthenticationGroup) -> HRESULT }} impl IPerceptionFaceAuthenticationGroupFactory { - #[inline] pub unsafe fn create(&self, ids: &::rt::gen::windows::foundation::collections::IIterable, startHandler: &PerceptionStartFaceAuthenticationHandler, stopHandler: &PerceptionStopFaceAuthenticationHandler) -> Result> { + #[inline] pub fn create(&self, ids: &foundation::collections::IIterable, startHandler: &PerceptionStartFaceAuthenticationHandler, stopHandler: &PerceptionStopFaceAuthenticationHandler) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, 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_IPerceptionFrame, 2097051685, 21691, 19869, 190, 197, 142, 246, 97, 81, 210, 172); RT_INTERFACE!{interface IPerceptionFrame(IPerceptionFrameVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionFrame] { - fn get_RelativeTime(&self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn put_RelativeTime(&self, value: ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn get_Properties(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::ValueSet) -> HRESULT, - fn get_FrameData(&self, out: *mut *mut ::rt::gen::windows::foundation::IMemoryBuffer) -> HRESULT + fn get_RelativeTime(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_RelativeTime(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_Properties(&self, out: *mut *mut foundation::collections::ValueSet) -> HRESULT, + fn get_FrameData(&self, out: *mut *mut foundation::IMemoryBuffer) -> HRESULT }} impl IPerceptionFrame { - #[inline] pub unsafe fn get_relative_time(&self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + #[inline] pub fn get_relative_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RelativeTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_relative_time(&self, value: ::rt::gen::windows::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_relative_time(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RelativeTime)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result> { + }} + #[inline] pub fn get_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_frame_data(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_frame_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FrameData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PerceptionFrame: IPerceptionFrame} 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(&self, out: *mut *mut PerceptionFrameProviderInfo) -> HRESULT, fn get_Available(&self, out: *mut bool) -> HRESULT, - fn get_Properties(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IPropertySet) -> HRESULT, + fn get_Properties(&self, out: *mut *mut foundation::collections::IPropertySet) -> HRESULT, fn Start(&self) -> HRESULT, fn Stop(&self) -> HRESULT, fn SetProperty(&self, value: *mut PerceptionPropertyChangeRequest) -> HRESULT }} impl IPerceptionFrameProvider { - #[inline] pub unsafe fn get_frame_provider_info(&self) -> Result> { + #[inline] pub fn get_frame_provider_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FrameProviderInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_available(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_available(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Available)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result> { + }} + #[inline] pub fn get_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_property(&self, value: &PerceptionPropertyChangeRequest) -> Result<()> { + }} + #[inline] pub fn set_property(&self, value: &PerceptionPropertyChangeRequest) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetProperty)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IPerceptionFrameProviderInfo, 3433650664, 31102, 20099, 155, 135, 3, 106, 116, 20, 47, 196); RT_INTERFACE!{interface IPerceptionFrameProviderInfo(IPerceptionFrameProviderInfoVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionFrameProviderInfo] { @@ -18041,51 +18041,51 @@ RT_INTERFACE!{interface IPerceptionFrameProviderInfo(IPerceptionFrameProviderInf fn put_Hidden(&self, value: bool) -> HRESULT }} impl IPerceptionFrameProviderInfo { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Id)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_display_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_kind(&self) -> Result { + }} + #[inline] pub fn get_device_kind(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_device_kind(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_device_kind(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DeviceKind)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_frame_kind(&self) -> Result { + }} + #[inline] pub fn get_frame_kind(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FrameKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_frame_kind(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_frame_kind(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FrameKind)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_hidden(&self) -> Result { + }} + #[inline] pub fn get_hidden(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Hidden)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_hidden(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_hidden(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Hidden)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PerceptionFrameProviderInfo: IPerceptionFrameProviderInfo} impl RtActivatable for PerceptionFrameProviderInfo {} @@ -18095,45 +18095,45 @@ RT_INTERFACE!{interface IPerceptionFrameProviderManager(IPerceptionFrameProvider fn GetFrameProvider(&self, frameProviderInfo: *mut PerceptionFrameProviderInfo, out: *mut *mut IPerceptionFrameProvider) -> HRESULT }} impl IPerceptionFrameProviderManager { - #[inline] pub unsafe fn get_frame_provider(&self, frameProviderInfo: &PerceptionFrameProviderInfo) -> Result> { + #[inline] pub fn get_frame_provider(&self, frameProviderInfo: &PerceptionFrameProviderInfo) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFrameProvider)(self as *const _ as *mut _, frameProviderInfo as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{static class PerceptionFrameProviderManagerService} impl RtActivatable for PerceptionFrameProviderManagerService {} impl PerceptionFrameProviderManagerService { - #[inline] pub fn register_frame_provider_info(manager: &IPerceptionFrameProviderManager, frameProviderInfo: &PerceptionFrameProviderInfo) -> Result<()> { unsafe { + #[inline] pub fn register_frame_provider_info(manager: &IPerceptionFrameProviderManager, frameProviderInfo: &PerceptionFrameProviderInfo) -> Result<()> { >::get_activation_factory().register_frame_provider_info(manager, frameProviderInfo) - }} - #[inline] pub fn unregister_frame_provider_info(manager: &IPerceptionFrameProviderManager, frameProviderInfo: &PerceptionFrameProviderInfo) -> Result<()> { unsafe { + } + #[inline] pub fn unregister_frame_provider_info(manager: &IPerceptionFrameProviderManager, frameProviderInfo: &PerceptionFrameProviderInfo) -> Result<()> { >::get_activation_factory().unregister_frame_provider_info(manager, frameProviderInfo) - }} - #[inline] pub fn register_face_authentication_group(manager: &IPerceptionFrameProviderManager, faceAuthenticationGroup: &PerceptionFaceAuthenticationGroup) -> Result<()> { unsafe { + } + #[inline] pub fn register_face_authentication_group(manager: &IPerceptionFrameProviderManager, faceAuthenticationGroup: &PerceptionFaceAuthenticationGroup) -> Result<()> { >::get_activation_factory().register_face_authentication_group(manager, faceAuthenticationGroup) - }} - #[inline] pub fn unregister_face_authentication_group(manager: &IPerceptionFrameProviderManager, faceAuthenticationGroup: &PerceptionFaceAuthenticationGroup) -> Result<()> { unsafe { + } + #[inline] pub fn unregister_face_authentication_group(manager: &IPerceptionFrameProviderManager, faceAuthenticationGroup: &PerceptionFaceAuthenticationGroup) -> Result<()> { >::get_activation_factory().unregister_face_authentication_group(manager, faceAuthenticationGroup) - }} - #[inline] pub fn register_control_group(manager: &IPerceptionFrameProviderManager, controlGroup: &PerceptionControlGroup) -> Result<()> { unsafe { + } + #[inline] pub fn register_control_group(manager: &IPerceptionFrameProviderManager, controlGroup: &PerceptionControlGroup) -> Result<()> { >::get_activation_factory().register_control_group(manager, controlGroup) - }} - #[inline] pub fn unregister_control_group(manager: &IPerceptionFrameProviderManager, controlGroup: &PerceptionControlGroup) -> Result<()> { unsafe { + } + #[inline] pub fn unregister_control_group(manager: &IPerceptionFrameProviderManager, controlGroup: &PerceptionControlGroup) -> Result<()> { >::get_activation_factory().unregister_control_group(manager, controlGroup) - }} - #[inline] pub fn register_correlation_group(manager: &IPerceptionFrameProviderManager, correlationGroup: &PerceptionCorrelationGroup) -> Result<()> { unsafe { + } + #[inline] pub fn register_correlation_group(manager: &IPerceptionFrameProviderManager, correlationGroup: &PerceptionCorrelationGroup) -> Result<()> { >::get_activation_factory().register_correlation_group(manager, correlationGroup) - }} - #[inline] pub fn unregister_correlation_group(manager: &IPerceptionFrameProviderManager, correlationGroup: &PerceptionCorrelationGroup) -> Result<()> { unsafe { + } + #[inline] pub fn unregister_correlation_group(manager: &IPerceptionFrameProviderManager, correlationGroup: &PerceptionCorrelationGroup) -> Result<()> { >::get_activation_factory().unregister_correlation_group(manager, correlationGroup) - }} - #[inline] pub fn update_availability_for_provider(provider: &IPerceptionFrameProvider, available: bool) -> Result<()> { unsafe { + } + #[inline] pub fn update_availability_for_provider(provider: &IPerceptionFrameProvider, available: bool) -> Result<()> { >::get_activation_factory().update_availability_for_provider(provider, available) - }} - #[inline] pub fn publish_frame_for_provider(provider: &IPerceptionFrameProvider, frame: &PerceptionFrame) -> Result<()> { unsafe { + } + #[inline] pub fn publish_frame_for_provider(provider: &IPerceptionFrameProvider, frame: &PerceptionFrame) -> Result<()> { >::get_activation_factory().publish_frame_for_provider(provider, frame) - }} + } } DEFINE_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]) [CLSID_PerceptionFrameProviderManagerService]); DEFINE_IID!(IID_IPerceptionFrameProviderManagerServiceStatics, 2927855334, 51929, 17241, 143, 150, 142, 174, 81, 129, 5, 38); @@ -18150,46 +18150,46 @@ RT_INTERFACE!{static interface IPerceptionFrameProviderManagerServiceStatics(IPe fn PublishFrameForProvider(&self, provider: *mut IPerceptionFrameProvider, frame: *mut PerceptionFrame) -> HRESULT }} impl IPerceptionFrameProviderManagerServiceStatics { - #[inline] pub unsafe fn register_frame_provider_info(&self, manager: &IPerceptionFrameProviderManager, frameProviderInfo: &PerceptionFrameProviderInfo) -> Result<()> { + #[inline] pub fn register_frame_provider_info(&self, manager: &IPerceptionFrameProviderManager, frameProviderInfo: &PerceptionFrameProviderInfo) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RegisterFrameProviderInfo)(self as *const _ as *mut _, 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(&self, manager: &IPerceptionFrameProviderManager, frameProviderInfo: &PerceptionFrameProviderInfo) -> Result<()> { + }} + #[inline] pub fn unregister_frame_provider_info(&self, manager: &IPerceptionFrameProviderManager, frameProviderInfo: &PerceptionFrameProviderInfo) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).UnregisterFrameProviderInfo)(self as *const _ as *mut _, 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(&self, manager: &IPerceptionFrameProviderManager, faceAuthenticationGroup: &PerceptionFaceAuthenticationGroup) -> Result<()> { + }} + #[inline] pub fn register_face_authentication_group(&self, manager: &IPerceptionFrameProviderManager, faceAuthenticationGroup: &PerceptionFaceAuthenticationGroup) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RegisterFaceAuthenticationGroup)(self as *const _ as *mut _, 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(&self, manager: &IPerceptionFrameProviderManager, faceAuthenticationGroup: &PerceptionFaceAuthenticationGroup) -> Result<()> { + }} + #[inline] pub fn unregister_face_authentication_group(&self, manager: &IPerceptionFrameProviderManager, faceAuthenticationGroup: &PerceptionFaceAuthenticationGroup) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).UnregisterFaceAuthenticationGroup)(self as *const _ as *mut _, 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(&self, manager: &IPerceptionFrameProviderManager, controlGroup: &PerceptionControlGroup) -> Result<()> { + }} + #[inline] pub fn register_control_group(&self, manager: &IPerceptionFrameProviderManager, controlGroup: &PerceptionControlGroup) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RegisterControlGroup)(self as *const _ as *mut _, 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(&self, manager: &IPerceptionFrameProviderManager, controlGroup: &PerceptionControlGroup) -> Result<()> { + }} + #[inline] pub fn unregister_control_group(&self, manager: &IPerceptionFrameProviderManager, controlGroup: &PerceptionControlGroup) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).UnregisterControlGroup)(self as *const _ as *mut _, 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(&self, manager: &IPerceptionFrameProviderManager, correlationGroup: &PerceptionCorrelationGroup) -> Result<()> { + }} + #[inline] pub fn register_correlation_group(&self, manager: &IPerceptionFrameProviderManager, correlationGroup: &PerceptionCorrelationGroup) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RegisterCorrelationGroup)(self as *const _ as *mut _, 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(&self, manager: &IPerceptionFrameProviderManager, correlationGroup: &PerceptionCorrelationGroup) -> Result<()> { + }} + #[inline] pub fn unregister_correlation_group(&self, manager: &IPerceptionFrameProviderManager, correlationGroup: &PerceptionCorrelationGroup) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).UnregisterCorrelationGroup)(self as *const _ as *mut _, 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(&self, provider: &IPerceptionFrameProvider, available: bool) -> Result<()> { + }} + #[inline] pub fn update_availability_for_provider(&self, provider: &IPerceptionFrameProvider, available: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).UpdateAvailabilityForProvider)(self as *const _ as *mut _, provider as *const _ as *mut _, available); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn publish_frame_for_provider(&self, provider: &IPerceptionFrameProvider, frame: &PerceptionFrame) -> Result<()> { + }} + #[inline] pub fn publish_frame_for_provider(&self, provider: &IPerceptionFrameProvider, frame: &PerceptionFrame) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).PublishFrameForProvider)(self as *const _ as *mut _, provider as *const _ as *mut _, frame as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IPerceptionPropertyChangeRequest, 1012591441, 13579, 19960, 148, 20, 89, 224, 152, 21, 81, 11); RT_INTERFACE!{interface IPerceptionPropertyChangeRequest(IPerceptionPropertyChangeRequestVtbl): IInspectable(IInspectableVtbl) [IID_IPerceptionPropertyChangeRequest] { @@ -18197,33 +18197,33 @@ RT_INTERFACE!{interface IPerceptionPropertyChangeRequest(IPerceptionPropertyChan fn get_Value(&self, out: *mut *mut IInspectable) -> HRESULT, fn get_Status(&self, out: *mut super::PerceptionFrameSourcePropertyChangeStatus) -> HRESULT, fn put_Status(&self, value: super::PerceptionFrameSourcePropertyChangeStatus) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IPerceptionPropertyChangeRequest { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result> { + }} + #[inline] pub fn get_value(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_status(&self, value: super::PerceptionFrameSourcePropertyChangeStatus) -> Result<()> { + }} + #[inline] pub fn set_status(&self, value: super::PerceptionFrameSourcePropertyChangeStatus) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Status)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PerceptionPropertyChangeRequest: IPerceptionPropertyChangeRequest} DEFINE_IID!(IID_PerceptionStartFaceAuthenticationHandler, 1954639146, 8336, 18032, 140, 72, 239, 57, 231, 255, 124, 38); @@ -18231,21 +18231,21 @@ RT_DELEGATE!{delegate PerceptionStartFaceAuthenticationHandler(PerceptionStartFa fn Invoke(&self, sender: *mut PerceptionFaceAuthenticationGroup, out: *mut bool) -> HRESULT }} impl PerceptionStartFaceAuthenticationHandler { - #[inline] pub unsafe fn invoke(&self, sender: &PerceptionFaceAuthenticationGroup) -> Result { + #[inline] pub fn invoke(&self, sender: &PerceptionFaceAuthenticationGroup) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, 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(&self, sender: *mut PerceptionFaceAuthenticationGroup) -> HRESULT }} impl PerceptionStopFaceAuthenticationHandler { - #[inline] pub unsafe fn invoke(&self, sender: &PerceptionFaceAuthenticationGroup) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &PerceptionFaceAuthenticationGroup) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender 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] { @@ -18253,35 +18253,35 @@ RT_INTERFACE!{interface IPerceptionVideoFrameAllocator(IPerceptionVideoFrameAllo #[cfg(feature="windows-media")] fn CopyFromVideoFrame(&self, frame: *mut ::rt::gen::windows::media::VideoFrame, out: *mut *mut PerceptionFrame) -> HRESULT }} impl IPerceptionVideoFrameAllocator { - #[inline] pub unsafe fn allocate_frame(&self) -> Result> { + #[inline] pub fn allocate_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AllocateFrame)(self as *const _ as *mut _, &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(&self, frame: &::rt::gen::windows::media::VideoFrame) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-media")] #[inline] pub fn copy_from_video_frame(&self, frame: &::rt::gen::windows::media::VideoFrame) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CopyFromVideoFrame)(self as *const _ as *mut _, frame as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PerceptionVideoFrameAllocator: IPerceptionVideoFrameAllocator} impl RtActivatable for PerceptionVideoFrameAllocator {} impl PerceptionVideoFrameAllocator { - #[cfg(feature="windows-graphics")] #[inline] pub fn create(maxOutstandingFrameCountForWrite: u32, format: ::rt::gen::windows::graphics::imaging::BitmapPixelFormat, resolution: ::rt::gen::windows::foundation::Size, alpha: ::rt::gen::windows::graphics::imaging::BitmapAlphaMode) -> Result> { unsafe { + #[cfg(feature="windows-graphics")] #[inline] pub fn create(maxOutstandingFrameCountForWrite: u32, format: ::rt::gen::windows::graphics::imaging::BitmapPixelFormat, resolution: foundation::Size, alpha: ::rt::gen::windows::graphics::imaging::BitmapAlphaMode) -> Result> { >::get_activation_factory().create(maxOutstandingFrameCountForWrite, format, resolution, alpha) - }} + } } DEFINE_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]) [CLSID_PerceptionVideoFrameAllocator]); 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(&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 + #[cfg(feature="windows-graphics")] fn Create(&self, maxOutstandingFrameCountForWrite: u32, format: ::rt::gen::windows::graphics::imaging::BitmapPixelFormat, resolution: 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(&self, maxOutstandingFrameCountForWrite: u32, format: ::rt::gen::windows::graphics::imaging::BitmapPixelFormat, resolution: ::rt::gen::windows::foundation::Size, alpha: ::rt::gen::windows::graphics::imaging::BitmapAlphaMode) -> Result> { + #[cfg(feature="windows-graphics")] #[inline] pub fn create(&self, maxOutstandingFrameCountForWrite: u32, format: ::rt::gen::windows::graphics::imaging::BitmapPixelFormat, resolution: foundation::Size, alpha: ::rt::gen::windows::graphics::imaging::BitmapAlphaMode) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, maxOutstandingFrameCountForWrite, format, resolution, alpha, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } } // Windows.Devices.Perception.Provider } // Windows.Devices.Perception @@ -18291,89 +18291,89 @@ DEFINE_IID!(IID_IBarcodeScanner, 3198369286, 45668, 20227, 169, 193, 69, 178, 15 RT_INTERFACE!{interface IBarcodeScanner(IBarcodeScannerVtbl): IInspectable(IInspectableVtbl) [IID_IBarcodeScanner] { fn get_DeviceId(&self, out: *mut HSTRING) -> HRESULT, fn get_Capabilities(&self, out: *mut *mut BarcodeScannerCapabilities) -> HRESULT, - fn ClaimScannerAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CheckHealthAsync(&self, level: UnifiedPosHealthCheckLevel, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetSupportedSymbologiesAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn IsSymbologySupportedAsync(&self, barcodeSymbology: u32, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ClaimScannerAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CheckHealthAsync(&self, level: UnifiedPosHealthCheckLevel, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetSupportedSymbologiesAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn IsSymbologySupportedAsync(&self, barcodeSymbology: u32, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy6(&self) -> (), - #[cfg(feature="windows-storage")] fn RetrieveStatisticsAsync(&self, statisticsCategories: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetSupportedProfiles(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + #[cfg(feature="windows-storage")] fn RetrieveStatisticsAsync(&self, statisticsCategories: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetSupportedProfiles(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn IsProfileSupported(&self, profile: HSTRING, out: *mut bool) -> HRESULT, - fn add_StatusUpdated(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StatusUpdated(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_StatusUpdated(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StatusUpdated(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IBarcodeScanner { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_capabilities(&self) -> Result> { + }} + #[inline] pub fn get_capabilities(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Capabilities)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn claim_scanner_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn claim_scanner_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ClaimScannerAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn check_health_async(&self, level: UnifiedPosHealthCheckLevel) -> Result>> { + }} + #[inline] pub fn check_health_async(&self, level: UnifiedPosHealthCheckLevel) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CheckHealthAsync)(self as *const _ as *mut _, level, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_symbologies_async(&self) -> Result>>> { + }} + #[inline] pub fn get_supported_symbologies_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSupportedSymbologiesAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn is_symbology_supported_async(&self, barcodeSymbology: u32) -> Result>> { + }} + #[inline] pub fn is_symbology_supported_async(&self, barcodeSymbology: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).IsSymbologySupportedAsync)(self as *const _ as *mut _, 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(&self, statisticsCategories: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn retrieve_statistics_async(&self, statisticsCategories: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RetrieveStatisticsAsync)(self as *const _ as *mut _, 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(&self) -> Result>> { + }} + #[inline] pub fn get_supported_profiles(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSupportedProfiles)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn is_profile_supported(&self, profile: &HStringArg) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn is_profile_supported(&self, profile: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsProfileSupported)(self as *const _ as *mut _, profile.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_status_updated(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_status_updated(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StatusUpdated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_status_updated(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_status_updated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StatusUpdated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class BarcodeScanner: IBarcodeScanner} impl RtActivatable for BarcodeScanner {} impl RtActivatable for BarcodeScanner {} impl BarcodeScanner { - #[inline] pub fn get_default_async() -> Result>> { unsafe { + #[inline] pub fn get_default_async() -> Result>> { >::get_activation_factory().get_default_async() - }} - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} - #[inline] pub fn get_device_selector() -> Result { unsafe { + } + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} - #[inline] pub fn get_device_selector_with_connection_types(connectionTypes: PosConnectionTypes) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_with_connection_types(connectionTypes: PosConnectionTypes) -> Result { >::get_activation_factory().get_device_selector_with_connection_types(connectionTypes) - }} + } } DEFINE_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]) [CLSID_BarcodeScanner]); DEFINE_IID!(IID_IBarcodeScanner2, 2300662119, 36078, 17261, 137, 171, 141, 251, 67, 187, 66, 134); @@ -18381,11 +18381,11 @@ RT_INTERFACE!{interface IBarcodeScanner2(IBarcodeScanner2Vtbl): IInspectable(IIn fn get_VideoDeviceId(&self, out: *mut HSTRING) -> HRESULT }} impl IBarcodeScanner2 { - #[inline] pub unsafe fn get_video_device_id(&self) -> Result { + #[inline] pub fn get_video_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoDeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IBarcodeScannerCapabilities, 3322319332, 62152, 17440, 163, 7, 177, 46, 246, 98, 40, 87); RT_INTERFACE!{interface IBarcodeScannerCapabilities(IBarcodeScannerCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_IBarcodeScannerCapabilities] { @@ -18395,26 +18395,26 @@ RT_INTERFACE!{interface IBarcodeScannerCapabilities(IBarcodeScannerCapabilitiesV fn get_IsImagePreviewSupported(&self, out: *mut bool) -> HRESULT }} impl IBarcodeScannerCapabilities { - #[inline] pub unsafe fn get_power_reporting_type(&self) -> Result { + #[inline] pub fn get_power_reporting_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PowerReportingType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_statistics_reporting_supported(&self) -> Result { + }} + #[inline] pub fn get_is_statistics_reporting_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsStatisticsReportingSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_statistics_updating_supported(&self) -> Result { + }} + #[inline] pub fn get_is_statistics_updating_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsStatisticsUpdatingSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_image_preview_supported(&self) -> Result { + }} + #[inline] pub fn get_is_image_preview_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsImagePreviewSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class BarcodeScannerCapabilities: IBarcodeScannerCapabilities} DEFINE_IID!(IID_IBarcodeScannerCapabilities1, 2388308969, 3628, 18223, 161, 204, 238, 128, 84, 182, 166, 132); @@ -18422,22 +18422,22 @@ RT_INTERFACE!{interface IBarcodeScannerCapabilities1(IBarcodeScannerCapabilities fn get_IsSoftwareTriggerSupported(&self, out: *mut bool) -> HRESULT }} impl IBarcodeScannerCapabilities1 { - #[inline] pub unsafe fn get_is_software_trigger_supported(&self) -> Result { + #[inline] pub fn get_is_software_trigger_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSoftwareTriggerSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut BarcodeScannerReport) -> HRESULT }} impl IBarcodeScannerDataReceivedEventArgs { - #[inline] pub unsafe fn get_report(&self) -> Result> { + #[inline] pub fn get_report(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Report)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class BarcodeScannerDataReceivedEventArgs: IBarcodeScannerDataReceivedEventArgs} DEFINE_IID!(IID_IBarcodeScannerErrorOccurredEventArgs, 751984687, 53050, 16386, 167, 90, 197, 236, 70, 143, 10, 32); @@ -18447,21 +18447,21 @@ RT_INTERFACE!{interface IBarcodeScannerErrorOccurredEventArgs(IBarcodeScannerErr fn get_ErrorData(&self, out: *mut *mut UnifiedPosErrorData) -> HRESULT }} impl IBarcodeScannerErrorOccurredEventArgs { - #[inline] pub unsafe fn get_partial_input_data(&self) -> Result> { + #[inline] pub fn get_partial_input_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PartialInputData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_retriable(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_retriable(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsRetriable)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_error_data(&self) -> Result> { + }} + #[inline] pub fn get_error_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ErrorData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class BarcodeScannerErrorOccurredEventArgs: IBarcodeScannerErrorOccurredEventArgs} DEFINE_IID!(IID_IBarcodeScannerImagePreviewReceivedEventArgs, 4088913541, 28299, 17230, 159, 88, 6, 239, 38, 188, 75, 175); @@ -18469,11 +18469,11 @@ RT_INTERFACE!{interface IBarcodeScannerImagePreviewReceivedEventArgs(IBarcodeSca #[cfg(feature="windows-storage")] fn get_Preview(&self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamWithContentType) -> HRESULT }} impl IBarcodeScannerImagePreviewReceivedEventArgs { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_preview(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_preview(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Preview)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class BarcodeScannerImagePreviewReceivedEventArgs: IBarcodeScannerImagePreviewReceivedEventArgs} DEFINE_IID!(IID_IBarcodeScannerReport, 1558501552, 42121, 19350, 134, 196, 240, 191, 138, 55, 117, 61); @@ -18483,56 +18483,56 @@ RT_INTERFACE!{interface IBarcodeScannerReport(IBarcodeScannerReportVtbl): IInspe #[cfg(feature="windows-storage")] fn get_ScanDataLabel(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT }} impl IBarcodeScannerReport { - #[inline] pub unsafe fn get_scan_data_type(&self) -> Result { + #[inline] pub fn get_scan_data_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ScanDataType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_scan_data(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_scan_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ScanData)(self 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_scan_data_label(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_scan_data_label(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ScanDataLabel)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class BarcodeScannerReport: IBarcodeScannerReport} 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetDefaultAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetDeviceSelector(&self, out: *mut HSTRING) -> HRESULT }} impl IBarcodeScannerStatics { - #[inline] pub unsafe fn get_default_async(&self) -> Result>> { + #[inline] pub fn get_default_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefaultAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + }} + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IBarcodeScannerStatics2, 3093636211, 41839, 16391, 177, 208, 39, 158, 190, 146, 166, 86); RT_INTERFACE!{static interface IBarcodeScannerStatics2(IBarcodeScannerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IBarcodeScannerStatics2] { fn GetDeviceSelectorWithConnectionTypes(&self, connectionTypes: PosConnectionTypes, out: *mut HSTRING) -> HRESULT }} impl IBarcodeScannerStatics2 { - #[inline] pub unsafe fn get_device_selector_with_connection_types(&self, connectionTypes: PosConnectionTypes) -> Result { + #[inline] pub fn get_device_selector_with_connection_types(&self, connectionTypes: PosConnectionTypes) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorWithConnectionTypes)(self as *const _ as *mut _, connectionTypes, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -18543,307 +18543,307 @@ RT_INTERFACE!{interface IBarcodeScannerStatusUpdatedEventArgs(IBarcodeScannerSta fn get_ExtendedStatus(&self, out: *mut u32) -> HRESULT }} impl IBarcodeScannerStatusUpdatedEventArgs { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_status(&self) -> Result { + }} + #[inline] pub fn get_extended_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class BarcodeScannerStatusUpdatedEventArgs: IBarcodeScannerStatusUpdatedEventArgs} RT_CLASS!{static class BarcodeSymbologies} impl RtActivatable for BarcodeSymbologies {} impl RtActivatable for BarcodeSymbologies {} impl BarcodeSymbologies { - #[inline] pub fn get_unknown() -> Result { unsafe { + #[inline] pub fn get_unknown() -> Result { >::get_activation_factory().get_unknown() - }} - #[inline] pub fn get_ean8() -> Result { unsafe { + } + #[inline] pub fn get_ean8() -> Result { >::get_activation_factory().get_ean8() - }} - #[inline] pub fn get_ean8_add2() -> Result { unsafe { + } + #[inline] pub fn get_ean8_add2() -> Result { >::get_activation_factory().get_ean8_add2() - }} - #[inline] pub fn get_ean8_add5() -> Result { unsafe { + } + #[inline] pub fn get_ean8_add5() -> Result { >::get_activation_factory().get_ean8_add5() - }} - #[inline] pub fn get_eanv() -> Result { unsafe { + } + #[inline] pub fn get_eanv() -> Result { >::get_activation_factory().get_eanv() - }} - #[inline] pub fn get_eanv_add2() -> Result { unsafe { + } + #[inline] pub fn get_eanv_add2() -> Result { >::get_activation_factory().get_eanv_add2() - }} - #[inline] pub fn get_eanv_add5() -> Result { unsafe { + } + #[inline] pub fn get_eanv_add5() -> Result { >::get_activation_factory().get_eanv_add5() - }} - #[inline] pub fn get_ean13() -> Result { unsafe { + } + #[inline] pub fn get_ean13() -> Result { >::get_activation_factory().get_ean13() - }} - #[inline] pub fn get_ean13_add2() -> Result { unsafe { + } + #[inline] pub fn get_ean13_add2() -> Result { >::get_activation_factory().get_ean13_add2() - }} - #[inline] pub fn get_ean13_add5() -> Result { unsafe { + } + #[inline] pub fn get_ean13_add5() -> Result { >::get_activation_factory().get_ean13_add5() - }} - #[inline] pub fn get_isbn() -> Result { unsafe { + } + #[inline] pub fn get_isbn() -> Result { >::get_activation_factory().get_isbn() - }} - #[inline] pub fn get_isbn_add5() -> Result { unsafe { + } + #[inline] pub fn get_isbn_add5() -> Result { >::get_activation_factory().get_isbn_add5() - }} - #[inline] pub fn get_ismn() -> Result { unsafe { + } + #[inline] pub fn get_ismn() -> Result { >::get_activation_factory().get_ismn() - }} - #[inline] pub fn get_ismn_add2() -> Result { unsafe { + } + #[inline] pub fn get_ismn_add2() -> Result { >::get_activation_factory().get_ismn_add2() - }} - #[inline] pub fn get_ismn_add5() -> Result { unsafe { + } + #[inline] pub fn get_ismn_add5() -> Result { >::get_activation_factory().get_ismn_add5() - }} - #[inline] pub fn get_issn() -> Result { unsafe { + } + #[inline] pub fn get_issn() -> Result { >::get_activation_factory().get_issn() - }} - #[inline] pub fn get_issn_add2() -> Result { unsafe { + } + #[inline] pub fn get_issn_add2() -> Result { >::get_activation_factory().get_issn_add2() - }} - #[inline] pub fn get_issn_add5() -> Result { unsafe { + } + #[inline] pub fn get_issn_add5() -> Result { >::get_activation_factory().get_issn_add5() - }} - #[inline] pub fn get_ean99() -> Result { unsafe { + } + #[inline] pub fn get_ean99() -> Result { >::get_activation_factory().get_ean99() - }} - #[inline] pub fn get_ean99_add2() -> Result { unsafe { + } + #[inline] pub fn get_ean99_add2() -> Result { >::get_activation_factory().get_ean99_add2() - }} - #[inline] pub fn get_ean99_add5() -> Result { unsafe { + } + #[inline] pub fn get_ean99_add5() -> Result { >::get_activation_factory().get_ean99_add5() - }} - #[inline] pub fn get_upca() -> Result { unsafe { + } + #[inline] pub fn get_upca() -> Result { >::get_activation_factory().get_upca() - }} - #[inline] pub fn get_upca_add2() -> Result { unsafe { + } + #[inline] pub fn get_upca_add2() -> Result { >::get_activation_factory().get_upca_add2() - }} - #[inline] pub fn get_upca_add5() -> Result { unsafe { + } + #[inline] pub fn get_upca_add5() -> Result { >::get_activation_factory().get_upca_add5() - }} - #[inline] pub fn get_upce() -> Result { unsafe { + } + #[inline] pub fn get_upce() -> Result { >::get_activation_factory().get_upce() - }} - #[inline] pub fn get_upce_add2() -> Result { unsafe { + } + #[inline] pub fn get_upce_add2() -> Result { >::get_activation_factory().get_upce_add2() - }} - #[inline] pub fn get_upce_add5() -> Result { unsafe { + } + #[inline] pub fn get_upce_add5() -> Result { >::get_activation_factory().get_upce_add5() - }} - #[inline] pub fn get_upc_coupon() -> Result { unsafe { + } + #[inline] pub fn get_upc_coupon() -> Result { >::get_activation_factory().get_upc_coupon() - }} - #[inline] pub fn get_tf_std() -> Result { unsafe { + } + #[inline] pub fn get_tf_std() -> Result { >::get_activation_factory().get_tf_std() - }} - #[inline] pub fn get_tf_dis() -> Result { unsafe { + } + #[inline] pub fn get_tf_dis() -> Result { >::get_activation_factory().get_tf_dis() - }} - #[inline] pub fn get_tf_int() -> Result { unsafe { + } + #[inline] pub fn get_tf_int() -> Result { >::get_activation_factory().get_tf_int() - }} - #[inline] pub fn get_tf_ind() -> Result { unsafe { + } + #[inline] pub fn get_tf_ind() -> Result { >::get_activation_factory().get_tf_ind() - }} - #[inline] pub fn get_tf_mat() -> Result { unsafe { + } + #[inline] pub fn get_tf_mat() -> Result { >::get_activation_factory().get_tf_mat() - }} - #[inline] pub fn get_tf_iata() -> Result { unsafe { + } + #[inline] pub fn get_tf_iata() -> Result { >::get_activation_factory().get_tf_iata() - }} - #[inline] pub fn get_gs1_databar_type1() -> Result { unsafe { + } + #[inline] pub fn get_gs1_databar_type1() -> Result { >::get_activation_factory().get_gs1_databar_type1() - }} - #[inline] pub fn get_gs1_databar_type2() -> Result { unsafe { + } + #[inline] pub fn get_gs1_databar_type2() -> Result { >::get_activation_factory().get_gs1_databar_type2() - }} - #[inline] pub fn get_gs1_databar_type3() -> Result { unsafe { + } + #[inline] pub fn get_gs1_databar_type3() -> Result { >::get_activation_factory().get_gs1_databar_type3() - }} - #[inline] pub fn get_code39() -> Result { unsafe { + } + #[inline] pub fn get_code39() -> Result { >::get_activation_factory().get_code39() - }} - #[inline] pub fn get_code39_ex() -> Result { unsafe { + } + #[inline] pub fn get_code39_ex() -> Result { >::get_activation_factory().get_code39_ex() - }} - #[inline] pub fn get_trioptic39() -> Result { unsafe { + } + #[inline] pub fn get_trioptic39() -> Result { >::get_activation_factory().get_trioptic39() - }} - #[inline] pub fn get_code32() -> Result { unsafe { + } + #[inline] pub fn get_code32() -> Result { >::get_activation_factory().get_code32() - }} - #[inline] pub fn get_pzn() -> Result { unsafe { + } + #[inline] pub fn get_pzn() -> Result { >::get_activation_factory().get_pzn() - }} - #[inline] pub fn get_code93() -> Result { unsafe { + } + #[inline] pub fn get_code93() -> Result { >::get_activation_factory().get_code93() - }} - #[inline] pub fn get_code93_ex() -> Result { unsafe { + } + #[inline] pub fn get_code93_ex() -> Result { >::get_activation_factory().get_code93_ex() - }} - #[inline] pub fn get_code128() -> Result { unsafe { + } + #[inline] pub fn get_code128() -> Result { >::get_activation_factory().get_code128() - }} - #[inline] pub fn get_gs1128() -> Result { unsafe { + } + #[inline] pub fn get_gs1128() -> Result { >::get_activation_factory().get_gs1128() - }} - #[inline] pub fn get_gs1128_coupon() -> Result { unsafe { + } + #[inline] pub fn get_gs1128_coupon() -> Result { >::get_activation_factory().get_gs1128_coupon() - }} - #[inline] pub fn get_ucc_ean128() -> Result { unsafe { + } + #[inline] pub fn get_ucc_ean128() -> Result { >::get_activation_factory().get_ucc_ean128() - }} - #[inline] pub fn get_sisac() -> Result { unsafe { + } + #[inline] pub fn get_sisac() -> Result { >::get_activation_factory().get_sisac() - }} - #[inline] pub fn get_isbt() -> Result { unsafe { + } + #[inline] pub fn get_isbt() -> Result { >::get_activation_factory().get_isbt() - }} - #[inline] pub fn get_codabar() -> Result { unsafe { + } + #[inline] pub fn get_codabar() -> Result { >::get_activation_factory().get_codabar() - }} - #[inline] pub fn get_code11() -> Result { unsafe { + } + #[inline] pub fn get_code11() -> Result { >::get_activation_factory().get_code11() - }} - #[inline] pub fn get_msi() -> Result { unsafe { + } + #[inline] pub fn get_msi() -> Result { >::get_activation_factory().get_msi() - }} - #[inline] pub fn get_plessey() -> Result { unsafe { + } + #[inline] pub fn get_plessey() -> Result { >::get_activation_factory().get_plessey() - }} - #[inline] pub fn get_telepen() -> Result { unsafe { + } + #[inline] pub fn get_telepen() -> Result { >::get_activation_factory().get_telepen() - }} - #[inline] pub fn get_code16k() -> Result { unsafe { + } + #[inline] pub fn get_code16k() -> Result { >::get_activation_factory().get_code16k() - }} - #[inline] pub fn get_codablock_a() -> Result { unsafe { + } + #[inline] pub fn get_codablock_a() -> Result { >::get_activation_factory().get_codablock_a() - }} - #[inline] pub fn get_codablock_f() -> Result { unsafe { + } + #[inline] pub fn get_codablock_f() -> Result { >::get_activation_factory().get_codablock_f() - }} - #[inline] pub fn get_codablock128() -> Result { unsafe { + } + #[inline] pub fn get_codablock128() -> Result { >::get_activation_factory().get_codablock128() - }} - #[inline] pub fn get_code49() -> Result { unsafe { + } + #[inline] pub fn get_code49() -> Result { >::get_activation_factory().get_code49() - }} - #[inline] pub fn get_aztec() -> Result { unsafe { + } + #[inline] pub fn get_aztec() -> Result { >::get_activation_factory().get_aztec() - }} - #[inline] pub fn get_data_code() -> Result { unsafe { + } + #[inline] pub fn get_data_code() -> Result { >::get_activation_factory().get_data_code() - }} - #[inline] pub fn get_data_matrix() -> Result { unsafe { + } + #[inline] pub fn get_data_matrix() -> Result { >::get_activation_factory().get_data_matrix() - }} - #[inline] pub fn get_han_xin() -> Result { unsafe { + } + #[inline] pub fn get_han_xin() -> Result { >::get_activation_factory().get_han_xin() - }} - #[inline] pub fn get_maxicode() -> Result { unsafe { + } + #[inline] pub fn get_maxicode() -> Result { >::get_activation_factory().get_maxicode() - }} - #[inline] pub fn get_micro_pdf417() -> Result { unsafe { + } + #[inline] pub fn get_micro_pdf417() -> Result { >::get_activation_factory().get_micro_pdf417() - }} - #[inline] pub fn get_micro_qr() -> Result { unsafe { + } + #[inline] pub fn get_micro_qr() -> Result { >::get_activation_factory().get_micro_qr() - }} - #[inline] pub fn get_pdf417() -> Result { unsafe { + } + #[inline] pub fn get_pdf417() -> Result { >::get_activation_factory().get_pdf417() - }} - #[inline] pub fn get_qr() -> Result { unsafe { + } + #[inline] pub fn get_qr() -> Result { >::get_activation_factory().get_qr() - }} - #[inline] pub fn get_ms_tag() -> Result { unsafe { + } + #[inline] pub fn get_ms_tag() -> Result { >::get_activation_factory().get_ms_tag() - }} - #[inline] pub fn get_ccab() -> Result { unsafe { + } + #[inline] pub fn get_ccab() -> Result { >::get_activation_factory().get_ccab() - }} - #[inline] pub fn get_ccc() -> Result { unsafe { + } + #[inline] pub fn get_ccc() -> Result { >::get_activation_factory().get_ccc() - }} - #[inline] pub fn get_tlc39() -> Result { unsafe { + } + #[inline] pub fn get_tlc39() -> Result { >::get_activation_factory().get_tlc39() - }} - #[inline] pub fn get_aus_post() -> Result { unsafe { + } + #[inline] pub fn get_aus_post() -> Result { >::get_activation_factory().get_aus_post() - }} - #[inline] pub fn get_can_post() -> Result { unsafe { + } + #[inline] pub fn get_can_post() -> Result { >::get_activation_factory().get_can_post() - }} - #[inline] pub fn get_china_post() -> Result { unsafe { + } + #[inline] pub fn get_china_post() -> Result { >::get_activation_factory().get_china_post() - }} - #[inline] pub fn get_dutch_kix() -> Result { unsafe { + } + #[inline] pub fn get_dutch_kix() -> Result { >::get_activation_factory().get_dutch_kix() - }} - #[inline] pub fn get_info_mail() -> Result { unsafe { + } + #[inline] pub fn get_info_mail() -> Result { >::get_activation_factory().get_info_mail() - }} - #[inline] pub fn get_italian_post25() -> Result { unsafe { + } + #[inline] pub fn get_italian_post25() -> Result { >::get_activation_factory().get_italian_post25() - }} - #[inline] pub fn get_italian_post39() -> Result { unsafe { + } + #[inline] pub fn get_italian_post39() -> Result { >::get_activation_factory().get_italian_post39() - }} - #[inline] pub fn get_japan_post() -> Result { unsafe { + } + #[inline] pub fn get_japan_post() -> Result { >::get_activation_factory().get_japan_post() - }} - #[inline] pub fn get_korean_post() -> Result { unsafe { + } + #[inline] pub fn get_korean_post() -> Result { >::get_activation_factory().get_korean_post() - }} - #[inline] pub fn get_sweden_post() -> Result { unsafe { + } + #[inline] pub fn get_sweden_post() -> Result { >::get_activation_factory().get_sweden_post() - }} - #[inline] pub fn get_uk_post() -> Result { unsafe { + } + #[inline] pub fn get_uk_post() -> Result { >::get_activation_factory().get_uk_post() - }} - #[inline] pub fn get_us_intelligent() -> Result { unsafe { + } + #[inline] pub fn get_us_intelligent() -> Result { >::get_activation_factory().get_us_intelligent() - }} - #[inline] pub fn get_us_intelligent_pkg() -> Result { unsafe { + } + #[inline] pub fn get_us_intelligent_pkg() -> Result { >::get_activation_factory().get_us_intelligent_pkg() - }} - #[inline] pub fn get_us_planet() -> Result { unsafe { + } + #[inline] pub fn get_us_planet() -> Result { >::get_activation_factory().get_us_planet() - }} - #[inline] pub fn get_us_post_net() -> Result { unsafe { + } + #[inline] pub fn get_us_post_net() -> Result { >::get_activation_factory().get_us_post_net() - }} - #[inline] pub fn get_us4_state_fics() -> Result { unsafe { + } + #[inline] pub fn get_us4_state_fics() -> Result { >::get_activation_factory().get_us4_state_fics() - }} - #[inline] pub fn get_ocr_a() -> Result { unsafe { + } + #[inline] pub fn get_ocr_a() -> Result { >::get_activation_factory().get_ocr_a() - }} - #[inline] pub fn get_ocr_b() -> Result { unsafe { + } + #[inline] pub fn get_ocr_b() -> Result { >::get_activation_factory().get_ocr_b() - }} - #[inline] pub fn get_micr() -> Result { unsafe { + } + #[inline] pub fn get_micr() -> Result { >::get_activation_factory().get_micr() - }} - #[inline] pub fn get_extended_base() -> Result { unsafe { + } + #[inline] pub fn get_extended_base() -> Result { >::get_activation_factory().get_extended_base() - }} - #[inline] pub fn get_name(scanDataType: u32) -> Result { unsafe { + } + #[inline] pub fn get_name(scanDataType: u32) -> Result { >::get_activation_factory().get_name(scanDataType) - }} - #[inline] pub fn get_gs1_dwcode() -> Result { unsafe { + } + #[inline] pub fn get_gs1_dwcode() -> Result { >::get_activation_factory().get_gs1_dwcode() - }} + } } DEFINE_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]) [CLSID_BarcodeSymbologies]); DEFINE_IID!(IID_IBarcodeSymbologiesStatics, 3397732795, 1746, 17396, 164, 75, 198, 32, 103, 159, 216, 208); @@ -18944,487 +18944,487 @@ RT_INTERFACE!{static interface IBarcodeSymbologiesStatics(IBarcodeSymbologiesSta fn GetName(&self, scanDataType: u32, out: *mut HSTRING) -> HRESULT }} impl IBarcodeSymbologiesStatics { - #[inline] pub unsafe fn get_unknown(&self) -> Result { + #[inline] pub fn get_unknown(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Unknown)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ean8(&self) -> Result { + }} + #[inline] pub fn get_ean8(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Ean8)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ean8_add2(&self) -> Result { + }} + #[inline] pub fn get_ean8_add2(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Ean8Add2)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ean8_add5(&self) -> Result { + }} + #[inline] pub fn get_ean8_add5(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Ean8Add5)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_eanv(&self) -> Result { + }} + #[inline] pub fn get_eanv(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Eanv)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_eanv_add2(&self) -> Result { + }} + #[inline] pub fn get_eanv_add2(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EanvAdd2)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_eanv_add5(&self) -> Result { + }} + #[inline] pub fn get_eanv_add5(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EanvAdd5)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ean13(&self) -> Result { + }} + #[inline] pub fn get_ean13(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Ean13)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ean13_add2(&self) -> Result { + }} + #[inline] pub fn get_ean13_add2(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Ean13Add2)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ean13_add5(&self) -> Result { + }} + #[inline] pub fn get_ean13_add5(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Ean13Add5)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_isbn(&self) -> Result { + }} + #[inline] pub fn get_isbn(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Isbn)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_isbn_add5(&self) -> Result { + }} + #[inline] pub fn get_isbn_add5(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsbnAdd5)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ismn(&self) -> Result { + }} + #[inline] pub fn get_ismn(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Ismn)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ismn_add2(&self) -> Result { + }} + #[inline] pub fn get_ismn_add2(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsmnAdd2)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ismn_add5(&self) -> Result { + }} + #[inline] pub fn get_ismn_add5(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsmnAdd5)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_issn(&self) -> Result { + }} + #[inline] pub fn get_issn(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Issn)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_issn_add2(&self) -> Result { + }} + #[inline] pub fn get_issn_add2(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IssnAdd2)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_issn_add5(&self) -> Result { + }} + #[inline] pub fn get_issn_add5(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IssnAdd5)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ean99(&self) -> Result { + }} + #[inline] pub fn get_ean99(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Ean99)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ean99_add2(&self) -> Result { + }} + #[inline] pub fn get_ean99_add2(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Ean99Add2)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ean99_add5(&self) -> Result { + }} + #[inline] pub fn get_ean99_add5(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Ean99Add5)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_upca(&self) -> Result { + }} + #[inline] pub fn get_upca(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Upca)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_upca_add2(&self) -> Result { + }} + #[inline] pub fn get_upca_add2(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UpcaAdd2)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_upca_add5(&self) -> Result { + }} + #[inline] pub fn get_upca_add5(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UpcaAdd5)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_upce(&self) -> Result { + }} + #[inline] pub fn get_upce(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Upce)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_upce_add2(&self) -> Result { + }} + #[inline] pub fn get_upce_add2(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UpceAdd2)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_upce_add5(&self) -> Result { + }} + #[inline] pub fn get_upce_add5(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UpceAdd5)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_upc_coupon(&self) -> Result { + }} + #[inline] pub fn get_upc_coupon(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UpcCoupon)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_tf_std(&self) -> Result { + }} + #[inline] pub fn get_tf_std(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TfStd)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_tf_dis(&self) -> Result { + }} + #[inline] pub fn get_tf_dis(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TfDis)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_tf_int(&self) -> Result { + }} + #[inline] pub fn get_tf_int(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TfInt)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_tf_ind(&self) -> Result { + }} + #[inline] pub fn get_tf_ind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TfInd)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_tf_mat(&self) -> Result { + }} + #[inline] pub fn get_tf_mat(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TfMat)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_tf_iata(&self) -> Result { + }} + #[inline] pub fn get_tf_iata(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TfIata)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_gs1_databar_type1(&self) -> Result { + }} + #[inline] pub fn get_gs1_databar_type1(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Gs1DatabarType1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_gs1_databar_type2(&self) -> Result { + }} + #[inline] pub fn get_gs1_databar_type2(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Gs1DatabarType2)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_gs1_databar_type3(&self) -> Result { + }} + #[inline] pub fn get_gs1_databar_type3(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Gs1DatabarType3)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_code39(&self) -> Result { + }} + #[inline] pub fn get_code39(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Code39)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_code39_ex(&self) -> Result { + }} + #[inline] pub fn get_code39_ex(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Code39Ex)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_trioptic39(&self) -> Result { + }} + #[inline] pub fn get_trioptic39(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Trioptic39)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_code32(&self) -> Result { + }} + #[inline] pub fn get_code32(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Code32)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pzn(&self) -> Result { + }} + #[inline] pub fn get_pzn(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Pzn)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_code93(&self) -> Result { + }} + #[inline] pub fn get_code93(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Code93)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_code93_ex(&self) -> Result { + }} + #[inline] pub fn get_code93_ex(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Code93Ex)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_code128(&self) -> Result { + }} + #[inline] pub fn get_code128(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Code128)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_gs1128(&self) -> Result { + }} + #[inline] pub fn get_gs1128(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Gs1128)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_gs1128_coupon(&self) -> Result { + }} + #[inline] pub fn get_gs1128_coupon(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Gs1128Coupon)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ucc_ean128(&self) -> Result { + }} + #[inline] pub fn get_ucc_ean128(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UccEan128)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sisac(&self) -> Result { + }} + #[inline] pub fn get_sisac(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Sisac)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_isbt(&self) -> Result { + }} + #[inline] pub fn get_isbt(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Isbt)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_codabar(&self) -> Result { + }} + #[inline] pub fn get_codabar(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Codabar)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_code11(&self) -> Result { + }} + #[inline] pub fn get_code11(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Code11)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_msi(&self) -> Result { + }} + #[inline] pub fn get_msi(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Msi)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_plessey(&self) -> Result { + }} + #[inline] pub fn get_plessey(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Plessey)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_telepen(&self) -> Result { + }} + #[inline] pub fn get_telepen(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Telepen)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_code16k(&self) -> Result { + }} + #[inline] pub fn get_code16k(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Code16k)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_codablock_a(&self) -> Result { + }} + #[inline] pub fn get_codablock_a(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CodablockA)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_codablock_f(&self) -> Result { + }} + #[inline] pub fn get_codablock_f(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CodablockF)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_codablock128(&self) -> Result { + }} + #[inline] pub fn get_codablock128(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Codablock128)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_code49(&self) -> Result { + }} + #[inline] pub fn get_code49(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Code49)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_aztec(&self) -> Result { + }} + #[inline] pub fn get_aztec(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Aztec)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_data_code(&self) -> Result { + }} + #[inline] pub fn get_data_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DataCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_data_matrix(&self) -> Result { + }} + #[inline] pub fn get_data_matrix(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DataMatrix)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_han_xin(&self) -> Result { + }} + #[inline] pub fn get_han_xin(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HanXin)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_maxicode(&self) -> Result { + }} + #[inline] pub fn get_maxicode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Maxicode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_micro_pdf417(&self) -> Result { + }} + #[inline] pub fn get_micro_pdf417(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MicroPdf417)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_micro_qr(&self) -> Result { + }} + #[inline] pub fn get_micro_qr(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MicroQr)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pdf417(&self) -> Result { + }} + #[inline] pub fn get_pdf417(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Pdf417)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_qr(&self) -> Result { + }} + #[inline] pub fn get_qr(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Qr)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ms_tag(&self) -> Result { + }} + #[inline] pub fn get_ms_tag(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MsTag)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ccab(&self) -> Result { + }} + #[inline] pub fn get_ccab(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Ccab)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ccc(&self) -> Result { + }} + #[inline] pub fn get_ccc(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Ccc)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_tlc39(&self) -> Result { + }} + #[inline] pub fn get_tlc39(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Tlc39)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_aus_post(&self) -> Result { + }} + #[inline] pub fn get_aus_post(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AusPost)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_post(&self) -> Result { + }} + #[inline] pub fn get_can_post(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanPost)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_china_post(&self) -> Result { + }} + #[inline] pub fn get_china_post(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ChinaPost)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_dutch_kix(&self) -> Result { + }} + #[inline] pub fn get_dutch_kix(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DutchKix)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_info_mail(&self) -> Result { + }} + #[inline] pub fn get_info_mail(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InfoMail)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_italian_post25(&self) -> Result { + }} + #[inline] pub fn get_italian_post25(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ItalianPost25)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_italian_post39(&self) -> Result { + }} + #[inline] pub fn get_italian_post39(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ItalianPost39)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_japan_post(&self) -> Result { + }} + #[inline] pub fn get_japan_post(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_JapanPost)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_korean_post(&self) -> Result { + }} + #[inline] pub fn get_korean_post(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_KoreanPost)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sweden_post(&self) -> Result { + }} + #[inline] pub fn get_sweden_post(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SwedenPost)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_uk_post(&self) -> Result { + }} + #[inline] pub fn get_uk_post(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UkPost)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_us_intelligent(&self) -> Result { + }} + #[inline] pub fn get_us_intelligent(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UsIntelligent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_us_intelligent_pkg(&self) -> Result { + }} + #[inline] pub fn get_us_intelligent_pkg(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UsIntelligentPkg)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_us_planet(&self) -> Result { + }} + #[inline] pub fn get_us_planet(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UsPlanet)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_us_post_net(&self) -> Result { + }} + #[inline] pub fn get_us_post_net(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UsPostNet)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_us4_state_fics(&self) -> Result { + }} + #[inline] pub fn get_us4_state_fics(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Us4StateFics)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ocr_a(&self) -> Result { + }} + #[inline] pub fn get_ocr_a(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OcrA)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ocr_b(&self) -> Result { + }} + #[inline] pub fn get_ocr_b(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OcrB)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_micr(&self) -> Result { + }} + #[inline] pub fn get_micr(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Micr)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_base(&self) -> Result { + }} + #[inline] pub fn get_extended_base(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedBase)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_name(&self, scanDataType: u32) -> Result { + }} + #[inline] pub fn get_name(&self, scanDataType: u32) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetName)(self as *const _ as *mut _, scanDataType, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IBarcodeSymbologiesStatics2, 2339707124, 39376, 16575, 148, 36, 185, 29, 109, 212, 198, 224); RT_INTERFACE!{static interface IBarcodeSymbologiesStatics2(IBarcodeSymbologiesStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IBarcodeSymbologiesStatics2] { fn get_Gs1DWCode(&self, out: *mut u32) -> HRESULT }} impl IBarcodeSymbologiesStatics2 { - #[inline] pub unsafe fn get_gs1_dwcode(&self) -> Result { + #[inline] pub fn get_gs1_dwcode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Gs1DWCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IBarcodeSymbologyAttributes, 1715550840, 43898, 19162, 142, 206, 147, 96, 20, 178, 234, 215); RT_INTERFACE!{interface IBarcodeSymbologyAttributes(IBarcodeSymbologyAttributesVtbl): IInspectable(IInspectableVtbl) [IID_IBarcodeSymbologyAttributes] { @@ -19443,66 +19443,66 @@ RT_INTERFACE!{interface IBarcodeSymbologyAttributes(IBarcodeSymbologyAttributesV fn get_IsDecodeLengthSupported(&self, out: *mut bool) -> HRESULT }} impl IBarcodeSymbologyAttributes { - #[inline] pub unsafe fn get_is_check_digit_validation_enabled(&self) -> Result { + #[inline] pub fn get_is_check_digit_validation_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCheckDigitValidationEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_check_digit_validation_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_check_digit_validation_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsCheckDigitValidationEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_check_digit_validation_supported(&self) -> Result { + }} + #[inline] pub fn get_is_check_digit_validation_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCheckDigitValidationSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_check_digit_transmission_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_check_digit_transmission_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCheckDigitTransmissionEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_check_digit_transmission_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_check_digit_transmission_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsCheckDigitTransmissionEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_check_digit_transmission_supported(&self) -> Result { + }} + #[inline] pub fn get_is_check_digit_transmission_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCheckDigitTransmissionSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_decode_length1(&self) -> Result { + }} + #[inline] pub fn get_decode_length1(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DecodeLength1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_decode_length1(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_decode_length1(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DecodeLength1)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_decode_length2(&self) -> Result { + }} + #[inline] pub fn get_decode_length2(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DecodeLength2)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_decode_length2(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_decode_length2(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DecodeLength2)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_decode_length_kind(&self) -> Result { + }} + #[inline] pub fn get_decode_length_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DecodeLengthKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_decode_length_kind(&self, value: BarcodeSymbologyDecodeLengthKind) -> Result<()> { + }} + #[inline] pub fn set_decode_length_kind(&self, value: BarcodeSymbologyDecodeLengthKind) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DecodeLengthKind)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_decode_length_supported(&self) -> Result { + }} + #[inline] pub fn get_is_decode_length_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDecodeLengthSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class BarcodeSymbologyAttributes: IBarcodeSymbologyAttributes} RT_ENUM! { enum BarcodeSymbologyDecodeLengthKind: i32 { @@ -19515,79 +19515,79 @@ RT_INTERFACE!{interface ICashDrawer(ICashDrawerVtbl): IInspectable(IInspectableV fn get_Status(&self, out: *mut *mut CashDrawerStatus) -> HRESULT, fn get_IsDrawerOpen(&self, out: *mut bool) -> HRESULT, fn get_DrawerEventSource(&self, out: *mut *mut CashDrawerEventSource) -> HRESULT, - fn ClaimDrawerAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CheckHealthAsync(&self, level: UnifiedPosHealthCheckLevel, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetStatisticsAsync(&self, statisticsCategories: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_StatusUpdated(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StatusUpdated(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn ClaimDrawerAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CheckHealthAsync(&self, level: UnifiedPosHealthCheckLevel, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetStatisticsAsync(&self, statisticsCategories: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_StatusUpdated(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StatusUpdated(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl ICashDrawer { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_capabilities(&self) -> Result> { + }} + #[inline] pub fn get_capabilities(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Capabilities)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_status(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Status)(self 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(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_drawer_open(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDrawerOpen)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_drawer_event_source(&self) -> Result> { + }} + #[inline] pub fn get_drawer_event_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DrawerEventSource)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn claim_drawer_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn claim_drawer_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ClaimDrawerAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn check_health_async(&self, level: UnifiedPosHealthCheckLevel) -> Result>> { + }} + #[inline] pub fn check_health_async(&self, level: UnifiedPosHealthCheckLevel) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CheckHealthAsync)(self as *const _ as *mut _, level, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_statistics_async(&self, statisticsCategories: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn get_statistics_async(&self, statisticsCategories: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetStatisticsAsync)(self as *const _ as *mut _, 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(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_status_updated(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StatusUpdated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_status_updated(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_status_updated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StatusUpdated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CashDrawer: ICashDrawer} impl RtActivatable for CashDrawer {} impl RtActivatable for CashDrawer {} impl CashDrawer { - #[inline] pub fn get_default_async() -> Result>> { unsafe { + #[inline] pub fn get_default_async() -> Result>> { >::get_activation_factory().get_default_async() - }} - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} - #[inline] pub fn get_device_selector() -> Result { unsafe { + } + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} - #[inline] pub fn get_device_selector_with_connection_types(connectionTypes: PosConnectionTypes) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_with_connection_types(connectionTypes: PosConnectionTypes) -> Result { >::get_activation_factory().get_device_selector_with_connection_types(connectionTypes) - }} + } } DEFINE_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]) [CLSID_CashDrawer]); DEFINE_IID!(IID_ICashDrawerCapabilities, 197582347, 59623, 19231, 177, 209, 62, 80, 26, 208, 130, 71); @@ -19600,132 +19600,132 @@ RT_INTERFACE!{interface ICashDrawerCapabilities(ICashDrawerCapabilitiesVtbl): II fn get_IsDrawerOpenSensorAvailable(&self, out: *mut bool) -> HRESULT }} impl ICashDrawerCapabilities { - #[inline] pub unsafe fn get_power_reporting_type(&self) -> Result { + #[inline] pub fn get_power_reporting_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PowerReportingType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_statistics_reporting_supported(&self) -> Result { + }} + #[inline] pub fn get_is_statistics_reporting_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsStatisticsReportingSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_statistics_updating_supported(&self) -> Result { + }} + #[inline] pub fn get_is_statistics_updating_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsStatisticsUpdatingSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_status_reporting_supported(&self) -> Result { + }} + #[inline] pub fn get_is_status_reporting_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsStatusReportingSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_status_multi_drawer_detect_supported(&self) -> Result { + }} + #[inline] pub fn get_is_status_multi_drawer_detect_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsStatusMultiDrawerDetectSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_drawer_open_sensor_available(&self) -> Result { + }} + #[inline] pub fn get_is_drawer_open_sensor_available(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDrawerOpenSensorAvailable)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class CashDrawerCapabilities: ICashDrawerCapabilities} 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(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_AlarmTimeout(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_AlarmTimeout(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_AlarmTimeout(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn put_BeepFrequency(&self, value: u32) -> HRESULT, fn get_BeepFrequency(&self, out: *mut u32) -> HRESULT, - fn put_BeepDuration(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_BeepDuration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_BeepDelay(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_BeepDelay(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn add_AlarmTimeoutExpired(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AlarmTimeoutExpired(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn StartAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn put_BeepDuration(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_BeepDuration(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_BeepDelay(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_BeepDelay(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn add_AlarmTimeoutExpired(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AlarmTimeoutExpired(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn StartAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ICashDrawerCloseAlarm { - #[inline] pub unsafe fn set_alarm_timeout(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + #[inline] pub fn set_alarm_timeout(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AlarmTimeout)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_alarm_timeout(&self) -> Result { + }} + #[inline] pub fn get_alarm_timeout(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AlarmTimeout)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_beep_frequency(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_beep_frequency(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BeepFrequency)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_beep_frequency(&self) -> Result { + }} + #[inline] pub fn get_beep_frequency(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BeepFrequency)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_beep_duration(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_beep_duration(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BeepDuration)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_beep_duration(&self) -> Result { + }} + #[inline] pub fn get_beep_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BeepDuration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_beep_delay(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_beep_delay(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BeepDelay)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_beep_delay(&self) -> Result { + }} + #[inline] pub fn get_beep_delay(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BeepDelay)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_alarm_timeout_expired(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_alarm_timeout_expired(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AlarmTimeoutExpired)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_alarm_timeout_expired(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_alarm_timeout_expired(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AlarmTimeoutExpired)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start_async(&self) -> Result>> { + }} + #[inline] pub fn start_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class CashDrawerCloseAlarm: ICashDrawerCloseAlarm} RT_CLASS!{class CashDrawerClosedEventArgs: 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DrawerClosed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_DrawerOpened(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DrawerOpened(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_DrawerClosed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DrawerClosed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_DrawerOpened(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DrawerOpened(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl ICashDrawerEventSource { - #[inline] pub unsafe fn add_drawer_closed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_drawer_closed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DrawerClosed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_drawer_closed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_drawer_closed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DrawerClosed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_drawer_opened(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_drawer_opened(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DrawerOpened)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_drawer_opened(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_drawer_opened(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DrawerOpened)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CashDrawerEventSource: ICashDrawerEventSource} DEFINE_IID!(IID_ICashDrawerEventSourceEventArgs, 1774926785, 5247, 16924, 156, 35, 9, 1, 35, 187, 120, 108); @@ -19733,46 +19733,46 @@ RT_INTERFACE!{interface ICashDrawerEventSourceEventArgs(ICashDrawerEventSourceEv fn get_CashDrawer(&self, out: *mut *mut CashDrawer) -> HRESULT }} impl ICashDrawerEventSourceEventArgs { - #[inline] pub unsafe fn get_cash_drawer(&self) -> Result> { + #[inline] pub fn get_cash_drawer(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CashDrawer)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CashDrawerOpenedEventArgs: ICashDrawerEventSourceEventArgs} 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetDefaultAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetDeviceSelector(&self, out: *mut HSTRING) -> HRESULT }} impl ICashDrawerStatics { - #[inline] pub unsafe fn get_default_async(&self) -> Result>> { + #[inline] pub fn get_default_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefaultAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + }} + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ICashDrawerStatics2, 1048674593, 35906, 16616, 156, 14, 64, 41, 112, 72, 16, 76); RT_INTERFACE!{static interface ICashDrawerStatics2(ICashDrawerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_ICashDrawerStatics2] { fn GetDeviceSelectorWithConnectionTypes(&self, connectionTypes: PosConnectionTypes, out: *mut HSTRING) -> HRESULT }} impl ICashDrawerStatics2 { - #[inline] pub unsafe fn get_device_selector_with_connection_types(&self, connectionTypes: PosConnectionTypes) -> Result { + #[inline] pub fn get_device_selector_with_connection_types(&self, connectionTypes: PosConnectionTypes) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorWithConnectionTypes)(self as *const _ as *mut _, connectionTypes, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ICashDrawerStatus, 1807579327, 56481, 19974, 153, 235, 90, 246, 165, 174, 193, 8); RT_INTERFACE!{interface ICashDrawerStatus(ICashDrawerStatusVtbl): IInspectable(IInspectableVtbl) [IID_ICashDrawerStatus] { @@ -19780,16 +19780,16 @@ RT_INTERFACE!{interface ICashDrawerStatus(ICashDrawerStatusVtbl): IInspectable(I fn get_ExtendedStatus(&self, out: *mut u32) -> HRESULT }} impl ICashDrawerStatus { - #[inline] pub unsafe fn get_status_kind(&self) -> Result { + #[inline] pub fn get_status_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StatusKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_status(&self) -> Result { + }} + #[inline] pub fn get_extended_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class CashDrawerStatus: ICashDrawerStatus} RT_ENUM! { enum CashDrawerStatusKind: i32 { @@ -19800,11 +19800,11 @@ RT_INTERFACE!{interface ICashDrawerStatusUpdatedEventArgs(ICashDrawerStatusUpdat fn get_Status(&self, out: *mut *mut CashDrawerStatus) -> HRESULT }} impl ICashDrawerStatusUpdatedEventArgs { - #[inline] pub unsafe fn get_status(&self) -> Result> { + #[inline] pub fn get_status(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CashDrawerStatusUpdatedEventArgs: ICashDrawerStatusUpdatedEventArgs} DEFINE_IID!(IID_IClaimedBarcodeScanner, 1248048284, 36772, 17202, 187, 38, 148, 93, 17, 216, 30, 15); @@ -19815,178 +19815,178 @@ RT_INTERFACE!{interface IClaimedBarcodeScanner(IClaimedBarcodeScannerVtbl): IIns fn get_IsDisabledOnDataReceived(&self, out: *mut bool) -> HRESULT, fn put_IsDecodeDataEnabled(&self, value: bool) -> HRESULT, fn get_IsDecodeDataEnabled(&self, out: *mut bool) -> HRESULT, - fn EnableAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn DisableAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn EnableAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn DisableAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn RetainDevice(&self) -> HRESULT, - fn SetActiveSymbologiesAsync(&self, symbologies: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn ResetStatisticsAsync(&self, statisticsCategories: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn UpdateStatisticsAsync(&self, statistics: *mut super::super::foundation::collections::IIterable>, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn SetActiveProfileAsync(&self, profile: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn add_DataReceived(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DataReceived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_TriggerPressed(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_TriggerPressed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_TriggerReleased(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_TriggerReleased(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ReleaseDeviceRequested(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReleaseDeviceRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ImagePreviewReceived(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ImagePreviewReceived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ErrorOccurred(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ErrorOccurred(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn SetActiveSymbologiesAsync(&self, symbologies: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ResetStatisticsAsync(&self, statisticsCategories: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn UpdateStatisticsAsync(&self, statistics: *mut foundation::collections::IIterable>, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn SetActiveProfileAsync(&self, profile: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn add_DataReceived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DataReceived(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_TriggerPressed(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_TriggerPressed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_TriggerReleased(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_TriggerReleased(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ReleaseDeviceRequested(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReleaseDeviceRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ImagePreviewReceived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ImagePreviewReceived(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ErrorOccurred(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ErrorOccurred(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IClaimedBarcodeScanner { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_disabled_on_data_received(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_disabled_on_data_received(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsDisabledOnDataReceived)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_disabled_on_data_received(&self) -> Result { + }} + #[inline] pub fn get_is_disabled_on_data_received(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDisabledOnDataReceived)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_decode_data_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_decode_data_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsDecodeDataEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_decode_data_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_decode_data_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDecodeDataEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn enable_async(&self) -> Result> { + }} + #[inline] pub fn enable_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).EnableAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn disable_async(&self) -> Result> { + }} + #[inline] pub fn disable_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DisableAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn retain_device(&self) -> Result<()> { + }} + #[inline] pub fn retain_device(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RetainDevice)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_active_symbologies_async(&self, symbologies: &super::super::foundation::collections::IIterable) -> Result> { + }} + #[inline] pub fn set_active_symbologies_async(&self, symbologies: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetActiveSymbologiesAsync)(self as *const _ as *mut _, 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(&self, statisticsCategories: &super::super::foundation::collections::IIterable) -> Result> { + }} + #[inline] pub fn reset_statistics_async(&self, statisticsCategories: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ResetStatisticsAsync)(self as *const _ as *mut _, 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(&self, statistics: &super::super::foundation::collections::IIterable>) -> Result> { + }} + #[inline] pub fn update_statistics_async(&self, statistics: &foundation::collections::IIterable>) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UpdateStatisticsAsync)(self as *const _ as *mut _, 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(&self, profile: &HStringArg) -> Result> { + }} + #[inline] pub fn set_active_profile_async(&self, profile: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetActiveProfileAsync)(self as *const _ as *mut _, profile.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_data_received(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_data_received(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DataReceived)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_data_received(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_data_received(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DataReceived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_trigger_pressed(&self, handler: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_trigger_pressed(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_TriggerPressed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_trigger_pressed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_trigger_pressed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_TriggerPressed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_trigger_released(&self, handler: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_trigger_released(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_TriggerReleased)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_trigger_released(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_trigger_released(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_TriggerReleased)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_release_device_requested(&self, handler: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_release_device_requested(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ReleaseDeviceRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_release_device_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_release_device_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ReleaseDeviceRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_image_preview_received(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_image_preview_received(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ImagePreviewReceived)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_image_preview_received(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_image_preview_received(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ImagePreviewReceived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_error_occurred(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_error_occurred(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ErrorOccurred)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_error_occurred(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_error_occurred(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ErrorOccurred)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ClaimedBarcodeScanner: IClaimedBarcodeScanner} 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(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn StopSoftwareTriggerAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn StartSoftwareTriggerAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn StopSoftwareTriggerAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IClaimedBarcodeScanner1 { - #[inline] pub unsafe fn start_software_trigger_async(&self) -> Result> { + #[inline] pub fn start_software_trigger_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartSoftwareTriggerAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn stop_software_trigger_async(&self) -> Result> { + }} + #[inline] pub fn stop_software_trigger_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StopSoftwareTriggerAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IClaimedBarcodeScanner2, 3820330636, 11659, 20336, 138, 243, 52, 72, 190, 221, 95, 226); RT_INTERFACE!{interface IClaimedBarcodeScanner2(IClaimedBarcodeScanner2Vtbl): IInspectable(IInspectableVtbl) [IID_IClaimedBarcodeScanner2] { - fn GetSymbologyAttributesAsync(&self, barcodeSymbology: u32, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn SetSymbologyAttributesAsync(&self, barcodeSymbology: u32, attributes: *mut BarcodeSymbologyAttributes, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetSymbologyAttributesAsync(&self, barcodeSymbology: u32, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn SetSymbologyAttributesAsync(&self, barcodeSymbology: u32, attributes: *mut BarcodeSymbologyAttributes, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IClaimedBarcodeScanner2 { - #[inline] pub unsafe fn get_symbology_attributes_async(&self, barcodeSymbology: u32) -> Result>> { + #[inline] pub fn get_symbology_attributes_async(&self, barcodeSymbology: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSymbologyAttributesAsync)(self as *const _ as *mut _, barcodeSymbology, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_symbology_attributes_async(&self, barcodeSymbology: u32, attributes: &BarcodeSymbologyAttributes) -> Result>> { + }} + #[inline] pub fn set_symbology_attributes_async(&self, barcodeSymbology: u32, attributes: &BarcodeSymbologyAttributes) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetSymbologyAttributesAsync)(self as *const _ as *mut _, barcodeSymbology, attributes as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } 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] { @@ -19994,75 +19994,75 @@ RT_INTERFACE!{interface IClaimedCashDrawer(IClaimedCashDrawerVtbl): IInspectable fn get_IsEnabled(&self, out: *mut bool) -> HRESULT, fn get_IsDrawerOpen(&self, out: *mut bool) -> HRESULT, fn get_CloseAlarm(&self, out: *mut *mut CashDrawerCloseAlarm) -> HRESULT, - fn OpenDrawerAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn EnableAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn DisableAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RetainDeviceAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn ResetStatisticsAsync(&self, statisticsCategories: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn UpdateStatisticsAsync(&self, statistics: *mut super::super::foundation::collections::IIterable>, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_ReleaseDeviceRequested(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReleaseDeviceRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn OpenDrawerAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn EnableAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn DisableAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RetainDeviceAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ResetStatisticsAsync(&self, statisticsCategories: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn UpdateStatisticsAsync(&self, statistics: *mut foundation::collections::IIterable>, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_ReleaseDeviceRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReleaseDeviceRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IClaimedCashDrawer { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_drawer_open(&self) -> Result { + }} + #[inline] pub fn get_is_drawer_open(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDrawerOpen)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_close_alarm(&self) -> Result> { + }} + #[inline] pub fn get_close_alarm(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CloseAlarm)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn open_drawer_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn open_drawer_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenDrawerAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn enable_async(&self) -> Result>> { + }} + #[inline] pub fn enable_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).EnableAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn disable_async(&self) -> Result>> { + }} + #[inline] pub fn disable_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DisableAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn retain_device_async(&self) -> Result>> { + }} + #[inline] pub fn retain_device_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RetainDeviceAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn reset_statistics_async(&self, statisticsCategories: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn reset_statistics_async(&self, statisticsCategories: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ResetStatisticsAsync)(self as *const _ as *mut _, 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(&self, statistics: &super::super::foundation::collections::IIterable>) -> Result>> { + }} + #[inline] pub fn update_statistics_async(&self, statistics: &foundation::collections::IIterable>) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UpdateStatisticsAsync)(self as *const _ as *mut _, 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(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_release_device_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ReleaseDeviceRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_release_device_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_release_device_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ReleaseDeviceRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ClaimedCashDrawer: IClaimedCashDrawer} DEFINE_IID!(IID_IClaimedJournalPrinter, 1743390256, 20861, 18559, 159, 223, 210, 224, 160, 162, 100, 165); @@ -20070,11 +20070,11 @@ RT_INTERFACE!{interface IClaimedJournalPrinter(IClaimedJournalPrinterVtbl): IIns fn CreateJob(&self, out: *mut *mut JournalPrintJob) -> HRESULT }} impl IClaimedJournalPrinter { - #[inline] pub unsafe fn create_job(&self) -> Result> { + #[inline] pub fn create_job(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateJob)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ClaimedJournalPrinter: IClaimedJournalPrinter} DEFINE_IID!(IID_IClaimedLineDisplay, 302696816, 39541, 19151, 170, 231, 9, 151, 43, 207, 135, 148); @@ -20088,206 +20088,206 @@ RT_INTERFACE!{interface IClaimedLineDisplay(IClaimedLineDisplayVtbl): IInspectab fn get_DeviceServiceVersion(&self, out: *mut HSTRING) -> HRESULT, fn get_DefaultWindow(&self, out: *mut *mut LineDisplayWindow) -> HRESULT, fn RetainDevice(&self) -> HRESULT, - fn add_ReleaseDeviceRequested(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReleaseDeviceRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ReleaseDeviceRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReleaseDeviceRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IClaimedLineDisplay { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_capabilities(&self) -> Result> { + }} + #[inline] pub fn get_capabilities(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Capabilities)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_physical_device_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_physical_device_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PhysicalDeviceName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_physical_device_description(&self) -> Result { + }} + #[inline] pub fn get_physical_device_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PhysicalDeviceDescription)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_control_description(&self) -> Result { + }} + #[inline] pub fn get_device_control_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceControlDescription)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_control_version(&self) -> Result { + }} + #[inline] pub fn get_device_control_version(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceControlVersion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_service_version(&self) -> Result { + }} + #[inline] pub fn get_device_service_version(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceServiceVersion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_window(&self) -> Result> { + }} + #[inline] pub fn get_default_window(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DefaultWindow)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn retain_device(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn retain_device(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RetainDevice)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_release_device_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_release_device_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ReleaseDeviceRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_release_device_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_release_device_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ReleaseDeviceRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ClaimedLineDisplay: IClaimedLineDisplay} impl RtActivatable for ClaimedLineDisplay {} impl ClaimedLineDisplay { - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} - #[inline] pub fn get_device_selector() -> Result { unsafe { + } + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} - #[inline] pub fn get_device_selector_with_connection_types(connectionTypes: PosConnectionTypes) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_with_connection_types(connectionTypes: PosConnectionTypes) -> Result { >::get_activation_factory().get_device_selector_with_connection_types(connectionTypes) - }} + } } DEFINE_CLSID!(ClaimedLineDisplay(&[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,108,97,105,109,101,100,76,105,110,101,68,105,115,112,108,97,121,0]) [CLSID_ClaimedLineDisplay]); DEFINE_IID!(IID_IClaimedLineDisplay2, 2736551405, 16885, 20086, 160, 116, 121, 94, 71, 164, 110, 151); RT_INTERFACE!{interface IClaimedLineDisplay2(IClaimedLineDisplay2Vtbl): IInspectable(IInspectableVtbl) [IID_IClaimedLineDisplay2] { - fn GetStatisticsAsync(&self, statisticsCategories: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CheckHealthAsync(&self, level: UnifiedPosHealthCheckLevel, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CheckPowerStatusAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_StatusUpdated(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StatusUpdated(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_SupportedScreenSizesInCharacters(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_MaxBitmapSizeInPixels(&self, out: *mut super::super::foundation::Size) -> HRESULT, - fn get_SupportedCharacterSets(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn GetStatisticsAsync(&self, statisticsCategories: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CheckHealthAsync(&self, level: UnifiedPosHealthCheckLevel, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CheckPowerStatusAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_StatusUpdated(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StatusUpdated(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn get_SupportedScreenSizesInCharacters(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_MaxBitmapSizeInPixels(&self, out: *mut foundation::Size) -> HRESULT, + fn get_SupportedCharacterSets(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_CustomGlyphs(&self, out: *mut *mut LineDisplayCustomGlyphs) -> HRESULT, fn GetAttributes(&self, out: *mut *mut LineDisplayAttributes) -> HRESULT, - fn TryUpdateAttributesAsync(&self, attributes: *mut LineDisplayAttributes, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TrySetDescriptorAsync(&self, descriptor: u32, descriptorState: LineDisplayDescriptorState, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryClearDescriptorsAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryCreateWindowAsync(&self, viewport: super::super::foundation::Rect, windowSize: super::super::foundation::Size, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn TryStoreStorageFileBitmapAsync(&self, bitmap: *mut super::super::storage::StorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn TryStoreStorageFileBitmapWithAlignmentAsync(&self, bitmap: *mut super::super::storage::StorageFile, horizontalAlignment: LineDisplayHorizontalAlignment, verticalAlignment: LineDisplayVerticalAlignment, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn TryStoreStorageFileBitmapWithAlignmentAndWidthAsync(&self, bitmap: *mut super::super::storage::StorageFile, horizontalAlignment: LineDisplayHorizontalAlignment, verticalAlignment: LineDisplayVerticalAlignment, widthInPixels: i32, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn TryUpdateAttributesAsync(&self, attributes: *mut LineDisplayAttributes, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TrySetDescriptorAsync(&self, descriptor: u32, descriptorState: LineDisplayDescriptorState, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryClearDescriptorsAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryCreateWindowAsync(&self, viewport: foundation::Rect, windowSize: foundation::Size, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn TryStoreStorageFileBitmapAsync(&self, bitmap: *mut super::super::storage::StorageFile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn TryStoreStorageFileBitmapWithAlignmentAsync(&self, bitmap: *mut super::super::storage::StorageFile, horizontalAlignment: LineDisplayHorizontalAlignment, verticalAlignment: LineDisplayVerticalAlignment, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn TryStoreStorageFileBitmapWithAlignmentAndWidthAsync(&self, bitmap: *mut super::super::storage::StorageFile, horizontalAlignment: LineDisplayHorizontalAlignment, verticalAlignment: LineDisplayVerticalAlignment, widthInPixels: i32, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IClaimedLineDisplay2 { - #[inline] pub unsafe fn get_statistics_async(&self, statisticsCategories: &super::super::foundation::collections::IIterable) -> Result>> { + #[inline] pub fn get_statistics_async(&self, statisticsCategories: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetStatisticsAsync)(self as *const _ as *mut _, statisticsCategories as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn check_health_async(&self, level: UnifiedPosHealthCheckLevel) -> Result>> { + }} + #[inline] pub fn check_health_async(&self, level: UnifiedPosHealthCheckLevel) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CheckHealthAsync)(self as *const _ as *mut _, level, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn check_power_status_async(&self) -> Result>> { + }} + #[inline] pub fn check_power_status_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CheckPowerStatusAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_status_updated(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_status_updated(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StatusUpdated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_status_updated(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_status_updated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StatusUpdated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_screen_sizes_in_characters(&self) -> Result>> { + }} + #[inline] pub fn get_supported_screen_sizes_in_characters(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedScreenSizesInCharacters)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_bitmap_size_in_pixels(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_max_bitmap_size_in_pixels(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxBitmapSizeInPixels)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_character_sets(&self) -> Result>> { + }} + #[inline] pub fn get_supported_character_sets(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedCharacterSets)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_custom_glyphs(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_custom_glyphs(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CustomGlyphs)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_attributes(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_attributes(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAttributes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_update_attributes_async(&self, attributes: &LineDisplayAttributes) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn try_update_attributes_async(&self, attributes: &LineDisplayAttributes) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryUpdateAttributesAsync)(self as *const _ as *mut _, attributes as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_set_descriptor_async(&self, descriptor: u32, descriptorState: LineDisplayDescriptorState) -> Result>> { + }} + #[inline] pub fn try_set_descriptor_async(&self, descriptor: u32, descriptorState: LineDisplayDescriptorState) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TrySetDescriptorAsync)(self as *const _ as *mut _, descriptor, descriptorState, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_clear_descriptors_async(&self) -> Result>> { + }} + #[inline] pub fn try_clear_descriptors_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryClearDescriptorsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_create_window_async(&self, viewport: super::super::foundation::Rect, windowSize: super::super::foundation::Size) -> Result>> { + }} + #[inline] pub fn try_create_window_async(&self, viewport: foundation::Rect, windowSize: foundation::Size) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryCreateWindowAsync)(self as *const _ as *mut _, viewport, windowSize, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn try_store_storage_file_bitmap_async(&self, bitmap: &super::super::storage::StorageFile) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn try_store_storage_file_bitmap_async(&self, bitmap: &super::super::storage::StorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryStoreStorageFileBitmapAsync)(self as *const _ as *mut _, bitmap 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_store_storage_file_bitmap_with_alignment_async(&self, bitmap: &super::super::storage::StorageFile, horizontalAlignment: LineDisplayHorizontalAlignment, verticalAlignment: LineDisplayVerticalAlignment) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn try_store_storage_file_bitmap_with_alignment_async(&self, bitmap: &super::super::storage::StorageFile, horizontalAlignment: LineDisplayHorizontalAlignment, verticalAlignment: LineDisplayVerticalAlignment) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryStoreStorageFileBitmapWithAlignmentAsync)(self as *const _ as *mut _, bitmap as *const _ as *mut _, horizontalAlignment, verticalAlignment, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn try_store_storage_file_bitmap_with_alignment_and_width_async(&self, bitmap: &super::super::storage::StorageFile, horizontalAlignment: LineDisplayHorizontalAlignment, verticalAlignment: LineDisplayVerticalAlignment, widthInPixels: i32) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn try_store_storage_file_bitmap_with_alignment_and_width_async(&self, bitmap: &super::super::storage::StorageFile, horizontalAlignment: LineDisplayHorizontalAlignment, verticalAlignment: LineDisplayVerticalAlignment, widthInPixels: i32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryStoreStorageFileBitmapWithAlignmentAndWidthAsync)(self as *const _ as *mut _, bitmap as *const _ as *mut _, horizontalAlignment, verticalAlignment, widthInPixels, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IClaimedLineDisplayStatics, 2026543355, 35691, 18803, 134, 240, 62, 87, 12, 53, 24, 37); RT_INTERFACE!{static interface IClaimedLineDisplayStatics(IClaimedLineDisplayStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IClaimedLineDisplayStatics] { - fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetDeviceSelector(&self, out: *mut HSTRING) -> HRESULT, fn GetDeviceSelectorWithConnectionTypes(&self, connectionTypes: PosConnectionTypes, out: *mut HSTRING) -> HRESULT }} impl IClaimedLineDisplayStatics { - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + }} + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector_with_connection_types(&self, connectionTypes: PosConnectionTypes) -> Result { + }} + #[inline] pub fn get_device_selector_with_connection_types(&self, connectionTypes: PosConnectionTypes) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorWithConnectionTypes)(self as *const _ as *mut _, connectionTypes, &mut out); if hr == S_OK { Ok(HString::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] { @@ -20304,182 +20304,182 @@ RT_INTERFACE!{interface IClaimedMagneticStripeReader(IClaimedMagneticStripeReade fn get_TracksToRead(&self, out: *mut MagneticStripeReaderTrackIds) -> HRESULT, fn put_IsTransmitSentinelsEnabled(&self, value: bool) -> HRESULT, fn get_IsTransmitSentinelsEnabled(&self, out: *mut bool) -> HRESULT, - fn EnableAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn DisableAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn EnableAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn DisableAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn RetainDevice(&self) -> HRESULT, fn SetErrorReportingType(&self, value: MagneticStripeReaderErrorReportingType) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy17(&self) -> (), - #[cfg(feature="windows-storage")] fn RetrieveDeviceAuthenticationDataAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn AuthenticateDeviceAsync(&self, responseTokenSize: u32, responseToken: *mut u8, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn DeAuthenticateDeviceAsync(&self, responseTokenSize: u32, responseToken: *mut u8, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn UpdateKeyAsync(&self, key: HSTRING, keyName: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn ResetStatisticsAsync(&self, statisticsCategories: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn UpdateStatisticsAsync(&self, statistics: *mut super::super::foundation::collections::IIterable>, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn add_BankCardDataReceived(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_BankCardDataReceived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_AamvaCardDataReceived(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AamvaCardDataReceived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_VendorSpecificDataReceived(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_VendorSpecificDataReceived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ReleaseDeviceRequested(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReleaseDeviceRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ErrorOccurred(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ErrorOccurred(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + #[cfg(feature="windows-storage")] fn RetrieveDeviceAuthenticationDataAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn AuthenticateDeviceAsync(&self, responseTokenSize: u32, responseToken: *mut u8, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn DeAuthenticateDeviceAsync(&self, responseTokenSize: u32, responseToken: *mut u8, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn UpdateKeyAsync(&self, key: HSTRING, keyName: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ResetStatisticsAsync(&self, statisticsCategories: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn UpdateStatisticsAsync(&self, statistics: *mut foundation::collections::IIterable>, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn add_BankCardDataReceived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_BankCardDataReceived(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_AamvaCardDataReceived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AamvaCardDataReceived(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_VendorSpecificDataReceived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_VendorSpecificDataReceived(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ReleaseDeviceRequested(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReleaseDeviceRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ErrorOccurred(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ErrorOccurred(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IClaimedMagneticStripeReader { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_disabled_on_data_received(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_disabled_on_data_received(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsDisabledOnDataReceived)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_disabled_on_data_received(&self) -> Result { + }} + #[inline] pub fn get_is_disabled_on_data_received(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDisabledOnDataReceived)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_decode_data_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_decode_data_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsDecodeDataEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_decode_data_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_decode_data_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDecodeDataEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_device_authenticated(&self) -> Result { + }} + #[inline] pub fn get_is_device_authenticated(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDeviceAuthenticated)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_data_encryption_algorithm(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_data_encryption_algorithm(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DataEncryptionAlgorithm)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_data_encryption_algorithm(&self) -> Result { + }} + #[inline] pub fn get_data_encryption_algorithm(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DataEncryptionAlgorithm)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_tracks_to_read(&self, value: MagneticStripeReaderTrackIds) -> Result<()> { + }} + #[inline] pub fn set_tracks_to_read(&self, value: MagneticStripeReaderTrackIds) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TracksToRead)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_tracks_to_read(&self) -> Result { + }} + #[inline] pub fn get_tracks_to_read(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TracksToRead)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_transmit_sentinels_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_transmit_sentinels_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsTransmitSentinelsEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_transmit_sentinels_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_transmit_sentinels_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsTransmitSentinelsEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn enable_async(&self) -> Result> { + }} + #[inline] pub fn enable_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).EnableAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn disable_async(&self) -> Result> { + }} + #[inline] pub fn disable_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DisableAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn retain_device(&self) -> Result<()> { + }} + #[inline] pub fn retain_device(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RetainDevice)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_error_reporting_type(&self, value: MagneticStripeReaderErrorReportingType) -> Result<()> { + }} + #[inline] pub fn set_error_reporting_type(&self, value: MagneticStripeReaderErrorReportingType) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetErrorReportingType)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn retrieve_device_authentication_data_async(&self) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn retrieve_device_authentication_data_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RetrieveDeviceAuthenticationDataAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn authenticate_device_async(&self, responseToken: &[u8]) -> Result> { + }} + #[inline] pub fn authenticate_device_async(&self, responseToken: &[u8]) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AuthenticateDeviceAsync)(self as *const _ as *mut _, 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(&self, responseToken: &[u8]) -> Result> { + }} + #[inline] pub fn de_authenticate_device_async(&self, responseToken: &[u8]) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeAuthenticateDeviceAsync)(self as *const _ as *mut _, 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(&self, key: &HStringArg, keyName: &HStringArg) -> Result> { + }} + #[inline] pub fn update_key_async(&self, key: &HStringArg, keyName: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UpdateKeyAsync)(self as *const _ as *mut _, key.get(), keyName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn reset_statistics_async(&self, statisticsCategories: &super::super::foundation::collections::IIterable) -> Result> { + }} + #[inline] pub fn reset_statistics_async(&self, statisticsCategories: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ResetStatisticsAsync)(self as *const _ as *mut _, 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(&self, statistics: &super::super::foundation::collections::IIterable>) -> Result> { + }} + #[inline] pub fn update_statistics_async(&self, statistics: &foundation::collections::IIterable>) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UpdateStatisticsAsync)(self as *const _ as *mut _, 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(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_bank_card_data_received(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_BankCardDataReceived)(self as *const _ as *mut _, 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(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_bank_card_data_received(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_BankCardDataReceived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_aamva_card_data_received(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_aamva_card_data_received(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AamvaCardDataReceived)(self as *const _ as *mut _, 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(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_aamva_card_data_received(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AamvaCardDataReceived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_vendor_specific_data_received(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_vendor_specific_data_received(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_VendorSpecificDataReceived)(self as *const _ as *mut _, 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(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_vendor_specific_data_received(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_VendorSpecificDataReceived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_release_device_requested(&self, handler: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_release_device_requested(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ReleaseDeviceRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_release_device_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_release_device_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ReleaseDeviceRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_error_occurred(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_error_occurred(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ErrorOccurred)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_error_occurred(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_error_occurred(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ErrorOccurred)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ClaimedMagneticStripeReader: IClaimedMagneticStripeReader} DEFINE_IID!(IID_IClaimedPosPrinter, 1835322892, 57406, 19220, 163, 142, 194, 140, 52, 184, 99, 83); @@ -20496,106 +20496,106 @@ RT_INTERFACE!{interface IClaimedPosPrinter(IClaimedPosPrinterVtbl): IInspectable fn get_Receipt(&self, out: *mut *mut ClaimedReceiptPrinter) -> HRESULT, fn get_Slip(&self, out: *mut *mut ClaimedSlipPrinter) -> HRESULT, fn get_Journal(&self, out: *mut *mut ClaimedJournalPrinter) -> HRESULT, - fn EnableAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn DisableAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RetainDeviceAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn ResetStatisticsAsync(&self, statisticsCategories: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn UpdateStatisticsAsync(&self, statistics: *mut super::super::foundation::collections::IIterable>, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_ReleaseDeviceRequested(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReleaseDeviceRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn EnableAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn DisableAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RetainDeviceAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ResetStatisticsAsync(&self, statisticsCategories: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn UpdateStatisticsAsync(&self, statistics: *mut foundation::collections::IIterable>, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_ReleaseDeviceRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReleaseDeviceRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IClaimedPosPrinter { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_character_set(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_character_set(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CharacterSet)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_character_set(&self) -> Result { + }} + #[inline] pub fn get_character_set(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CharacterSet)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_cover_open(&self) -> Result { + }} + #[inline] pub fn get_is_cover_open(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCoverOpen)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_character_set_mapping_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_character_set_mapping_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsCharacterSetMappingEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_character_set_mapping_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_character_set_mapping_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCharacterSetMappingEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_map_mode(&self, value: PosPrinterMapMode) -> Result<()> { + }} + #[inline] pub fn set_map_mode(&self, value: PosPrinterMapMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MapMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_map_mode(&self) -> Result { + }} + #[inline] pub fn get_map_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MapMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_receipt(&self) -> Result> { + }} + #[inline] pub fn get_receipt(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Receipt)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_slip(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_slip(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Slip)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_journal(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_journal(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Journal)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn enable_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn enable_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).EnableAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn disable_async(&self) -> Result>> { + }} + #[inline] pub fn disable_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DisableAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn retain_device_async(&self) -> Result>> { + }} + #[inline] pub fn retain_device_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RetainDeviceAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn reset_statistics_async(&self, statisticsCategories: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn reset_statistics_async(&self, statisticsCategories: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ResetStatisticsAsync)(self as *const _ as *mut _, 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(&self, statistics: &super::super::foundation::collections::IIterable>) -> Result>> { + }} + #[inline] pub fn update_statistics_async(&self, statistics: &foundation::collections::IIterable>) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UpdateStatisticsAsync)(self as *const _ as *mut _, 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(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_release_device_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ReleaseDeviceRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_release_device_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_release_device_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ReleaseDeviceRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ClaimedPosPrinter: IClaimedPosPrinter} DEFINE_IID!(IID_IClaimedReceiptPrinter, 2597485172, 56673, 20194, 152, 55, 91, 93, 114, 213, 56, 185); @@ -20603,41 +20603,41 @@ RT_INTERFACE!{interface IClaimedReceiptPrinter(IClaimedReceiptPrinterVtbl): IIns fn get_SidewaysMaxLines(&self, out: *mut u32) -> HRESULT, fn get_SidewaysMaxChars(&self, out: *mut u32) -> HRESULT, fn get_LinesToPaperCut(&self, out: *mut u32) -> HRESULT, - fn get_PageSize(&self, out: *mut super::super::foundation::Size) -> HRESULT, - fn get_PrintArea(&self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn get_PageSize(&self, out: *mut foundation::Size) -> HRESULT, + fn get_PrintArea(&self, out: *mut foundation::Rect) -> HRESULT, fn CreateJob(&self, out: *mut *mut ReceiptPrintJob) -> HRESULT }} impl IClaimedReceiptPrinter { - #[inline] pub unsafe fn get_sideways_max_lines(&self) -> Result { + #[inline] pub fn get_sideways_max_lines(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SidewaysMaxLines)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sideways_max_chars(&self) -> Result { + }} + #[inline] pub fn get_sideways_max_chars(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SidewaysMaxChars)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_lines_to_paper_cut(&self) -> Result { + }} + #[inline] pub fn get_lines_to_paper_cut(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LinesToPaperCut)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_page_size(&self) -> Result { + }} + #[inline] pub fn get_page_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PageSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_print_area(&self) -> Result { + }} + #[inline] pub fn get_print_area(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PrintArea)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn create_job(&self) -> Result> { + }} + #[inline] pub fn create_job(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateJob)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ClaimedReceiptPrinter: IClaimedReceiptPrinter} DEFINE_IID!(IID_IClaimedSlipPrinter, 3177050098, 44944, 20106, 183, 123, 227, 174, 156, 166, 58, 127); @@ -20647,78 +20647,78 @@ RT_INTERFACE!{interface IClaimedSlipPrinter(IClaimedSlipPrinterVtbl): IInspectab fn get_MaxLines(&self, out: *mut u32) -> HRESULT, fn get_LinesNearEndToEnd(&self, out: *mut u32) -> HRESULT, fn get_PrintSide(&self, out: *mut PosPrinterPrintSide) -> HRESULT, - fn get_PageSize(&self, out: *mut super::super::foundation::Size) -> HRESULT, - fn get_PrintArea(&self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn get_PageSize(&self, out: *mut foundation::Size) -> HRESULT, + fn get_PrintArea(&self, out: *mut foundation::Rect) -> HRESULT, fn OpenJaws(&self) -> HRESULT, fn CloseJaws(&self) -> HRESULT, - fn InsertSlipAsync(&self, timeout: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RemoveSlipAsync(&self, timeout: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn InsertSlipAsync(&self, timeout: foundation::TimeSpan, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RemoveSlipAsync(&self, timeout: foundation::TimeSpan, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn ChangePrintSide(&self, printSide: PosPrinterPrintSide) -> HRESULT, fn CreateJob(&self, out: *mut *mut SlipPrintJob) -> HRESULT }} impl IClaimedSlipPrinter { - #[inline] pub unsafe fn get_sideways_max_lines(&self) -> Result { + #[inline] pub fn get_sideways_max_lines(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SidewaysMaxLines)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sideways_max_chars(&self) -> Result { + }} + #[inline] pub fn get_sideways_max_chars(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SidewaysMaxChars)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_lines(&self) -> Result { + }} + #[inline] pub fn get_max_lines(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxLines)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_lines_near_end_to_end(&self) -> Result { + }} + #[inline] pub fn get_lines_near_end_to_end(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LinesNearEndToEnd)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_print_side(&self) -> Result { + }} + #[inline] pub fn get_print_side(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PrintSide)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_page_size(&self) -> Result { + }} + #[inline] pub fn get_page_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PageSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_print_area(&self) -> Result { + }} + #[inline] pub fn get_print_area(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PrintArea)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn open_jaws(&self) -> Result<()> { + }} + #[inline] pub fn open_jaws(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OpenJaws)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn close_jaws(&self) -> Result<()> { + }} + #[inline] pub fn close_jaws(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).CloseJaws)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn insert_slip_async(&self, timeout: super::super::foundation::TimeSpan) -> Result>> { + }} + #[inline] pub fn insert_slip_async(&self, timeout: foundation::TimeSpan) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).InsertSlipAsync)(self as *const _ as *mut _, timeout, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn remove_slip_async(&self, timeout: super::super::foundation::TimeSpan) -> Result>> { + }} + #[inline] pub fn remove_slip_async(&self, timeout: foundation::TimeSpan) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RemoveSlipAsync)(self as *const _ as *mut _, timeout, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn change_print_side(&self, printSide: PosPrinterPrintSide) -> Result<()> { + }} + #[inline] pub fn change_print_side(&self, printSide: PosPrinterPrintSide) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ChangePrintSide)(self as *const _ as *mut _, printSide); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn create_job(&self) -> Result> { + }} + #[inline] pub fn create_job(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateJob)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ClaimedSlipPrinter: IClaimedSlipPrinter} DEFINE_IID!(IID_ICommonClaimedPosPrinterStation, 3085657768, 65162, 19707, 139, 66, 227, 91, 40, 12, 178, 124); @@ -20744,96 +20744,96 @@ RT_INTERFACE!{interface ICommonClaimedPosPrinterStation(ICommonClaimedPosPrinter fn ValidateData(&self, data: HSTRING, out: *mut bool) -> HRESULT }} impl ICommonClaimedPosPrinterStation { - #[inline] pub unsafe fn set_characters_per_line(&self, value: u32) -> Result<()> { + #[inline] pub fn set_characters_per_line(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CharactersPerLine)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_characters_per_line(&self) -> Result { + }} + #[inline] pub fn get_characters_per_line(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CharactersPerLine)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_line_height(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_line_height(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LineHeight)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_line_height(&self) -> Result { + }} + #[inline] pub fn get_line_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LineHeight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_line_spacing(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_line_spacing(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LineSpacing)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_line_spacing(&self) -> Result { + }} + #[inline] pub fn get_line_spacing(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LineSpacing)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_line_width(&self) -> Result { + }} + #[inline] pub fn get_line_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LineWidth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_letter_quality(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_letter_quality(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsLetterQuality)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_letter_quality(&self) -> Result { + }} + #[inline] pub fn get_is_letter_quality(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsLetterQuality)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_paper_near_end(&self) -> Result { + }} + #[inline] pub fn get_is_paper_near_end(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPaperNearEnd)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_color_cartridge(&self, value: PosPrinterColorCartridge) -> Result<()> { + }} + #[inline] pub fn set_color_cartridge(&self, value: PosPrinterColorCartridge) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ColorCartridge)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_color_cartridge(&self) -> Result { + }} + #[inline] pub fn get_color_cartridge(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ColorCartridge)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_cover_open(&self) -> Result { + }} + #[inline] pub fn get_is_cover_open(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCoverOpen)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_cartridge_removed(&self) -> Result { + }} + #[inline] pub fn get_is_cartridge_removed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCartridgeRemoved)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_cartridge_empty(&self) -> Result { + }} + #[inline] pub fn get_is_cartridge_empty(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCartridgeEmpty)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_head_cleaning(&self) -> Result { + }} + #[inline] pub fn get_is_head_cleaning(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsHeadCleaning)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_paper_empty(&self) -> Result { + }} + #[inline] pub fn get_is_paper_empty(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPaperEmpty)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_ready_to_print(&self) -> Result { + }} + #[inline] pub fn get_is_ready_to_print(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsReadyToPrint)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn validate_data(&self, data: &HStringArg) -> Result { + }} + #[inline] pub fn validate_data(&self, data: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ValidateData)(self as *const _ as *mut _, data.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ICommonPosPrintStationCapabilities, 3730526922, 57390, 16617, 158, 94, 27, 72, 142, 106, 172, 252); RT_INTERFACE!{interface ICommonPosPrintStationCapabilities(ICommonPosPrintStationCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_ICommonPosPrintStationCapabilities] { @@ -20849,74 +20849,74 @@ RT_INTERFACE!{interface ICommonPosPrintStationCapabilities(ICommonPosPrintStatio fn get_IsDoubleHighDoubleWidePrintSupported(&self, out: *mut bool) -> HRESULT, fn get_IsPaperEmptySensorSupported(&self, out: *mut bool) -> HRESULT, fn get_IsPaperNearEndSensorSupported(&self, out: *mut bool) -> HRESULT, - fn get_SupportedCharactersPerLine(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_SupportedCharactersPerLine(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl ICommonPosPrintStationCapabilities { - #[inline] pub unsafe fn get_is_printer_present(&self) -> Result { + #[inline] pub fn get_is_printer_present(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPrinterPresent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_dual_color_supported(&self) -> Result { + }} + #[inline] pub fn get_is_dual_color_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDualColorSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_color_cartridge_capabilities(&self) -> Result { + }} + #[inline] pub fn get_color_cartridge_capabilities(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ColorCartridgeCapabilities)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_cartridge_sensors(&self) -> Result { + }} + #[inline] pub fn get_cartridge_sensors(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CartridgeSensors)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_bold_supported(&self) -> Result { + }} + #[inline] pub fn get_is_bold_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsBoldSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_italic_supported(&self) -> Result { + }} + #[inline] pub fn get_is_italic_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsItalicSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_underline_supported(&self) -> Result { + }} + #[inline] pub fn get_is_underline_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsUnderlineSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_double_high_print_supported(&self) -> Result { + }} + #[inline] pub fn get_is_double_high_print_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDoubleHighPrintSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_double_wide_print_supported(&self) -> Result { + }} + #[inline] pub fn get_is_double_wide_print_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDoubleWidePrintSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_double_high_double_wide_print_supported(&self) -> Result { + }} + #[inline] pub fn get_is_double_high_double_wide_print_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDoubleHighDoubleWidePrintSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_paper_empty_sensor_supported(&self) -> Result { + }} + #[inline] pub fn get_is_paper_empty_sensor_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPaperEmptySensorSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_paper_near_end_sensor_supported(&self) -> Result { + }} + #[inline] pub fn get_is_paper_near_end_sensor_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPaperNearEndSensorSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_characters_per_line(&self) -> Result>> { + }} + #[inline] pub fn get_supported_characters_per_line(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedCharactersPerLine)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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] { @@ -20927,55 +20927,55 @@ RT_INTERFACE!{interface ICommonReceiptSlipCapabilities(ICommonReceiptSlipCapabil fn get_Is180RotationSupported(&self, out: *mut bool) -> HRESULT, fn get_IsPrintAreaSupported(&self, out: *mut bool) -> HRESULT, fn get_RuledLineCapabilities(&self, out: *mut PosPrinterRuledLineCapabilities) -> HRESULT, - fn get_SupportedBarcodeRotations(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_SupportedBitmapRotations(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_SupportedBarcodeRotations(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedBitmapRotations(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl ICommonReceiptSlipCapabilities { - #[inline] pub unsafe fn get_is_barcode_supported(&self) -> Result { + #[inline] pub fn get_is_barcode_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsBarcodeSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_bitmap_supported(&self) -> Result { + }} + #[inline] pub fn get_is_bitmap_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsBitmapSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_left90_rotation_supported(&self) -> Result { + }} + #[inline] pub fn get_is_left90_rotation_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsLeft90RotationSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_right90_rotation_supported(&self) -> Result { + }} + #[inline] pub fn get_is_right90_rotation_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsRight90RotationSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is180_rotation_supported(&self) -> Result { + }} + #[inline] pub fn get_is180_rotation_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Is180RotationSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_print_area_supported(&self) -> Result { + }} + #[inline] pub fn get_is_print_area_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPrintAreaSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ruled_line_capabilities(&self) -> Result { + }} + #[inline] pub fn get_ruled_line_capabilities(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RuledLineCapabilities)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_barcode_rotations(&self) -> Result>> { + }} + #[inline] pub fn get_supported_barcode_rotations(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedBarcodeRotations)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_bitmap_rotations(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_supported_bitmap_rotations(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedBitmapRotations)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IJournalPrinterCapabilities, 995937347, 57415, 17507, 187, 88, 23, 181, 186, 29, 128, 86); RT_INTERFACE!{interface IJournalPrinterCapabilities(IJournalPrinterCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_IJournalPrinterCapabilities] { @@ -20992,81 +20992,81 @@ RT_INTERFACE!{interface ILineDisplay(ILineDisplayVtbl): IInspectable(IInspectabl fn get_DeviceControlDescription(&self, out: *mut HSTRING) -> HRESULT, fn get_DeviceControlVersion(&self, out: *mut HSTRING) -> HRESULT, fn get_DeviceServiceVersion(&self, out: *mut HSTRING) -> HRESULT, - fn ClaimAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn ClaimAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ILineDisplay { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_capabilities(&self) -> Result> { + }} + #[inline] pub fn get_capabilities(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Capabilities)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_physical_device_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_physical_device_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PhysicalDeviceName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_physical_device_description(&self) -> Result { + }} + #[inline] pub fn get_physical_device_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PhysicalDeviceDescription)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_control_description(&self) -> Result { + }} + #[inline] pub fn get_device_control_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceControlDescription)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_control_version(&self) -> Result { + }} + #[inline] pub fn get_device_control_version(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceControlVersion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_service_version(&self) -> Result { + }} + #[inline] pub fn get_device_service_version(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceServiceVersion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn claim_async(&self) -> Result>> { + }} + #[inline] pub fn claim_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ClaimAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class LineDisplay: ILineDisplay} impl RtActivatable for LineDisplay {} impl RtActivatable for LineDisplay {} impl LineDisplay { - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} - #[inline] pub fn get_default_async() -> Result>> { unsafe { + } + #[inline] pub fn get_default_async() -> Result>> { >::get_activation_factory().get_default_async() - }} - #[inline] pub fn get_device_selector() -> Result { unsafe { + } + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} - #[inline] pub fn get_device_selector_with_connection_types(connectionTypes: PosConnectionTypes) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_with_connection_types(connectionTypes: PosConnectionTypes) -> Result { >::get_activation_factory().get_device_selector_with_connection_types(connectionTypes) - }} - #[inline] pub fn get_statistics_category_selector() -> Result> { unsafe { + } + #[inline] pub fn get_statistics_category_selector() -> Result>> { >::get_activation_factory().get_statistics_category_selector() - }} + } } DEFINE_CLSID!(LineDisplay(&[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,76,105,110,101,68,105,115,112,108,97,121,0]) [CLSID_LineDisplay]); DEFINE_IID!(IID_ILineDisplay2, 3264652840, 61252, 16627, 189, 28, 176, 76, 106, 92, 220, 125); RT_INTERFACE!{interface ILineDisplay2(ILineDisplay2Vtbl): IInspectable(IInspectableVtbl) [IID_ILineDisplay2] { - fn CheckPowerStatusAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn CheckPowerStatusAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ILineDisplay2 { - #[inline] pub unsafe fn check_power_status_async(&self) -> Result>> { + #[inline] pub fn check_power_status_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CheckPowerStatusAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ILineDisplayAttributes, 3246254492, 8858, 19476, 166, 241, 180, 228, 177, 254, 173, 146); RT_INTERFACE!{interface ILineDisplayAttributes(ILineDisplayAttributesVtbl): IInspectable(IInspectableVtbl) [IID_ILineDisplayAttributes] { @@ -21074,10 +21074,10 @@ RT_INTERFACE!{interface ILineDisplayAttributes(ILineDisplayAttributesVtbl): IIns fn put_IsPowerNotifyEnabled(&self, value: bool) -> HRESULT, fn get_Brightness(&self, out: *mut i32) -> HRESULT, fn put_Brightness(&self, value: i32) -> HRESULT, - fn get_BlinkRate(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_BlinkRate(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_ScreenSizeInCharacters(&self, out: *mut super::super::foundation::Size) -> HRESULT, - fn put_ScreenSizeInCharacters(&self, value: super::super::foundation::Size) -> HRESULT, + fn get_BlinkRate(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_BlinkRate(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_ScreenSizeInCharacters(&self, out: *mut foundation::Size) -> HRESULT, + fn put_ScreenSizeInCharacters(&self, value: foundation::Size) -> HRESULT, fn get_CharacterSet(&self, out: *mut i32) -> HRESULT, fn put_CharacterSet(&self, value: i32) -> HRESULT, fn get_IsCharacterSetMappingEnabled(&self, out: *mut bool) -> HRESULT, @@ -21086,69 +21086,69 @@ RT_INTERFACE!{interface ILineDisplayAttributes(ILineDisplayAttributesVtbl): IIns fn put_CurrentWindow(&self, value: *mut LineDisplayWindow) -> HRESULT }} impl ILineDisplayAttributes { - #[inline] pub unsafe fn get_is_power_notify_enabled(&self) -> Result { + #[inline] pub fn get_is_power_notify_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPowerNotifyEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_power_notify_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_power_notify_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsPowerNotifyEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_brightness(&self) -> Result { + }} + #[inline] pub fn get_brightness(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Brightness)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_brightness(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_brightness(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Brightness)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_blink_rate(&self) -> Result { + }} + #[inline] pub fn get_blink_rate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BlinkRate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_blink_rate(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_blink_rate(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BlinkRate)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_screen_size_in_characters(&self) -> Result { + }} + #[inline] pub fn get_screen_size_in_characters(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ScreenSizeInCharacters)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_screen_size_in_characters(&self, value: super::super::foundation::Size) -> Result<()> { + }} + #[inline] pub fn set_screen_size_in_characters(&self, value: foundation::Size) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ScreenSizeInCharacters)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_character_set(&self) -> Result { + }} + #[inline] pub fn get_character_set(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CharacterSet)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_character_set(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_character_set(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CharacterSet)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_character_set_mapping_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_character_set_mapping_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCharacterSetMappingEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_character_set_mapping_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_character_set_mapping_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsCharacterSetMappingEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_window(&self) -> Result> { + }} + #[inline] pub fn get_current_window(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CurrentWindow)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_current_window(&self, value: &LineDisplayWindow) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_current_window(&self, value: &LineDisplayWindow) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CurrentWindow)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class LineDisplayAttributes: ILineDisplayAttributes} DEFINE_IID!(IID_ILineDisplayCapabilities, 1511372241, 36293, 19356, 145, 114, 48, 62, 71, 183, 12, 85); @@ -21173,96 +21173,96 @@ RT_INTERFACE!{interface ILineDisplayCapabilities(ILineDisplayCapabilitiesVtbl): fn get_SupportedWindows(&self, out: *mut u32) -> HRESULT }} impl ILineDisplayCapabilities { - #[inline] pub unsafe fn get_is_statistics_reporting_supported(&self) -> Result { + #[inline] pub fn get_is_statistics_reporting_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsStatisticsReportingSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_statistics_updating_supported(&self) -> Result { + }} + #[inline] pub fn get_is_statistics_updating_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsStatisticsUpdatingSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_power_reporting_type(&self) -> Result { + }} + #[inline] pub fn get_power_reporting_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PowerReportingType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_change_screen_size(&self) -> Result { + }} + #[inline] pub fn get_can_change_screen_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanChangeScreenSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_display_bitmaps(&self) -> Result { + }} + #[inline] pub fn get_can_display_bitmaps(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanDisplayBitmaps)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_read_character_at_cursor(&self) -> Result { + }} + #[inline] pub fn get_can_read_character_at_cursor(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanReadCharacterAtCursor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_map_character_sets(&self) -> Result { + }} + #[inline] pub fn get_can_map_character_sets(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanMapCharacterSets)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_display_custom_glyphs(&self) -> Result { + }} + #[inline] pub fn get_can_display_custom_glyphs(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanDisplayCustomGlyphs)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_reverse(&self) -> Result { + }} + #[inline] pub fn get_can_reverse(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanReverse)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_blink(&self) -> Result { + }} + #[inline] pub fn get_can_blink(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanBlink)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_change_blink_rate(&self) -> Result { + }} + #[inline] pub fn get_can_change_blink_rate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanChangeBlinkRate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_brightness_supported(&self) -> Result { + }} + #[inline] pub fn get_is_brightness_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsBrightnessSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_cursor_supported(&self) -> Result { + }} + #[inline] pub fn get_is_cursor_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCursorSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_horizontal_marquee_supported(&self) -> Result { + }} + #[inline] pub fn get_is_horizontal_marquee_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsHorizontalMarqueeSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_vertical_marquee_supported(&self) -> Result { + }} + #[inline] pub fn get_is_vertical_marquee_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsVerticalMarqueeSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_inter_character_wait_supported(&self) -> Result { + }} + #[inline] pub fn get_is_inter_character_wait_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsInterCharacterWaitSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_descriptors(&self) -> Result { + }} + #[inline] pub fn get_supported_descriptors(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SupportedDescriptors)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_windows(&self) -> Result { + }} + #[inline] pub fn get_supported_windows(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SupportedWindows)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class LineDisplayCapabilities: ILineDisplayCapabilities} DEFINE_IID!(IID_ILineDisplayCursor, 3974102085, 30026, 20027, 171, 43, 21, 17, 129, 8, 86, 5); @@ -21275,54 +21275,54 @@ RT_INTERFACE!{interface ILineDisplayCursor(ILineDisplayCursorVtbl): IInspectable fn get_IsReverseSupported(&self, out: *mut bool) -> HRESULT, fn get_IsOtherSupported(&self, out: *mut bool) -> HRESULT, fn GetAttributes(&self, out: *mut *mut LineDisplayCursorAttributes) -> HRESULT, - fn TryUpdateAttributesAsync(&self, attributes: *mut LineDisplayCursorAttributes, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn TryUpdateAttributesAsync(&self, attributes: *mut LineDisplayCursorAttributes, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ILineDisplayCursor { - #[inline] pub unsafe fn get_can_customize(&self) -> Result { + #[inline] pub fn get_can_customize(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanCustomize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_blink_supported(&self) -> Result { + }} + #[inline] pub fn get_is_blink_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsBlinkSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_block_supported(&self) -> Result { + }} + #[inline] pub fn get_is_block_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsBlockSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_half_block_supported(&self) -> Result { + }} + #[inline] pub fn get_is_half_block_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsHalfBlockSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_underline_supported(&self) -> Result { + }} + #[inline] pub fn get_is_underline_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsUnderlineSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_reverse_supported(&self) -> Result { + }} + #[inline] pub fn get_is_reverse_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsReverseSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_other_supported(&self) -> Result { + }} + #[inline] pub fn get_is_other_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsOtherSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_attributes(&self) -> Result> { + }} + #[inline] pub fn get_attributes(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAttributes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_update_attributes_async(&self, attributes: &LineDisplayCursorAttributes) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn try_update_attributes_async(&self, attributes: &LineDisplayCursorAttributes) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryUpdateAttributesAsync)(self as *const _ as *mut _, attributes as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class LineDisplayCursor: ILineDisplayCursor} DEFINE_IID!(IID_ILineDisplayCursorAttributes, 1311593726, 20477, 16784, 170, 225, 206, 40, 95, 32, 200, 150); @@ -21333,46 +21333,46 @@ RT_INTERFACE!{interface ILineDisplayCursorAttributes(ILineDisplayCursorAttribute fn put_CursorType(&self, value: LineDisplayCursorType) -> HRESULT, fn get_IsAutoAdvanceEnabled(&self, out: *mut bool) -> HRESULT, fn put_IsAutoAdvanceEnabled(&self, value: bool) -> HRESULT, - fn get_Position(&self, out: *mut super::super::foundation::Point) -> HRESULT, - fn put_Position(&self, value: super::super::foundation::Point) -> HRESULT + fn get_Position(&self, out: *mut foundation::Point) -> HRESULT, + fn put_Position(&self, value: foundation::Point) -> HRESULT }} impl ILineDisplayCursorAttributes { - #[inline] pub unsafe fn get_is_blink_enabled(&self) -> Result { + #[inline] pub fn get_is_blink_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsBlinkEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_blink_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_blink_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsBlinkEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_cursor_type(&self) -> Result { + }} + #[inline] pub fn get_cursor_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CursorType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_cursor_type(&self, value: LineDisplayCursorType) -> Result<()> { + }} + #[inline] pub fn set_cursor_type(&self, value: LineDisplayCursorType) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CursorType)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_auto_advance_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_auto_advance_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsAutoAdvanceEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_auto_advance_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_auto_advance_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsAutoAdvanceEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_position(&self) -> Result { + }} + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_position(&self, value: super::super::foundation::Point) -> Result<()> { + }} + #[inline] pub fn set_position(&self, value: foundation::Point) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Position)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class LineDisplayCursorAttributes: ILineDisplayCursorAttributes} RT_ENUM! { enum LineDisplayCursorType: i32 { @@ -21380,26 +21380,26 @@ RT_ENUM! { enum LineDisplayCursorType: i32 { }} DEFINE_IID!(IID_ILineDisplayCustomGlyphs, 576190012, 62051, 17649, 161, 160, 231, 80, 166, 160, 236, 84); RT_INTERFACE!{interface ILineDisplayCustomGlyphs(ILineDisplayCustomGlyphsVtbl): IInspectable(IInspectableVtbl) [IID_ILineDisplayCustomGlyphs] { - fn get_SizeInPixels(&self, out: *mut super::super::foundation::Size) -> HRESULT, - fn get_SupportedGlyphCodes(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - #[cfg(feature="windows-storage")] fn TryRedefineAsync(&self, glyphCode: u32, glyphData: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn get_SizeInPixels(&self, out: *mut foundation::Size) -> HRESULT, + fn get_SupportedGlyphCodes(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + #[cfg(feature="windows-storage")] fn TryRedefineAsync(&self, glyphCode: u32, glyphData: *mut super::super::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ILineDisplayCustomGlyphs { - #[inline] pub unsafe fn get_size_in_pixels(&self) -> Result { + #[inline] pub fn get_size_in_pixels(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SizeInPixels)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_glyph_codes(&self) -> Result>> { + }} + #[inline] pub fn get_supported_glyph_codes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedGlyphCodes)(self 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_redefine_async(&self, glyphCode: u32, glyphData: &super::super::storage::streams::IBuffer) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn try_redefine_async(&self, glyphCode: u32, glyphData: &super::super::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryRedefineAsync)(self as *const _ as *mut _, glyphCode, glyphData as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class LineDisplayCustomGlyphs: ILineDisplayCustomGlyphs} RT_ENUM! { enum LineDisplayDescriptorState: i32 { @@ -21412,51 +21412,51 @@ DEFINE_IID!(IID_ILineDisplayMarquee, 2748530238, 62570, 19322, 188, 33, 83, 235, RT_INTERFACE!{interface ILineDisplayMarquee(ILineDisplayMarqueeVtbl): IInspectable(IInspectableVtbl) [IID_ILineDisplayMarquee] { fn get_Format(&self, out: *mut LineDisplayMarqueeFormat) -> HRESULT, fn put_Format(&self, value: LineDisplayMarqueeFormat) -> HRESULT, - fn get_RepeatWaitInterval(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_RepeatWaitInterval(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_ScrollWaitInterval(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_ScrollWaitInterval(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn TryStartScrollingAsync(&self, direction: LineDisplayScrollDirection, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryStopScrollingAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn get_RepeatWaitInterval(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_RepeatWaitInterval(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_ScrollWaitInterval(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_ScrollWaitInterval(&self, value: foundation::TimeSpan) -> HRESULT, + fn TryStartScrollingAsync(&self, direction: LineDisplayScrollDirection, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryStopScrollingAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ILineDisplayMarquee { - #[inline] pub unsafe fn get_format(&self) -> Result { + #[inline] pub fn get_format(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Format)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_format(&self, value: LineDisplayMarqueeFormat) -> Result<()> { + }} + #[inline] pub fn set_format(&self, value: LineDisplayMarqueeFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Format)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_repeat_wait_interval(&self) -> Result { + }} + #[inline] pub fn get_repeat_wait_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RepeatWaitInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_repeat_wait_interval(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_repeat_wait_interval(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RepeatWaitInterval)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_scroll_wait_interval(&self) -> Result { + }} + #[inline] pub fn get_scroll_wait_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ScrollWaitInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_scroll_wait_interval(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_scroll_wait_interval(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ScrollWaitInterval)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn try_start_scrolling_async(&self, direction: LineDisplayScrollDirection) -> Result>> { + }} + #[inline] pub fn try_start_scrolling_async(&self, direction: LineDisplayScrollDirection) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryStartScrollingAsync)(self as *const _ as *mut _, direction, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_stop_scrolling_async(&self) -> Result>> { + }} + #[inline] pub fn try_stop_scrolling_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryStopScrollingAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class LineDisplayMarquee: ILineDisplayMarquee} RT_ENUM! { enum LineDisplayMarqueeFormat: i32 { @@ -21470,43 +21470,43 @@ RT_ENUM! { enum LineDisplayScrollDirection: i32 { }} DEFINE_IID!(IID_ILineDisplayStatics, 36552886, 4528, 18064, 149, 71, 11, 57, 197, 175, 33, 20); RT_INTERFACE!{static interface ILineDisplayStatics(ILineDisplayStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ILineDisplayStatics] { - fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetDefaultAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetDefaultAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetDeviceSelector(&self, out: *mut HSTRING) -> HRESULT, fn GetDeviceSelectorWithConnectionTypes(&self, connectionTypes: PosConnectionTypes, out: *mut HSTRING) -> HRESULT }} impl ILineDisplayStatics { - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_async(&self) -> Result>> { + }} + #[inline] pub fn get_default_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefaultAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + }} + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector_with_connection_types(&self, connectionTypes: PosConnectionTypes) -> Result { + }} + #[inline] pub fn get_device_selector_with_connection_types(&self, connectionTypes: PosConnectionTypes) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorWithConnectionTypes)(self as *const _ as *mut _, connectionTypes, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ILineDisplayStatics2, 1611415324, 30635, 18792, 167, 222, 192, 47, 241, 105, 242, 204); RT_INTERFACE!{static interface ILineDisplayStatics2(ILineDisplayStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_ILineDisplayStatics2] { fn get_StatisticsCategorySelector(&self, out: *mut *mut LineDisplayStatisticsCategorySelector) -> HRESULT }} impl ILineDisplayStatics2 { - #[inline] pub unsafe fn get_statistics_category_selector(&self) -> Result> { + #[inline] pub fn get_statistics_category_selector(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StatisticsCategorySelector)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_ILineDisplayStatisticsCategorySelector, 3038889067, 37492, 19748, 148, 243, 182, 1, 123, 131, 36, 68); RT_INTERFACE!{interface ILineDisplayStatisticsCategorySelector(ILineDisplayStatisticsCategorySelectorVtbl): IInspectable(IInspectableVtbl) [IID_ILineDisplayStatisticsCategorySelector] { @@ -21515,21 +21515,21 @@ RT_INTERFACE!{interface ILineDisplayStatisticsCategorySelector(ILineDisplayStati fn get_ManufacturerStatistics(&self, out: *mut HSTRING) -> HRESULT }} impl ILineDisplayStatisticsCategorySelector { - #[inline] pub unsafe fn get_all_statistics(&self) -> Result { + #[inline] pub fn get_all_statistics(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AllStatistics)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_unified_pos_statistics(&self) -> Result { + }} + #[inline] pub fn get_unified_pos_statistics(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UnifiedPosStatistics)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_manufacturer_statistics(&self) -> Result { + }} + #[inline] pub fn get_manufacturer_statistics(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ManufacturerStatistics)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class LineDisplayStatisticsCategorySelector: ILineDisplayStatisticsCategorySelector} DEFINE_IID!(IID_ILineDisplayStatusUpdatedEventArgs, 3721755674, 34555, 20154, 147, 209, 111, 94, 218, 82, 183, 82); @@ -21537,29 +21537,29 @@ RT_INTERFACE!{interface ILineDisplayStatusUpdatedEventArgs(ILineDisplayStatusUpd fn get_Status(&self, out: *mut LineDisplayPowerStatus) -> HRESULT }} impl ILineDisplayStatusUpdatedEventArgs { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class LineDisplayStatusUpdatedEventArgs: ILineDisplayStatusUpdatedEventArgs} DEFINE_IID!(IID_ILineDisplayStoredBitmap, 4129378651, 55326, 17338, 191, 27, 188, 250, 60, 120, 91, 160); RT_INTERFACE!{interface ILineDisplayStoredBitmap(ILineDisplayStoredBitmapVtbl): IInspectable(IInspectableVtbl) [IID_ILineDisplayStoredBitmap] { fn get_EscapeSequence(&self, out: *mut HSTRING) -> HRESULT, - fn TryDeleteAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn TryDeleteAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ILineDisplayStoredBitmap { - #[inline] pub unsafe fn get_escape_sequence(&self) -> Result { + #[inline] pub fn get_escape_sequence(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EscapeSequence)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_delete_async(&self) -> Result>> { + }} + #[inline] pub fn try_delete_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryDeleteAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class LineDisplayStoredBitmap: ILineDisplayStoredBitmap} RT_ENUM! { enum LineDisplayTextAttribute: i32 { @@ -21573,121 +21573,121 @@ RT_ENUM! { enum LineDisplayVerticalAlignment: i32 { }} DEFINE_IID!(IID_ILineDisplayWindow, 3525308148, 9060, 19429, 190, 225, 133, 22, 128, 175, 73, 100); RT_INTERFACE!{interface ILineDisplayWindow(ILineDisplayWindowVtbl): IInspectable(IInspectableVtbl) [IID_ILineDisplayWindow] { - fn get_SizeInCharacters(&self, out: *mut super::super::foundation::Size) -> HRESULT, - fn get_InterCharacterWaitInterval(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_InterCharacterWaitInterval(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn TryRefreshAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryDisplayTextAsync(&self, text: HSTRING, displayAttribute: LineDisplayTextAttribute, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryDisplayTextAtPositionAsync(&self, text: HSTRING, displayAttribute: LineDisplayTextAttribute, startPosition: super::super::foundation::Point, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryDisplayTextNormalAsync(&self, text: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryScrollTextAsync(&self, direction: LineDisplayScrollDirection, numberOfColumnsOrRows: u32, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryClearTextAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn get_SizeInCharacters(&self, out: *mut foundation::Size) -> HRESULT, + fn get_InterCharacterWaitInterval(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_InterCharacterWaitInterval(&self, value: foundation::TimeSpan) -> HRESULT, + fn TryRefreshAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryDisplayTextAsync(&self, text: HSTRING, displayAttribute: LineDisplayTextAttribute, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryDisplayTextAtPositionAsync(&self, text: HSTRING, displayAttribute: LineDisplayTextAttribute, startPosition: foundation::Point, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryDisplayTextNormalAsync(&self, text: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryScrollTextAsync(&self, direction: LineDisplayScrollDirection, numberOfColumnsOrRows: u32, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryClearTextAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ILineDisplayWindow { - #[inline] pub unsafe fn get_size_in_characters(&self) -> Result { + #[inline] pub fn get_size_in_characters(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SizeInCharacters)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_inter_character_wait_interval(&self) -> Result { + }} + #[inline] pub fn get_inter_character_wait_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InterCharacterWaitInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_inter_character_wait_interval(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_inter_character_wait_interval(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InterCharacterWaitInterval)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn try_refresh_async(&self) -> Result>> { + }} + #[inline] pub fn try_refresh_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryRefreshAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_display_text_async(&self, text: &HStringArg, displayAttribute: LineDisplayTextAttribute) -> Result>> { + }} + #[inline] pub fn try_display_text_async(&self, text: &HStringArg, displayAttribute: LineDisplayTextAttribute) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryDisplayTextAsync)(self as *const _ as *mut _, text.get(), displayAttribute, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_display_text_at_position_async(&self, text: &HStringArg, displayAttribute: LineDisplayTextAttribute, startPosition: super::super::foundation::Point) -> Result>> { + }} + #[inline] pub fn try_display_text_at_position_async(&self, text: &HStringArg, displayAttribute: LineDisplayTextAttribute, startPosition: foundation::Point) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryDisplayTextAtPositionAsync)(self as *const _ as *mut _, text.get(), displayAttribute, startPosition, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_display_text_normal_async(&self, text: &HStringArg) -> Result>> { + }} + #[inline] pub fn try_display_text_normal_async(&self, text: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryDisplayTextNormalAsync)(self as *const _ as *mut _, text.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_scroll_text_async(&self, direction: LineDisplayScrollDirection, numberOfColumnsOrRows: u32) -> Result>> { + }} + #[inline] pub fn try_scroll_text_async(&self, direction: LineDisplayScrollDirection, numberOfColumnsOrRows: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryScrollTextAsync)(self as *const _ as *mut _, direction, numberOfColumnsOrRows, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_clear_text_async(&self) -> Result>> { + }} + #[inline] pub fn try_clear_text_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryClearTextAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class LineDisplayWindow: ILineDisplayWindow} DEFINE_IID!(IID_ILineDisplayWindow2, 2841436902, 48600, 17253, 142, 17, 222, 148, 222, 141, 255, 2); RT_INTERFACE!{interface ILineDisplayWindow2(ILineDisplayWindow2Vtbl): IInspectable(IInspectableVtbl) [IID_ILineDisplayWindow2] { fn get_Cursor(&self, out: *mut *mut LineDisplayCursor) -> HRESULT, fn get_Marquee(&self, out: *mut *mut LineDisplayMarquee) -> HRESULT, - fn ReadCharacterAtCursorAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryDisplayStoredBitmapAtCursorAsync(&self, bitmap: *mut LineDisplayStoredBitmap, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn TryDisplayStorageFileBitmapAtCursorAsync(&self, bitmap: *mut super::super::storage::StorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn TryDisplayStorageFileBitmapAtCursorWithAlignmentAsync(&self, bitmap: *mut super::super::storage::StorageFile, horizontalAlignment: LineDisplayHorizontalAlignment, verticalAlignment: LineDisplayVerticalAlignment, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn TryDisplayStorageFileBitmapAtCursorWithAlignmentAndWidthAsync(&self, bitmap: *mut super::super::storage::StorageFile, horizontalAlignment: LineDisplayHorizontalAlignment, verticalAlignment: LineDisplayVerticalAlignment, widthInPixels: i32, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn TryDisplayStorageFileBitmapAtPointAsync(&self, bitmap: *mut super::super::storage::StorageFile, offsetInPixels: super::super::foundation::Point, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn TryDisplayStorageFileBitmapAtPointWithWidthAsync(&self, bitmap: *mut super::super::storage::StorageFile, offsetInPixels: super::super::foundation::Point, widthInPixels: i32, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn ReadCharacterAtCursorAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryDisplayStoredBitmapAtCursorAsync(&self, bitmap: *mut LineDisplayStoredBitmap, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn TryDisplayStorageFileBitmapAtCursorAsync(&self, bitmap: *mut super::super::storage::StorageFile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn TryDisplayStorageFileBitmapAtCursorWithAlignmentAsync(&self, bitmap: *mut super::super::storage::StorageFile, horizontalAlignment: LineDisplayHorizontalAlignment, verticalAlignment: LineDisplayVerticalAlignment, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn TryDisplayStorageFileBitmapAtCursorWithAlignmentAndWidthAsync(&self, bitmap: *mut super::super::storage::StorageFile, horizontalAlignment: LineDisplayHorizontalAlignment, verticalAlignment: LineDisplayVerticalAlignment, widthInPixels: i32, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn TryDisplayStorageFileBitmapAtPointAsync(&self, bitmap: *mut super::super::storage::StorageFile, offsetInPixels: foundation::Point, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn TryDisplayStorageFileBitmapAtPointWithWidthAsync(&self, bitmap: *mut super::super::storage::StorageFile, offsetInPixels: foundation::Point, widthInPixels: i32, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ILineDisplayWindow2 { - #[inline] pub unsafe fn get_cursor(&self) -> Result> { + #[inline] pub fn get_cursor(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Cursor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_marquee(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_marquee(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Marquee)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn read_character_at_cursor_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn read_character_at_cursor_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadCharacterAtCursorAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_display_stored_bitmap_at_cursor_async(&self, bitmap: &LineDisplayStoredBitmap) -> Result>> { + }} + #[inline] pub fn try_display_stored_bitmap_at_cursor_async(&self, bitmap: &LineDisplayStoredBitmap) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryDisplayStoredBitmapAtCursorAsync)(self as *const _ as *mut _, bitmap 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_display_storage_file_bitmap_at_cursor_async(&self, bitmap: &super::super::storage::StorageFile) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn try_display_storage_file_bitmap_at_cursor_async(&self, bitmap: &super::super::storage::StorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryDisplayStorageFileBitmapAtCursorAsync)(self as *const _ as *mut _, bitmap 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_display_storage_file_bitmap_at_cursor_with_alignment_async(&self, bitmap: &super::super::storage::StorageFile, horizontalAlignment: LineDisplayHorizontalAlignment, verticalAlignment: LineDisplayVerticalAlignment) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn try_display_storage_file_bitmap_at_cursor_with_alignment_async(&self, bitmap: &super::super::storage::StorageFile, horizontalAlignment: LineDisplayHorizontalAlignment, verticalAlignment: LineDisplayVerticalAlignment) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryDisplayStorageFileBitmapAtCursorWithAlignmentAsync)(self as *const _ as *mut _, bitmap as *const _ as *mut _, horizontalAlignment, verticalAlignment, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn try_display_storage_file_bitmap_at_cursor_with_alignment_and_width_async(&self, bitmap: &super::super::storage::StorageFile, horizontalAlignment: LineDisplayHorizontalAlignment, verticalAlignment: LineDisplayVerticalAlignment, widthInPixels: i32) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn try_display_storage_file_bitmap_at_cursor_with_alignment_and_width_async(&self, bitmap: &super::super::storage::StorageFile, horizontalAlignment: LineDisplayHorizontalAlignment, verticalAlignment: LineDisplayVerticalAlignment, widthInPixels: i32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryDisplayStorageFileBitmapAtCursorWithAlignmentAndWidthAsync)(self as *const _ as *mut _, bitmap as *const _ as *mut _, horizontalAlignment, verticalAlignment, widthInPixels, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn try_display_storage_file_bitmap_at_point_async(&self, bitmap: &super::super::storage::StorageFile, offsetInPixels: super::super::foundation::Point) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn try_display_storage_file_bitmap_at_point_async(&self, bitmap: &super::super::storage::StorageFile, offsetInPixels: foundation::Point) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryDisplayStorageFileBitmapAtPointAsync)(self as *const _ as *mut _, bitmap as *const _ as *mut _, offsetInPixels, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn try_display_storage_file_bitmap_at_point_with_width_async(&self, bitmap: &super::super::storage::StorageFile, offsetInPixels: super::super::foundation::Point, widthInPixels: i32) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn try_display_storage_file_bitmap_at_point_with_width_async(&self, bitmap: &super::super::storage::StorageFile, offsetInPixels: foundation::Point, widthInPixels: i32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryDisplayStorageFileBitmapAtPointWithWidthAsync)(self as *const _ as *mut _, bitmap as *const _ as *mut _, offsetInPixels, widthInPixels, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMagneticStripeReader, 445820949, 18371, 18058, 147, 51, 12, 101, 23, 87, 72, 131); RT_INTERFACE!{interface IMagneticStripeReader(IMagneticStripeReaderVtbl): IInspectable(IInspectableVtbl) [IID_IMagneticStripeReader] { @@ -21695,81 +21695,81 @@ RT_INTERFACE!{interface IMagneticStripeReader(IMagneticStripeReaderVtbl): IInspe fn get_Capabilities(&self, out: *mut *mut MagneticStripeReaderCapabilities) -> HRESULT, fn get_SupportedCardTypes(&self, outSize: *mut u32, out: *mut *mut u32) -> HRESULT, fn get_DeviceAuthenticationProtocol(&self, out: *mut MagneticStripeReaderAuthenticationProtocol) -> HRESULT, - fn CheckHealthAsync(&self, level: UnifiedPosHealthCheckLevel, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn ClaimReaderAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CheckHealthAsync(&self, level: UnifiedPosHealthCheckLevel, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ClaimReaderAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy6(&self) -> (), - #[cfg(feature="windows-storage")] fn RetrieveStatisticsAsync(&self, statisticsCategories: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn RetrieveStatisticsAsync(&self, statisticsCategories: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetErrorReportingType(&self, out: *mut MagneticStripeReaderErrorReportingType) -> HRESULT, - fn add_StatusUpdated(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StatusUpdated(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_StatusUpdated(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StatusUpdated(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IMagneticStripeReader { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_capabilities(&self) -> Result> { + }} + #[inline] pub fn get_capabilities(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Capabilities)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_card_types(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_supported_card_types(&self) -> Result> { unsafe { let mut outSize = 0; let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedCardTypes)(self as *const _ as *mut _, &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(&self) -> Result { + }} + #[inline] pub fn get_device_authentication_protocol(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DeviceAuthenticationProtocol)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn check_health_async(&self, level: UnifiedPosHealthCheckLevel) -> Result>> { + }} + #[inline] pub fn check_health_async(&self, level: UnifiedPosHealthCheckLevel) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CheckHealthAsync)(self as *const _ as *mut _, level, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn claim_reader_async(&self) -> Result>> { + }} + #[inline] pub fn claim_reader_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ClaimReaderAsync)(self 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(&self, statisticsCategories: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn retrieve_statistics_async(&self, statisticsCategories: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RetrieveStatisticsAsync)(self as *const _ as *mut _, 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(&self) -> Result { + }} + #[inline] pub fn get_error_reporting_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetErrorReportingType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_status_updated(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_status_updated(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StatusUpdated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_status_updated(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_status_updated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StatusUpdated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MagneticStripeReader: IMagneticStripeReader} impl RtActivatable for MagneticStripeReader {} impl RtActivatable for MagneticStripeReader {} impl MagneticStripeReader { - #[inline] pub fn get_default_async() -> Result>> { unsafe { + #[inline] pub fn get_default_async() -> Result>> { >::get_activation_factory().get_default_async() - }} - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} - #[inline] pub fn get_device_selector() -> Result { unsafe { + } + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} - #[inline] pub fn get_device_selector_with_connection_types(connectionTypes: PosConnectionTypes) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_with_connection_types(connectionTypes: PosConnectionTypes) -> Result { >::get_activation_factory().get_device_selector_with_connection_types(connectionTypes) - }} + } } DEFINE_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]) [CLSID_MagneticStripeReader]); DEFINE_IID!(IID_IMagneticStripeReaderAamvaCardDataReceivedEventArgs, 172735825, 49942, 18704, 135, 243, 122, 98, 186, 134, 45, 49); @@ -21795,101 +21795,101 @@ RT_INTERFACE!{interface IMagneticStripeReaderAamvaCardDataReceivedEventArgs(IMag fn get_PostalCode(&self, out: *mut HSTRING) -> HRESULT }} impl IMagneticStripeReaderAamvaCardDataReceivedEventArgs { - #[inline] pub unsafe fn get_report(&self) -> Result> { + #[inline] pub fn get_report(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Report)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_license_number(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_license_number(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LicenseNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_expiration_date(&self) -> Result { + }} + #[inline] pub fn get_expiration_date(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExpirationDate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_restrictions(&self) -> Result { + }} + #[inline] pub fn get_restrictions(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Restrictions)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_class(&self) -> Result { + }} + #[inline] pub fn get_class(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Class)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_endorsements(&self) -> Result { + }} + #[inline] pub fn get_endorsements(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Endorsements)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_birth_date(&self) -> Result { + }} + #[inline] pub fn get_birth_date(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BirthDate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_first_name(&self) -> Result { + }} + #[inline] pub fn get_first_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FirstName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_surname(&self) -> Result { + }} + #[inline] pub fn get_surname(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Surname)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_suffix(&self) -> Result { + }} + #[inline] pub fn get_suffix(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Suffix)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_gender(&self) -> Result { + }} + #[inline] pub fn get_gender(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Gender)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_hair_color(&self) -> Result { + }} + #[inline] pub fn get_hair_color(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HairColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_eye_color(&self) -> Result { + }} + #[inline] pub fn get_eye_color(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EyeColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_height(&self) -> Result { + }} + #[inline] pub fn get_height(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Height)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_weight(&self) -> Result { + }} + #[inline] pub fn get_weight(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Weight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_address(&self) -> Result { + }} + #[inline] pub fn get_address(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Address)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_city(&self) -> Result { + }} + #[inline] pub fn get_city(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_City)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_state(&self) -> Result { + }} + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_postal_code(&self) -> Result { + }} + #[inline] pub fn get_postal_code(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PostalCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class MagneticStripeReaderAamvaCardDataReceivedEventArgs: IMagneticStripeReaderAamvaCardDataReceivedEventArgs} RT_ENUM! { enum MagneticStripeReaderAuthenticationLevel: i32 { @@ -21911,51 +21911,51 @@ RT_INTERFACE!{interface IMagneticStripeReaderBankCardDataReceivedEventArgs(IMagn fn get_Suffix(&self, out: *mut HSTRING) -> HRESULT }} impl IMagneticStripeReaderBankCardDataReceivedEventArgs { - #[inline] pub unsafe fn get_report(&self) -> Result> { + #[inline] pub fn get_report(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Report)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_account_number(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_account_number(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AccountNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_expiration_date(&self) -> Result { + }} + #[inline] pub fn get_expiration_date(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExpirationDate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_code(&self) -> Result { + }} + #[inline] pub fn get_service_code(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServiceCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_title(&self) -> Result { + }} + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_first_name(&self) -> Result { + }} + #[inline] pub fn get_first_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FirstName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_middle_initial(&self) -> Result { + }} + #[inline] pub fn get_middle_initial(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MiddleInitial)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_surname(&self) -> Result { + }} + #[inline] pub fn get_surname(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Surname)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_suffix(&self) -> Result { + }} + #[inline] pub fn get_suffix(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Suffix)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class MagneticStripeReaderBankCardDataReceivedEventArgs: IMagneticStripeReaderBankCardDataReceivedEventArgs} DEFINE_IID!(IID_IMagneticStripeReaderCapabilities, 1898479772, 50240, 17570, 164, 103, 70, 145, 117, 208, 40, 150); @@ -21973,78 +21973,78 @@ RT_INTERFACE!{interface IMagneticStripeReaderCapabilities(IMagneticStripeReaderC fn get_IsTransmitSentinelsSupported(&self, out: *mut bool) -> HRESULT }} impl IMagneticStripeReaderCapabilities { - #[inline] pub unsafe fn get_card_authentication(&self) -> Result { + #[inline] pub fn get_card_authentication(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CardAuthentication)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_encryption_algorithms(&self) -> Result { + }} + #[inline] pub fn get_supported_encryption_algorithms(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SupportedEncryptionAlgorithms)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_authentication_level(&self) -> Result { + }} + #[inline] pub fn get_authentication_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AuthenticationLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_iso_supported(&self) -> Result { + }} + #[inline] pub fn get_is_iso_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsIsoSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_jis_one_supported(&self) -> Result { + }} + #[inline] pub fn get_is_jis_one_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsJisOneSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_jis_two_supported(&self) -> Result { + }} + #[inline] pub fn get_is_jis_two_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsJisTwoSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_power_reporting_type(&self) -> Result { + }} + #[inline] pub fn get_power_reporting_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PowerReportingType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_statistics_reporting_supported(&self) -> Result { + }} + #[inline] pub fn get_is_statistics_reporting_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsStatisticsReportingSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_statistics_updating_supported(&self) -> Result { + }} + #[inline] pub fn get_is_statistics_updating_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsStatisticsUpdatingSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_track_data_masking_supported(&self) -> Result { + }} + #[inline] pub fn get_is_track_data_masking_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsTrackDataMaskingSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_transmit_sentinels_supported(&self) -> Result { + }} + #[inline] pub fn get_is_transmit_sentinels_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsTransmitSentinelsSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MagneticStripeReaderCapabilities: IMagneticStripeReaderCapabilities} RT_CLASS!{static class MagneticStripeReaderCardTypes} impl RtActivatable for MagneticStripeReaderCardTypes {} impl MagneticStripeReaderCardTypes { - #[inline] pub fn get_unknown() -> Result { unsafe { + #[inline] pub fn get_unknown() -> Result { >::get_activation_factory().get_unknown() - }} - #[inline] pub fn get_bank() -> Result { unsafe { + } + #[inline] pub fn get_bank() -> Result { >::get_activation_factory().get_bank() - }} - #[inline] pub fn get_aamva() -> Result { unsafe { + } + #[inline] pub fn get_aamva() -> Result { >::get_activation_factory().get_aamva() - }} - #[inline] pub fn get_extended_base() -> Result { unsafe { + } + #[inline] pub fn get_extended_base() -> Result { >::get_activation_factory().get_extended_base() - }} + } } DEFINE_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]) [CLSID_MagneticStripeReaderCardTypes]); DEFINE_IID!(IID_IMagneticStripeReaderCardTypesStatics, 1385114717, 10630, 18255, 132, 84, 124, 205, 5, 146, 141, 95); @@ -22055,39 +22055,39 @@ RT_INTERFACE!{static interface IMagneticStripeReaderCardTypesStatics(IMagneticSt fn get_ExtendedBase(&self, out: *mut u32) -> HRESULT }} impl IMagneticStripeReaderCardTypesStatics { - #[inline] pub unsafe fn get_unknown(&self) -> Result { + #[inline] pub fn get_unknown(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Unknown)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_bank(&self) -> Result { + }} + #[inline] pub fn get_bank(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Bank)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_aamva(&self) -> Result { + }} + #[inline] pub fn get_aamva(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Aamva)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_base(&self) -> Result { + }} + #[inline] pub fn get_extended_base(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedBase)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{static class MagneticStripeReaderEncryptionAlgorithms} impl RtActivatable for MagneticStripeReaderEncryptionAlgorithms {} impl MagneticStripeReaderEncryptionAlgorithms { - #[inline] pub fn get_none() -> Result { unsafe { + #[inline] pub fn get_none() -> Result { >::get_activation_factory().get_none() - }} - #[inline] pub fn get_triple_des_dukpt() -> Result { unsafe { + } + #[inline] pub fn get_triple_des_dukpt() -> Result { >::get_activation_factory().get_triple_des_dukpt() - }} - #[inline] pub fn get_extended_base() -> Result { unsafe { + } + #[inline] pub fn get_extended_base() -> Result { >::get_activation_factory().get_extended_base() - }} + } } DEFINE_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]) [CLSID_MagneticStripeReaderEncryptionAlgorithms]); DEFINE_IID!(IID_IMagneticStripeReaderEncryptionAlgorithmsStatics, 1404400464, 50139, 18260, 156, 0, 65, 57, 35, 116, 161, 9); @@ -22097,21 +22097,21 @@ RT_INTERFACE!{static interface IMagneticStripeReaderEncryptionAlgorithmsStatics( fn get_ExtendedBase(&self, out: *mut u32) -> HRESULT }} impl IMagneticStripeReaderEncryptionAlgorithmsStatics { - #[inline] pub unsafe fn get_none(&self) -> Result { + #[inline] pub fn get_none(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_None)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_triple_des_dukpt(&self) -> Result { + }} + #[inline] pub fn get_triple_des_dukpt(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TripleDesDukpt)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_base(&self) -> Result { + }} + #[inline] pub fn get_extended_base(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedBase)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(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] { @@ -22123,36 +22123,36 @@ RT_INTERFACE!{interface IMagneticStripeReaderErrorOccurredEventArgs(IMagneticStr fn get_PartialInputData(&self, out: *mut *mut MagneticStripeReaderReport) -> HRESULT }} impl IMagneticStripeReaderErrorOccurredEventArgs { - #[inline] pub unsafe fn get_track1_status(&self) -> Result { + #[inline] pub fn get_track1_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Track1Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_track2_status(&self) -> Result { + }} + #[inline] pub fn get_track2_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Track2Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_track3_status(&self) -> Result { + }} + #[inline] pub fn get_track3_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Track3Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_track4_status(&self) -> Result { + }} + #[inline] pub fn get_track4_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Track4Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_error_data(&self) -> Result> { + }} + #[inline] pub fn get_error_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ErrorData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_partial_input_data(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_partial_input_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PartialInputData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MagneticStripeReaderErrorOccurredEventArgs: IMagneticStripeReaderErrorOccurredEventArgs} RT_ENUM! { enum MagneticStripeReaderErrorReportingType: i32 { @@ -22165,92 +22165,92 @@ RT_INTERFACE!{interface IMagneticStripeReaderReport(IMagneticStripeReaderReportV fn get_Track2(&self, out: *mut *mut MagneticStripeReaderTrackData) -> HRESULT, fn get_Track3(&self, out: *mut *mut MagneticStripeReaderTrackData) -> HRESULT, fn get_Track4(&self, out: *mut *mut MagneticStripeReaderTrackData) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, + fn get_Properties(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT, #[cfg(feature="windows-storage")] fn get_CardAuthenticationData(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, fn get_CardAuthenticationDataLength(&self, out: *mut u32) -> HRESULT, #[cfg(feature="windows-storage")] fn get_AdditionalSecurityInformation(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT }} impl IMagneticStripeReaderReport { - #[inline] pub unsafe fn get_card_type(&self) -> Result { + #[inline] pub fn get_card_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CardType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_track1(&self) -> Result> { + }} + #[inline] pub fn get_track1(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Track1)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_track2(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_track2(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Track2)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_track3(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_track3(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Track3)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_track4(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_track4(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Track4)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self 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_card_authentication_data(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_card_authentication_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CardAuthenticationData)(self 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(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_card_authentication_data_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CardAuthenticationDataLength)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_additional_security_information(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_additional_security_information(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AdditionalSecurityInformation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MagneticStripeReaderReport: IMagneticStripeReaderReport} 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetDefaultAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetDeviceSelector(&self, out: *mut HSTRING) -> HRESULT }} impl IMagneticStripeReaderStatics { - #[inline] pub unsafe fn get_default_async(&self) -> Result>> { + #[inline] pub fn get_default_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefaultAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + }} + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMagneticStripeReaderStatics2, 2360197986, 54887, 18682, 134, 188, 245, 174, 17, 137, 38, 43); RT_INTERFACE!{static interface IMagneticStripeReaderStatics2(IMagneticStripeReaderStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IMagneticStripeReaderStatics2] { fn GetDeviceSelectorWithConnectionTypes(&self, connectionTypes: PosConnectionTypes, out: *mut HSTRING) -> HRESULT }} impl IMagneticStripeReaderStatics2 { - #[inline] pub unsafe fn get_device_selector_with_connection_types(&self, connectionTypes: PosConnectionTypes) -> Result { + #[inline] pub fn get_device_selector_with_connection_types(&self, connectionTypes: PosConnectionTypes) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorWithConnectionTypes)(self as *const _ as *mut _, connectionTypes, &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, @@ -22261,16 +22261,16 @@ RT_INTERFACE!{interface IMagneticStripeReaderStatusUpdatedEventArgs(IMagneticStr fn get_ExtendedStatus(&self, out: *mut u32) -> HRESULT }} impl IMagneticStripeReaderStatusUpdatedEventArgs { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_status(&self) -> Result { + }} + #[inline] pub fn get_extended_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MagneticStripeReaderStatusUpdatedEventArgs: IMagneticStripeReaderStatusUpdatedEventArgs} DEFINE_IID!(IID_IMagneticStripeReaderTrackData, 273479281, 19101, 17518, 171, 197, 32, 64, 35, 7, 186, 54); @@ -22280,21 +22280,21 @@ RT_INTERFACE!{interface IMagneticStripeReaderTrackData(IMagneticStripeReaderTrac #[cfg(feature="windows-storage")] fn get_EncryptedData(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT }} impl IMagneticStripeReaderTrackData { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_data(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Data)(self 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_discretionary_data(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_discretionary_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DiscretionaryData)(self 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_encrypted_data(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_encrypted_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EncryptedData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MagneticStripeReaderTrackData: IMagneticStripeReaderTrackData} RT_ENUM! { enum MagneticStripeReaderTrackErrorType: i32 { @@ -22308,11 +22308,11 @@ RT_INTERFACE!{interface IMagneticStripeReaderVendorSpecificCardDataReceivedEvent fn get_Report(&self, out: *mut *mut MagneticStripeReaderReport) -> HRESULT }} impl IMagneticStripeReaderVendorSpecificCardDataReceivedEventArgs { - #[inline] pub unsafe fn get_report(&self) -> Result> { + #[inline] pub fn get_report(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Report)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MagneticStripeReaderVendorSpecificCardDataReceivedEventArgs: IMagneticStripeReaderVendorSpecificCardDataReceivedEventArgs} RT_ENUM! { enum PosConnectionTypes: u32 { @@ -22322,82 +22322,82 @@ DEFINE_IID!(IID_IPosPrinter, 704889102, 39449, 18945, 153, 79, 18, 223, 173, 106 RT_INTERFACE!{interface IPosPrinter(IPosPrinterVtbl): IInspectable(IInspectableVtbl) [IID_IPosPrinter] { fn get_DeviceId(&self, out: *mut HSTRING) -> HRESULT, fn get_Capabilities(&self, out: *mut *mut PosPrinterCapabilities) -> HRESULT, - fn get_SupportedCharacterSets(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_SupportedTypeFaces(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedCharacterSets(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedTypeFaces(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_Status(&self, out: *mut *mut PosPrinterStatus) -> HRESULT, - fn ClaimPrinterAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CheckHealthAsync(&self, level: UnifiedPosHealthCheckLevel, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetStatisticsAsync(&self, statisticsCategories: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_StatusUpdated(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StatusUpdated(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn ClaimPrinterAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CheckHealthAsync(&self, level: UnifiedPosHealthCheckLevel, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetStatisticsAsync(&self, statisticsCategories: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_StatusUpdated(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StatusUpdated(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IPosPrinter { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_capabilities(&self) -> Result> { + }} + #[inline] pub fn get_capabilities(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Capabilities)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_character_sets(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_supported_character_sets(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedCharacterSets)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_type_faces(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_supported_type_faces(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedTypeFaces)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_status(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn claim_printer_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn claim_printer_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ClaimPrinterAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn check_health_async(&self, level: UnifiedPosHealthCheckLevel) -> Result>> { + }} + #[inline] pub fn check_health_async(&self, level: UnifiedPosHealthCheckLevel) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CheckHealthAsync)(self as *const _ as *mut _, level, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_statistics_async(&self, statisticsCategories: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn get_statistics_async(&self, statisticsCategories: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetStatisticsAsync)(self as *const _ as *mut _, 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(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_status_updated(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StatusUpdated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_status_updated(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_status_updated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StatusUpdated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PosPrinter: IPosPrinter} impl RtActivatable for PosPrinter {} impl RtActivatable for PosPrinter {} impl PosPrinter { - #[inline] pub fn get_default_async() -> Result>> { unsafe { + #[inline] pub fn get_default_async() -> Result>> { >::get_activation_factory().get_default_async() - }} - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} - #[inline] pub fn get_device_selector() -> Result { unsafe { + } + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} - #[inline] pub fn get_device_selector_with_connection_types(connectionTypes: PosConnectionTypes) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_with_connection_types(connectionTypes: PosConnectionTypes) -> Result { >::get_activation_factory().get_device_selector_with_connection_types(connectionTypes) - }} + } } DEFINE_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]) [CLSID_PosPrinter]); RT_ENUM! { enum PosPrinterAlignment: i32 { @@ -22420,56 +22420,56 @@ RT_INTERFACE!{interface IPosPrinterCapabilities(IPosPrinterCapabilitiesVtbl): II fn get_Journal(&self, out: *mut *mut JournalPrinterCapabilities) -> HRESULT }} impl IPosPrinterCapabilities { - #[inline] pub unsafe fn get_power_reporting_type(&self) -> Result { + #[inline] pub fn get_power_reporting_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PowerReportingType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_statistics_reporting_supported(&self) -> Result { + }} + #[inline] pub fn get_is_statistics_reporting_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsStatisticsReportingSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_statistics_updating_supported(&self) -> Result { + }} + #[inline] pub fn get_is_statistics_updating_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsStatisticsUpdatingSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_character_set(&self) -> Result { + }} + #[inline] pub fn get_default_character_set(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DefaultCharacterSet)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_cover_sensor(&self) -> Result { + }} + #[inline] pub fn get_has_cover_sensor(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasCoverSensor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_map_character_set(&self) -> Result { + }} + #[inline] pub fn get_can_map_character_set(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanMapCharacterSet)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_transaction_supported(&self) -> Result { + }} + #[inline] pub fn get_is_transaction_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsTransactionSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_receipt(&self) -> Result> { + }} + #[inline] pub fn get_receipt(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Receipt)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_slip(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_slip(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Slip)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_journal(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_journal(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Journal)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PosPrinterCapabilities: IPosPrinterCapabilities} RT_ENUM! { enum PosPrinterCartridgeSensors: u32 { @@ -22478,15 +22478,15 @@ RT_ENUM! { enum PosPrinterCartridgeSensors: u32 { RT_CLASS!{static class PosPrinterCharacterSetIds} impl RtActivatable for PosPrinterCharacterSetIds {} impl PosPrinterCharacterSetIds { - #[inline] pub fn get_utf16_le() -> Result { unsafe { + #[inline] pub fn get_utf16_le() -> Result { >::get_activation_factory().get_utf16_le() - }} - #[inline] pub fn get_ascii() -> Result { unsafe { + } + #[inline] pub fn get_ascii() -> Result { >::get_activation_factory().get_ascii() - }} - #[inline] pub fn get_ansi() -> Result { unsafe { + } + #[inline] pub fn get_ansi() -> Result { >::get_activation_factory().get_ansi() - }} + } } DEFINE_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]) [CLSID_PosPrinterCharacterSetIds]); DEFINE_IID!(IID_IPosPrinterCharacterSetIdsStatics, 1550884607, 28826, 20455, 178, 21, 6, 167, 72, 163, 139, 57); @@ -22496,21 +22496,21 @@ RT_INTERFACE!{static interface IPosPrinterCharacterSetIdsStatics(IPosPrinterChar fn get_Ansi(&self, out: *mut u32) -> HRESULT }} impl IPosPrinterCharacterSetIdsStatics { - #[inline] pub unsafe fn get_utf16_le(&self) -> Result { + #[inline] pub fn get_utf16_le(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Utf16LE)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ascii(&self) -> Result { + }} + #[inline] pub fn get_ascii(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Ascii)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ansi(&self) -> Result { + }} + #[inline] pub fn get_ansi(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Ansi)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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, @@ -22523,26 +22523,26 @@ RT_INTERFACE!{interface IPosPrinterJob(IPosPrinterJobVtbl): IInspectable(IInspec fn Print(&self, data: HSTRING) -> HRESULT, fn PrintLine(&self, data: HSTRING) -> HRESULT, fn PrintNewline(&self) -> HRESULT, - fn ExecuteAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn ExecuteAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IPosPrinterJob { - #[inline] pub unsafe fn print(&self, data: &HStringArg) -> Result<()> { + #[inline] pub fn print(&self, data: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Print)(self as *const _ as *mut _, data.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn print_line(&self, data: &HStringArg) -> Result<()> { + }} + #[inline] pub fn print_line(&self, data: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).PrintLine)(self as *const _ as *mut _, data.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn print_newline(&self) -> Result<()> { + }} + #[inline] pub fn print_newline(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).PrintNewline)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn execute_async(&self) -> Result>> { + }} + #[inline] pub fn execute_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ExecuteAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum PosPrinterLineDirection: i32 { Horizontal (PosPrinterLineDirection_Horizontal) = 0, Vertical (PosPrinterLineDirection_Vertical) = 1, @@ -22575,37 +22575,37 @@ RT_ENUM! { enum PosPrinterRuledLineCapabilities: u32 { }} 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetDefaultAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetDeviceSelector(&self, out: *mut HSTRING) -> HRESULT }} impl IPosPrinterStatics { - #[inline] pub unsafe fn get_default_async(&self) -> Result>> { + #[inline] pub fn get_default_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefaultAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + }} + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IPosPrinterStatics2, 4006423580, 45264, 17127, 177, 55, 184, 155, 22, 36, 77, 65); RT_INTERFACE!{static interface IPosPrinterStatics2(IPosPrinterStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IPosPrinterStatics2] { fn GetDeviceSelectorWithConnectionTypes(&self, connectionTypes: PosConnectionTypes, out: *mut HSTRING) -> HRESULT }} impl IPosPrinterStatics2 { - #[inline] pub unsafe fn get_device_selector_with_connection_types(&self, connectionTypes: PosConnectionTypes) -> Result { + #[inline] pub fn get_device_selector_with_connection_types(&self, connectionTypes: PosConnectionTypes) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorWithConnectionTypes)(self as *const _ as *mut _, connectionTypes, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IPosPrinterStatus, 3522217776, 55872, 17192, 191, 118, 81, 86, 250, 51, 183, 71); RT_INTERFACE!{interface IPosPrinterStatus(IPosPrinterStatusVtbl): IInspectable(IInspectableVtbl) [IID_IPosPrinterStatus] { @@ -22613,16 +22613,16 @@ RT_INTERFACE!{interface IPosPrinterStatus(IPosPrinterStatusVtbl): IInspectable(I fn get_ExtendedStatus(&self, out: *mut u32) -> HRESULT }} impl IPosPrinterStatus { - #[inline] pub unsafe fn get_status_kind(&self) -> Result { + #[inline] pub fn get_status_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StatusKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_status(&self) -> Result { + }} + #[inline] pub fn get_extended_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PosPrinterStatus: IPosPrinterStatus} RT_ENUM! { enum PosPrinterStatusKind: i32 { @@ -22633,18 +22633,18 @@ RT_INTERFACE!{interface IPosPrinterStatusUpdatedEventArgs(IPosPrinterStatusUpdat fn get_Status(&self, out: *mut *mut PosPrinterStatus) -> HRESULT }} impl IPosPrinterStatusUpdatedEventArgs { - #[inline] pub unsafe fn get_status(&self) -> Result> { + #[inline] pub fn get_status(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PosPrinterStatusUpdatedEventArgs: IPosPrinterStatusUpdatedEventArgs} 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(&self, value: PosPrinterRotation) -> HRESULT, fn SetPrintRotation(&self, value: PosPrinterRotation, includeBitmaps: bool) -> HRESULT, - fn SetPrintArea(&self, value: super::super::foundation::Rect) -> HRESULT, + fn SetPrintArea(&self, value: foundation::Rect) -> HRESULT, #[cfg(feature="windows-graphics")] fn SetBitmap(&self, bitmapNumber: u32, bitmap: *mut super::super::graphics::imaging::BitmapFrame, alignment: PosPrinterAlignment) -> HRESULT, #[cfg(feature="windows-graphics")] fn SetBitmapCustomWidthStandardAlign(&self, bitmapNumber: u32, bitmap: *mut super::super::graphics::imaging::BitmapFrame, alignment: PosPrinterAlignment, width: u32) -> HRESULT, #[cfg(feature="windows-graphics")] fn SetCustomAlignedBitmap(&self, bitmapNumber: u32, bitmap: *mut super::super::graphics::imaging::BitmapFrame, alignmentDistance: u32) -> HRESULT, @@ -22659,66 +22659,66 @@ RT_INTERFACE!{interface IReceiptOrSlipJob(IReceiptOrSlipJobVtbl): IInspectable(I #[cfg(feature="windows-graphics")] fn PrintBitmapCustomWidthCustomAlign(&self, bitmap: *mut super::super::graphics::imaging::BitmapFrame, alignmentDistance: u32, width: u32) -> HRESULT }} impl IReceiptOrSlipJob { - #[inline] pub unsafe fn set_barcode_rotation(&self, value: PosPrinterRotation) -> Result<()> { + #[inline] pub fn set_barcode_rotation(&self, value: PosPrinterRotation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetBarcodeRotation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_print_rotation(&self, value: PosPrinterRotation, includeBitmaps: bool) -> Result<()> { + }} + #[inline] pub fn set_print_rotation(&self, value: PosPrinterRotation, includeBitmaps: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetPrintRotation)(self as *const _ as *mut _, value, includeBitmaps); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_print_area(&self, value: super::super::foundation::Rect) -> Result<()> { + }} + #[inline] pub fn set_print_area(&self, value: foundation::Rect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetPrintArea)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn set_bitmap(&self, bitmapNumber: u32, bitmap: &super::super::graphics::imaging::BitmapFrame, alignment: PosPrinterAlignment) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn set_bitmap(&self, bitmapNumber: u32, bitmap: &super::super::graphics::imaging::BitmapFrame, alignment: PosPrinterAlignment) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetBitmap)(self as *const _ as *mut _, 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(&self, bitmapNumber: u32, bitmap: &super::super::graphics::imaging::BitmapFrame, alignment: PosPrinterAlignment, width: u32) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn set_bitmap_custom_width_standard_align(&self, bitmapNumber: u32, bitmap: &super::super::graphics::imaging::BitmapFrame, alignment: PosPrinterAlignment, width: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetBitmapCustomWidthStandardAlign)(self as *const _ as *mut _, 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(&self, bitmapNumber: u32, bitmap: &super::super::graphics::imaging::BitmapFrame, alignmentDistance: u32) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn set_custom_aligned_bitmap(&self, bitmapNumber: u32, bitmap: &super::super::graphics::imaging::BitmapFrame, alignmentDistance: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetCustomAlignedBitmap)(self as *const _ as *mut _, 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(&self, bitmapNumber: u32, bitmap: &super::super::graphics::imaging::BitmapFrame, alignmentDistance: u32, width: u32) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn set_bitmap_custom_width_custom_align(&self, bitmapNumber: u32, bitmap: &super::super::graphics::imaging::BitmapFrame, alignmentDistance: u32, width: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetBitmapCustomWidthCustomAlign)(self as *const _ as *mut _, bitmapNumber, bitmap as *const _ as *mut _, alignmentDistance, width); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn print_saved_bitmap(&self, bitmapNumber: u32) -> Result<()> { + }} + #[inline] pub fn print_saved_bitmap(&self, bitmapNumber: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).PrintSavedBitmap)(self as *const _ as *mut _, bitmapNumber); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn draw_ruled_line(&self, positionList: &HStringArg, lineDirection: PosPrinterLineDirection, lineWidth: u32, lineStyle: PosPrinterLineStyle, lineColor: u32) -> Result<()> { + }} + #[inline] pub fn draw_ruled_line(&self, positionList: &HStringArg, lineDirection: PosPrinterLineDirection, lineWidth: u32, lineStyle: PosPrinterLineStyle, lineColor: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).DrawRuledLine)(self as *const _ as *mut _, positionList.get(), lineDirection, lineWidth, lineStyle, lineColor); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn print_barcode(&self, data: &HStringArg, symbology: u32, height: u32, width: u32, textPosition: PosPrinterBarcodeTextPosition, alignment: PosPrinterAlignment) -> Result<()> { + }} + #[inline] pub fn print_barcode(&self, data: &HStringArg, symbology: u32, height: u32, width: u32, textPosition: PosPrinterBarcodeTextPosition, alignment: PosPrinterAlignment) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).PrintBarcode)(self as *const _ as *mut _, data.get(), symbology, height, width, textPosition, alignment); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn print_barcode_custom_align(&self, data: &HStringArg, symbology: u32, height: u32, width: u32, textPosition: PosPrinterBarcodeTextPosition, alignmentDistance: u32) -> Result<()> { + }} + #[inline] pub fn print_barcode_custom_align(&self, data: &HStringArg, symbology: u32, height: u32, width: u32, textPosition: PosPrinterBarcodeTextPosition, alignmentDistance: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).PrintBarcodeCustomAlign)(self as *const _ as *mut _, 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(&self, bitmap: &super::super::graphics::imaging::BitmapFrame, alignment: PosPrinterAlignment) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn print_bitmap(&self, bitmap: &super::super::graphics::imaging::BitmapFrame, alignment: PosPrinterAlignment) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).PrintBitmap)(self as *const _ as *mut _, 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(&self, bitmap: &super::super::graphics::imaging::BitmapFrame, alignment: PosPrinterAlignment, width: u32) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn print_bitmap_custom_width_standard_align(&self, bitmap: &super::super::graphics::imaging::BitmapFrame, alignment: PosPrinterAlignment, width: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).PrintBitmapCustomWidthStandardAlign)(self as *const _ as *mut _, 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(&self, bitmap: &super::super::graphics::imaging::BitmapFrame, alignmentDistance: u32) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn print_custom_aligned_bitmap(&self, bitmap: &super::super::graphics::imaging::BitmapFrame, alignmentDistance: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).PrintCustomAlignedBitmap)(self as *const _ as *mut _, 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(&self, bitmap: &super::super::graphics::imaging::BitmapFrame, alignmentDistance: u32, width: u32) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn print_bitmap_custom_width_custom_align(&self, bitmap: &super::super::graphics::imaging::BitmapFrame, alignmentDistance: u32, width: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).PrintBitmapCustomWidthCustomAlign)(self as *const _ as *mut _, bitmap as *const _ as *mut _, alignmentDistance, width); if hr == S_OK { Ok(()) } 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] { @@ -22727,21 +22727,21 @@ RT_INTERFACE!{interface IReceiptPrinterCapabilities(IReceiptPrinterCapabilitiesV fn get_MarkFeedCapabilities(&self, out: *mut PosPrinterMarkFeedCapabilities) -> HRESULT }} impl IReceiptPrinterCapabilities { - #[inline] pub unsafe fn get_can_cut_paper(&self) -> Result { + #[inline] pub fn get_can_cut_paper(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanCutPaper)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_stamp_supported(&self) -> Result { + }} + #[inline] pub fn get_is_stamp_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsStampSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_mark_feed_capabilities(&self) -> Result { + }} + #[inline] pub fn get_mark_feed_capabilities(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MarkFeedCapabilities)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ReceiptPrinterCapabilities: IReceiptPrinterCapabilities} DEFINE_IID!(IID_IReceiptPrintJob, 2861958766, 44205, 19321, 157, 15, 192, 207, 192, 141, 199, 123); @@ -22751,18 +22751,18 @@ RT_INTERFACE!{interface IReceiptPrintJob(IReceiptPrintJobVtbl): IInspectable(IIn fn CutPaperDefault(&self) -> HRESULT }} impl IReceiptPrintJob { - #[inline] pub unsafe fn mark_feed(&self, kind: PosPrinterMarkFeedKind) -> Result<()> { + #[inline] pub fn mark_feed(&self, kind: PosPrinterMarkFeedKind) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).MarkFeed)(self as *const _ as *mut _, kind); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn cut_paper(&self, percentage: f64) -> Result<()> { + }} + #[inline] pub fn cut_paper(&self, percentage: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).CutPaper)(self as *const _ as *mut _, percentage); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn cut_paper_default(&self) -> Result<()> { + }} + #[inline] pub fn cut_paper_default(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).CutPaperDefault)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ReceiptPrintJob: IReceiptPrintJob} DEFINE_IID!(IID_ISlipPrinterCapabilities, 2578539417, 18572, 16727, 138, 194, 159, 87, 247, 8, 211, 219); @@ -22771,16 +22771,16 @@ RT_INTERFACE!{interface ISlipPrinterCapabilities(ISlipPrinterCapabilitiesVtbl): fn get_IsBothSidesPrintingSupported(&self, out: *mut bool) -> HRESULT }} impl ISlipPrinterCapabilities { - #[inline] pub unsafe fn get_is_full_length_supported(&self) -> Result { + #[inline] pub fn get_is_full_length_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsFullLengthSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_both_sides_printing_supported(&self) -> Result { + }} + #[inline] pub fn get_is_both_sides_printing_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsBothSidesPrintingSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SlipPrinterCapabilities: ISlipPrinterCapabilities} RT_CLASS!{class SlipPrintJob: IReceiptOrSlipJob} @@ -22792,26 +22792,26 @@ RT_INTERFACE!{interface IUnifiedPosErrorData(IUnifiedPosErrorDataVtbl): IInspect fn get_ExtendedReason(&self, out: *mut u32) -> HRESULT }} impl IUnifiedPosErrorData { - #[inline] pub unsafe fn get_message(&self) -> Result { + #[inline] pub fn get_message(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Message)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_severity(&self) -> Result { + }} + #[inline] pub fn get_severity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Severity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_reason(&self) -> Result { + }} + #[inline] pub fn get_reason(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Reason)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_reason(&self) -> Result { + }} + #[inline] pub fn get_extended_reason(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedReason)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class UnifiedPosErrorData: IUnifiedPosErrorData} RT_ENUM! { enum UnifiedPosErrorReason: i32 { @@ -22831,59 +22831,59 @@ pub mod radios { // Windows.Devices.Radios use ::prelude::*; 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(&self, value: RadioState, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_StateChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StateChanged(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn SetStateAsync(&self, value: RadioState, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_StateChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StateChanged(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT, fn get_State(&self, out: *mut RadioState) -> HRESULT, fn get_Name(&self, out: *mut HSTRING) -> HRESULT, fn get_Kind(&self, out: *mut RadioKind) -> HRESULT }} impl IRadio { - #[inline] pub unsafe fn set_state_async(&self, value: RadioState) -> Result>> { + #[inline] pub fn set_state_async(&self, value: RadioState) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetStateAsync)(self as *const _ as *mut _, value, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_state_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_state_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StateChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_state_changed(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_state_changed(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StateChanged)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_state(&self) -> Result { + }} + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_name(&self) -> Result { + }} + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_kind(&self) -> Result { + }} + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class Radio: IRadio} impl RtActivatable for Radio {} impl Radio { - #[inline] pub fn get_radios_async() -> Result>>> { unsafe { + #[inline] pub fn get_radios_async() -> Result>>> { >::get_activation_factory().get_radios_async() - }} - #[inline] pub fn get_device_selector() -> Result { unsafe { + } + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} - #[inline] pub fn request_access_async() -> Result>> { unsafe { + } + #[inline] pub fn request_access_async() -> Result>> { >::get_activation_factory().request_access_async() - }} + } } DEFINE_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]) [CLSID_Radio]); RT_ENUM! { enum RadioAccessStatus: i32 { @@ -22897,32 +22897,32 @@ RT_ENUM! { enum RadioState: i32 { }} 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetRadiosAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, fn GetDeviceSelector(&self, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestAccessAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestAccessAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IRadioStatics { - #[inline] pub unsafe fn get_radios_async(&self) -> Result>>> { + #[inline] pub fn get_radios_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetRadiosAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + }} + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_access_async(&self) -> Result>> { + }} + #[inline] pub fn request_access_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } } // Windows.Devices.Radios pub mod sensors { // Windows.Devices.Sensors @@ -22933,67 +22933,67 @@ RT_INTERFACE!{interface IAccelerometer(IAccelerometerVtbl): IInspectable(IInspec fn get_MinimumReportInterval(&self, out: *mut u32) -> HRESULT, fn put_ReportInterval(&self, value: u32) -> HRESULT, fn get_ReportInterval(&self, out: *mut u32) -> HRESULT, - fn add_ReadingChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReadingChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Shaken(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Shaken(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ReadingChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReadingChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Shaken(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Shaken(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IAccelerometer { - #[inline] pub unsafe fn get_current_reading(&self) -> Result> { + #[inline] pub fn get_current_reading(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentReading)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_minimum_report_interval(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_minimum_report_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_report_interval(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_report_interval(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReportInterval)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_interval(&self) -> Result { + }} + #[inline] pub fn get_report_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReportInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_reading_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_reading_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ReadingChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_reading_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_reading_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ReadingChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_shaken(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_shaken(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Shaken)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_shaken(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_shaken(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Shaken)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Accelerometer: IAccelerometer} impl RtActivatable for Accelerometer {} impl RtActivatable for Accelerometer {} impl RtActivatable for Accelerometer {} impl Accelerometer { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} - #[inline] pub fn get_default_with_accelerometer_reading_type(readingType: AccelerometerReadingType) -> Result> { unsafe { + } + #[inline] pub fn get_default_with_accelerometer_reading_type(readingType: AccelerometerReadingType) -> Result>> { >::get_activation_factory().get_default_with_accelerometer_reading_type(readingType) - }} - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} - #[inline] pub fn get_device_selector(readingType: AccelerometerReadingType) -> Result { unsafe { + } + #[inline] pub fn get_device_selector(readingType: AccelerometerReadingType) -> Result { >::get_activation_factory().get_device_selector(readingType) - }} + } } DEFINE_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]) [CLSID_Accelerometer]); DEFINE_IID!(IID_IAccelerometer2, 3908080366, 18788, 16410, 182, 2, 34, 13, 113, 83, 198, 10); @@ -23002,15 +23002,15 @@ RT_INTERFACE!{interface IAccelerometer2(IAccelerometer2Vtbl): IInspectable(IInsp #[cfg(feature="windows-graphics")] fn get_ReadingTransform(&self, out: *mut super::super::graphics::display::DisplayOrientations) -> HRESULT }} impl IAccelerometer2 { - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn set_reading_transform(&self, value: super::super::graphics::display::DisplayOrientations) -> Result<()> { + #[cfg(feature="windows-graphics")] #[inline] pub fn set_reading_transform(&self, value: super::super::graphics::display::DisplayOrientations) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReadingTransform)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn get_reading_transform(&self) -> Result { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_reading_transform(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReadingTransform)(self as *const _ as *mut _, &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] { @@ -23019,100 +23019,100 @@ RT_INTERFACE!{interface IAccelerometer3(IAccelerometer3Vtbl): IInspectable(IInsp fn get_MaxBatchSize(&self, out: *mut u32) -> HRESULT }} impl IAccelerometer3 { - #[inline] pub unsafe fn set_report_latency(&self, value: u32) -> Result<()> { + #[inline] pub fn set_report_latency(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReportLatency)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_latency(&self) -> Result { + }} + #[inline] pub fn get_report_latency(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReportLatency)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_batch_size(&self) -> Result { + }} + #[inline] pub fn get_max_batch_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxBatchSize)(self as *const _ as *mut _, &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(&self, out: *mut AccelerometerReadingType) -> HRESULT }} impl IAccelerometer4 { - #[inline] pub unsafe fn get_reading_type(&self) -> Result { + #[inline] pub fn get_reading_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReadingType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, out: *mut HSTRING) -> HRESULT }} impl IAccelerometerDeviceId { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(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(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_AccelerationX(&self, out: *mut f64) -> HRESULT, fn get_AccelerationY(&self, out: *mut f64) -> HRESULT, fn get_AccelerationZ(&self, out: *mut f64) -> HRESULT }} impl IAccelerometerReading { - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_acceleration_x(&self) -> Result { + }} + #[inline] pub fn get_acceleration_x(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AccelerationX)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_acceleration_y(&self) -> Result { + }} + #[inline] pub fn get_acceleration_y(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AccelerationY)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_acceleration_z(&self) -> Result { + }} + #[inline] pub fn get_acceleration_z(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AccelerationZ)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AccelerometerReading: IAccelerometerReading} DEFINE_IID!(IID_IAccelerometerReading2, 176573090, 5550, 19008, 190, 85, 219, 88, 215, 222, 115, 137); RT_INTERFACE!{interface IAccelerometerReading2(IAccelerometerReading2Vtbl): IInspectable(IInspectableVtbl) [IID_IAccelerometerReading2] { - fn get_PerformanceCount(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT + fn get_PerformanceCount(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_Properties(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT }} impl IAccelerometerReading2 { - #[inline] pub unsafe fn get_performance_count(&self) -> Result>> { + #[inline] pub fn get_performance_count(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PerformanceCount)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut AccelerometerReading) -> HRESULT }} impl IAccelerometerReadingChangedEventArgs { - #[inline] pub unsafe fn get_reading(&self) -> Result> { + #[inline] pub fn get_reading(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Reading)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AccelerometerReadingChangedEventArgs: IAccelerometerReadingChangedEventArgs} RT_ENUM! { enum AccelerometerReadingType: i32 { @@ -23120,14 +23120,14 @@ RT_ENUM! { enum AccelerometerReadingType: i32 { }} 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(&self, out: *mut super::super::foundation::DateTime) -> HRESULT + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT }} impl IAccelerometerShakenEventArgs { - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AccelerometerShakenEventArgs: IAccelerometerShakenEventArgs} DEFINE_IID!(IID_IAccelerometerStatics, 2783087476, 23175, 18989, 190, 204, 15, 144, 110, 160, 97, 221); @@ -23135,134 +23135,134 @@ RT_INTERFACE!{static interface IAccelerometerStatics(IAccelerometerStaticsVtbl): fn GetDefault(&self, out: *mut *mut Accelerometer) -> HRESULT }} impl IAccelerometerStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, readingType: AccelerometerReadingType, out: *mut *mut Accelerometer) -> HRESULT }} impl IAccelerometerStatics2 { - #[inline] pub unsafe fn get_default_with_accelerometer_reading_type(&self, readingType: AccelerometerReadingType) -> Result> { + #[inline] pub fn get_default_with_accelerometer_reading_type(&self, readingType: AccelerometerReadingType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefaultWithAccelerometerReadingType)(self as *const _ as *mut _, readingType, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IAccelerometerStatics3, 2648840399, 17757, 19699, 130, 0, 112, 225, 65, 3, 64, 248); RT_INTERFACE!{static interface IAccelerometerStatics3(IAccelerometerStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IAccelerometerStatics3] { - fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetDeviceSelector(&self, readingType: AccelerometerReadingType, out: *mut HSTRING) -> HRESULT }} impl IAccelerometerStatics3 { - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector(&self, readingType: AccelerometerReadingType) -> Result { + }} + #[inline] pub fn get_device_selector(&self, readingType: AccelerometerReadingType) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, readingType, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn get_SubscribedActivities(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn GetCurrentReadingAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn get_SubscribedActivities(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_PowerInMilliwatts(&self, out: *mut f64) -> HRESULT, fn get_DeviceId(&self, out: *mut HSTRING) -> HRESULT, - fn get_SupportedActivities(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedActivities(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_MinimumReportInterval(&self, out: *mut u32) -> HRESULT, - fn add_ReadingChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReadingChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ReadingChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReadingChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IActivitySensor { - #[inline] pub unsafe fn get_current_reading_async(&self) -> Result>> { + #[inline] pub fn get_current_reading_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentReadingAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_subscribed_activities(&self) -> Result>> { + }} + #[inline] pub fn get_subscribed_activities(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SubscribedActivities)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_power_in_milliwatts(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_power_in_milliwatts(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PowerInMilliwatts)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_id(&self) -> Result { + }} + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_activities(&self) -> Result>> { + }} + #[inline] pub fn get_supported_activities(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedActivities)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_minimum_report_interval(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_minimum_report_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_reading_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_reading_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ReadingChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_reading_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_reading_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ReadingChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ActivitySensor: IActivitySensor} impl RtActivatable for ActivitySensor {} impl ActivitySensor { - #[inline] pub fn get_default_async() -> Result>> { unsafe { + #[inline] pub fn get_default_async() -> Result>> { >::get_activation_factory().get_default_async() - }} - #[inline] pub fn get_device_selector() -> Result { unsafe { + } + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} - #[inline] pub fn get_system_history_async(fromTime: super::super::foundation::DateTime) -> Result>>> { unsafe { + } + #[inline] pub fn get_system_history_async(fromTime: foundation::DateTime) -> Result>>> { >::get_activation_factory().get_system_history_async(fromTime) - }} - #[inline] pub fn get_system_history_with_duration_async(fromTime: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan) -> Result>>> { unsafe { + } + #[inline] pub fn get_system_history_with_duration_async(fromTime: foundation::DateTime, duration: foundation::TimeSpan) -> Result>>> { >::get_activation_factory().get_system_history_with_duration_async(fromTime, duration) - }} + } } DEFINE_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]) [CLSID_ActivitySensor]); 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(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_Activity(&self, out: *mut ActivityType) -> HRESULT, fn get_Confidence(&self, out: *mut ActivitySensorReadingConfidence) -> HRESULT }} impl IActivitySensorReading { - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_activity(&self) -> Result { + }} + #[inline] pub fn get_activity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Activity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_confidence(&self) -> Result { + }} + #[inline] pub fn get_confidence(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Confidence)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ActivitySensorReading: IActivitySensorReading} DEFINE_IID!(IID_IActivitySensorReadingChangedEventArgs, 3728238359, 44726, 20167, 148, 106, 217, 204, 25, 185, 81, 236); @@ -23270,11 +23270,11 @@ RT_INTERFACE!{interface IActivitySensorReadingChangedEventArgs(IActivitySensorRe fn get_Reading(&self, out: *mut *mut ActivitySensorReading) -> HRESULT }} impl IActivitySensorReadingChangedEventArgs { - #[inline] pub unsafe fn get_reading(&self) -> Result> { + #[inline] pub fn get_reading(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Reading)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ActivitySensorReadingChangedEventArgs: IActivitySensorReadingChangedEventArgs} DEFINE_IID!(IID_IActivitySensorReadingChangeReport, 1329342741, 55611, 18365, 150, 10, 242, 15, 178, 243, 34, 185); @@ -23282,11 +23282,11 @@ RT_INTERFACE!{interface IActivitySensorReadingChangeReport(IActivitySensorReadin fn get_Reading(&self, out: *mut *mut ActivitySensorReading) -> HRESULT }} impl IActivitySensorReadingChangeReport { - #[inline] pub unsafe fn get_reading(&self) -> Result> { + #[inline] pub fn get_reading(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Reading)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ActivitySensorReadingChangeReport: IActivitySensorReadingChangeReport} RT_ENUM! { enum ActivitySensorReadingConfidence: i32 { @@ -23294,49 +23294,49 @@ RT_ENUM! { enum ActivitySensorReadingConfidence: i32 { }} 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetDefaultAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetDeviceSelector(&self, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetSystemHistoryAsync(&self, fromTime: super::super::foundation::DateTime, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetSystemHistoryWithDurationAsync(&self, fromTime: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetSystemHistoryAsync(&self, fromTime: foundation::DateTime, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetSystemHistoryWithDurationAsync(&self, fromTime: foundation::DateTime, duration: foundation::TimeSpan, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IActivitySensorStatics { - #[inline] pub unsafe fn get_default_async(&self) -> Result>> { + #[inline] pub fn get_default_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefaultAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + }} + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_system_history_async(&self, fromTime: super::super::foundation::DateTime) -> Result>>> { + }} + #[inline] pub fn get_system_history_async(&self, fromTime: foundation::DateTime) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSystemHistoryAsync)(self as *const _ as *mut _, fromTime, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_system_history_with_duration_async(&self, fromTime: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan) -> Result>>> { + }} + #[inline] pub fn get_system_history_with_duration_async(&self, fromTime: foundation::DateTime, duration: foundation::TimeSpan) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSystemHistoryWithDurationAsync)(self as *const _ as *mut _, fromTime, duration, &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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn ReadReports(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IActivitySensorTriggerDetails { - #[inline] pub unsafe fn read_reports(&self) -> Result>> { + #[inline] pub fn read_reports(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadReports)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ActivitySensorTriggerDetails: IActivitySensorTriggerDetails} RT_ENUM! { enum ActivityType: i32 { @@ -23349,50 +23349,50 @@ RT_INTERFACE!{interface IAltimeter(IAltimeterVtbl): IInspectable(IInspectableVtb fn get_MinimumReportInterval(&self, out: *mut u32) -> HRESULT, fn put_ReportInterval(&self, value: u32) -> HRESULT, fn get_ReportInterval(&self, out: *mut u32) -> HRESULT, - fn add_ReadingChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReadingChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ReadingChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReadingChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IAltimeter { - #[inline] pub unsafe fn get_current_reading(&self) -> Result> { + #[inline] pub fn get_current_reading(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentReading)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_minimum_report_interval(&self) -> Result { + }} + #[inline] pub fn get_minimum_report_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_report_interval(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_report_interval(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReportInterval)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_interval(&self) -> Result { + }} + #[inline] pub fn get_report_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReportInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_reading_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_reading_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ReadingChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_reading_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_reading_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ReadingChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Altimeter: IAltimeter} impl RtActivatable for Altimeter {} impl Altimeter { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} + } } DEFINE_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]) [CLSID_Altimeter]); DEFINE_IID!(IID_IAltimeter2, 3376880633, 10973, 18677, 159, 8, 61, 12, 118, 96, 217, 56); @@ -23402,66 +23402,66 @@ RT_INTERFACE!{interface IAltimeter2(IAltimeter2Vtbl): IInspectable(IInspectableV fn get_MaxBatchSize(&self, out: *mut u32) -> HRESULT }} impl IAltimeter2 { - #[inline] pub unsafe fn set_report_latency(&self, value: u32) -> Result<()> { + #[inline] pub fn set_report_latency(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReportLatency)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_latency(&self) -> Result { + }} + #[inline] pub fn get_report_latency(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReportLatency)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_batch_size(&self) -> Result { + }} + #[inline] pub fn get_max_batch_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxBatchSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_AltitudeChangeInMeters(&self, out: *mut f64) -> HRESULT }} impl IAltimeterReading { - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_altitude_change_in_meters(&self) -> Result { + }} + #[inline] pub fn get_altitude_change_in_meters(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AltitudeChangeInMeters)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AltimeterReading: IAltimeterReading} DEFINE_IID!(IID_IAltimeterReading2, 1413094361, 27915, 17074, 189, 105, 188, 143, 174, 15, 120, 44); RT_INTERFACE!{interface IAltimeterReading2(IAltimeterReading2Vtbl): IInspectable(IInspectableVtbl) [IID_IAltimeterReading2] { - fn get_PerformanceCount(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT + fn get_PerformanceCount(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_Properties(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT }} impl IAltimeterReading2 { - #[inline] pub unsafe fn get_performance_count(&self) -> Result>> { + #[inline] pub fn get_performance_count(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PerformanceCount)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut AltimeterReading) -> HRESULT }} impl IAltimeterReadingChangedEventArgs { - #[inline] pub unsafe fn get_reading(&self) -> Result> { + #[inline] pub fn get_reading(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Reading)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AltimeterReadingChangedEventArgs: IAltimeterReadingChangedEventArgs} DEFINE_IID!(IID_IAltimeterStatics, 2662651843, 58796, 18382, 142, 239, 211, 113, 129, 104, 192, 31); @@ -23469,11 +23469,11 @@ RT_INTERFACE!{static interface IAltimeterStatics(IAltimeterStaticsVtbl): IInspec fn GetDefault(&self, out: *mut *mut Altimeter) -> HRESULT }} impl IAltimeterStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IBarometer, 2470737320, 30911, 17711, 176, 23, 240, 32, 156, 230, 218, 180); RT_INTERFACE!{interface IBarometer(IBarometerVtbl): IInspectable(IInspectableVtbl) [IID_IBarometer] { @@ -23482,57 +23482,57 @@ RT_INTERFACE!{interface IBarometer(IBarometerVtbl): IInspectable(IInspectableVtb fn get_MinimumReportInterval(&self, out: *mut u32) -> HRESULT, fn put_ReportInterval(&self, value: u32) -> HRESULT, fn get_ReportInterval(&self, out: *mut u32) -> HRESULT, - fn add_ReadingChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReadingChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ReadingChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReadingChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IBarometer { - #[inline] pub unsafe fn get_current_reading(&self) -> Result> { + #[inline] pub fn get_current_reading(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentReading)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_minimum_report_interval(&self) -> Result { + }} + #[inline] pub fn get_minimum_report_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_report_interval(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_report_interval(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReportInterval)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_interval(&self) -> Result { + }} + #[inline] pub fn get_report_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReportInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_reading_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_reading_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ReadingChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_reading_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_reading_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ReadingChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Barometer: IBarometer} impl RtActivatable for Barometer {} impl RtActivatable for Barometer {} impl Barometer { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} - #[inline] pub fn get_device_selector() -> Result { unsafe { + } + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} + } } DEFINE_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]) [CLSID_Barometer]); DEFINE_IID!(IID_IBarometer2, 851231768, 16107, 19716, 149, 116, 118, 51, 168, 120, 31, 159); @@ -23542,66 +23542,66 @@ RT_INTERFACE!{interface IBarometer2(IBarometer2Vtbl): IInspectable(IInspectableV fn get_MaxBatchSize(&self, out: *mut u32) -> HRESULT }} impl IBarometer2 { - #[inline] pub unsafe fn set_report_latency(&self, value: u32) -> Result<()> { + #[inline] pub fn set_report_latency(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReportLatency)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_latency(&self) -> Result { + }} + #[inline] pub fn get_report_latency(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReportLatency)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_batch_size(&self) -> Result { + }} + #[inline] pub fn get_max_batch_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxBatchSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_StationPressureInHectopascals(&self, out: *mut f64) -> HRESULT }} impl IBarometerReading { - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_station_pressure_in_hectopascals(&self) -> Result { + }} + #[inline] pub fn get_station_pressure_in_hectopascals(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StationPressureInHectopascals)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class BarometerReading: IBarometerReading} DEFINE_IID!(IID_IBarometerReading2, 2242004203, 37061, 18549, 137, 28, 56, 101, 180, 195, 87, 231); RT_INTERFACE!{interface IBarometerReading2(IBarometerReading2Vtbl): IInspectable(IInspectableVtbl) [IID_IBarometerReading2] { - fn get_PerformanceCount(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT + fn get_PerformanceCount(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_Properties(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT }} impl IBarometerReading2 { - #[inline] pub unsafe fn get_performance_count(&self) -> Result>> { + #[inline] pub fn get_performance_count(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PerformanceCount)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut BarometerReading) -> HRESULT }} impl IBarometerReadingChangedEventArgs { - #[inline] pub unsafe fn get_reading(&self) -> Result> { + #[inline] pub fn get_reading(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Reading)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class BarometerReadingChangedEventArgs: IBarometerReadingChangedEventArgs} DEFINE_IID!(IID_IBarometerStatics, 678110986, 739, 20358, 132, 252, 253, 216, 146, 181, 148, 15); @@ -23609,28 +23609,28 @@ RT_INTERFACE!{static interface IBarometerStatics(IBarometerStaticsVtbl): IInspec fn GetDefault(&self, out: *mut *mut Barometer) -> HRESULT }} impl IBarometerStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IBarometerStatics2, 2412163559, 38399, 17580, 135, 142, 214, 92, 131, 8, 195, 76); RT_INTERFACE!{static interface IBarometerStatics2(IBarometerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IBarometerStatics2] { - fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetDeviceSelector(&self, out: *mut HSTRING) -> HRESULT }} impl IBarometerStatics2 { - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + }} + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ICompass, 691010196, 6981, 16444, 186, 6, 177, 6, 219, 166, 154, 100); RT_INTERFACE!{interface ICompass(ICompassVtbl): IInspectable(IInspectableVtbl) [IID_ICompass] { @@ -23638,52 +23638,52 @@ RT_INTERFACE!{interface ICompass(ICompassVtbl): IInspectable(IInspectableVtbl) [ fn get_MinimumReportInterval(&self, out: *mut u32) -> HRESULT, fn put_ReportInterval(&self, value: u32) -> HRESULT, fn get_ReportInterval(&self, out: *mut u32) -> HRESULT, - fn add_ReadingChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReadingChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ReadingChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReadingChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl ICompass { - #[inline] pub unsafe fn get_current_reading(&self) -> Result> { + #[inline] pub fn get_current_reading(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentReading)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_minimum_report_interval(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_minimum_report_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_report_interval(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_report_interval(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReportInterval)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_interval(&self) -> Result { + }} + #[inline] pub fn get_report_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReportInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_reading_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_reading_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ReadingChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_reading_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_reading_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ReadingChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Compass: ICompass} impl RtActivatable for Compass {} impl RtActivatable for Compass {} impl Compass { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} - #[inline] pub fn get_device_selector() -> Result { unsafe { + } + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} + } } DEFINE_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]) [CLSID_Compass]); DEFINE_IID!(IID_ICompass2, 921857289, 51159, 17231, 180, 97, 151, 157, 223, 194, 50, 47); @@ -23692,15 +23692,15 @@ RT_INTERFACE!{interface ICompass2(ICompass2Vtbl): IInspectable(IInspectableVtbl) #[cfg(feature="windows-graphics")] fn get_ReadingTransform(&self, out: *mut super::super::graphics::display::DisplayOrientations) -> HRESULT }} impl ICompass2 { - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn set_reading_transform(&self, value: super::super::graphics::display::DisplayOrientations) -> Result<()> { + #[cfg(feature="windows-graphics")] #[inline] pub fn set_reading_transform(&self, value: super::super::graphics::display::DisplayOrientations) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReadingTransform)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn get_reading_transform(&self) -> Result { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_reading_transform(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReadingTransform)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ICompass3, 2753855515, 50666, 19781, 160, 236, 75, 121, 31, 4, 26, 137); RT_INTERFACE!{interface ICompass3(ICompass3Vtbl): IInspectable(IInspectableVtbl) [IID_ICompass3] { @@ -23709,83 +23709,83 @@ RT_INTERFACE!{interface ICompass3(ICompass3Vtbl): IInspectable(IInspectableVtbl) fn get_MaxBatchSize(&self, out: *mut u32) -> HRESULT }} impl ICompass3 { - #[inline] pub unsafe fn set_report_latency(&self, value: u32) -> Result<()> { + #[inline] pub fn set_report_latency(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReportLatency)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_latency(&self) -> Result { + }} + #[inline] pub fn get_report_latency(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReportLatency)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_batch_size(&self) -> Result { + }} + #[inline] pub fn get_max_batch_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxBatchSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(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(&self, out: *mut HSTRING) -> HRESULT }} impl ICompassDeviceId { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::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(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_HeadingMagneticNorth(&self, out: *mut f64) -> HRESULT, - fn get_HeadingTrueNorth(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn get_HeadingTrueNorth(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl ICompassReading { - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_heading_magnetic_north(&self) -> Result { + }} + #[inline] pub fn get_heading_magnetic_north(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HeadingMagneticNorth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_heading_true_north(&self) -> Result>> { + }} + #[inline] pub fn get_heading_true_north(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HeadingTrueNorth)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CompassReading: ICompassReading} DEFINE_IID!(IID_ICompassReading2, 2973394462, 20923, 18962, 190, 221, 173, 71, 255, 135, 210, 232); RT_INTERFACE!{interface ICompassReading2(ICompassReading2Vtbl): IInspectable(IInspectableVtbl) [IID_ICompassReading2] { - fn get_PerformanceCount(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT + fn get_PerformanceCount(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_Properties(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT }} impl ICompassReading2 { - #[inline] pub unsafe fn get_performance_count(&self) -> Result>> { + #[inline] pub fn get_performance_count(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PerformanceCount)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut CompassReading) -> HRESULT }} impl ICompassReadingChangedEventArgs { - #[inline] pub unsafe fn get_reading(&self) -> Result> { + #[inline] pub fn get_reading(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Reading)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CompassReadingChangedEventArgs: ICompassReadingChangedEventArgs} DEFINE_IID!(IID_ICompassReadingHeadingAccuracy, 3881907534, 35089, 16631, 158, 22, 110, 204, 125, 174, 197, 222); @@ -23793,39 +23793,39 @@ RT_INTERFACE!{interface ICompassReadingHeadingAccuracy(ICompassReadingHeadingAcc fn get_HeadingAccuracy(&self, out: *mut MagnetometerAccuracy) -> HRESULT }} impl ICompassReadingHeadingAccuracy { - #[inline] pub unsafe fn get_heading_accuracy(&self) -> Result { + #[inline] pub fn get_heading_accuracy(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HeadingAccuracy)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(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(&self, out: *mut *mut Compass) -> HRESULT }} impl ICompassStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_ICompassStatics2, 181276333, 15274, 18832, 156, 228, 190, 9, 19, 117, 78, 210); RT_INTERFACE!{static interface ICompassStatics2(ICompassStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_ICompassStatics2] { fn GetDeviceSelector(&self, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ICompassStatics2 { - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IGyrometer, 4256803268, 33969, 19618, 151, 99, 155, 88, 149, 6, 199, 12); RT_INTERFACE!{interface IGyrometer(IGyrometerVtbl): IInspectable(IInspectableVtbl) [IID_IGyrometer] { @@ -23833,52 +23833,52 @@ RT_INTERFACE!{interface IGyrometer(IGyrometerVtbl): IInspectable(IInspectableVtb fn get_MinimumReportInterval(&self, out: *mut u32) -> HRESULT, fn put_ReportInterval(&self, value: u32) -> HRESULT, fn get_ReportInterval(&self, out: *mut u32) -> HRESULT, - fn add_ReadingChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReadingChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ReadingChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReadingChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IGyrometer { - #[inline] pub unsafe fn get_current_reading(&self) -> Result> { + #[inline] pub fn get_current_reading(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentReading)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_minimum_report_interval(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_minimum_report_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_report_interval(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_report_interval(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReportInterval)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_interval(&self) -> Result { + }} + #[inline] pub fn get_report_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReportInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_reading_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_reading_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ReadingChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_reading_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_reading_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ReadingChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Gyrometer: IGyrometer} impl RtActivatable for Gyrometer {} impl RtActivatable for Gyrometer {} impl Gyrometer { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} - #[inline] pub fn get_device_selector() -> Result { unsafe { + } + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} + } } DEFINE_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]) [CLSID_Gyrometer]); DEFINE_IID!(IID_IGyrometer2, 1675568195, 36072, 16835, 172, 68, 134, 152, 129, 11, 85, 127); @@ -23887,15 +23887,15 @@ RT_INTERFACE!{interface IGyrometer2(IGyrometer2Vtbl): IInspectable(IInspectableV #[cfg(feature="windows-graphics")] fn get_ReadingTransform(&self, out: *mut super::super::graphics::display::DisplayOrientations) -> HRESULT }} impl IGyrometer2 { - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn set_reading_transform(&self, value: super::super::graphics::display::DisplayOrientations) -> Result<()> { + #[cfg(feature="windows-graphics")] #[inline] pub fn set_reading_transform(&self, value: super::super::graphics::display::DisplayOrientations) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReadingTransform)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn get_reading_transform(&self) -> Result { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_reading_transform(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReadingTransform)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IGyrometer3, 1567590613, 36796, 17540, 145, 75, 82, 138, 223, 217, 71, 177); RT_INTERFACE!{interface IGyrometer3(IGyrometer3Vtbl): IInspectable(IInspectableVtbl) [IID_IGyrometer3] { @@ -23904,89 +23904,89 @@ RT_INTERFACE!{interface IGyrometer3(IGyrometer3Vtbl): IInspectable(IInspectableV fn get_MaxBatchSize(&self, out: *mut u32) -> HRESULT }} impl IGyrometer3 { - #[inline] pub unsafe fn set_report_latency(&self, value: u32) -> Result<()> { + #[inline] pub fn set_report_latency(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReportLatency)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_latency(&self) -> Result { + }} + #[inline] pub fn get_report_latency(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReportLatency)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_batch_size(&self) -> Result { + }} + #[inline] pub fn get_max_batch_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxBatchSize)(self as *const _ as *mut _, &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(&self, out: *mut HSTRING) -> HRESULT }} impl IGyrometerDeviceId { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(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(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_AngularVelocityX(&self, out: *mut f64) -> HRESULT, fn get_AngularVelocityY(&self, out: *mut f64) -> HRESULT, fn get_AngularVelocityZ(&self, out: *mut f64) -> HRESULT }} impl IGyrometerReading { - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_angular_velocity_x(&self) -> Result { + }} + #[inline] pub fn get_angular_velocity_x(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AngularVelocityX)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_angular_velocity_y(&self) -> Result { + }} + #[inline] pub fn get_angular_velocity_y(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AngularVelocityY)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_angular_velocity_z(&self) -> Result { + }} + #[inline] pub fn get_angular_velocity_z(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AngularVelocityZ)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class GyrometerReading: IGyrometerReading} DEFINE_IID!(IID_IGyrometerReading2, 380625212, 11145, 17595, 130, 43, 209, 225, 85, 111, 240, 155); RT_INTERFACE!{interface IGyrometerReading2(IGyrometerReading2Vtbl): IInspectable(IInspectableVtbl) [IID_IGyrometerReading2] { - fn get_PerformanceCount(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT + fn get_PerformanceCount(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_Properties(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT }} impl IGyrometerReading2 { - #[inline] pub unsafe fn get_performance_count(&self) -> Result>> { + #[inline] pub fn get_performance_count(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PerformanceCount)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut GyrometerReading) -> HRESULT }} impl IGyrometerReadingChangedEventArgs { - #[inline] pub unsafe fn get_reading(&self) -> Result> { + #[inline] pub fn get_reading(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Reading)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class GyrometerReadingChangedEventArgs: IGyrometerReadingChangedEventArgs} DEFINE_IID!(IID_IGyrometerStatics, 2209802185, 58525, 19257, 134, 230, 205, 85, 75, 228, 197, 193); @@ -23994,28 +23994,28 @@ RT_INTERFACE!{static interface IGyrometerStatics(IGyrometerStaticsVtbl): IInspec fn GetDefault(&self, out: *mut *mut Gyrometer) -> HRESULT }} impl IGyrometerStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IGyrometerStatics2, 4018403233, 55040, 16900, 150, 19, 121, 198, 177, 97, 223, 78); RT_INTERFACE!{static interface IGyrometerStatics2(IGyrometerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IGyrometerStatics2] { fn GetDeviceSelector(&self, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IGyrometerStatics2 { - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.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] { @@ -24023,38 +24023,38 @@ RT_INTERFACE!{interface IInclinometer(IInclinometerVtbl): IInspectable(IInspecta fn get_MinimumReportInterval(&self, out: *mut u32) -> HRESULT, fn put_ReportInterval(&self, value: u32) -> HRESULT, fn get_ReportInterval(&self, out: *mut u32) -> HRESULT, - fn add_ReadingChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReadingChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ReadingChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReadingChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IInclinometer { - #[inline] pub unsafe fn get_current_reading(&self) -> Result> { + #[inline] pub fn get_current_reading(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentReading)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_minimum_report_interval(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_minimum_report_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_report_interval(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_report_interval(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReportInterval)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_interval(&self) -> Result { + }} + #[inline] pub fn get_report_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReportInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_reading_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_reading_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ReadingChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_reading_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_reading_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ReadingChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Inclinometer: IInclinometer} impl RtActivatable for Inclinometer {} @@ -24062,21 +24062,21 @@ impl RtActivatable for Inclinometer {} impl RtActivatable for Inclinometer {} impl RtActivatable for Inclinometer {} impl Inclinometer { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} - #[inline] pub fn get_default_for_relative_readings() -> Result> { unsafe { + } + #[inline] pub fn get_default_for_relative_readings() -> Result>> { >::get_activation_factory().get_default_for_relative_readings() - }} - #[inline] pub fn get_default_with_sensor_reading_type(sensorReadingtype: SensorReadingType) -> Result> { unsafe { + } + #[inline] pub fn get_default_with_sensor_reading_type(sensorReadingtype: SensorReadingType) -> Result>> { >::get_activation_factory().get_default_with_sensor_reading_type(sensorReadingtype) - }} - #[inline] pub fn get_device_selector(readingType: SensorReadingType) -> Result { unsafe { + } + #[inline] pub fn get_device_selector(readingType: SensorReadingType) -> Result { >::get_activation_factory().get_device_selector(readingType) - }} - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} + } } DEFINE_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]) [CLSID_Inclinometer]); DEFINE_IID!(IID_IInclinometer2, 43987859, 10418, 17912, 187, 22, 97, 232, 106, 127, 174, 110); @@ -24088,20 +24088,20 @@ RT_INTERFACE!{interface IInclinometer2(IInclinometer2Vtbl): IInspectable(IInspec fn get_ReadingType(&self, out: *mut SensorReadingType) -> HRESULT }} impl IInclinometer2 { - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn set_reading_transform(&self, value: super::super::graphics::display::DisplayOrientations) -> Result<()> { + #[cfg(feature="windows-graphics")] #[inline] pub fn set_reading_transform(&self, value: super::super::graphics::display::DisplayOrientations) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReadingTransform)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn get_reading_transform(&self) -> Result { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_reading_transform(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReadingTransform)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_reading_type(&self) -> Result { + }} + #[inline] pub fn get_reading_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReadingType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IInclinometer3, 973688836, 55141, 17284, 163, 215, 2, 131, 243, 171, 230, 174); RT_INTERFACE!{interface IInclinometer3(IInclinometer3Vtbl): IInspectable(IInspectableVtbl) [IID_IInclinometer3] { @@ -24110,89 +24110,89 @@ RT_INTERFACE!{interface IInclinometer3(IInclinometer3Vtbl): IInspectable(IInspec fn get_MaxBatchSize(&self, out: *mut u32) -> HRESULT }} impl IInclinometer3 { - #[inline] pub unsafe fn set_report_latency(&self, value: u32) -> Result<()> { + #[inline] pub fn set_report_latency(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReportLatency)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_latency(&self) -> Result { + }} + #[inline] pub fn get_report_latency(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReportLatency)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_batch_size(&self) -> Result { + }} + #[inline] pub fn get_max_batch_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxBatchSize)(self as *const _ as *mut _, &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(&self, out: *mut HSTRING) -> HRESULT }} impl IInclinometerDeviceId { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(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(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_PitchDegrees(&self, out: *mut f32) -> HRESULT, fn get_RollDegrees(&self, out: *mut f32) -> HRESULT, fn get_YawDegrees(&self, out: *mut f32) -> HRESULT }} impl IInclinometerReading { - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pitch_degrees(&self) -> Result { + }} + #[inline] pub fn get_pitch_degrees(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PitchDegrees)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_roll_degrees(&self) -> Result { + }} + #[inline] pub fn get_roll_degrees(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RollDegrees)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_yaw_degrees(&self) -> Result { + }} + #[inline] pub fn get_yaw_degrees(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_YawDegrees)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class InclinometerReading: IInclinometerReading} DEFINE_IID!(IID_IInclinometerReading2, 1326860161, 59659, 18008, 137, 21, 1, 3, 224, 138, 128, 90); RT_INTERFACE!{interface IInclinometerReading2(IInclinometerReading2Vtbl): IInspectable(IInspectableVtbl) [IID_IInclinometerReading2] { - fn get_PerformanceCount(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT + fn get_PerformanceCount(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_Properties(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT }} impl IInclinometerReading2 { - #[inline] pub unsafe fn get_performance_count(&self) -> Result>> { + #[inline] pub fn get_performance_count(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PerformanceCount)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut InclinometerReading) -> HRESULT }} impl IInclinometerReadingChangedEventArgs { - #[inline] pub unsafe fn get_reading(&self) -> Result> { + #[inline] pub fn get_reading(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Reading)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class InclinometerReadingChangedEventArgs: IInclinometerReadingChangedEventArgs} DEFINE_IID!(IID_IInclinometerReadingYawAccuracy, 3025397888, 8163, 18822, 162, 87, 230, 236, 226, 114, 57, 73); @@ -24200,61 +24200,61 @@ RT_INTERFACE!{interface IInclinometerReadingYawAccuracy(IInclinometerReadingYawA fn get_YawAccuracy(&self, out: *mut MagnetometerAccuracy) -> HRESULT }} impl IInclinometerReadingYawAccuracy { - #[inline] pub unsafe fn get_yaw_accuracy(&self) -> Result { + #[inline] pub fn get_yaw_accuracy(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_YawAccuracy)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(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(&self, out: *mut *mut Inclinometer) -> HRESULT }} impl IInclinometerStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut *mut Inclinometer) -> HRESULT }} impl IInclinometerStatics2 { - #[inline] pub unsafe fn get_default_for_relative_readings(&self) -> Result> { + #[inline] pub fn get_default_for_relative_readings(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefaultForRelativeReadings)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, sensorReadingtype: SensorReadingType, out: *mut *mut Inclinometer) -> HRESULT }} impl IInclinometerStatics3 { - #[inline] pub unsafe fn get_default_with_sensor_reading_type(&self, sensorReadingtype: SensorReadingType) -> Result> { + #[inline] pub fn get_default_with_sensor_reading_type(&self, sensorReadingtype: SensorReadingType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefaultWithSensorReadingType)(self as *const _ as *mut _, sensorReadingtype, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IInclinometerStatics4, 3904542457, 28293, 19075, 174, 208, 215, 205, 204, 152, 86, 200); RT_INTERFACE!{static interface IInclinometerStatics4(IInclinometerStatics4Vtbl): IInspectable(IInspectableVtbl) [IID_IInclinometerStatics4] { fn GetDeviceSelector(&self, readingType: SensorReadingType, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IInclinometerStatics4 { - #[inline] pub unsafe fn get_device_selector(&self, readingType: SensorReadingType) -> Result { + #[inline] pub fn get_device_selector(&self, readingType: SensorReadingType) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, readingType, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ILightSensor, 4165732120, 3156, 18350, 146, 46, 120, 159, 87, 251, 3, 160); RT_INTERFACE!{interface ILightSensor(ILightSensorVtbl): IInspectable(IInspectableVtbl) [IID_ILightSensor] { @@ -24262,52 +24262,52 @@ RT_INTERFACE!{interface ILightSensor(ILightSensorVtbl): IInspectable(IInspectabl fn get_MinimumReportInterval(&self, out: *mut u32) -> HRESULT, fn put_ReportInterval(&self, value: u32) -> HRESULT, fn get_ReportInterval(&self, out: *mut u32) -> HRESULT, - fn add_ReadingChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReadingChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ReadingChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReadingChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl ILightSensor { - #[inline] pub unsafe fn get_current_reading(&self) -> Result> { + #[inline] pub fn get_current_reading(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentReading)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_minimum_report_interval(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_minimum_report_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_report_interval(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_report_interval(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReportInterval)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_interval(&self) -> Result { + }} + #[inline] pub fn get_report_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReportInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_reading_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_reading_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ReadingChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_reading_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_reading_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ReadingChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class LightSensor: ILightSensor} impl RtActivatable for LightSensor {} impl RtActivatable for LightSensor {} impl LightSensor { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} - #[inline] pub fn get_device_selector() -> Result { unsafe { + } + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} + } } DEFINE_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]) [CLSID_LightSensor]); DEFINE_IID!(IID_ILightSensor2, 1214981352, 43340, 16528, 143, 72, 9, 247, 130, 169, 247, 213); @@ -24317,77 +24317,77 @@ RT_INTERFACE!{interface ILightSensor2(ILightSensor2Vtbl): IInspectable(IInspecta fn get_MaxBatchSize(&self, out: *mut u32) -> HRESULT }} impl ILightSensor2 { - #[inline] pub unsafe fn set_report_latency(&self, value: u32) -> Result<()> { + #[inline] pub fn set_report_latency(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReportLatency)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_latency(&self) -> Result { + }} + #[inline] pub fn get_report_latency(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReportLatency)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_batch_size(&self) -> Result { + }} + #[inline] pub fn get_max_batch_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxBatchSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(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(&self, out: *mut HSTRING) -> HRESULT }} impl ILightSensorDeviceId { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_IlluminanceInLux(&self, out: *mut f32) -> HRESULT }} impl ILightSensorReading { - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_illuminance_in_lux(&self) -> Result { + }} + #[inline] pub fn get_illuminance_in_lux(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IlluminanceInLux)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class LightSensorReading: ILightSensorReading} DEFINE_IID!(IID_ILightSensorReading2, 3075547525, 17571, 17609, 129, 144, 158, 246, 222, 10, 138, 116); RT_INTERFACE!{interface ILightSensorReading2(ILightSensorReading2Vtbl): IInspectable(IInspectableVtbl) [IID_ILightSensorReading2] { - fn get_PerformanceCount(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT + fn get_PerformanceCount(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_Properties(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT }} impl ILightSensorReading2 { - #[inline] pub unsafe fn get_performance_count(&self) -> Result>> { + #[inline] pub fn get_performance_count(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PerformanceCount)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut LightSensorReading) -> HRESULT }} impl ILightSensorReadingChangedEventArgs { - #[inline] pub unsafe fn get_reading(&self) -> Result> { + #[inline] pub fn get_reading(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Reading)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class LightSensorReadingChangedEventArgs: ILightSensorReadingChangedEventArgs} DEFINE_IID!(IID_ILightSensorStatics, 1172016260, 50088, 18206, 154, 83, 100, 87, 250, 216, 124, 14); @@ -24395,28 +24395,28 @@ RT_INTERFACE!{static interface ILightSensorStatics(ILightSensorStaticsVtbl): IIn fn GetDefault(&self, out: *mut *mut LightSensor) -> HRESULT }} impl ILightSensorStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_ILightSensorStatics2, 247506512, 56774, 16555, 172, 227, 236, 51, 89, 212, 44, 81); RT_INTERFACE!{static interface ILightSensorStatics2(ILightSensorStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_ILightSensorStatics2] { fn GetDeviceSelector(&self, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ILightSensorStatics2 { - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMagnetometer, 1213162094, 54217, 16657, 179, 246, 44, 241, 250, 164, 24, 213); RT_INTERFACE!{interface IMagnetometer(IMagnetometerVtbl): IInspectable(IInspectableVtbl) [IID_IMagnetometer] { @@ -24424,52 +24424,52 @@ RT_INTERFACE!{interface IMagnetometer(IMagnetometerVtbl): IInspectable(IInspecta fn get_MinimumReportInterval(&self, out: *mut u32) -> HRESULT, fn put_ReportInterval(&self, value: u32) -> HRESULT, fn get_ReportInterval(&self, out: *mut u32) -> HRESULT, - fn add_ReadingChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReadingChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ReadingChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReadingChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IMagnetometer { - #[inline] pub unsafe fn get_current_reading(&self) -> Result> { + #[inline] pub fn get_current_reading(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentReading)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_minimum_report_interval(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_minimum_report_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_report_interval(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_report_interval(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReportInterval)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_interval(&self) -> Result { + }} + #[inline] pub fn get_report_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReportInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_reading_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_reading_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ReadingChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_reading_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_reading_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ReadingChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Magnetometer: IMagnetometer} impl RtActivatable for Magnetometer {} impl RtActivatable for Magnetometer {} impl Magnetometer { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} - #[inline] pub fn get_device_selector() -> Result { unsafe { + } + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} + } } DEFINE_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]) [CLSID_Magnetometer]); DEFINE_IID!(IID_IMagnetometer2, 3026545797, 9974, 17483, 169, 226, 162, 63, 150, 108, 211, 104); @@ -24478,15 +24478,15 @@ RT_INTERFACE!{interface IMagnetometer2(IMagnetometer2Vtbl): IInspectable(IInspec #[cfg(feature="windows-graphics")] fn get_ReadingTransform(&self, out: *mut super::super::graphics::display::DisplayOrientations) -> HRESULT }} impl IMagnetometer2 { - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn set_reading_transform(&self, value: super::super::graphics::display::DisplayOrientations) -> Result<()> { + #[cfg(feature="windows-graphics")] #[inline] pub fn set_reading_transform(&self, value: super::super::graphics::display::DisplayOrientations) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReadingTransform)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn get_reading_transform(&self) -> Result { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_reading_transform(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReadingTransform)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMagnetometer3, 3197361020, 42533, 18671, 172, 247, 250, 193, 4, 131, 38, 113); RT_INTERFACE!{interface IMagnetometer3(IMagnetometer3Vtbl): IInspectable(IInspectableVtbl) [IID_IMagnetometer3] { @@ -24495,20 +24495,20 @@ RT_INTERFACE!{interface IMagnetometer3(IMagnetometer3Vtbl): IInspectable(IInspec fn get_MaxBatchSize(&self, out: *mut u32) -> HRESULT }} impl IMagnetometer3 { - #[inline] pub unsafe fn set_report_latency(&self, value: u32) -> Result<()> { + #[inline] pub fn set_report_latency(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReportLatency)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_latency(&self) -> Result { + }} + #[inline] pub fn get_report_latency(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReportLatency)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_batch_size(&self) -> Result { + }} + #[inline] pub fn get_max_batch_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxBatchSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum MagnetometerAccuracy: i32 { Unknown (MagnetometerAccuracy_Unknown) = 0, Unreliable (MagnetometerAccuracy_Unreliable) = 1, Approximate (MagnetometerAccuracy_Approximate) = 2, High (MagnetometerAccuracy_High) = 3, @@ -24518,75 +24518,75 @@ RT_INTERFACE!{interface IMagnetometerDeviceId(IMagnetometerDeviceIdVtbl): IInspe fn get_DeviceId(&self, out: *mut HSTRING) -> HRESULT }} impl IMagnetometerDeviceId { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(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(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_MagneticFieldX(&self, out: *mut f32) -> HRESULT, fn get_MagneticFieldY(&self, out: *mut f32) -> HRESULT, fn get_MagneticFieldZ(&self, out: *mut f32) -> HRESULT, fn get_DirectionalAccuracy(&self, out: *mut MagnetometerAccuracy) -> HRESULT }} impl IMagnetometerReading { - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_magnetic_field_x(&self) -> Result { + }} + #[inline] pub fn get_magnetic_field_x(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MagneticFieldX)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_magnetic_field_y(&self) -> Result { + }} + #[inline] pub fn get_magnetic_field_y(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MagneticFieldY)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_magnetic_field_z(&self) -> Result { + }} + #[inline] pub fn get_magnetic_field_z(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MagneticFieldZ)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_directional_accuracy(&self) -> Result { + }} + #[inline] pub fn get_directional_accuracy(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DirectionalAccuracy)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MagnetometerReading: IMagnetometerReading} DEFINE_IID!(IID_IMagnetometerReading2, 3569966177, 25049, 16459, 163, 40, 6, 111, 23, 122, 20, 9); RT_INTERFACE!{interface IMagnetometerReading2(IMagnetometerReading2Vtbl): IInspectable(IInspectableVtbl) [IID_IMagnetometerReading2] { - fn get_PerformanceCount(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT + fn get_PerformanceCount(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_Properties(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT }} impl IMagnetometerReading2 { - #[inline] pub unsafe fn get_performance_count(&self) -> Result>> { + #[inline] pub fn get_performance_count(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PerformanceCount)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut MagnetometerReading) -> HRESULT }} impl IMagnetometerReadingChangedEventArgs { - #[inline] pub unsafe fn get_reading(&self) -> Result> { + #[inline] pub fn get_reading(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Reading)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MagnetometerReadingChangedEventArgs: IMagnetometerReadingChangedEventArgs} DEFINE_IID!(IID_IMagnetometerStatics, 2235327692, 1688, 19930, 166, 223, 156, 185, 204, 74, 180, 10); @@ -24594,28 +24594,28 @@ RT_INTERFACE!{static interface IMagnetometerStatics(IMagnetometerStaticsVtbl): I fn GetDefault(&self, out: *mut *mut Magnetometer) -> HRESULT }} impl IMagnetometerStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IMagnetometerStatics2, 738728432, 65478, 20361, 160, 111, 24, 250, 16, 121, 41, 51); RT_INTERFACE!{static interface IMagnetometerStatics2(IMagnetometerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IMagnetometerStatics2] { fn GetDeviceSelector(&self, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IMagnetometerStatics2 { - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &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] { @@ -24623,38 +24623,38 @@ RT_INTERFACE!{interface IOrientationSensor(IOrientationSensorVtbl): IInspectable fn get_MinimumReportInterval(&self, out: *mut u32) -> HRESULT, fn put_ReportInterval(&self, value: u32) -> HRESULT, fn get_ReportInterval(&self, out: *mut u32) -> HRESULT, - fn add_ReadingChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReadingChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ReadingChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReadingChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IOrientationSensor { - #[inline] pub unsafe fn get_current_reading(&self) -> Result> { + #[inline] pub fn get_current_reading(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentReading)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_minimum_report_interval(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_minimum_report_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_report_interval(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_report_interval(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReportInterval)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_interval(&self) -> Result { + }} + #[inline] pub fn get_report_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReportInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_reading_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_reading_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ReadingChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_reading_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_reading_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ReadingChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class OrientationSensor: IOrientationSensor} impl RtActivatable for OrientationSensor {} @@ -24662,27 +24662,27 @@ impl RtActivatable for OrientationSensor {} impl RtActivatable for OrientationSensor {} impl RtActivatable for OrientationSensor {} impl OrientationSensor { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} - #[inline] pub fn get_default_for_relative_readings() -> Result> { unsafe { + } + #[inline] pub fn get_default_for_relative_readings() -> Result>> { >::get_activation_factory().get_default_for_relative_readings() - }} - #[inline] pub fn get_default_with_sensor_reading_type(sensorReadingtype: SensorReadingType) -> Result> { unsafe { + } + #[inline] pub fn get_default_with_sensor_reading_type(sensorReadingtype: SensorReadingType) -> Result>> { >::get_activation_factory().get_default_with_sensor_reading_type(sensorReadingtype) - }} - #[inline] pub fn get_default_with_sensor_reading_type_and_sensor_optimization_goal(sensorReadingType: SensorReadingType, optimizationGoal: SensorOptimizationGoal) -> Result> { unsafe { + } + #[inline] pub fn get_default_with_sensor_reading_type_and_sensor_optimization_goal(sensorReadingType: SensorReadingType, optimizationGoal: SensorOptimizationGoal) -> Result>> { >::get_activation_factory().get_default_with_sensor_reading_type_and_sensor_optimization_goal(sensorReadingType, optimizationGoal) - }} - #[inline] pub fn get_device_selector(readingType: SensorReadingType) -> Result { unsafe { + } + #[inline] pub fn get_device_selector(readingType: SensorReadingType) -> Result { >::get_activation_factory().get_device_selector(readingType) - }} - #[inline] pub fn get_device_selector_with_sensor_reading_type_and_sensor_optimization_goal(readingType: SensorReadingType, optimizationGoal: SensorOptimizationGoal) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_with_sensor_reading_type_and_sensor_optimization_goal(readingType: SensorReadingType, optimizationGoal: SensorOptimizationGoal) -> Result { >::get_activation_factory().get_device_selector_with_sensor_reading_type_and_sensor_optimization_goal(readingType, optimizationGoal) - }} - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} + } } DEFINE_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]) [CLSID_OrientationSensor]); DEFINE_IID!(IID_IOrientationSensor2, 227691769, 12063, 18889, 128, 66, 74, 24, 19, 214, 119, 96); @@ -24694,20 +24694,20 @@ RT_INTERFACE!{interface IOrientationSensor2(IOrientationSensor2Vtbl): IInspectab fn get_ReadingType(&self, out: *mut SensorReadingType) -> HRESULT }} impl IOrientationSensor2 { - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn set_reading_transform(&self, value: super::super::graphics::display::DisplayOrientations) -> Result<()> { + #[cfg(feature="windows-graphics")] #[inline] pub fn set_reading_transform(&self, value: super::super::graphics::display::DisplayOrientations) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReadingTransform)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn get_reading_transform(&self) -> Result { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_reading_transform(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReadingTransform)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_reading_type(&self) -> Result { + }} + #[inline] pub fn get_reading_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReadingType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IOrientationSensor3, 751720333, 25707, 18629, 183, 238, 68, 253, 196, 198, 170, 253); RT_INTERFACE!{interface IOrientationSensor3(IOrientationSensor3Vtbl): IInspectable(IInspectableVtbl) [IID_IOrientationSensor3] { @@ -24716,83 +24716,83 @@ RT_INTERFACE!{interface IOrientationSensor3(IOrientationSensor3Vtbl): IInspectab fn get_MaxBatchSize(&self, out: *mut u32) -> HRESULT }} impl IOrientationSensor3 { - #[inline] pub unsafe fn set_report_latency(&self, value: u32) -> Result<()> { + #[inline] pub fn set_report_latency(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReportLatency)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_latency(&self) -> Result { + }} + #[inline] pub fn get_report_latency(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReportLatency)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_batch_size(&self) -> Result { + }} + #[inline] pub fn get_max_batch_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxBatchSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, out: *mut HSTRING) -> HRESULT }} impl IOrientationSensorDeviceId { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(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(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_RotationMatrix(&self, out: *mut *mut SensorRotationMatrix) -> HRESULT, fn get_Quaternion(&self, out: *mut *mut SensorQuaternion) -> HRESULT }} impl IOrientationSensorReading { - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_rotation_matrix(&self) -> Result> { + }} + #[inline] pub fn get_rotation_matrix(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RotationMatrix)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_quaternion(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_quaternion(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Quaternion)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class OrientationSensorReading: IOrientationSensorReading} DEFINE_IID!(IID_IOrientationSensorReading2, 5729887, 18936, 19461, 158, 7, 36, 250, 199, 148, 8, 195); RT_INTERFACE!{interface IOrientationSensorReading2(IOrientationSensorReading2Vtbl): IInspectable(IInspectableVtbl) [IID_IOrientationSensorReading2] { - fn get_PerformanceCount(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT + fn get_PerformanceCount(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_Properties(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT }} impl IOrientationSensorReading2 { - #[inline] pub unsafe fn get_performance_count(&self) -> Result>> { + #[inline] pub fn get_performance_count(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PerformanceCount)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut OrientationSensorReading) -> HRESULT }} impl IOrientationSensorReadingChangedEventArgs { - #[inline] pub unsafe fn get_reading(&self) -> Result> { + #[inline] pub fn get_reading(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Reading)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class OrientationSensorReadingChangedEventArgs: IOrientationSensorReadingChangedEventArgs} DEFINE_IID!(IID_IOrientationSensorReadingYawAccuracy, 3517749284, 16218, 18850, 188, 123, 17, 128, 188, 56, 205, 43); @@ -24800,33 +24800,33 @@ RT_INTERFACE!{interface IOrientationSensorReadingYawAccuracy(IOrientationSensorR fn get_YawAccuracy(&self, out: *mut MagnetometerAccuracy) -> HRESULT }} impl IOrientationSensorReadingYawAccuracy { - #[inline] pub unsafe fn get_yaw_accuracy(&self) -> Result { + #[inline] pub fn get_yaw_accuracy(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_YawAccuracy)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(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(&self, out: *mut *mut OrientationSensor) -> HRESULT }} impl IOrientationSensorStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut *mut OrientationSensor) -> HRESULT }} impl IOrientationSensorStatics2 { - #[inline] pub unsafe fn get_default_for_relative_readings(&self) -> Result> { + #[inline] pub fn get_default_for_relative_readings(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefaultForRelativeReadings)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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] { @@ -24834,39 +24834,39 @@ RT_INTERFACE!{static interface IOrientationSensorStatics3(IOrientationSensorStat fn GetDefaultWithSensorReadingTypeAndSensorOptimizationGoal(&self, sensorReadingType: SensorReadingType, optimizationGoal: SensorOptimizationGoal, out: *mut *mut OrientationSensor) -> HRESULT }} impl IOrientationSensorStatics3 { - #[inline] pub unsafe fn get_default_with_sensor_reading_type(&self, sensorReadingtype: SensorReadingType) -> Result> { + #[inline] pub fn get_default_with_sensor_reading_type(&self, sensorReadingtype: SensorReadingType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefaultWithSensorReadingType)(self as *const _ as *mut _, 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(&self, sensorReadingType: SensorReadingType, optimizationGoal: SensorOptimizationGoal) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_default_with_sensor_reading_type_and_sensor_optimization_goal(&self, sensorReadingType: SensorReadingType, optimizationGoal: SensorOptimizationGoal) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefaultWithSensorReadingTypeAndSensorOptimizationGoal)(self as *const _ as *mut _, sensorReadingType, optimizationGoal, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IOrientationSensorStatics4, 2793401173, 11397, 19240, 160, 254, 88, 196, 178, 4, 149, 245); RT_INTERFACE!{static interface IOrientationSensorStatics4(IOrientationSensorStatics4Vtbl): IInspectable(IInspectableVtbl) [IID_IOrientationSensorStatics4] { fn GetDeviceSelector(&self, readingType: SensorReadingType, out: *mut HSTRING) -> HRESULT, fn GetDeviceSelectorWithSensorReadingTypeAndSensorOptimizationGoal(&self, readingType: SensorReadingType, optimizationGoal: SensorOptimizationGoal, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IOrientationSensorStatics4 { - #[inline] pub unsafe fn get_device_selector(&self, readingType: SensorReadingType) -> Result { + #[inline] pub fn get_device_selector(&self, readingType: SensorReadingType) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, readingType, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector_with_sensor_reading_type_and_sensor_optimization_goal(&self, readingType: SensorReadingType, optimizationGoal: SensorOptimizationGoal) -> Result { + }} + #[inline] pub fn get_device_selector_with_sensor_reading_type_and_sensor_optimization_goal(&self, readingType: SensorReadingType, optimizationGoal: SensorOptimizationGoal) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorWithSensorReadingTypeAndSensorOptimizationGoal)(self as *const _ as *mut _, readingType, optimizationGoal, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &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] { @@ -24875,85 +24875,85 @@ RT_INTERFACE!{interface IPedometer(IPedometerVtbl): IInspectable(IInspectableVtb fn get_MinimumReportInterval(&self, out: *mut u32) -> HRESULT, fn put_ReportInterval(&self, value: u32) -> HRESULT, fn get_ReportInterval(&self, out: *mut u32) -> HRESULT, - fn add_ReadingChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReadingChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ReadingChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReadingChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IPedometer { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_power_in_milliwatts(&self) -> Result { + }} + #[inline] pub fn get_power_in_milliwatts(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PowerInMilliwatts)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_minimum_report_interval(&self) -> Result { + }} + #[inline] pub fn get_minimum_report_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_report_interval(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_report_interval(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReportInterval)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_interval(&self) -> Result { + }} + #[inline] pub fn get_report_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReportInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_reading_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_reading_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ReadingChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_reading_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_reading_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ReadingChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Pedometer: IPedometer} impl RtActivatable for Pedometer {} impl RtActivatable for Pedometer {} impl Pedometer { - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} - #[inline] pub fn get_default_async() -> Result>> { unsafe { + } + #[inline] pub fn get_default_async() -> Result>> { >::get_activation_factory().get_default_async() - }} - #[inline] pub fn get_device_selector() -> Result { unsafe { + } + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} - #[inline] pub fn get_system_history_async(fromTime: super::super::foundation::DateTime) -> Result>>> { unsafe { + } + #[inline] pub fn get_system_history_async(fromTime: foundation::DateTime) -> Result>>> { >::get_activation_factory().get_system_history_async(fromTime) - }} - #[inline] pub fn get_system_history_with_duration_async(fromTime: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan) -> Result>>> { unsafe { + } + #[inline] pub fn get_system_history_with_duration_async(fromTime: foundation::DateTime, duration: foundation::TimeSpan) -> Result>>> { >::get_activation_factory().get_system_history_with_duration_async(fromTime, duration) - }} - #[inline] pub fn get_readings_from_trigger_details(triggerDetails: &SensorDataThresholdTriggerDetails) -> Result>> { unsafe { + } + #[inline] pub fn get_readings_from_trigger_details(triggerDetails: &SensorDataThresholdTriggerDetails) -> Result>>> { >::get_activation_factory().get_readings_from_trigger_details(triggerDetails) - }} + } } DEFINE_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]) [CLSID_Pedometer]); 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(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT + fn GetCurrentReadings(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT }} impl IPedometer2 { - #[inline] pub unsafe fn get_current_readings(&self) -> Result>> { + #[inline] pub fn get_current_readings(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentReadings)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PedometerDataThreshold: ISensorDataThreshold} impl RtActivatable for PedometerDataThreshold {} impl PedometerDataThreshold { - #[inline] pub fn create(sensor: &Pedometer, stepGoal: i32) -> Result> { unsafe { + #[inline] pub fn create(sensor: &Pedometer, stepGoal: i32) -> Result> { >::get_activation_factory().create(sensor, stepGoal) - }} + } } DEFINE_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]) [CLSID_PedometerDataThreshold]); DEFINE_IID!(IID_IPedometerDataThresholdFactory, 3417149264, 31316, 18027, 144, 16, 119, 161, 98, 252, 165, 215); @@ -24961,40 +24961,40 @@ RT_INTERFACE!{static interface IPedometerDataThresholdFactory(IPedometerDataThre fn Create(&self, sensor: *mut Pedometer, stepGoal: i32, out: *mut *mut PedometerDataThreshold) -> HRESULT }} impl IPedometerDataThresholdFactory { - #[inline] pub unsafe fn create(&self, sensor: &Pedometer, stepGoal: i32) -> Result> { + #[inline] pub fn create(&self, sensor: &Pedometer, stepGoal: i32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, sensor as *const _ as *mut _, stepGoal, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut PedometerStepKind) -> HRESULT, fn get_CumulativeSteps(&self, out: *mut i32) -> HRESULT, - fn get_Timestamp(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_CumulativeStepsDuration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT, + fn get_CumulativeStepsDuration(&self, out: *mut foundation::TimeSpan) -> HRESULT }} impl IPedometerReading { - #[inline] pub unsafe fn get_step_kind(&self) -> Result { + #[inline] pub fn get_step_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StepKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_cumulative_steps(&self) -> Result { + }} + #[inline] pub fn get_cumulative_steps(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CumulativeSteps)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + }} + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_cumulative_steps_duration(&self) -> Result { + }} + #[inline] pub fn get_cumulative_steps_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CumulativeStepsDuration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PedometerReading: IPedometerReading} DEFINE_IID!(IID_IPedometerReadingChangedEventArgs, 4166378622, 43964, 17494, 134, 168, 37, 207, 43, 51, 55, 66); @@ -25002,58 +25002,58 @@ RT_INTERFACE!{interface IPedometerReadingChangedEventArgs(IPedometerReadingChang fn get_Reading(&self, out: *mut *mut PedometerReading) -> HRESULT }} impl IPedometerReadingChangedEventArgs { - #[inline] pub unsafe fn get_reading(&self) -> Result> { + #[inline] pub fn get_reading(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Reading)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PedometerReadingChangedEventArgs: IPedometerReadingChangedEventArgs} 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(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetDefaultAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetDefaultAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetDeviceSelector(&self, out: *mut HSTRING) -> HRESULT, - fn GetSystemHistoryAsync(&self, fromTime: super::super::foundation::DateTime, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetSystemHistoryWithDurationAsync(&self, fromTime: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn GetSystemHistoryAsync(&self, fromTime: foundation::DateTime, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetSystemHistoryWithDurationAsync(&self, fromTime: foundation::DateTime, duration: foundation::TimeSpan, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IPedometerStatics { - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_async(&self) -> Result>> { + }} + #[inline] pub fn get_default_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefaultAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + }} + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_system_history_async(&self, fromTime: super::super::foundation::DateTime) -> Result>>> { + }} + #[inline] pub fn get_system_history_async(&self, fromTime: foundation::DateTime) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSystemHistoryAsync)(self as *const _ as *mut _, fromTime, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_system_history_with_duration_async(&self, fromTime: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan) -> Result>>> { + }} + #[inline] pub fn get_system_history_with_duration_async(&self, fromTime: foundation::DateTime, duration: foundation::TimeSpan) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSystemHistoryWithDurationAsync)(self as *const _ as *mut _, fromTime, duration, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, triggerDetails: *mut SensorDataThresholdTriggerDetails, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn GetReadingsFromTriggerDetails(&self, triggerDetails: *mut SensorDataThresholdTriggerDetails, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IPedometerStatics2 { - #[inline] pub unsafe fn get_readings_from_trigger_details(&self, triggerDetails: &SensorDataThresholdTriggerDetails) -> Result>> { + #[inline] pub fn get_readings_from_trigger_details(&self, triggerDetails: &SensorDataThresholdTriggerDetails) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetReadingsFromTriggerDetails)(self as *const _ as *mut _, triggerDetails as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum PedometerStepKind: i32 { Unknown (PedometerStepKind_Unknown) = 0, Walking (PedometerStepKind_Walking) = 1, Running (PedometerStepKind_Running) = 2, @@ -25061,70 +25061,70 @@ RT_ENUM! { enum PedometerStepKind: i32 { 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(&self, out: *mut HSTRING) -> HRESULT, - fn get_MaxDistanceInMillimeters(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_MinDistanceInMillimeters(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_MaxDistanceInMillimeters(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_MinDistanceInMillimeters(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn GetCurrentReading(&self, out: *mut *mut ProximitySensorReading) -> HRESULT, - fn add_ReadingChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReadingChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ReadingChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReadingChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn CreateDisplayOnOffController(&self, out: *mut *mut ProximitySensorDisplayOnOffController) -> HRESULT }} impl IProximitySensor { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_distance_in_millimeters(&self) -> Result>> { + }} + #[inline] pub fn get_max_distance_in_millimeters(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxDistanceInMillimeters)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_distance_in_millimeters(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_min_distance_in_millimeters(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MinDistanceInMillimeters)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_reading(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_current_reading(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentReading)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_reading_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_reading_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ReadingChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_reading_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_reading_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ReadingChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn create_display_on_off_controller(&self) -> Result> { + }} + #[inline] pub fn create_display_on_off_controller(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDisplayOnOffController)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ProximitySensor: IProximitySensor} impl RtActivatable for ProximitySensor {} impl RtActivatable for ProximitySensor {} impl ProximitySensor { - #[inline] pub fn get_device_selector() -> Result { unsafe { + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} - #[inline] pub fn from_id(sensorId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn from_id(sensorId: &HStringArg) -> Result>> { >::get_activation_factory().from_id(sensorId) - }} - #[inline] pub fn get_readings_from_trigger_details(triggerDetails: &SensorDataThresholdTriggerDetails) -> Result>> { unsafe { + } + #[inline] pub fn get_readings_from_trigger_details(triggerDetails: &SensorDataThresholdTriggerDetails) -> Result>>> { >::get_activation_factory().get_readings_from_trigger_details(triggerDetails) - }} + } } DEFINE_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]) [CLSID_ProximitySensor]); RT_CLASS!{class ProximitySensorDataThreshold: ISensorDataThreshold} impl RtActivatable for ProximitySensorDataThreshold {} impl ProximitySensorDataThreshold { - #[inline] pub fn create(sensor: &ProximitySensor) -> Result> { unsafe { + #[inline] pub fn create(sensor: &ProximitySensor) -> Result> { >::get_activation_factory().create(sensor) - }} + } } DEFINE_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]) [CLSID_ProximitySensorDataThreshold]); DEFINE_IID!(IID_IProximitySensorDataThresholdFactory, 2421866785, 27943, 19155, 157, 181, 100, 103, 242, 165, 173, 157); @@ -25132,35 +25132,35 @@ RT_INTERFACE!{static interface IProximitySensorDataThresholdFactory(IProximitySe fn Create(&self, sensor: *mut ProximitySensor, out: *mut *mut ProximitySensorDataThreshold) -> HRESULT }} impl IProximitySensorDataThresholdFactory { - #[inline] pub unsafe fn create(&self, sensor: &ProximitySensor) -> Result> { + #[inline] pub fn create(&self, sensor: &ProximitySensor) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, sensor as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } -RT_CLASS!{class ProximitySensorDisplayOnOffController: super::super::foundation::IClosable} +RT_CLASS!{class ProximitySensorDisplayOnOffController: foundation::IClosable} 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(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_IsDetected(&self, out: *mut bool) -> HRESULT, - fn get_DistanceInMillimeters(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn get_DistanceInMillimeters(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IProximitySensorReading { - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_detected(&self) -> Result { + }} + #[inline] pub fn get_is_detected(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDetected)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_distance_in_millimeters(&self) -> Result>> { + }} + #[inline] pub fn get_distance_in_millimeters(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DistanceInMillimeters)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ProximitySensorReading: IProximitySensorReading} DEFINE_IID!(IID_IProximitySensorReadingChangedEventArgs, 3485660006, 50152, 16637, 140, 195, 103, 226, 137, 0, 73, 56); @@ -25168,11 +25168,11 @@ RT_INTERFACE!{interface IProximitySensorReadingChangedEventArgs(IProximitySensor fn get_Reading(&self, out: *mut *mut ProximitySensorReading) -> HRESULT }} impl IProximitySensorReadingChangedEventArgs { - #[inline] pub unsafe fn get_reading(&self) -> Result> { + #[inline] pub fn get_reading(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Reading)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ProximitySensorReadingChangedEventArgs: IProximitySensorReadingChangedEventArgs} DEFINE_IID!(IID_IProximitySensorStatics, 689464905, 25193, 20055, 165, 173, 130, 190, 128, 129, 51, 146); @@ -25181,27 +25181,27 @@ RT_INTERFACE!{static interface IProximitySensorStatics(IProximitySensorStaticsVt fn FromId(&self, sensorId: HSTRING, out: *mut *mut ProximitySensor) -> HRESULT }} impl IProximitySensorStatics { - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id(&self, sensorId: &HStringArg) -> Result> { + }} + #[inline] pub fn from_id(&self, sensorId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromId)(self as *const _ as *mut _, sensorId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, triggerDetails: *mut SensorDataThresholdTriggerDetails, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn GetReadingsFromTriggerDetails(&self, triggerDetails: *mut SensorDataThresholdTriggerDetails, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IProximitySensorStatics2 { - #[inline] pub unsafe fn get_readings_from_trigger_details(&self, triggerDetails: &SensorDataThresholdTriggerDetails) -> Result>> { + #[inline] pub fn get_readings_from_trigger_details(&self, triggerDetails: &SensorDataThresholdTriggerDetails) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetReadingsFromTriggerDetails)(self as *const _ as *mut _, triggerDetails as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_ISensorDataThreshold, 1423633505, 65099, 19975, 178, 96, 58, 76, 223, 190, 57, 110); RT_INTERFACE!{interface ISensorDataThreshold(ISensorDataThresholdVtbl): IInspectable(IInspectableVtbl) [IID_ISensorDataThreshold] { @@ -25213,16 +25213,16 @@ RT_INTERFACE!{interface ISensorDataThresholdTriggerDetails(ISensorDataThresholdT fn get_SensorType(&self, out: *mut SensorType) -> HRESULT }} impl ISensorDataThresholdTriggerDetails { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sensor_type(&self) -> Result { + }} + #[inline] pub fn get_sensor_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SensorType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SensorDataThresholdTriggerDetails: ISensorDataThresholdTriggerDetails} RT_ENUM! { enum SensorOptimizationGoal: i32 { @@ -25236,26 +25236,26 @@ RT_INTERFACE!{interface ISensorQuaternion(ISensorQuaternionVtbl): IInspectable(I fn get_Z(&self, out: *mut f32) -> HRESULT }} impl ISensorQuaternion { - #[inline] pub unsafe fn get_w(&self) -> Result { + #[inline] pub fn get_w(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_W)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_x(&self) -> Result { + }} + #[inline] pub fn get_x(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_X)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_y(&self) -> Result { + }} + #[inline] pub fn get_y(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Y)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_z(&self) -> Result { + }} + #[inline] pub fn get_z(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Z)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SensorQuaternion: ISensorQuaternion} RT_ENUM! { enum SensorReadingType: i32 { @@ -25274,51 +25274,51 @@ RT_INTERFACE!{interface ISensorRotationMatrix(ISensorRotationMatrixVtbl): IInspe fn get_M33(&self, out: *mut f32) -> HRESULT }} impl ISensorRotationMatrix { - #[inline] pub unsafe fn get_m11(&self) -> Result { + #[inline] pub fn get_m11(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_M11)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_m12(&self) -> Result { + }} + #[inline] pub fn get_m12(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_M12)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_m13(&self) -> Result { + }} + #[inline] pub fn get_m13(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_M13)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_m21(&self) -> Result { + }} + #[inline] pub fn get_m21(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_M21)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_m22(&self) -> Result { + }} + #[inline] pub fn get_m22(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_M22)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_m23(&self) -> Result { + }} + #[inline] pub fn get_m23(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_M23)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_m31(&self) -> Result { + }} + #[inline] pub fn get_m31(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_M31)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_m32(&self) -> Result { + }} + #[inline] pub fn get_m32(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_M32)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_m33(&self) -> Result { + }} + #[inline] pub fn get_m33(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_M33)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SensorRotationMatrix: ISensorRotationMatrix} RT_ENUM! { enum SensorType: i32 { @@ -25330,31 +25330,31 @@ RT_ENUM! { enum SimpleOrientation: i32 { 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(&self, out: *mut SimpleOrientation) -> HRESULT, - fn add_OrientationChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_OrientationChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_OrientationChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_OrientationChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl ISimpleOrientationSensor { - #[inline] pub unsafe fn get_current_orientation(&self) -> Result { + #[inline] pub fn get_current_orientation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetCurrentOrientation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_orientation_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_orientation_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_OrientationChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_orientation_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_orientation_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_OrientationChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SimpleOrientationSensor: ISimpleOrientationSensor} impl RtActivatable for SimpleOrientationSensor {} impl SimpleOrientationSensor { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} + } } DEFINE_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]) [CLSID_SimpleOrientationSensor]); DEFINE_IID!(IID_ISimpleOrientationSensor2, 2725750680, 34928, 17726, 139, 214, 184, 245, 216, 215, 148, 27); @@ -25363,43 +25363,43 @@ RT_INTERFACE!{interface ISimpleOrientationSensor2(ISimpleOrientationSensor2Vtbl) #[cfg(feature="windows-graphics")] fn get_ReadingTransform(&self, out: *mut super::super::graphics::display::DisplayOrientations) -> HRESULT }} impl ISimpleOrientationSensor2 { - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn set_reading_transform(&self, value: super::super::graphics::display::DisplayOrientations) -> Result<()> { + #[cfg(feature="windows-graphics")] #[inline] pub fn set_reading_transform(&self, value: super::super::graphics::display::DisplayOrientations) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReadingTransform)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn get_reading_transform(&self) -> Result { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_reading_transform(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReadingTransform)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, out: *mut HSTRING) -> HRESULT }} impl ISimpleOrientationSensorDeviceId { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(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(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_Orientation(&self, out: *mut SimpleOrientation) -> HRESULT }} impl ISimpleOrientationSensorOrientationChangedEventArgs { - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_orientation(&self) -> Result { + }} + #[inline] pub fn get_orientation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Orientation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SimpleOrientationSensorOrientationChangedEventArgs: ISimpleOrientationSensorOrientationChangedEventArgs} DEFINE_IID!(IID_ISimpleOrientationSensorStatics, 1928136303, 28842, 16582, 155, 27, 52, 51, 247, 69, 155, 78); @@ -25407,11 +25407,11 @@ RT_INTERFACE!{static interface ISimpleOrientationSensorStatics(ISimpleOrientatio fn GetDefault(&self, out: *mut *mut SimpleOrientationSensor) -> HRESULT }} impl ISimpleOrientationSensorStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } pub mod custom { // Windows.Devices.Sensors.Custom use ::prelude::*; @@ -25422,53 +25422,53 @@ RT_INTERFACE!{interface ICustomSensor(ICustomSensorVtbl): IInspectable(IInspecta fn put_ReportInterval(&self, value: u32) -> HRESULT, fn get_ReportInterval(&self, out: *mut u32) -> HRESULT, fn get_DeviceId(&self, out: *mut HSTRING) -> HRESULT, - fn add_ReadingChanged(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReadingChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn add_ReadingChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReadingChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl ICustomSensor { - #[inline] pub unsafe fn get_current_reading(&self) -> Result> { + #[inline] pub fn get_current_reading(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentReading)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_minimum_report_interval(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_minimum_report_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinimumReportInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_report_interval(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_report_interval(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReportInterval)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_interval(&self) -> Result { + }} + #[inline] pub fn get_report_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReportInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_id(&self) -> Result { + }} + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_reading_changed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_reading_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ReadingChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_reading_changed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_reading_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ReadingChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CustomSensor: ICustomSensor} impl RtActivatable for CustomSensor {} impl CustomSensor { - #[inline] pub fn get_device_selector(interfaceId: Guid) -> Result { unsafe { + #[inline] pub fn get_device_selector(interfaceId: Guid) -> Result { >::get_activation_factory().get_device_selector(interfaceId) - }} - #[inline] pub fn from_id_async(sensorId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(sensorId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(sensorId) - }} + } } DEFINE_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]) [CLSID_CustomSensor]); DEFINE_IID!(IID_ICustomSensor2, 551235857, 60504, 19871, 191, 189, 231, 120, 37, 8, 133, 16); @@ -25478,78 +25478,78 @@ RT_INTERFACE!{interface ICustomSensor2(ICustomSensor2Vtbl): IInspectable(IInspec fn get_MaxBatchSize(&self, out: *mut u32) -> HRESULT }} impl ICustomSensor2 { - #[inline] pub unsafe fn set_report_latency(&self, value: u32) -> Result<()> { + #[inline] pub fn set_report_latency(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReportLatency)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_report_latency(&self) -> Result { + }} + #[inline] pub fn get_report_latency(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReportLatency)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_batch_size(&self) -> Result { + }} + #[inline] pub fn get_max_batch_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxBatchSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, - fn get_Properties(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMapView) -> HRESULT + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT, + fn get_Properties(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT }} impl ICustomSensorReading { - #[inline] pub unsafe fn get_timestamp(&self) -> Result<::rt::gen::windows::foundation::DateTime> { + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CustomSensorReading: ICustomSensorReading} DEFINE_IID!(IID_ICustomSensorReading2, 574396650, 49011, 18834, 154, 72, 211, 200, 151, 89, 76, 203); RT_INTERFACE!{interface ICustomSensorReading2(ICustomSensorReading2Vtbl): IInspectable(IInspectableVtbl) [IID_ICustomSensorReading2] { - fn get_PerformanceCount(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::TimeSpan>) -> HRESULT + fn get_PerformanceCount(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl ICustomSensorReading2 { - #[inline] pub unsafe fn get_performance_count(&self) -> Result>> { + #[inline] pub fn get_performance_count(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PerformanceCount)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut CustomSensorReading) -> HRESULT }} impl ICustomSensorReadingChangedEventArgs { - #[inline] pub unsafe fn get_reading(&self) -> Result> { + #[inline] pub fn get_reading(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Reading)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CustomSensorReadingChangedEventArgs: ICustomSensorReadingChangedEventArgs} 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(&self, interfaceId: Guid, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&self, sensorId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn FromIdAsync(&self, sensorId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ICustomSensorStatics { - #[inline] pub unsafe fn get_device_selector(&self, interfaceId: Guid) -> Result { + #[inline] pub fn get_device_selector(&self, interfaceId: Guid) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, interfaceId, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, sensorId: &HStringArg) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, sensorId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, sensorId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } } // Windows.Devices.Sensors.Custom } // Windows.Devices.Sensors @@ -25560,11 +25560,11 @@ RT_INTERFACE!{interface IErrorReceivedEventArgs(IErrorReceivedEventArgsVtbl): II fn get_Error(&self, out: *mut SerialError) -> HRESULT }} impl IErrorReceivedEventArgs { - #[inline] pub unsafe fn get_error(&self) -> Result { + #[inline] pub fn get_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Error)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ErrorReceivedEventArgs: IErrorReceivedEventArgs} DEFINE_IID!(IID_IPinChangedEventArgs, 2730433968, 64668, 17927, 147, 208, 250, 94, 131, 67, 238, 34); @@ -25572,11 +25572,11 @@ RT_INTERFACE!{interface IPinChangedEventArgs(IPinChangedEventArgsVtbl): IInspect fn get_PinChange(&self, out: *mut SerialPinChange) -> HRESULT }} impl IPinChangedEventArgs { - #[inline] pub unsafe fn get_pin_change(&self) -> Result { + #[inline] pub fn get_pin_change(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PinChange)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PinChangedEventArgs: IPinChangedEventArgs} DEFINE_IID!(IID_ISerialDevice, 3783773382, 8720, 16719, 182, 90, 245, 85, 58, 3, 55, 42); @@ -25600,193 +25600,193 @@ RT_INTERFACE!{interface ISerialDevice(ISerialDeviceVtbl): IInspectable(IInspecta fn get_Parity(&self, out: *mut SerialParity) -> HRESULT, fn put_Parity(&self, value: SerialParity) -> HRESULT, fn get_PortName(&self, out: *mut HSTRING) -> HRESULT, - fn get_ReadTimeout(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_ReadTimeout(&self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_ReadTimeout(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_ReadTimeout(&self, value: foundation::TimeSpan) -> HRESULT, fn get_StopBits(&self, out: *mut SerialStopBitCount) -> HRESULT, fn put_StopBits(&self, value: SerialStopBitCount) -> HRESULT, fn get_UsbVendorId(&self, out: *mut u16) -> HRESULT, fn get_UsbProductId(&self, out: *mut u16) -> HRESULT, - fn get_WriteTimeout(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_WriteTimeout(&self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_WriteTimeout(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_WriteTimeout(&self, value: foundation::TimeSpan) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy27(&self) -> (), #[cfg(feature="windows-storage")] fn get_InputStream(&self, out: *mut *mut super::super::storage::streams::IInputStream) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy28(&self) -> (), #[cfg(feature="windows-storage")] fn get_OutputStream(&self, out: *mut *mut super::super::storage::streams::IOutputStream) -> HRESULT, - fn add_ErrorReceived(&self, reportHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ErrorReceived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PinChanged(&self, reportHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PinChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ErrorReceived(&self, reportHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ErrorReceived(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PinChanged(&self, reportHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PinChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl ISerialDevice { - #[inline] pub unsafe fn get_baud_rate(&self) -> Result { + #[inline] pub fn get_baud_rate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BaudRate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_baud_rate(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_baud_rate(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BaudRate)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_break_signal_state(&self) -> Result { + }} + #[inline] pub fn get_break_signal_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BreakSignalState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_break_signal_state(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_break_signal_state(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BreakSignalState)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_bytes_received(&self) -> Result { + }} + #[inline] pub fn get_bytes_received(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BytesReceived)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_carrier_detect_state(&self) -> Result { + }} + #[inline] pub fn get_carrier_detect_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CarrierDetectState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_clear_to_send_state(&self) -> Result { + }} + #[inline] pub fn get_clear_to_send_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ClearToSendState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_data_bits(&self) -> Result { + }} + #[inline] pub fn get_data_bits(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DataBits)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_data_bits(&self, value: u16) -> Result<()> { + }} + #[inline] pub fn set_data_bits(&self, value: u16) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DataBits)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_data_set_ready_state(&self) -> Result { + }} + #[inline] pub fn get_data_set_ready_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DataSetReadyState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_handshake(&self) -> Result { + }} + #[inline] pub fn get_handshake(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Handshake)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_handshake(&self, value: SerialHandshake) -> Result<()> { + }} + #[inline] pub fn set_handshake(&self, value: SerialHandshake) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Handshake)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_data_terminal_ready_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_data_terminal_ready_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDataTerminalReadyEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_data_terminal_ready_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_data_terminal_ready_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsDataTerminalReadyEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_request_to_send_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_request_to_send_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsRequestToSendEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_request_to_send_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_request_to_send_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsRequestToSendEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_parity(&self) -> Result { + }} + #[inline] pub fn get_parity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Parity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_parity(&self, value: SerialParity) -> Result<()> { + }} + #[inline] pub fn set_parity(&self, value: SerialParity) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Parity)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_port_name(&self) -> Result { + }} + #[inline] pub fn get_port_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PortName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_read_timeout(&self) -> Result { + }} + #[inline] pub fn get_read_timeout(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReadTimeout)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_read_timeout(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_read_timeout(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReadTimeout)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_stop_bits(&self) -> Result { + }} + #[inline] pub fn get_stop_bits(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StopBits)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_stop_bits(&self, value: SerialStopBitCount) -> Result<()> { + }} + #[inline] pub fn set_stop_bits(&self, value: SerialStopBitCount) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StopBits)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_usb_vendor_id(&self) -> Result { + }} + #[inline] pub fn get_usb_vendor_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UsbVendorId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_usb_product_id(&self) -> Result { + }} + #[inline] pub fn get_usb_product_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UsbProductId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_write_timeout(&self) -> Result { + }} + #[inline] pub fn get_write_timeout(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_WriteTimeout)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_write_timeout(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_write_timeout(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_WriteTimeout)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_input_stream(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_input_stream(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InputStream)(self 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(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_output_stream(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OutputStream)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_error_received(&self, reportHandler: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_error_received(&self, reportHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ErrorReceived)(self as *const _ as *mut _, reportHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_error_received(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_error_received(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ErrorReceived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pin_changed(&self, reportHandler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_pin_changed(&self, reportHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PinChanged)(self as *const _ as *mut _, reportHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pin_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pin_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PinChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SerialDevice: ISerialDevice} impl RtActivatable for SerialDevice {} impl SerialDevice { - #[inline] pub fn get_device_selector() -> Result { unsafe { + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} - #[inline] pub fn get_device_selector_from_port_name(portName: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_from_port_name(portName: &HStringArg) -> Result { >::get_activation_factory().get_device_selector_from_port_name(portName) - }} - #[inline] pub fn get_device_selector_from_usb_vid_pid(vendorId: u16, productId: u16) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_from_usb_vid_pid(vendorId: u16, productId: u16) -> Result { >::get_activation_factory().get_device_selector_from_usb_vid_pid(vendorId, productId) - }} - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} + } } DEFINE_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]) [CLSID_SerialDevice]); DEFINE_IID!(IID_ISerialDeviceStatics, 93080176, 2102, 18835, 174, 26, 182, 26, 227, 190, 5, 107); @@ -25794,29 +25794,29 @@ RT_INTERFACE!{static interface ISerialDeviceStatics(ISerialDeviceStaticsVtbl): I fn GetDeviceSelector(&self, out: *mut HSTRING) -> HRESULT, fn GetDeviceSelectorFromPortName(&self, portName: HSTRING, out: *mut HSTRING) -> HRESULT, fn GetDeviceSelectorFromUsbVidPid(&self, vendorId: u16, productId: u16, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ISerialDeviceStatics { - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector_from_port_name(&self, portName: &HStringArg) -> Result { + }} + #[inline] pub fn get_device_selector_from_port_name(&self, portName: &HStringArg) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorFromPortName)(self as *const _ as *mut _, 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(&self, vendorId: u16, productId: u16) -> Result { + }} + #[inline] pub fn get_device_selector_from_usb_vid_pid(&self, vendorId: u16, productId: u16) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorFromUsbVidPid)(self as *const _ as *mut _, vendorId, productId, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -25843,67 +25843,67 @@ RT_INTERFACE!{interface IUsbBulkInEndpointDescriptor(IUsbBulkInEndpointDescripto fn get_Pipe(&self, out: *mut *mut UsbBulkInPipe) -> HRESULT }} impl IUsbBulkInEndpointDescriptor { - #[inline] pub unsafe fn get_max_packet_size(&self) -> Result { + #[inline] pub fn get_max_packet_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxPacketSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_endpoint_number(&self) -> Result { + }} + #[inline] pub fn get_endpoint_number(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EndpointNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pipe(&self) -> Result> { + }} + #[inline] pub fn get_pipe(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Pipe)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class UsbBulkInEndpointDescriptor: IUsbBulkInEndpointDescriptor} 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(&self, out: *mut u32) -> HRESULT, fn get_EndpointDescriptor(&self, out: *mut *mut UsbBulkInEndpointDescriptor) -> HRESULT, - fn ClearStallAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ClearStallAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn put_ReadOptions(&self, value: UsbReadOptions) -> HRESULT, fn get_ReadOptions(&self, out: *mut UsbReadOptions) -> HRESULT, fn FlushBuffer(&self) -> HRESULT, #[cfg(feature="windows-storage")] fn get_InputStream(&self, out: *mut *mut super::super::storage::streams::IInputStream) -> HRESULT }} impl IUsbBulkInPipe { - #[inline] pub unsafe fn get_max_transfer_size_bytes(&self) -> Result { + #[inline] pub fn get_max_transfer_size_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxTransferSizeBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_endpoint_descriptor(&self) -> Result> { + }} + #[inline] pub fn get_endpoint_descriptor(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EndpointDescriptor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn clear_stall_async(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn clear_stall_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ClearStallAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_read_options(&self, value: UsbReadOptions) -> Result<()> { + }} + #[inline] pub fn set_read_options(&self, value: UsbReadOptions) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReadOptions)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_read_options(&self) -> Result { + }} + #[inline] pub fn get_read_options(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReadOptions)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn flush_buffer(&self) -> Result<()> { + }} + #[inline] pub fn flush_buffer(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).FlushBuffer)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_input_stream(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_input_stream(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InputStream)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class UsbBulkInPipe: IUsbBulkInPipe} DEFINE_IID!(IID_IUsbBulkOutEndpointDescriptor, 673219706, 65518, 20320, 155, 225, 149, 108, 172, 62, 203, 101); @@ -25913,80 +25913,80 @@ RT_INTERFACE!{interface IUsbBulkOutEndpointDescriptor(IUsbBulkOutEndpointDescrip fn get_Pipe(&self, out: *mut *mut UsbBulkOutPipe) -> HRESULT }} impl IUsbBulkOutEndpointDescriptor { - #[inline] pub unsafe fn get_max_packet_size(&self) -> Result { + #[inline] pub fn get_max_packet_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxPacketSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_endpoint_number(&self) -> Result { + }} + #[inline] pub fn get_endpoint_number(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EndpointNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pipe(&self) -> Result> { + }} + #[inline] pub fn get_pipe(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Pipe)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class UsbBulkOutEndpointDescriptor: IUsbBulkOutEndpointDescriptor} 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(&self, out: *mut *mut UsbBulkOutEndpointDescriptor) -> HRESULT, - fn ClearStallAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ClearStallAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn put_WriteOptions(&self, value: UsbWriteOptions) -> HRESULT, fn get_WriteOptions(&self, out: *mut UsbWriteOptions) -> HRESULT, #[cfg(feature="windows-storage")] fn get_OutputStream(&self, out: *mut *mut super::super::storage::streams::IOutputStream) -> HRESULT }} impl IUsbBulkOutPipe { - #[inline] pub unsafe fn get_endpoint_descriptor(&self) -> Result> { + #[inline] pub fn get_endpoint_descriptor(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EndpointDescriptor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn clear_stall_async(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn clear_stall_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ClearStallAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_write_options(&self, value: UsbWriteOptions) -> Result<()> { + }} + #[inline] pub fn set_write_options(&self, value: UsbWriteOptions) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_WriteOptions)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_write_options(&self) -> Result { + }} + #[inline] pub fn get_write_options(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_WriteOptions)(self 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(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_output_stream(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OutputStream)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class UsbBulkOutPipe: IUsbBulkOutPipe} 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_UsbInterfaces(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_ConfigurationDescriptor(&self, out: *mut *mut UsbConfigurationDescriptor) -> HRESULT, - fn get_Descriptors(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_Descriptors(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IUsbConfiguration { - #[inline] pub unsafe fn get_usb_interfaces(&self) -> Result>> { + #[inline] pub fn get_usb_interfaces(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UsbInterfaces)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_configuration_descriptor(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_configuration_descriptor(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ConfigurationDescriptor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_descriptors(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_descriptors(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Descriptors)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class UsbConfiguration: IUsbConfiguration} DEFINE_IID!(IID_IUsbConfigurationDescriptor, 4061621650, 46146, 16506, 130, 7, 125, 100, 108, 3, 133, 243); @@ -25997,36 +25997,36 @@ RT_INTERFACE!{interface IUsbConfigurationDescriptor(IUsbConfigurationDescriptorV fn get_RemoteWakeup(&self, out: *mut bool) -> HRESULT }} impl IUsbConfigurationDescriptor { - #[inline] pub unsafe fn get_configuration_value(&self) -> Result { + #[inline] pub fn get_configuration_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ConfigurationValue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_power_milliamps(&self) -> Result { + }} + #[inline] pub fn get_max_power_milliamps(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxPowerMilliamps)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_self_powered(&self) -> Result { + }} + #[inline] pub fn get_self_powered(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SelfPowered)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_wakeup(&self) -> Result { + }} + #[inline] pub fn get_remote_wakeup(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RemoteWakeup)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class UsbConfigurationDescriptor: IUsbConfigurationDescriptor} impl RtActivatable for UsbConfigurationDescriptor {} impl UsbConfigurationDescriptor { - #[inline] pub fn try_parse(descriptor: &UsbDescriptor) -> Result<(ComPtr, bool)> { unsafe { + #[inline] pub fn try_parse(descriptor: &UsbDescriptor) -> Result<(Option>, bool)> { >::get_activation_factory().try_parse(descriptor) - }} - #[inline] pub fn parse(descriptor: &UsbDescriptor) -> Result> { unsafe { + } + #[inline] pub fn parse(descriptor: &UsbDescriptor) -> Result>> { >::get_activation_factory().parse(descriptor) - }} + } } DEFINE_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]) [CLSID_UsbConfigurationDescriptor]); DEFINE_IID!(IID_IUsbConfigurationDescriptorStatics, 1112337811, 59200, 16545, 146, 189, 218, 18, 14, 160, 73, 20); @@ -26035,16 +26035,16 @@ RT_INTERFACE!{static interface IUsbConfigurationDescriptorStatics(IUsbConfigurat fn Parse(&self, descriptor: *mut UsbDescriptor, out: *mut *mut UsbConfigurationDescriptor) -> HRESULT }} impl IUsbConfigurationDescriptorStatics { - #[inline] pub unsafe fn try_parse(&self, descriptor: &UsbDescriptor) -> Result<(ComPtr, bool)> { + #[inline] pub fn try_parse(&self, descriptor: &UsbDescriptor) -> Result<(Option>, bool)> { unsafe { let mut parsed = null_mut(); let mut out = zeroed(); let hr = ((*self.lpVtbl).TryParse)(self as *const _ as *mut _, 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(&self, descriptor: &UsbDescriptor) -> Result> { + if hr == S_OK { Ok((ComPtr::wrap_optional(parsed), out)) } else { err(hr) } + }} + #[inline] pub fn parse(&self, descriptor: &UsbDescriptor) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Parse)(self as *const _ as *mut _, descriptor as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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, @@ -26061,42 +26061,42 @@ RT_INTERFACE!{interface IUsbControlRequestType(IUsbControlRequestTypeVtbl): IIns fn put_AsByte(&self, value: u8) -> HRESULT }} impl IUsbControlRequestType { - #[inline] pub unsafe fn get_direction(&self) -> Result { + #[inline] pub fn get_direction(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Direction)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_direction(&self, value: UsbTransferDirection) -> Result<()> { + }} + #[inline] pub fn set_direction(&self, value: UsbTransferDirection) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Direction)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_control_transfer_type(&self) -> Result { + }} + #[inline] pub fn get_control_transfer_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ControlTransferType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_control_transfer_type(&self, value: UsbControlTransferType) -> Result<()> { + }} + #[inline] pub fn set_control_transfer_type(&self, value: UsbControlTransferType) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ControlTransferType)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_recipient(&self) -> Result { + }} + #[inline] pub fn get_recipient(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Recipient)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_recipient(&self, value: UsbControlRecipient) -> Result<()> { + }} + #[inline] pub fn set_recipient(&self, value: UsbControlRecipient) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Recipient)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_as_byte(&self) -> Result { + }} + #[inline] pub fn get_as_byte(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AsByte)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_as_byte(&self, value: u8) -> Result<()> { + }} + #[inline] pub fn set_as_byte(&self, value: u8) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AsByte)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class UsbControlRequestType: IUsbControlRequestType} impl RtActivatable for UsbControlRequestType {} @@ -26111,129 +26111,129 @@ RT_INTERFACE!{interface IUsbDescriptor(IUsbDescriptorVtbl): IInspectable(IInspec #[cfg(feature="windows-storage")] fn ReadDescriptorBuffer(&self, buffer: *mut super::super::storage::streams::IBuffer) -> HRESULT }} impl IUsbDescriptor { - #[inline] pub unsafe fn get_length(&self) -> Result { + #[inline] pub fn get_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Length)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_descriptor_type(&self) -> Result { + }} + #[inline] pub fn get_descriptor_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DescriptorType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn read_descriptor_buffer(&self, buffer: &super::super::storage::streams::IBuffer) -> Result<()> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn read_descriptor_buffer(&self, buffer: &super::super::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReadDescriptorBuffer)(self as *const _ as *mut _, buffer as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class UsbDescriptor: IUsbDescriptor} 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(&self) -> (), - #[cfg(feature="windows-storage")] fn SendControlOutTransferAsync(&self, setupPacket: *mut UsbSetupPacket, buffer: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn SendControlOutTransferAsyncNoBuffer(&self, setupPacket: *mut UsbSetupPacket, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn SendControlOutTransferAsync(&self, setupPacket: *mut UsbSetupPacket, buffer: *mut super::super::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn SendControlOutTransferAsyncNoBuffer(&self, setupPacket: *mut UsbSetupPacket, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy2(&self) -> (), - #[cfg(feature="windows-storage")] fn SendControlInTransferAsync(&self, setupPacket: *mut UsbSetupPacket, buffer: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn SendControlInTransferAsync(&self, setupPacket: *mut UsbSetupPacket, buffer: *mut super::super::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy3(&self) -> (), - #[cfg(feature="windows-storage")] fn SendControlInTransferAsyncNoBuffer(&self, setupPacket: *mut UsbSetupPacket, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn SendControlInTransferAsyncNoBuffer(&self, setupPacket: *mut UsbSetupPacket, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn get_DefaultInterface(&self, out: *mut *mut UsbInterface) -> HRESULT, fn get_DeviceDescriptor(&self, out: *mut *mut UsbDeviceDescriptor) -> HRESULT, fn get_Configuration(&self, out: *mut *mut UsbConfiguration) -> HRESULT }} impl IUsbDevice { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn send_control_out_transfer_async(&self, setupPacket: &UsbSetupPacket, buffer: &super::super::storage::streams::IBuffer) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn send_control_out_transfer_async(&self, setupPacket: &UsbSetupPacket, buffer: &super::super::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SendControlOutTransferAsync)(self as *const _ as *mut _, 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(&self, setupPacket: &UsbSetupPacket) -> Result>> { + }} + #[inline] pub fn send_control_out_transfer_async_no_buffer(&self, setupPacket: &UsbSetupPacket) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SendControlOutTransferAsyncNoBuffer)(self as *const _ as *mut _, 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(&self, setupPacket: &UsbSetupPacket, buffer: &super::super::storage::streams::IBuffer) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn send_control_in_transfer_async(&self, setupPacket: &UsbSetupPacket, buffer: &super::super::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SendControlInTransferAsync)(self as *const _ as *mut _, 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(&self, setupPacket: &UsbSetupPacket) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn send_control_in_transfer_async_no_buffer(&self, setupPacket: &UsbSetupPacket) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SendControlInTransferAsyncNoBuffer)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[inline] pub fn get_default_interface(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DefaultInterface)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_descriptor(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_device_descriptor(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceDescriptor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_configuration(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_configuration(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Configuration)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class UsbDevice: IUsbDevice} impl RtActivatable for UsbDevice {} impl UsbDevice { - #[inline] pub fn get_device_selector(vendorId: u32, productId: u32, winUsbInterfaceClass: Guid) -> Result { unsafe { + #[inline] pub fn get_device_selector(vendorId: u32, productId: u32, winUsbInterfaceClass: Guid) -> Result { >::get_activation_factory().get_device_selector(vendorId, productId, winUsbInterfaceClass) - }} - #[inline] pub fn get_device_selector_guid_only(winUsbInterfaceClass: Guid) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_guid_only(winUsbInterfaceClass: Guid) -> Result { >::get_activation_factory().get_device_selector_guid_only(winUsbInterfaceClass) - }} - #[inline] pub fn get_device_selector_vid_pid_only(vendorId: u32, productId: u32) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_vid_pid_only(vendorId: u32, productId: u32) -> Result { >::get_activation_factory().get_device_selector_vid_pid_only(vendorId, productId) - }} - #[inline] pub fn get_device_class_selector(usbClass: &UsbDeviceClass) -> Result { unsafe { + } + #[inline] pub fn get_device_class_selector(usbClass: &UsbDeviceClass) -> Result { >::get_activation_factory().get_device_class_selector(usbClass) - }} - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} + } } DEFINE_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]) [CLSID_UsbDevice]); 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(&self, out: *mut u8) -> HRESULT, fn put_ClassCode(&self, value: u8) -> HRESULT, - fn get_SubclassCode(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_SubclassCode(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_ProtocolCode(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_ProtocolCode(&self, value: *mut super::super::foundation::IReference) -> HRESULT + fn get_SubclassCode(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_SubclassCode(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_ProtocolCode(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_ProtocolCode(&self, value: *mut foundation::IReference) -> HRESULT }} impl IUsbDeviceClass { - #[inline] pub unsafe fn get_class_code(&self) -> Result { + #[inline] pub fn get_class_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ClassCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_class_code(&self, value: u8) -> Result<()> { + }} + #[inline] pub fn set_class_code(&self, value: u8) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ClassCode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_subclass_code(&self) -> Result>> { + }} + #[inline] pub fn get_subclass_code(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SubclassCode)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_subclass_code(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_subclass_code(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SubclassCode)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_protocol_code(&self) -> Result>> { + }} + #[inline] pub fn get_protocol_code(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProtocolCode)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_protocol_code(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_protocol_code(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ProtocolCode)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class UsbDeviceClass: IUsbDeviceClass} impl RtActivatable for UsbDeviceClass {} @@ -26245,33 +26245,33 @@ RT_INTERFACE!{interface IUsbDeviceClasses(IUsbDeviceClassesVtbl): IInspectable(I RT_CLASS!{class UsbDeviceClasses: IUsbDeviceClasses} impl RtActivatable for UsbDeviceClasses {} impl UsbDeviceClasses { - #[inline] pub fn get_cdc_control() -> Result> { unsafe { + #[inline] pub fn get_cdc_control() -> Result>> { >::get_activation_factory().get_cdc_control() - }} - #[inline] pub fn get_physical() -> Result> { unsafe { + } + #[inline] pub fn get_physical() -> Result>> { >::get_activation_factory().get_physical() - }} - #[inline] pub fn get_personal_healthcare() -> Result> { unsafe { + } + #[inline] pub fn get_personal_healthcare() -> Result>> { >::get_activation_factory().get_personal_healthcare() - }} - #[inline] pub fn get_active_sync() -> Result> { unsafe { + } + #[inline] pub fn get_active_sync() -> Result>> { >::get_activation_factory().get_active_sync() - }} - #[inline] pub fn get_palm_sync() -> Result> { unsafe { + } + #[inline] pub fn get_palm_sync() -> Result>> { >::get_activation_factory().get_palm_sync() - }} - #[inline] pub fn get_device_firmware_update() -> Result> { unsafe { + } + #[inline] pub fn get_device_firmware_update() -> Result>> { >::get_activation_factory().get_device_firmware_update() - }} - #[inline] pub fn get_irda() -> Result> { unsafe { + } + #[inline] pub fn get_irda() -> Result>> { >::get_activation_factory().get_irda() - }} - #[inline] pub fn get_measurement() -> Result> { unsafe { + } + #[inline] pub fn get_measurement() -> Result>> { >::get_activation_factory().get_measurement() - }} - #[inline] pub fn get_vendor_specific() -> Result> { unsafe { + } + #[inline] pub fn get_vendor_specific() -> Result>> { >::get_activation_factory().get_vendor_specific() - }} + } } DEFINE_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]) [CLSID_UsbDeviceClasses]); DEFINE_IID!(IID_IUsbDeviceClassesStatics, 2987066663, 50560, 17817, 161, 101, 152, 27, 79, 208, 50, 48); @@ -26287,51 +26287,51 @@ RT_INTERFACE!{static interface IUsbDeviceClassesStatics(IUsbDeviceClassesStatics fn get_VendorSpecific(&self, out: *mut *mut UsbDeviceClass) -> HRESULT }} impl IUsbDeviceClassesStatics { - #[inline] pub unsafe fn get_cdc_control(&self) -> Result> { + #[inline] pub fn get_cdc_control(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CdcControl)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_physical(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_physical(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Physical)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_personal_healthcare(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_personal_healthcare(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PersonalHealthcare)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_active_sync(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_active_sync(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ActiveSync)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_palm_sync(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_palm_sync(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PalmSync)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_firmware_update(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_device_firmware_update(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceFirmwareUpdate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_irda(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_irda(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Irda)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_measurement(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_measurement(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Measurement)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_vendor_specific(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_vendor_specific(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VendorSpecific)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IUsbDeviceDescriptor, 524866038, 47767, 17186, 185, 44, 181, 177, 137, 33, 101, 136); RT_INTERFACE!{interface IUsbDeviceDescriptor(IUsbDeviceDescriptorVtbl): IInspectable(IInspectableVtbl) [IID_IUsbDeviceDescriptor] { @@ -26343,36 +26343,36 @@ RT_INTERFACE!{interface IUsbDeviceDescriptor(IUsbDeviceDescriptorVtbl): IInspect fn get_NumberOfConfigurations(&self, out: *mut u8) -> HRESULT }} impl IUsbDeviceDescriptor { - #[inline] pub unsafe fn get_bcd_usb(&self) -> Result { + #[inline] pub fn get_bcd_usb(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BcdUsb)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_packet_size0(&self) -> Result { + }} + #[inline] pub fn get_max_packet_size0(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxPacketSize0)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_vendor_id(&self) -> Result { + }} + #[inline] pub fn get_vendor_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VendorId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_product_id(&self) -> Result { + }} + #[inline] pub fn get_product_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProductId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_bcd_device_revision(&self) -> Result { + }} + #[inline] pub fn get_bcd_device_revision(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BcdDeviceRevision)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_number_of_configurations(&self) -> Result { + }} + #[inline] pub fn get_number_of_configurations(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NumberOfConfigurations)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class UsbDeviceDescriptor: IUsbDeviceDescriptor} DEFINE_IID!(IID_IUsbDeviceStatics, 107709858, 2487, 17478, 133, 2, 111, 230, 220, 170, 115, 9); @@ -26381,34 +26381,34 @@ RT_INTERFACE!{static interface IUsbDeviceStatics(IUsbDeviceStaticsVtbl): IInspec fn GetDeviceSelectorGuidOnly(&self, winUsbInterfaceClass: Guid, out: *mut HSTRING) -> HRESULT, fn GetDeviceSelectorVidPidOnly(&self, vendorId: u32, productId: u32, out: *mut HSTRING) -> HRESULT, fn GetDeviceClassSelector(&self, usbClass: *mut UsbDeviceClass, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IUsbDeviceStatics { - #[inline] pub unsafe fn get_device_selector(&self, vendorId: u32, productId: u32, winUsbInterfaceClass: Guid) -> Result { + #[inline] pub fn get_device_selector(&self, vendorId: u32, productId: u32, winUsbInterfaceClass: Guid) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, 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(&self, winUsbInterfaceClass: Guid) -> Result { + }} + #[inline] pub fn get_device_selector_guid_only(&self, winUsbInterfaceClass: Guid) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorGuidOnly)(self as *const _ as *mut _, winUsbInterfaceClass, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector_vid_pid_only(&self, vendorId: u32, productId: u32) -> Result { + }} + #[inline] pub fn get_device_selector_vid_pid_only(&self, vendorId: u32, productId: u32) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorVidPidOnly)(self as *const _ as *mut _, vendorId, productId, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_class_selector(&self, usbClass: &UsbDeviceClass) -> Result { + }} + #[inline] pub fn get_device_class_selector(&self, usbClass: &UsbDeviceClass) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceClassSelector)(self as *const _ as *mut _, 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(&self, deviceId: &HStringArg) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IUsbEndpointDescriptor, 1799906009, 36343, 19264, 172, 131, 87, 143, 19, 159, 5, 117); RT_INTERFACE!{interface IUsbEndpointDescriptor(IUsbEndpointDescriptorVtbl): IInspectable(IInspectableVtbl) [IID_IUsbEndpointDescriptor] { @@ -26421,51 +26421,51 @@ RT_INTERFACE!{interface IUsbEndpointDescriptor(IUsbEndpointDescriptorVtbl): IIns fn get_AsInterruptOutEndpointDescriptor(&self, out: *mut *mut UsbInterruptOutEndpointDescriptor) -> HRESULT }} impl IUsbEndpointDescriptor { - #[inline] pub unsafe fn get_endpoint_number(&self) -> Result { + #[inline] pub fn get_endpoint_number(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EndpointNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_direction(&self) -> Result { + }} + #[inline] pub fn get_direction(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Direction)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_endpoint_type(&self) -> Result { + }} + #[inline] pub fn get_endpoint_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EndpointType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_as_bulk_in_endpoint_descriptor(&self) -> Result> { + }} + #[inline] pub fn get_as_bulk_in_endpoint_descriptor(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AsBulkInEndpointDescriptor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_as_interrupt_in_endpoint_descriptor(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_as_interrupt_in_endpoint_descriptor(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AsInterruptInEndpointDescriptor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_as_bulk_out_endpoint_descriptor(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_as_bulk_out_endpoint_descriptor(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AsBulkOutEndpointDescriptor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_as_interrupt_out_endpoint_descriptor(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_as_interrupt_out_endpoint_descriptor(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AsInterruptOutEndpointDescriptor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class UsbEndpointDescriptor: IUsbEndpointDescriptor} impl RtActivatable for UsbEndpointDescriptor {} impl UsbEndpointDescriptor { - #[inline] pub fn try_parse(descriptor: &UsbDescriptor) -> Result<(ComPtr, bool)> { unsafe { + #[inline] pub fn try_parse(descriptor: &UsbDescriptor) -> Result<(Option>, bool)> { >::get_activation_factory().try_parse(descriptor) - }} - #[inline] pub fn parse(descriptor: &UsbDescriptor) -> Result> { unsafe { + } + #[inline] pub fn parse(descriptor: &UsbDescriptor) -> Result>> { >::get_activation_factory().parse(descriptor) - }} + } } DEFINE_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]) [CLSID_UsbEndpointDescriptor]); DEFINE_IID!(IID_IUsbEndpointDescriptorStatics, 3364925953, 39530, 18782, 168, 44, 41, 91, 158, 112, 129, 6); @@ -26474,66 +26474,66 @@ RT_INTERFACE!{static interface IUsbEndpointDescriptorStatics(IUsbEndpointDescrip fn Parse(&self, descriptor: *mut UsbDescriptor, out: *mut *mut UsbEndpointDescriptor) -> HRESULT }} impl IUsbEndpointDescriptorStatics { - #[inline] pub unsafe fn try_parse(&self, descriptor: &UsbDescriptor) -> Result<(ComPtr, bool)> { + #[inline] pub fn try_parse(&self, descriptor: &UsbDescriptor) -> Result<(Option>, bool)> { unsafe { let mut parsed = null_mut(); let mut out = zeroed(); let hr = ((*self.lpVtbl).TryParse)(self as *const _ as *mut _, 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(&self, descriptor: &UsbDescriptor) -> Result> { + if hr == S_OK { Ok((ComPtr::wrap_optional(parsed), out)) } else { err(hr) } + }} + #[inline] pub fn parse(&self, descriptor: &UsbDescriptor) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Parse)(self as *const _ as *mut _, descriptor as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum UsbEndpointType: i32 { Control (UsbEndpointType_Control) = 0, Isochronous (UsbEndpointType_Isochronous) = 1, Bulk (UsbEndpointType_Bulk) = 2, Interrupt (UsbEndpointType_Interrupt) = 3, }} 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_InterruptInPipes(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_BulkOutPipes(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_InterruptOutPipes(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_InterfaceSettings(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_BulkInPipes(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_InterruptInPipes(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_BulkOutPipes(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_InterruptOutPipes(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_InterfaceSettings(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_InterfaceNumber(&self, out: *mut u8) -> HRESULT, - fn get_Descriptors(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_Descriptors(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IUsbInterface { - #[inline] pub unsafe fn get_bulk_in_pipes(&self) -> Result>> { + #[inline] pub fn get_bulk_in_pipes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BulkInPipes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_interrupt_in_pipes(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_interrupt_in_pipes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InterruptInPipes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_bulk_out_pipes(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_bulk_out_pipes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BulkOutPipes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_interrupt_out_pipes(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_interrupt_out_pipes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InterruptOutPipes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_interface_settings(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_interface_settings(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InterfaceSettings)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_interface_number(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_interface_number(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InterfaceNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_descriptors(&self) -> Result>> { + }} + #[inline] pub fn get_descriptors(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Descriptors)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class UsbInterface: IUsbInterface} DEFINE_IID!(IID_IUsbInterfaceDescriptor, 429289671, 47086, 20368, 140, 213, 148, 162, 226, 87, 89, 138); @@ -26545,41 +26545,41 @@ RT_INTERFACE!{interface IUsbInterfaceDescriptor(IUsbInterfaceDescriptorVtbl): II fn get_InterfaceNumber(&self, out: *mut u8) -> HRESULT }} impl IUsbInterfaceDescriptor { - #[inline] pub unsafe fn get_class_code(&self) -> Result { + #[inline] pub fn get_class_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ClassCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_subclass_code(&self) -> Result { + }} + #[inline] pub fn get_subclass_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SubclassCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_protocol_code(&self) -> Result { + }} + #[inline] pub fn get_protocol_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProtocolCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_alternate_setting_number(&self) -> Result { + }} + #[inline] pub fn get_alternate_setting_number(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AlternateSettingNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_interface_number(&self) -> Result { + }} + #[inline] pub fn get_interface_number(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InterfaceNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class UsbInterfaceDescriptor: IUsbInterfaceDescriptor} impl RtActivatable for UsbInterfaceDescriptor {} impl UsbInterfaceDescriptor { - #[inline] pub fn try_parse(descriptor: &UsbDescriptor) -> Result<(ComPtr, bool)> { unsafe { + #[inline] pub fn try_parse(descriptor: &UsbDescriptor) -> Result<(Option>, bool)> { >::get_activation_factory().try_parse(descriptor) - }} - #[inline] pub fn parse(descriptor: &UsbDescriptor) -> Result> { unsafe { + } + #[inline] pub fn parse(descriptor: &UsbDescriptor) -> Result>> { >::get_activation_factory().parse(descriptor) - }} + } } DEFINE_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]) [CLSID_UsbInterfaceDescriptor]); DEFINE_IID!(IID_IUsbInterfaceDescriptorStatics, 3813318645, 30678, 18614, 176, 190, 22, 198, 66, 35, 22, 254); @@ -26588,99 +26588,99 @@ RT_INTERFACE!{static interface IUsbInterfaceDescriptorStatics(IUsbInterfaceDescr fn Parse(&self, descriptor: *mut UsbDescriptor, out: *mut *mut UsbInterfaceDescriptor) -> HRESULT }} impl IUsbInterfaceDescriptorStatics { - #[inline] pub unsafe fn try_parse(&self, descriptor: &UsbDescriptor) -> Result<(ComPtr, bool)> { + #[inline] pub fn try_parse(&self, descriptor: &UsbDescriptor) -> Result<(Option>, bool)> { unsafe { let mut parsed = null_mut(); let mut out = zeroed(); let hr = ((*self.lpVtbl).TryParse)(self as *const _ as *mut _, 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(&self, descriptor: &UsbDescriptor) -> Result> { + if hr == S_OK { Ok((ComPtr::wrap_optional(parsed), out)) } else { err(hr) } + }} + #[inline] pub fn parse(&self, descriptor: &UsbDescriptor) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Parse)(self as *const _ as *mut _, descriptor as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_InterruptInEndpoints(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_BulkOutEndpoints(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_InterruptOutEndpoints(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_BulkInEndpoints(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_InterruptInEndpoints(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_BulkOutEndpoints(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_InterruptOutEndpoints(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_Selected(&self, out: *mut bool) -> HRESULT, - fn SelectSettingAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn SelectSettingAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn get_InterfaceDescriptor(&self, out: *mut *mut UsbInterfaceDescriptor) -> HRESULT, - fn get_Descriptors(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_Descriptors(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IUsbInterfaceSetting { - #[inline] pub unsafe fn get_bulk_in_endpoints(&self) -> Result>> { + #[inline] pub fn get_bulk_in_endpoints(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BulkInEndpoints)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_interrupt_in_endpoints(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_interrupt_in_endpoints(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InterruptInEndpoints)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_bulk_out_endpoints(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_bulk_out_endpoints(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BulkOutEndpoints)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_interrupt_out_endpoints(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_interrupt_out_endpoints(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InterruptOutEndpoints)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_selected(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_selected(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Selected)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn select_setting_async(&self) -> Result> { + }} + #[inline] pub fn select_setting_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SelectSettingAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_interface_descriptor(&self) -> Result> { + }} + #[inline] pub fn get_interface_descriptor(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InterfaceDescriptor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_descriptors(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_descriptors(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Descriptors)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class UsbInterfaceSetting: IUsbInterfaceSetting} 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(&self, out: *mut u32) -> HRESULT, fn get_EndpointNumber(&self, out: *mut u8) -> HRESULT, - fn get_Interval(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_Interval(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn get_Pipe(&self, out: *mut *mut UsbInterruptInPipe) -> HRESULT }} impl IUsbInterruptInEndpointDescriptor { - #[inline] pub unsafe fn get_max_packet_size(&self) -> Result { + #[inline] pub fn get_max_packet_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxPacketSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_endpoint_number(&self) -> Result { + }} + #[inline] pub fn get_endpoint_number(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EndpointNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_interval(&self) -> Result { + }} + #[inline] pub fn get_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Interval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pipe(&self) -> Result> { + }} + #[inline] pub fn get_pipe(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Pipe)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class UsbInterruptInEndpointDescriptor: IUsbInterruptInEndpointDescriptor} DEFINE_IID!(IID_IUsbInterruptInEventArgs, 3081781394, 5144, 18742, 130, 9, 41, 156, 245, 96, 85, 131); @@ -26688,105 +26688,105 @@ RT_INTERFACE!{interface IUsbInterruptInEventArgs(IUsbInterruptInEventArgsVtbl): #[cfg(feature="windows-storage")] fn get_InterruptData(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT }} impl IUsbInterruptInEventArgs { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_interrupt_data(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_interrupt_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InterruptData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class UsbInterruptInEventArgs: IUsbInterruptInEventArgs} 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(&self, out: *mut *mut UsbInterruptInEndpointDescriptor) -> HRESULT, - fn ClearStallAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn add_DataReceived(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DataReceived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn ClearStallAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn add_DataReceived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DataReceived(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IUsbInterruptInPipe { - #[inline] pub unsafe fn get_endpoint_descriptor(&self) -> Result> { + #[inline] pub fn get_endpoint_descriptor(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EndpointDescriptor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn clear_stall_async(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn clear_stall_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ClearStallAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_data_received(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_data_received(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DataReceived)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_data_received(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_data_received(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DataReceived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class UsbInterruptInPipe: IUsbInterruptInPipe} 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(&self, out: *mut u32) -> HRESULT, fn get_EndpointNumber(&self, out: *mut u8) -> HRESULT, - fn get_Interval(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_Interval(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn get_Pipe(&self, out: *mut *mut UsbInterruptOutPipe) -> HRESULT }} impl IUsbInterruptOutEndpointDescriptor { - #[inline] pub unsafe fn get_max_packet_size(&self) -> Result { + #[inline] pub fn get_max_packet_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxPacketSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_endpoint_number(&self) -> Result { + }} + #[inline] pub fn get_endpoint_number(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EndpointNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_interval(&self) -> Result { + }} + #[inline] pub fn get_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Interval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pipe(&self) -> Result> { + }} + #[inline] pub fn get_pipe(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Pipe)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class UsbInterruptOutEndpointDescriptor: IUsbInterruptOutEndpointDescriptor} 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(&self, out: *mut *mut UsbInterruptOutEndpointDescriptor) -> HRESULT, - fn ClearStallAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ClearStallAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn put_WriteOptions(&self, value: UsbWriteOptions) -> HRESULT, fn get_WriteOptions(&self, out: *mut UsbWriteOptions) -> HRESULT, #[cfg(feature="windows-storage")] fn get_OutputStream(&self, out: *mut *mut super::super::storage::streams::IOutputStream) -> HRESULT }} impl IUsbInterruptOutPipe { - #[inline] pub unsafe fn get_endpoint_descriptor(&self) -> Result> { + #[inline] pub fn get_endpoint_descriptor(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EndpointDescriptor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn clear_stall_async(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn clear_stall_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ClearStallAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_write_options(&self, value: UsbWriteOptions) -> Result<()> { + }} + #[inline] pub fn set_write_options(&self, value: UsbWriteOptions) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_WriteOptions)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_write_options(&self) -> Result { + }} + #[inline] pub fn get_write_options(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_WriteOptions)(self 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(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_output_stream(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OutputStream)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class UsbInterruptOutPipe: IUsbInterruptOutPipe} RT_ENUM! { enum UsbReadOptions: u32 { @@ -26806,59 +26806,59 @@ RT_INTERFACE!{interface IUsbSetupPacket(IUsbSetupPacketVtbl): IInspectable(IInsp fn put_Length(&self, value: u32) -> HRESULT }} impl IUsbSetupPacket { - #[inline] pub unsafe fn get_request_type(&self) -> Result> { + #[inline] pub fn get_request_type(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RequestType)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_request_type(&self, value: &UsbControlRequestType) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_request_type(&self, value: &UsbControlRequestType) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RequestType)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_request(&self) -> Result { + }} + #[inline] pub fn get_request(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_request(&self, value: u8) -> Result<()> { + }} + #[inline] pub fn set_request(&self, value: u8) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Request)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result { + }} + #[inline] pub fn get_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_value(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_value(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Value)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_index(&self) -> Result { + }} + #[inline] pub fn get_index(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Index)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_index(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_index(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Index)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_length(&self) -> Result { + }} + #[inline] pub fn get_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Length)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_length(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_length(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Length)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class UsbSetupPacket: IUsbSetupPacket} impl RtActivatable for UsbSetupPacket {} impl RtActivatable for UsbSetupPacket {} impl UsbSetupPacket { - #[cfg(feature="windows-storage")] #[inline] pub fn create_with_eight_byte_buffer(eightByteBuffer: &super::super::storage::streams::IBuffer) -> Result> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn create_with_eight_byte_buffer(eightByteBuffer: &super::super::storage::streams::IBuffer) -> Result> { >::get_activation_factory().create_with_eight_byte_buffer(eightByteBuffer) - }} + } } DEFINE_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]) [CLSID_UsbSetupPacket]); DEFINE_IID!(IID_IUsbSetupPacketFactory, 3374677328, 6958, 19009, 162, 167, 51, 143, 12, 239, 60, 20); @@ -26866,11 +26866,11 @@ RT_INTERFACE!{static interface IUsbSetupPacketFactory(IUsbSetupPacketFactoryVtbl #[cfg(feature="windows-storage")] fn CreateWithEightByteBuffer(&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(&self, eightByteBuffer: &super::super::storage::streams::IBuffer) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn create_with_eight_byte_buffer(&self, eightByteBuffer: &super::super::storage::streams::IBuffer) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithEightByteBuffer)(self as *const _ as *mut _, eightByteBuffer as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum UsbTransferDirection: i32 { Out (UsbTransferDirection_Out) = 0, In (UsbTransferDirection_In) = 1, @@ -26888,128 +26888,128 @@ DEFINE_IID!(IID_IWiFiAdapter, 2797921315, 15733, 17316, 185, 222, 17, 226, 107, RT_INTERFACE!{interface IWiFiAdapter(IWiFiAdapterVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiAdapter] { #[cfg(not(feature="windows-networking"))] fn __Dummy0(&self) -> (), #[cfg(feature="windows-networking")] fn get_NetworkAdapter(&self, out: *mut *mut super::super::networking::connectivity::NetworkAdapter) -> HRESULT, - fn ScanAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ScanAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn get_NetworkReport(&self, out: *mut *mut WiFiNetworkReport) -> HRESULT, - fn add_AvailableNetworksChanged(&self, args: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AvailableNetworksChanged(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn ConnectAsync(&self, availableNetwork: *mut WiFiAvailableNetwork, reconnectionKind: WiFiReconnectionKind, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_AvailableNetworksChanged(&self, args: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AvailableNetworksChanged(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT, + fn ConnectAsync(&self, availableNetwork: *mut WiFiAvailableNetwork, reconnectionKind: WiFiReconnectionKind, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-security"))] fn __Dummy6(&self) -> (), - #[cfg(feature="windows-security")] fn ConnectWithPasswordCredentialAsync(&self, availableNetwork: *mut WiFiAvailableNetwork, reconnectionKind: WiFiReconnectionKind, passwordCredential: *mut super::super::security::credentials::PasswordCredential, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-security")] fn ConnectWithPasswordCredentialAsync(&self, availableNetwork: *mut WiFiAvailableNetwork, reconnectionKind: WiFiReconnectionKind, passwordCredential: *mut super::super::security::credentials::PasswordCredential, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-security"))] fn __Dummy7(&self) -> (), - #[cfg(feature="windows-security")] fn ConnectWithPasswordCredentialAndSsidAsync(&self, availableNetwork: *mut WiFiAvailableNetwork, reconnectionKind: WiFiReconnectionKind, passwordCredential: *mut super::super::security::credentials::PasswordCredential, ssid: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-security")] fn ConnectWithPasswordCredentialAndSsidAsync(&self, availableNetwork: *mut WiFiAvailableNetwork, reconnectionKind: WiFiReconnectionKind, passwordCredential: *mut super::super::security::credentials::PasswordCredential, ssid: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn Disconnect(&self) -> HRESULT }} impl IWiFiAdapter { - #[cfg(feature="windows-networking")] #[inline] pub unsafe fn get_network_adapter(&self) -> Result> { + #[cfg(feature="windows-networking")] #[inline] pub fn get_network_adapter(&self) -> Result>> { unsafe { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_NetworkAdapter)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn scan_async(&self) -> Result> { + let hr = ((*self.lpVtbl).get_NetworkAdapter)(self as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn scan_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ScanAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_network_report(&self) -> Result> { + }} + #[inline] pub fn get_network_report(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NetworkReport)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_available_networks_changed(&self, args: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_available_networks_changed(&self, args: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AvailableNetworksChanged)(self as *const _ as *mut _, args as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_available_networks_changed(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_available_networks_changed(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AvailableNetworksChanged)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn connect_async(&self, availableNetwork: &WiFiAvailableNetwork, reconnectionKind: WiFiReconnectionKind) -> Result>> { + }} + #[inline] pub fn connect_async(&self, availableNetwork: &WiFiAvailableNetwork, reconnectionKind: WiFiReconnectionKind) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConnectAsync)(self as *const _ as *mut _, 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(&self, availableNetwork: &WiFiAvailableNetwork, reconnectionKind: WiFiReconnectionKind, passwordCredential: &super::super::security::credentials::PasswordCredential) -> Result>> { + }} + #[cfg(feature="windows-security")] #[inline] pub fn connect_with_password_credential_async(&self, availableNetwork: &WiFiAvailableNetwork, reconnectionKind: WiFiReconnectionKind, passwordCredential: &super::super::security::credentials::PasswordCredential) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConnectWithPasswordCredentialAsync)(self as *const _ as *mut _, 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(&self, availableNetwork: &WiFiAvailableNetwork, reconnectionKind: WiFiReconnectionKind, passwordCredential: &super::super::security::credentials::PasswordCredential, ssid: &HStringArg) -> Result>> { + }} + #[cfg(feature="windows-security")] #[inline] pub fn connect_with_password_credential_and_ssid_async(&self, availableNetwork: &WiFiAvailableNetwork, reconnectionKind: WiFiReconnectionKind, passwordCredential: &super::super::security::credentials::PasswordCredential, ssid: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConnectWithPasswordCredentialAndSsidAsync)(self as *const _ as *mut _, 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(&self) -> Result<()> { + }} + #[inline] pub fn disconnect(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Disconnect)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class WiFiAdapter: IWiFiAdapter} impl RtActivatable for WiFiAdapter {} impl WiFiAdapter { - #[inline] pub fn find_all_adapters_async() -> Result>>> { unsafe { + #[inline] pub fn find_all_adapters_async() -> Result>>> { >::get_activation_factory().find_all_adapters_async() - }} - #[inline] pub fn get_device_selector() -> Result { unsafe { + } + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} - #[inline] pub fn request_access_async() -> Result>> { unsafe { + } + #[inline] pub fn request_access_async() -> Result>> { >::get_activation_factory().request_access_async() - }} + } } DEFINE_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]) [CLSID_WiFiAdapter]); DEFINE_IID!(IID_IWiFiAdapter2, 1539592221, 33252, 17725, 148, 48, 31, 202, 251, 173, 214, 182); RT_INTERFACE!{interface IWiFiAdapter2(IWiFiAdapter2Vtbl): IInspectable(IInspectableVtbl) [IID_IWiFiAdapter2] { - fn GetWpsConfigurationAsync(&self, availableNetwork: *mut WiFiAvailableNetwork, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-security")] fn ConnectWithPasswordCredentialAndSsidAndConnectionMethodAsync(&self, availableNetwork: *mut WiFiAvailableNetwork, reconnectionKind: WiFiReconnectionKind, passwordCredential: *mut super::super::security::credentials::PasswordCredential, ssid: HSTRING, connectionMethod: WiFiConnectionMethod, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetWpsConfigurationAsync(&self, availableNetwork: *mut WiFiAvailableNetwork, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-security")] fn ConnectWithPasswordCredentialAndSsidAndConnectionMethodAsync(&self, availableNetwork: *mut WiFiAvailableNetwork, reconnectionKind: WiFiReconnectionKind, passwordCredential: *mut super::super::security::credentials::PasswordCredential, ssid: HSTRING, connectionMethod: WiFiConnectionMethod, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IWiFiAdapter2 { - #[inline] pub unsafe fn get_wps_configuration_async(&self, availableNetwork: &WiFiAvailableNetwork) -> Result>> { + #[inline] pub fn get_wps_configuration_async(&self, availableNetwork: &WiFiAvailableNetwork) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetWpsConfigurationAsync)(self as *const _ as *mut _, availableNetwork 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_and_connection_method_async(&self, availableNetwork: &WiFiAvailableNetwork, reconnectionKind: WiFiReconnectionKind, passwordCredential: &super::super::security::credentials::PasswordCredential, ssid: &HStringArg, connectionMethod: WiFiConnectionMethod) -> Result>> { + }} + #[cfg(feature="windows-security")] #[inline] pub fn connect_with_password_credential_and_ssid_and_connection_method_async(&self, availableNetwork: &WiFiAvailableNetwork, reconnectionKind: WiFiReconnectionKind, passwordCredential: &super::super::security::credentials::PasswordCredential, ssid: &HStringArg, connectionMethod: WiFiConnectionMethod) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConnectWithPasswordCredentialAndSsidAndConnectionMethodAsync)(self as *const _ as *mut _, availableNetwork as *const _ as *mut _, reconnectionKind, passwordCredential as *const _ as *mut _, ssid.get(), connectionMethod, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn FindAllAdaptersAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, fn GetDeviceSelector(&self, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestAccessAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestAccessAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IWiFiAdapterStatics { - #[inline] pub unsafe fn find_all_adapters_async(&self) -> Result>>> { + #[inline] pub fn find_all_adapters_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllAdaptersAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + }} + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_access_async(&self) -> Result>> { + }} + #[inline] pub fn request_access_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessAsync)(self as *const _ as *mut _, &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(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_Uptime(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn get_Ssid(&self, out: *mut HSTRING) -> HRESULT, fn get_Bssid(&self, out: *mut HSTRING) -> HRESULT, fn get_ChannelCenterFrequencyInKilohertz(&self, out: *mut i32) -> HRESULT, @@ -27019,65 +27019,65 @@ RT_INTERFACE!{interface IWiFiAvailableNetwork(IWiFiAvailableNetworkVtbl): IInspe fn get_PhyKind(&self, out: *mut WiFiPhyKind) -> HRESULT, #[cfg(not(feature="windows-networking"))] fn __Dummy8(&self) -> (), #[cfg(feature="windows-networking")] fn get_SecuritySettings(&self, out: *mut *mut super::super::networking::connectivity::NetworkSecuritySettings) -> HRESULT, - fn get_BeaconInterval(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_BeaconInterval(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn get_IsWiFiDirect(&self, out: *mut bool) -> HRESULT }} impl IWiFiAvailableNetwork { - #[inline] pub unsafe fn get_uptime(&self) -> Result { + #[inline] pub fn get_uptime(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Uptime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ssid(&self) -> Result { + }} + #[inline] pub fn get_ssid(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Ssid)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_bssid(&self) -> Result { + }} + #[inline] pub fn get_bssid(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Bssid)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_channel_center_frequency_in_kilohertz(&self) -> Result { + }} + #[inline] pub fn get_channel_center_frequency_in_kilohertz(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ChannelCenterFrequencyInKilohertz)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_network_rssi_in_decibel_milliwatts(&self) -> Result { + }} + #[inline] pub fn get_network_rssi_in_decibel_milliwatts(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NetworkRssiInDecibelMilliwatts)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_signal_bars(&self) -> Result { + }} + #[inline] pub fn get_signal_bars(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SignalBars)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_network_kind(&self) -> Result { + }} + #[inline] pub fn get_network_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NetworkKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_phy_kind(&self) -> Result { + }} + #[inline] pub fn get_phy_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PhyKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-networking")] #[inline] pub unsafe fn get_security_settings(&self) -> Result> { + }} + #[cfg(feature="windows-networking")] #[inline] pub fn get_security_settings(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SecuritySettings)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_beacon_interval(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_beacon_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BeaconInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_wi_fi_direct(&self) -> Result { + }} + #[inline] pub fn get_is_wi_fi_direct(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsWiFiDirect)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class WiFiAvailableNetwork: IWiFiAvailableNetwork} RT_ENUM! { enum WiFiConnectionMethod: i32 { @@ -27088,11 +27088,11 @@ RT_INTERFACE!{interface IWiFiConnectionResult(IWiFiConnectionResultVtbl): IInspe fn get_ConnectionStatus(&self, out: *mut WiFiConnectionStatus) -> HRESULT }} impl IWiFiConnectionResult { - #[inline] pub unsafe fn get_connection_status(&self) -> Result { + #[inline] pub fn get_connection_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ConnectionStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class WiFiConnectionResult: IWiFiConnectionResult} RT_ENUM! { enum WiFiConnectionStatus: i32 { @@ -27103,20 +27103,20 @@ RT_ENUM! { enum WiFiNetworkKind: i32 { }} 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(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_AvailableNetworks(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT, + fn get_AvailableNetworks(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IWiFiNetworkReport { - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_available_networks(&self) -> Result>> { + }} + #[inline] pub fn get_available_networks(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AvailableNetworks)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class WiFiNetworkReport: IWiFiNetworkReport} RT_ENUM! { enum WiFiPhyKind: i32 { @@ -27128,19 +27128,19 @@ RT_ENUM! { enum WiFiReconnectionKind: i32 { DEFINE_IID!(IID_IWiFiWpsConfigurationResult, 1739888753, 6126, 17105, 177, 79, 90, 17, 241, 34, 111, 181); RT_INTERFACE!{interface IWiFiWpsConfigurationResult(IWiFiWpsConfigurationResultVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiWpsConfigurationResult] { fn get_Status(&self, out: *mut WiFiWpsConfigurationStatus) -> HRESULT, - fn get_SupportedWpsKinds(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_SupportedWpsKinds(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IWiFiWpsConfigurationResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_wps_kinds(&self) -> Result>> { + }} + #[inline] pub fn get_supported_wps_kinds(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedWpsKinds)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class WiFiWpsConfigurationResult: IWiFiWpsConfigurationResult} RT_ENUM! { enum WiFiWpsConfigurationStatus: i32 { @@ -27154,8 +27154,8 @@ pub mod wifidirect { // Windows.Devices.WiFiDirect use ::prelude::*; 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn put_InformationElements(&self, value: *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_InformationElements(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn put_InformationElements(&self, value: *mut foundation::collections::IVector) -> HRESULT, fn get_ListenStateDiscoverability(&self, out: *mut WiFiDirectAdvertisementListenStateDiscoverability) -> HRESULT, fn put_ListenStateDiscoverability(&self, value: WiFiDirectAdvertisementListenStateDiscoverability) -> HRESULT, fn get_IsAutonomousGroupOwnerEnabled(&self, out: *mut bool) -> HRESULT, @@ -27163,50 +27163,50 @@ RT_INTERFACE!{interface IWiFiDirectAdvertisement(IWiFiDirectAdvertisementVtbl): fn get_LegacySettings(&self, out: *mut *mut WiFiDirectLegacySettings) -> HRESULT }} impl IWiFiDirectAdvertisement { - #[inline] pub unsafe fn get_information_elements(&self) -> Result>> { + #[inline] pub fn get_information_elements(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InformationElements)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_information_elements(&self, value: &super::super::foundation::collections::IVector) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_information_elements(&self, value: &foundation::collections::IVector) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InformationElements)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_listen_state_discoverability(&self) -> Result { + }} + #[inline] pub fn get_listen_state_discoverability(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ListenStateDiscoverability)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_listen_state_discoverability(&self, value: WiFiDirectAdvertisementListenStateDiscoverability) -> Result<()> { + }} + #[inline] pub fn set_listen_state_discoverability(&self, value: WiFiDirectAdvertisementListenStateDiscoverability) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ListenStateDiscoverability)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_autonomous_group_owner_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_autonomous_group_owner_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsAutonomousGroupOwnerEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_autonomous_group_owner_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_autonomous_group_owner_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsAutonomousGroupOwnerEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_legacy_settings(&self) -> Result> { + }} + #[inline] pub fn get_legacy_settings(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LegacySettings)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class WiFiDirectAdvertisement: IWiFiDirectAdvertisement} 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_SupportedConfigurationMethods(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IWiFiDirectAdvertisement2 { - #[inline] pub unsafe fn get_supported_configuration_methods(&self) -> Result>> { + #[inline] pub fn get_supported_configuration_methods(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedConfigurationMethods)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum WiFiDirectAdvertisementListenStateDiscoverability: i32 { None (WiFiDirectAdvertisementListenStateDiscoverability_None) = 0, Normal (WiFiDirectAdvertisementListenStateDiscoverability_Normal) = 1, Intensive (WiFiDirectAdvertisementListenStateDiscoverability_Intensive) = 2, @@ -27215,39 +27215,39 @@ DEFINE_IID!(IID_IWiFiDirectAdvertisementPublisher, 3009031450, 39711, 17881, 146 RT_INTERFACE!{interface IWiFiDirectAdvertisementPublisher(IWiFiDirectAdvertisementPublisherVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectAdvertisementPublisher] { fn get_Advertisement(&self, out: *mut *mut WiFiDirectAdvertisement) -> HRESULT, fn get_Status(&self, out: *mut WiFiDirectAdvertisementPublisherStatus) -> HRESULT, - fn add_StatusChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StatusChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_StatusChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StatusChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn Start(&self) -> HRESULT, fn Stop(&self) -> HRESULT }} impl IWiFiDirectAdvertisementPublisher { - #[inline] pub unsafe fn get_advertisement(&self) -> Result> { + #[inline] pub fn get_advertisement(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Advertisement)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_status_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_status_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StatusChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_status_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_status_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StatusChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class WiFiDirectAdvertisementPublisher: IWiFiDirectAdvertisementPublisher} impl RtActivatable for WiFiDirectAdvertisementPublisher {} @@ -27261,16 +27261,16 @@ RT_INTERFACE!{interface IWiFiDirectAdvertisementPublisherStatusChangedEventArgs( fn get_Error(&self, out: *mut WiFiDirectError) -> HRESULT }} impl IWiFiDirectAdvertisementPublisherStatusChangedEventArgs { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_error(&self) -> Result { + }} + #[inline] pub fn get_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Error)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class WiFiDirectAdvertisementPublisherStatusChangedEventArgs: IWiFiDirectAdvertisementPublisherStatusChangedEventArgs} RT_ENUM! { enum WiFiDirectConfigurationMethod: i32 { @@ -27278,19 +27278,19 @@ RT_ENUM! { enum WiFiDirectConfigurationMethod: i32 { }} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ConnectionRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ConnectionRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ConnectionRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IWiFiDirectConnectionListener { - #[inline] pub unsafe fn add_connection_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_connection_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ConnectionRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_connection_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_connection_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ConnectionRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class WiFiDirectConnectionListener: IWiFiDirectConnectionListener} impl RtActivatable for WiFiDirectConnectionListener {} @@ -27301,68 +27301,68 @@ RT_INTERFACE!{interface IWiFiDirectConnectionParameters(IWiFiDirectConnectionPar fn put_GroupOwnerIntent(&self, value: i16) -> HRESULT }} impl IWiFiDirectConnectionParameters { - #[inline] pub unsafe fn get_group_owner_intent(&self) -> Result { + #[inline] pub fn get_group_owner_intent(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_GroupOwnerIntent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_group_owner_intent(&self, value: i16) -> Result<()> { + }} + #[inline] pub fn set_group_owner_intent(&self, value: i16) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_GroupOwnerIntent)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class WiFiDirectConnectionParameters: IWiFiDirectConnectionParameters} impl RtActivatable for WiFiDirectConnectionParameters {} impl RtActivatable for WiFiDirectConnectionParameters {} impl WiFiDirectConnectionParameters { - #[inline] pub fn get_device_pairing_kinds(configurationMethod: WiFiDirectConfigurationMethod) -> Result { unsafe { + #[inline] pub fn get_device_pairing_kinds(configurationMethod: WiFiDirectConfigurationMethod) -> Result { >::get_activation_factory().get_device_pairing_kinds(configurationMethod) - }} + } } DEFINE_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]) [CLSID_WiFiDirectConnectionParameters]); 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_PreferenceOrderedConfigurationMethods(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_PreferredPairingProcedure(&self, out: *mut WiFiDirectPairingProcedure) -> HRESULT, fn put_PreferredPairingProcedure(&self, value: WiFiDirectPairingProcedure) -> HRESULT }} impl IWiFiDirectConnectionParameters2 { - #[inline] pub unsafe fn get_preference_ordered_configuration_methods(&self) -> Result>> { + #[inline] pub fn get_preference_ordered_configuration_methods(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PreferenceOrderedConfigurationMethods)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_preferred_pairing_procedure(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_preferred_pairing_procedure(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PreferredPairingProcedure)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_preferred_pairing_procedure(&self, value: WiFiDirectPairingProcedure) -> Result<()> { + }} + #[inline] pub fn set_preferred_pairing_procedure(&self, value: WiFiDirectPairingProcedure) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PreferredPairingProcedure)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, configurationMethod: WiFiDirectConfigurationMethod, out: *mut super::enumeration::DevicePairingKinds) -> HRESULT }} impl IWiFiDirectConnectionParametersStatics { - #[inline] pub unsafe fn get_device_pairing_kinds(&self, configurationMethod: WiFiDirectConfigurationMethod) -> Result { + #[inline] pub fn get_device_pairing_kinds(&self, configurationMethod: WiFiDirectConfigurationMethod) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetDevicePairingKinds)(self as *const _ as *mut _, configurationMethod, &mut out); if hr == S_OK { Ok(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(&self, out: *mut *mut super::enumeration::DeviceInformation) -> HRESULT }} impl IWiFiDirectConnectionRequest { - #[inline] pub unsafe fn get_device_information(&self) -> Result> { + #[inline] pub fn get_device_information(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceInformation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class WiFiDirectConnectionRequest: IWiFiDirectConnectionRequest} DEFINE_IID!(IID_IWiFiDirectConnectionRequestedEventArgs, 4187824318, 54157, 18511, 130, 21, 231, 182, 90, 191, 36, 76); @@ -27370,11 +27370,11 @@ RT_INTERFACE!{interface IWiFiDirectConnectionRequestedEventArgs(IWiFiDirectConne fn GetConnectionRequest(&self, out: *mut *mut WiFiDirectConnectionRequest) -> HRESULT }} impl IWiFiDirectConnectionRequestedEventArgs { - #[inline] pub unsafe fn get_connection_request(&self) -> Result> { + #[inline] pub fn get_connection_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetConnectionRequest)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class WiFiDirectConnectionRequestedEventArgs: IWiFiDirectConnectionRequestedEventArgs} RT_ENUM! { enum WiFiDirectConnectionStatus: i32 { @@ -27384,52 +27384,52 @@ DEFINE_IID!(IID_IWiFiDirectDevice, 1927195304, 29419, 19886, 138, 40, 133, 19, 5 RT_INTERFACE!{interface IWiFiDirectDevice(IWiFiDirectDeviceVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectDevice] { fn get_ConnectionStatus(&self, out: *mut WiFiDirectConnectionStatus) -> HRESULT, fn get_DeviceId(&self, out: *mut HSTRING) -> HRESULT, - fn add_ConnectionStatusChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ConnectionStatusChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - #[cfg(feature="windows-networking")] fn GetConnectionEndpointPairs(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn add_ConnectionStatusChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ConnectionStatusChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + #[cfg(feature="windows-networking")] fn GetConnectionEndpointPairs(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IWiFiDirectDevice { - #[inline] pub unsafe fn get_connection_status(&self) -> Result { + #[inline] pub fn get_connection_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ConnectionStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_id(&self) -> Result { + }} + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_connection_status_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_connection_status_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ConnectionStatusChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_connection_status_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_connection_status_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ConnectionStatusChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-networking")] #[inline] pub unsafe fn get_connection_endpoint_pairs(&self) -> Result>> { + }} + #[cfg(feature="windows-networking")] #[inline] pub fn get_connection_endpoint_pairs(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetConnectionEndpointPairs)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class WiFiDirectDevice: IWiFiDirectDevice} impl RtActivatable for WiFiDirectDevice {} impl RtActivatable for WiFiDirectDevice {} impl WiFiDirectDevice { - #[inline] pub fn get_device_selector() -> Result { unsafe { + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} - #[inline] pub fn get_device_selector2(type_: WiFiDirectDeviceSelectorType) -> Result { unsafe { + } + #[inline] pub fn get_device_selector2(type_: WiFiDirectDeviceSelectorType) -> Result { >::get_activation_factory().get_device_selector(type_) - }} - #[inline] pub fn from_id_async2(deviceId: &HStringArg, connectionParameters: &WiFiDirectConnectionParameters) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async2(deviceId: &HStringArg, connectionParameters: &WiFiDirectConnectionParameters) -> Result>> { >::get_activation_factory().from_id_async(deviceId, connectionParameters) - }} + } } DEFINE_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]) [CLSID_WiFiDirectDevice]); RT_ENUM! { enum WiFiDirectDeviceSelectorType: i32 { @@ -27438,36 +27438,36 @@ RT_ENUM! { enum WiFiDirectDeviceSelectorType: i32 { 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(&self, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IWiFiDirectDeviceStatics { - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, type_: WiFiDirectDeviceSelectorType, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&self, deviceId: HSTRING, connectionParameters: *mut WiFiDirectConnectionParameters, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FromIdAsync(&self, deviceId: HSTRING, connectionParameters: *mut WiFiDirectConnectionParameters, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IWiFiDirectDeviceStatics2 { - #[inline] pub unsafe fn get_device_selector(&self, type_: WiFiDirectDeviceSelectorType) -> Result { + #[inline] pub fn get_device_selector(&self, type_: WiFiDirectDeviceSelectorType) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, type_, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg, connectionParameters: &WiFiDirectConnectionParameters) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg, connectionParameters: &WiFiDirectConnectionParameters) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), connectionParameters as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum WiFiDirectError: i32 { Success (WiFiDirectError_Success) = 0, RadioNotAvailable (WiFiDirectError_RadioNotAvailable) = 1, ResourceInUse (WiFiDirectError_ResourceInUse) = 2, @@ -27482,63 +27482,63 @@ RT_INTERFACE!{interface IWiFiDirectInformationElement(IWiFiDirectInformationElem #[cfg(feature="windows-storage")] fn put_Value(&self, value: *mut super::super::storage::streams::IBuffer) -> HRESULT }} impl IWiFiDirectInformationElement { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_oui(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_oui(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Oui)(self 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_oui(&self, value: &super::super::storage::streams::IBuffer) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_oui(&self, value: &super::super::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Oui)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_oui_type(&self) -> Result { + }} + #[inline] pub fn get_oui_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OuiType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_oui_type(&self, value: u8) -> Result<()> { + }} + #[inline] pub fn set_oui_type(&self, value: u8) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OuiType)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_value(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_value(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self 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_value(&self, value: &super::super::storage::streams::IBuffer) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_value(&self, value: &super::super::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Value)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class WiFiDirectInformationElement: IWiFiDirectInformationElement} impl RtActivatable for WiFiDirectInformationElement {} impl RtActivatable for WiFiDirectInformationElement {} impl WiFiDirectInformationElement { - #[cfg(feature="windows-storage")] #[inline] pub fn create_from_buffer(buffer: &super::super::storage::streams::IBuffer) -> Result>> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_buffer(buffer: &super::super::storage::streams::IBuffer) -> Result>>> { >::get_activation_factory().create_from_buffer(buffer) - }} - #[inline] pub fn create_from_device_information(deviceInformation: &super::enumeration::DeviceInformation) -> Result>> { unsafe { + } + #[inline] pub fn create_from_device_information(deviceInformation: &super::enumeration::DeviceInformation) -> Result>>> { >::get_activation_factory().create_from_device_information(deviceInformation) - }} + } } DEFINE_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]) [CLSID_WiFiDirectInformationElement]); 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(&self) -> (), - #[cfg(feature="windows-storage")] fn CreateFromBuffer(&self, buffer: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn CreateFromDeviceInformation(&self, deviceInformation: *mut super::enumeration::DeviceInformation, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + #[cfg(feature="windows-storage")] fn CreateFromBuffer(&self, buffer: *mut super::super::storage::streams::IBuffer, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn CreateFromDeviceInformation(&self, deviceInformation: *mut super::enumeration::DeviceInformation, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IWiFiDirectInformationElementStatics { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn create_from_buffer(&self, buffer: &super::super::storage::streams::IBuffer) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_buffer(&self, buffer: &super::super::storage::streams::IBuffer) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromBuffer)(self 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 create_from_device_information(&self, deviceInformation: &super::enumeration::DeviceInformation) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_from_device_information(&self, deviceInformation: &super::enumeration::DeviceInformation) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromDeviceInformation)(self as *const _ as *mut _, deviceInformation as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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] { @@ -27550,33 +27550,33 @@ RT_INTERFACE!{interface IWiFiDirectLegacySettings(IWiFiDirectLegacySettingsVtbl) #[cfg(feature="windows-security")] fn put_Passphrase(&self, value: *mut super::super::security::credentials::PasswordCredential) -> HRESULT }} impl IWiFiDirectLegacySettings { - #[inline] pub unsafe fn get_is_enabled(&self) -> Result { + #[inline] pub fn get_is_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_ssid(&self) -> Result { + }} + #[inline] pub fn get_ssid(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Ssid)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_ssid(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_ssid(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Ssid)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-security")] #[inline] pub unsafe fn get_passphrase(&self) -> Result> { + }} + #[cfg(feature="windows-security")] #[inline] pub fn get_passphrase(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Passphrase)(self 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 set_passphrase(&self, value: &super::super::security::credentials::PasswordCredential) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-security")] #[inline] pub fn set_passphrase(&self, value: &super::super::security::credentials::PasswordCredential) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Passphrase)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class WiFiDirectLegacySettings: IWiFiDirectLegacySettings} RT_ENUM! { enum WiFiDirectPairingProcedure: i32 { @@ -27588,7 +27588,7 @@ DEFINE_IID!(IID_IWiFiDirectService, 1353366456, 24433, 17900, 132, 241, 161, 228 RT_INTERFACE!{interface IWiFiDirectService(IWiFiDirectServiceVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectService] { #[cfg(not(feature="windows-storage"))] fn __Dummy0(&self) -> (), #[cfg(feature="windows-storage")] fn get_RemoteServiceInfo(&self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, - fn get_SupportedConfigurationMethods(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedConfigurationMethods(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_PreferGroupOwnerMode(&self, out: *mut bool) -> HRESULT, fn put_PreferGroupOwnerMode(&self, value: bool) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy4(&self) -> (), @@ -27596,83 +27596,83 @@ RT_INTERFACE!{interface IWiFiDirectService(IWiFiDirectServiceVtbl): IInspectable #[cfg(not(feature="windows-storage"))] fn __Dummy5(&self) -> (), #[cfg(feature="windows-storage")] fn put_SessionInfo(&self, value: *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, fn get_ServiceError(&self, out: *mut WiFiDirectServiceError) -> HRESULT, - fn add_SessionDeferred(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SessionDeferred(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn GetProvisioningInfoAsync(&self, selectedConfigurationMethod: WiFiDirectServiceConfigurationMethod, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn ConnectAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn ConnectAsyncWithPin(&self, pin: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn add_SessionDeferred(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SessionDeferred(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn GetProvisioningInfoAsync(&self, selectedConfigurationMethod: WiFiDirectServiceConfigurationMethod, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ConnectAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ConnectAsyncWithPin(&self, pin: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IWiFiDirectService { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_remote_service_info(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_remote_service_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteServiceInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_configuration_methods(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_supported_configuration_methods(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedConfigurationMethods)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_prefer_group_owner_mode(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_prefer_group_owner_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PreferGroupOwnerMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_prefer_group_owner_mode(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_prefer_group_owner_mode(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PreferGroupOwnerMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_session_info(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_session_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SessionInfo)(self 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_session_info(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_session_info(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SessionInfo)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_error(&self) -> Result { + }} + #[inline] pub fn get_service_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ServiceError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_session_deferred(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_session_deferred(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SessionDeferred)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_session_deferred(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_session_deferred(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SessionDeferred)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_provisioning_info_async(&self, selectedConfigurationMethod: WiFiDirectServiceConfigurationMethod) -> Result>> { + }} + #[inline] pub fn get_provisioning_info_async(&self, selectedConfigurationMethod: WiFiDirectServiceConfigurationMethod) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetProvisioningInfoAsync)(self as *const _ as *mut _, selectedConfigurationMethod, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn connect_async(&self) -> Result>> { + }} + #[inline] pub fn connect_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConnectAsync)(self 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(&self, pin: &HStringArg) -> Result>> { + }} + #[inline] pub fn connect_async_with_pin(&self, pin: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConnectAsyncWithPin)(self as *const _ as *mut _, pin.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class WiFiDirectService: IWiFiDirectService} impl RtActivatable for WiFiDirectService {} impl WiFiDirectService { - #[inline] pub fn get_selector(serviceName: &HStringArg) -> Result { unsafe { + #[inline] pub fn get_selector(serviceName: &HStringArg) -> Result { >::get_activation_factory().get_selector(serviceName) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn get_selector_with_filter(serviceName: &HStringArg, serviceInfoFilter: &::rt::gen::windows::storage::streams::IBuffer) -> Result { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn get_selector_with_filter(serviceName: &HStringArg, serviceInfoFilter: &::rt::gen::windows::storage::streams::IBuffer) -> Result { >::get_activation_factory().get_selector_with_filter(serviceName, serviceInfoFilter) - }} - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} + } } DEFINE_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]) [CLSID_WiFiDirectService]); RT_ENUM! { enum WiFiDirectServiceAdvertisementStatus: i32 { @@ -27681,7 +27681,7 @@ RT_ENUM! { enum WiFiDirectServiceAdvertisementStatus: i32 { 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(&self, out: *mut HSTRING) -> HRESULT, - fn get_ServiceNamePrefixes(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, + fn get_ServiceNamePrefixes(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy2(&self) -> (), #[cfg(feature="windows-storage")] fn get_ServiceInfo(&self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy3(&self) -> (), @@ -27690,7 +27690,7 @@ RT_INTERFACE!{interface IWiFiDirectServiceAdvertiser(IWiFiDirectServiceAdvertise fn put_AutoAcceptSession(&self, value: bool) -> HRESULT, fn get_PreferGroupOwnerMode(&self, out: *mut bool) -> HRESULT, fn put_PreferGroupOwnerMode(&self, value: bool) -> HRESULT, - fn get_PreferredConfigurationMethods(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, + fn get_PreferredConfigurationMethods(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_ServiceStatus(&self, out: *mut WiFiDirectServiceStatus) -> HRESULT, fn put_ServiceStatus(&self, value: WiFiDirectServiceStatus) -> HRESULT, fn get_CustomServiceStatusCode(&self, out: *mut u32) -> HRESULT, @@ -27701,149 +27701,149 @@ RT_INTERFACE!{interface IWiFiDirectServiceAdvertiser(IWiFiDirectServiceAdvertise #[cfg(feature="windows-storage")] fn put_DeferredSessionInfo(&self, value: *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, fn get_AdvertisementStatus(&self, out: *mut WiFiDirectServiceAdvertisementStatus) -> HRESULT, fn get_ServiceError(&self, out: *mut WiFiDirectServiceError) -> HRESULT, - fn add_SessionRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SessionRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_AutoAcceptSessionConnected(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AutoAcceptSessionConnected(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_AdvertisementStatusChanged(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AdvertisementStatusChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn ConnectAsync(&self, deviceInfo: *mut super::super::enumeration::DeviceInformation, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn ConnectAsyncWithPin(&self, deviceInfo: *mut super::super::enumeration::DeviceInformation, pin: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn add_SessionRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SessionRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_AutoAcceptSessionConnected(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AutoAcceptSessionConnected(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_AdvertisementStatusChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AdvertisementStatusChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn ConnectAsync(&self, deviceInfo: *mut super::super::enumeration::DeviceInformation, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ConnectAsyncWithPin(&self, deviceInfo: *mut super::super::enumeration::DeviceInformation, pin: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn Start(&self) -> HRESULT, fn Stop(&self) -> HRESULT }} impl IWiFiDirectServiceAdvertiser { - #[inline] pub unsafe fn get_service_name(&self) -> Result { + #[inline] pub fn get_service_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServiceName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_name_prefixes(&self) -> Result>> { + }} + #[inline] pub fn get_service_name_prefixes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServiceNamePrefixes)(self 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(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_service_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServiceInfo)(self 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_service_info(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_service_info(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ServiceInfo)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_auto_accept_session(&self) -> Result { + }} + #[inline] pub fn get_auto_accept_session(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AutoAcceptSession)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_auto_accept_session(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_auto_accept_session(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AutoAcceptSession)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_prefer_group_owner_mode(&self) -> Result { + }} + #[inline] pub fn get_prefer_group_owner_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PreferGroupOwnerMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_prefer_group_owner_mode(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_prefer_group_owner_mode(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PreferGroupOwnerMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_preferred_configuration_methods(&self) -> Result>> { + }} + #[inline] pub fn get_preferred_configuration_methods(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PreferredConfigurationMethods)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_status(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_service_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ServiceStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_service_status(&self, value: WiFiDirectServiceStatus) -> Result<()> { + }} + #[inline] pub fn set_service_status(&self, value: WiFiDirectServiceStatus) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ServiceStatus)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_custom_service_status_code(&self) -> Result { + }} + #[inline] pub fn get_custom_service_status_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CustomServiceStatusCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_custom_service_status_code(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_custom_service_status_code(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CustomServiceStatusCode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_deferred_session_info(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_deferred_session_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeferredSessionInfo)(self 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_deferred_session_info(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_deferred_session_info(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DeferredSessionInfo)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_advertisement_status(&self) -> Result { + }} + #[inline] pub fn get_advertisement_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AdvertisementStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_error(&self) -> Result { + }} + #[inline] pub fn get_service_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ServiceError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_session_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_session_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SessionRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_session_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_session_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SessionRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_auto_accept_session_connected(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_auto_accept_session_connected(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AutoAcceptSessionConnected)(self as *const _ as *mut _, 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(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_auto_accept_session_connected(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AutoAcceptSessionConnected)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_advertisement_status_changed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_advertisement_status_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AdvertisementStatusChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_advertisement_status_changed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_advertisement_status_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AdvertisementStatusChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn connect_async(&self, deviceInfo: &super::super::enumeration::DeviceInformation) -> Result>> { + }} + #[inline] pub fn connect_async(&self, deviceInfo: &super::super::enumeration::DeviceInformation) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConnectAsync)(self as *const _ as *mut _, 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(&self, deviceInfo: &super::super::enumeration::DeviceInformation, pin: &HStringArg) -> Result>> { + }} + #[inline] pub fn connect_async_with_pin(&self, deviceInfo: &super::super::enumeration::DeviceInformation, pin: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConnectAsyncWithPin)(self as *const _ as *mut _, 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(&self) -> Result<()> { + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class WiFiDirectServiceAdvertiser: IWiFiDirectServiceAdvertiser} impl RtActivatable for WiFiDirectServiceAdvertiser {} impl WiFiDirectServiceAdvertiser { - #[inline] pub fn create_wi_fi_direct_service_advertiser(serviceName: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_wi_fi_direct_service_advertiser(serviceName: &HStringArg) -> Result> { >::get_activation_factory().create_wi_fi_direct_service_advertiser(serviceName) - }} + } } DEFINE_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]) [CLSID_WiFiDirectServiceAdvertiser]); DEFINE_IID!(IID_IWiFiDirectServiceAdvertiserFactory, 822520845, 46150, 20243, 159, 154, 138, 233, 37, 254, 186, 43); @@ -27851,11 +27851,11 @@ RT_INTERFACE!{static interface IWiFiDirectServiceAdvertiserFactory(IWiFiDirectSe fn CreateWiFiDirectServiceAdvertiser(&self, serviceName: HSTRING, out: *mut *mut WiFiDirectServiceAdvertiser) -> HRESULT }} impl IWiFiDirectServiceAdvertiserFactory { - #[inline] pub unsafe fn create_wi_fi_direct_service_advertiser(&self, serviceName: &HStringArg) -> Result> { + #[inline] pub fn create_wi_fi_direct_service_advertiser(&self, serviceName: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWiFiDirectServiceAdvertiser)(self as *const _ as *mut _, serviceName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IWiFiDirectServiceAutoAcceptSessionConnectedEventArgs, 3705266206, 33759, 17381, 143, 67, 203, 232, 71, 158, 132, 235); RT_INTERFACE!{interface IWiFiDirectServiceAutoAcceptSessionConnectedEventArgs(IWiFiDirectServiceAutoAcceptSessionConnectedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IWiFiDirectServiceAutoAcceptSessionConnectedEventArgs] { @@ -27863,16 +27863,16 @@ RT_INTERFACE!{interface IWiFiDirectServiceAutoAcceptSessionConnectedEventArgs(IW #[cfg(feature="windows-storage")] fn get_SessionInfo(&self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT }} impl IWiFiDirectServiceAutoAcceptSessionConnectedEventArgs { - #[inline] pub unsafe fn get_session(&self) -> Result> { + #[inline] pub fn get_session(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Session)(self 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_session_info(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_session_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SessionInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class WiFiDirectServiceAutoAcceptSessionConnectedEventArgs: IWiFiDirectServiceAutoAcceptSessionConnectedEventArgs} RT_ENUM! { enum WiFiDirectServiceConfigurationMethod: i32 { @@ -27890,35 +27890,35 @@ RT_INTERFACE!{interface IWiFiDirectServiceProvisioningInfo(IWiFiDirectServicePro fn get_IsGroupFormationNeeded(&self, out: *mut bool) -> HRESULT }} impl IWiFiDirectServiceProvisioningInfo { - #[inline] pub unsafe fn get_selected_configuration_method(&self) -> Result { + #[inline] pub fn get_selected_configuration_method(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SelectedConfigurationMethod)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_group_formation_needed(&self) -> Result { + }} + #[inline] pub fn get_is_group_formation_needed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsGroupFormationNeeded)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class WiFiDirectServiceProvisioningInfo: IWiFiDirectServiceProvisioningInfo} 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(&self) -> (), - #[cfg(feature="windows-networking")] fn get_EndpointPairs(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView<::rt::gen::windows::networking::EndpointPair>) -> HRESULT, + #[cfg(feature="windows-networking")] fn get_EndpointPairs(&self, out: *mut *mut foundation::collections::IVectorView<::rt::gen::windows::networking::EndpointPair>) -> HRESULT, fn get_Protocol(&self, out: *mut WiFiDirectServiceIPProtocol) -> HRESULT }} impl IWiFiDirectServiceRemotePortAddedEventArgs { - #[cfg(feature="windows-networking")] #[inline] pub unsafe fn get_endpoint_pairs(&self) -> Result>> { + #[cfg(feature="windows-networking")] #[inline] pub fn get_endpoint_pairs(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EndpointPairs)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_protocol(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_protocol(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Protocol)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class WiFiDirectServiceRemotePortAddedEventArgs: IWiFiDirectServiceRemotePortAddedEventArgs} DEFINE_IID!(IID_IWiFiDirectServiceSession, 2165580131, 58406, 18379, 134, 64, 225, 179, 88, 139, 242, 111); @@ -27931,85 +27931,85 @@ RT_INTERFACE!{interface IWiFiDirectServiceSession(IWiFiDirectServiceSessionVtbl) fn get_ServiceAddress(&self, out: *mut HSTRING) -> HRESULT, fn get_SessionAddress(&self, out: *mut HSTRING) -> HRESULT, #[cfg(not(feature="windows-networking"))] fn __Dummy7(&self) -> (), - #[cfg(feature="windows-networking")] fn GetConnectionEndpointPairs(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView<::rt::gen::windows::networking::EndpointPair>) -> HRESULT, - fn add_SessionStatusChanged(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SessionStatusChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + #[cfg(feature="windows-networking")] fn GetConnectionEndpointPairs(&self, out: *mut *mut foundation::collections::IVectorView<::rt::gen::windows::networking::EndpointPair>) -> HRESULT, + fn add_SessionStatusChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SessionStatusChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, #[cfg(not(feature="windows-networking"))] fn __Dummy10(&self) -> (), - #[cfg(feature="windows-networking")] fn AddStreamSocketListenerAsync(&self, value: *mut ::rt::gen::windows::networking::sockets::StreamSocketListener, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + #[cfg(feature="windows-networking")] fn AddStreamSocketListenerAsync(&self, value: *mut ::rt::gen::windows::networking::sockets::StreamSocketListener, out: *mut *mut foundation::IAsyncAction) -> HRESULT, #[cfg(not(feature="windows-networking"))] fn __Dummy11(&self) -> (), - #[cfg(feature="windows-networking")] fn AddDatagramSocketAsync(&self, value: *mut ::rt::gen::windows::networking::sockets::DatagramSocket, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn add_RemotePortAdded(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RemotePortAdded(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + #[cfg(feature="windows-networking")] fn AddDatagramSocketAsync(&self, value: *mut ::rt::gen::windows::networking::sockets::DatagramSocket, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn add_RemotePortAdded(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RemotePortAdded(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IWiFiDirectServiceSession { - #[inline] pub unsafe fn get_service_name(&self) -> Result { + #[inline] pub fn get_service_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServiceName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_error_status(&self) -> Result { + }} + #[inline] pub fn get_error_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ErrorStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_session_id(&self) -> Result { + }} + #[inline] pub fn get_session_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SessionId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_advertisement_id(&self) -> Result { + }} + #[inline] pub fn get_advertisement_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AdvertisementId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_address(&self) -> Result { + }} + #[inline] pub fn get_service_address(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServiceAddress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_session_address(&self) -> Result { + }} + #[inline] pub fn get_session_address(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SessionAddress)(self as *const _ as *mut _, &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(&self) -> Result>> { + }} + #[cfg(feature="windows-networking")] #[inline] pub fn get_connection_endpoint_pairs(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetConnectionEndpointPairs)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_session_status_changed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_session_status_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SessionStatusChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_session_status_changed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_session_status_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SessionStatusChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-networking")] #[inline] pub unsafe fn add_stream_socket_listener_async(&self, value: &::rt::gen::windows::networking::sockets::StreamSocketListener) -> Result> { + }} + #[cfg(feature="windows-networking")] #[inline] pub fn add_stream_socket_listener_async(&self, value: &::rt::gen::windows::networking::sockets::StreamSocketListener) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AddStreamSocketListenerAsync)(self as *const _ as *mut _, 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(&self, value: &::rt::gen::windows::networking::sockets::DatagramSocket) -> Result> { + }} + #[cfg(feature="windows-networking")] #[inline] pub fn add_datagram_socket_async(&self, value: &::rt::gen::windows::networking::sockets::DatagramSocket) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AddDatagramSocketAsync)(self as *const _ as *mut _, 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(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_remote_port_added(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RemotePortAdded)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_remote_port_added(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_remote_port_added(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RemotePortAdded)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class WiFiDirectServiceSession: IWiFiDirectServiceSession} DEFINE_IID!(IID_IWiFiDirectServiceSessionDeferredEventArgs, 2382109055, 4609, 20255, 182, 244, 93, 241, 183, 185, 251, 46); @@ -28017,11 +28017,11 @@ RT_INTERFACE!{interface IWiFiDirectServiceSessionDeferredEventArgs(IWiFiDirectSe #[cfg(feature="windows-storage")] fn get_DeferredSessionInfo(&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(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_deferred_session_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeferredSessionInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class WiFiDirectServiceSessionDeferredEventArgs: IWiFiDirectServiceSessionDeferredEventArgs} RT_ENUM! { enum WiFiDirectServiceSessionErrorStatus: i32 { @@ -28034,21 +28034,21 @@ RT_INTERFACE!{interface IWiFiDirectServiceSessionRequest(IWiFiDirectServiceSessi #[cfg(feature="windows-storage")] fn get_SessionInfo(&self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT }} impl IWiFiDirectServiceSessionRequest { - #[inline] pub unsafe fn get_device_information(&self) -> Result> { + #[inline] pub fn get_device_information(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceInformation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_provisioning_info(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_provisioning_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProvisioningInfo)(self 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_session_info(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_session_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SessionInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class WiFiDirectServiceSessionRequest: IWiFiDirectServiceSessionRequest} DEFINE_IID!(IID_IWiFiDirectServiceSessionRequestedEventArgs, 1958595601, 21462, 18841, 180, 248, 108, 142, 204, 23, 113, 231); @@ -28056,11 +28056,11 @@ RT_INTERFACE!{interface IWiFiDirectServiceSessionRequestedEventArgs(IWiFiDirectS fn GetSessionRequest(&self, out: *mut *mut WiFiDirectServiceSessionRequest) -> HRESULT }} impl IWiFiDirectServiceSessionRequestedEventArgs { - #[inline] pub unsafe fn get_session_request(&self) -> Result> { + #[inline] pub fn get_session_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSessionRequest)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class WiFiDirectServiceSessionRequestedEventArgs: IWiFiDirectServiceSessionRequestedEventArgs} RT_ENUM! { enum WiFiDirectServiceSessionStatus: i32 { @@ -28071,24 +28071,24 @@ RT_INTERFACE!{static interface IWiFiDirectServiceStatics(IWiFiDirectServiceStati fn GetSelector(&self, serviceName: HSTRING, out: *mut HSTRING) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy1(&self) -> (), #[cfg(feature="windows-storage")] fn GetSelectorWithFilter(&self, serviceName: HSTRING, serviceInfoFilter: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IWiFiDirectServiceStatics { - #[inline] pub unsafe fn get_selector(&self, serviceName: &HStringArg) -> Result { + #[inline] pub fn get_selector(&self, serviceName: &HStringArg) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSelector)(self as *const _ as *mut _, 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(&self, serviceName: &HStringArg, serviceInfoFilter: &::rt::gen::windows::storage::streams::IBuffer) -> Result { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_selector_with_filter(&self, serviceName: &HStringArg, serviceInfoFilter: &::rt::gen::windows::storage::streams::IBuffer) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSelectorWithFilter)(self as *const _ as *mut _, 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(&self, deviceId: &HStringArg) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum WiFiDirectServiceStatus: i32 { Available (WiFiDirectServiceStatus_Available) = 0, Busy (WiFiDirectServiceStatus_Busy) = 1, Custom (WiFiDirectServiceStatus_Custom) = 2, @@ -28100,12 +28100,12 @@ use ::prelude::*; RT_CLASS!{static class ServiceDevice} impl RtActivatable for ServiceDevice {} impl ServiceDevice { - #[inline] pub fn get_device_selector(serviceType: ServiceDeviceType) -> Result { unsafe { + #[inline] pub fn get_device_selector(serviceType: ServiceDeviceType) -> Result { >::get_activation_factory().get_device_selector(serviceType) - }} - #[inline] pub fn get_device_selector_from_service_id(serviceId: Guid) -> Result { unsafe { + } + #[inline] pub fn get_device_selector_from_service_id(serviceId: Guid) -> Result { >::get_activation_factory().get_device_selector_from_service_id(serviceId) - }} + } } DEFINE_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]) [CLSID_ServiceDevice]); DEFINE_IID!(IID_IServiceDeviceStatics, 2827097313, 22983, 18976, 171, 166, 159, 103, 7, 147, 114, 48); @@ -28114,16 +28114,16 @@ RT_INTERFACE!{static interface IServiceDeviceStatics(IServiceDeviceStaticsVtbl): fn GetDeviceSelectorFromServiceId(&self, serviceId: Guid, out: *mut HSTRING) -> HRESULT }} impl IServiceDeviceStatics { - #[inline] pub unsafe fn get_device_selector(&self, serviceType: ServiceDeviceType) -> Result { + #[inline] pub fn get_device_selector(&self, serviceType: ServiceDeviceType) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, serviceType, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector_from_service_id(&self, serviceId: Guid) -> Result { + }} + #[inline] pub fn get_device_selector_from_service_id(&self, serviceId: Guid) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorFromServiceId)(self as *const _ as *mut _, serviceId, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -28131,12 +28131,12 @@ RT_ENUM! { enum ServiceDeviceType: i32 { RT_CLASS!{static class StorageDevice} impl RtActivatable for StorageDevice {} impl StorageDevice { - #[cfg(feature="windows-storage")] #[inline] pub fn from_id(deviceId: &HStringArg) -> Result> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn from_id(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id(deviceId) - }} - #[inline] pub fn get_device_selector() -> Result { unsafe { + } + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} + } } DEFINE_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]) [CLSID_StorageDevice]); DEFINE_IID!(IID_IStorageDeviceStatics, 1590576366, 6947, 19922, 134, 82, 188, 22, 79, 0, 49, 40); @@ -28146,16 +28146,16 @@ RT_INTERFACE!{static interface IStorageDeviceStatics(IStorageDeviceStaticsVtbl): fn GetDeviceSelector(&self, out: *mut HSTRING) -> HRESULT }} impl IStorageDeviceStatics { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn from_id(&self, deviceId: &HStringArg) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn from_id(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromId)(self as *const _ as *mut _, deviceId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } } // Windows.Devices.Portable pub mod scanners { // Windows.Devices.Scanners @@ -28169,65 +28169,65 @@ RT_INTERFACE!{interface IImageScanner(IImageScannerVtbl): IInspectable(IInspecta fn get_FeederConfiguration(&self, out: *mut *mut ImageScannerFeederConfiguration) -> HRESULT, fn get_AutoConfiguration(&self, out: *mut *mut ImageScannerAutoConfiguration) -> HRESULT, fn IsPreviewSupported(&self, scanSource: ImageScannerScanSource, out: *mut bool) -> HRESULT, - #[cfg(feature="windows-storage")] fn ScanPreviewToStreamAsync(&self, scanSource: ImageScannerScanSource, targetStream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn ScanFilesToFolderAsync(&self, scanSource: ImageScannerScanSource, storageFolder: *mut super::super::storage::StorageFolder, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT + #[cfg(feature="windows-storage")] fn ScanPreviewToStreamAsync(&self, scanSource: ImageScannerScanSource, targetStream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn ScanFilesToFolderAsync(&self, scanSource: ImageScannerScanSource, storageFolder: *mut super::super::storage::StorageFolder, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT }} impl IImageScanner { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_scan_source(&self) -> Result { + }} + #[inline] pub fn get_default_scan_source(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DefaultScanSource)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_scan_source_supported(&self, value: ImageScannerScanSource) -> Result { + }} + #[inline] pub fn is_scan_source_supported(&self, value: ImageScannerScanSource) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsScanSourceSupported)(self as *const _ as *mut _, value, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_flatbed_configuration(&self) -> Result> { + }} + #[inline] pub fn get_flatbed_configuration(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FlatbedConfiguration)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_feeder_configuration(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_feeder_configuration(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FeederConfiguration)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_auto_configuration(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_auto_configuration(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AutoConfiguration)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn is_preview_supported(&self, scanSource: ImageScannerScanSource) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn is_preview_supported(&self, scanSource: ImageScannerScanSource) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsPreviewSupported)(self as *const _ as *mut _, 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(&self, scanSource: ImageScannerScanSource, targetStream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn scan_preview_to_stream_async(&self, scanSource: ImageScannerScanSource, targetStream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ScanPreviewToStreamAsync)(self as *const _ as *mut _, 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(&self, scanSource: ImageScannerScanSource, storageFolder: &super::super::storage::StorageFolder) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn scan_files_to_folder_async(&self, scanSource: ImageScannerScanSource, storageFolder: &super::super::storage::StorageFolder) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ScanFilesToFolderAsync)(self as *const _ as *mut _, scanSource, storageFolder as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ImageScanner: IImageScanner} impl RtActivatable for ImageScanner {} impl ImageScanner { - #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { unsafe { + #[inline] pub fn from_id_async(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(deviceId) - }} - #[inline] pub fn get_device_selector() -> Result { unsafe { + } + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} + } } DEFINE_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]) [CLSID_ImageScanner]); RT_CLASS!{class ImageScannerAutoConfiguration: IImageScannerFormatConfiguration} @@ -28250,7 +28250,7 @@ RT_INTERFACE!{interface IImageScannerFeederConfiguration(IImageScannerFeederConf #[cfg(feature="windows-graphics")] fn get_PageOrientation(&self, out: *mut super::super::graphics::printing::PrintOrientation) -> HRESULT, #[cfg(not(feature="windows-graphics"))] fn __Dummy6(&self) -> (), #[cfg(feature="windows-graphics")] fn put_PageOrientation(&self, value: super::super::graphics::printing::PrintOrientation) -> HRESULT, - fn get_PageSizeDimensions(&self, out: *mut super::super::foundation::Size) -> HRESULT, + fn get_PageSizeDimensions(&self, out: *mut foundation::Size) -> HRESULT, #[cfg(not(feature="windows-graphics"))] fn __Dummy8(&self) -> (), #[cfg(feature="windows-graphics")] fn IsPageSizeSupported(&self, pageSize: super::super::graphics::printing::PrintMediaSize, pageOrientation: super::super::graphics::printing::PrintOrientation, out: *mut bool) -> HRESULT, fn get_MaxNumberOfPages(&self, out: *mut u32) -> HRESULT, @@ -28263,85 +28263,85 @@ RT_INTERFACE!{interface IImageScannerFeederConfiguration(IImageScannerFeederConf fn put_ScanAhead(&self, value: bool) -> HRESULT }} impl IImageScannerFeederConfiguration { - #[inline] pub unsafe fn get_can_auto_detect_page_size(&self) -> Result { + #[inline] pub fn get_can_auto_detect_page_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanAutoDetectPageSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_auto_detect_page_size(&self) -> Result { + }} + #[inline] pub fn get_auto_detect_page_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AutoDetectPageSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_auto_detect_page_size(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_auto_detect_page_size(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AutoDetectPageSize)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn get_page_size(&self) -> Result { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_page_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PageSize)(self 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(&self, value: super::super::graphics::printing::PrintMediaSize) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn set_page_size(&self, value: super::super::graphics::printing::PrintMediaSize) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PageSize)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn get_page_orientation(&self) -> Result { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_page_orientation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PageOrientation)(self 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_orientation(&self, value: super::super::graphics::printing::PrintOrientation) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn set_page_orientation(&self, value: super::super::graphics::printing::PrintOrientation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PageOrientation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_page_size_dimensions(&self) -> Result { + }} + #[inline] pub fn get_page_size_dimensions(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PageSizeDimensions)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn is_page_size_supported(&self, pageSize: super::super::graphics::printing::PrintMediaSize, pageOrientation: super::super::graphics::printing::PrintOrientation) -> Result { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn is_page_size_supported(&self, pageSize: super::super::graphics::printing::PrintMediaSize, pageOrientation: super::super::graphics::printing::PrintOrientation) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsPageSizeSupported)(self as *const _ as *mut _, pageSize, pageOrientation, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_number_of_pages(&self) -> Result { + }} + #[inline] pub fn get_max_number_of_pages(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxNumberOfPages)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_number_of_pages(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_max_number_of_pages(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxNumberOfPages)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_scan_duplex(&self) -> Result { + }} + #[inline] pub fn get_can_scan_duplex(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanScanDuplex)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_duplex(&self) -> Result { + }} + #[inline] pub fn get_duplex(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Duplex)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_duplex(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_duplex(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Duplex)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_scan_ahead(&self) -> Result { + }} + #[inline] pub fn get_can_scan_ahead(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanScanAhead)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_scan_ahead(&self) -> Result { + }} + #[inline] pub fn get_scan_ahead(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ScanAhead)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_scan_ahead(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_scan_ahead(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ScanAhead)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ImageScannerFeederConfiguration: IImageScannerFormatConfiguration} RT_CLASS!{class ImageScannerFlatbedConfiguration: IImageScannerFormatConfiguration} @@ -28356,25 +28356,25 @@ RT_INTERFACE!{interface IImageScannerFormatConfiguration(IImageScannerFormatConf fn IsFormatSupported(&self, value: ImageScannerFormat, out: *mut bool) -> HRESULT }} impl IImageScannerFormatConfiguration { - #[inline] pub unsafe fn get_default_format(&self) -> Result { + #[inline] pub fn get_default_format(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DefaultFormat)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_format(&self) -> Result { + }} + #[inline] pub fn get_format(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Format)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_format(&self, value: ImageScannerFormat) -> Result<()> { + }} + #[inline] pub fn set_format(&self, value: ImageScannerFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Format)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn is_format_supported(&self, value: ImageScannerFormat) -> Result { + }} + #[inline] pub fn is_format_supported(&self, value: ImageScannerFormat) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsFormatSupported)(self as *const _ as *mut _, value, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IImageScannerPreviewResult, 146275982, 34961, 17437, 190, 156, 23, 111, 161, 9, 200, 187); RT_INTERFACE!{interface IImageScannerPreviewResult(IImageScannerPreviewResultVtbl): IInspectable(IInspectableVtbl) [IID_IImageScannerPreviewResult] { @@ -28382,16 +28382,16 @@ RT_INTERFACE!{interface IImageScannerPreviewResult(IImageScannerPreviewResultVtb fn get_Format(&self, out: *mut ImageScannerFormat) -> HRESULT }} impl IImageScannerPreviewResult { - #[inline] pub unsafe fn get_succeeded(&self) -> Result { + #[inline] pub fn get_succeeded(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Succeeded)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_format(&self) -> Result { + }} + #[inline] pub fn get_format(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Format)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ImageScannerPreviewResult: IImageScannerPreviewResult} RT_STRUCT! { struct ImageScannerResolution { @@ -28399,14 +28399,14 @@ RT_STRUCT! { struct ImageScannerResolution { }} 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + #[cfg(feature="windows-storage")] fn get_ScannedFiles(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IImageScannerScanResult { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_scanned_files(&self) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_scanned_files(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ScannedFiles)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ImageScannerScanResult: IImageScannerScanResult} RT_ENUM! { enum ImageScannerScanSource: i32 { @@ -28414,10 +28414,10 @@ RT_ENUM! { enum ImageScannerScanSource: i32 { }} 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(&self, out: *mut super::super::foundation::Size) -> HRESULT, - fn get_MaxScanArea(&self, out: *mut super::super::foundation::Size) -> HRESULT, - fn get_SelectedScanRegion(&self, out: *mut super::super::foundation::Rect) -> HRESULT, - fn put_SelectedScanRegion(&self, value: super::super::foundation::Rect) -> HRESULT, + fn get_MinScanArea(&self, out: *mut foundation::Size) -> HRESULT, + fn get_MaxScanArea(&self, out: *mut foundation::Size) -> HRESULT, + fn get_SelectedScanRegion(&self, out: *mut foundation::Rect) -> HRESULT, + fn put_SelectedScanRegion(&self, value: foundation::Rect) -> HRESULT, fn get_AutoCroppingMode(&self, out: *mut ImageScannerAutoCroppingMode) -> HRESULT, fn put_AutoCroppingMode(&self, value: ImageScannerAutoCroppingMode) -> HRESULT, fn IsAutoCroppingModeSupported(&self, value: ImageScannerAutoCroppingMode, out: *mut bool) -> HRESULT, @@ -28445,161 +28445,161 @@ RT_INTERFACE!{interface IImageScannerSourceConfiguration(IImageScannerSourceConf fn put_Contrast(&self, value: i32) -> HRESULT }} impl IImageScannerSourceConfiguration { - #[inline] pub unsafe fn get_min_scan_area(&self) -> Result { + #[inline] pub fn get_min_scan_area(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinScanArea)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_scan_area(&self) -> Result { + }} + #[inline] pub fn get_max_scan_area(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxScanArea)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_selected_scan_region(&self) -> Result { + }} + #[inline] pub fn get_selected_scan_region(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SelectedScanRegion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_selected_scan_region(&self, value: super::super::foundation::Rect) -> Result<()> { + }} + #[inline] pub fn set_selected_scan_region(&self, value: foundation::Rect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SelectedScanRegion)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_auto_cropping_mode(&self) -> Result { + }} + #[inline] pub fn get_auto_cropping_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AutoCroppingMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_auto_cropping_mode(&self, value: ImageScannerAutoCroppingMode) -> Result<()> { + }} + #[inline] pub fn set_auto_cropping_mode(&self, value: ImageScannerAutoCroppingMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AutoCroppingMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn is_auto_cropping_mode_supported(&self, value: ImageScannerAutoCroppingMode) -> Result { + }} + #[inline] pub fn is_auto_cropping_mode_supported(&self, value: ImageScannerAutoCroppingMode) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsAutoCroppingModeSupported)(self as *const _ as *mut _, value, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_resolution(&self) -> Result { + }} + #[inline] pub fn get_min_resolution(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinResolution)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_resolution(&self) -> Result { + }} + #[inline] pub fn get_max_resolution(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxResolution)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_optical_resolution(&self) -> Result { + }} + #[inline] pub fn get_optical_resolution(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OpticalResolution)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_desired_resolution(&self) -> Result { + }} + #[inline] pub fn get_desired_resolution(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DesiredResolution)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_desired_resolution(&self, value: ImageScannerResolution) -> Result<()> { + }} + #[inline] pub fn set_desired_resolution(&self, value: ImageScannerResolution) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DesiredResolution)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_actual_resolution(&self) -> Result { + }} + #[inline] pub fn get_actual_resolution(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ActualResolution)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_color_mode(&self) -> Result { + }} + #[inline] pub fn get_default_color_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DefaultColorMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_color_mode(&self) -> Result { + }} + #[inline] pub fn get_color_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ColorMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_color_mode(&self, value: ImageScannerColorMode) -> Result<()> { + }} + #[inline] pub fn set_color_mode(&self, value: ImageScannerColorMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ColorMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn is_color_mode_supported(&self, value: ImageScannerColorMode) -> Result { + }} + #[inline] pub fn is_color_mode_supported(&self, value: ImageScannerColorMode) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsColorModeSupported)(self as *const _ as *mut _, value, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_brightness(&self) -> Result { + }} + #[inline] pub fn get_min_brightness(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinBrightness)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_brightness(&self) -> Result { + }} + #[inline] pub fn get_max_brightness(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxBrightness)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_brightness_step(&self) -> Result { + }} + #[inline] pub fn get_brightness_step(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BrightnessStep)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_brightness(&self) -> Result { + }} + #[inline] pub fn get_default_brightness(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DefaultBrightness)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_brightness(&self) -> Result { + }} + #[inline] pub fn get_brightness(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Brightness)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_brightness(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_brightness(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Brightness)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_contrast(&self) -> Result { + }} + #[inline] pub fn get_min_contrast(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinContrast)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_contrast(&self) -> Result { + }} + #[inline] pub fn get_max_contrast(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxContrast)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_contrast_step(&self) -> Result { + }} + #[inline] pub fn get_contrast_step(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ContrastStep)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_contrast(&self) -> Result { + }} + #[inline] pub fn get_default_contrast(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DefaultContrast)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_contrast(&self) -> Result { + }} + #[inline] pub fn get_contrast(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Contrast)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_contrast(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_contrast(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Contrast)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } 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(&self, deviceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FromIdAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetDeviceSelector(&self, out: *mut HSTRING) -> HRESULT }} impl IImageScannerStatics { - #[inline] pub unsafe fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { + #[inline] pub fn from_id_async(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + }} + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } } // Windows.Devices.Scanners diff --git a/src/rt/gen/windows/foundation.rs b/src/rt/gen/windows/foundation.rs index e8281b4..fb02de7 100644 --- a/src/rt/gen/windows/foundation.rs +++ b/src/rt/gen/windows/foundation.rs @@ -6,39 +6,39 @@ RT_INTERFACE!{interface IAsyncAction(IAsyncActionVtbl): IInspectable(IInspectabl fn GetResults(&self) -> HRESULT }} impl IAsyncAction { - #[inline] pub unsafe fn set_completed(&self, handler: &AsyncActionCompletedHandler) -> Result<()> { + #[inline] pub fn set_completed(&self, handler: &AsyncActionCompletedHandler) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Completed)(self as *const _ as *mut _, handler as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_completed(&self) -> Result> { + }} + #[inline] pub fn get_completed(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Completed)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_results(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_results(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).GetResults)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } 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(&self, asyncInfo: *mut IAsyncAction, asyncStatus: AsyncStatus) -> HRESULT }} impl AsyncActionCompletedHandler { - #[inline] pub unsafe fn invoke(&self, asyncInfo: &IAsyncAction, asyncStatus: AsyncStatus) -> Result<()> { + #[inline] pub fn invoke(&self, asyncInfo: &IAsyncAction, asyncStatus: AsyncStatus) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, asyncInfo as *const _ as *mut _, asyncStatus); 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(&self, asyncInfo: *mut IAsyncActionWithProgress, progressInfo: TProgress::Abi) -> HRESULT }} impl AsyncActionProgressHandler { - #[inline] pub unsafe fn invoke(&self, asyncInfo: &IAsyncActionWithProgress, progressInfo: &TProgress::In) -> Result<()> { + #[inline] pub fn invoke(&self, asyncInfo: &IAsyncActionWithProgress, progressInfo: &TProgress::In) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, asyncInfo as *const _ as *mut _, TProgress::unwrap(progressInfo)); 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] { @@ -49,38 +49,38 @@ RT_INTERFACE!{interface IAsyncActionWithProgress(IAsyncActionWithProg fn GetResults(&self) -> HRESULT }} impl IAsyncActionWithProgress { - #[inline] pub unsafe fn set_progress(&self, handler: &AsyncActionProgressHandler) -> Result<()> { + #[inline] pub fn set_progress(&self, handler: &AsyncActionProgressHandler) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Progress)(self as *const _ as *mut _, handler as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_progress(&self) -> Result>> { + }} + #[inline] pub fn get_progress(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Progress)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_completed(&self, handler: &AsyncActionWithProgressCompletedHandler) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_completed(&self, handler: &AsyncActionWithProgressCompletedHandler) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Completed)(self as *const _ as *mut _, handler as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_completed(&self) -> Result>> { + }} + #[inline] pub fn get_completed(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Completed)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_results(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_results(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).GetResults)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } 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(&self, asyncInfo: *mut IAsyncActionWithProgress, asyncStatus: AsyncStatus) -> HRESULT }} impl AsyncActionWithProgressCompletedHandler { - #[inline] pub unsafe fn invoke(&self, asyncInfo: &IAsyncActionWithProgress, asyncStatus: AsyncStatus) -> Result<()> { + #[inline] pub fn invoke(&self, asyncInfo: &IAsyncActionWithProgress, asyncStatus: AsyncStatus) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, asyncInfo as *const _ as *mut _, asyncStatus); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IAsyncInfo, 54, 0, 0, 192, 0, 0, 0, 0, 0, 0, 70); RT_INTERFACE!{interface IAsyncInfo(IAsyncInfoVtbl): IInspectable(IInspectableVtbl) [IID_IAsyncInfo] { @@ -91,29 +91,29 @@ RT_INTERFACE!{interface IAsyncInfo(IAsyncInfoVtbl): IInspectable(IInspectableVtb fn Close(&self) -> HRESULT }} impl IAsyncInfo { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_error_code(&self) -> Result { + }} + #[inline] pub fn get_error_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ErrorCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn cancel(&self) -> Result<()> { + }} + #[inline] pub fn cancel(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Cancel)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn close(&self) -> Result<()> { + }} + #[inline] pub fn close(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Close)(self as *const _ as *mut _); 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] { @@ -122,40 +122,40 @@ RT_INTERFACE!{interface IAsyncOperation(IAsyncOperationVtbl): IInspecta fn GetResults(&self, out: *mut TResult::Abi) -> HRESULT }} impl IAsyncOperation { - #[inline] pub unsafe fn set_completed(&self, handler: &AsyncOperationCompletedHandler) -> Result<()> { + #[inline] pub fn set_completed(&self, handler: &AsyncOperationCompletedHandler) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Completed)(self as *const _ as *mut _, handler as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_completed(&self) -> Result>> { + }} + #[inline] pub fn get_completed(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Completed)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_results(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_results(&self) -> Result { unsafe { let mut out = TResult::uninitialized(); let hr = ((*self.lpVtbl).GetResults)(self as *const _ as *mut _, &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(&self, asyncInfo: *mut IAsyncOperation, asyncStatus: AsyncStatus) -> HRESULT }} impl AsyncOperationCompletedHandler { - #[inline] pub unsafe fn invoke(&self, asyncInfo: &IAsyncOperation, asyncStatus: AsyncStatus) -> Result<()> { + #[inline] pub fn invoke(&self, asyncInfo: &IAsyncOperation, asyncStatus: AsyncStatus) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, asyncInfo as *const _ as *mut _, asyncStatus); 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(&self, asyncInfo: *mut IAsyncOperationWithProgress, progressInfo: TProgress::Abi) -> HRESULT }} impl AsyncOperationProgressHandler { - #[inline] pub unsafe fn invoke(&self, asyncInfo: &IAsyncOperationWithProgress, progressInfo: &TProgress::In) -> Result<()> { + #[inline] pub fn invoke(&self, asyncInfo: &IAsyncOperationWithProgress, progressInfo: &TProgress::In) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, asyncInfo as *const _ as *mut _, TProgress::unwrap(progressInfo)); 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] { @@ -166,39 +166,39 @@ RT_INTERFACE!{interface IAsyncOperationWithProgress(IAsyncOp fn GetResults(&self, out: *mut TResult::Abi) -> HRESULT }} impl IAsyncOperationWithProgress { - #[inline] pub unsafe fn set_progress(&self, handler: &AsyncOperationProgressHandler) -> Result<()> { + #[inline] pub fn set_progress(&self, handler: &AsyncOperationProgressHandler) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Progress)(self as *const _ as *mut _, handler as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_progress(&self) -> Result>> { + }} + #[inline] pub fn get_progress(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Progress)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_completed(&self, handler: &AsyncOperationWithProgressCompletedHandler) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_completed(&self, handler: &AsyncOperationWithProgressCompletedHandler) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Completed)(self as *const _ as *mut _, handler as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_completed(&self) -> Result>> { + }} + #[inline] pub fn get_completed(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Completed)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_results(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_results(&self) -> Result { unsafe { let mut out = TResult::uninitialized(); let hr = ((*self.lpVtbl).GetResults)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(TResult::wrap(out)) } 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(&self, asyncInfo: *mut IAsyncOperationWithProgress, asyncStatus: AsyncStatus) -> HRESULT }} impl AsyncOperationWithProgressCompletedHandler { - #[inline] pub unsafe fn invoke(&self, asyncInfo: &IAsyncOperationWithProgress, asyncStatus: AsyncStatus) -> Result<()> { + #[inline] pub fn invoke(&self, asyncInfo: &IAsyncOperationWithProgress, asyncStatus: AsyncStatus) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, asyncInfo as *const _ as *mut _, asyncStatus); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum AsyncStatus: i32 { Canceled (AsyncStatus_Canceled) = 2, Completed (AsyncStatus_Completed) = 1, Error (AsyncStatus_Error) = 3, Started (AsyncStatus_Started) = 0, @@ -208,10 +208,10 @@ RT_INTERFACE!{interface IClosable(IClosableVtbl): IInspectable(IInspectableVtbl) fn Close(&self) -> HRESULT }} impl IClosable { - #[inline] pub unsafe fn close(&self) -> Result<()> { + #[inline] pub fn close(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Close)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_STRUCT! { struct DateTime { UniversalTime: i64, @@ -221,17 +221,17 @@ RT_INTERFACE!{interface IDeferral(IDeferralVtbl): IInspectable(IInspectableVtbl) fn Complete(&self) -> HRESULT }} impl IDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Deferral: IDeferral} impl RtActivatable for Deferral {} impl Deferral { - #[inline] pub fn create(handler: &DeferralCompletedHandler) -> Result> { unsafe { + #[inline] pub fn create(handler: &DeferralCompletedHandler) -> Result> { >::get_activation_factory().create(handler) - }} + } } DEFINE_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]) [CLSID_Deferral]); DEFINE_IID!(IID_DeferralCompletedHandler, 3979518834, 62408, 20394, 156, 251, 71, 1, 72, 218, 56, 136); @@ -239,31 +239,31 @@ RT_DELEGATE!{delegate DeferralCompletedHandler(DeferralCompletedHandlerVtbl, Def fn Invoke(&self) -> HRESULT }} impl DeferralCompletedHandler { - #[inline] pub unsafe fn invoke(&self) -> Result<()> { + #[inline] pub fn invoke(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _); 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(&self, handler: *mut DeferralCompletedHandler, out: *mut *mut Deferral) -> HRESULT }} impl IDeferralFactory { - #[inline] pub unsafe fn create(&self, handler: &DeferralCompletedHandler) -> Result> { + #[inline] pub fn create(&self, handler: &DeferralCompletedHandler) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(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(&self, sender: *mut IInspectable, args: T::Abi) -> HRESULT }} impl EventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &IInspectable, args: &T::In) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &IInspectable, args: &T::In) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, T::unwrap(args)); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_STRUCT! { struct EventRegistrationToken { Value: i64, @@ -273,11 +273,11 @@ RT_INTERFACE!{interface IGetActivationFactory(IGetActivationFactoryVtbl): IInspe fn GetActivationFactory(&self, activatableClassId: HSTRING, out: *mut *mut IInspectable) -> HRESULT }} impl IGetActivationFactory { - #[inline] pub unsafe fn get_activation_factory(&self, activatableClassId: &HStringArg) -> Result> { + #[inline] pub fn get_activation_factory(&self, activatableClassId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetActivationFactory)(self as *const _ as *mut _, activatableClassId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_STRUCT! { struct HResult { Value: i32, @@ -287,18 +287,18 @@ RT_INTERFACE!{interface IMemoryBuffer(IMemoryBufferVtbl): IInspectable(IInspecta fn CreateReference(&self, out: *mut *mut IMemoryBufferReference) -> HRESULT }} impl IMemoryBuffer { - #[inline] pub unsafe fn create_reference(&self) -> Result> { + #[inline] pub fn create_reference(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateReference)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MemoryBuffer: IMemoryBuffer} impl RtActivatable for MemoryBuffer {} impl MemoryBuffer { - #[inline] pub fn create(capacity: u32) -> Result> { unsafe { + #[inline] pub fn create(capacity: u32) -> Result> { >::get_activation_factory().create(capacity) - }} + } } DEFINE_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]) [CLSID_MemoryBuffer]); DEFINE_IID!(IID_IMemoryBufferFactory, 4223982891, 9307, 4580, 175, 152, 104, 148, 35, 38, 12, 248); @@ -306,11 +306,11 @@ RT_INTERFACE!{static interface IMemoryBufferFactory(IMemoryBufferFactoryVtbl): I fn Create(&self, capacity: u32, out: *mut *mut MemoryBuffer) -> HRESULT }} impl IMemoryBufferFactory { - #[inline] pub unsafe fn create(&self, capacity: u32) -> Result> { + #[inline] pub fn create(&self, capacity: u32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, capacity, &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] { @@ -319,20 +319,20 @@ RT_INTERFACE!{interface IMemoryBufferReference(IMemoryBufferReferenceVtbl): IIns fn remove_Closed(&self, cookie: EventRegistrationToken) -> HRESULT }} impl IMemoryBufferReference { - #[inline] pub unsafe fn get_capacity(&self) -> Result { + #[inline] pub fn get_capacity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Capacity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_closed(&self, handler: &TypedEventHandler) -> Result { + }} + #[inline] pub fn add_closed(&self, handler: &TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Closed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_closed(&self, cookie: EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_closed(&self, cookie: EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Closed)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_STRUCT! { struct Point { X: f32, Y: f32, @@ -383,322 +383,322 @@ RT_INTERFACE!{interface IPropertyValue(IPropertyValueVtbl): IInspectable(IInspec fn GetRectArray(&self, valueSize: *mut u32, value: *mut *mut Rect) -> HRESULT }} impl IPropertyValue { - #[inline] pub unsafe fn get_type(&self) -> Result { + #[inline] pub fn get_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Type)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_numeric_scalar(&self) -> Result { + }} + #[inline] pub fn get_is_numeric_scalar(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsNumericScalar)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_uint8(&self) -> Result { + }} + #[inline] pub fn get_uint8(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetUInt8)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_int16(&self) -> Result { + }} + #[inline] pub fn get_int16(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetInt16)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_uint16(&self) -> Result { + }} + #[inline] pub fn get_uint16(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetUInt16)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_int32(&self) -> Result { + }} + #[inline] pub fn get_int32(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetInt32)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_uint32(&self) -> Result { + }} + #[inline] pub fn get_uint32(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetUInt32)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_int64(&self) -> Result { + }} + #[inline] pub fn get_int64(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetInt64)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_uint64(&self) -> Result { + }} + #[inline] pub fn get_uint64(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetUInt64)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_single(&self) -> Result { + }} + #[inline] pub fn get_single(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetSingle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_double(&self) -> Result { + }} + #[inline] pub fn get_double(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetDouble)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_char16(&self) -> Result { + }} + #[inline] pub fn get_char16(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetChar16)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_boolean(&self) -> Result { + }} + #[inline] pub fn get_boolean(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetBoolean)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_string(&self) -> Result { + }} + #[inline] pub fn get_string(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_guid(&self) -> Result { + }} + #[inline] pub fn get_guid(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetGuid)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_date_time(&self) -> Result { + }} + #[inline] pub fn get_date_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetDateTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_time_span(&self) -> Result { + }} + #[inline] pub fn get_time_span(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetTimeSpan)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_point(&self) -> Result { + }} + #[inline] pub fn get_point(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetPoint)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_size(&self) -> Result { + }} + #[inline] pub fn get_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_rect(&self) -> Result { + }} + #[inline] pub fn get_rect(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetRect)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_uint8_array(&self) -> Result> { + }} + #[inline] pub fn get_uint8_array(&self) -> Result> { unsafe { let mut valueSize = 0; let mut value = null_mut(); let hr = ((*self.lpVtbl).GetUInt8Array)(self as *const _ as *mut _, &mut valueSize, &mut value); if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_int16_array(&self) -> Result> { + }} + #[inline] pub fn get_int16_array(&self) -> Result> { unsafe { let mut valueSize = 0; let mut value = null_mut(); let hr = ((*self.lpVtbl).GetInt16Array)(self as *const _ as *mut _, &mut valueSize, &mut value); if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_uint16_array(&self) -> Result> { + }} + #[inline] pub fn get_uint16_array(&self) -> Result> { unsafe { let mut valueSize = 0; let mut value = null_mut(); let hr = ((*self.lpVtbl).GetUInt16Array)(self as *const _ as *mut _, &mut valueSize, &mut value); if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_int32_array(&self) -> Result> { + }} + #[inline] pub fn get_int32_array(&self) -> Result> { unsafe { let mut valueSize = 0; let mut value = null_mut(); let hr = ((*self.lpVtbl).GetInt32Array)(self as *const _ as *mut _, &mut valueSize, &mut value); if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_uint32_array(&self) -> Result> { + }} + #[inline] pub fn get_uint32_array(&self) -> Result> { unsafe { let mut valueSize = 0; let mut value = null_mut(); let hr = ((*self.lpVtbl).GetUInt32Array)(self as *const _ as *mut _, &mut valueSize, &mut value); if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_int64_array(&self) -> Result> { + }} + #[inline] pub fn get_int64_array(&self) -> Result> { unsafe { let mut valueSize = 0; let mut value = null_mut(); let hr = ((*self.lpVtbl).GetInt64Array)(self as *const _ as *mut _, &mut valueSize, &mut value); if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_uint64_array(&self) -> Result> { + }} + #[inline] pub fn get_uint64_array(&self) -> Result> { unsafe { let mut valueSize = 0; let mut value = null_mut(); let hr = ((*self.lpVtbl).GetUInt64Array)(self as *const _ as *mut _, &mut valueSize, &mut value); if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_single_array(&self) -> Result> { + }} + #[inline] pub fn get_single_array(&self) -> Result> { unsafe { let mut valueSize = 0; let mut value = null_mut(); let hr = ((*self.lpVtbl).GetSingleArray)(self as *const _ as *mut _, &mut valueSize, &mut value); if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_double_array(&self) -> Result> { + }} + #[inline] pub fn get_double_array(&self) -> Result> { unsafe { let mut valueSize = 0; let mut value = null_mut(); let hr = ((*self.lpVtbl).GetDoubleArray)(self as *const _ as *mut _, &mut valueSize, &mut value); if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_char16_array(&self) -> Result> { + }} + #[inline] pub fn get_char16_array(&self) -> Result> { unsafe { let mut valueSize = 0; let mut value = null_mut(); let hr = ((*self.lpVtbl).GetChar16Array)(self as *const _ as *mut _, &mut valueSize, &mut value); if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_boolean_array(&self) -> Result> { + }} + #[inline] pub fn get_boolean_array(&self) -> Result> { unsafe { let mut valueSize = 0; let mut value = null_mut(); let hr = ((*self.lpVtbl).GetBooleanArray)(self as *const _ as *mut _, &mut valueSize, &mut value); if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_string_array(&self) -> Result> { + }} + #[inline] pub fn get_string_array(&self) -> Result> { unsafe { let mut valueSize = 0; let mut value = null_mut(); let hr = ((*self.lpVtbl).GetStringArray)(self as *const _ as *mut _, &mut valueSize, &mut value); if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_inspectable_array(&self) -> Result> { + }} + #[inline] pub fn get_inspectable_array(&self) -> Result> { unsafe { let mut valueSize = 0; let mut value = null_mut(); let hr = ((*self.lpVtbl).GetInspectableArray)(self as *const _ as *mut _, &mut valueSize, &mut value); if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_guid_array(&self) -> Result> { + }} + #[inline] pub fn get_guid_array(&self) -> Result> { unsafe { let mut valueSize = 0; let mut value = null_mut(); let hr = ((*self.lpVtbl).GetGuidArray)(self as *const _ as *mut _, &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(&self) -> Result> { + }} + #[inline] pub fn get_date_time_array(&self) -> Result> { unsafe { let mut valueSize = 0; let mut value = null_mut(); let hr = ((*self.lpVtbl).GetDateTimeArray)(self as *const _ as *mut _, &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(&self) -> Result> { + }} + #[inline] pub fn get_time_span_array(&self) -> Result> { unsafe { let mut valueSize = 0; let mut value = null_mut(); let hr = ((*self.lpVtbl).GetTimeSpanArray)(self as *const _ as *mut _, &mut valueSize, &mut value); if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_point_array(&self) -> Result> { + }} + #[inline] pub fn get_point_array(&self) -> Result> { unsafe { let mut valueSize = 0; let mut value = null_mut(); let hr = ((*self.lpVtbl).GetPointArray)(self as *const _ as *mut _, &mut valueSize, &mut value); if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_size_array(&self) -> Result> { + }} + #[inline] pub fn get_size_array(&self) -> Result> { unsafe { let mut valueSize = 0; let mut value = null_mut(); let hr = ((*self.lpVtbl).GetSizeArray)(self as *const _ as *mut _, &mut valueSize, &mut value); if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rect_array(&self) -> Result> { + }} + #[inline] pub fn get_rect_array(&self) -> Result> { unsafe { let mut valueSize = 0; let mut value = null_mut(); let hr = ((*self.lpVtbl).GetRectArray)(self as *const _ as *mut _, &mut valueSize, &mut value); if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } + }} } RT_CLASS!{static class PropertyValue} impl RtActivatable for PropertyValue {} impl PropertyValue { - #[inline] pub fn create_empty() -> Result> { unsafe { + #[inline] pub fn create_empty() -> Result>> { >::get_activation_factory().create_empty() - }} - #[inline] pub fn create_uint8(value: u8) -> Result> { unsafe { + } + #[inline] pub fn create_uint8(value: u8) -> Result>> { >::get_activation_factory().create_uint8(value) - }} - #[inline] pub fn create_int16(value: i16) -> Result> { unsafe { + } + #[inline] pub fn create_int16(value: i16) -> Result>> { >::get_activation_factory().create_int16(value) - }} - #[inline] pub fn create_uint16(value: u16) -> Result> { unsafe { + } + #[inline] pub fn create_uint16(value: u16) -> Result>> { >::get_activation_factory().create_uint16(value) - }} - #[inline] pub fn create_int32(value: i32) -> Result> { unsafe { + } + #[inline] pub fn create_int32(value: i32) -> Result>> { >::get_activation_factory().create_int32(value) - }} - #[inline] pub fn create_uint32(value: u32) -> Result> { unsafe { + } + #[inline] pub fn create_uint32(value: u32) -> Result>> { >::get_activation_factory().create_uint32(value) - }} - #[inline] pub fn create_int64(value: i64) -> Result> { unsafe { + } + #[inline] pub fn create_int64(value: i64) -> Result>> { >::get_activation_factory().create_int64(value) - }} - #[inline] pub fn create_uint64(value: u64) -> Result> { unsafe { + } + #[inline] pub fn create_uint64(value: u64) -> Result>> { >::get_activation_factory().create_uint64(value) - }} - #[inline] pub fn create_single(value: f32) -> Result> { unsafe { + } + #[inline] pub fn create_single(value: f32) -> Result>> { >::get_activation_factory().create_single(value) - }} - #[inline] pub fn create_double(value: f64) -> Result> { unsafe { + } + #[inline] pub fn create_double(value: f64) -> Result>> { >::get_activation_factory().create_double(value) - }} - #[inline] pub fn create_char16(value: Char) -> Result> { unsafe { + } + #[inline] pub fn create_char16(value: Char) -> Result>> { >::get_activation_factory().create_char16(value) - }} - #[inline] pub fn create_boolean(value: bool) -> Result> { unsafe { + } + #[inline] pub fn create_boolean(value: bool) -> Result>> { >::get_activation_factory().create_boolean(value) - }} - #[inline] pub fn create_string(value: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_string(value: &HStringArg) -> Result>> { >::get_activation_factory().create_string(value) - }} - #[inline] pub fn create_inspectable(value: &IInspectable) -> Result> { unsafe { + } + #[inline] pub fn create_inspectable(value: &IInspectable) -> Result>> { >::get_activation_factory().create_inspectable(value) - }} - #[inline] pub fn create_guid(value: Guid) -> Result> { unsafe { + } + #[inline] pub fn create_guid(value: Guid) -> Result>> { >::get_activation_factory().create_guid(value) - }} - #[inline] pub fn create_date_time(value: DateTime) -> Result> { unsafe { + } + #[inline] pub fn create_date_time(value: DateTime) -> Result>> { >::get_activation_factory().create_date_time(value) - }} - #[inline] pub fn create_time_span(value: TimeSpan) -> Result> { unsafe { + } + #[inline] pub fn create_time_span(value: TimeSpan) -> Result>> { >::get_activation_factory().create_time_span(value) - }} - #[inline] pub fn create_point(value: Point) -> Result> { unsafe { + } + #[inline] pub fn create_point(value: Point) -> Result>> { >::get_activation_factory().create_point(value) - }} - #[inline] pub fn create_size(value: Size) -> Result> { unsafe { + } + #[inline] pub fn create_size(value: Size) -> Result>> { >::get_activation_factory().create_size(value) - }} - #[inline] pub fn create_rect(value: Rect) -> Result> { unsafe { + } + #[inline] pub fn create_rect(value: Rect) -> Result>> { >::get_activation_factory().create_rect(value) - }} - #[inline] pub fn create_uint8_array(value: &[u8]) -> Result> { unsafe { + } + #[inline] pub fn create_uint8_array(value: &[u8]) -> Result>> { >::get_activation_factory().create_uint8_array(value) - }} - #[inline] pub fn create_int16_array(value: &[i16]) -> Result> { unsafe { + } + #[inline] pub fn create_int16_array(value: &[i16]) -> Result>> { >::get_activation_factory().create_int16_array(value) - }} - #[inline] pub fn create_uint16_array(value: &[u16]) -> Result> { unsafe { + } + #[inline] pub fn create_uint16_array(value: &[u16]) -> Result>> { >::get_activation_factory().create_uint16_array(value) - }} - #[inline] pub fn create_int32_array(value: &[i32]) -> Result> { unsafe { + } + #[inline] pub fn create_int32_array(value: &[i32]) -> Result>> { >::get_activation_factory().create_int32_array(value) - }} - #[inline] pub fn create_uint32_array(value: &[u32]) -> Result> { unsafe { + } + #[inline] pub fn create_uint32_array(value: &[u32]) -> Result>> { >::get_activation_factory().create_uint32_array(value) - }} - #[inline] pub fn create_int64_array(value: &[i64]) -> Result> { unsafe { + } + #[inline] pub fn create_int64_array(value: &[i64]) -> Result>> { >::get_activation_factory().create_int64_array(value) - }} - #[inline] pub fn create_uint64_array(value: &[u64]) -> Result> { unsafe { + } + #[inline] pub fn create_uint64_array(value: &[u64]) -> Result>> { >::get_activation_factory().create_uint64_array(value) - }} - #[inline] pub fn create_single_array(value: &[f32]) -> Result> { unsafe { + } + #[inline] pub fn create_single_array(value: &[f32]) -> Result>> { >::get_activation_factory().create_single_array(value) - }} - #[inline] pub fn create_double_array(value: &[f64]) -> Result> { unsafe { + } + #[inline] pub fn create_double_array(value: &[f64]) -> Result>> { >::get_activation_factory().create_double_array(value) - }} - #[inline] pub fn create_char16_array(value: &[Char]) -> Result> { unsafe { + } + #[inline] pub fn create_char16_array(value: &[Char]) -> Result>> { >::get_activation_factory().create_char16_array(value) - }} - #[inline] pub fn create_boolean_array(value: &[bool]) -> Result> { unsafe { + } + #[inline] pub fn create_boolean_array(value: &[bool]) -> Result>> { >::get_activation_factory().create_boolean_array(value) - }} - #[inline] pub fn create_string_array(value: &[&HStringArg]) -> Result> { unsafe { + } + #[inline] pub fn create_string_array(value: &[&HStringArg]) -> Result>> { >::get_activation_factory().create_string_array(value) - }} - #[inline] pub fn create_inspectable_array(value: &[&IInspectable]) -> Result> { unsafe { + } + #[inline] pub fn create_inspectable_array(value: &[&IInspectable]) -> Result>> { >::get_activation_factory().create_inspectable_array(value) - }} - #[inline] pub fn create_guid_array(value: &[Guid]) -> Result> { unsafe { + } + #[inline] pub fn create_guid_array(value: &[Guid]) -> Result>> { >::get_activation_factory().create_guid_array(value) - }} - #[inline] pub fn create_date_time_array(value: &[DateTime]) -> Result> { unsafe { + } + #[inline] pub fn create_date_time_array(value: &[DateTime]) -> Result>> { >::get_activation_factory().create_date_time_array(value) - }} - #[inline] pub fn create_time_span_array(value: &[TimeSpan]) -> Result> { unsafe { + } + #[inline] pub fn create_time_span_array(value: &[TimeSpan]) -> Result>> { >::get_activation_factory().create_time_span_array(value) - }} - #[inline] pub fn create_point_array(value: &[Point]) -> Result> { unsafe { + } + #[inline] pub fn create_point_array(value: &[Point]) -> Result>> { >::get_activation_factory().create_point_array(value) - }} - #[inline] pub fn create_size_array(value: &[Size]) -> Result> { unsafe { + } + #[inline] pub fn create_size_array(value: &[Size]) -> Result>> { >::get_activation_factory().create_size_array(value) - }} - #[inline] pub fn create_rect_array(value: &[Rect]) -> Result> { unsafe { + } + #[inline] pub fn create_rect_array(value: &[Rect]) -> Result>> { >::get_activation_factory().create_rect_array(value) - }} + } } DEFINE_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]) [CLSID_PropertyValue]); DEFINE_IID!(IID_IPropertyValueStatics, 1654381512, 55602, 20468, 150, 185, 141, 150, 197, 193, 232, 88); @@ -744,201 +744,201 @@ RT_INTERFACE!{static interface IPropertyValueStatics(IPropertyValueStaticsVtbl): fn CreateRectArray(&self, valueSize: u32, value: *mut Rect, out: *mut *mut IInspectable) -> HRESULT }} impl IPropertyValueStatics { - #[inline] pub unsafe fn create_empty(&self) -> Result> { + #[inline] pub fn create_empty(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateEmpty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_uint8(&self, value: u8) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_uint8(&self, value: u8) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateUInt8)(self as *const _ as *mut _, value, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_int16(&self, value: i16) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_int16(&self, value: i16) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInt16)(self as *const _ as *mut _, value, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_uint16(&self, value: u16) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_uint16(&self, value: u16) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateUInt16)(self as *const _ as *mut _, value, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_int32(&self, value: i32) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_int32(&self, value: i32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInt32)(self as *const _ as *mut _, value, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_uint32(&self, value: u32) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_uint32(&self, value: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateUInt32)(self as *const _ as *mut _, value, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_int64(&self, value: i64) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_int64(&self, value: i64) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInt64)(self as *const _ as *mut _, value, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_uint64(&self, value: u64) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_uint64(&self, value: u64) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateUInt64)(self as *const _ as *mut _, value, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_single(&self, value: f32) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_single(&self, value: f32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateSingle)(self as *const _ as *mut _, value, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_double(&self, value: f64) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_double(&self, value: f64) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDouble)(self as *const _ as *mut _, value, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_char16(&self, value: Char) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_char16(&self, value: Char) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateChar16)(self as *const _ as *mut _, value, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_boolean(&self, value: bool) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_boolean(&self, value: bool) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateBoolean)(self as *const _ as *mut _, value, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_string(&self, value: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_string(&self, value: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateString)(self as *const _ as *mut _, value.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_inspectable(&self, value: &IInspectable) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_inspectable(&self, value: &IInspectable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInspectable)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_guid(&self, value: Guid) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_guid(&self, value: Guid) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateGuid)(self as *const _ as *mut _, value, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_date_time(&self, value: DateTime) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_date_time(&self, value: DateTime) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDateTime)(self as *const _ as *mut _, value, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_time_span(&self, value: TimeSpan) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_time_span(&self, value: TimeSpan) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateTimeSpan)(self as *const _ as *mut _, value, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_point(&self, value: Point) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_point(&self, value: Point) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreatePoint)(self as *const _ as *mut _, value, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_size(&self, value: Size) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_size(&self, value: Size) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateSize)(self as *const _ as *mut _, value, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_rect(&self, value: Rect) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_rect(&self, value: Rect) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateRect)(self as *const _ as *mut _, value, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_uint8_array(&self, value: &[u8]) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_uint8_array(&self, value: &[u8]) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateUInt8Array)(self as *const _ as *mut _, 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(&self, value: &[i16]) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_int16_array(&self, value: &[i16]) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInt16Array)(self as *const _ as *mut _, 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(&self, value: &[u16]) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_uint16_array(&self, value: &[u16]) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateUInt16Array)(self as *const _ as *mut _, 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(&self, value: &[i32]) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_int32_array(&self, value: &[i32]) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInt32Array)(self as *const _ as *mut _, 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(&self, value: &[u32]) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_uint32_array(&self, value: &[u32]) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateUInt32Array)(self as *const _ as *mut _, 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(&self, value: &[i64]) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_int64_array(&self, value: &[i64]) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInt64Array)(self as *const _ as *mut _, 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(&self, value: &[u64]) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_uint64_array(&self, value: &[u64]) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateUInt64Array)(self as *const _ as *mut _, 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(&self, value: &[f32]) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_single_array(&self, value: &[f32]) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateSingleArray)(self as *const _ as *mut _, 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(&self, value: &[f64]) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_double_array(&self, value: &[f64]) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDoubleArray)(self as *const _ as *mut _, 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(&self, value: &[Char]) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_char16_array(&self, value: &[Char]) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateChar16Array)(self as *const _ as *mut _, 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(&self, value: &[bool]) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_boolean_array(&self, value: &[bool]) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateBooleanArray)(self as *const _ as *mut _, 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(&self, value: &[&HStringArg]) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_string_array(&self, value: &[&HStringArg]) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateStringArray)(self as *const _ as *mut _, 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(&self, value: &[&IInspectable]) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_inspectable_array(&self, value: &[&IInspectable]) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInspectableArray)(self as *const _ as *mut _, 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(&self, value: &[Guid]) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_guid_array(&self, value: &[Guid]) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateGuidArray)(self as *const _ as *mut _, 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(&self, value: &[DateTime]) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_date_time_array(&self, value: &[DateTime]) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDateTimeArray)(self as *const _ as *mut _, 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(&self, value: &[TimeSpan]) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_time_span_array(&self, value: &[TimeSpan]) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateTimeSpanArray)(self as *const _ as *mut _, 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(&self, value: &[Point]) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_point_array(&self, value: &[Point]) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreatePointArray)(self as *const _ as *mut _, 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(&self, value: &[Size]) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_size_array(&self, value: &[Size]) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateSizeArray)(self as *const _ as *mut _, 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(&self, value: &[Rect]) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_rect_array(&self, value: &[Rect]) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateRectArray)(self as *const _ as *mut _, value.len() as u32, value.as_ptr() as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_STRUCT! { struct Rect { X: f32, Y: f32, Width: f32, Height: f32, @@ -948,22 +948,22 @@ RT_INTERFACE!{interface IReference(IReferenceVtbl): IInspectable(IInspectable fn get_Value(&self, out: *mut T::Abi) -> HRESULT }} impl IReference { - #[inline] pub unsafe fn get_value(&self) -> Result { + #[inline] pub fn get_value(&self) -> Result { unsafe { let mut out = T::uninitialized(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &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(&self, outSize: *mut u32, out: *mut *mut T::Abi) -> HRESULT }} impl IReferenceArray { - #[inline] pub unsafe fn get_value(&self) -> Result> { + #[inline] pub fn get_value(&self) -> Result> { unsafe { let mut outSize = 0; let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut outSize, &mut out); if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } - } + }} } RT_STRUCT! { struct Size { Width: f32, Height: f32, @@ -973,11 +973,11 @@ RT_INTERFACE!{interface IStringable(IStringableVtbl): IInspectable(IInspectableV fn ToString(&self, out: *mut HSTRING) -> HRESULT }} impl IStringable { - #[inline] pub unsafe fn to_string(&self) -> Result { + #[inline] pub fn to_string(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ToString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_STRUCT! { struct TimeSpan { Duration: i64, @@ -987,27 +987,27 @@ RT_DELEGATE!{delegate TypedEventHandler(TypedEventHandlerVtbl, fn Invoke(&self, sender: TSender::Abi, args: TResult::Abi) -> HRESULT }} impl TypedEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &TSender::In, args: &TResult::In) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &TSender::In, args: &TResult::In) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, TSender::unwrap(sender), TResult::unwrap(args)); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Uri: IUriRuntimeClass} impl RtActivatable for Uri {} impl RtActivatable for Uri {} impl Uri { - #[inline] pub fn create_uri(uri: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_uri(uri: &HStringArg) -> Result> { >::get_activation_factory().create_uri(uri) - }} - #[inline] pub fn create_with_relative_uri(baseUri: &HStringArg, relativeUri: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_with_relative_uri(baseUri: &HStringArg, relativeUri: &HStringArg) -> Result> { >::get_activation_factory().create_with_relative_uri(baseUri, relativeUri) - }} - #[inline] pub fn unescape_component(toUnescape: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn unescape_component(toUnescape: &HStringArg) -> Result { >::get_activation_factory().unescape_component(toUnescape) - }} - #[inline] pub fn escape_component(toEscape: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn escape_component(toEscape: &HStringArg) -> Result { >::get_activation_factory().escape_component(toEscape) - }} + } } DEFINE_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]) [CLSID_Uri]); DEFINE_IID!(IID_IUriEscapeStatics, 3251909306, 51236, 17490, 167, 253, 81, 43, 195, 187, 233, 161); @@ -1016,16 +1016,16 @@ RT_INTERFACE!{static interface IUriEscapeStatics(IUriEscapeStaticsVtbl): IInspec fn EscapeComponent(&self, toEscape: HSTRING, out: *mut HSTRING) -> HRESULT }} impl IUriEscapeStatics { - #[inline] pub unsafe fn unescape_component(&self, toUnescape: &HStringArg) -> Result { + #[inline] pub fn unescape_component(&self, toUnescape: &HStringArg) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UnescapeComponent)(self as *const _ as *mut _, toUnescape.get(), &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn escape_component(&self, toEscape: &HStringArg) -> Result { + }} + #[inline] pub fn escape_component(&self, toEscape: &HStringArg) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).EscapeComponent)(self as *const _ as *mut _, toEscape.get(), &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IUriRuntimeClass, 2654363223, 18610, 16736, 149, 111, 199, 56, 81, 32, 187, 252); RT_INTERFACE!{interface IUriRuntimeClass(IUriRuntimeClassVtbl): IInspectable(IInspectableVtbl) [IID_IUriRuntimeClass] { @@ -1048,91 +1048,91 @@ RT_INTERFACE!{interface IUriRuntimeClass(IUriRuntimeClassVtbl): IInspectable(IIn fn CombineUri(&self, relativeUri: HSTRING, out: *mut *mut Uri) -> HRESULT }} impl IUriRuntimeClass { - #[inline] pub unsafe fn get_absolute_uri(&self) -> Result { + #[inline] pub fn get_absolute_uri(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AbsoluteUri)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_uri(&self) -> Result { + }} + #[inline] pub fn get_display_uri(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayUri)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_domain(&self) -> Result { + }} + #[inline] pub fn get_domain(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Domain)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_extension(&self) -> Result { + }} + #[inline] pub fn get_extension(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Extension)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_fragment(&self) -> Result { + }} + #[inline] pub fn get_fragment(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Fragment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_host(&self) -> Result { + }} + #[inline] pub fn get_host(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Host)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_password(&self) -> Result { + }} + #[inline] pub fn get_password(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Password)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_path(&self) -> Result { + }} + #[inline] pub fn get_path(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Path)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_query(&self) -> Result { + }} + #[inline] pub fn get_query(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Query)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_query_parsed(&self) -> Result> { + }} + #[inline] pub fn get_query_parsed(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_QueryParsed)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_raw_uri(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_raw_uri(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RawUri)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_scheme_name(&self) -> Result { + }} + #[inline] pub fn get_scheme_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SchemeName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_user_name(&self) -> Result { + }} + #[inline] pub fn get_user_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UserName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_port(&self) -> Result { + }} + #[inline] pub fn get_port(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Port)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_suspicious(&self) -> Result { + }} + #[inline] pub fn get_suspicious(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Suspicious)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn equals(&self, pUri: &Uri) -> Result { + }} + #[inline] pub fn equals(&self, pUri: &Uri) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).Equals)(self as *const _ as *mut _, pUri as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn combine_uri(&self, relativeUri: &HStringArg) -> Result> { + }} + #[inline] pub fn combine_uri(&self, relativeUri: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CombineUri)(self as *const _ as *mut _, relativeUri.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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] { @@ -1140,16 +1140,16 @@ RT_INTERFACE!{static interface IUriRuntimeClassFactory(IUriRuntimeClassFactoryVt fn CreateWithRelativeUri(&self, baseUri: HSTRING, relativeUri: HSTRING, out: *mut *mut Uri) -> HRESULT }} impl IUriRuntimeClassFactory { - #[inline] pub unsafe fn create_uri(&self, uri: &HStringArg) -> Result> { + #[inline] pub fn create_uri(&self, uri: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateUri)(self as *const _ as *mut _, uri.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_relative_uri(&self, baseUri: &HStringArg, relativeUri: &HStringArg) -> Result> { + }} + #[inline] pub fn create_with_relative_uri(&self, baseUri: &HStringArg, relativeUri: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithRelativeUri)(self as *const _ as *mut _, baseUri.get(), relativeUri.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IUriRuntimeClassWithAbsoluteCanonicalUri, 1972213345, 8732, 18447, 163, 57, 80, 101, 102, 115, 244, 111); RT_INTERFACE!{interface IUriRuntimeClassWithAbsoluteCanonicalUri(IUriRuntimeClassWithAbsoluteCanonicalUriVtbl): IInspectable(IInspectableVtbl) [IID_IUriRuntimeClassWithAbsoluteCanonicalUri] { @@ -1157,23 +1157,23 @@ RT_INTERFACE!{interface IUriRuntimeClassWithAbsoluteCanonicalUri(IUriRuntimeClas fn get_DisplayIri(&self, out: *mut HSTRING) -> HRESULT }} impl IUriRuntimeClassWithAbsoluteCanonicalUri { - #[inline] pub unsafe fn get_absolute_canonical_uri(&self) -> Result { + #[inline] pub fn get_absolute_canonical_uri(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AbsoluteCanonicalUri)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_iri(&self) -> Result { + }} + #[inline] pub fn get_display_iri(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayIri)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class WwwFormUrlDecoder: IWwwFormUrlDecoderRuntimeClass} impl RtActivatable for WwwFormUrlDecoder {} impl WwwFormUrlDecoder { - #[inline] pub fn create_www_form_url_decoder(query: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_www_form_url_decoder(query: &HStringArg) -> Result> { >::get_activation_factory().create_www_form_url_decoder(query) - }} + } } DEFINE_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]) [CLSID_WwwFormUrlDecoder]); DEFINE_IID!(IID_IWwwFormUrlDecoderEntry, 308180017, 63096, 20110, 182, 112, 32, 169, 176, 108, 81, 45); @@ -1182,16 +1182,16 @@ RT_INTERFACE!{interface IWwwFormUrlDecoderEntry(IWwwFormUrlDecoderEntryVtbl): II fn get_Value(&self, out: *mut HSTRING) -> HRESULT }} impl IWwwFormUrlDecoderEntry { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result { + }} + #[inline] pub fn get_value(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class WwwFormUrlDecoderEntry: IWwwFormUrlDecoderEntry} DEFINE_IID!(IID_IWwwFormUrlDecoderRuntimeClass, 3562669137, 61989, 17730, 146, 150, 14, 29, 245, 210, 84, 223); @@ -1199,22 +1199,22 @@ RT_INTERFACE!{interface IWwwFormUrlDecoderRuntimeClass(IWwwFormUrlDecoderRuntime fn GetFirstValueByName(&self, name: HSTRING, out: *mut HSTRING) -> HRESULT }} impl IWwwFormUrlDecoderRuntimeClass { - #[inline] pub unsafe fn get_first_value_by_name(&self, name: &HStringArg) -> Result { + #[inline] pub fn get_first_value_by_name(&self, name: &HStringArg) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFirstValueByName)(self as *const _ as *mut _, 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(&self, query: HSTRING, out: *mut *mut WwwFormUrlDecoder) -> HRESULT }} impl IWwwFormUrlDecoderRuntimeClassFactory { - #[inline] pub unsafe fn create_www_form_url_decoder(&self, query: &HStringArg) -> Result> { + #[inline] pub fn create_www_form_url_decoder(&self, query: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWwwFormUrlDecoder)(self as *const _ as *mut _, query.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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 } @@ -3160,11 +3160,11 @@ RT_INTERFACE!{interface IIterable(IIterableVtbl): IInspectable(IInspectableVt fn First(&self, out: *mut *mut IIterator) -> HRESULT }} impl IIterable { - #[inline] pub unsafe fn first(&self) -> Result>> { + #[inline] pub fn first(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).First)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IIterator, 1786374243, 17152, 17818, 153, 102, 203, 182, 96, 150, 62, 225); RT_INTERFACE!{interface IIterator(IIteratorVtbl): IInspectable(IInspectableVtbl) [IID_IIterator] { @@ -3174,27 +3174,27 @@ RT_INTERFACE!{interface IIterator(IIteratorVtbl): IInspectable(IInspectableVt fn GetMany(&self, itemsSize: u32, items: *mut T::Abi, out: *mut u32) -> HRESULT }} impl IIterator { - #[inline] pub unsafe fn get_current(&self) -> Result { + #[inline] pub fn get_current(&self) -> Result { unsafe { let mut out = T::uninitialized(); let hr = ((*self.lpVtbl).get_Current)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(T::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_current(&self) -> Result { + }} + #[inline] pub fn get_has_current(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasCurrent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn move_next(&self) -> Result { + }} + #[inline] pub fn move_next(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).MoveNext)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_many(&self, items: &mut Vec) -> Result<()> { + }} + #[inline] pub fn get_many(&self, items: &mut Vec) -> Result<()> { unsafe { debug_assert!(items.capacity() > 0, "capacity of `items` must not be 0 (use Vec::with_capacity)"); items.clear(); let mut out = zeroed(); let hr = ((*self.lpVtbl).GetMany)(self as *const _ as *mut _, items.capacity() as u32, items.as_mut_ptr() as *mut T::Abi, &mut out); if hr == S_OK { items.set_len(out as usize); Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IKeyValuePair, 45422889, 49604, 19070, 137, 64, 3, 18, 181, 193, 133, 0); RT_INTERFACE!{interface IKeyValuePair(IKeyValuePairVtbl): IInspectable(IInspectableVtbl) [IID_IKeyValuePair] { @@ -3202,16 +3202,16 @@ RT_INTERFACE!{interface IKeyValuePair(IKeyValuePairVtbl): IInspectable(IIn fn get_Value(&self, out: *mut V::Abi) -> HRESULT }} impl IKeyValuePair { - #[inline] pub unsafe fn get_key(&self) -> Result { + #[inline] pub fn get_key(&self) -> Result { unsafe { let mut out = K::uninitialized(); let hr = ((*self.lpVtbl).get_Key)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(K::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result { + }} + #[inline] pub fn get_value(&self) -> Result { unsafe { let mut out = V::uninitialized(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(V::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMap, 1009329662, 34073, 17857, 170, 121, 25, 123, 103, 24, 193, 193); RT_INTERFACE!{interface IMap(IMapVtbl): IInspectable(IInspectableVtbl) [IID_IMap] { @@ -3224,39 +3224,39 @@ RT_INTERFACE!{interface IMap(IMapVtbl): IInspectable(IInspectableVtbl) [II fn Clear(&self) -> HRESULT }} impl IMap { - #[inline] pub unsafe fn lookup(&self, key: &K::In) -> Result { + #[inline] pub fn lookup(&self, key: &K::In) -> Result { unsafe { let mut out = V::uninitialized(); let hr = ((*self.lpVtbl).Lookup)(self as *const _ as *mut _, K::unwrap(key), &mut out); if hr == S_OK { Ok(V::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_size(&self) -> Result { + }} + #[inline] pub fn get_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Size)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn has_key(&self, key: &K::In) -> Result { + }} + #[inline] pub fn has_key(&self, key: &K::In) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).HasKey)(self as *const _ as *mut _, K::unwrap(key), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_view(&self) -> Result>> { + }} + #[inline] pub fn get_view(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn insert(&self, key: &K::In, value: &V::In) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn insert(&self, key: &K::In, value: &V::In) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).Insert)(self as *const _ as *mut _, K::unwrap(key), V::unwrap(value), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove(&self, key: &K::In) -> Result<()> { + }} + #[inline] pub fn remove(&self, key: &K::In) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Remove)(self as *const _ as *mut _, K::unwrap(key)); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn clear(&self) -> Result<()> { + }} + #[inline] pub fn clear(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Clear)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMapChangedEventArgs, 2570712287, 1290, 19471, 170, 96, 119, 7, 95, 156, 71, 119); RT_INTERFACE!{interface IMapChangedEventArgs(IMapChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMapChangedEventArgs] { @@ -3264,26 +3264,26 @@ RT_INTERFACE!{interface IMapChangedEventArgs(IMapChangedEventArgsVtbl): IInsp fn get_Key(&self, out: *mut K::Abi) -> HRESULT }} impl IMapChangedEventArgs { - #[inline] pub unsafe fn get_collection_change(&self) -> Result { + #[inline] pub fn get_collection_change(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CollectionChange)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_key(&self) -> Result { + }} + #[inline] pub fn get_key(&self) -> Result { unsafe { let mut out = K::uninitialized(); let hr = ((*self.lpVtbl).get_Key)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(K::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_MapChangedEventHandler, 395646963, 38126, 16888, 189, 220, 118, 138, 137, 85, 68, 243); RT_DELEGATE!{delegate MapChangedEventHandler(MapChangedEventHandlerVtbl, MapChangedEventHandlerImpl) [IID_MapChangedEventHandler] { fn Invoke(&self, sender: *mut IObservableMap, event: *mut IMapChangedEventArgs) -> HRESULT }} impl MapChangedEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &IObservableMap, event: &IMapChangedEventArgs) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &IObservableMap, event: &IMapChangedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, event as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMapView, 3833646656, 41784, 19162, 173, 207, 39, 34, 114, 228, 140, 185); RT_INTERFACE!{interface IMapView(IMapViewVtbl): IInspectable(IInspectableVtbl) [IID_IMapView] { @@ -3293,26 +3293,26 @@ RT_INTERFACE!{interface IMapView(IMapViewVtbl): IInspectable(IInspectableV fn Split(&self, first: *mut *mut IMapView, second: *mut *mut IMapView) -> HRESULT }} impl IMapView { - #[inline] pub unsafe fn lookup(&self, key: &K::In) -> Result { + #[inline] pub fn lookup(&self, key: &K::In) -> Result { unsafe { let mut out = V::uninitialized(); let hr = ((*self.lpVtbl).Lookup)(self as *const _ as *mut _, K::unwrap(key), &mut out); if hr == S_OK { Ok(V::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_size(&self) -> Result { + }} + #[inline] pub fn get_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Size)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn has_key(&self, key: &K::In) -> Result { + }} + #[inline] pub fn has_key(&self, key: &K::In) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).HasKey)(self as *const _ as *mut _, K::unwrap(key), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn split(&self) -> Result<(ComPtr>, ComPtr>)> { + }} + #[inline] pub fn split(&self) -> Result<(Option>>, Option>>)> { unsafe { let mut first = null_mut(); let mut second = null_mut(); let hr = ((*self.lpVtbl).Split)(self as *const _ as *mut _, &mut first, &mut second); - if hr == S_OK { Ok((ComPtr::wrap(first), ComPtr::wrap(second))) } else { err(hr) } - } + if hr == S_OK { Ok((ComPtr::wrap_optional(first), ComPtr::wrap_optional(second))) } else { err(hr) } + }} } DEFINE_IID!(IID_IObservableMap, 1709124597, 48953, 16821, 174, 188, 90, 157, 134, 94, 71, 43); RT_INTERFACE!{interface IObservableMap(IObservableMapVtbl): IInspectable(IInspectableVtbl) [IID_IObservableMap] { @@ -3320,15 +3320,15 @@ RT_INTERFACE!{interface IObservableMap(IObservableMapVtbl): IInspectable(I fn remove_MapChanged(&self, token: super::EventRegistrationToken) -> HRESULT }} impl IObservableMap { - #[inline] pub unsafe fn add_map_changed(&self, vhnd: &MapChangedEventHandler) -> Result { + #[inline] pub fn add_map_changed(&self, vhnd: &MapChangedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_MapChanged)(self as *const _ as *mut _, vhnd as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_map_changed(&self, token: super::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_map_changed(&self, token: super::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_MapChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IObservableVector, 1494739795, 20660, 18957, 179, 9, 101, 134, 43, 63, 29, 188); RT_INTERFACE!{interface IObservableVector(IObservableVectorVtbl): IInspectable(IInspectableVtbl) [IID_IObservableVector] { @@ -3336,15 +3336,15 @@ RT_INTERFACE!{interface IObservableVector(IObservableVectorVtbl): IInspectabl fn remove_VectorChanged(&self, token: super::EventRegistrationToken) -> HRESULT }} impl IObservableVector { - #[inline] pub unsafe fn add_vector_changed(&self, vhnd: &VectorChangedEventHandler) -> Result { + #[inline] pub fn add_vector_changed(&self, vhnd: &VectorChangedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_VectorChanged)(self as *const _ as *mut _, vhnd as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_vector_changed(&self, token: super::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_vector_changed(&self, token: super::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_VectorChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IPropertySet, 2319707551, 62694, 17441, 172, 249, 29, 171, 41, 134, 130, 12); RT_INTERFACE!{interface IPropertySet(IPropertySetVtbl): IInspectable(IInspectableVtbl) [IID_IPropertySet] { @@ -3375,60 +3375,60 @@ RT_INTERFACE!{interface IVector(IVectorVtbl): IInspectable(IInspectableVtbl) fn ReplaceAll(&self, itemsSize: u32, items: *mut T::Abi) -> HRESULT }} impl IVector { - #[inline] pub unsafe fn get_at(&self, index: u32) -> Result { + #[inline] pub fn get_at(&self, index: u32) -> Result { unsafe { let mut out = T::uninitialized(); let hr = ((*self.lpVtbl).GetAt)(self as *const _ as *mut _, index, &mut out); if hr == S_OK { Ok(T::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_size(&self) -> Result { + }} + #[inline] pub fn get_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Size)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_view(&self) -> Result>> { + }} + #[inline] pub fn get_view(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn index_of(&self, value: &T::In) -> Result<(u32, bool)> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn index_of(&self, value: &T::In) -> Result<(u32, bool)> { unsafe { let mut index = zeroed(); let mut out = zeroed(); let hr = ((*self.lpVtbl).IndexOf)(self as *const _ as *mut _, T::unwrap(value), &mut index, &mut out); if hr == S_OK { Ok((index, out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_at(&self, index: u32, value: &T::In) -> Result<()> { + }} + #[inline] pub fn set_at(&self, index: u32, value: &T::In) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetAt)(self as *const _ as *mut _, index, T::unwrap(value)); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn insert_at(&self, index: u32, value: &T::In) -> Result<()> { + }} + #[inline] pub fn insert_at(&self, index: u32, value: &T::In) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InsertAt)(self as *const _ as *mut _, index, T::unwrap(value)); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove_at(&self, index: u32) -> Result<()> { + }} + #[inline] pub fn remove_at(&self, index: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveAt)(self as *const _ as *mut _, index); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn append(&self, value: &T::In) -> Result<()> { + }} + #[inline] pub fn append(&self, value: &T::In) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Append)(self as *const _ as *mut _, T::unwrap(value)); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove_at_end(&self) -> Result<()> { + }} + #[inline] pub fn remove_at_end(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveAtEnd)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn clear(&self) -> Result<()> { + }} + #[inline] pub fn clear(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Clear)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_many(&self, startIndex: u32, items: &mut Vec) -> Result<()> { + }} + #[inline] pub fn get_many(&self, startIndex: u32, items: &mut Vec) -> Result<()> { unsafe { debug_assert!(items.capacity() > 0, "capacity of `items` must not be 0 (use Vec::with_capacity)"); items.clear(); let mut out = zeroed(); let hr = ((*self.lpVtbl).GetMany)(self as *const _ as *mut _, startIndex, items.capacity() as u32, items.as_mut_ptr() as *mut T::Abi, &mut out); if hr == S_OK { items.set_len(out as usize); Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn replace_all(&self, items: &[&T::In]) -> Result<()> { + }} + #[inline] pub fn replace_all(&self, items: &[&T::In]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReplaceAll)(self as *const _ as *mut _, items.len() as u32, items.as_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IVectorChangedEventArgs, 1465463775, 13566, 17536, 175, 21, 7, 105, 31, 61, 93, 155); RT_INTERFACE!{interface IVectorChangedEventArgs(IVectorChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IVectorChangedEventArgs] { @@ -3436,26 +3436,26 @@ RT_INTERFACE!{interface IVectorChangedEventArgs(IVectorChangedEventArgsVtbl): II fn get_Index(&self, out: *mut u32) -> HRESULT }} impl IVectorChangedEventArgs { - #[inline] pub unsafe fn get_collection_change(&self) -> Result { + #[inline] pub fn get_collection_change(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CollectionChange)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_index(&self) -> Result { + }} + #[inline] pub fn get_index(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Index)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_VectorChangedEventHandler, 201660242, 40895, 19568, 170, 12, 14, 76, 130, 217, 167, 97); RT_DELEGATE!{delegate VectorChangedEventHandler(VectorChangedEventHandlerVtbl, VectorChangedEventHandlerImpl) [IID_VectorChangedEventHandler] { fn Invoke(&self, sender: *mut IObservableVector, event: *mut IVectorChangedEventArgs) -> HRESULT }} impl VectorChangedEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &IObservableVector, event: &IVectorChangedEventArgs) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &IObservableVector, event: &IVectorChangedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, event as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IVectorView, 3152149068, 45283, 17795, 186, 239, 31, 27, 46, 72, 62, 86); RT_INTERFACE!{interface IVectorView(IVectorViewVtbl): IInspectable(IInspectableVtbl) [IID_IVectorView] { @@ -3465,27 +3465,27 @@ RT_INTERFACE!{interface IVectorView(IVectorViewVtbl): IInspectable(IInspectab fn GetMany(&self, startIndex: u32, itemsSize: u32, items: *mut T::Abi, out: *mut u32) -> HRESULT }} impl IVectorView { - #[inline] pub unsafe fn get_at(&self, index: u32) -> Result { + #[inline] pub fn get_at(&self, index: u32) -> Result { unsafe { let mut out = T::uninitialized(); let hr = ((*self.lpVtbl).GetAt)(self as *const _ as *mut _, index, &mut out); if hr == S_OK { Ok(T::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_size(&self) -> Result { + }} + #[inline] pub fn get_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Size)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn index_of(&self, value: &T::In) -> Result<(u32, bool)> { + }} + #[inline] pub fn index_of(&self, value: &T::In) -> Result<(u32, bool)> { unsafe { let mut index = zeroed(); let mut out = zeroed(); let hr = ((*self.lpVtbl).IndexOf)(self as *const _ as *mut _, T::unwrap(value), &mut index, &mut out); if hr == S_OK { Ok((index, out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_many(&self, startIndex: u32, items: &mut Vec) -> Result<()> { + }} + #[inline] pub fn get_many(&self, startIndex: u32, items: &mut Vec) -> Result<()> { unsafe { debug_assert!(items.capacity() > 0, "capacity of `items` must not be 0 (use Vec::with_capacity)"); items.clear(); let mut out = zeroed(); let hr = ((*self.lpVtbl).GetMany)(self as *const _ as *mut _, startIndex, items.capacity() as u32, items.as_mut_ptr() as *mut T::Abi, &mut out); if hr == S_OK { items.set_len(out as usize); Ok(()) } else { err(hr) } - } + }} } RT_PINTERFACE!{ for IIterable => [0x30160817,0x1d7d,0x54e9,0x99,0xdb,0xd7,0x63,0x62,0x66,0xa4,0x76] as IID_IIterable_1_System_Boolean } RT_PINTERFACE!{ for IIterable => [0xb01bee51,0x063a,0x5fda,0xbd,0x72,0xd7,0x66,0x37,0xbb,0x8c,0xb8] as IID_IIterable_1_System_Single } @@ -5315,36 +5315,36 @@ use ::prelude::*; RT_CLASS!{static class ApiInformation} impl RtActivatable for ApiInformation {} impl ApiInformation { - #[inline] pub fn is_type_present(typeName: &HStringArg) -> Result { unsafe { + #[inline] pub fn is_type_present(typeName: &HStringArg) -> Result { >::get_activation_factory().is_type_present(typeName) - }} - #[inline] pub fn is_method_present(typeName: &HStringArg, methodName: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn is_method_present(typeName: &HStringArg, methodName: &HStringArg) -> Result { >::get_activation_factory().is_method_present(typeName, methodName) - }} - #[inline] pub fn is_method_present_with_arity(typeName: &HStringArg, methodName: &HStringArg, inputParameterCount: u32) -> Result { unsafe { + } + #[inline] pub fn is_method_present_with_arity(typeName: &HStringArg, methodName: &HStringArg, inputParameterCount: u32) -> Result { >::get_activation_factory().is_method_present_with_arity(typeName, methodName, inputParameterCount) - }} - #[inline] pub fn is_event_present(typeName: &HStringArg, eventName: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn is_event_present(typeName: &HStringArg, eventName: &HStringArg) -> Result { >::get_activation_factory().is_event_present(typeName, eventName) - }} - #[inline] pub fn is_property_present(typeName: &HStringArg, propertyName: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn is_property_present(typeName: &HStringArg, propertyName: &HStringArg) -> Result { >::get_activation_factory().is_property_present(typeName, propertyName) - }} - #[inline] pub fn is_read_only_property_present(typeName: &HStringArg, propertyName: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn is_read_only_property_present(typeName: &HStringArg, propertyName: &HStringArg) -> Result { >::get_activation_factory().is_read_only_property_present(typeName, propertyName) - }} - #[inline] pub fn is_writeable_property_present(typeName: &HStringArg, propertyName: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn is_writeable_property_present(typeName: &HStringArg, propertyName: &HStringArg) -> Result { >::get_activation_factory().is_writeable_property_present(typeName, propertyName) - }} - #[inline] pub fn is_enum_named_value_present(enumTypeName: &HStringArg, valueName: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn is_enum_named_value_present(enumTypeName: &HStringArg, valueName: &HStringArg) -> Result { >::get_activation_factory().is_enum_named_value_present(enumTypeName, valueName) - }} - #[inline] pub fn is_api_contract_present_by_major(contractName: &HStringArg, majorVersion: u16) -> Result { unsafe { + } + #[inline] pub fn is_api_contract_present_by_major(contractName: &HStringArg, majorVersion: u16) -> Result { >::get_activation_factory().is_api_contract_present_by_major(contractName, majorVersion) - }} - #[inline] pub fn is_api_contract_present_by_major_and_minor(contractName: &HStringArg, majorVersion: u16, minorVersion: u16) -> Result { unsafe { + } + #[inline] pub fn is_api_contract_present_by_major_and_minor(contractName: &HStringArg, majorVersion: u16, minorVersion: u16) -> Result { >::get_activation_factory().is_api_contract_present_by_major_and_minor(contractName, majorVersion, minorVersion) - }} + } } DEFINE_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]) [CLSID_ApiInformation]); DEFINE_IID!(IID_IApiInformationStatics, 2574531070, 63105, 18961, 180, 22, 193, 58, 71, 232, 186, 54); @@ -5361,56 +5361,56 @@ RT_INTERFACE!{static interface IApiInformationStatics(IApiInformationStaticsVtbl fn IsApiContractPresentByMajorAndMinor(&self, contractName: HSTRING, majorVersion: u16, minorVersion: u16, out: *mut bool) -> HRESULT }} impl IApiInformationStatics { - #[inline] pub unsafe fn is_type_present(&self, typeName: &HStringArg) -> Result { + #[inline] pub fn is_type_present(&self, typeName: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsTypePresent)(self as *const _ as *mut _, typeName.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_method_present(&self, typeName: &HStringArg, methodName: &HStringArg) -> Result { + }} + #[inline] pub fn is_method_present(&self, typeName: &HStringArg, methodName: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsMethodPresent)(self as *const _ as *mut _, typeName.get(), methodName.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_method_present_with_arity(&self, typeName: &HStringArg, methodName: &HStringArg, inputParameterCount: u32) -> Result { + }} + #[inline] pub fn is_method_present_with_arity(&self, typeName: &HStringArg, methodName: &HStringArg, inputParameterCount: u32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsMethodPresentWithArity)(self as *const _ as *mut _, typeName.get(), methodName.get(), inputParameterCount, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_event_present(&self, typeName: &HStringArg, eventName: &HStringArg) -> Result { + }} + #[inline] pub fn is_event_present(&self, typeName: &HStringArg, eventName: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsEventPresent)(self as *const _ as *mut _, typeName.get(), eventName.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_property_present(&self, typeName: &HStringArg, propertyName: &HStringArg) -> Result { + }} + #[inline] pub fn is_property_present(&self, typeName: &HStringArg, propertyName: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsPropertyPresent)(self as *const _ as *mut _, typeName.get(), propertyName.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_read_only_property_present(&self, typeName: &HStringArg, propertyName: &HStringArg) -> Result { + }} + #[inline] pub fn is_read_only_property_present(&self, typeName: &HStringArg, propertyName: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsReadOnlyPropertyPresent)(self as *const _ as *mut _, typeName.get(), propertyName.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_writeable_property_present(&self, typeName: &HStringArg, propertyName: &HStringArg) -> Result { + }} + #[inline] pub fn is_writeable_property_present(&self, typeName: &HStringArg, propertyName: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsWriteablePropertyPresent)(self as *const _ as *mut _, typeName.get(), propertyName.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_enum_named_value_present(&self, enumTypeName: &HStringArg, valueName: &HStringArg) -> Result { + }} + #[inline] pub fn is_enum_named_value_present(&self, enumTypeName: &HStringArg, valueName: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsEnumNamedValuePresent)(self as *const _ as *mut _, 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(&self, contractName: &HStringArg, majorVersion: u16) -> Result { + }} + #[inline] pub fn is_api_contract_present_by_major(&self, contractName: &HStringArg, majorVersion: u16) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsApiContractPresentByMajor)(self as *const _ as *mut _, 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(&self, contractName: &HStringArg, majorVersion: u16, minorVersion: u16) -> Result { + }} + #[inline] pub fn is_api_contract_present_by_major_and_minor(&self, contractName: &HStringArg, majorVersion: u16, minorVersion: u16) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsApiContractPresentByMajorAndMinor)(self as *const _ as *mut _, contractName.get(), majorVersion, minorVersion, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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, @@ -5442,27 +5442,27 @@ use ::prelude::*; RT_CLASS!{static class AsyncCausalityTracer} impl RtActivatable for AsyncCausalityTracer {} impl AsyncCausalityTracer { - #[inline] pub fn trace_operation_creation(traceLevel: CausalityTraceLevel, source: CausalitySource, platformId: Guid, operationId: u64, operationName: &HStringArg, relatedContext: u64) -> Result<()> { unsafe { + #[inline] pub fn trace_operation_creation(traceLevel: CausalityTraceLevel, source: CausalitySource, platformId: Guid, operationId: u64, operationName: &HStringArg, relatedContext: u64) -> Result<()> { >::get_activation_factory().trace_operation_creation(traceLevel, source, platformId, operationId, operationName, relatedContext) - }} - #[inline] pub fn trace_operation_completion(traceLevel: CausalityTraceLevel, source: CausalitySource, platformId: Guid, operationId: u64, status: super::AsyncStatus) -> Result<()> { unsafe { + } + #[inline] pub fn trace_operation_completion(traceLevel: CausalityTraceLevel, source: CausalitySource, platformId: Guid, operationId: u64, status: super::AsyncStatus) -> Result<()> { >::get_activation_factory().trace_operation_completion(traceLevel, source, platformId, operationId, status) - }} - #[inline] pub fn trace_operation_relation(traceLevel: CausalityTraceLevel, source: CausalitySource, platformId: Guid, operationId: u64, relation: CausalityRelation) -> Result<()> { unsafe { + } + #[inline] pub fn trace_operation_relation(traceLevel: CausalityTraceLevel, source: CausalitySource, platformId: Guid, operationId: u64, relation: CausalityRelation) -> Result<()> { >::get_activation_factory().trace_operation_relation(traceLevel, source, platformId, operationId, relation) - }} - #[inline] pub fn trace_synchronous_work_start(traceLevel: CausalityTraceLevel, source: CausalitySource, platformId: Guid, operationId: u64, work: CausalitySynchronousWork) -> Result<()> { unsafe { + } + #[inline] pub fn trace_synchronous_work_start(traceLevel: CausalityTraceLevel, source: CausalitySource, platformId: Guid, operationId: u64, work: CausalitySynchronousWork) -> Result<()> { >::get_activation_factory().trace_synchronous_work_start(traceLevel, source, platformId, operationId, work) - }} - #[inline] pub fn trace_synchronous_work_completion(traceLevel: CausalityTraceLevel, source: CausalitySource, work: CausalitySynchronousWork) -> Result<()> { unsafe { + } + #[inline] pub fn trace_synchronous_work_completion(traceLevel: CausalityTraceLevel, source: CausalitySource, work: CausalitySynchronousWork) -> Result<()> { >::get_activation_factory().trace_synchronous_work_completion(traceLevel, source, work) - }} - #[inline] pub fn add_tracing_status_changed(handler: &super::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_tracing_status_changed(handler: &super::EventHandler) -> Result { >::get_activation_factory().add_tracing_status_changed(handler) - }} - #[inline] pub fn remove_tracing_status_changed(cookie: super::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_tracing_status_changed(cookie: super::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_tracing_status_changed(cookie) - }} + } } DEFINE_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]) [CLSID_AsyncCausalityTracer]); DEFINE_IID!(IID_IAsyncCausalityTracerStatics, 1350896422, 9854, 17691, 168, 144, 171, 106, 55, 2, 69, 238); @@ -5476,35 +5476,35 @@ RT_INTERFACE!{static interface IAsyncCausalityTracerStatics(IAsyncCausalityTrace fn remove_TracingStatusChanged(&self, cookie: super::EventRegistrationToken) -> HRESULT }} impl IAsyncCausalityTracerStatics { - #[inline] pub unsafe fn trace_operation_creation(&self, traceLevel: CausalityTraceLevel, source: CausalitySource, platformId: Guid, operationId: u64, operationName: &HStringArg, relatedContext: u64) -> Result<()> { + #[inline] pub fn trace_operation_creation(&self, traceLevel: CausalityTraceLevel, source: CausalitySource, platformId: Guid, operationId: u64, operationName: &HStringArg, relatedContext: u64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).TraceOperationCreation)(self as *const _ as *mut _, traceLevel, source, platformId, operationId, operationName.get(), relatedContext); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn trace_operation_completion(&self, traceLevel: CausalityTraceLevel, source: CausalitySource, platformId: Guid, operationId: u64, status: super::AsyncStatus) -> Result<()> { + }} + #[inline] pub fn trace_operation_completion(&self, traceLevel: CausalityTraceLevel, source: CausalitySource, platformId: Guid, operationId: u64, status: super::AsyncStatus) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).TraceOperationCompletion)(self as *const _ as *mut _, traceLevel, source, platformId, operationId, status); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn trace_operation_relation(&self, traceLevel: CausalityTraceLevel, source: CausalitySource, platformId: Guid, operationId: u64, relation: CausalityRelation) -> Result<()> { + }} + #[inline] pub fn trace_operation_relation(&self, traceLevel: CausalityTraceLevel, source: CausalitySource, platformId: Guid, operationId: u64, relation: CausalityRelation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).TraceOperationRelation)(self as *const _ as *mut _, traceLevel, source, platformId, operationId, relation); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn trace_synchronous_work_start(&self, traceLevel: CausalityTraceLevel, source: CausalitySource, platformId: Guid, operationId: u64, work: CausalitySynchronousWork) -> Result<()> { + }} + #[inline] pub fn trace_synchronous_work_start(&self, traceLevel: CausalityTraceLevel, source: CausalitySource, platformId: Guid, operationId: u64, work: CausalitySynchronousWork) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).TraceSynchronousWorkStart)(self as *const _ as *mut _, traceLevel, source, platformId, operationId, work); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn trace_synchronous_work_completion(&self, traceLevel: CausalityTraceLevel, source: CausalitySource, work: CausalitySynchronousWork) -> Result<()> { + }} + #[inline] pub fn trace_synchronous_work_completion(&self, traceLevel: CausalityTraceLevel, source: CausalitySource, work: CausalitySynchronousWork) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).TraceSynchronousWorkCompletion)(self as *const _ as *mut _, traceLevel, source, work); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_tracing_status_changed(&self, handler: &super::EventHandler) -> Result { + }} + #[inline] pub fn add_tracing_status_changed(&self, handler: &super::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_TracingStatusChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_tracing_status_changed(&self, cookie: super::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_tracing_status_changed(&self, cookie: super::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_TracingStatusChanged)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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, @@ -5525,28 +5525,28 @@ RT_INTERFACE!{interface IErrorDetails(IErrorDetailsVtbl): IInspectable(IInspecta fn get_HelpUri(&self, out: *mut *mut super::Uri) -> HRESULT }} impl IErrorDetails { - #[inline] pub unsafe fn get_description(&self) -> Result { + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_long_description(&self) -> Result { + }} + #[inline] pub fn get_long_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LongDescription)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_help_uri(&self) -> Result> { + }} + #[inline] pub fn get_help_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HelpUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ErrorDetails: IErrorDetails} impl RtActivatable for ErrorDetails {} impl ErrorDetails { - #[inline] pub fn create_from_hresult_async(errorCode: i32) -> Result>> { unsafe { + #[inline] pub fn create_from_hresult_async(errorCode: i32) -> Result>> { >::get_activation_factory().create_from_hresult_async(errorCode) - }} + } } DEFINE_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]) [CLSID_ErrorDetails]); DEFINE_IID!(IID_IErrorDetailsStatics, 3077584720, 2845, 18120, 170, 14, 75, 129, 120, 228, 252, 233); @@ -5554,11 +5554,11 @@ RT_INTERFACE!{static interface IErrorDetailsStatics(IErrorDetailsStaticsVtbl): I fn CreateFromHResultAsync(&self, errorCode: i32, out: *mut *mut super::IAsyncOperation) -> HRESULT }} impl IErrorDetailsStatics { - #[inline] pub unsafe fn create_from_hresult_async(&self, errorCode: i32) -> Result>> { + #[inline] pub fn create_from_hresult_async(&self, errorCode: i32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromHResultAsync)(self as *const _ as *mut _, errorCode, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -5569,15 +5569,15 @@ RT_INTERFACE!{interface IErrorReportingSettings(IErrorReportingSettingsVtbl): II fn GetErrorOptions(&self, out: *mut ErrorOptions) -> HRESULT }} impl IErrorReportingSettings { - #[inline] pub unsafe fn set_error_options(&self, value: ErrorOptions) -> Result<()> { + #[inline] pub fn set_error_options(&self, value: ErrorOptions) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetErrorOptions)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_error_options(&self) -> Result { + }} + #[inline] pub fn get_error_options(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetErrorOptions)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IFileLoggingSession, 617038358, 65234, 16460, 137, 95, 31, 150, 153, 203, 2, 247); RT_INTERFACE!{interface IFileLoggingSession(IFileLoggingSessionVtbl): IInspectable(IInspectableVtbl) [IID_IFileLoggingSession] { @@ -5591,44 +5591,44 @@ RT_INTERFACE!{interface IFileLoggingSession(IFileLoggingSessionVtbl): IInspectab fn remove_LogFileGenerated(&self, token: super::EventRegistrationToken) -> HRESULT }} impl IFileLoggingSession { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_logging_channel(&self, loggingChannel: &ILoggingChannel) -> Result<()> { + }} + #[inline] pub fn add_logging_channel(&self, loggingChannel: &ILoggingChannel) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddLoggingChannel)(self as *const _ as *mut _, loggingChannel as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_logging_channel_with_level(&self, loggingChannel: &ILoggingChannel, maxLevel: LoggingLevel) -> Result<()> { + }} + #[inline] pub fn add_logging_channel_with_level(&self, loggingChannel: &ILoggingChannel, maxLevel: LoggingLevel) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddLoggingChannelWithLevel)(self as *const _ as *mut _, loggingChannel as *const _ as *mut _, maxLevel); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove_logging_channel(&self, loggingChannel: &ILoggingChannel) -> Result<()> { + }} + #[inline] pub fn remove_logging_channel(&self, loggingChannel: &ILoggingChannel) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveLoggingChannel)(self as *const _ as *mut _, 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(&self) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn close_and_save_to_file_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CloseAndSaveToFileAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_log_file_generated(&self, handler: &super::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_log_file_generated(&self, handler: &super::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_LogFileGenerated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_log_file_generated(&self, token: super::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_log_file_generated(&self, token: super::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_LogFileGenerated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class FileLoggingSession: IFileLoggingSession} impl RtActivatable for FileLoggingSession {} impl FileLoggingSession { - #[inline] pub fn create(name: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(name: &HStringArg) -> Result> { >::get_activation_factory().create(name) - }} + } } DEFINE_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]) [CLSID_FileLoggingSession]); DEFINE_IID!(IID_IFileLoggingSessionFactory, 4003499470, 33863, 19882, 145, 51, 18, 235, 70, 246, 151, 212); @@ -5636,22 +5636,22 @@ RT_INTERFACE!{static interface IFileLoggingSessionFactory(IFileLoggingSessionFac fn Create(&self, name: HSTRING, out: *mut *mut FileLoggingSession) -> HRESULT }} impl IFileLoggingSessionFactory { - #[inline] pub unsafe fn create(&self, name: &HStringArg) -> Result> { + #[inline] pub fn create(&self, name: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, name.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::super::storage::StorageFile) -> HRESULT }} impl ILogFileGeneratedEventArgs { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_file(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_file(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_File)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class LogFileGeneratedEventArgs: ILogFileGeneratedEventArgs} DEFINE_IID!(IID_ILoggingActivity, 3154323777, 46950, 19637, 152, 72, 151, 172, 107, 166, 214, 12); @@ -5660,26 +5660,26 @@ RT_INTERFACE!{interface ILoggingActivity(ILoggingActivityVtbl): IInspectable(IIn fn get_Id(&self, out: *mut Guid) -> HRESULT }} impl ILoggingActivity { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&self) -> Result { + }} + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class LoggingActivity: ILoggingActivity} impl RtActivatable for LoggingActivity {} impl LoggingActivity { - #[inline] pub fn create_logging_activity(activityName: &HStringArg, loggingChannel: &ILoggingChannel) -> Result> { unsafe { + #[inline] pub fn create_logging_activity(activityName: &HStringArg, loggingChannel: &ILoggingChannel) -> Result> { >::get_activation_factory().create_logging_activity(activityName, loggingChannel) - }} - #[inline] pub fn create_logging_activity_with_level(activityName: &HStringArg, loggingChannel: &ILoggingChannel, level: LoggingLevel) -> Result> { unsafe { + } + #[inline] pub fn create_logging_activity_with_level(activityName: &HStringArg, loggingChannel: &ILoggingChannel, level: LoggingLevel) -> Result> { >::get_activation_factory().create_logging_activity_with_level(activityName, loggingChannel, level) - }} + } } DEFINE_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]) [CLSID_LoggingActivity]); DEFINE_IID!(IID_ILoggingActivity2, 650287112, 25378, 17770, 175, 130, 128, 200, 100, 47, 23, 139); @@ -5690,23 +5690,23 @@ RT_INTERFACE!{interface ILoggingActivity2(ILoggingActivity2Vtbl): IInspectable(I fn StopActivityWithFieldsAndOptions(&self, stopEventName: HSTRING, fields: *mut LoggingFields, options: *mut LoggingOptions) -> HRESULT }} impl ILoggingActivity2 { - #[inline] pub unsafe fn get_channel(&self) -> Result> { + #[inline] pub fn get_channel(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Channel)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn stop_activity(&self, stopEventName: &HStringArg) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn stop_activity(&self, stopEventName: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StopActivity)(self as *const _ as *mut _, stopEventName.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop_activity_with_fields(&self, stopEventName: &HStringArg, fields: &LoggingFields) -> Result<()> { + }} + #[inline] pub fn stop_activity_with_fields(&self, stopEventName: &HStringArg, fields: &LoggingFields) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StopActivityWithFields)(self as *const _ as *mut _, 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(&self, stopEventName: &HStringArg, fields: &LoggingFields, options: &LoggingOptions) -> Result<()> { + }} + #[inline] pub fn stop_activity_with_fields_and_options(&self, stopEventName: &HStringArg, fields: &LoggingFields, options: &LoggingOptions) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StopActivityWithFieldsAndOptions)(self as *const _ as *mut _, 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] { @@ -5714,16 +5714,16 @@ RT_INTERFACE!{static interface ILoggingActivityFactory(ILoggingActivityFactoryVt fn CreateLoggingActivityWithLevel(&self, activityName: HSTRING, loggingChannel: *mut ILoggingChannel, level: LoggingLevel, out: *mut *mut LoggingActivity) -> HRESULT }} impl ILoggingActivityFactory { - #[inline] pub unsafe fn create_logging_activity(&self, activityName: &HStringArg, loggingChannel: &ILoggingChannel) -> Result> { + #[inline] pub fn create_logging_activity(&self, activityName: &HStringArg, loggingChannel: &ILoggingChannel) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateLoggingActivity)(self as *const _ as *mut _, 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(&self, activityName: &HStringArg, loggingChannel: &ILoggingChannel, level: LoggingLevel) -> Result> { + }} + #[inline] pub fn create_logging_activity_with_level(&self, activityName: &HStringArg, loggingChannel: &ILoggingChannel, level: LoggingLevel) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateLoggingActivityWithLevel)(self as *const _ as *mut _, activityName.get(), loggingChannel as *const _ as *mut _, level, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ILoggingChannel, 3919905603, 4567, 20225, 181, 202, 207, 73, 82, 120, 192, 168); RT_INTERFACE!{interface ILoggingChannel(ILoggingChannelVtbl): IInspectable(IInspectableVtbl) [IID_ILoggingChannel] { @@ -5738,60 +5738,60 @@ RT_INTERFACE!{interface ILoggingChannel(ILoggingChannelVtbl): IInspectable(IInsp fn remove_LoggingEnabled(&self, token: super::EventRegistrationToken) -> HRESULT }} impl ILoggingChannel { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_enabled(&self) -> Result { + }} + #[inline] pub fn get_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Enabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_level(&self) -> Result { + }} + #[inline] pub fn get_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Level)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn log_message(&self, eventString: &HStringArg) -> Result<()> { + }} + #[inline] pub fn log_message(&self, eventString: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).LogMessage)(self as *const _ as *mut _, eventString.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn log_message_with_level(&self, eventString: &HStringArg, level: LoggingLevel) -> Result<()> { + }} + #[inline] pub fn log_message_with_level(&self, eventString: &HStringArg, level: LoggingLevel) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).LogMessageWithLevel)(self as *const _ as *mut _, eventString.get(), level); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn log_value_pair(&self, value1: &HStringArg, value2: i32) -> Result<()> { + }} + #[inline] pub fn log_value_pair(&self, value1: &HStringArg, value2: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).LogValuePair)(self as *const _ as *mut _, value1.get(), value2); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn log_value_pair_with_level(&self, value1: &HStringArg, value2: i32, level: LoggingLevel) -> Result<()> { + }} + #[inline] pub fn log_value_pair_with_level(&self, value1: &HStringArg, value2: i32, level: LoggingLevel) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).LogValuePairWithLevel)(self as *const _ as *mut _, value1.get(), value2, level); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_logging_enabled(&self, handler: &super::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_logging_enabled(&self, handler: &super::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_LoggingEnabled)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_logging_enabled(&self, token: super::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_logging_enabled(&self, token: super::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_LoggingEnabled)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class LoggingChannel: ILoggingChannel} impl RtActivatable for LoggingChannel {} impl RtActivatable for LoggingChannel {} impl LoggingChannel { - #[inline] pub fn create(name: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(name: &HStringArg) -> Result> { >::get_activation_factory().create(name) - }} - #[inline] pub fn create_with_options(name: &HStringArg, options: &LoggingChannelOptions) -> Result> { unsafe { + } + #[inline] pub fn create_with_options(name: &HStringArg, options: &LoggingChannelOptions) -> Result> { >::get_activation_factory().create_with_options(name, options) - }} - #[inline] pub fn create_with_options_and_id(name: &HStringArg, options: &LoggingChannelOptions, id: Guid) -> Result> { unsafe { + } + #[inline] pub fn create_with_options_and_id(name: &HStringArg, options: &LoggingChannelOptions, id: Guid) -> Result> { >::get_activation_factory().create_with_options_and_id(name, options, id) - }} + } } DEFINE_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]) [CLSID_LoggingChannel]); DEFINE_IID!(IID_ILoggingChannel2, 2672573683, 2988, 17829, 158, 51, 186, 243, 243, 162, 70, 165); @@ -5799,22 +5799,22 @@ RT_INTERFACE!{interface ILoggingChannel2(ILoggingChannel2Vtbl): IInspectable(IIn fn get_Id(&self, out: *mut Guid) -> HRESULT }} impl ILoggingChannel2 { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &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(&self, name: HSTRING, out: *mut *mut LoggingChannel) -> HRESULT }} impl ILoggingChannelFactory { - #[inline] pub unsafe fn create(&self, name: &HStringArg) -> Result> { + #[inline] pub fn create(&self, name: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, name.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ILoggingChannelFactory2, 1282340317, 15143, 19913, 153, 240, 41, 156, 110, 70, 3, 161); RT_INTERFACE!{static interface ILoggingChannelFactory2(ILoggingChannelFactory2Vtbl): IInspectable(IInspectableVtbl) [IID_ILoggingChannelFactory2] { @@ -5822,16 +5822,16 @@ RT_INTERFACE!{static interface ILoggingChannelFactory2(ILoggingChannelFactory2Vt fn CreateWithOptionsAndId(&self, name: HSTRING, options: *mut LoggingChannelOptions, id: Guid, out: *mut *mut LoggingChannel) -> HRESULT }} impl ILoggingChannelFactory2 { - #[inline] pub unsafe fn create_with_options(&self, name: &HStringArg, options: &LoggingChannelOptions) -> Result> { + #[inline] pub fn create_with_options(&self, name: &HStringArg, options: &LoggingChannelOptions) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithOptions)(self as *const _ as *mut _, 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(&self, name: &HStringArg, options: &LoggingChannelOptions, id: Guid) -> Result> { + }} + #[inline] pub fn create_with_options_and_id(&self, name: &HStringArg, options: &LoggingChannelOptions, id: Guid) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithOptionsAndId)(self as *const _ as *mut _, name.get(), options as *const _ as *mut _, id, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ILoggingChannelOptions, 3286779903, 3771, 19027, 140, 84, 222, 194, 73, 38, 203, 44); RT_INTERFACE!{interface ILoggingChannelOptions(ILoggingChannelOptionsVtbl): IInspectable(IInspectableVtbl) [IID_ILoggingChannelOptions] { @@ -5839,23 +5839,23 @@ RT_INTERFACE!{interface ILoggingChannelOptions(ILoggingChannelOptionsVtbl): IIns fn put_Group(&self, value: Guid) -> HRESULT }} impl ILoggingChannelOptions { - #[inline] pub unsafe fn get_group(&self) -> Result { + #[inline] pub fn get_group(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Group)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_group(&self, value: Guid) -> Result<()> { + }} + #[inline] pub fn set_group(&self, value: Guid) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Group)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class LoggingChannelOptions: ILoggingChannelOptions} impl RtActivatable for LoggingChannelOptions {} impl RtActivatable for LoggingChannelOptions {} impl LoggingChannelOptions { - #[inline] pub fn create(group: Guid) -> Result> { unsafe { + #[inline] pub fn create(group: Guid) -> Result> { >::get_activation_factory().create(group) - }} + } } DEFINE_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]) [CLSID_LoggingChannelOptions]); DEFINE_IID!(IID_ILoggingChannelOptionsFactory, 2838581722, 32687, 16785, 135, 85, 94, 134, 220, 101, 216, 150); @@ -5863,11 +5863,11 @@ RT_INTERFACE!{static interface ILoggingChannelOptionsFactory(ILoggingChannelOpti fn Create(&self, group: Guid, out: *mut *mut LoggingChannelOptions) -> HRESULT }} impl ILoggingChannelOptionsFactory { - #[inline] pub unsafe fn create(&self, group: Guid) -> Result> { + #[inline] pub fn create(&self, group: Guid) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, group, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -5991,466 +5991,466 @@ RT_INTERFACE!{interface ILoggingFields(ILoggingFieldsVtbl): IInspectable(IInspec fn AddRectArrayWithFormatAndTags(&self, name: HSTRING, valueSize: u32, value: *mut super::Rect, format: LoggingFieldFormat, tags: i32) -> HRESULT }} impl ILoggingFields { - #[inline] pub unsafe fn clear(&self) -> Result<()> { + #[inline] pub fn clear(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Clear)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn begin_struct(&self, name: &HStringArg) -> Result<()> { + }} + #[inline] pub fn begin_struct(&self, name: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).BeginStruct)(self as *const _ as *mut _, name.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn begin_struct_with_tags(&self, name: &HStringArg, tags: i32) -> Result<()> { + }} + #[inline] pub fn begin_struct_with_tags(&self, name: &HStringArg, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).BeginStructWithTags)(self as *const _ as *mut _, name.get(), tags); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn end_struct(&self) -> Result<()> { + }} + #[inline] pub fn end_struct(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).EndStruct)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_empty(&self, name: &HStringArg) -> Result<()> { + }} + #[inline] pub fn add_empty(&self, name: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddEmpty)(self as *const _ as *mut _, name.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_empty_with_format(&self, name: &HStringArg, format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_empty_with_format(&self, name: &HStringArg, format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddEmptyWithFormat)(self as *const _ as *mut _, name.get(), format); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_empty_with_format_and_tags(&self, name: &HStringArg, format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_empty_with_format_and_tags(&self, name: &HStringArg, format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddEmptyWithFormatAndTags)(self as *const _ as *mut _, name.get(), format, tags); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_uint8(&self, name: &HStringArg, value: u8) -> Result<()> { + }} + #[inline] pub fn add_uint8(&self, name: &HStringArg, value: u8) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddUInt8)(self as *const _ as *mut _, name.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_uint8_with_format(&self, name: &HStringArg, value: u8, format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_uint8_with_format(&self, name: &HStringArg, value: u8, format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddUInt8WithFormat)(self as *const _ as *mut _, name.get(), value, format); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_uint8_with_format_and_tags(&self, name: &HStringArg, value: u8, format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_uint8_with_format_and_tags(&self, name: &HStringArg, value: u8, format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddUInt8WithFormatAndTags)(self as *const _ as *mut _, name.get(), value, format, tags); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_uint8_array(&self, name: &HStringArg, value: &[u8]) -> Result<()> { + }} + #[inline] pub fn add_uint8_array(&self, name: &HStringArg, value: &[u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddUInt8Array)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[u8], format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_uint8_array_with_format(&self, name: &HStringArg, value: &[u8], format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddUInt8ArrayWithFormat)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[u8], format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_uint8_array_with_format_and_tags(&self, name: &HStringArg, value: &[u8], format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddUInt8ArrayWithFormatAndTags)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: i16) -> Result<()> { + }} + #[inline] pub fn add_int16(&self, name: &HStringArg, value: i16) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddInt16)(self as *const _ as *mut _, name.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_int16_with_format(&self, name: &HStringArg, value: i16, format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_int16_with_format(&self, name: &HStringArg, value: i16, format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddInt16WithFormat)(self as *const _ as *mut _, name.get(), value, format); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_int16_with_format_and_tags(&self, name: &HStringArg, value: i16, format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_int16_with_format_and_tags(&self, name: &HStringArg, value: i16, format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddInt16WithFormatAndTags)(self as *const _ as *mut _, name.get(), value, format, tags); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_int16_array(&self, name: &HStringArg, value: &[i16]) -> Result<()> { + }} + #[inline] pub fn add_int16_array(&self, name: &HStringArg, value: &[i16]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddInt16Array)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[i16], format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_int16_array_with_format(&self, name: &HStringArg, value: &[i16], format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddInt16ArrayWithFormat)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[i16], format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_int16_array_with_format_and_tags(&self, name: &HStringArg, value: &[i16], format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddInt16ArrayWithFormatAndTags)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: u16) -> Result<()> { + }} + #[inline] pub fn add_uint16(&self, name: &HStringArg, value: u16) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddUInt16)(self as *const _ as *mut _, name.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_uint16_with_format(&self, name: &HStringArg, value: u16, format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_uint16_with_format(&self, name: &HStringArg, value: u16, format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddUInt16WithFormat)(self as *const _ as *mut _, name.get(), value, format); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_uint16_with_format_and_tags(&self, name: &HStringArg, value: u16, format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_uint16_with_format_and_tags(&self, name: &HStringArg, value: u16, format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddUInt16WithFormatAndTags)(self as *const _ as *mut _, name.get(), value, format, tags); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_uint16_array(&self, name: &HStringArg, value: &[u16]) -> Result<()> { + }} + #[inline] pub fn add_uint16_array(&self, name: &HStringArg, value: &[u16]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddUInt16Array)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[u16], format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_uint16_array_with_format(&self, name: &HStringArg, value: &[u16], format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddUInt16ArrayWithFormat)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[u16], format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_uint16_array_with_format_and_tags(&self, name: &HStringArg, value: &[u16], format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddUInt16ArrayWithFormatAndTags)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: i32) -> Result<()> { + }} + #[inline] pub fn add_int32(&self, name: &HStringArg, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddInt32)(self as *const _ as *mut _, name.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_int32_with_format(&self, name: &HStringArg, value: i32, format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_int32_with_format(&self, name: &HStringArg, value: i32, format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddInt32WithFormat)(self as *const _ as *mut _, name.get(), value, format); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_int32_with_format_and_tags(&self, name: &HStringArg, value: i32, format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_int32_with_format_and_tags(&self, name: &HStringArg, value: i32, format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddInt32WithFormatAndTags)(self as *const _ as *mut _, name.get(), value, format, tags); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_int32_array(&self, name: &HStringArg, value: &[i32]) -> Result<()> { + }} + #[inline] pub fn add_int32_array(&self, name: &HStringArg, value: &[i32]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddInt32Array)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[i32], format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_int32_array_with_format(&self, name: &HStringArg, value: &[i32], format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddInt32ArrayWithFormat)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[i32], format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_int32_array_with_format_and_tags(&self, name: &HStringArg, value: &[i32], format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddInt32ArrayWithFormatAndTags)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: u32) -> Result<()> { + }} + #[inline] pub fn add_uint32(&self, name: &HStringArg, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddUInt32)(self as *const _ as *mut _, name.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_uint32_with_format(&self, name: &HStringArg, value: u32, format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_uint32_with_format(&self, name: &HStringArg, value: u32, format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddUInt32WithFormat)(self as *const _ as *mut _, name.get(), value, format); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_uint32_with_format_and_tags(&self, name: &HStringArg, value: u32, format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_uint32_with_format_and_tags(&self, name: &HStringArg, value: u32, format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddUInt32WithFormatAndTags)(self as *const _ as *mut _, name.get(), value, format, tags); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_uint32_array(&self, name: &HStringArg, value: &[u32]) -> Result<()> { + }} + #[inline] pub fn add_uint32_array(&self, name: &HStringArg, value: &[u32]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddUInt32Array)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[u32], format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_uint32_array_with_format(&self, name: &HStringArg, value: &[u32], format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddUInt32ArrayWithFormat)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[u32], format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_uint32_array_with_format_and_tags(&self, name: &HStringArg, value: &[u32], format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddUInt32ArrayWithFormatAndTags)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: i64) -> Result<()> { + }} + #[inline] pub fn add_int64(&self, name: &HStringArg, value: i64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddInt64)(self as *const _ as *mut _, name.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_int64_with_format(&self, name: &HStringArg, value: i64, format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_int64_with_format(&self, name: &HStringArg, value: i64, format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddInt64WithFormat)(self as *const _ as *mut _, name.get(), value, format); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_int64_with_format_and_tags(&self, name: &HStringArg, value: i64, format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_int64_with_format_and_tags(&self, name: &HStringArg, value: i64, format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddInt64WithFormatAndTags)(self as *const _ as *mut _, name.get(), value, format, tags); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_int64_array(&self, name: &HStringArg, value: &[i64]) -> Result<()> { + }} + #[inline] pub fn add_int64_array(&self, name: &HStringArg, value: &[i64]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddInt64Array)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[i64], format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_int64_array_with_format(&self, name: &HStringArg, value: &[i64], format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddInt64ArrayWithFormat)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[i64], format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_int64_array_with_format_and_tags(&self, name: &HStringArg, value: &[i64], format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddInt64ArrayWithFormatAndTags)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: u64) -> Result<()> { + }} + #[inline] pub fn add_uint64(&self, name: &HStringArg, value: u64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddUInt64)(self as *const _ as *mut _, name.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_uint64_with_format(&self, name: &HStringArg, value: u64, format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_uint64_with_format(&self, name: &HStringArg, value: u64, format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddUInt64WithFormat)(self as *const _ as *mut _, name.get(), value, format); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_uint64_with_format_and_tags(&self, name: &HStringArg, value: u64, format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_uint64_with_format_and_tags(&self, name: &HStringArg, value: u64, format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddUInt64WithFormatAndTags)(self as *const _ as *mut _, name.get(), value, format, tags); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_uint64_array(&self, name: &HStringArg, value: &[u64]) -> Result<()> { + }} + #[inline] pub fn add_uint64_array(&self, name: &HStringArg, value: &[u64]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddUInt64Array)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[u64], format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_uint64_array_with_format(&self, name: &HStringArg, value: &[u64], format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddUInt64ArrayWithFormat)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[u64], format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_uint64_array_with_format_and_tags(&self, name: &HStringArg, value: &[u64], format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddUInt64ArrayWithFormatAndTags)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: f32) -> Result<()> { + }} + #[inline] pub fn add_single(&self, name: &HStringArg, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddSingle)(self as *const _ as *mut _, name.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_single_with_format(&self, name: &HStringArg, value: f32, format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_single_with_format(&self, name: &HStringArg, value: f32, format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddSingleWithFormat)(self as *const _ as *mut _, name.get(), value, format); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_single_with_format_and_tags(&self, name: &HStringArg, value: f32, format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_single_with_format_and_tags(&self, name: &HStringArg, value: f32, format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddSingleWithFormatAndTags)(self as *const _ as *mut _, name.get(), value, format, tags); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_single_array(&self, name: &HStringArg, value: &[f32]) -> Result<()> { + }} + #[inline] pub fn add_single_array(&self, name: &HStringArg, value: &[f32]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddSingleArray)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[f32], format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_single_array_with_format(&self, name: &HStringArg, value: &[f32], format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddSingleArrayWithFormat)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[f32], format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_single_array_with_format_and_tags(&self, name: &HStringArg, value: &[f32], format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddSingleArrayWithFormatAndTags)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: f64) -> Result<()> { + }} + #[inline] pub fn add_double(&self, name: &HStringArg, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddDouble)(self as *const _ as *mut _, name.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_double_with_format(&self, name: &HStringArg, value: f64, format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_double_with_format(&self, name: &HStringArg, value: f64, format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddDoubleWithFormat)(self as *const _ as *mut _, name.get(), value, format); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_double_with_format_and_tags(&self, name: &HStringArg, value: f64, format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_double_with_format_and_tags(&self, name: &HStringArg, value: f64, format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddDoubleWithFormatAndTags)(self as *const _ as *mut _, name.get(), value, format, tags); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_double_array(&self, name: &HStringArg, value: &[f64]) -> Result<()> { + }} + #[inline] pub fn add_double_array(&self, name: &HStringArg, value: &[f64]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddDoubleArray)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[f64], format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_double_array_with_format(&self, name: &HStringArg, value: &[f64], format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddDoubleArrayWithFormat)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[f64], format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_double_array_with_format_and_tags(&self, name: &HStringArg, value: &[f64], format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddDoubleArrayWithFormatAndTags)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: Char) -> Result<()> { + }} + #[inline] pub fn add_char16(&self, name: &HStringArg, value: Char) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddChar16)(self as *const _ as *mut _, name.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_char16_with_format(&self, name: &HStringArg, value: Char, format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_char16_with_format(&self, name: &HStringArg, value: Char, format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddChar16WithFormat)(self as *const _ as *mut _, name.get(), value, format); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_char16_with_format_and_tags(&self, name: &HStringArg, value: Char, format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_char16_with_format_and_tags(&self, name: &HStringArg, value: Char, format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddChar16WithFormatAndTags)(self as *const _ as *mut _, name.get(), value, format, tags); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_char16_array(&self, name: &HStringArg, value: &[Char]) -> Result<()> { + }} + #[inline] pub fn add_char16_array(&self, name: &HStringArg, value: &[Char]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddChar16Array)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[Char], format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_char16_array_with_format(&self, name: &HStringArg, value: &[Char], format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddChar16ArrayWithFormat)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[Char], format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_char16_array_with_format_and_tags(&self, name: &HStringArg, value: &[Char], format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddChar16ArrayWithFormatAndTags)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: bool) -> Result<()> { + }} + #[inline] pub fn add_boolean(&self, name: &HStringArg, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddBoolean)(self as *const _ as *mut _, name.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_boolean_with_format(&self, name: &HStringArg, value: bool, format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_boolean_with_format(&self, name: &HStringArg, value: bool, format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddBooleanWithFormat)(self as *const _ as *mut _, name.get(), value, format); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_boolean_with_format_and_tags(&self, name: &HStringArg, value: bool, format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_boolean_with_format_and_tags(&self, name: &HStringArg, value: bool, format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddBooleanWithFormatAndTags)(self as *const _ as *mut _, name.get(), value, format, tags); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_boolean_array(&self, name: &HStringArg, value: &[bool]) -> Result<()> { + }} + #[inline] pub fn add_boolean_array(&self, name: &HStringArg, value: &[bool]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddBooleanArray)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[bool], format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_boolean_array_with_format(&self, name: &HStringArg, value: &[bool], format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddBooleanArrayWithFormat)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[bool], format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_boolean_array_with_format_and_tags(&self, name: &HStringArg, value: &[bool], format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddBooleanArrayWithFormatAndTags)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn add_string(&self, name: &HStringArg, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddString)(self as *const _ as *mut _, name.get(), value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_string_with_format(&self, name: &HStringArg, value: &HStringArg, format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_string_with_format(&self, name: &HStringArg, value: &HStringArg, format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddStringWithFormat)(self as *const _ as *mut _, name.get(), value.get(), format); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_string_with_format_and_tags(&self, name: &HStringArg, value: &HStringArg, format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_string_with_format_and_tags(&self, name: &HStringArg, value: &HStringArg, format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddStringWithFormatAndTags)(self as *const _ as *mut _, name.get(), value.get(), format, tags); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_string_array(&self, name: &HStringArg, value: &[&HStringArg]) -> Result<()> { + }} + #[inline] pub fn add_string_array(&self, name: &HStringArg, value: &[&HStringArg]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddStringArray)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[&HStringArg], format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_string_array_with_format(&self, name: &HStringArg, value: &[&HStringArg], format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddStringArrayWithFormat)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[&HStringArg], format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_string_array_with_format_and_tags(&self, name: &HStringArg, value: &[&HStringArg], format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddStringArrayWithFormatAndTags)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: Guid) -> Result<()> { + }} + #[inline] pub fn add_guid(&self, name: &HStringArg, value: Guid) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddGuid)(self as *const _ as *mut _, name.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_guid_with_format(&self, name: &HStringArg, value: Guid, format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_guid_with_format(&self, name: &HStringArg, value: Guid, format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddGuidWithFormat)(self as *const _ as *mut _, name.get(), value, format); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_guid_with_format_and_tags(&self, name: &HStringArg, value: Guid, format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_guid_with_format_and_tags(&self, name: &HStringArg, value: Guid, format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddGuidWithFormatAndTags)(self as *const _ as *mut _, name.get(), value, format, tags); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_guid_array(&self, name: &HStringArg, value: &[Guid]) -> Result<()> { + }} + #[inline] pub fn add_guid_array(&self, name: &HStringArg, value: &[Guid]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddGuidArray)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[Guid], format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_guid_array_with_format(&self, name: &HStringArg, value: &[Guid], format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddGuidArrayWithFormat)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[Guid], format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_guid_array_with_format_and_tags(&self, name: &HStringArg, value: &[Guid], format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddGuidArrayWithFormatAndTags)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: super::DateTime) -> Result<()> { + }} + #[inline] pub fn add_date_time(&self, name: &HStringArg, value: super::DateTime) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddDateTime)(self as *const _ as *mut _, name.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_date_time_with_format(&self, name: &HStringArg, value: super::DateTime, format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_date_time_with_format(&self, name: &HStringArg, value: super::DateTime, format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddDateTimeWithFormat)(self as *const _ as *mut _, name.get(), value, format); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_date_time_with_format_and_tags(&self, name: &HStringArg, value: super::DateTime, format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_date_time_with_format_and_tags(&self, name: &HStringArg, value: super::DateTime, format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddDateTimeWithFormatAndTags)(self as *const _ as *mut _, name.get(), value, format, tags); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_date_time_array(&self, name: &HStringArg, value: &[super::DateTime]) -> Result<()> { + }} + #[inline] pub fn add_date_time_array(&self, name: &HStringArg, value: &[super::DateTime]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddDateTimeArray)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[super::DateTime], format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_date_time_array_with_format(&self, name: &HStringArg, value: &[super::DateTime], format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddDateTimeArrayWithFormat)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[super::DateTime], format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_date_time_array_with_format_and_tags(&self, name: &HStringArg, value: &[super::DateTime], format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddDateTimeArrayWithFormatAndTags)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: super::TimeSpan) -> Result<()> { + }} + #[inline] pub fn add_time_span(&self, name: &HStringArg, value: super::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddTimeSpan)(self as *const _ as *mut _, name.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_time_span_with_format(&self, name: &HStringArg, value: super::TimeSpan, format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_time_span_with_format(&self, name: &HStringArg, value: super::TimeSpan, format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddTimeSpanWithFormat)(self as *const _ as *mut _, name.get(), value, format); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_time_span_with_format_and_tags(&self, name: &HStringArg, value: super::TimeSpan, format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_time_span_with_format_and_tags(&self, name: &HStringArg, value: super::TimeSpan, format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddTimeSpanWithFormatAndTags)(self as *const _ as *mut _, name.get(), value, format, tags); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_time_span_array(&self, name: &HStringArg, value: &[super::TimeSpan]) -> Result<()> { + }} + #[inline] pub fn add_time_span_array(&self, name: &HStringArg, value: &[super::TimeSpan]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddTimeSpanArray)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[super::TimeSpan], format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_time_span_array_with_format(&self, name: &HStringArg, value: &[super::TimeSpan], format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddTimeSpanArrayWithFormat)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[super::TimeSpan], format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_time_span_array_with_format_and_tags(&self, name: &HStringArg, value: &[super::TimeSpan], format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddTimeSpanArrayWithFormatAndTags)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: super::Point) -> Result<()> { + }} + #[inline] pub fn add_point(&self, name: &HStringArg, value: super::Point) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddPoint)(self as *const _ as *mut _, name.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_point_with_format(&self, name: &HStringArg, value: super::Point, format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_point_with_format(&self, name: &HStringArg, value: super::Point, format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddPointWithFormat)(self as *const _ as *mut _, name.get(), value, format); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_point_with_format_and_tags(&self, name: &HStringArg, value: super::Point, format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_point_with_format_and_tags(&self, name: &HStringArg, value: super::Point, format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddPointWithFormatAndTags)(self as *const _ as *mut _, name.get(), value, format, tags); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_point_array(&self, name: &HStringArg, value: &[super::Point]) -> Result<()> { + }} + #[inline] pub fn add_point_array(&self, name: &HStringArg, value: &[super::Point]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddPointArray)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[super::Point], format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_point_array_with_format(&self, name: &HStringArg, value: &[super::Point], format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddPointArrayWithFormat)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[super::Point], format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_point_array_with_format_and_tags(&self, name: &HStringArg, value: &[super::Point], format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddPointArrayWithFormatAndTags)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: super::Size) -> Result<()> { + }} + #[inline] pub fn add_size(&self, name: &HStringArg, value: super::Size) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddSize)(self as *const _ as *mut _, name.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_size_with_format(&self, name: &HStringArg, value: super::Size, format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_size_with_format(&self, name: &HStringArg, value: super::Size, format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddSizeWithFormat)(self as *const _ as *mut _, name.get(), value, format); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_size_with_format_and_tags(&self, name: &HStringArg, value: super::Size, format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_size_with_format_and_tags(&self, name: &HStringArg, value: super::Size, format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddSizeWithFormatAndTags)(self as *const _ as *mut _, name.get(), value, format, tags); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_size_array(&self, name: &HStringArg, value: &[super::Size]) -> Result<()> { + }} + #[inline] pub fn add_size_array(&self, name: &HStringArg, value: &[super::Size]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddSizeArray)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[super::Size], format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_size_array_with_format(&self, name: &HStringArg, value: &[super::Size], format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddSizeArrayWithFormat)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[super::Size], format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_size_array_with_format_and_tags(&self, name: &HStringArg, value: &[super::Size], format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddSizeArrayWithFormatAndTags)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: super::Rect) -> Result<()> { + }} + #[inline] pub fn add_rect(&self, name: &HStringArg, value: super::Rect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddRect)(self as *const _ as *mut _, name.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_rect_with_format(&self, name: &HStringArg, value: super::Rect, format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_rect_with_format(&self, name: &HStringArg, value: super::Rect, format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddRectWithFormat)(self as *const _ as *mut _, name.get(), value, format); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_rect_with_format_and_tags(&self, name: &HStringArg, value: super::Rect, format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_rect_with_format_and_tags(&self, name: &HStringArg, value: super::Rect, format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddRectWithFormatAndTags)(self as *const _ as *mut _, name.get(), value, format, tags); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_rect_array(&self, name: &HStringArg, value: &[super::Rect]) -> Result<()> { + }} + #[inline] pub fn add_rect_array(&self, name: &HStringArg, value: &[super::Rect]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddRectArray)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[super::Rect], format: LoggingFieldFormat) -> Result<()> { + }} + #[inline] pub fn add_rect_array_with_format(&self, name: &HStringArg, value: &[super::Rect], format: LoggingFieldFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddRectArrayWithFormat)(self as *const _ as *mut _, 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(&self, name: &HStringArg, value: &[super::Rect], format: LoggingFieldFormat, tags: i32) -> Result<()> { + }} + #[inline] pub fn add_rect_array_with_format_and_tags(&self, name: &HStringArg, value: &[super::Rect], format: LoggingFieldFormat, tags: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddRectArrayWithFormatAndTags)(self as *const _ as *mut _, 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} impl RtActivatable for LoggingFields {} @@ -6477,68 +6477,68 @@ RT_INTERFACE!{interface ILoggingOptions(ILoggingOptionsVtbl): IInspectable(IInsp fn put_RelatedActivityId(&self, value: Guid) -> HRESULT }} impl ILoggingOptions { - #[inline] pub unsafe fn get_keywords(&self) -> Result { + #[inline] pub fn get_keywords(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Keywords)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_keywords(&self, value: i64) -> Result<()> { + }} + #[inline] pub fn set_keywords(&self, value: i64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Keywords)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_tags(&self) -> Result { + }} + #[inline] pub fn get_tags(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Tags)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_tags(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_tags(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Tags)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_task(&self) -> Result { + }} + #[inline] pub fn get_task(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Task)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_task(&self, value: i16) -> Result<()> { + }} + #[inline] pub fn set_task(&self, value: i16) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Task)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_opcode(&self) -> Result { + }} + #[inline] pub fn get_opcode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Opcode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_opcode(&self, value: LoggingOpcode) -> Result<()> { + }} + #[inline] pub fn set_opcode(&self, value: LoggingOpcode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Opcode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_activity_id(&self) -> Result { + }} + #[inline] pub fn get_activity_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ActivityId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_activity_id(&self, value: Guid) -> Result<()> { + }} + #[inline] pub fn set_activity_id(&self, value: Guid) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ActivityId)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_related_activity_id(&self) -> Result { + }} + #[inline] pub fn get_related_activity_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RelatedActivityId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_related_activity_id(&self, value: Guid) -> Result<()> { + }} + #[inline] pub fn set_related_activity_id(&self, value: Guid) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RelatedActivityId)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class LoggingOptions: ILoggingOptions} impl RtActivatable for LoggingOptions {} impl RtActivatable for LoggingOptions {} impl LoggingOptions { - #[inline] pub fn create_with_keywords(keywords: i64) -> Result> { unsafe { + #[inline] pub fn create_with_keywords(keywords: i64) -> Result> { >::get_activation_factory().create_with_keywords(keywords) - }} + } } DEFINE_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]) [CLSID_LoggingOptions]); DEFINE_IID!(IID_ILoggingOptionsFactory, 3608397515, 39083, 17995, 159, 34, 163, 38, 132, 120, 54, 138); @@ -6546,11 +6546,11 @@ RT_INTERFACE!{static interface ILoggingOptionsFactory(ILoggingOptionsFactoryVtbl fn CreateWithKeywords(&self, keywords: i64, out: *mut *mut LoggingOptions) -> HRESULT }} impl ILoggingOptionsFactory { - #[inline] pub unsafe fn create_with_keywords(&self, keywords: i64) -> Result> { + #[inline] pub fn create_with_keywords(&self, keywords: i64) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithKeywords)(self as *const _ as *mut _, keywords, &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] { @@ -6562,35 +6562,35 @@ RT_INTERFACE!{interface ILoggingSession(ILoggingSessionVtbl): IInspectable(IInsp fn RemoveLoggingChannel(&self, loggingChannel: *mut ILoggingChannel) -> HRESULT }} impl ILoggingSession { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self 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 save_to_file_async(&self, folder: &super::super::storage::IStorageFolder, fileName: &HStringArg) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn save_to_file_async(&self, folder: &super::super::storage::IStorageFolder, fileName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveToFileAsync)(self as *const _ as *mut _, 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(&self, loggingChannel: &ILoggingChannel) -> Result<()> { + }} + #[inline] pub fn add_logging_channel(&self, loggingChannel: &ILoggingChannel) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddLoggingChannel)(self as *const _ as *mut _, loggingChannel as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_logging_channel_with_level(&self, loggingChannel: &ILoggingChannel, maxLevel: LoggingLevel) -> Result<()> { + }} + #[inline] pub fn add_logging_channel_with_level(&self, loggingChannel: &ILoggingChannel, maxLevel: LoggingLevel) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddLoggingChannelWithLevel)(self as *const _ as *mut _, loggingChannel as *const _ as *mut _, maxLevel); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove_logging_channel(&self, loggingChannel: &ILoggingChannel) -> Result<()> { + }} + #[inline] pub fn remove_logging_channel(&self, loggingChannel: &ILoggingChannel) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveLoggingChannel)(self as *const _ as *mut _, loggingChannel as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class LoggingSession: ILoggingSession} impl RtActivatable for LoggingSession {} impl LoggingSession { - #[inline] pub fn create(name: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(name: &HStringArg) -> Result> { >::get_activation_factory().create(name) - }} + } } DEFINE_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]) [CLSID_LoggingSession]); DEFINE_IID!(IID_ILoggingSessionFactory, 1318289125, 22781, 17888, 140, 47, 161, 50, 239, 249, 92, 30); @@ -6598,11 +6598,11 @@ RT_INTERFACE!{static interface ILoggingSessionFactory(ILoggingSessionFactoryVtbl fn Create(&self, name: HSTRING, out: *mut *mut LoggingSession) -> HRESULT }} impl ILoggingSessionFactory { - #[inline] pub unsafe fn create(&self, name: &HStringArg) -> Result> { + #[inline] pub fn create(&self, name: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, name.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ILoggingTarget, 1710320693, 58248, 20006, 177, 122, 245, 28, 211, 168, 57, 22); RT_INTERFACE!{interface ILoggingTarget(ILoggingTargetVtbl): IInspectable(IInspectableVtbl) [IID_ILoggingTarget] { @@ -6619,57 +6619,57 @@ RT_INTERFACE!{interface ILoggingTarget(ILoggingTargetVtbl): IInspectable(IInspec fn StartActivityWithFieldsAndOptions(&self, startEventName: HSTRING, fields: *mut LoggingFields, level: LoggingLevel, options: *mut LoggingOptions, out: *mut *mut LoggingActivity) -> HRESULT }} impl ILoggingTarget { - #[inline] pub unsafe fn is_enabled(&self) -> Result { + #[inline] pub fn is_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_enabled_with_level(&self, level: LoggingLevel) -> Result { + }} + #[inline] pub fn is_enabled_with_level(&self, level: LoggingLevel) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsEnabledWithLevel)(self as *const _ as *mut _, level, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_enabled_with_level_and_keywords(&self, level: LoggingLevel, keywords: i64) -> Result { + }} + #[inline] pub fn is_enabled_with_level_and_keywords(&self, level: LoggingLevel, keywords: i64) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsEnabledWithLevelAndKeywords)(self as *const _ as *mut _, level, keywords, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn log_event(&self, eventName: &HStringArg) -> Result<()> { + }} + #[inline] pub fn log_event(&self, eventName: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).LogEvent)(self as *const _ as *mut _, eventName.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn log_event_with_fields(&self, eventName: &HStringArg, fields: &LoggingFields) -> Result<()> { + }} + #[inline] pub fn log_event_with_fields(&self, eventName: &HStringArg, fields: &LoggingFields) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).LogEventWithFields)(self as *const _ as *mut _, 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(&self, eventName: &HStringArg, fields: &LoggingFields, level: LoggingLevel) -> Result<()> { + }} + #[inline] pub fn log_event_with_fields_and_level(&self, eventName: &HStringArg, fields: &LoggingFields, level: LoggingLevel) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).LogEventWithFieldsAndLevel)(self as *const _ as *mut _, 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(&self, eventName: &HStringArg, fields: &LoggingFields, level: LoggingLevel, options: &LoggingOptions) -> Result<()> { + }} + #[inline] pub fn log_event_with_fields_and_options(&self, eventName: &HStringArg, fields: &LoggingFields, level: LoggingLevel, options: &LoggingOptions) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).LogEventWithFieldsAndOptions)(self as *const _ as *mut _, 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(&self, startEventName: &HStringArg) -> Result> { + }} + #[inline] pub fn start_activity(&self, startEventName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartActivity)(self as *const _ as *mut _, startEventName.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn start_activity_with_fields(&self, startEventName: &HStringArg, fields: &LoggingFields) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn start_activity_with_fields(&self, startEventName: &HStringArg, fields: &LoggingFields) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartActivityWithFields)(self as *const _ as *mut _, 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(&self, startEventName: &HStringArg, fields: &LoggingFields, level: LoggingLevel) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn start_activity_with_fields_and_level(&self, startEventName: &HStringArg, fields: &LoggingFields, level: LoggingLevel) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartActivityWithFieldsAndLevel)(self as *const _ as *mut _, 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(&self, startEventName: &HStringArg, fields: &LoggingFields, level: LoggingLevel, options: &LoggingOptions) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn start_activity_with_fields_and_options(&self, startEventName: &HStringArg, fields: &LoggingFields, level: LoggingLevel, options: &LoggingOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartActivityWithFieldsAndOptions)(self as *const _ as *mut _, 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) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RuntimeBrokerErrorSettings: IErrorReportingSettings} impl RtActivatable for RuntimeBrokerErrorSettings {} @@ -6680,16 +6680,16 @@ RT_INTERFACE!{interface ITracingStatusChangedEventArgs(ITracingStatusChangedEven fn get_TraceLevel(&self, out: *mut CausalityTraceLevel) -> HRESULT }} impl ITracingStatusChangedEventArgs { - #[inline] pub unsafe fn get_enabled(&self) -> Result { + #[inline] pub fn get_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Enabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_trace_level(&self) -> Result { + }} + #[inline] pub fn get_trace_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TraceLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class TracingStatusChangedEventArgs: ITracingStatusChangedEventArgs} } // Windows.Foundation.Diagnostics diff --git a/src/rt/gen/windows/gaming.rs b/src/rt/gen/windows/gaming.rs index 436f6a6..dd4a0bc 100644 --- a/src/rt/gen/windows/gaming.rs +++ b/src/rt/gen/windows/gaming.rs @@ -3,64 +3,64 @@ use ::prelude::*; RT_CLASS!{static class GameBar} impl RtActivatable for GameBar {} impl GameBar { - #[inline] pub fn add_visibility_changed(handler: &super::super::foundation::EventHandler) -> Result { unsafe { + #[inline] pub fn add_visibility_changed(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_visibility_changed(handler) - }} - #[inline] pub fn remove_visibility_changed(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_visibility_changed(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_visibility_changed(token) - }} - #[inline] pub fn add_is_input_redirected_changed(handler: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_is_input_redirected_changed(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_is_input_redirected_changed(handler) - }} - #[inline] pub fn remove_is_input_redirected_changed(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_is_input_redirected_changed(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_is_input_redirected_changed(token) - }} - #[inline] pub fn get_visible() -> Result { unsafe { + } + #[inline] pub fn get_visible() -> Result { >::get_activation_factory().get_visible() - }} - #[inline] pub fn get_is_input_redirected() -> Result { unsafe { + } + #[inline] pub fn get_is_input_redirected() -> Result { >::get_activation_factory().get_is_input_redirected() - }} + } } DEFINE_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]) [CLSID_GameBar]); 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(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_VisibilityChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_IsInputRedirectedChanged(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_IsInputRedirectedChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_VisibilityChanged(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_VisibilityChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_IsInputRedirectedChanged(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_IsInputRedirectedChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_Visible(&self, out: *mut bool) -> HRESULT, fn get_IsInputRedirected(&self, out: *mut bool) -> HRESULT }} impl IGameBarStatics { - #[inline] pub unsafe fn add_visibility_changed(&self, handler: &super::super::foundation::EventHandler) -> Result { + #[inline] pub fn add_visibility_changed(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_VisibilityChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_visibility_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_visibility_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_VisibilityChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_is_input_redirected_changed(&self, handler: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_is_input_redirected_changed(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_IsInputRedirectedChanged)(self as *const _ as *mut _, 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(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_is_input_redirected_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_IsInputRedirectedChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_visible(&self) -> Result { + }} + #[inline] pub fn get_visible(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Visible)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_input_redirected(&self) -> Result { + }} + #[inline] pub fn get_is_input_redirected(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsInputRedirected)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum GameChatMessageOrigin: i32 { Voice (GameChatMessageOrigin_Voice) = 0, Text (GameChatMessageOrigin_Text) = 1, @@ -74,31 +74,31 @@ RT_INTERFACE!{interface IGameChatMessageReceivedEventArgs(IGameChatMessageReceiv fn get_Origin(&self, out: *mut GameChatMessageOrigin) -> HRESULT }} impl IGameChatMessageReceivedEventArgs { - #[inline] pub unsafe fn get_app_id(&self) -> Result { + #[inline] pub fn get_app_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_display_name(&self) -> Result { + }} + #[inline] pub fn get_app_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppDisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sender_name(&self) -> Result { + }} + #[inline] pub fn get_sender_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SenderName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_message(&self) -> Result { + }} + #[inline] pub fn get_message(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Message)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_origin(&self) -> Result { + }} + #[inline] pub fn get_origin(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Origin)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class GameChatMessageReceivedEventArgs: IGameChatMessageReceivedEventArgs} DEFINE_IID!(IID_IGameChatOverlay, 4224075877, 63228, 19016, 174, 7, 3, 172, 110, 212, 55, 4); @@ -108,48 +108,48 @@ RT_INTERFACE!{interface IGameChatOverlay(IGameChatOverlayVtbl): IInspectable(IIn fn AddMessage(&self, sender: HSTRING, message: HSTRING, origin: GameChatMessageOrigin) -> HRESULT }} impl IGameChatOverlay { - #[inline] pub unsafe fn get_desired_position(&self) -> Result { + #[inline] pub fn get_desired_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DesiredPosition)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_desired_position(&self, value: GameChatOverlayPosition) -> Result<()> { + }} + #[inline] pub fn set_desired_position(&self, value: GameChatOverlayPosition) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DesiredPosition)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_message(&self, sender: &HStringArg, message: &HStringArg, origin: GameChatMessageOrigin) -> Result<()> { + }} + #[inline] pub fn add_message(&self, sender: &HStringArg, message: &HStringArg, origin: GameChatMessageOrigin) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddMessage)(self as *const _ as *mut _, sender.get(), message.get(), origin); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class GameChatOverlay: IGameChatOverlay} impl RtActivatable for GameChatOverlay {} impl GameChatOverlay { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} + } } DEFINE_CLSID!(GameChatOverlay(&[87,105,110,100,111,119,115,46,71,97,109,105,110,103,46,85,73,46,71,97,109,101,67,104,97,116,79,118,101,114,108,97,121,0]) [CLSID_GameChatOverlay]); DEFINE_IID!(IID_IGameChatOverlayMessageSource, 504853399, 23035, 20303, 142, 154, 128, 172, 248, 23, 116, 60); RT_INTERFACE!{interface IGameChatOverlayMessageSource(IGameChatOverlayMessageSourceVtbl): IInspectable(IInspectableVtbl) [IID_IGameChatOverlayMessageSource] { - fn add_MessageReceived(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_MessageReceived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn SetDelayBeforeClosingAfterMessageReceived(&self, value: super::super::foundation::TimeSpan) -> HRESULT + fn add_MessageReceived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_MessageReceived(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn SetDelayBeforeClosingAfterMessageReceived(&self, value: foundation::TimeSpan) -> HRESULT }} impl IGameChatOverlayMessageSource { - #[inline] pub unsafe fn add_message_received(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_message_received(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_MessageReceived)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_message_received(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_message_received(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_MessageReceived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_delay_before_closing_after_message_received(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_delay_before_closing_after_message_received(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetDelayBeforeClosingAfterMessageReceived)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class GameChatOverlayMessageSource: IGameChatOverlayMessageSource} impl RtActivatable for GameChatOverlayMessageSource {} @@ -162,29 +162,29 @@ RT_INTERFACE!{static interface IGameChatOverlayStatics(IGameChatOverlayStaticsVt fn GetDefault(&self, out: *mut *mut GameChatOverlay) -> HRESULT }} impl IGameChatOverlayStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IGameMonitor, 304300888, 56585, 17681, 173, 205, 141, 89, 117, 216, 16, 40); RT_INTERFACE!{interface IGameMonitor(IGameMonitorVtbl): IInspectable(IInspectableVtbl) [IID_IGameMonitor] { - fn RequestPermissionAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn RequestPermissionAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IGameMonitor { - #[inline] pub unsafe fn request_permission_async(&self) -> Result>> { + #[inline] pub fn request_permission_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestPermissionAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class GameMonitor: IGameMonitor} impl RtActivatable for GameMonitor {} impl GameMonitor { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} + } } DEFINE_CLSID!(GameMonitor(&[87,105,110,100,111,119,115,46,71,97,109,105,110,103,46,85,73,46,71,97,109,101,77,111,110,105,116,111,114,0]) [CLSID_GameMonitor]); RT_ENUM! { enum GameMonitoringPermission: i32 { @@ -195,27 +195,27 @@ RT_INTERFACE!{static interface IGameMonitorStatics(IGameMonitorStaticsVtbl): IIn fn GetDefault(&self, out: *mut *mut GameMonitor) -> HRESULT }} impl IGameMonitorStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IGameUIProviderActivatedEventArgs, 2813534270, 51959, 19949, 187, 210, 71, 222, 67, 187, 109, 213); RT_INTERFACE!{interface IGameUIProviderActivatedEventArgs(IGameUIProviderActivatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IGameUIProviderActivatedEventArgs] { - fn get_GameUIArgs(&self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT, - fn ReportCompleted(&self, results: *mut super::super::foundation::collections::ValueSet) -> HRESULT + fn get_GameUIArgs(&self, out: *mut *mut foundation::collections::ValueSet) -> HRESULT, + fn ReportCompleted(&self, results: *mut foundation::collections::ValueSet) -> HRESULT }} impl IGameUIProviderActivatedEventArgs { - #[inline] pub unsafe fn get_game_uiargs(&self) -> Result> { + #[inline] pub fn get_game_uiargs(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_GameUIArgs)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed(&self, results: &super::super::foundation::collections::ValueSet) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn report_completed(&self, results: &foundation::collections::ValueSet) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportCompleted)(self as *const _ as *mut _, results as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class GameUIProviderActivatedEventArgs: IGameUIProviderActivatedEventArgs} } // Windows.Gaming.UI @@ -227,39 +227,39 @@ RT_INTERFACE!{interface IArcadeStick(IArcadeStickVtbl): IInspectable(IInspectabl fn GetCurrentReading(&self, out: *mut ArcadeStickReading) -> HRESULT }} impl IArcadeStick { - #[inline] pub unsafe fn get_button_label(&self, button: ArcadeStickButtons) -> Result { + #[inline] pub fn get_button_label(&self, button: ArcadeStickButtons) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetButtonLabel)(self as *const _ as *mut _, button, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_reading(&self) -> Result { + }} + #[inline] pub fn get_current_reading(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetCurrentReading)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ArcadeStick: IArcadeStick} impl RtActivatable for ArcadeStick {} impl RtActivatable for ArcadeStick {} impl ArcadeStick { - #[inline] pub fn add_arcade_stick_added(value: &super::super::foundation::EventHandler) -> Result { unsafe { + #[inline] pub fn add_arcade_stick_added(value: &foundation::EventHandler) -> Result { >::get_activation_factory().add_arcade_stick_added(value) - }} - #[inline] pub fn remove_arcade_stick_added(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_arcade_stick_added(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_arcade_stick_added(token) - }} - #[inline] pub fn add_arcade_stick_removed(value: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_arcade_stick_removed(value: &foundation::EventHandler) -> Result { >::get_activation_factory().add_arcade_stick_removed(value) - }} - #[inline] pub fn remove_arcade_stick_removed(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_arcade_stick_removed(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_arcade_stick_removed(token) - }} - #[inline] pub fn get_arcade_sticks() -> Result>> { unsafe { + } + #[inline] pub fn get_arcade_sticks() -> Result>>> { >::get_activation_factory().get_arcade_sticks() - }} - #[inline] pub fn from_game_controller(gameController: &IGameController) -> Result> { unsafe { + } + #[inline] pub fn from_game_controller(gameController: &IGameController) -> Result>> { >::get_activation_factory().from_game_controller(gameController) - }} + } } DEFINE_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]) [CLSID_ArcadeStick]); RT_ENUM! { enum ArcadeStickButtons: u32 { @@ -270,47 +270,47 @@ RT_STRUCT! { struct ArcadeStickReading { }} 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(&self, value: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ArcadeStickAdded(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ArcadeStickRemoved(&self, value: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ArcadeStickRemoved(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_ArcadeSticks(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn add_ArcadeStickAdded(&self, value: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ArcadeStickAdded(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ArcadeStickRemoved(&self, value: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ArcadeStickRemoved(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn get_ArcadeSticks(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IArcadeStickStatics { - #[inline] pub unsafe fn add_arcade_stick_added(&self, value: &super::super::foundation::EventHandler) -> Result { + #[inline] pub fn add_arcade_stick_added(&self, value: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ArcadeStickAdded)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_arcade_stick_added(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_arcade_stick_added(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ArcadeStickAdded)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_arcade_stick_removed(&self, value: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_arcade_stick_removed(&self, value: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ArcadeStickRemoved)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_arcade_stick_removed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_arcade_stick_removed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ArcadeStickRemoved)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_arcade_sticks(&self) -> Result>> { + }} + #[inline] pub fn get_arcade_sticks(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ArcadeSticks)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IArcadeStickStatics2, 1387648836, 48006, 17498, 181, 156, 89, 111, 14, 42, 73, 223); RT_INTERFACE!{static interface IArcadeStickStatics2(IArcadeStickStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IArcadeStickStatics2] { fn FromGameController(&self, gameController: *mut IGameController, out: *mut *mut ArcadeStick) -> HRESULT }} impl IArcadeStickStatics2 { - #[inline] pub unsafe fn from_game_controller(&self, gameController: &IGameController) -> Result> { + #[inline] pub fn from_game_controller(&self, gameController: &IGameController) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromGameController)(self as *const _ as *mut _, gameController as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IFlightStick, 3030564892, 47163, 17497, 161, 169, 151, 176, 60, 51, 218, 124); RT_INTERFACE!{interface IFlightStick(IFlightStickVtbl): IInspectable(IInspectableVtbl) [IID_IFlightStick] { @@ -319,43 +319,43 @@ RT_INTERFACE!{interface IFlightStick(IFlightStickVtbl): IInspectable(IInspectabl fn GetCurrentReading(&self, out: *mut FlightStickReading) -> HRESULT }} impl IFlightStick { - #[inline] pub unsafe fn get_hat_switch_kind(&self) -> Result { + #[inline] pub fn get_hat_switch_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HatSwitchKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_button_label(&self, button: FlightStickButtons) -> Result { + }} + #[inline] pub fn get_button_label(&self, button: FlightStickButtons) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetButtonLabel)(self as *const _ as *mut _, button, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_reading(&self) -> Result { + }} + #[inline] pub fn get_current_reading(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetCurrentReading)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class FlightStick: IFlightStick} impl RtActivatable for FlightStick {} impl FlightStick { - #[inline] pub fn add_flight_stick_added(value: &super::super::foundation::EventHandler) -> Result { unsafe { + #[inline] pub fn add_flight_stick_added(value: &foundation::EventHandler) -> Result { >::get_activation_factory().add_flight_stick_added(value) - }} - #[inline] pub fn remove_flight_stick_added(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_flight_stick_added(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_flight_stick_added(token) - }} - #[inline] pub fn add_flight_stick_removed(value: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_flight_stick_removed(value: &foundation::EventHandler) -> Result { >::get_activation_factory().add_flight_stick_removed(value) - }} - #[inline] pub fn remove_flight_stick_removed(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_flight_stick_removed(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_flight_stick_removed(token) - }} - #[inline] pub fn get_flight_sticks() -> Result>> { unsafe { + } + #[inline] pub fn get_flight_sticks() -> Result>>> { >::get_activation_factory().get_flight_sticks() - }} - #[inline] pub fn from_game_controller(gameController: &IGameController) -> Result> { unsafe { + } + #[inline] pub fn from_game_controller(gameController: &IGameController) -> Result>> { >::get_activation_factory().from_game_controller(gameController) - }} + } } DEFINE_CLSID!(FlightStick(&[87,105,110,100,111,119,115,46,71,97,109,105,110,103,46,73,110,112,117,116,46,70,108,105,103,104,116,83,116,105,99,107,0]) [CLSID_FlightStick]); RT_ENUM! { enum FlightStickButtons: u32 { @@ -366,109 +366,109 @@ RT_STRUCT! { struct FlightStickReading { }} DEFINE_IID!(IID_IFlightStickStatics, 1427411530, 65228, 17246, 131, 220, 92, 236, 138, 24, 165, 32); RT_INTERFACE!{static interface IFlightStickStatics(IFlightStickStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IFlightStickStatics] { - fn add_FlightStickAdded(&self, value: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_FlightStickAdded(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_FlightStickRemoved(&self, value: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_FlightStickRemoved(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_FlightSticks(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn add_FlightStickAdded(&self, value: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_FlightStickAdded(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_FlightStickRemoved(&self, value: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_FlightStickRemoved(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn get_FlightSticks(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn FromGameController(&self, gameController: *mut IGameController, out: *mut *mut FlightStick) -> HRESULT }} impl IFlightStickStatics { - #[inline] pub unsafe fn add_flight_stick_added(&self, value: &super::super::foundation::EventHandler) -> Result { + #[inline] pub fn add_flight_stick_added(&self, value: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_FlightStickAdded)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_flight_stick_added(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_flight_stick_added(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_FlightStickAdded)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_flight_stick_removed(&self, value: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_flight_stick_removed(&self, value: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_FlightStickRemoved)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_flight_stick_removed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_flight_stick_removed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_FlightStickRemoved)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_flight_sticks(&self) -> Result>> { + }} + #[inline] pub fn get_flight_sticks(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FlightSticks)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_game_controller(&self, gameController: &IGameController) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn from_game_controller(&self, gameController: &IGameController) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromGameController)(self as *const _ as *mut _, gameController as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_HeadsetConnected(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_HeadsetDisconnected(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_HeadsetDisconnected(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - #[cfg(feature="windows-system")] fn add_UserChanged(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_UserChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_HeadsetConnected(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_HeadsetConnected(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_HeadsetDisconnected(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_HeadsetDisconnected(&self, token: foundation::EventRegistrationToken) -> HRESULT, + #[cfg(feature="windows-system")] fn add_UserChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_UserChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_Headset(&self, out: *mut *mut Headset) -> HRESULT, fn get_IsWireless(&self, out: *mut bool) -> HRESULT, #[cfg(feature="windows-system")] fn get_User(&self, out: *mut *mut super::super::system::User) -> HRESULT }} impl IGameController { - #[inline] pub unsafe fn add_headset_connected(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_headset_connected(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_HeadsetConnected)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_headset_connected(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_headset_connected(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_HeadsetConnected)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_headset_disconnected(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_headset_disconnected(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_HeadsetDisconnected)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_headset_disconnected(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_headset_disconnected(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_HeadsetDisconnected)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn add_user_changed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[cfg(feature="windows-system")] #[inline] pub fn add_user_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_UserChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_user_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_user_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_UserChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_headset(&self) -> Result> { + }} + #[inline] pub fn get_headset(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Headset)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_wireless(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_wireless(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsWireless)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_user(&self) -> Result> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_User)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IGameControllerBatteryInfo, 3706504833, 14691, 19878, 149, 93, 85, 63, 59, 111, 97, 97); RT_INTERFACE!{interface IGameControllerBatteryInfo(IGameControllerBatteryInfoVtbl): IInspectable(IInspectableVtbl) [IID_IGameControllerBatteryInfo] { #[cfg(feature="windows-devices")] fn TryGetBatteryReport(&self, out: *mut *mut super::super::devices::power::BatteryReport) -> HRESULT }} impl IGameControllerBatteryInfo { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn try_get_battery_report(&self) -> Result> { + #[cfg(feature="windows-devices")] #[inline] pub fn try_get_battery_report(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetBatteryReport)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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, @@ -486,43 +486,43 @@ RT_INTERFACE!{interface IGamepad(IGamepadVtbl): IInspectable(IInspectableVtbl) [ fn GetCurrentReading(&self, out: *mut GamepadReading) -> HRESULT }} impl IGamepad { - #[inline] pub unsafe fn get_vibration(&self) -> Result { + #[inline] pub fn get_vibration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Vibration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_vibration(&self, value: GamepadVibration) -> Result<()> { + }} + #[inline] pub fn set_vibration(&self, value: GamepadVibration) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Vibration)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_reading(&self) -> Result { + }} + #[inline] pub fn get_current_reading(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetCurrentReading)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class Gamepad: IGamepad} impl RtActivatable for Gamepad {} impl RtActivatable for Gamepad {} impl Gamepad { - #[inline] pub fn add_gamepad_added(value: &super::super::foundation::EventHandler) -> Result { unsafe { + #[inline] pub fn add_gamepad_added(value: &foundation::EventHandler) -> Result { >::get_activation_factory().add_gamepad_added(value) - }} - #[inline] pub fn remove_gamepad_added(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_gamepad_added(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_gamepad_added(token) - }} - #[inline] pub fn add_gamepad_removed(value: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_gamepad_removed(value: &foundation::EventHandler) -> Result { >::get_activation_factory().add_gamepad_removed(value) - }} - #[inline] pub fn remove_gamepad_removed(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_gamepad_removed(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_gamepad_removed(token) - }} - #[inline] pub fn get_gamepads() -> Result>> { unsafe { + } + #[inline] pub fn get_gamepads() -> Result>>> { >::get_activation_factory().get_gamepads() - }} - #[inline] pub fn from_game_controller(gameController: &IGameController) -> Result> { unsafe { + } + #[inline] pub fn from_game_controller(gameController: &IGameController) -> Result>> { >::get_activation_factory().from_game_controller(gameController) - }} + } } DEFINE_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]) [CLSID_Gamepad]); DEFINE_IID!(IID_IGamepad2, 1008110013, 22805, 16965, 176, 192, 200, 159, 174, 3, 8, 255); @@ -530,11 +530,11 @@ RT_INTERFACE!{interface IGamepad2(IGamepad2Vtbl): IInspectable(IInspectableVtbl) fn GetButtonLabel(&self, button: GamepadButtons, out: *mut GameControllerButtonLabel) -> HRESULT }} impl IGamepad2 { - #[inline] pub unsafe fn get_button_label(&self, button: GamepadButtons) -> Result { + #[inline] pub fn get_button_label(&self, button: GamepadButtons) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetButtonLabel)(self as *const _ as *mut _, button, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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, @@ -544,47 +544,47 @@ RT_STRUCT! { struct GamepadReading { }} 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(&self, value: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_GamepadAdded(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_GamepadRemoved(&self, value: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_GamepadRemoved(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_Gamepads(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn add_GamepadAdded(&self, value: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_GamepadAdded(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_GamepadRemoved(&self, value: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_GamepadRemoved(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn get_Gamepads(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IGamepadStatics { - #[inline] pub unsafe fn add_gamepad_added(&self, value: &super::super::foundation::EventHandler) -> Result { + #[inline] pub fn add_gamepad_added(&self, value: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_GamepadAdded)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_gamepad_added(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_gamepad_added(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_GamepadAdded)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_gamepad_removed(&self, value: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_gamepad_removed(&self, value: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_GamepadRemoved)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_gamepad_removed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_gamepad_removed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_GamepadRemoved)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_gamepads(&self) -> Result>> { + }} + #[inline] pub fn get_gamepads(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Gamepads)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IGamepadStatics2, 1114074565, 2134, 18372, 146, 19, 179, 149, 80, 76, 58, 60); RT_INTERFACE!{static interface IGamepadStatics2(IGamepadStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IGamepadStatics2] { fn FromGameController(&self, gameController: *mut IGameController, out: *mut *mut Gamepad) -> HRESULT }} impl IGamepadStatics2 { - #[inline] pub unsafe fn from_game_controller(&self, gameController: &IGameController) -> Result> { + #[inline] pub fn from_game_controller(&self, gameController: &IGameController) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromGameController)(self as *const _ as *mut _, gameController as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_STRUCT! { struct GamepadVibration { LeftMotor: f64, RightMotor: f64, LeftTrigger: f64, RightTrigger: f64, @@ -595,16 +595,16 @@ RT_INTERFACE!{interface IHeadset(IHeadsetVtbl): IInspectable(IInspectableVtbl) [ fn get_RenderDeviceId(&self, out: *mut HSTRING) -> HRESULT }} impl IHeadset { - #[inline] pub unsafe fn get_capture_device_id(&self) -> Result { + #[inline] pub fn get_capture_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CaptureDeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_render_device_id(&self) -> Result { + }} + #[inline] pub fn get_render_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RenderDeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class Headset: IHeadset} RT_ENUM! { enum OptionalUINavigationButtons: u32 { @@ -622,69 +622,69 @@ RT_INTERFACE!{interface IRacingWheel(IRacingWheelVtbl): IInspectable(IInspectabl fn GetCurrentReading(&self, out: *mut RacingWheelReading) -> HRESULT }} impl IRacingWheel { - #[inline] pub unsafe fn get_has_clutch(&self) -> Result { + #[inline] pub fn get_has_clutch(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasClutch)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_handbrake(&self) -> Result { + }} + #[inline] pub fn get_has_handbrake(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasHandbrake)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_pattern_shifter(&self) -> Result { + }} + #[inline] pub fn get_has_pattern_shifter(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasPatternShifter)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_pattern_shifter_gear(&self) -> Result { + }} + #[inline] pub fn get_max_pattern_shifter_gear(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxPatternShifterGear)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_wheel_angle(&self) -> Result { + }} + #[inline] pub fn get_max_wheel_angle(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxWheelAngle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_wheel_motor(&self) -> Result> { + }} + #[inline] pub fn get_wheel_motor(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WheelMotor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_button_label(&self, button: RacingWheelButtons) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_button_label(&self, button: RacingWheelButtons) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetButtonLabel)(self as *const _ as *mut _, button, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_reading(&self) -> Result { + }} + #[inline] pub fn get_current_reading(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetCurrentReading)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class RacingWheel: IRacingWheel} impl RtActivatable for RacingWheel {} impl RtActivatable for RacingWheel {} impl RacingWheel { - #[inline] pub fn add_racing_wheel_added(value: &super::super::foundation::EventHandler) -> Result { unsafe { + #[inline] pub fn add_racing_wheel_added(value: &foundation::EventHandler) -> Result { >::get_activation_factory().add_racing_wheel_added(value) - }} - #[inline] pub fn remove_racing_wheel_added(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_racing_wheel_added(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_racing_wheel_added(token) - }} - #[inline] pub fn add_racing_wheel_removed(value: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_racing_wheel_removed(value: &foundation::EventHandler) -> Result { >::get_activation_factory().add_racing_wheel_removed(value) - }} - #[inline] pub fn remove_racing_wheel_removed(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_racing_wheel_removed(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_racing_wheel_removed(token) - }} - #[inline] pub fn get_racing_wheels() -> Result>> { unsafe { + } + #[inline] pub fn get_racing_wheels() -> Result>>> { >::get_activation_factory().get_racing_wheels() - }} - #[inline] pub fn from_game_controller(gameController: &IGameController) -> Result> { unsafe { + } + #[inline] pub fn from_game_controller(gameController: &IGameController) -> Result>> { >::get_activation_factory().from_game_controller(gameController) - }} + } } DEFINE_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]) [CLSID_RacingWheel]); RT_ENUM! { enum RacingWheelButtons: u32 { @@ -695,53 +695,53 @@ RT_STRUCT! { struct RacingWheelReading { }} 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(&self, value: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RacingWheelAdded(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_RacingWheelRemoved(&self, value: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RacingWheelRemoved(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_RacingWheels(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn add_RacingWheelAdded(&self, value: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RacingWheelAdded(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_RacingWheelRemoved(&self, value: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RacingWheelRemoved(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn get_RacingWheels(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IRacingWheelStatics { - #[inline] pub unsafe fn add_racing_wheel_added(&self, value: &super::super::foundation::EventHandler) -> Result { + #[inline] pub fn add_racing_wheel_added(&self, value: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RacingWheelAdded)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_racing_wheel_added(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_racing_wheel_added(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RacingWheelAdded)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_racing_wheel_removed(&self, value: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_racing_wheel_removed(&self, value: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RacingWheelRemoved)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_racing_wheel_removed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_racing_wheel_removed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RacingWheelRemoved)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_racing_wheels(&self) -> Result>> { + }} + #[inline] pub fn get_racing_wheels(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RacingWheels)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IRacingWheelStatics2, 3865492650, 60925, 17187, 169, 246, 60, 56, 64, 72, 209, 237); RT_INTERFACE!{static interface IRacingWheelStatics2(IRacingWheelStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IRacingWheelStatics2] { fn FromGameController(&self, gameController: *mut IGameController, out: *mut *mut RacingWheel) -> HRESULT }} impl IRacingWheelStatics2 { - #[inline] pub unsafe fn from_game_controller(&self, gameController: &IGameController) -> Result> { + #[inline] pub fn from_game_controller(&self, gameController: &IGameController) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromGameController)(self as *const _ as *mut _, gameController as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IRawGameController, 2091740561, 42977, 20337, 154, 120, 51, 233, 197, 223, 234, 98); RT_INTERFACE!{interface IRawGameController(IRawGameControllerVtbl): IInspectable(IInspectableVtbl) [IID_IRawGameController] { fn get_AxisCount(&self, out: *mut i32) -> HRESULT, fn get_ButtonCount(&self, out: *mut i32) -> HRESULT, - fn get_ForceFeedbackMotors(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_ForceFeedbackMotors(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_HardwareProductId(&self, out: *mut u16) -> HRESULT, fn get_HardwareVendorId(&self, out: *mut u16) -> HRESULT, fn get_SwitchCount(&self, out: *mut i32) -> HRESULT, @@ -750,137 +750,137 @@ RT_INTERFACE!{interface IRawGameController(IRawGameControllerVtbl): IInspectable fn GetSwitchKind(&self, switchIndex: i32, out: *mut GameControllerSwitchKind) -> HRESULT }} impl IRawGameController { - #[inline] pub unsafe fn get_axis_count(&self) -> Result { + #[inline] pub fn get_axis_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AxisCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_button_count(&self) -> Result { + }} + #[inline] pub fn get_button_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ButtonCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_force_feedback_motors(&self) -> Result>> { + }} + #[inline] pub fn get_force_feedback_motors(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ForceFeedbackMotors)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_hardware_product_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_hardware_product_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HardwareProductId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_hardware_vendor_id(&self) -> Result { + }} + #[inline] pub fn get_hardware_vendor_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HardwareVendorId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_switch_count(&self) -> Result { + }} + #[inline] pub fn get_switch_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SwitchCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_button_label(&self, buttonIndex: i32) -> Result { + }} + #[inline] pub fn get_button_label(&self, buttonIndex: i32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetButtonLabel)(self as *const _ as *mut _, buttonIndex, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_reading(&self, buttonArray: &mut [bool], switchArray: &mut [GameControllerSwitchPosition], axisArray: &mut [f64]) -> Result { + }} + #[inline] pub fn get_current_reading(&self, buttonArray: &mut [bool], switchArray: &mut [GameControllerSwitchPosition], axisArray: &mut [f64]) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetCurrentReading)(self as *const _ as *mut _, buttonArray.len() as u32, buttonArray.as_mut_ptr() as *mut _, switchArray.len() as u32, switchArray.as_mut_ptr() as *mut _, axisArray.len() as u32, axisArray.as_mut_ptr() as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_switch_kind(&self, switchIndex: i32) -> Result { + }} + #[inline] pub fn get_switch_kind(&self, switchIndex: i32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetSwitchKind)(self as *const _ as *mut _, switchIndex, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class RawGameController: IRawGameController} impl RtActivatable for RawGameController {} impl RawGameController { - #[inline] pub fn add_raw_game_controller_added(value: &super::super::foundation::EventHandler) -> Result { unsafe { + #[inline] pub fn add_raw_game_controller_added(value: &foundation::EventHandler) -> Result { >::get_activation_factory().add_raw_game_controller_added(value) - }} - #[inline] pub fn remove_raw_game_controller_added(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_raw_game_controller_added(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_raw_game_controller_added(token) - }} - #[inline] pub fn add_raw_game_controller_removed(value: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_raw_game_controller_removed(value: &foundation::EventHandler) -> Result { >::get_activation_factory().add_raw_game_controller_removed(value) - }} - #[inline] pub fn remove_raw_game_controller_removed(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_raw_game_controller_removed(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_raw_game_controller_removed(token) - }} - #[inline] pub fn get_raw_game_controllers() -> Result>> { unsafe { + } + #[inline] pub fn get_raw_game_controllers() -> Result>>> { >::get_activation_factory().get_raw_game_controllers() - }} - #[inline] pub fn from_game_controller(gameController: &IGameController) -> Result> { unsafe { + } + #[inline] pub fn from_game_controller(gameController: &IGameController) -> Result>> { >::get_activation_factory().from_game_controller(gameController) - }} + } } DEFINE_CLSID!(RawGameController(&[87,105,110,100,111,119,115,46,71,97,109,105,110,103,46,73,110,112,117,116,46,82,97,119,71,97,109,101,67,111,110,116,114,111,108,108,101,114,0]) [CLSID_RawGameController]); DEFINE_IID!(IID_IRawGameController2, 1136705589, 47987, 18262, 167, 135, 62, 214, 190, 166, 23, 189); RT_INTERFACE!{interface IRawGameController2(IRawGameController2Vtbl): IInspectable(IInspectableVtbl) [IID_IRawGameController2] { #[cfg(not(feature="windows-devices"))] fn __Dummy0(&self) -> (), - #[cfg(feature="windows-devices")] fn get_SimpleHapticsControllers(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + #[cfg(feature="windows-devices")] fn get_SimpleHapticsControllers(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_NonRoamableId(&self, out: *mut HSTRING) -> HRESULT, fn get_DisplayName(&self, out: *mut HSTRING) -> HRESULT }} impl IRawGameController2 { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_simple_haptics_controllers(&self) -> Result>> { + #[cfg(feature="windows-devices")] #[inline] pub fn get_simple_haptics_controllers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SimpleHapticsControllers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_non_roamable_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_non_roamable_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NonRoamableId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IRawGameControllerStatics, 3951888274, 59738, 19225, 175, 199, 10, 89, 248, 191, 117, 158); RT_INTERFACE!{static interface IRawGameControllerStatics(IRawGameControllerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IRawGameControllerStatics] { - fn add_RawGameControllerAdded(&self, value: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RawGameControllerAdded(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_RawGameControllerRemoved(&self, value: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RawGameControllerRemoved(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_RawGameControllers(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn add_RawGameControllerAdded(&self, value: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RawGameControllerAdded(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_RawGameControllerRemoved(&self, value: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RawGameControllerRemoved(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn get_RawGameControllers(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn FromGameController(&self, gameController: *mut IGameController, out: *mut *mut RawGameController) -> HRESULT }} impl IRawGameControllerStatics { - #[inline] pub unsafe fn add_raw_game_controller_added(&self, value: &super::super::foundation::EventHandler) -> Result { + #[inline] pub fn add_raw_game_controller_added(&self, value: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RawGameControllerAdded)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_raw_game_controller_added(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_raw_game_controller_added(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RawGameControllerAdded)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_raw_game_controller_removed(&self, value: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_raw_game_controller_removed(&self, value: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RawGameControllerRemoved)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_raw_game_controller_removed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_raw_game_controller_removed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RawGameControllerRemoved)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_raw_game_controllers(&self) -> Result>> { + }} + #[inline] pub fn get_raw_game_controllers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RawGameControllers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_game_controller(&self, gameController: &IGameController) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn from_game_controller(&self, gameController: &IGameController) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromGameController)(self as *const _ as *mut _, gameController as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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, @@ -892,89 +892,89 @@ RT_INTERFACE!{interface IUINavigationController(IUINavigationControllerVtbl): II fn GetRequiredButtonLabel(&self, button: RequiredUINavigationButtons, out: *mut GameControllerButtonLabel) -> HRESULT }} impl IUINavigationController { - #[inline] pub unsafe fn get_current_reading(&self) -> Result { + #[inline] pub fn get_current_reading(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetCurrentReading)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_optional_button_label(&self, button: OptionalUINavigationButtons) -> Result { + }} + #[inline] pub fn get_optional_button_label(&self, button: OptionalUINavigationButtons) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetOptionalButtonLabel)(self as *const _ as *mut _, button, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_required_button_label(&self, button: RequiredUINavigationButtons) -> Result { + }} + #[inline] pub fn get_required_button_label(&self, button: RequiredUINavigationButtons) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetRequiredButtonLabel)(self as *const _ as *mut _, button, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class UINavigationController: IUINavigationController} impl RtActivatable for UINavigationController {} impl RtActivatable for UINavigationController {} impl UINavigationController { - #[inline] pub fn add_uinavigation_controller_added(value: &super::super::foundation::EventHandler) -> Result { unsafe { + #[inline] pub fn add_uinavigation_controller_added(value: &foundation::EventHandler) -> Result { >::get_activation_factory().add_uinavigation_controller_added(value) - }} - #[inline] pub fn remove_uinavigation_controller_added(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_uinavigation_controller_added(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_uinavigation_controller_added(token) - }} - #[inline] pub fn add_uinavigation_controller_removed(value: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_uinavigation_controller_removed(value: &foundation::EventHandler) -> Result { >::get_activation_factory().add_uinavigation_controller_removed(value) - }} - #[inline] pub fn remove_uinavigation_controller_removed(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_uinavigation_controller_removed(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_uinavigation_controller_removed(token) - }} - #[inline] pub fn get_uinavigation_controllers() -> Result>> { unsafe { + } + #[inline] pub fn get_uinavigation_controllers() -> Result>>> { >::get_activation_factory().get_uinavigation_controllers() - }} - #[inline] pub fn from_game_controller(gameController: &IGameController) -> Result> { unsafe { + } + #[inline] pub fn from_game_controller(gameController: &IGameController) -> Result>> { >::get_activation_factory().from_game_controller(gameController) - }} + } } DEFINE_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]) [CLSID_UINavigationController]); 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(&self, value: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_UINavigationControllerAdded(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_UINavigationControllerRemoved(&self, value: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_UINavigationControllerRemoved(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_UINavigationControllers(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn add_UINavigationControllerAdded(&self, value: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_UINavigationControllerAdded(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_UINavigationControllerRemoved(&self, value: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_UINavigationControllerRemoved(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn get_UINavigationControllers(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IUINavigationControllerStatics { - #[inline] pub unsafe fn add_uinavigation_controller_added(&self, value: &super::super::foundation::EventHandler) -> Result { + #[inline] pub fn add_uinavigation_controller_added(&self, value: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_UINavigationControllerAdded)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_uinavigation_controller_added(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_uinavigation_controller_added(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_UINavigationControllerAdded)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_uinavigation_controller_removed(&self, value: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_uinavigation_controller_removed(&self, value: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_UINavigationControllerRemoved)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_uinavigation_controller_removed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_uinavigation_controller_removed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_UINavigationControllerRemoved)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_uinavigation_controllers(&self) -> Result>> { + }} + #[inline] pub fn get_uinavigation_controllers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UINavigationControllers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IUINavigationControllerStatics2, 3771410659, 45579, 19211, 158, 212, 243, 213, 60, 236, 13, 228); RT_INTERFACE!{static interface IUINavigationControllerStatics2(IUINavigationControllerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IUINavigationControllerStatics2] { fn FromGameController(&self, gameController: *mut IGameController, out: *mut *mut UINavigationController) -> HRESULT }} impl IUINavigationControllerStatics2 { - #[inline] pub unsafe fn from_game_controller(&self, gameController: &IGameController) -> Result> { + #[inline] pub fn from_game_controller(&self, gameController: &IGameController) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromGameController)(self as *const _ as *mut _, gameController as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_STRUCT! { struct UINavigationReading { Timestamp: u64, RequiredButtons: RequiredUINavigationButtons, OptionalButtons: OptionalUINavigationButtons, @@ -988,36 +988,36 @@ RT_INTERFACE!{interface ICustomGameControllerFactory(ICustomGameControllerFactor fn OnGameControllerRemoved(&self, value: *mut super::IGameController) -> HRESULT }} impl ICustomGameControllerFactory { - #[inline] pub unsafe fn create_game_controller(&self, provider: &IGameControllerProvider) -> Result> { + #[inline] pub fn create_game_controller(&self, provider: &IGameControllerProvider) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateGameController)(self as *const _ as *mut _, 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(&self, value: &super::IGameController) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn on_game_controller_added(&self, value: &super::IGameController) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnGameControllerAdded)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn on_game_controller_removed(&self, value: &super::IGameController) -> Result<()> { + }} + #[inline] pub fn on_game_controller_removed(&self, value: &super::IGameController) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnGameControllerRemoved)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{static class GameControllerFactoryManager} impl RtActivatable for GameControllerFactoryManager {} impl RtActivatable for GameControllerFactoryManager {} impl GameControllerFactoryManager { - #[inline] pub fn register_custom_factory_for_gip_interface(factory: &ICustomGameControllerFactory, interfaceId: Guid) -> Result<()> { unsafe { + #[inline] pub fn register_custom_factory_for_gip_interface(factory: &ICustomGameControllerFactory, interfaceId: Guid) -> Result<()> { >::get_activation_factory().register_custom_factory_for_gip_interface(factory, interfaceId) - }} - #[inline] pub fn register_custom_factory_for_hardware_id(factory: &ICustomGameControllerFactory, hardwareVendorId: u16, hardwareProductId: u16) -> Result<()> { unsafe { + } + #[inline] pub fn register_custom_factory_for_hardware_id(factory: &ICustomGameControllerFactory, hardwareVendorId: u16, hardwareProductId: u16) -> Result<()> { >::get_activation_factory().register_custom_factory_for_hardware_id(factory, hardwareVendorId, hardwareProductId) - }} - #[inline] pub fn register_custom_factory_for_xusb_type(factory: &ICustomGameControllerFactory, xusbType: XusbDeviceType, xusbSubtype: XusbDeviceSubtype) -> Result<()> { unsafe { + } + #[inline] pub fn register_custom_factory_for_xusb_type(factory: &ICustomGameControllerFactory, xusbType: XusbDeviceType, xusbSubtype: XusbDeviceSubtype) -> Result<()> { >::get_activation_factory().register_custom_factory_for_xusb_type(factory, xusbType, xusbSubtype) - }} - #[inline] pub fn try_get_factory_controller_from_game_controller(factory: &ICustomGameControllerFactory, gameController: &super::IGameController) -> Result> { unsafe { + } + #[inline] pub fn try_get_factory_controller_from_game_controller(factory: &ICustomGameControllerFactory, gameController: &super::IGameController) -> Result>> { >::get_activation_factory().try_get_factory_controller_from_game_controller(factory, gameController) - }} + } } DEFINE_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]) [CLSID_GameControllerFactoryManager]); DEFINE_IID!(IID_IGameControllerFactoryManagerStatics, 919299811, 53409, 18822, 162, 76, 64, 177, 55, 222, 186, 158); @@ -1027,29 +1027,29 @@ RT_INTERFACE!{static interface IGameControllerFactoryManagerStatics(IGameControl fn RegisterCustomFactoryForXusbType(&self, factory: *mut ICustomGameControllerFactory, xusbType: XusbDeviceType, xusbSubtype: XusbDeviceSubtype) -> HRESULT }} impl IGameControllerFactoryManagerStatics { - #[inline] pub unsafe fn register_custom_factory_for_gip_interface(&self, factory: &ICustomGameControllerFactory, interfaceId: Guid) -> Result<()> { + #[inline] pub fn register_custom_factory_for_gip_interface(&self, factory: &ICustomGameControllerFactory, interfaceId: Guid) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RegisterCustomFactoryForGipInterface)(self as *const _ as *mut _, factory as *const _ as *mut _, interfaceId); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn register_custom_factory_for_hardware_id(&self, factory: &ICustomGameControllerFactory, hardwareVendorId: u16, hardwareProductId: u16) -> Result<()> { + }} + #[inline] pub fn register_custom_factory_for_hardware_id(&self, factory: &ICustomGameControllerFactory, hardwareVendorId: u16, hardwareProductId: u16) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RegisterCustomFactoryForHardwareId)(self as *const _ as *mut _, 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(&self, factory: &ICustomGameControllerFactory, xusbType: XusbDeviceType, xusbSubtype: XusbDeviceSubtype) -> Result<()> { + }} + #[inline] pub fn register_custom_factory_for_xusb_type(&self, factory: &ICustomGameControllerFactory, xusbType: XusbDeviceType, xusbSubtype: XusbDeviceSubtype) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RegisterCustomFactoryForXusbType)(self as *const _ as *mut _, factory as *const _ as *mut _, xusbType, xusbSubtype); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IGameControllerFactoryManagerStatics2, 3939391044, 6623, 16661, 179, 42, 39, 147, 226, 174, 163, 187); RT_INTERFACE!{static interface IGameControllerFactoryManagerStatics2(IGameControllerFactoryManagerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IGameControllerFactoryManagerStatics2] { fn TryGetFactoryControllerFromGameController(&self, factory: *mut ICustomGameControllerFactory, gameController: *mut super::IGameController, out: *mut *mut super::IGameController) -> HRESULT }} impl IGameControllerFactoryManagerStatics2 { - #[inline] pub unsafe fn try_get_factory_controller_from_game_controller(&self, factory: &ICustomGameControllerFactory, gameController: &super::IGameController) -> Result> { + #[inline] pub fn try_get_factory_controller_from_game_controller(&self, factory: &ICustomGameControllerFactory, gameController: &super::IGameController) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetFactoryControllerFromGameController)(self as *const _ as *mut _, factory as *const _ as *mut _, gameController as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IGameControllerInputSink, 536279330, 50752, 19576, 168, 32, 154, 113, 92, 85, 139, 203); RT_INTERFACE!{interface IGameControllerInputSink(IGameControllerInputSinkVtbl): IInspectable(IInspectableVtbl) [IID_IGameControllerInputSink] { @@ -1057,14 +1057,14 @@ RT_INTERFACE!{interface IGameControllerInputSink(IGameControllerInputSinkVtbl): fn OnInputSuspended(&self, timestamp: u64) -> HRESULT }} impl IGameControllerInputSink { - #[inline] pub unsafe fn on_input_resumed(&self, timestamp: u64) -> Result<()> { + #[inline] pub fn on_input_resumed(&self, timestamp: u64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnInputResumed)(self as *const _ as *mut _, timestamp); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn on_input_suspended(&self, timestamp: u64) -> Result<()> { + }} + #[inline] pub fn on_input_suspended(&self, timestamp: u64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnInputSuspended)(self as *const _ as *mut _, timestamp); if hr == S_OK { Ok(()) } 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] { @@ -1075,31 +1075,31 @@ RT_INTERFACE!{interface IGameControllerProvider(IGameControllerProviderVtbl): II fn get_IsConnected(&self, out: *mut bool) -> HRESULT }} impl IGameControllerProvider { - #[inline] pub unsafe fn get_firmware_version_info(&self) -> Result { + #[inline] pub fn get_firmware_version_info(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FirmwareVersionInfo)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_hardware_product_id(&self) -> Result { + }} + #[inline] pub fn get_hardware_product_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HardwareProductId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_hardware_vendor_id(&self) -> Result { + }} + #[inline] pub fn get_hardware_vendor_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HardwareVendorId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_hardware_version_info(&self) -> Result { + }} + #[inline] pub fn get_hardware_version_info(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HardwareVersionInfo)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_connected(&self) -> Result { + }} + #[inline] pub fn get_is_connected(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsConnected)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_STRUCT! { struct GameControllerVersionInfo { Major: u16, Minor: u16, Build: u16, Revision: u16, @@ -1114,21 +1114,21 @@ RT_INTERFACE!{interface IGipFirmwareUpdateResult(IGipFirmwareUpdateResultVtbl): fn get_Status(&self, out: *mut GipFirmwareUpdateStatus) -> HRESULT }} impl IGipFirmwareUpdateResult { - #[inline] pub unsafe fn get_extended_error_code(&self) -> Result { + #[inline] pub fn get_extended_error_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedErrorCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_final_component_id(&self) -> Result { + }} + #[inline] pub fn get_final_component_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FinalComponentId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class GipFirmwareUpdateResult: IGipFirmwareUpdateResult} RT_ENUM! { enum GipFirmwareUpdateStatus: i32 { @@ -1140,35 +1140,35 @@ RT_INTERFACE!{interface IGipGameControllerInputSink(IGipGameControllerInputSinkV fn OnMessageReceived(&self, timestamp: u64, messageClass: GipMessageClass, messageId: u8, sequenceId: u8, messageBufferSize: u32, messageBuffer: *mut u8) -> HRESULT }} impl IGipGameControllerInputSink { - #[inline] pub unsafe fn on_key_received(&self, timestamp: u64, keyCode: u8, isPressed: bool) -> Result<()> { + #[inline] pub fn on_key_received(&self, timestamp: u64, keyCode: u8, isPressed: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnKeyReceived)(self as *const _ as *mut _, timestamp, keyCode, isPressed); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn on_message_received(&self, timestamp: u64, messageClass: GipMessageClass, messageId: u8, sequenceId: u8, messageBuffer: &[u8]) -> Result<()> { + }} + #[inline] pub fn on_message_received(&self, timestamp: u64, messageClass: GipMessageClass, messageId: u8, sequenceId: u8, messageBuffer: &[u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnMessageReceived)(self as *const _ as *mut _, timestamp, messageClass, messageId, sequenceId, messageBuffer.len() as u32, messageBuffer.as_ptr() as *mut _); if hr == S_OK { Ok(()) } 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(&self, messageClass: GipMessageClass, messageId: u8, messageBufferSize: u32, messageBuffer: *mut u8) -> HRESULT, fn SendReceiveMessage(&self, messageClass: GipMessageClass, messageId: u8, requestMessageBufferSize: u32, requestMessageBuffer: *mut u8, responseMessageBufferSize: u32, responseMessageBuffer: *mut u8) -> HRESULT, - #[cfg(feature="windows-storage")] fn UpdateFirmwareAsync(&self, firmwareImage: *mut ::rt::gen::windows::storage::streams::IInputStream, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperationWithProgress) -> HRESULT + #[cfg(feature="windows-storage")] fn UpdateFirmwareAsync(&self, firmwareImage: *mut ::rt::gen::windows::storage::streams::IInputStream, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT }} impl IGipGameControllerProvider { - #[inline] pub unsafe fn send_message(&self, messageClass: GipMessageClass, messageId: u8, messageBuffer: &[u8]) -> Result<()> { + #[inline] pub fn send_message(&self, messageClass: GipMessageClass, messageId: u8, messageBuffer: &[u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SendMessage)(self as *const _ as *mut _, 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(&self, messageClass: GipMessageClass, messageId: u8, requestMessageBuffer: &[u8], responseMessageBuffer: &mut [u8]) -> Result<()> { + }} + #[inline] pub fn send_receive_message(&self, messageClass: GipMessageClass, messageId: u8, requestMessageBuffer: &[u8], responseMessageBuffer: &mut [u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SendReceiveMessage)(self as *const _ as *mut _, messageClass, messageId, requestMessageBuffer.len() as u32, requestMessageBuffer.as_ptr() as *mut _, responseMessageBuffer.len() as u32, responseMessageBuffer.as_mut_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn update_firmware_async(&self, firmwareImage: &::rt::gen::windows::storage::streams::IInputStream) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn update_firmware_async(&self, firmwareImage: &::rt::gen::windows::storage::streams::IInputStream) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UpdateFirmwareAsync)(self as *const _ as *mut _, firmwareImage as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class GipGameControllerProvider: IGipGameControllerProvider} RT_ENUM! { enum GipMessageClass: i32 { @@ -1179,10 +1179,10 @@ RT_INTERFACE!{interface IHidGameControllerInputSink(IHidGameControllerInputSinkV fn OnInputReportReceived(&self, timestamp: u64, reportId: u8, reportBufferSize: u32, reportBuffer: *mut u8) -> HRESULT }} impl IHidGameControllerInputSink { - #[inline] pub unsafe fn on_input_report_received(&self, timestamp: u64, reportId: u8, reportBuffer: &[u8]) -> Result<()> { + #[inline] pub fn on_input_report_received(&self, timestamp: u64, reportId: u8, reportBuffer: &[u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnInputReportReceived)(self as *const _ as *mut _, timestamp, reportId, reportBuffer.len() as u32, reportBuffer.as_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IHidGameControllerProvider, 2513320692, 44016, 19304, 160, 129, 59, 125, 231, 63, 240, 231); RT_INTERFACE!{interface IHidGameControllerProvider(IHidGameControllerProviderVtbl): IInspectable(IInspectableVtbl) [IID_IHidGameControllerProvider] { @@ -1193,28 +1193,28 @@ RT_INTERFACE!{interface IHidGameControllerProvider(IHidGameControllerProviderVtb fn SendOutputReport(&self, reportId: u8, reportBufferSize: u32, reportBuffer: *mut u8) -> HRESULT }} impl IHidGameControllerProvider { - #[inline] pub unsafe fn get_usage_id(&self) -> Result { + #[inline] pub fn get_usage_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UsageId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_usage_page(&self) -> Result { + }} + #[inline] pub fn get_usage_page(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UsagePage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_feature_report(&self, reportId: u8, reportBuffer: &mut [u8]) -> Result<()> { + }} + #[inline] pub fn get_feature_report(&self, reportId: u8, reportBuffer: &mut [u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).GetFeatureReport)(self as *const _ as *mut _, reportId, reportBuffer.len() as u32, reportBuffer.as_mut_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn send_feature_report(&self, reportId: u8, reportBuffer: &[u8]) -> Result<()> { + }} + #[inline] pub fn send_feature_report(&self, reportId: u8, reportBuffer: &[u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SendFeatureReport)(self as *const _ as *mut _, reportId, reportBuffer.len() as u32, reportBuffer.as_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn send_output_report(&self, reportId: u8, reportBuffer: &[u8]) -> Result<()> { + }} + #[inline] pub fn send_output_report(&self, reportId: u8, reportBuffer: &[u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SendOutputReport)(self as *const _ as *mut _, reportId, reportBuffer.len() as u32, reportBuffer.as_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class HidGameControllerProvider: IHidGameControllerProvider} RT_ENUM! { enum XusbDeviceSubtype: i32 { @@ -1228,20 +1228,20 @@ RT_INTERFACE!{interface IXusbGameControllerInputSink(IXusbGameControllerInputSin fn OnInputReceived(&self, timestamp: u64, reportId: u8, inputBufferSize: u32, inputBuffer: *mut u8) -> HRESULT }} impl IXusbGameControllerInputSink { - #[inline] pub unsafe fn on_input_received(&self, timestamp: u64, reportId: u8, inputBuffer: &[u8]) -> Result<()> { + #[inline] pub fn on_input_received(&self, timestamp: u64, reportId: u8, inputBuffer: &[u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnInputReceived)(self as *const _ as *mut _, timestamp, reportId, inputBuffer.len() as u32, inputBuffer.as_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, lowFrequencyMotorSpeed: f64, highFrequencyMotorSpeed: f64) -> HRESULT }} impl IXusbGameControllerProvider { - #[inline] pub unsafe fn set_vibration(&self, lowFrequencyMotorSpeed: f64, highFrequencyMotorSpeed: f64) -> Result<()> { + #[inline] pub fn set_vibration(&self, lowFrequencyMotorSpeed: f64, highFrequencyMotorSpeed: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetVibration)(self as *const _ as *mut _, lowFrequencyMotorSpeed, highFrequencyMotorSpeed); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class XusbGameControllerProvider: IXusbGameControllerProvider} } // Windows.Gaming.Input.Custom @@ -1250,25 +1250,25 @@ use ::prelude::*; 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(&self, out: *mut ConditionForceEffectKind) -> HRESULT, - fn SetParameters(&self, direction: ::rt::gen::windows::foundation::numerics::Vector3, positiveCoefficient: f32, negativeCoefficient: f32, maxPositiveMagnitude: f32, maxNegativeMagnitude: f32, deadZone: f32, bias: f32) -> HRESULT + fn SetParameters(&self, direction: foundation::numerics::Vector3, positiveCoefficient: f32, negativeCoefficient: f32, maxPositiveMagnitude: f32, maxNegativeMagnitude: f32, deadZone: f32, bias: f32) -> HRESULT }} impl IConditionForceEffect { - #[inline] pub unsafe fn get_kind(&self) -> Result { + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_parameters(&self, direction: ::rt::gen::windows::foundation::numerics::Vector3, positiveCoefficient: f32, negativeCoefficient: f32, maxPositiveMagnitude: f32, maxNegativeMagnitude: f32, deadZone: f32, bias: f32) -> Result<()> { + }} + #[inline] pub fn set_parameters(&self, direction: foundation::numerics::Vector3, positiveCoefficient: f32, negativeCoefficient: f32, maxPositiveMagnitude: f32, maxNegativeMagnitude: f32, deadZone: f32, bias: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetParameters)(self as *const _ as *mut _, direction, positiveCoefficient, negativeCoefficient, maxPositiveMagnitude, maxNegativeMagnitude, deadZone, bias); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ConditionForceEffect: IForceFeedbackEffect} impl RtActivatable for ConditionForceEffect {} impl ConditionForceEffect { - #[inline] pub fn create_instance(effectKind: ConditionForceEffectKind) -> Result> { unsafe { + #[inline] pub fn create_instance(effectKind: ConditionForceEffectKind) -> Result> { >::get_activation_factory().create_instance(effectKind) - }} + } } DEFINE_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]) [CLSID_ConditionForceEffect]); DEFINE_IID!(IID_IConditionForceEffectFactory, 2443809380, 6160, 20150, 167, 115, 191, 211, 184, 205, 219, 171); @@ -1276,29 +1276,29 @@ RT_INTERFACE!{static interface IConditionForceEffectFactory(IConditionForceEffec fn CreateInstance(&self, effectKind: ConditionForceEffectKind, out: *mut *mut ConditionForceEffect) -> HRESULT }} impl IConditionForceEffectFactory { - #[inline] pub unsafe fn create_instance(&self, effectKind: ConditionForceEffectKind) -> Result> { + #[inline] pub fn create_instance(&self, effectKind: ConditionForceEffectKind) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self as *const _ as *mut _, effectKind, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum ConditionForceEffectKind: i32 { Spring (ConditionForceEffectKind_Spring) = 0, Damper (ConditionForceEffectKind_Damper) = 1, Inertia (ConditionForceEffectKind_Inertia) = 2, Friction (ConditionForceEffectKind_Friction) = 3, }} 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(&self, vector: ::rt::gen::windows::foundation::numerics::Vector3, duration: ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn SetParametersWithEnvelope(&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 + fn SetParameters(&self, vector: foundation::numerics::Vector3, duration: foundation::TimeSpan) -> HRESULT, + fn SetParametersWithEnvelope(&self, vector: foundation::numerics::Vector3, attackGain: f32, sustainGain: f32, releaseGain: f32, startDelay: foundation::TimeSpan, attackDuration: foundation::TimeSpan, sustainDuration: foundation::TimeSpan, releaseDuration: foundation::TimeSpan, repeatCount: u32) -> HRESULT }} impl IConstantForceEffect { - #[inline] pub unsafe fn set_parameters(&self, vector: ::rt::gen::windows::foundation::numerics::Vector3, duration: ::rt::gen::windows::foundation::TimeSpan) -> Result<()> { + #[inline] pub fn set_parameters(&self, vector: foundation::numerics::Vector3, duration: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetParameters)(self as *const _ as *mut _, vector, duration); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_parameters_with_envelope(&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<()> { + }} + #[inline] pub fn set_parameters_with_envelope(&self, vector: foundation::numerics::Vector3, attackGain: f32, sustainGain: f32, releaseGain: f32, startDelay: foundation::TimeSpan, attackDuration: foundation::TimeSpan, sustainDuration: foundation::TimeSpan, releaseDuration: foundation::TimeSpan, repeatCount: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetParametersWithEnvelope)(self as *const _ as *mut _, vector, attackGain, sustainGain, releaseGain, startDelay, attackDuration, sustainDuration, releaseDuration, repeatCount); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ConstantForceEffect: IForceFeedbackEffect} impl RtActivatable for ConstantForceEffect {} @@ -1312,28 +1312,28 @@ RT_INTERFACE!{interface IForceFeedbackEffect(IForceFeedbackEffectVtbl): IInspect fn Stop(&self) -> HRESULT }} impl IForceFeedbackEffect { - #[inline] pub unsafe fn get_gain(&self) -> Result { + #[inline] pub fn get_gain(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Gain)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_gain(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_gain(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Gain)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_state(&self) -> Result { + }} + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum ForceFeedbackEffectAxes: u32 { None (ForceFeedbackEffectAxes_None) = 0, X (ForceFeedbackEffectAxes_X) = 1, Y (ForceFeedbackEffectAxes_Y) = 2, Z (ForceFeedbackEffectAxes_Z) = 4, @@ -1351,106 +1351,106 @@ RT_INTERFACE!{interface IForceFeedbackMotor(IForceFeedbackMotorVtbl): IInspectab fn put_MasterGain(&self, value: f64) -> HRESULT, fn get_IsEnabled(&self, out: *mut bool) -> HRESULT, fn get_SupportedAxes(&self, out: *mut ForceFeedbackEffectAxes) -> HRESULT, - fn LoadEffectAsync(&self, effect: *mut IForceFeedbackEffect, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn LoadEffectAsync(&self, effect: *mut IForceFeedbackEffect, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn PauseAllEffects(&self) -> HRESULT, fn ResumeAllEffects(&self) -> HRESULT, fn StopAllEffects(&self) -> HRESULT, - fn TryDisableAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn TryEnableAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn TryResetAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn TryUnloadEffectAsync(&self, effect: *mut IForceFeedbackEffect, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn TryDisableAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryEnableAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryResetAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryUnloadEffectAsync(&self, effect: *mut IForceFeedbackEffect, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IForceFeedbackMotor { - #[inline] pub unsafe fn get_are_effects_paused(&self) -> Result { + #[inline] pub fn get_are_effects_paused(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AreEffectsPaused)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_master_gain(&self) -> Result { + }} + #[inline] pub fn get_master_gain(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MasterGain)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_master_gain(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_master_gain(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MasterGain)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_axes(&self) -> Result { + }} + #[inline] pub fn get_supported_axes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SupportedAxes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn load_effect_async(&self, effect: &IForceFeedbackEffect) -> Result>> { + }} + #[inline] pub fn load_effect_async(&self, effect: &IForceFeedbackEffect) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LoadEffectAsync)(self as *const _ as *mut _, 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(&self) -> Result<()> { + }} + #[inline] pub fn pause_all_effects(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).PauseAllEffects)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn resume_all_effects(&self) -> Result<()> { + }} + #[inline] pub fn resume_all_effects(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ResumeAllEffects)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop_all_effects(&self) -> Result<()> { + }} + #[inline] pub fn stop_all_effects(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StopAllEffects)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn try_disable_async(&self) -> Result>> { + }} + #[inline] pub fn try_disable_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryDisableAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_enable_async(&self) -> Result>> { + }} + #[inline] pub fn try_enable_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryEnableAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_reset_async(&self) -> Result>> { + }} + #[inline] pub fn try_reset_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryResetAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_unload_effect_async(&self, effect: &IForceFeedbackEffect) -> Result>> { + }} + #[inline] pub fn try_unload_effect_async(&self, effect: &IForceFeedbackEffect) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryUnloadEffectAsync)(self as *const _ as *mut _, effect as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ForceFeedbackMotor: IForceFeedbackMotor} 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(&self, out: *mut PeriodicForceEffectKind) -> HRESULT, - fn SetParameters(&self, vector: ::rt::gen::windows::foundation::numerics::Vector3, frequency: f32, phase: f32, bias: f32, duration: ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn SetParametersWithEnvelope(&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 + fn SetParameters(&self, vector: foundation::numerics::Vector3, frequency: f32, phase: f32, bias: f32, duration: foundation::TimeSpan) -> HRESULT, + fn SetParametersWithEnvelope(&self, vector: foundation::numerics::Vector3, frequency: f32, phase: f32, bias: f32, attackGain: f32, sustainGain: f32, releaseGain: f32, startDelay: foundation::TimeSpan, attackDuration: foundation::TimeSpan, sustainDuration: foundation::TimeSpan, releaseDuration: foundation::TimeSpan, repeatCount: u32) -> HRESULT }} impl IPeriodicForceEffect { - #[inline] pub unsafe fn get_kind(&self) -> Result { + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_parameters(&self, vector: ::rt::gen::windows::foundation::numerics::Vector3, frequency: f32, phase: f32, bias: f32, duration: ::rt::gen::windows::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_parameters(&self, vector: foundation::numerics::Vector3, frequency: f32, phase: f32, bias: f32, duration: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetParameters)(self as *const _ as *mut _, vector, frequency, phase, bias, duration); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_parameters_with_envelope(&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<()> { + }} + #[inline] pub fn set_parameters_with_envelope(&self, vector: foundation::numerics::Vector3, frequency: f32, phase: f32, bias: f32, attackGain: f32, sustainGain: f32, releaseGain: f32, startDelay: foundation::TimeSpan, attackDuration: foundation::TimeSpan, sustainDuration: foundation::TimeSpan, releaseDuration: foundation::TimeSpan, repeatCount: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetParametersWithEnvelope)(self as *const _ as *mut _, vector, frequency, phase, bias, attackGain, sustainGain, releaseGain, startDelay, attackDuration, sustainDuration, releaseDuration, repeatCount); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PeriodicForceEffect: IForceFeedbackEffect} impl RtActivatable for PeriodicForceEffect {} impl PeriodicForceEffect { - #[inline] pub fn create_instance(effectKind: PeriodicForceEffectKind) -> Result> { unsafe { + #[inline] pub fn create_instance(effectKind: PeriodicForceEffectKind) -> Result> { >::get_activation_factory().create_instance(effectKind) - }} + } } DEFINE_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]) [CLSID_PeriodicForceEffect]); DEFINE_IID!(IID_IPeriodicForceEffectFactory, 1868753690, 38993, 18299, 179, 24, 53, 236, 170, 21, 7, 15); @@ -1458,29 +1458,29 @@ RT_INTERFACE!{static interface IPeriodicForceEffectFactory(IPeriodicForceEffectF fn CreateInstance(&self, effectKind: PeriodicForceEffectKind, out: *mut *mut PeriodicForceEffect) -> HRESULT }} impl IPeriodicForceEffectFactory { - #[inline] pub unsafe fn create_instance(&self, effectKind: PeriodicForceEffectKind) -> Result> { + #[inline] pub fn create_instance(&self, effectKind: PeriodicForceEffectKind) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self as *const _ as *mut _, effectKind, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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_IRampForceEffect, 4059566681, 7334, 16512, 181, 109, 180, 63, 51, 84, 208, 82); RT_INTERFACE!{interface IRampForceEffect(IRampForceEffectVtbl): IInspectable(IInspectableVtbl) [IID_IRampForceEffect] { - fn SetParameters(&self, startVector: ::rt::gen::windows::foundation::numerics::Vector3, endVector: ::rt::gen::windows::foundation::numerics::Vector3, duration: ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn SetParametersWithEnvelope(&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 + fn SetParameters(&self, startVector: foundation::numerics::Vector3, endVector: foundation::numerics::Vector3, duration: foundation::TimeSpan) -> HRESULT, + fn SetParametersWithEnvelope(&self, startVector: foundation::numerics::Vector3, endVector: foundation::numerics::Vector3, attackGain: f32, sustainGain: f32, releaseGain: f32, startDelay: foundation::TimeSpan, attackDuration: foundation::TimeSpan, sustainDuration: foundation::TimeSpan, releaseDuration: foundation::TimeSpan, repeatCount: u32) -> HRESULT }} impl IRampForceEffect { - #[inline] pub unsafe fn set_parameters(&self, startVector: ::rt::gen::windows::foundation::numerics::Vector3, endVector: ::rt::gen::windows::foundation::numerics::Vector3, duration: ::rt::gen::windows::foundation::TimeSpan) -> Result<()> { + #[inline] pub fn set_parameters(&self, startVector: foundation::numerics::Vector3, endVector: foundation::numerics::Vector3, duration: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetParameters)(self as *const _ as *mut _, startVector, endVector, duration); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_parameters_with_envelope(&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<()> { + }} + #[inline] pub fn set_parameters_with_envelope(&self, startVector: foundation::numerics::Vector3, endVector: foundation::numerics::Vector3, attackGain: f32, sustainGain: f32, releaseGain: f32, startDelay: foundation::TimeSpan, attackDuration: foundation::TimeSpan, sustainDuration: foundation::TimeSpan, releaseDuration: foundation::TimeSpan, repeatCount: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetParametersWithEnvelope)(self as *const _ as *mut _, startVector, endVector, attackGain, sustainGain, releaseGain, startDelay, attackDuration, sustainDuration, releaseDuration, repeatCount); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class RampForceEffect: IForceFeedbackEffect} impl RtActivatable for RampForceEffect {} @@ -1491,12 +1491,12 @@ use ::prelude::*; RT_CLASS!{static class GameControllerProviderInfo} impl RtActivatable for GameControllerProviderInfo {} impl GameControllerProviderInfo { - #[inline] pub fn get_parent_provider_id(provider: &super::custom::IGameControllerProvider) -> Result { unsafe { + #[inline] pub fn get_parent_provider_id(provider: &super::custom::IGameControllerProvider) -> Result { >::get_activation_factory().get_parent_provider_id(provider) - }} - #[inline] pub fn get_provider_id(provider: &super::custom::IGameControllerProvider) -> Result { unsafe { + } + #[inline] pub fn get_provider_id(provider: &super::custom::IGameControllerProvider) -> Result { >::get_activation_factory().get_provider_id(provider) - }} + } } DEFINE_CLSID!(GameControllerProviderInfo(&[87,105,110,100,111,119,115,46,71,97,109,105,110,103,46,73,110,112,117,116,46,80,114,101,118,105,101,119,46,71,97,109,101,67,111,110,116,114,111,108,108,101,114,80,114,111,118,105,100,101,114,73,110,102,111,0]) [CLSID_GameControllerProviderInfo]); DEFINE_IID!(IID_IGameControllerProviderInfoStatics, 199354053, 55741, 17646, 131, 98, 72, 139, 46, 70, 75, 251); @@ -1505,16 +1505,16 @@ RT_INTERFACE!{static interface IGameControllerProviderInfoStatics(IGameControlle fn GetProviderId(&self, provider: *mut super::custom::IGameControllerProvider, out: *mut HSTRING) -> HRESULT }} impl IGameControllerProviderInfoStatics { - #[inline] pub unsafe fn get_parent_provider_id(&self, provider: &super::custom::IGameControllerProvider) -> Result { + #[inline] pub fn get_parent_provider_id(&self, provider: &super::custom::IGameControllerProvider) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetParentProviderId)(self as *const _ as *mut _, provider as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_provider_id(&self, provider: &super::custom::IGameControllerProvider) -> Result { + }} + #[inline] pub fn get_provider_id(&self, provider: &super::custom::IGameControllerProvider) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetProviderId)(self as *const _ as *mut _, provider as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } } // Windows.Gaming.Input.Preview } // Windows.Gaming.Input @@ -1524,19 +1524,19 @@ use ::prelude::*; 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(&self, out: *mut GameSaveErrorStatus) -> HRESULT, - #[cfg(feature="windows-storage")] fn get_Value(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMapView) -> HRESULT + #[cfg(feature="windows-storage")] fn get_Value(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT }} impl IGameSaveBlobGetResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_value(&self) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_value(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class GameSaveBlobGetResult: IGameSaveBlobGetResult} DEFINE_IID!(IID_IGameSaveBlobInfo, 2916319284, 47856, 17989, 182, 208, 70, 237, 175, 251, 60, 43); @@ -1545,58 +1545,58 @@ RT_INTERFACE!{interface IGameSaveBlobInfo(IGameSaveBlobInfoVtbl): IInspectable(I fn get_Size(&self, out: *mut u32) -> HRESULT }} impl IGameSaveBlobInfo { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_size(&self) -> Result { + }} + #[inline] pub fn get_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Size)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class GameSaveBlobInfo: IGameSaveBlobInfo} 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(&self, out: *mut GameSaveErrorStatus) -> HRESULT, - fn get_Value(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn get_Value(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IGameSaveBlobInfoGetResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result>> { + }} + #[inline] pub fn get_value(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class GameSaveBlobInfoGetResult: IGameSaveBlobInfoGetResult} 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(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn GetBlobInfoWithIndexAndMaxAsync(&self, startIndex: u32, maxNumberOfItems: u32, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn GetItemCountAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn GetBlobInfoAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetBlobInfoWithIndexAndMaxAsync(&self, startIndex: u32, maxNumberOfItems: u32, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetItemCountAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IGameSaveBlobInfoQuery { - #[inline] pub unsafe fn get_blob_info_async(&self) -> Result>> { + #[inline] pub fn get_blob_info_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetBlobInfoAsync)(self as *const _ as *mut _, &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(&self, startIndex: u32, maxNumberOfItems: u32) -> Result>> { + }} + #[inline] pub fn get_blob_info_with_index_and_max_async(&self, startIndex: u32, maxNumberOfItems: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetBlobInfoWithIndexAndMaxAsync)(self as *const _ as *mut _, startIndex, maxNumberOfItems, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_item_count_async(&self) -> Result>> { + }} + #[inline] pub fn get_item_count_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetItemCountAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class GameSaveBlobInfoQuery: IGameSaveBlobInfoQuery} DEFINE_IID!(IID_IGameSaveContainer, 3284176777, 22079, 20173, 156, 111, 51, 253, 14, 50, 61, 16); @@ -1604,49 +1604,49 @@ RT_INTERFACE!{interface IGameSaveContainer(IGameSaveContainerVtbl): IInspectable fn get_Name(&self, out: *mut HSTRING) -> HRESULT, fn get_Provider(&self, out: *mut *mut GameSaveProvider) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy2(&self) -> (), - #[cfg(feature="windows-storage")] fn SubmitUpdatesAsync(&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(feature="windows-storage")] fn SubmitUpdatesAsync(&self, blobsToWrite: *mut foundation::collections::IMapView, blobsToDelete: *mut foundation::collections::IIterable, displayName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy3(&self) -> (), - #[cfg(feature="windows-storage")] fn ReadAsync(&self, blobsToRead: *mut ::rt::gen::windows::foundation::collections::IMapView, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn GetAsync(&self, blobsToRead: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn SubmitPropertySetUpdatesAsync(&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, + #[cfg(feature="windows-storage")] fn ReadAsync(&self, blobsToRead: *mut foundation::collections::IMapView, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetAsync(&self, blobsToRead: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn SubmitPropertySetUpdatesAsync(&self, blobsToWrite: *mut foundation::collections::IPropertySet, blobsToDelete: *mut foundation::collections::IIterable, displayName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn CreateBlobInfoQuery(&self, blobNamePrefix: HSTRING, out: *mut *mut GameSaveBlobInfoQuery) -> HRESULT }} impl IGameSaveContainer { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_provider(&self) -> Result> { + }} + #[inline] pub fn get_provider(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Provider)(self 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 submit_updates_async(&self, blobsToWrite: &::rt::gen::windows::foundation::collections::IMapView, blobsToDelete: &::rt::gen::windows::foundation::collections::IIterable, displayName: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn submit_updates_async(&self, blobsToWrite: &foundation::collections::IMapView, blobsToDelete: &foundation::collections::IIterable, displayName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SubmitUpdatesAsync)(self as *const _ as *mut _, 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(&self, blobsToRead: &::rt::gen::windows::foundation::collections::IMapView) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn read_async(&self, blobsToRead: &foundation::collections::IMapView) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadAsync)(self as *const _ as *mut _, blobsToRead as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_async(&self, blobsToRead: &::rt::gen::windows::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn get_async(&self, blobsToRead: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAsync)(self as *const _ as *mut _, 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(&self, blobsToWrite: &::rt::gen::windows::foundation::collections::IPropertySet, blobsToDelete: &::rt::gen::windows::foundation::collections::IIterable, displayName: &HStringArg) -> Result>> { + }} + #[inline] pub fn submit_property_set_updates_async(&self, blobsToWrite: &foundation::collections::IPropertySet, blobsToDelete: &foundation::collections::IIterable, displayName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SubmitPropertySetUpdatesAsync)(self as *const _ as *mut _, 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(&self, blobNamePrefix: &HStringArg) -> Result> { + }} + #[inline] pub fn create_blob_info_query(&self, blobNamePrefix: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateBlobInfoQuery)(self as *const _ as *mut _, blobNamePrefix.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class GameSaveContainer: IGameSaveContainer} DEFINE_IID!(IID_IGameSaveContainerInfo, 3085071104, 5469, 19380, 178, 186, 147, 3, 6, 243, 145, 181); @@ -1654,77 +1654,77 @@ RT_INTERFACE!{interface IGameSaveContainerInfo(IGameSaveContainerInfoVtbl): IIns fn get_Name(&self, out: *mut HSTRING) -> HRESULT, fn get_TotalSize(&self, out: *mut u64) -> HRESULT, fn get_DisplayName(&self, out: *mut HSTRING) -> HRESULT, - fn get_LastModifiedTime(&self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, + fn get_LastModifiedTime(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_NeedsSync(&self, out: *mut bool) -> HRESULT }} impl IGameSaveContainerInfo { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_total_size(&self) -> Result { + }} + #[inline] pub fn get_total_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TotalSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_last_modified_time(&self) -> Result<::rt::gen::windows::foundation::DateTime> { + }} + #[inline] pub fn get_last_modified_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LastModifiedTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_needs_sync(&self) -> Result { + }} + #[inline] pub fn get_needs_sync(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NeedsSync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class GameSaveContainerInfo: IGameSaveContainerInfo} 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(&self, out: *mut GameSaveErrorStatus) -> HRESULT, - fn get_Value(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn get_Value(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IGameSaveContainerInfoGetResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result>> { + }} + #[inline] pub fn get_value(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class GameSaveContainerInfoGetResult: IGameSaveContainerInfoGetResult} 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(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn GetContainerInfoWithIndexAndMaxAsync(&self, startIndex: u32, maxNumberOfItems: u32, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn GetItemCountAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn GetContainerInfoAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetContainerInfoWithIndexAndMaxAsync(&self, startIndex: u32, maxNumberOfItems: u32, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetItemCountAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IGameSaveContainerInfoQuery { - #[inline] pub unsafe fn get_container_info_async(&self) -> Result>> { + #[inline] pub fn get_container_info_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetContainerInfoAsync)(self as *const _ as *mut _, &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(&self, startIndex: u32, maxNumberOfItems: u32) -> Result>> { + }} + #[inline] pub fn get_container_info_with_index_and_max_async(&self, startIndex: u32, maxNumberOfItems: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetContainerInfoWithIndexAndMaxAsync)(self as *const _ as *mut _, startIndex, maxNumberOfItems, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_item_count_async(&self) -> Result>> { + }} + #[inline] pub fn get_item_count_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetItemCountAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class GameSaveContainerInfoQuery: IGameSaveContainerInfoQuery} RT_ENUM! { enum GameSaveErrorStatus: i32 { @@ -1735,11 +1735,11 @@ RT_INTERFACE!{interface IGameSaveOperationResult(IGameSaveOperationResultVtbl): fn get_Status(&self, out: *mut GameSaveErrorStatus) -> HRESULT }} impl IGameSaveOperationResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class GameSaveOperationResult: IGameSaveOperationResult} DEFINE_IID!(IID_IGameSaveProvider, 2426798996, 33022, 16913, 151, 248, 165, 222, 20, 221, 149, 210); @@ -1747,58 +1747,58 @@ RT_INTERFACE!{interface IGameSaveProvider(IGameSaveProviderVtbl): IInspectable(I #[cfg(not(feature="windows-system"))] fn __Dummy0(&self) -> (), #[cfg(feature="windows-system")] fn get_User(&self, out: *mut *mut ::rt::gen::windows::system::User) -> HRESULT, fn CreateContainer(&self, name: HSTRING, out: *mut *mut GameSaveContainer) -> HRESULT, - fn DeleteContainerAsync(&self, name: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn DeleteContainerAsync(&self, name: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn CreateContainerInfoQuery(&self, out: *mut *mut GameSaveContainerInfoQuery) -> HRESULT, fn CreateContainerInfoQueryWithName(&self, containerNamePrefix: HSTRING, out: *mut *mut GameSaveContainerInfoQuery) -> HRESULT, - fn GetRemainingBytesInQuotaAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn get_ContainersChangedSinceLastSync(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn GetRemainingBytesInQuotaAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn get_ContainersChangedSinceLastSync(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IGameSaveProvider { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_user(&self) -> Result> { + #[cfg(feature="windows-system")] #[inline] pub fn get_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_User)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_container(&self, name: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_container(&self, name: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateContainer)(self as *const _ as *mut _, name.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete_container_async(&self, name: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn delete_container_async(&self, name: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteContainerAsync)(self as *const _ as *mut _, name.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_container_info_query(&self) -> Result> { + }} + #[inline] pub fn create_container_info_query(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateContainerInfoQuery)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_container_info_query_with_name(&self, containerNamePrefix: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_container_info_query_with_name(&self, containerNamePrefix: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateContainerInfoQueryWithName)(self as *const _ as *mut _, 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(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_remaining_bytes_in_quota_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetRemainingBytesInQuotaAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_containers_changed_since_last_sync(&self) -> Result>> { + }} + #[inline] pub fn get_containers_changed_since_last_sync(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContainersChangedSinceLastSync)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class GameSaveProvider: IGameSaveProvider} impl RtActivatable for GameSaveProvider {} impl GameSaveProvider { - #[cfg(feature="windows-system")] #[inline] pub fn get_for_user_async(user: &::rt::gen::windows::system::User, serviceConfigId: &HStringArg) -> Result>> { unsafe { + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user_async(user: &::rt::gen::windows::system::User, serviceConfigId: &HStringArg) -> Result>> { >::get_activation_factory().get_for_user_async(user, serviceConfigId) - }} - #[cfg(feature="windows-system")] #[inline] pub fn get_sync_on_demand_for_user_async(user: &::rt::gen::windows::system::User, serviceConfigId: &HStringArg) -> Result>> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn get_sync_on_demand_for_user_async(user: &::rt::gen::windows::system::User, serviceConfigId: &HStringArg) -> Result>> { >::get_activation_factory().get_sync_on_demand_for_user_async(user, serviceConfigId) - }} + } } DEFINE_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]) [CLSID_GameSaveProvider]); DEFINE_IID!(IID_IGameSaveProviderGetResult, 985204758, 54163, 19813, 172, 22, 65, 195, 230, 122, 185, 69); @@ -1807,34 +1807,34 @@ RT_INTERFACE!{interface IGameSaveProviderGetResult(IGameSaveProviderGetResultVtb fn get_Value(&self, out: *mut *mut GameSaveProvider) -> HRESULT }} impl IGameSaveProviderGetResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result> { + }} + #[inline] pub fn get_value(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class GameSaveProviderGetResult: IGameSaveProviderGetResult} 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(&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(&self, user: *mut ::rt::gen::windows::system::User, serviceConfigId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-system")] fn GetForUserAsync(&self, user: *mut ::rt::gen::windows::system::User, serviceConfigId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-system")] fn GetSyncOnDemandForUserAsync(&self, user: *mut ::rt::gen::windows::system::User, serviceConfigId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IGameSaveProviderStatics { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_for_user_async(&self, user: &::rt::gen::windows::system::User, serviceConfigId: &HStringArg) -> Result>> { + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user_async(&self, user: &::rt::gen::windows::system::User, serviceConfigId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForUserAsync)(self as *const _ as *mut _, 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(&self, user: &::rt::gen::windows::system::User, serviceConfigId: &HStringArg) -> Result>> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_sync_on_demand_for_user_async(&self, user: &::rt::gen::windows::system::User, serviceConfigId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSyncOnDemandForUserAsync)(self as *const _ as *mut _, user as *const _ as *mut _, serviceConfigId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } } // Windows.Gaming.XboxLive.Storage } // Windows.Gaming.XboxLive @@ -1845,36 +1845,36 @@ RT_CLASS!{static class GameList} impl RtActivatable for GameList {} impl RtActivatable for GameList {} impl GameList { - #[inline] pub fn find_all_async() -> Result>>> { unsafe { + #[inline] pub fn find_all_async() -> Result>>> { >::get_activation_factory().find_all_async() - }} - #[inline] pub fn find_all_async_package_family_name(packageFamilyName: &HStringArg) -> Result>>> { unsafe { + } + #[inline] pub fn find_all_async_package_family_name(packageFamilyName: &HStringArg) -> Result>>> { >::get_activation_factory().find_all_async_package_family_name(packageFamilyName) - }} - #[inline] pub fn add_game_added(handler: &GameListChangedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { unsafe { + } + #[inline] pub fn add_game_added(handler: &GameListChangedEventHandler) -> Result { >::get_activation_factory().add_game_added(handler) - }} - #[inline] pub fn remove_game_added(token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_game_added(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_game_added(token) - }} - #[inline] pub fn add_game_removed(handler: &GameListRemovedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { unsafe { + } + #[inline] pub fn add_game_removed(handler: &GameListRemovedEventHandler) -> Result { >::get_activation_factory().add_game_removed(handler) - }} - #[inline] pub fn remove_game_removed(token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_game_removed(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_game_removed(token) - }} - #[inline] pub fn add_game_updated(handler: &GameListChangedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { unsafe { + } + #[inline] pub fn add_game_updated(handler: &GameListChangedEventHandler) -> Result { >::get_activation_factory().add_game_updated(handler) - }} - #[inline] pub fn remove_game_updated(token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_game_updated(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_game_updated(token) - }} - #[inline] pub fn merge_entries_async(left: &GameListEntry, right: &GameListEntry) -> Result>> { unsafe { + } + #[inline] pub fn merge_entries_async(left: &GameListEntry, right: &GameListEntry) -> Result>> { >::get_activation_factory().merge_entries_async(left, right) - }} - #[inline] pub fn unmerge_entry_async(mergedEntry: &GameListEntry) -> Result>>> { unsafe { + } + #[inline] pub fn unmerge_entry_async(mergedEntry: &GameListEntry) -> Result>>> { >::get_activation_factory().unmerge_entry_async(mergedEntry) - }} + } } DEFINE_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]) [CLSID_GameList]); RT_ENUM! { enum GameListCategory: i32 { @@ -1885,46 +1885,46 @@ RT_DELEGATE!{delegate GameListChangedEventHandler(GameListChangedEventHandlerVtb fn Invoke(&self, game: *mut GameListEntry) -> HRESULT }} impl GameListChangedEventHandler { - #[inline] pub unsafe fn invoke(&self, game: &GameListEntry) -> Result<()> { + #[inline] pub fn invoke(&self, game: &GameListEntry) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, game as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self) -> (), #[cfg(feature="windows-applicationmodel")] fn get_DisplayInfo(&self, out: *mut *mut ::rt::gen::windows::applicationmodel::AppDisplayInfo) -> HRESULT, - fn LaunchAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn LaunchAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn get_Category(&self, out: *mut GameListCategory) -> HRESULT, - fn get_Properties(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMapView) -> HRESULT, - fn SetCategoryAsync(&self, value: GameListCategory, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn get_Properties(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT, + fn SetCategoryAsync(&self, value: GameListCategory, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IGameListEntry { - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn get_display_info(&self) -> Result> { + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn get_display_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn launch_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn launch_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LaunchAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_category(&self) -> Result { + }} + #[inline] pub fn get_category(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Category)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_category_async(&self, value: GameListCategory) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_category_async(&self, value: GameListCategory) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetCategoryAsync)(self as *const _ as *mut _, value, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class GameListEntry: IGameListEntry} DEFINE_IID!(IID_IGameListEntry2, 3628765067, 34633, 18981, 144, 211, 246, 197, 164, 39, 136, 109); @@ -1934,54 +1934,54 @@ RT_INTERFACE!{interface IGameListEntry2(IGameListEntry2Vtbl): IInspectable(IInsp #[cfg(feature="windows-storage")] fn get_LauncherExecutable(&self, out: *mut *mut ::rt::gen::windows::storage::IStorageFile) -> HRESULT, fn get_LaunchParameters(&self, out: *mut HSTRING) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy3(&self) -> (), - #[cfg(feature="windows-storage")] fn SetLauncherExecutableFileAsync(&self, executableFile: *mut ::rt::gen::windows::storage::IStorageFile, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + #[cfg(feature="windows-storage")] fn SetLauncherExecutableFileAsync(&self, executableFile: *mut ::rt::gen::windows::storage::IStorageFile, out: *mut *mut foundation::IAsyncAction) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy4(&self) -> (), - #[cfg(feature="windows-storage")] fn SetLauncherExecutableFileWithParamsAsync(&self, executableFile: *mut ::rt::gen::windows::storage::IStorageFile, launchParams: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + #[cfg(feature="windows-storage")] fn SetLauncherExecutableFileWithParamsAsync(&self, executableFile: *mut ::rt::gen::windows::storage::IStorageFile, launchParams: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn get_TitleId(&self, out: *mut HSTRING) -> HRESULT, - fn SetTitleIdAsync(&self, id: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn SetTitleIdAsync(&self, id: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn get_GameModeConfiguration(&self, out: *mut *mut GameModeConfiguration) -> HRESULT }} impl IGameListEntry2 { - #[inline] pub unsafe fn get_launchable_state(&self) -> Result { + #[inline] pub fn get_launchable_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LaunchableState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_launcher_executable(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_launcher_executable(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LauncherExecutable)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_launch_parameters(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_launch_parameters(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LaunchParameters)(self 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 set_launcher_executable_file_async(&self, executableFile: &::rt::gen::windows::storage::IStorageFile) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_launcher_executable_file_async(&self, executableFile: &::rt::gen::windows::storage::IStorageFile) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetLauncherExecutableFileAsync)(self as *const _ as *mut _, executableFile 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_launcher_executable_file_with_params_async(&self, executableFile: &::rt::gen::windows::storage::IStorageFile, launchParams: &HStringArg) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_launcher_executable_file_with_params_async(&self, executableFile: &::rt::gen::windows::storage::IStorageFile, launchParams: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetLauncherExecutableFileWithParamsAsync)(self as *const _ as *mut _, executableFile as *const _ as *mut _, launchParams.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_title_id(&self) -> Result { + }} + #[inline] pub fn get_title_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TitleId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_title_id_async(&self, id: &HStringArg) -> Result> { + }} + #[inline] pub fn set_title_id_async(&self, id: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetTitleIdAsync)(self as *const _ as *mut _, id.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_game_mode_configuration(&self) -> Result> { + }} + #[inline] pub fn get_game_mode_configuration(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_GameModeConfiguration)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum GameListEntryLaunchableState: i32 { NotLaunchable (GameListEntryLaunchableState_NotLaunchable) = 0, ByLastRunningFullPath (GameListEntryLaunchableState_ByLastRunningFullPath) = 1, ByUserProvidedPath (GameListEntryLaunchableState_ByUserProvidedPath) = 2, ByTile (GameListEntryLaunchableState_ByTile) = 3, @@ -1991,207 +1991,207 @@ RT_DELEGATE!{delegate GameListRemovedEventHandler(GameListRemovedEventHandlerVtb fn Invoke(&self, identifier: HSTRING) -> HRESULT }} impl GameListRemovedEventHandler { - #[inline] pub unsafe fn invoke(&self, identifier: &HStringArg) -> Result<()> { + #[inline] pub fn invoke(&self, identifier: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, 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(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, - fn FindAllAsyncPackageFamilyName(&self, packageFamilyName: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, - fn add_GameAdded(&self, handler: *mut GameListChangedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_GameAdded(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_GameRemoved(&self, handler: *mut GameListRemovedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_GameRemoved(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_GameUpdated(&self, handler: *mut GameListChangedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_GameUpdated(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn FindAllAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn FindAllAsyncPackageFamilyName(&self, packageFamilyName: HSTRING, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn add_GameAdded(&self, handler: *mut GameListChangedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_GameAdded(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_GameRemoved(&self, handler: *mut GameListRemovedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_GameRemoved(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_GameUpdated(&self, handler: *mut GameListChangedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_GameUpdated(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IGameListStatics { - #[inline] pub unsafe fn find_all_async(&self) -> Result>>> { + #[inline] pub fn find_all_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_all_async_package_family_name(&self, packageFamilyName: &HStringArg) -> Result>>> { + }} + #[inline] pub fn find_all_async_package_family_name(&self, packageFamilyName: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllAsyncPackageFamilyName)(self as *const _ as *mut _, packageFamilyName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_game_added(&self, handler: &GameListChangedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_game_added(&self, handler: &GameListChangedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_GameAdded)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_game_added(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_game_added(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_GameAdded)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_game_removed(&self, handler: &GameListRemovedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_game_removed(&self, handler: &GameListRemovedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_GameRemoved)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_game_removed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_game_removed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_GameRemoved)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_game_updated(&self, handler: &GameListChangedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_game_updated(&self, handler: &GameListChangedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_GameUpdated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_game_updated(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_game_updated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_GameUpdated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IGameListStatics2, 962535576, 59930, 17834, 146, 104, 168, 57, 5, 104, 111, 39); RT_INTERFACE!{static interface IGameListStatics2(IGameListStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IGameListStatics2] { - fn MergeEntriesAsync(&self, left: *mut GameListEntry, right: *mut GameListEntry, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn UnmergeEntryAsync(&self, mergedEntry: *mut GameListEntry, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT + fn MergeEntriesAsync(&self, left: *mut GameListEntry, right: *mut GameListEntry, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn UnmergeEntryAsync(&self, mergedEntry: *mut GameListEntry, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IGameListStatics2 { - #[inline] pub unsafe fn merge_entries_async(&self, left: &GameListEntry, right: &GameListEntry) -> Result>> { + #[inline] pub fn merge_entries_async(&self, left: &GameListEntry, right: &GameListEntry) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MergeEntriesAsync)(self as *const _ as *mut _, left as *const _ as *mut _, right as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn unmerge_entry_async(&self, mergedEntry: &GameListEntry) -> Result>>> { + }} + #[inline] pub fn unmerge_entry_async(&self, mergedEntry: &GameListEntry) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UnmergeEntryAsync)(self as *const _ as *mut _, mergedEntry as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IGameModeConfiguration, 2028310959, 45378, 20208, 136, 48, 85, 188, 43, 228, 245, 234); RT_INTERFACE!{interface IGameModeConfiguration(IGameModeConfigurationVtbl): IInspectable(IInspectableVtbl) [IID_IGameModeConfiguration] { fn get_IsEnabled(&self, out: *mut bool) -> HRESULT, fn put_IsEnabled(&self, value: bool) -> HRESULT, - fn get_RelatedProcessNames(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, - fn get_PercentGpuTimeAllocatedToGame(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn put_PercentGpuTimeAllocatedToGame(&self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn get_PercentGpuMemoryAllocatedToGame(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn put_PercentGpuMemoryAllocatedToGame(&self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn get_PercentGpuMemoryAllocatedToSystemCompositor(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn put_PercentGpuMemoryAllocatedToSystemCompositor(&self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn get_MaxCpuCount(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn put_MaxCpuCount(&self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn get_CpuExclusivityMaskLow(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn put_CpuExclusivityMaskLow(&self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn get_CpuExclusivityMaskHigh(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn put_CpuExclusivityMaskHigh(&self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_RelatedProcessNames(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_PercentGpuTimeAllocatedToGame(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_PercentGpuTimeAllocatedToGame(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_PercentGpuMemoryAllocatedToGame(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_PercentGpuMemoryAllocatedToGame(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_PercentGpuMemoryAllocatedToSystemCompositor(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_PercentGpuMemoryAllocatedToSystemCompositor(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_MaxCpuCount(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_MaxCpuCount(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_CpuExclusivityMaskLow(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_CpuExclusivityMaskLow(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_CpuExclusivityMaskHigh(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_CpuExclusivityMaskHigh(&self, value: *mut foundation::IReference) -> HRESULT, fn get_AffinitizeToExclusiveCpus(&self, out: *mut bool) -> HRESULT, fn put_AffinitizeToExclusiveCpus(&self, value: bool) -> HRESULT, - fn SaveAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn SaveAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IGameModeConfiguration { - #[inline] pub unsafe fn get_is_enabled(&self) -> Result { + #[inline] pub fn get_is_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_related_process_names(&self) -> Result>> { + }} + #[inline] pub fn get_related_process_names(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RelatedProcessNames)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_percent_gpu_time_allocated_to_game(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_percent_gpu_time_allocated_to_game(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PercentGpuTimeAllocatedToGame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_percent_gpu_time_allocated_to_game(&self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_percent_gpu_time_allocated_to_game(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PercentGpuTimeAllocatedToGame)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_percent_gpu_memory_allocated_to_game(&self) -> Result>> { + }} + #[inline] pub fn get_percent_gpu_memory_allocated_to_game(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PercentGpuMemoryAllocatedToGame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_percent_gpu_memory_allocated_to_game(&self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_percent_gpu_memory_allocated_to_game(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PercentGpuMemoryAllocatedToGame)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_percent_gpu_memory_allocated_to_system_compositor(&self) -> Result>> { + }} + #[inline] pub fn get_percent_gpu_memory_allocated_to_system_compositor(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PercentGpuMemoryAllocatedToSystemCompositor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_percent_gpu_memory_allocated_to_system_compositor(&self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_percent_gpu_memory_allocated_to_system_compositor(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PercentGpuMemoryAllocatedToSystemCompositor)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_cpu_count(&self) -> Result>> { + }} + #[inline] pub fn get_max_cpu_count(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxCpuCount)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_cpu_count(&self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_max_cpu_count(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxCpuCount)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_cpu_exclusivity_mask_low(&self) -> Result>> { + }} + #[inline] pub fn get_cpu_exclusivity_mask_low(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CpuExclusivityMaskLow)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_cpu_exclusivity_mask_low(&self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_cpu_exclusivity_mask_low(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CpuExclusivityMaskLow)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_cpu_exclusivity_mask_high(&self) -> Result>> { + }} + #[inline] pub fn get_cpu_exclusivity_mask_high(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CpuExclusivityMaskHigh)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_cpu_exclusivity_mask_high(&self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_cpu_exclusivity_mask_high(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CpuExclusivityMaskHigh)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_affinitize_to_exclusive_cpus(&self) -> Result { + }} + #[inline] pub fn get_affinitize_to_exclusive_cpus(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AffinitizeToExclusiveCpus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_affinitize_to_exclusive_cpus(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_affinitize_to_exclusive_cpus(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AffinitizeToExclusiveCpus)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn save_async(&self) -> Result> { + }} + #[inline] pub fn save_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class GameModeConfiguration: IGameModeConfiguration} DEFINE_IID!(IID_IGameModeUserConfiguration, 1926449908, 30059, 18191, 160, 194, 186, 98, 169, 7, 149, 219); RT_INTERFACE!{interface IGameModeUserConfiguration(IGameModeUserConfigurationVtbl): IInspectable(IInspectableVtbl) [IID_IGameModeUserConfiguration] { - fn get_GamingRelatedProcessNames(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, - fn SaveAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn get_GamingRelatedProcessNames(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn SaveAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IGameModeUserConfiguration { - #[inline] pub unsafe fn get_gaming_related_process_names(&self) -> Result>> { + #[inline] pub fn get_gaming_related_process_names(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_GamingRelatedProcessNames)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn save_async(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn save_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class GameModeUserConfiguration: IGameModeUserConfiguration} impl RtActivatable for GameModeUserConfiguration {} impl GameModeUserConfiguration { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} + } } DEFINE_CLSID!(GameModeUserConfiguration(&[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,77,111,100,101,85,115,101,114,67,111,110,102,105,103,117,114,97,116,105,111,110,0]) [CLSID_GameModeUserConfiguration]); DEFINE_IID!(IID_IGameModeUserConfigurationStatics, 1850792316, 26346, 18318, 164, 161, 245, 124, 14, 141, 0, 231); @@ -2199,11 +2199,11 @@ RT_INTERFACE!{static interface IGameModeUserConfigurationStatics(IGameModeUserCo fn GetDefault(&self, out: *mut *mut GameModeUserConfiguration) -> HRESULT }} impl IGameModeUserConfigurationStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } } // Windows.Gaming.Preview.GamesEnumeration } // Windows.Gaming.Preview diff --git a/src/rt/gen/windows/globalization.rs b/src/rt/gen/windows/globalization.rs index 2feb142..d2fe851 100644 --- a/src/rt/gen/windows/globalization.rs +++ b/src/rt/gen/windows/globalization.rs @@ -2,62 +2,62 @@ use ::prelude::*; RT_CLASS!{static class ApplicationLanguages} impl RtActivatable for ApplicationLanguages {} impl ApplicationLanguages { - #[inline] pub fn get_primary_language_override() -> Result { unsafe { + #[inline] pub fn get_primary_language_override() -> Result { >::get_activation_factory().get_primary_language_override() - }} - #[inline] pub fn set_primary_language_override(value: &HStringArg) -> Result<()> { unsafe { + } + #[inline] pub fn set_primary_language_override(value: &HStringArg) -> Result<()> { >::get_activation_factory().set_primary_language_override(value) - }} - #[inline] pub fn get_languages() -> Result>> { unsafe { + } + #[inline] pub fn get_languages() -> Result>>> { >::get_activation_factory().get_languages() - }} - #[inline] pub fn get_manifest_languages() -> Result>> { unsafe { + } + #[inline] pub fn get_manifest_languages() -> Result>>> { >::get_activation_factory().get_manifest_languages() - }} + } } DEFINE_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]) [CLSID_ApplicationLanguages]); 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(&self, out: *mut HSTRING) -> HRESULT, fn put_PrimaryLanguageOverride(&self, value: HSTRING) -> HRESULT, - fn get_Languages(&self, out: *mut *mut super::foundation::collections::IVectorView) -> HRESULT, - fn get_ManifestLanguages(&self, out: *mut *mut super::foundation::collections::IVectorView) -> HRESULT + fn get_Languages(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_ManifestLanguages(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IApplicationLanguagesStatics { - #[inline] pub unsafe fn get_primary_language_override(&self) -> Result { + #[inline] pub fn get_primary_language_override(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PrimaryLanguageOverride)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_primary_language_override(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_primary_language_override(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PrimaryLanguageOverride)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_languages(&self) -> Result>> { + }} + #[inline] pub fn get_languages(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Languages)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_manifest_languages(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_manifest_languages(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ManifestLanguages)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut Calendar) -> HRESULT, fn SetToMin(&self) -> HRESULT, fn SetToMax(&self) -> HRESULT, - fn get_Languages(&self, out: *mut *mut super::foundation::collections::IVectorView) -> HRESULT, + fn get_Languages(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_NumeralSystem(&self, out: *mut HSTRING) -> HRESULT, fn put_NumeralSystem(&self, value: HSTRING) -> HRESULT, fn GetCalendarSystem(&self, out: *mut HSTRING) -> HRESULT, fn ChangeCalendarSystem(&self, value: HSTRING) -> HRESULT, fn GetClock(&self, out: *mut HSTRING) -> HRESULT, fn ChangeClock(&self, value: HSTRING) -> HRESULT, - fn GetDateTime(&self, out: *mut super::foundation::DateTime) -> HRESULT, - fn SetDateTime(&self, value: super::foundation::DateTime) -> HRESULT, + fn GetDateTime(&self, out: *mut foundation::DateTime) -> HRESULT, + fn SetDateTime(&self, value: foundation::DateTime) -> HRESULT, fn SetToNow(&self) -> HRESULT, fn get_FirstEra(&self, out: *mut i32) -> HRESULT, fn get_LastEra(&self, out: *mut i32) -> HRESULT, @@ -134,7 +134,7 @@ RT_INTERFACE!{interface ICalendar(ICalendarVtbl): IInspectable(IInspectableVtbl) fn NanosecondAsString(&self, out: *mut HSTRING) -> HRESULT, fn NanosecondAsPaddedString(&self, minDigits: i32, out: *mut HSTRING) -> HRESULT, fn Compare(&self, other: *mut Calendar, out: *mut i32) -> HRESULT, - fn CompareDateTime(&self, other: super::foundation::DateTime, out: *mut i32) -> HRESULT, + fn CompareDateTime(&self, other: foundation::DateTime, out: *mut i32) -> HRESULT, fn CopyTo(&self, other: *mut Calendar) -> HRESULT, fn get_FirstMinuteInThisHour(&self, out: *mut i32) -> HRESULT, fn get_LastMinuteInThisHour(&self, out: *mut i32) -> HRESULT, @@ -146,564 +146,564 @@ RT_INTERFACE!{interface ICalendar(ICalendarVtbl): IInspectable(IInspectableVtbl) fn get_IsDaylightSavingTime(&self, out: *mut bool) -> HRESULT }} impl ICalendar { - #[inline] pub unsafe fn clone(&self) -> Result> { + #[inline] pub fn clone(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Clone)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_to_min(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_to_min(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetToMin)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_to_max(&self) -> Result<()> { + }} + #[inline] pub fn set_to_max(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetToMax)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_languages(&self) -> Result>> { + }} + #[inline] pub fn get_languages(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Languages)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_numeral_system(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_numeral_system(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NumeralSystem)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_numeral_system(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_numeral_system(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_NumeralSystem)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_calendar_system(&self) -> Result { + }} + #[inline] pub fn get_calendar_system(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCalendarSystem)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn change_calendar_system(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn change_calendar_system(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ChangeCalendarSystem)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_clock(&self) -> Result { + }} + #[inline] pub fn get_clock(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetClock)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn change_clock(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn change_clock(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ChangeClock)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_date_time(&self) -> Result { + }} + #[inline] pub fn get_date_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetDateTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_date_time(&self, value: super::foundation::DateTime) -> Result<()> { + }} + #[inline] pub fn set_date_time(&self, value: foundation::DateTime) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetDateTime)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_to_now(&self) -> Result<()> { + }} + #[inline] pub fn set_to_now(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetToNow)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_first_era(&self) -> Result { + }} + #[inline] pub fn get_first_era(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FirstEra)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_last_era(&self) -> Result { + }} + #[inline] pub fn get_last_era(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LastEra)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_number_of_eras(&self) -> Result { + }} + #[inline] pub fn get_number_of_eras(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NumberOfEras)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_era(&self) -> Result { + }} + #[inline] pub fn get_era(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Era)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_era(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_era(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Era)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_eras(&self, eras: i32) -> Result<()> { + }} + #[inline] pub fn add_eras(&self, eras: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddEras)(self as *const _ as *mut _, eras); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn era_as_full_string(&self) -> Result { + }} + #[inline] pub fn era_as_full_string(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).EraAsFullString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn era_as_string(&self, idealLength: i32) -> Result { + }} + #[inline] pub fn era_as_string(&self, idealLength: i32) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).EraAsString)(self as *const _ as *mut _, idealLength, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_first_year_in_this_era(&self) -> Result { + }} + #[inline] pub fn get_first_year_in_this_era(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FirstYearInThisEra)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_last_year_in_this_era(&self) -> Result { + }} + #[inline] pub fn get_last_year_in_this_era(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LastYearInThisEra)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_number_of_years_in_this_era(&self) -> Result { + }} + #[inline] pub fn get_number_of_years_in_this_era(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NumberOfYearsInThisEra)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_year(&self) -> Result { + }} + #[inline] pub fn get_year(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Year)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_year(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_year(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Year)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_years(&self, years: i32) -> Result<()> { + }} + #[inline] pub fn add_years(&self, years: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddYears)(self as *const _ as *mut _, years); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn year_as_string(&self) -> Result { + }} + #[inline] pub fn year_as_string(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).YearAsString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn year_as_truncated_string(&self, remainingDigits: i32) -> Result { + }} + #[inline] pub fn year_as_truncated_string(&self, remainingDigits: i32) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).YearAsTruncatedString)(self as *const _ as *mut _, remainingDigits, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn year_as_padded_string(&self, minDigits: i32) -> Result { + }} + #[inline] pub fn year_as_padded_string(&self, minDigits: i32) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).YearAsPaddedString)(self as *const _ as *mut _, minDigits, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_first_month_in_this_year(&self) -> Result { + }} + #[inline] pub fn get_first_month_in_this_year(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FirstMonthInThisYear)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_last_month_in_this_year(&self) -> Result { + }} + #[inline] pub fn get_last_month_in_this_year(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LastMonthInThisYear)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_number_of_months_in_this_year(&self) -> Result { + }} + #[inline] pub fn get_number_of_months_in_this_year(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NumberOfMonthsInThisYear)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_month(&self) -> Result { + }} + #[inline] pub fn get_month(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Month)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_month(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_month(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Month)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_months(&self, months: i32) -> Result<()> { + }} + #[inline] pub fn add_months(&self, months: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddMonths)(self as *const _ as *mut _, months); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn month_as_full_string(&self) -> Result { + }} + #[inline] pub fn month_as_full_string(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MonthAsFullString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn month_as_string(&self, idealLength: i32) -> Result { + }} + #[inline] pub fn month_as_string(&self, idealLength: i32) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MonthAsString)(self as *const _ as *mut _, idealLength, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn month_as_full_solo_string(&self) -> Result { + }} + #[inline] pub fn month_as_full_solo_string(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MonthAsFullSoloString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn month_as_solo_string(&self, idealLength: i32) -> Result { + }} + #[inline] pub fn month_as_solo_string(&self, idealLength: i32) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MonthAsSoloString)(self as *const _ as *mut _, idealLength, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn month_as_numeric_string(&self) -> Result { + }} + #[inline] pub fn month_as_numeric_string(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MonthAsNumericString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn month_as_padded_numeric_string(&self, minDigits: i32) -> Result { + }} + #[inline] pub fn month_as_padded_numeric_string(&self, minDigits: i32) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MonthAsPaddedNumericString)(self as *const _ as *mut _, minDigits, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_weeks(&self, weeks: i32) -> Result<()> { + }} + #[inline] pub fn add_weeks(&self, weeks: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddWeeks)(self as *const _ as *mut _, weeks); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_first_day_in_this_month(&self) -> Result { + }} + #[inline] pub fn get_first_day_in_this_month(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FirstDayInThisMonth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_last_day_in_this_month(&self) -> Result { + }} + #[inline] pub fn get_last_day_in_this_month(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LastDayInThisMonth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_number_of_days_in_this_month(&self) -> Result { + }} + #[inline] pub fn get_number_of_days_in_this_month(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NumberOfDaysInThisMonth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_day(&self) -> Result { + }} + #[inline] pub fn get_day(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Day)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_day(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_day(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Day)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_days(&self, days: i32) -> Result<()> { + }} + #[inline] pub fn add_days(&self, days: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddDays)(self as *const _ as *mut _, days); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn day_as_string(&self) -> Result { + }} + #[inline] pub fn day_as_string(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DayAsString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn day_as_padded_string(&self, minDigits: i32) -> Result { + }} + #[inline] pub fn day_as_padded_string(&self, minDigits: i32) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DayAsPaddedString)(self as *const _ as *mut _, minDigits, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_day_of_week(&self) -> Result { + }} + #[inline] pub fn get_day_of_week(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DayOfWeek)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn day_of_week_as_full_string(&self) -> Result { + }} + #[inline] pub fn day_of_week_as_full_string(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DayOfWeekAsFullString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn day_of_week_as_string(&self, idealLength: i32) -> Result { + }} + #[inline] pub fn day_of_week_as_string(&self, idealLength: i32) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DayOfWeekAsString)(self as *const _ as *mut _, 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(&self) -> Result { + }} + #[inline] pub fn day_of_week_as_full_solo_string(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DayOfWeekAsFullSoloString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn day_of_week_as_solo_string(&self, idealLength: i32) -> Result { + }} + #[inline] pub fn day_of_week_as_solo_string(&self, idealLength: i32) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DayOfWeekAsSoloString)(self as *const _ as *mut _, idealLength, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_first_period_in_this_day(&self) -> Result { + }} + #[inline] pub fn get_first_period_in_this_day(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FirstPeriodInThisDay)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_last_period_in_this_day(&self) -> Result { + }} + #[inline] pub fn get_last_period_in_this_day(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LastPeriodInThisDay)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_number_of_periods_in_this_day(&self) -> Result { + }} + #[inline] pub fn get_number_of_periods_in_this_day(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NumberOfPeriodsInThisDay)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_period(&self) -> Result { + }} + #[inline] pub fn get_period(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Period)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_period(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_period(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Period)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_periods(&self, periods: i32) -> Result<()> { + }} + #[inline] pub fn add_periods(&self, periods: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddPeriods)(self as *const _ as *mut _, periods); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn period_as_full_string(&self) -> Result { + }} + #[inline] pub fn period_as_full_string(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PeriodAsFullString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn period_as_string(&self, idealLength: i32) -> Result { + }} + #[inline] pub fn period_as_string(&self, idealLength: i32) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PeriodAsString)(self as *const _ as *mut _, idealLength, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_first_hour_in_this_period(&self) -> Result { + }} + #[inline] pub fn get_first_hour_in_this_period(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FirstHourInThisPeriod)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_last_hour_in_this_period(&self) -> Result { + }} + #[inline] pub fn get_last_hour_in_this_period(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LastHourInThisPeriod)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_number_of_hours_in_this_period(&self) -> Result { + }} + #[inline] pub fn get_number_of_hours_in_this_period(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NumberOfHoursInThisPeriod)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_hour(&self) -> Result { + }} + #[inline] pub fn get_hour(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Hour)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_hour(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_hour(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Hour)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_hours(&self, hours: i32) -> Result<()> { + }} + #[inline] pub fn add_hours(&self, hours: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddHours)(self as *const _ as *mut _, hours); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn hour_as_string(&self) -> Result { + }} + #[inline] pub fn hour_as_string(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).HourAsString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn hour_as_padded_string(&self, minDigits: i32) -> Result { + }} + #[inline] pub fn hour_as_padded_string(&self, minDigits: i32) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).HourAsPaddedString)(self as *const _ as *mut _, minDigits, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_minute(&self) -> Result { + }} + #[inline] pub fn get_minute(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Minute)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_minute(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_minute(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Minute)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_minutes(&self, minutes: i32) -> Result<()> { + }} + #[inline] pub fn add_minutes(&self, minutes: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddMinutes)(self as *const _ as *mut _, minutes); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn minute_as_string(&self) -> Result { + }} + #[inline] pub fn minute_as_string(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MinuteAsString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn minute_as_padded_string(&self, minDigits: i32) -> Result { + }} + #[inline] pub fn minute_as_padded_string(&self, minDigits: i32) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MinuteAsPaddedString)(self as *const _ as *mut _, minDigits, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_second(&self) -> Result { + }} + #[inline] pub fn get_second(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Second)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_second(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_second(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Second)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_seconds(&self, seconds: i32) -> Result<()> { + }} + #[inline] pub fn add_seconds(&self, seconds: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddSeconds)(self as *const _ as *mut _, seconds); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn second_as_string(&self) -> Result { + }} + #[inline] pub fn second_as_string(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SecondAsString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn second_as_padded_string(&self, minDigits: i32) -> Result { + }} + #[inline] pub fn second_as_padded_string(&self, minDigits: i32) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SecondAsPaddedString)(self as *const _ as *mut _, minDigits, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_nanosecond(&self) -> Result { + }} + #[inline] pub fn get_nanosecond(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Nanosecond)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_nanosecond(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_nanosecond(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Nanosecond)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_nanoseconds(&self, nanoseconds: i32) -> Result<()> { + }} + #[inline] pub fn add_nanoseconds(&self, nanoseconds: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddNanoseconds)(self as *const _ as *mut _, nanoseconds); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn nanosecond_as_string(&self) -> Result { + }} + #[inline] pub fn nanosecond_as_string(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).NanosecondAsString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn nanosecond_as_padded_string(&self, minDigits: i32) -> Result { + }} + #[inline] pub fn nanosecond_as_padded_string(&self, minDigits: i32) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).NanosecondAsPaddedString)(self as *const _ as *mut _, minDigits, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn compare(&self, other: &Calendar) -> Result { + }} + #[inline] pub fn compare(&self, other: &Calendar) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).Compare)(self as *const _ as *mut _, other as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn compare_date_time(&self, other: super::foundation::DateTime) -> Result { + }} + #[inline] pub fn compare_date_time(&self, other: foundation::DateTime) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).CompareDateTime)(self as *const _ as *mut _, other, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn copy_to(&self, other: &Calendar) -> Result<()> { + }} + #[inline] pub fn copy_to(&self, other: &Calendar) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).CopyTo)(self as *const _ as *mut _, other as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_first_minute_in_this_hour(&self) -> Result { + }} + #[inline] pub fn get_first_minute_in_this_hour(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FirstMinuteInThisHour)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_last_minute_in_this_hour(&self) -> Result { + }} + #[inline] pub fn get_last_minute_in_this_hour(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LastMinuteInThisHour)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_number_of_minutes_in_this_hour(&self) -> Result { + }} + #[inline] pub fn get_number_of_minutes_in_this_hour(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NumberOfMinutesInThisHour)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_first_second_in_this_minute(&self) -> Result { + }} + #[inline] pub fn get_first_second_in_this_minute(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FirstSecondInThisMinute)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_last_second_in_this_minute(&self) -> Result { + }} + #[inline] pub fn get_last_second_in_this_minute(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LastSecondInThisMinute)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_number_of_seconds_in_this_minute(&self) -> Result { + }} + #[inline] pub fn get_number_of_seconds_in_this_minute(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NumberOfSecondsInThisMinute)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_resolved_language(&self) -> Result { + }} + #[inline] pub fn get_resolved_language(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResolvedLanguage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_daylight_saving_time(&self) -> Result { + }} + #[inline] pub fn get_is_daylight_saving_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDaylightSavingTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class Calendar: ICalendar} impl RtActivatable for Calendar {} impl RtActivatable for Calendar {} impl RtActivatable for Calendar {} impl Calendar { - #[inline] pub fn create_calendar_default_calendar_and_clock(languages: &super::foundation::collections::IIterable) -> Result> { unsafe { + #[inline] pub fn create_calendar_default_calendar_and_clock(languages: &foundation::collections::IIterable) -> Result> { >::get_activation_factory().create_calendar_default_calendar_and_clock(languages) - }} - #[inline] pub fn create_calendar(languages: &super::foundation::collections::IIterable, calendar: &HStringArg, clock: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_calendar(languages: &foundation::collections::IIterable, calendar: &HStringArg, clock: &HStringArg) -> Result> { >::get_activation_factory().create_calendar(languages, calendar, clock) - }} - #[inline] pub fn create_calendar_with_time_zone(languages: &super::foundation::collections::IIterable, calendar: &HStringArg, clock: &HStringArg, timeZoneId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_calendar_with_time_zone(languages: &foundation::collections::IIterable, calendar: &HStringArg, clock: &HStringArg, timeZoneId: &HStringArg) -> Result> { >::get_activation_factory().create_calendar_with_time_zone(languages, calendar, clock, timeZoneId) - }} + } } DEFINE_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]) [CLSID_Calendar]); DEFINE_IID!(IID_ICalendarFactory, 2213905426, 58731, 19573, 166, 110, 15, 99, 213, 119, 88, 166); RT_INTERFACE!{static interface ICalendarFactory(ICalendarFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ICalendarFactory] { - fn CreateCalendarDefaultCalendarAndClock(&self, languages: *mut super::foundation::collections::IIterable, out: *mut *mut Calendar) -> HRESULT, - fn CreateCalendar(&self, languages: *mut super::foundation::collections::IIterable, calendar: HSTRING, clock: HSTRING, out: *mut *mut Calendar) -> HRESULT + fn CreateCalendarDefaultCalendarAndClock(&self, languages: *mut foundation::collections::IIterable, out: *mut *mut Calendar) -> HRESULT, + fn CreateCalendar(&self, languages: *mut foundation::collections::IIterable, calendar: HSTRING, clock: HSTRING, out: *mut *mut Calendar) -> HRESULT }} impl ICalendarFactory { - #[inline] pub unsafe fn create_calendar_default_calendar_and_clock(&self, languages: &super::foundation::collections::IIterable) -> Result> { + #[inline] pub fn create_calendar_default_calendar_and_clock(&self, languages: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateCalendarDefaultCalendarAndClock)(self as *const _ as *mut _, languages as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_calendar(&self, languages: &super::foundation::collections::IIterable, calendar: &HStringArg, clock: &HStringArg) -> Result> { + }} + #[inline] pub fn create_calendar(&self, languages: &foundation::collections::IIterable, calendar: &HStringArg, clock: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateCalendar)(self as *const _ as *mut _, 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_ICalendarFactory2, 3024828300, 51838, 17808, 158, 114, 234, 43, 236, 26, 81, 21); RT_INTERFACE!{static interface ICalendarFactory2(ICalendarFactory2Vtbl): IInspectable(IInspectableVtbl) [IID_ICalendarFactory2] { - fn CreateCalendarWithTimeZone(&self, languages: *mut super::foundation::collections::IIterable, calendar: HSTRING, clock: HSTRING, timeZoneId: HSTRING, out: *mut *mut Calendar) -> HRESULT + fn CreateCalendarWithTimeZone(&self, languages: *mut 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(&self, languages: &super::foundation::collections::IIterable, calendar: &HStringArg, clock: &HStringArg, timeZoneId: &HStringArg) -> Result> { + #[inline] pub fn create_calendar_with_time_zone(&self, languages: &foundation::collections::IIterable, calendar: &HStringArg, clock: &HStringArg, timeZoneId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateCalendarWithTimeZone)(self as *const _ as *mut _, languages as *const _ as *mut _, calendar.get(), clock.get(), timeZoneId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class CalendarIdentifiers} impl RtActivatable for CalendarIdentifiers {} impl RtActivatable for CalendarIdentifiers {} impl RtActivatable for CalendarIdentifiers {} impl CalendarIdentifiers { - #[inline] pub fn get_gregorian() -> Result { unsafe { + #[inline] pub fn get_gregorian() -> Result { >::get_activation_factory().get_gregorian() - }} - #[inline] pub fn get_hebrew() -> Result { unsafe { + } + #[inline] pub fn get_hebrew() -> Result { >::get_activation_factory().get_hebrew() - }} - #[inline] pub fn get_hijri() -> Result { unsafe { + } + #[inline] pub fn get_hijri() -> Result { >::get_activation_factory().get_hijri() - }} - #[inline] pub fn get_japanese() -> Result { unsafe { + } + #[inline] pub fn get_japanese() -> Result { >::get_activation_factory().get_japanese() - }} - #[inline] pub fn get_julian() -> Result { unsafe { + } + #[inline] pub fn get_julian() -> Result { >::get_activation_factory().get_julian() - }} - #[inline] pub fn get_korean() -> Result { unsafe { + } + #[inline] pub fn get_korean() -> Result { >::get_activation_factory().get_korean() - }} - #[inline] pub fn get_taiwan() -> Result { unsafe { + } + #[inline] pub fn get_taiwan() -> Result { >::get_activation_factory().get_taiwan() - }} - #[inline] pub fn get_thai() -> Result { unsafe { + } + #[inline] pub fn get_thai() -> Result { >::get_activation_factory().get_thai() - }} - #[inline] pub fn get_um_al_qura() -> Result { unsafe { + } + #[inline] pub fn get_um_al_qura() -> Result { >::get_activation_factory().get_um_al_qura() - }} - #[inline] pub fn get_persian() -> Result { unsafe { + } + #[inline] pub fn get_persian() -> Result { >::get_activation_factory().get_persian() - }} - #[inline] pub fn get_chinese_lunar() -> Result { unsafe { + } + #[inline] pub fn get_chinese_lunar() -> Result { >::get_activation_factory().get_chinese_lunar() - }} - #[inline] pub fn get_japanese_lunar() -> Result { unsafe { + } + #[inline] pub fn get_japanese_lunar() -> Result { >::get_activation_factory().get_japanese_lunar() - }} - #[inline] pub fn get_korean_lunar() -> Result { unsafe { + } + #[inline] pub fn get_korean_lunar() -> Result { >::get_activation_factory().get_korean_lunar() - }} - #[inline] pub fn get_taiwan_lunar() -> Result { unsafe { + } + #[inline] pub fn get_taiwan_lunar() -> Result { >::get_activation_factory().get_taiwan_lunar() - }} - #[inline] pub fn get_vietnamese_lunar() -> Result { unsafe { + } + #[inline] pub fn get_vietnamese_lunar() -> Result { >::get_activation_factory().get_vietnamese_lunar() - }} + } } DEFINE_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]) [CLSID_CalendarIdentifiers]); DEFINE_IID!(IID_ICalendarIdentifiersStatics, 2154119016, 11442, 19487, 181, 144, 240, 245, 43, 244, 253, 26); @@ -719,62 +719,62 @@ RT_INTERFACE!{static interface ICalendarIdentifiersStatics(ICalendarIdentifiersS fn get_UmAlQura(&self, out: *mut HSTRING) -> HRESULT }} impl ICalendarIdentifiersStatics { - #[inline] pub unsafe fn get_gregorian(&self) -> Result { + #[inline] pub fn get_gregorian(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Gregorian)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_hebrew(&self) -> Result { + }} + #[inline] pub fn get_hebrew(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Hebrew)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_hijri(&self) -> Result { + }} + #[inline] pub fn get_hijri(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Hijri)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_japanese(&self) -> Result { + }} + #[inline] pub fn get_japanese(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Japanese)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_julian(&self) -> Result { + }} + #[inline] pub fn get_julian(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Julian)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_korean(&self) -> Result { + }} + #[inline] pub fn get_korean(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Korean)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_taiwan(&self) -> Result { + }} + #[inline] pub fn get_taiwan(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Taiwan)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_thai(&self) -> Result { + }} + #[inline] pub fn get_thai(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Thai)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_um_al_qura(&self) -> Result { + }} + #[inline] pub fn get_um_al_qura(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UmAlQura)(self as *const _ as *mut _, &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(&self, out: *mut HSTRING) -> HRESULT }} impl ICalendarIdentifiersStatics2 { - #[inline] pub unsafe fn get_persian(&self) -> Result { + #[inline] pub fn get_persian(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Persian)(self as *const _ as *mut _, &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] { @@ -785,41 +785,41 @@ RT_INTERFACE!{static interface ICalendarIdentifiersStatics3(ICalendarIdentifiers fn get_VietnameseLunar(&self, out: *mut HSTRING) -> HRESULT }} impl ICalendarIdentifiersStatics3 { - #[inline] pub unsafe fn get_chinese_lunar(&self) -> Result { + #[inline] pub fn get_chinese_lunar(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ChineseLunar)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_japanese_lunar(&self) -> Result { + }} + #[inline] pub fn get_japanese_lunar(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_JapaneseLunar)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_korean_lunar(&self) -> Result { + }} + #[inline] pub fn get_korean_lunar(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_KoreanLunar)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_taiwan_lunar(&self) -> Result { + }} + #[inline] pub fn get_taiwan_lunar(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TaiwanLunar)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_vietnamese_lunar(&self) -> Result { + }} + #[inline] pub fn get_vietnamese_lunar(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VietnameseLunar)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class ClockIdentifiers} impl RtActivatable for ClockIdentifiers {} impl ClockIdentifiers { - #[inline] pub fn get_twelve_hour() -> Result { unsafe { + #[inline] pub fn get_twelve_hour() -> Result { >::get_activation_factory().get_twelve_hour() - }} - #[inline] pub fn get_twenty_four_hour() -> Result { unsafe { + } + #[inline] pub fn get_twenty_four_hour() -> Result { >::get_activation_factory().get_twenty_four_hour() - }} + } } DEFINE_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]) [CLSID_ClockIdentifiers]); DEFINE_IID!(IID_IClockIdentifiersStatics, 1379403195, 4844, 20355, 188, 49, 177, 180, 55, 107, 8, 8); @@ -828,495 +828,495 @@ RT_INTERFACE!{static interface IClockIdentifiersStatics(IClockIdentifiersStatics fn get_TwentyFourHour(&self, out: *mut HSTRING) -> HRESULT }} impl IClockIdentifiersStatics { - #[inline] pub unsafe fn get_twelve_hour(&self) -> Result { + #[inline] pub fn get_twelve_hour(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TwelveHour)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_twenty_four_hour(&self) -> Result { + }} + #[inline] pub fn get_twenty_four_hour(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TwentyFourHour)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class CurrencyIdentifiers} impl RtActivatable for CurrencyIdentifiers {} impl RtActivatable for CurrencyIdentifiers {} impl CurrencyIdentifiers { - #[inline] pub fn get_aed() -> Result { unsafe { + #[inline] pub fn get_aed() -> Result { >::get_activation_factory().get_aed() - }} - #[inline] pub fn get_afn() -> Result { unsafe { + } + #[inline] pub fn get_afn() -> Result { >::get_activation_factory().get_afn() - }} - #[inline] pub fn get_all() -> Result { unsafe { + } + #[inline] pub fn get_all() -> Result { >::get_activation_factory().get_all() - }} - #[inline] pub fn get_amd() -> Result { unsafe { + } + #[inline] pub fn get_amd() -> Result { >::get_activation_factory().get_amd() - }} - #[inline] pub fn get_ang() -> Result { unsafe { + } + #[inline] pub fn get_ang() -> Result { >::get_activation_factory().get_ang() - }} - #[inline] pub fn get_aoa() -> Result { unsafe { + } + #[inline] pub fn get_aoa() -> Result { >::get_activation_factory().get_aoa() - }} - #[inline] pub fn get_ars() -> Result { unsafe { + } + #[inline] pub fn get_ars() -> Result { >::get_activation_factory().get_ars() - }} - #[inline] pub fn get_aud() -> Result { unsafe { + } + #[inline] pub fn get_aud() -> Result { >::get_activation_factory().get_aud() - }} - #[inline] pub fn get_awg() -> Result { unsafe { + } + #[inline] pub fn get_awg() -> Result { >::get_activation_factory().get_awg() - }} - #[inline] pub fn get_azn() -> Result { unsafe { + } + #[inline] pub fn get_azn() -> Result { >::get_activation_factory().get_azn() - }} - #[inline] pub fn get_bam() -> Result { unsafe { + } + #[inline] pub fn get_bam() -> Result { >::get_activation_factory().get_bam() - }} - #[inline] pub fn get_bbd() -> Result { unsafe { + } + #[inline] pub fn get_bbd() -> Result { >::get_activation_factory().get_bbd() - }} - #[inline] pub fn get_bdt() -> Result { unsafe { + } + #[inline] pub fn get_bdt() -> Result { >::get_activation_factory().get_bdt() - }} - #[inline] pub fn get_bgn() -> Result { unsafe { + } + #[inline] pub fn get_bgn() -> Result { >::get_activation_factory().get_bgn() - }} - #[inline] pub fn get_bhd() -> Result { unsafe { + } + #[inline] pub fn get_bhd() -> Result { >::get_activation_factory().get_bhd() - }} - #[inline] pub fn get_bif() -> Result { unsafe { + } + #[inline] pub fn get_bif() -> Result { >::get_activation_factory().get_bif() - }} - #[inline] pub fn get_bmd() -> Result { unsafe { + } + #[inline] pub fn get_bmd() -> Result { >::get_activation_factory().get_bmd() - }} - #[inline] pub fn get_bnd() -> Result { unsafe { + } + #[inline] pub fn get_bnd() -> Result { >::get_activation_factory().get_bnd() - }} - #[inline] pub fn get_bob() -> Result { unsafe { + } + #[inline] pub fn get_bob() -> Result { >::get_activation_factory().get_bob() - }} - #[inline] pub fn get_brl() -> Result { unsafe { + } + #[inline] pub fn get_brl() -> Result { >::get_activation_factory().get_brl() - }} - #[inline] pub fn get_bsd() -> Result { unsafe { + } + #[inline] pub fn get_bsd() -> Result { >::get_activation_factory().get_bsd() - }} - #[inline] pub fn get_btn() -> Result { unsafe { + } + #[inline] pub fn get_btn() -> Result { >::get_activation_factory().get_btn() - }} - #[inline] pub fn get_bwp() -> Result { unsafe { + } + #[inline] pub fn get_bwp() -> Result { >::get_activation_factory().get_bwp() - }} - #[inline] pub fn get_byr() -> Result { unsafe { + } + #[inline] pub fn get_byr() -> Result { >::get_activation_factory().get_byr() - }} - #[inline] pub fn get_bzd() -> Result { unsafe { + } + #[inline] pub fn get_bzd() -> Result { >::get_activation_factory().get_bzd() - }} - #[inline] pub fn get_cad() -> Result { unsafe { + } + #[inline] pub fn get_cad() -> Result { >::get_activation_factory().get_cad() - }} - #[inline] pub fn get_cdf() -> Result { unsafe { + } + #[inline] pub fn get_cdf() -> Result { >::get_activation_factory().get_cdf() - }} - #[inline] pub fn get_chf() -> Result { unsafe { + } + #[inline] pub fn get_chf() -> Result { >::get_activation_factory().get_chf() - }} - #[inline] pub fn get_clp() -> Result { unsafe { + } + #[inline] pub fn get_clp() -> Result { >::get_activation_factory().get_clp() - }} - #[inline] pub fn get_cny() -> Result { unsafe { + } + #[inline] pub fn get_cny() -> Result { >::get_activation_factory().get_cny() - }} - #[inline] pub fn get_cop() -> Result { unsafe { + } + #[inline] pub fn get_cop() -> Result { >::get_activation_factory().get_cop() - }} - #[inline] pub fn get_crc() -> Result { unsafe { + } + #[inline] pub fn get_crc() -> Result { >::get_activation_factory().get_crc() - }} - #[inline] pub fn get_cup() -> Result { unsafe { + } + #[inline] pub fn get_cup() -> Result { >::get_activation_factory().get_cup() - }} - #[inline] pub fn get_cve() -> Result { unsafe { + } + #[inline] pub fn get_cve() -> Result { >::get_activation_factory().get_cve() - }} - #[inline] pub fn get_czk() -> Result { unsafe { + } + #[inline] pub fn get_czk() -> Result { >::get_activation_factory().get_czk() - }} - #[inline] pub fn get_djf() -> Result { unsafe { + } + #[inline] pub fn get_djf() -> Result { >::get_activation_factory().get_djf() - }} - #[inline] pub fn get_dkk() -> Result { unsafe { + } + #[inline] pub fn get_dkk() -> Result { >::get_activation_factory().get_dkk() - }} - #[inline] pub fn get_dop() -> Result { unsafe { + } + #[inline] pub fn get_dop() -> Result { >::get_activation_factory().get_dop() - }} - #[inline] pub fn get_dzd() -> Result { unsafe { + } + #[inline] pub fn get_dzd() -> Result { >::get_activation_factory().get_dzd() - }} - #[inline] pub fn get_egp() -> Result { unsafe { + } + #[inline] pub fn get_egp() -> Result { >::get_activation_factory().get_egp() - }} - #[inline] pub fn get_ern() -> Result { unsafe { + } + #[inline] pub fn get_ern() -> Result { >::get_activation_factory().get_ern() - }} - #[inline] pub fn get_etb() -> Result { unsafe { + } + #[inline] pub fn get_etb() -> Result { >::get_activation_factory().get_etb() - }} - #[inline] pub fn get_eur() -> Result { unsafe { + } + #[inline] pub fn get_eur() -> Result { >::get_activation_factory().get_eur() - }} - #[inline] pub fn get_fjd() -> Result { unsafe { + } + #[inline] pub fn get_fjd() -> Result { >::get_activation_factory().get_fjd() - }} - #[inline] pub fn get_fkp() -> Result { unsafe { + } + #[inline] pub fn get_fkp() -> Result { >::get_activation_factory().get_fkp() - }} - #[inline] pub fn get_gbp() -> Result { unsafe { + } + #[inline] pub fn get_gbp() -> Result { >::get_activation_factory().get_gbp() - }} - #[inline] pub fn get_gel() -> Result { unsafe { + } + #[inline] pub fn get_gel() -> Result { >::get_activation_factory().get_gel() - }} - #[inline] pub fn get_ghs() -> Result { unsafe { + } + #[inline] pub fn get_ghs() -> Result { >::get_activation_factory().get_ghs() - }} - #[inline] pub fn get_gip() -> Result { unsafe { + } + #[inline] pub fn get_gip() -> Result { >::get_activation_factory().get_gip() - }} - #[inline] pub fn get_gmd() -> Result { unsafe { + } + #[inline] pub fn get_gmd() -> Result { >::get_activation_factory().get_gmd() - }} - #[inline] pub fn get_gnf() -> Result { unsafe { + } + #[inline] pub fn get_gnf() -> Result { >::get_activation_factory().get_gnf() - }} - #[inline] pub fn get_gtq() -> Result { unsafe { + } + #[inline] pub fn get_gtq() -> Result { >::get_activation_factory().get_gtq() - }} - #[inline] pub fn get_gyd() -> Result { unsafe { + } + #[inline] pub fn get_gyd() -> Result { >::get_activation_factory().get_gyd() - }} - #[inline] pub fn get_hkd() -> Result { unsafe { + } + #[inline] pub fn get_hkd() -> Result { >::get_activation_factory().get_hkd() - }} - #[inline] pub fn get_hnl() -> Result { unsafe { + } + #[inline] pub fn get_hnl() -> Result { >::get_activation_factory().get_hnl() - }} - #[inline] pub fn get_hrk() -> Result { unsafe { + } + #[inline] pub fn get_hrk() -> Result { >::get_activation_factory().get_hrk() - }} - #[inline] pub fn get_htg() -> Result { unsafe { + } + #[inline] pub fn get_htg() -> Result { >::get_activation_factory().get_htg() - }} - #[inline] pub fn get_huf() -> Result { unsafe { + } + #[inline] pub fn get_huf() -> Result { >::get_activation_factory().get_huf() - }} - #[inline] pub fn get_idr() -> Result { unsafe { + } + #[inline] pub fn get_idr() -> Result { >::get_activation_factory().get_idr() - }} - #[inline] pub fn get_ils() -> Result { unsafe { + } + #[inline] pub fn get_ils() -> Result { >::get_activation_factory().get_ils() - }} - #[inline] pub fn get_inr() -> Result { unsafe { + } + #[inline] pub fn get_inr() -> Result { >::get_activation_factory().get_inr() - }} - #[inline] pub fn get_iqd() -> Result { unsafe { + } + #[inline] pub fn get_iqd() -> Result { >::get_activation_factory().get_iqd() - }} - #[inline] pub fn get_irr() -> Result { unsafe { + } + #[inline] pub fn get_irr() -> Result { >::get_activation_factory().get_irr() - }} - #[inline] pub fn get_isk() -> Result { unsafe { + } + #[inline] pub fn get_isk() -> Result { >::get_activation_factory().get_isk() - }} - #[inline] pub fn get_jmd() -> Result { unsafe { + } + #[inline] pub fn get_jmd() -> Result { >::get_activation_factory().get_jmd() - }} - #[inline] pub fn get_jod() -> Result { unsafe { + } + #[inline] pub fn get_jod() -> Result { >::get_activation_factory().get_jod() - }} - #[inline] pub fn get_jpy() -> Result { unsafe { + } + #[inline] pub fn get_jpy() -> Result { >::get_activation_factory().get_jpy() - }} - #[inline] pub fn get_kes() -> Result { unsafe { + } + #[inline] pub fn get_kes() -> Result { >::get_activation_factory().get_kes() - }} - #[inline] pub fn get_kgs() -> Result { unsafe { + } + #[inline] pub fn get_kgs() -> Result { >::get_activation_factory().get_kgs() - }} - #[inline] pub fn get_khr() -> Result { unsafe { + } + #[inline] pub fn get_khr() -> Result { >::get_activation_factory().get_khr() - }} - #[inline] pub fn get_kmf() -> Result { unsafe { + } + #[inline] pub fn get_kmf() -> Result { >::get_activation_factory().get_kmf() - }} - #[inline] pub fn get_kpw() -> Result { unsafe { + } + #[inline] pub fn get_kpw() -> Result { >::get_activation_factory().get_kpw() - }} - #[inline] pub fn get_krw() -> Result { unsafe { + } + #[inline] pub fn get_krw() -> Result { >::get_activation_factory().get_krw() - }} - #[inline] pub fn get_kwd() -> Result { unsafe { + } + #[inline] pub fn get_kwd() -> Result { >::get_activation_factory().get_kwd() - }} - #[inline] pub fn get_kyd() -> Result { unsafe { + } + #[inline] pub fn get_kyd() -> Result { >::get_activation_factory().get_kyd() - }} - #[inline] pub fn get_kzt() -> Result { unsafe { + } + #[inline] pub fn get_kzt() -> Result { >::get_activation_factory().get_kzt() - }} - #[inline] pub fn get_lak() -> Result { unsafe { + } + #[inline] pub fn get_lak() -> Result { >::get_activation_factory().get_lak() - }} - #[inline] pub fn get_lbp() -> Result { unsafe { + } + #[inline] pub fn get_lbp() -> Result { >::get_activation_factory().get_lbp() - }} - #[inline] pub fn get_lkr() -> Result { unsafe { + } + #[inline] pub fn get_lkr() -> Result { >::get_activation_factory().get_lkr() - }} - #[inline] pub fn get_lrd() -> Result { unsafe { + } + #[inline] pub fn get_lrd() -> Result { >::get_activation_factory().get_lrd() - }} - #[inline] pub fn get_lsl() -> Result { unsafe { + } + #[inline] pub fn get_lsl() -> Result { >::get_activation_factory().get_lsl() - }} - #[inline] pub fn get_ltl() -> Result { unsafe { + } + #[inline] pub fn get_ltl() -> Result { >::get_activation_factory().get_ltl() - }} - #[inline] pub fn get_lvl() -> Result { unsafe { + } + #[inline] pub fn get_lvl() -> Result { >::get_activation_factory().get_lvl() - }} - #[inline] pub fn get_lyd() -> Result { unsafe { + } + #[inline] pub fn get_lyd() -> Result { >::get_activation_factory().get_lyd() - }} - #[inline] pub fn get_mad() -> Result { unsafe { + } + #[inline] pub fn get_mad() -> Result { >::get_activation_factory().get_mad() - }} - #[inline] pub fn get_mdl() -> Result { unsafe { + } + #[inline] pub fn get_mdl() -> Result { >::get_activation_factory().get_mdl() - }} - #[inline] pub fn get_mga() -> Result { unsafe { + } + #[inline] pub fn get_mga() -> Result { >::get_activation_factory().get_mga() - }} - #[inline] pub fn get_mkd() -> Result { unsafe { + } + #[inline] pub fn get_mkd() -> Result { >::get_activation_factory().get_mkd() - }} - #[inline] pub fn get_mmk() -> Result { unsafe { + } + #[inline] pub fn get_mmk() -> Result { >::get_activation_factory().get_mmk() - }} - #[inline] pub fn get_mnt() -> Result { unsafe { + } + #[inline] pub fn get_mnt() -> Result { >::get_activation_factory().get_mnt() - }} - #[inline] pub fn get_mop() -> Result { unsafe { + } + #[inline] pub fn get_mop() -> Result { >::get_activation_factory().get_mop() - }} - #[inline] pub fn get_mro() -> Result { unsafe { + } + #[inline] pub fn get_mro() -> Result { >::get_activation_factory().get_mro() - }} - #[inline] pub fn get_mur() -> Result { unsafe { + } + #[inline] pub fn get_mur() -> Result { >::get_activation_factory().get_mur() - }} - #[inline] pub fn get_mvr() -> Result { unsafe { + } + #[inline] pub fn get_mvr() -> Result { >::get_activation_factory().get_mvr() - }} - #[inline] pub fn get_mwk() -> Result { unsafe { + } + #[inline] pub fn get_mwk() -> Result { >::get_activation_factory().get_mwk() - }} - #[inline] pub fn get_mxn() -> Result { unsafe { + } + #[inline] pub fn get_mxn() -> Result { >::get_activation_factory().get_mxn() - }} - #[inline] pub fn get_myr() -> Result { unsafe { + } + #[inline] pub fn get_myr() -> Result { >::get_activation_factory().get_myr() - }} - #[inline] pub fn get_mzn() -> Result { unsafe { + } + #[inline] pub fn get_mzn() -> Result { >::get_activation_factory().get_mzn() - }} - #[inline] pub fn get_nad() -> Result { unsafe { + } + #[inline] pub fn get_nad() -> Result { >::get_activation_factory().get_nad() - }} - #[inline] pub fn get_ngn() -> Result { unsafe { + } + #[inline] pub fn get_ngn() -> Result { >::get_activation_factory().get_ngn() - }} - #[inline] pub fn get_nio() -> Result { unsafe { + } + #[inline] pub fn get_nio() -> Result { >::get_activation_factory().get_nio() - }} - #[inline] pub fn get_nok() -> Result { unsafe { + } + #[inline] pub fn get_nok() -> Result { >::get_activation_factory().get_nok() - }} - #[inline] pub fn get_npr() -> Result { unsafe { + } + #[inline] pub fn get_npr() -> Result { >::get_activation_factory().get_npr() - }} - #[inline] pub fn get_nzd() -> Result { unsafe { + } + #[inline] pub fn get_nzd() -> Result { >::get_activation_factory().get_nzd() - }} - #[inline] pub fn get_omr() -> Result { unsafe { + } + #[inline] pub fn get_omr() -> Result { >::get_activation_factory().get_omr() - }} - #[inline] pub fn get_pab() -> Result { unsafe { + } + #[inline] pub fn get_pab() -> Result { >::get_activation_factory().get_pab() - }} - #[inline] pub fn get_pen() -> Result { unsafe { + } + #[inline] pub fn get_pen() -> Result { >::get_activation_factory().get_pen() - }} - #[inline] pub fn get_pgk() -> Result { unsafe { + } + #[inline] pub fn get_pgk() -> Result { >::get_activation_factory().get_pgk() - }} - #[inline] pub fn get_php() -> Result { unsafe { + } + #[inline] pub fn get_php() -> Result { >::get_activation_factory().get_php() - }} - #[inline] pub fn get_pkr() -> Result { unsafe { + } + #[inline] pub fn get_pkr() -> Result { >::get_activation_factory().get_pkr() - }} - #[inline] pub fn get_pln() -> Result { unsafe { + } + #[inline] pub fn get_pln() -> Result { >::get_activation_factory().get_pln() - }} - #[inline] pub fn get_pyg() -> Result { unsafe { + } + #[inline] pub fn get_pyg() -> Result { >::get_activation_factory().get_pyg() - }} - #[inline] pub fn get_qar() -> Result { unsafe { + } + #[inline] pub fn get_qar() -> Result { >::get_activation_factory().get_qar() - }} - #[inline] pub fn get_ron() -> Result { unsafe { + } + #[inline] pub fn get_ron() -> Result { >::get_activation_factory().get_ron() - }} - #[inline] pub fn get_rsd() -> Result { unsafe { + } + #[inline] pub fn get_rsd() -> Result { >::get_activation_factory().get_rsd() - }} - #[inline] pub fn get_rub() -> Result { unsafe { + } + #[inline] pub fn get_rub() -> Result { >::get_activation_factory().get_rub() - }} - #[inline] pub fn get_rwf() -> Result { unsafe { + } + #[inline] pub fn get_rwf() -> Result { >::get_activation_factory().get_rwf() - }} - #[inline] pub fn get_sar() -> Result { unsafe { + } + #[inline] pub fn get_sar() -> Result { >::get_activation_factory().get_sar() - }} - #[inline] pub fn get_sbd() -> Result { unsafe { + } + #[inline] pub fn get_sbd() -> Result { >::get_activation_factory().get_sbd() - }} - #[inline] pub fn get_scr() -> Result { unsafe { + } + #[inline] pub fn get_scr() -> Result { >::get_activation_factory().get_scr() - }} - #[inline] pub fn get_sdg() -> Result { unsafe { + } + #[inline] pub fn get_sdg() -> Result { >::get_activation_factory().get_sdg() - }} - #[inline] pub fn get_sek() -> Result { unsafe { + } + #[inline] pub fn get_sek() -> Result { >::get_activation_factory().get_sek() - }} - #[inline] pub fn get_sgd() -> Result { unsafe { + } + #[inline] pub fn get_sgd() -> Result { >::get_activation_factory().get_sgd() - }} - #[inline] pub fn get_shp() -> Result { unsafe { + } + #[inline] pub fn get_shp() -> Result { >::get_activation_factory().get_shp() - }} - #[inline] pub fn get_sll() -> Result { unsafe { + } + #[inline] pub fn get_sll() -> Result { >::get_activation_factory().get_sll() - }} - #[inline] pub fn get_sos() -> Result { unsafe { + } + #[inline] pub fn get_sos() -> Result { >::get_activation_factory().get_sos() - }} - #[inline] pub fn get_srd() -> Result { unsafe { + } + #[inline] pub fn get_srd() -> Result { >::get_activation_factory().get_srd() - }} - #[inline] pub fn get_std() -> Result { unsafe { + } + #[inline] pub fn get_std() -> Result { >::get_activation_factory().get_std() - }} - #[inline] pub fn get_syp() -> Result { unsafe { + } + #[inline] pub fn get_syp() -> Result { >::get_activation_factory().get_syp() - }} - #[inline] pub fn get_szl() -> Result { unsafe { + } + #[inline] pub fn get_szl() -> Result { >::get_activation_factory().get_szl() - }} - #[inline] pub fn get_thb() -> Result { unsafe { + } + #[inline] pub fn get_thb() -> Result { >::get_activation_factory().get_thb() - }} - #[inline] pub fn get_tjs() -> Result { unsafe { + } + #[inline] pub fn get_tjs() -> Result { >::get_activation_factory().get_tjs() - }} - #[inline] pub fn get_tmt() -> Result { unsafe { + } + #[inline] pub fn get_tmt() -> Result { >::get_activation_factory().get_tmt() - }} - #[inline] pub fn get_tnd() -> Result { unsafe { + } + #[inline] pub fn get_tnd() -> Result { >::get_activation_factory().get_tnd() - }} - #[inline] pub fn get_top() -> Result { unsafe { + } + #[inline] pub fn get_top() -> Result { >::get_activation_factory().get_top() - }} - #[inline] pub fn get_try() -> Result { unsafe { + } + #[inline] pub fn get_try() -> Result { >::get_activation_factory().get_try() - }} - #[inline] pub fn get_ttd() -> Result { unsafe { + } + #[inline] pub fn get_ttd() -> Result { >::get_activation_factory().get_ttd() - }} - #[inline] pub fn get_twd() -> Result { unsafe { + } + #[inline] pub fn get_twd() -> Result { >::get_activation_factory().get_twd() - }} - #[inline] pub fn get_tzs() -> Result { unsafe { + } + #[inline] pub fn get_tzs() -> Result { >::get_activation_factory().get_tzs() - }} - #[inline] pub fn get_uah() -> Result { unsafe { + } + #[inline] pub fn get_uah() -> Result { >::get_activation_factory().get_uah() - }} - #[inline] pub fn get_ugx() -> Result { unsafe { + } + #[inline] pub fn get_ugx() -> Result { >::get_activation_factory().get_ugx() - }} - #[inline] pub fn get_usd() -> Result { unsafe { + } + #[inline] pub fn get_usd() -> Result { >::get_activation_factory().get_usd() - }} - #[inline] pub fn get_uyu() -> Result { unsafe { + } + #[inline] pub fn get_uyu() -> Result { >::get_activation_factory().get_uyu() - }} - #[inline] pub fn get_uzs() -> Result { unsafe { + } + #[inline] pub fn get_uzs() -> Result { >::get_activation_factory().get_uzs() - }} - #[inline] pub fn get_vef() -> Result { unsafe { + } + #[inline] pub fn get_vef() -> Result { >::get_activation_factory().get_vef() - }} - #[inline] pub fn get_vnd() -> Result { unsafe { + } + #[inline] pub fn get_vnd() -> Result { >::get_activation_factory().get_vnd() - }} - #[inline] pub fn get_vuv() -> Result { unsafe { + } + #[inline] pub fn get_vuv() -> Result { >::get_activation_factory().get_vuv() - }} - #[inline] pub fn get_wst() -> Result { unsafe { + } + #[inline] pub fn get_wst() -> Result { >::get_activation_factory().get_wst() - }} - #[inline] pub fn get_xaf() -> Result { unsafe { + } + #[inline] pub fn get_xaf() -> Result { >::get_activation_factory().get_xaf() - }} - #[inline] pub fn get_xcd() -> Result { unsafe { + } + #[inline] pub fn get_xcd() -> Result { >::get_activation_factory().get_xcd() - }} - #[inline] pub fn get_xof() -> Result { unsafe { + } + #[inline] pub fn get_xof() -> Result { >::get_activation_factory().get_xof() - }} - #[inline] pub fn get_xpf() -> Result { unsafe { + } + #[inline] pub fn get_xpf() -> Result { >::get_activation_factory().get_xpf() - }} - #[inline] pub fn get_xxx() -> Result { unsafe { + } + #[inline] pub fn get_xxx() -> Result { >::get_activation_factory().get_xxx() - }} - #[inline] pub fn get_yer() -> Result { unsafe { + } + #[inline] pub fn get_yer() -> Result { >::get_activation_factory().get_yer() - }} - #[inline] pub fn get_zar() -> Result { unsafe { + } + #[inline] pub fn get_zar() -> Result { >::get_activation_factory().get_zar() - }} - #[inline] pub fn get_zmw() -> Result { unsafe { + } + #[inline] pub fn get_zmw() -> Result { >::get_activation_factory().get_zmw() - }} - #[inline] pub fn get_zwl() -> Result { unsafe { + } + #[inline] pub fn get_zwl() -> Result { >::get_activation_factory().get_zwl() - }} - #[inline] pub fn get_byn() -> Result { unsafe { + } + #[inline] pub fn get_byn() -> Result { >::get_activation_factory().get_byn() - }} + } } DEFINE_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]) [CLSID_CurrencyIdentifiers]); DEFINE_IID!(IID_ICurrencyIdentifiersStatics, 2669480219, 54662, 18707, 155, 106, 169, 189, 45, 193, 40, 116); @@ -1480,802 +1480,802 @@ RT_INTERFACE!{static interface ICurrencyIdentifiersStatics(ICurrencyIdentifiersS fn get_ZWL(&self, out: *mut HSTRING) -> HRESULT }} impl ICurrencyIdentifiersStatics { - #[inline] pub unsafe fn get_aed(&self) -> Result { + #[inline] pub fn get_aed(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AED)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_afn(&self) -> Result { + }} + #[inline] pub fn get_afn(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AFN)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_all(&self) -> Result { + }} + #[inline] pub fn get_all(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ALL)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_amd(&self) -> Result { + }} + #[inline] pub fn get_amd(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AMD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ang(&self) -> Result { + }} + #[inline] pub fn get_ang(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ANG)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_aoa(&self) -> Result { + }} + #[inline] pub fn get_aoa(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AOA)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ars(&self) -> Result { + }} + #[inline] pub fn get_ars(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ARS)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_aud(&self) -> Result { + }} + #[inline] pub fn get_aud(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AUD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_awg(&self) -> Result { + }} + #[inline] pub fn get_awg(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AWG)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_azn(&self) -> Result { + }} + #[inline] pub fn get_azn(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AZN)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_bam(&self) -> Result { + }} + #[inline] pub fn get_bam(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BAM)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_bbd(&self) -> Result { + }} + #[inline] pub fn get_bbd(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BBD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_bdt(&self) -> Result { + }} + #[inline] pub fn get_bdt(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BDT)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_bgn(&self) -> Result { + }} + #[inline] pub fn get_bgn(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BGN)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_bhd(&self) -> Result { + }} + #[inline] pub fn get_bhd(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BHD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_bif(&self) -> Result { + }} + #[inline] pub fn get_bif(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BIF)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_bmd(&self) -> Result { + }} + #[inline] pub fn get_bmd(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BMD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_bnd(&self) -> Result { + }} + #[inline] pub fn get_bnd(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BND)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_bob(&self) -> Result { + }} + #[inline] pub fn get_bob(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BOB)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_brl(&self) -> Result { + }} + #[inline] pub fn get_brl(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BRL)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_bsd(&self) -> Result { + }} + #[inline] pub fn get_bsd(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BSD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_btn(&self) -> Result { + }} + #[inline] pub fn get_btn(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BTN)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_bwp(&self) -> Result { + }} + #[inline] pub fn get_bwp(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BWP)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_byr(&self) -> Result { + }} + #[inline] pub fn get_byr(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BYR)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_bzd(&self) -> Result { + }} + #[inline] pub fn get_bzd(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BZD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_cad(&self) -> Result { + }} + #[inline] pub fn get_cad(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CAD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_cdf(&self) -> Result { + }} + #[inline] pub fn get_cdf(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CDF)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_chf(&self) -> Result { + }} + #[inline] pub fn get_chf(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CHF)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_clp(&self) -> Result { + }} + #[inline] pub fn get_clp(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CLP)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_cny(&self) -> Result { + }} + #[inline] pub fn get_cny(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CNY)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_cop(&self) -> Result { + }} + #[inline] pub fn get_cop(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_COP)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_crc(&self) -> Result { + }} + #[inline] pub fn get_crc(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CRC)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_cup(&self) -> Result { + }} + #[inline] pub fn get_cup(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CUP)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_cve(&self) -> Result { + }} + #[inline] pub fn get_cve(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CVE)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_czk(&self) -> Result { + }} + #[inline] pub fn get_czk(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CZK)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_djf(&self) -> Result { + }} + #[inline] pub fn get_djf(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DJF)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_dkk(&self) -> Result { + }} + #[inline] pub fn get_dkk(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DKK)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_dop(&self) -> Result { + }} + #[inline] pub fn get_dop(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DOP)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_dzd(&self) -> Result { + }} + #[inline] pub fn get_dzd(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DZD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_egp(&self) -> Result { + }} + #[inline] pub fn get_egp(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EGP)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ern(&self) -> Result { + }} + #[inline] pub fn get_ern(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ERN)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_etb(&self) -> Result { + }} + #[inline] pub fn get_etb(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ETB)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_eur(&self) -> Result { + }} + #[inline] pub fn get_eur(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EUR)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_fjd(&self) -> Result { + }} + #[inline] pub fn get_fjd(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FJD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_fkp(&self) -> Result { + }} + #[inline] pub fn get_fkp(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FKP)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_gbp(&self) -> Result { + }} + #[inline] pub fn get_gbp(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_GBP)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_gel(&self) -> Result { + }} + #[inline] pub fn get_gel(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_GEL)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ghs(&self) -> Result { + }} + #[inline] pub fn get_ghs(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_GHS)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_gip(&self) -> Result { + }} + #[inline] pub fn get_gip(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_GIP)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_gmd(&self) -> Result { + }} + #[inline] pub fn get_gmd(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_GMD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_gnf(&self) -> Result { + }} + #[inline] pub fn get_gnf(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_GNF)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_gtq(&self) -> Result { + }} + #[inline] pub fn get_gtq(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_GTQ)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_gyd(&self) -> Result { + }} + #[inline] pub fn get_gyd(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_GYD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_hkd(&self) -> Result { + }} + #[inline] pub fn get_hkd(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HKD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_hnl(&self) -> Result { + }} + #[inline] pub fn get_hnl(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HNL)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_hrk(&self) -> Result { + }} + #[inline] pub fn get_hrk(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HRK)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_htg(&self) -> Result { + }} + #[inline] pub fn get_htg(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HTG)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_huf(&self) -> Result { + }} + #[inline] pub fn get_huf(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HUF)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_idr(&self) -> Result { + }} + #[inline] pub fn get_idr(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IDR)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ils(&self) -> Result { + }} + #[inline] pub fn get_ils(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ILS)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_inr(&self) -> Result { + }} + #[inline] pub fn get_inr(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_INR)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_iqd(&self) -> Result { + }} + #[inline] pub fn get_iqd(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IQD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_irr(&self) -> Result { + }} + #[inline] pub fn get_irr(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IRR)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_isk(&self) -> Result { + }} + #[inline] pub fn get_isk(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ISK)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_jmd(&self) -> Result { + }} + #[inline] pub fn get_jmd(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_JMD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_jod(&self) -> Result { + }} + #[inline] pub fn get_jod(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_JOD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_jpy(&self) -> Result { + }} + #[inline] pub fn get_jpy(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_JPY)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_kes(&self) -> Result { + }} + #[inline] pub fn get_kes(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_KES)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_kgs(&self) -> Result { + }} + #[inline] pub fn get_kgs(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_KGS)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_khr(&self) -> Result { + }} + #[inline] pub fn get_khr(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_KHR)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_kmf(&self) -> Result { + }} + #[inline] pub fn get_kmf(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_KMF)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_kpw(&self) -> Result { + }} + #[inline] pub fn get_kpw(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_KPW)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_krw(&self) -> Result { + }} + #[inline] pub fn get_krw(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_KRW)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_kwd(&self) -> Result { + }} + #[inline] pub fn get_kwd(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_KWD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_kyd(&self) -> Result { + }} + #[inline] pub fn get_kyd(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_KYD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_kzt(&self) -> Result { + }} + #[inline] pub fn get_kzt(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_KZT)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_lak(&self) -> Result { + }} + #[inline] pub fn get_lak(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LAK)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_lbp(&self) -> Result { + }} + #[inline] pub fn get_lbp(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LBP)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_lkr(&self) -> Result { + }} + #[inline] pub fn get_lkr(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LKR)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_lrd(&self) -> Result { + }} + #[inline] pub fn get_lrd(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LRD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_lsl(&self) -> Result { + }} + #[inline] pub fn get_lsl(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LSL)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ltl(&self) -> Result { + }} + #[inline] pub fn get_ltl(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LTL)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_lvl(&self) -> Result { + }} + #[inline] pub fn get_lvl(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LVL)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_lyd(&self) -> Result { + }} + #[inline] pub fn get_lyd(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LYD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mad(&self) -> Result { + }} + #[inline] pub fn get_mad(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MAD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mdl(&self) -> Result { + }} + #[inline] pub fn get_mdl(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MDL)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mga(&self) -> Result { + }} + #[inline] pub fn get_mga(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MGA)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mkd(&self) -> Result { + }} + #[inline] pub fn get_mkd(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MKD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mmk(&self) -> Result { + }} + #[inline] pub fn get_mmk(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MMK)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mnt(&self) -> Result { + }} + #[inline] pub fn get_mnt(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MNT)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mop(&self) -> Result { + }} + #[inline] pub fn get_mop(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MOP)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mro(&self) -> Result { + }} + #[inline] pub fn get_mro(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MRO)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mur(&self) -> Result { + }} + #[inline] pub fn get_mur(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MUR)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mvr(&self) -> Result { + }} + #[inline] pub fn get_mvr(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MVR)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mwk(&self) -> Result { + }} + #[inline] pub fn get_mwk(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MWK)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mxn(&self) -> Result { + }} + #[inline] pub fn get_mxn(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MXN)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_myr(&self) -> Result { + }} + #[inline] pub fn get_myr(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MYR)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mzn(&self) -> Result { + }} + #[inline] pub fn get_mzn(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MZN)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_nad(&self) -> Result { + }} + #[inline] pub fn get_nad(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NAD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ngn(&self) -> Result { + }} + #[inline] pub fn get_ngn(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NGN)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_nio(&self) -> Result { + }} + #[inline] pub fn get_nio(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NIO)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_nok(&self) -> Result { + }} + #[inline] pub fn get_nok(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NOK)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_npr(&self) -> Result { + }} + #[inline] pub fn get_npr(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NPR)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_nzd(&self) -> Result { + }} + #[inline] pub fn get_nzd(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NZD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_omr(&self) -> Result { + }} + #[inline] pub fn get_omr(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OMR)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pab(&self) -> Result { + }} + #[inline] pub fn get_pab(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PAB)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pen(&self) -> Result { + }} + #[inline] pub fn get_pen(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PEN)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pgk(&self) -> Result { + }} + #[inline] pub fn get_pgk(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PGK)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_php(&self) -> Result { + }} + #[inline] pub fn get_php(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PHP)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pkr(&self) -> Result { + }} + #[inline] pub fn get_pkr(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PKR)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pln(&self) -> Result { + }} + #[inline] pub fn get_pln(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PLN)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pyg(&self) -> Result { + }} + #[inline] pub fn get_pyg(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PYG)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_qar(&self) -> Result { + }} + #[inline] pub fn get_qar(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_QAR)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ron(&self) -> Result { + }} + #[inline] pub fn get_ron(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RON)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rsd(&self) -> Result { + }} + #[inline] pub fn get_rsd(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RSD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rub(&self) -> Result { + }} + #[inline] pub fn get_rub(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RUB)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rwf(&self) -> Result { + }} + #[inline] pub fn get_rwf(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RWF)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sar(&self) -> Result { + }} + #[inline] pub fn get_sar(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SAR)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sbd(&self) -> Result { + }} + #[inline] pub fn get_sbd(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SBD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_scr(&self) -> Result { + }} + #[inline] pub fn get_scr(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SCR)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sdg(&self) -> Result { + }} + #[inline] pub fn get_sdg(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SDG)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sek(&self) -> Result { + }} + #[inline] pub fn get_sek(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SEK)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sgd(&self) -> Result { + }} + #[inline] pub fn get_sgd(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SGD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_shp(&self) -> Result { + }} + #[inline] pub fn get_shp(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SHP)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sll(&self) -> Result { + }} + #[inline] pub fn get_sll(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SLL)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sos(&self) -> Result { + }} + #[inline] pub fn get_sos(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SOS)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_srd(&self) -> Result { + }} + #[inline] pub fn get_srd(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SRD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_std(&self) -> Result { + }} + #[inline] pub fn get_std(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_STD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_syp(&self) -> Result { + }} + #[inline] pub fn get_syp(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SYP)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_szl(&self) -> Result { + }} + #[inline] pub fn get_szl(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SZL)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_thb(&self) -> Result { + }} + #[inline] pub fn get_thb(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_THB)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_tjs(&self) -> Result { + }} + #[inline] pub fn get_tjs(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TJS)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_tmt(&self) -> Result { + }} + #[inline] pub fn get_tmt(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TMT)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_tnd(&self) -> Result { + }} + #[inline] pub fn get_tnd(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TND)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_top(&self) -> Result { + }} + #[inline] pub fn get_top(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TOP)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_try(&self) -> Result { + }} + #[inline] pub fn get_try(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TRY)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ttd(&self) -> Result { + }} + #[inline] pub fn get_ttd(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TTD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_twd(&self) -> Result { + }} + #[inline] pub fn get_twd(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TWD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_tzs(&self) -> Result { + }} + #[inline] pub fn get_tzs(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TZS)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_uah(&self) -> Result { + }} + #[inline] pub fn get_uah(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UAH)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ugx(&self) -> Result { + }} + #[inline] pub fn get_ugx(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UGX)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_usd(&self) -> Result { + }} + #[inline] pub fn get_usd(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_USD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_uyu(&self) -> Result { + }} + #[inline] pub fn get_uyu(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UYU)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_uzs(&self) -> Result { + }} + #[inline] pub fn get_uzs(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UZS)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_vef(&self) -> Result { + }} + #[inline] pub fn get_vef(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VEF)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_vnd(&self) -> Result { + }} + #[inline] pub fn get_vnd(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VND)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_vuv(&self) -> Result { + }} + #[inline] pub fn get_vuv(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VUV)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_wst(&self) -> Result { + }} + #[inline] pub fn get_wst(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WST)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_xaf(&self) -> Result { + }} + #[inline] pub fn get_xaf(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_XAF)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_xcd(&self) -> Result { + }} + #[inline] pub fn get_xcd(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_XCD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_xof(&self) -> Result { + }} + #[inline] pub fn get_xof(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_XOF)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_xpf(&self) -> Result { + }} + #[inline] pub fn get_xpf(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_XPF)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_xxx(&self) -> Result { + }} + #[inline] pub fn get_xxx(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_XXX)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_yer(&self) -> Result { + }} + #[inline] pub fn get_yer(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_YER)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_zar(&self) -> Result { + }} + #[inline] pub fn get_zar(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ZAR)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_zmw(&self) -> Result { + }} + #[inline] pub fn get_zmw(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ZMW)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_zwl(&self) -> Result { + }} + #[inline] pub fn get_zwl(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ZWL)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ICurrencyIdentifiersStatics2, 403995007, 50098, 19507, 149, 145, 152, 0, 17, 149, 13, 55); RT_INTERFACE!{static interface ICurrencyIdentifiersStatics2(ICurrencyIdentifiersStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_ICurrencyIdentifiersStatics2] { fn get_BYN(&self, out: *mut HSTRING) -> HRESULT }} impl ICurrencyIdentifiersStatics2 { - #[inline] pub unsafe fn get_byn(&self) -> Result { + #[inline] pub fn get_byn(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BYN)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(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, @@ -2288,56 +2288,56 @@ RT_INTERFACE!{interface IGeographicRegion(IGeographicRegionVtbl): IInspectable(I fn get_CodeThreeDigit(&self, out: *mut HSTRING) -> HRESULT, fn get_DisplayName(&self, out: *mut HSTRING) -> HRESULT, fn get_NativeName(&self, out: *mut HSTRING) -> HRESULT, - fn get_CurrenciesInUse(&self, out: *mut *mut super::foundation::collections::IVectorView) -> HRESULT + fn get_CurrenciesInUse(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IGeographicRegion { - #[inline] pub unsafe fn get_code(&self) -> Result { + #[inline] pub fn get_code(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Code)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_code_two_letter(&self) -> Result { + }} + #[inline] pub fn get_code_two_letter(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CodeTwoLetter)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_code_three_letter(&self) -> Result { + }} + #[inline] pub fn get_code_three_letter(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CodeThreeLetter)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_code_three_digit(&self) -> Result { + }} + #[inline] pub fn get_code_three_digit(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CodeThreeDigit)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_native_name(&self) -> Result { + }} + #[inline] pub fn get_native_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NativeName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_currencies_in_use(&self) -> Result>> { + }} + #[inline] pub fn get_currencies_in_use(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CurrenciesInUse)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class GeographicRegion: IGeographicRegion} impl RtActivatable for GeographicRegion {} impl RtActivatable for GeographicRegion {} impl RtActivatable for GeographicRegion {} impl GeographicRegion { - #[inline] pub fn create_geographic_region(geographicRegionCode: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_geographic_region(geographicRegionCode: &HStringArg) -> Result> { >::get_activation_factory().create_geographic_region(geographicRegionCode) - }} - #[inline] pub fn is_supported(geographicRegionCode: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn is_supported(geographicRegionCode: &HStringArg) -> Result { >::get_activation_factory().is_supported(geographicRegionCode) - }} + } } DEFINE_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]) [CLSID_GeographicRegion]); DEFINE_IID!(IID_IGeographicRegionFactory, 1396855408, 30644, 17003, 133, 159, 129, 225, 157, 81, 37, 70); @@ -2345,22 +2345,22 @@ RT_INTERFACE!{static interface IGeographicRegionFactory(IGeographicRegionFactory fn CreateGeographicRegion(&self, geographicRegionCode: HSTRING, out: *mut *mut GeographicRegion) -> HRESULT }} impl IGeographicRegionFactory { - #[inline] pub unsafe fn create_geographic_region(&self, geographicRegionCode: &HStringArg) -> Result> { + #[inline] pub fn create_geographic_region(&self, geographicRegionCode: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateGeographicRegion)(self as *const _ as *mut _, geographicRegionCode.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, geographicRegionCode: HSTRING, out: *mut bool) -> HRESULT }} impl IGeographicRegionStatics { - #[inline] pub unsafe fn is_supported(&self, geographicRegionCode: &HStringArg) -> Result { + #[inline] pub fn is_supported(&self, geographicRegionCode: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsSupported)(self as *const _ as *mut _, geographicRegionCode.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IJapanesePhoneme, 795513600, 59483, 17382, 137, 125, 93, 130, 248, 98, 223, 33); RT_INTERFACE!{interface IJapanesePhoneme(IJapanesePhonemeVtbl): IInspectable(IInspectableVtbl) [IID_IJapanesePhoneme] { @@ -2369,50 +2369,50 @@ RT_INTERFACE!{interface IJapanesePhoneme(IJapanesePhonemeVtbl): IInspectable(IIn fn get_IsPhraseStart(&self, out: *mut bool) -> HRESULT }} impl IJapanesePhoneme { - #[inline] pub unsafe fn get_display_text(&self) -> Result { + #[inline] pub fn get_display_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_yomi_text(&self) -> Result { + }} + #[inline] pub fn get_yomi_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_YomiText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_phrase_start(&self) -> Result { + }} + #[inline] pub fn get_is_phrase_start(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPhraseStart)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class JapanesePhoneme: IJapanesePhoneme} RT_CLASS!{static class JapanesePhoneticAnalyzer} impl RtActivatable for JapanesePhoneticAnalyzer {} impl JapanesePhoneticAnalyzer { - #[inline] pub fn get_words(input: &HStringArg) -> Result>> { unsafe { + #[inline] pub fn get_words(input: &HStringArg) -> Result>>> { >::get_activation_factory().get_words(input) - }} - #[inline] pub fn get_words_with_mono_ruby_option(input: &HStringArg, monoRuby: bool) -> Result>> { unsafe { + } + #[inline] pub fn get_words_with_mono_ruby_option(input: &HStringArg, monoRuby: bool) -> Result>>> { >::get_activation_factory().get_words_with_mono_ruby_option(input, monoRuby) - }} + } } DEFINE_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]) [CLSID_JapanesePhoneticAnalyzer]); 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(&self, input: HSTRING, out: *mut *mut super::foundation::collections::IVectorView) -> HRESULT, - fn GetWordsWithMonoRubyOption(&self, input: HSTRING, monoRuby: bool, out: *mut *mut super::foundation::collections::IVectorView) -> HRESULT + fn GetWords(&self, input: HSTRING, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn GetWordsWithMonoRubyOption(&self, input: HSTRING, monoRuby: bool, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IJapanesePhoneticAnalyzerStatics { - #[inline] pub unsafe fn get_words(&self, input: &HStringArg) -> Result>> { + #[inline] pub fn get_words(&self, input: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetWords)(self as *const _ as *mut _, 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(&self, input: &HStringArg, monoRuby: bool) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_words_with_mono_ruby_option(&self, input: &HStringArg, monoRuby: bool) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetWordsWithMonoRubyOption)(self as *const _ as *mut _, input.get(), monoRuby, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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] { @@ -2422,67 +2422,67 @@ RT_INTERFACE!{interface ILanguage(ILanguageVtbl): IInspectable(IInspectableVtbl) fn get_Script(&self, out: *mut HSTRING) -> HRESULT }} impl ILanguage { - #[inline] pub unsafe fn get_language_tag(&self) -> Result { + #[inline] pub fn get_language_tag(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LanguageTag)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_native_name(&self) -> Result { + }} + #[inline] pub fn get_native_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NativeName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_script(&self) -> Result { + }} + #[inline] pub fn get_script(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Script)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class Language: ILanguage} impl RtActivatable for Language {} impl RtActivatable for Language {} impl RtActivatable for Language {} impl Language { - #[inline] pub fn create_language(languageTag: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_language(languageTag: &HStringArg) -> Result> { >::get_activation_factory().create_language(languageTag) - }} - #[inline] pub fn is_well_formed(languageTag: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn is_well_formed(languageTag: &HStringArg) -> Result { >::get_activation_factory().is_well_formed(languageTag) - }} - #[inline] pub fn get_current_input_method_language_tag() -> Result { unsafe { + } + #[inline] pub fn get_current_input_method_language_tag() -> Result { >::get_activation_factory().get_current_input_method_language_tag() - }} - #[inline] pub fn try_set_input_method_language_tag(languageTag: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn try_set_input_method_language_tag(languageTag: &HStringArg) -> Result { >::get_activation_factory().try_set_input_method_language_tag(languageTag) - }} + } } DEFINE_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]) [CLSID_Language]); 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(&self, singleton: HSTRING, out: *mut *mut super::foundation::collections::IVectorView) -> HRESULT + fn GetExtensionSubtags(&self, singleton: HSTRING, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl ILanguageExtensionSubtags { - #[inline] pub unsafe fn get_extension_subtags(&self, singleton: &HStringArg) -> Result>> { + #[inline] pub fn get_extension_subtags(&self, singleton: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetExtensionSubtags)(self as *const _ as *mut _, singleton.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, languageTag: HSTRING, out: *mut *mut Language) -> HRESULT }} impl ILanguageFactory { - #[inline] pub unsafe fn create_language(&self, languageTag: &HStringArg) -> Result> { + #[inline] pub fn create_language(&self, languageTag: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateLanguage)(self as *const _ as *mut _, languageTag.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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] { @@ -2490,176 +2490,176 @@ RT_INTERFACE!{static interface ILanguageStatics(ILanguageStaticsVtbl): IInspecta fn get_CurrentInputMethodLanguageTag(&self, out: *mut HSTRING) -> HRESULT }} impl ILanguageStatics { - #[inline] pub unsafe fn is_well_formed(&self, languageTag: &HStringArg) -> Result { + #[inline] pub fn is_well_formed(&self, languageTag: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsWellFormed)(self as *const _ as *mut _, languageTag.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_input_method_language_tag(&self) -> Result { + }} + #[inline] pub fn get_current_input_method_language_tag(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CurrentInputMethodLanguageTag)(self as *const _ as *mut _, &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(&self, languageTag: HSTRING, out: *mut bool) -> HRESULT }} impl ILanguageStatics2 { - #[inline] pub unsafe fn try_set_input_method_language_tag(&self, languageTag: &HStringArg) -> Result { + #[inline] pub fn try_set_input_method_language_tag(&self, languageTag: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TrySetInputMethodLanguageTag)(self as *const _ as *mut _, languageTag.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{static class NumeralSystemIdentifiers} impl RtActivatable for NumeralSystemIdentifiers {} impl RtActivatable for NumeralSystemIdentifiers {} impl NumeralSystemIdentifiers { - #[inline] pub fn get_arab() -> Result { unsafe { + #[inline] pub fn get_arab() -> Result { >::get_activation_factory().get_arab() - }} - #[inline] pub fn get_arab_ext() -> Result { unsafe { + } + #[inline] pub fn get_arab_ext() -> Result { >::get_activation_factory().get_arab_ext() - }} - #[inline] pub fn get_bali() -> Result { unsafe { + } + #[inline] pub fn get_bali() -> Result { >::get_activation_factory().get_bali() - }} - #[inline] pub fn get_beng() -> Result { unsafe { + } + #[inline] pub fn get_beng() -> Result { >::get_activation_factory().get_beng() - }} - #[inline] pub fn get_cham() -> Result { unsafe { + } + #[inline] pub fn get_cham() -> Result { >::get_activation_factory().get_cham() - }} - #[inline] pub fn get_deva() -> Result { unsafe { + } + #[inline] pub fn get_deva() -> Result { >::get_activation_factory().get_deva() - }} - #[inline] pub fn get_full_wide() -> Result { unsafe { + } + #[inline] pub fn get_full_wide() -> Result { >::get_activation_factory().get_full_wide() - }} - #[inline] pub fn get_gujr() -> Result { unsafe { + } + #[inline] pub fn get_gujr() -> Result { >::get_activation_factory().get_gujr() - }} - #[inline] pub fn get_guru() -> Result { unsafe { + } + #[inline] pub fn get_guru() -> Result { >::get_activation_factory().get_guru() - }} - #[inline] pub fn get_hani_dec() -> Result { unsafe { + } + #[inline] pub fn get_hani_dec() -> Result { >::get_activation_factory().get_hani_dec() - }} - #[inline] pub fn get_java() -> Result { unsafe { + } + #[inline] pub fn get_java() -> Result { >::get_activation_factory().get_java() - }} - #[inline] pub fn get_kali() -> Result { unsafe { + } + #[inline] pub fn get_kali() -> Result { >::get_activation_factory().get_kali() - }} - #[inline] pub fn get_khmr() -> Result { unsafe { + } + #[inline] pub fn get_khmr() -> Result { >::get_activation_factory().get_khmr() - }} - #[inline] pub fn get_knda() -> Result { unsafe { + } + #[inline] pub fn get_knda() -> Result { >::get_activation_factory().get_knda() - }} - #[inline] pub fn get_lana() -> Result { unsafe { + } + #[inline] pub fn get_lana() -> Result { >::get_activation_factory().get_lana() - }} - #[inline] pub fn get_lana_tham() -> Result { unsafe { + } + #[inline] pub fn get_lana_tham() -> Result { >::get_activation_factory().get_lana_tham() - }} - #[inline] pub fn get_laoo() -> Result { unsafe { + } + #[inline] pub fn get_laoo() -> Result { >::get_activation_factory().get_laoo() - }} - #[inline] pub fn get_latn() -> Result { unsafe { + } + #[inline] pub fn get_latn() -> Result { >::get_activation_factory().get_latn() - }} - #[inline] pub fn get_lepc() -> Result { unsafe { + } + #[inline] pub fn get_lepc() -> Result { >::get_activation_factory().get_lepc() - }} - #[inline] pub fn get_limb() -> Result { unsafe { + } + #[inline] pub fn get_limb() -> Result { >::get_activation_factory().get_limb() - }} - #[inline] pub fn get_mlym() -> Result { unsafe { + } + #[inline] pub fn get_mlym() -> Result { >::get_activation_factory().get_mlym() - }} - #[inline] pub fn get_mong() -> Result { unsafe { + } + #[inline] pub fn get_mong() -> Result { >::get_activation_factory().get_mong() - }} - #[inline] pub fn get_mtei() -> Result { unsafe { + } + #[inline] pub fn get_mtei() -> Result { >::get_activation_factory().get_mtei() - }} - #[inline] pub fn get_mymr() -> Result { unsafe { + } + #[inline] pub fn get_mymr() -> Result { >::get_activation_factory().get_mymr() - }} - #[inline] pub fn get_mymr_shan() -> Result { unsafe { + } + #[inline] pub fn get_mymr_shan() -> Result { >::get_activation_factory().get_mymr_shan() - }} - #[inline] pub fn get_nkoo() -> Result { unsafe { + } + #[inline] pub fn get_nkoo() -> Result { >::get_activation_factory().get_nkoo() - }} - #[inline] pub fn get_olck() -> Result { unsafe { + } + #[inline] pub fn get_olck() -> Result { >::get_activation_factory().get_olck() - }} - #[inline] pub fn get_orya() -> Result { unsafe { + } + #[inline] pub fn get_orya() -> Result { >::get_activation_factory().get_orya() - }} - #[inline] pub fn get_saur() -> Result { unsafe { + } + #[inline] pub fn get_saur() -> Result { >::get_activation_factory().get_saur() - }} - #[inline] pub fn get_sund() -> Result { unsafe { + } + #[inline] pub fn get_sund() -> Result { >::get_activation_factory().get_sund() - }} - #[inline] pub fn get_talu() -> Result { unsafe { + } + #[inline] pub fn get_talu() -> Result { >::get_activation_factory().get_talu() - }} - #[inline] pub fn get_taml_dec() -> Result { unsafe { + } + #[inline] pub fn get_taml_dec() -> Result { >::get_activation_factory().get_taml_dec() - }} - #[inline] pub fn get_telu() -> Result { unsafe { + } + #[inline] pub fn get_telu() -> Result { >::get_activation_factory().get_telu() - }} - #[inline] pub fn get_thai() -> Result { unsafe { + } + #[inline] pub fn get_thai() -> Result { >::get_activation_factory().get_thai() - }} - #[inline] pub fn get_tibt() -> Result { unsafe { + } + #[inline] pub fn get_tibt() -> Result { >::get_activation_factory().get_tibt() - }} - #[inline] pub fn get_vaii() -> Result { unsafe { + } + #[inline] pub fn get_vaii() -> Result { >::get_activation_factory().get_vaii() - }} - #[inline] pub fn get_brah() -> Result { unsafe { + } + #[inline] pub fn get_brah() -> Result { >::get_activation_factory().get_brah() - }} - #[inline] pub fn get_osma() -> Result { unsafe { + } + #[inline] pub fn get_osma() -> Result { >::get_activation_factory().get_osma() - }} - #[inline] pub fn get_math_bold() -> Result { unsafe { + } + #[inline] pub fn get_math_bold() -> Result { >::get_activation_factory().get_math_bold() - }} - #[inline] pub fn get_math_dbl() -> Result { unsafe { + } + #[inline] pub fn get_math_dbl() -> Result { >::get_activation_factory().get_math_dbl() - }} - #[inline] pub fn get_math_sans() -> Result { unsafe { + } + #[inline] pub fn get_math_sans() -> Result { >::get_activation_factory().get_math_sans() - }} - #[inline] pub fn get_math_sanb() -> Result { unsafe { + } + #[inline] pub fn get_math_sanb() -> Result { >::get_activation_factory().get_math_sanb() - }} - #[inline] pub fn get_math_mono() -> Result { unsafe { + } + #[inline] pub fn get_math_mono() -> Result { >::get_activation_factory().get_math_mono() - }} - #[inline] pub fn get_zmth_bold() -> Result { unsafe { + } + #[inline] pub fn get_zmth_bold() -> Result { >::get_activation_factory().get_zmth_bold() - }} - #[inline] pub fn get_zmth_dbl() -> Result { unsafe { + } + #[inline] pub fn get_zmth_dbl() -> Result { >::get_activation_factory().get_zmth_dbl() - }} - #[inline] pub fn get_zmth_sans() -> Result { unsafe { + } + #[inline] pub fn get_zmth_sans() -> Result { >::get_activation_factory().get_zmth_sans() - }} - #[inline] pub fn get_zmth_sanb() -> Result { unsafe { + } + #[inline] pub fn get_zmth_sanb() -> Result { >::get_activation_factory().get_zmth_sanb() - }} - #[inline] pub fn get_zmth_mono() -> Result { unsafe { + } + #[inline] pub fn get_zmth_mono() -> Result { >::get_activation_factory().get_zmth_mono() - }} + } } DEFINE_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]) [CLSID_NumeralSystemIdentifiers]); DEFINE_IID!(IID_INumeralSystemIdentifiersStatics, 2781242051, 26825, 19773, 183, 101, 151, 32, 41, 226, 29, 236); @@ -2702,186 +2702,186 @@ RT_INTERFACE!{static interface INumeralSystemIdentifiersStatics(INumeralSystemId fn get_Vaii(&self, out: *mut HSTRING) -> HRESULT }} impl INumeralSystemIdentifiersStatics { - #[inline] pub unsafe fn get_arab(&self) -> Result { + #[inline] pub fn get_arab(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Arab)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_arab_ext(&self) -> Result { + }} + #[inline] pub fn get_arab_ext(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ArabExt)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_bali(&self) -> Result { + }} + #[inline] pub fn get_bali(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Bali)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_beng(&self) -> Result { + }} + #[inline] pub fn get_beng(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Beng)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_cham(&self) -> Result { + }} + #[inline] pub fn get_cham(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Cham)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deva(&self) -> Result { + }} + #[inline] pub fn get_deva(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Deva)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_full_wide(&self) -> Result { + }} + #[inline] pub fn get_full_wide(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FullWide)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_gujr(&self) -> Result { + }} + #[inline] pub fn get_gujr(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Gujr)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_guru(&self) -> Result { + }} + #[inline] pub fn get_guru(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Guru)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_hani_dec(&self) -> Result { + }} + #[inline] pub fn get_hani_dec(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HaniDec)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_java(&self) -> Result { + }} + #[inline] pub fn get_java(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Java)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_kali(&self) -> Result { + }} + #[inline] pub fn get_kali(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Kali)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_khmr(&self) -> Result { + }} + #[inline] pub fn get_khmr(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Khmr)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_knda(&self) -> Result { + }} + #[inline] pub fn get_knda(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Knda)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_lana(&self) -> Result { + }} + #[inline] pub fn get_lana(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Lana)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_lana_tham(&self) -> Result { + }} + #[inline] pub fn get_lana_tham(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LanaTham)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_laoo(&self) -> Result { + }} + #[inline] pub fn get_laoo(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Laoo)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_latn(&self) -> Result { + }} + #[inline] pub fn get_latn(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Latn)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_lepc(&self) -> Result { + }} + #[inline] pub fn get_lepc(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Lepc)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_limb(&self) -> Result { + }} + #[inline] pub fn get_limb(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Limb)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mlym(&self) -> Result { + }} + #[inline] pub fn get_mlym(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Mlym)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mong(&self) -> Result { + }} + #[inline] pub fn get_mong(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Mong)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mtei(&self) -> Result { + }} + #[inline] pub fn get_mtei(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Mtei)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mymr(&self) -> Result { + }} + #[inline] pub fn get_mymr(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Mymr)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mymr_shan(&self) -> Result { + }} + #[inline] pub fn get_mymr_shan(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MymrShan)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_nkoo(&self) -> Result { + }} + #[inline] pub fn get_nkoo(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Nkoo)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_olck(&self) -> Result { + }} + #[inline] pub fn get_olck(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Olck)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_orya(&self) -> Result { + }} + #[inline] pub fn get_orya(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Orya)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_saur(&self) -> Result { + }} + #[inline] pub fn get_saur(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Saur)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sund(&self) -> Result { + }} + #[inline] pub fn get_sund(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Sund)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_talu(&self) -> Result { + }} + #[inline] pub fn get_talu(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Talu)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_taml_dec(&self) -> Result { + }} + #[inline] pub fn get_taml_dec(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TamlDec)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_telu(&self) -> Result { + }} + #[inline] pub fn get_telu(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Telu)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_thai(&self) -> Result { + }} + #[inline] pub fn get_thai(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Thai)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_tibt(&self) -> Result { + }} + #[inline] pub fn get_tibt(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Tibt)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_vaii(&self) -> Result { + }} + #[inline] pub fn get_vaii(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Vaii)(self as *const _ as *mut _, &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] { @@ -2899,66 +2899,66 @@ RT_INTERFACE!{static interface INumeralSystemIdentifiersStatics2(INumeralSystemI fn get_ZmthMono(&self, out: *mut HSTRING) -> HRESULT }} impl INumeralSystemIdentifiersStatics2 { - #[inline] pub unsafe fn get_brah(&self) -> Result { + #[inline] pub fn get_brah(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Brah)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_osma(&self) -> Result { + }} + #[inline] pub fn get_osma(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Osma)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_math_bold(&self) -> Result { + }} + #[inline] pub fn get_math_bold(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MathBold)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_math_dbl(&self) -> Result { + }} + #[inline] pub fn get_math_dbl(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MathDbl)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_math_sans(&self) -> Result { + }} + #[inline] pub fn get_math_sans(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MathSans)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_math_sanb(&self) -> Result { + }} + #[inline] pub fn get_math_sanb(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MathSanb)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_math_mono(&self) -> Result { + }} + #[inline] pub fn get_math_mono(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MathMono)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_zmth_bold(&self) -> Result { + }} + #[inline] pub fn get_zmth_bold(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ZmthBold)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_zmth_dbl(&self) -> Result { + }} + #[inline] pub fn get_zmth_dbl(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ZmthDbl)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_zmth_sans(&self) -> Result { + }} + #[inline] pub fn get_zmth_sans(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ZmthSans)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_zmth_sanb(&self) -> Result { + }} + #[inline] pub fn get_zmth_sanb(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ZmthSanb)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_zmth_mono(&self) -> Result { + }} + #[inline] pub fn get_zmth_mono(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ZmthMono)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::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] { @@ -2968,25 +2968,25 @@ RT_INTERFACE!{interface ITimeZoneOnCalendar(ITimeZoneOnCalendarVtbl): IInspectab fn TimeZoneAsString(&self, idealLength: i32, out: *mut HSTRING) -> HRESULT }} impl ITimeZoneOnCalendar { - #[inline] pub unsafe fn get_time_zone(&self) -> Result { + #[inline] pub fn get_time_zone(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetTimeZone)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn change_time_zone(&self, timeZoneId: &HStringArg) -> Result<()> { + }} + #[inline] pub fn change_time_zone(&self, timeZoneId: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ChangeTimeZone)(self as *const _ as *mut _, timeZoneId.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn time_zone_as_full_string(&self) -> Result { + }} + #[inline] pub fn time_zone_as_full_string(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TimeZoneAsFullString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn time_zone_as_string(&self, idealLength: i32) -> Result { + }} + #[inline] pub fn time_zone_as_string(&self, idealLength: i32) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TimeZoneAsString)(self as *const _ as *mut _, idealLength, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } pub mod fonts { // Windows.Globalization.Fonts use ::prelude::*; @@ -3002,31 +3002,31 @@ RT_INTERFACE!{interface ILanguageFont(ILanguageFontVtbl): IInspectable(IInspecta fn get_ScaleFactor(&self, out: *mut f64) -> HRESULT }} impl ILanguageFont { - #[inline] pub unsafe fn get_font_family(&self) -> Result { + #[inline] pub fn get_font_family(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FontFamily)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_font_weight(&self) -> Result { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_font_weight(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FontWeight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_font_stretch(&self) -> Result { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_font_stretch(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FontStretch)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_font_style(&self) -> Result { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_font_style(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FontStyle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_scale_factor(&self) -> Result { + }} + #[inline] pub fn get_scale_factor(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ScaleFactor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class LanguageFont: ILanguageFont} DEFINE_IID!(IID_ILanguageFontGroup, 4080697283, 14940, 19178, 185, 255, 179, 159, 178, 66, 247, 246); @@ -3044,68 +3044,68 @@ RT_INTERFACE!{interface ILanguageFontGroup(ILanguageFontGroupVtbl): IInspectable fn get_DocumentAlternate2Font(&self, out: *mut *mut LanguageFont) -> HRESULT }} impl ILanguageFontGroup { - #[inline] pub unsafe fn get_uitext_font(&self) -> Result> { + #[inline] pub fn get_uitext_font(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UITextFont)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_uiheading_font(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_uiheading_font(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UIHeadingFont)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_uititle_font(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_uititle_font(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UITitleFont)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_uicaption_font(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_uicaption_font(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UICaptionFont)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_uinotification_heading_font(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_uinotification_heading_font(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UINotificationHeadingFont)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_traditional_document_font(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_traditional_document_font(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TraditionalDocumentFont)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_modern_document_font(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_modern_document_font(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ModernDocumentFont)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_document_heading_font(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_document_heading_font(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DocumentHeadingFont)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_fixed_width_text_font(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_fixed_width_text_font(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FixedWidthTextFont)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_document_alternate1_font(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_document_alternate1_font(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DocumentAlternate1Font)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_document_alternate2_font(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_document_alternate2_font(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DocumentAlternate2Font)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class LanguageFontGroup: ILanguageFontGroup} impl RtActivatable for LanguageFontGroup {} impl LanguageFontGroup { - #[inline] pub fn create_language_font_group(languageTag: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_language_font_group(languageTag: &HStringArg) -> Result> { >::get_activation_factory().create_language_font_group(languageTag) - }} + } } DEFINE_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]) [CLSID_LanguageFontGroup]); DEFINE_IID!(IID_ILanguageFontGroupFactory, 4239305831, 20087, 18887, 184, 86, 221, 233, 52, 252, 115, 91); @@ -3113,11 +3113,11 @@ RT_INTERFACE!{static interface ILanguageFontGroupFactory(ILanguageFontGroupFacto fn CreateLanguageFontGroup(&self, languageTag: HSTRING, out: *mut *mut LanguageFontGroup) -> HRESULT }} impl ILanguageFontGroupFactory { - #[inline] pub unsafe fn create_language_font_group(&self, languageTag: &HStringArg) -> Result> { + #[inline] pub fn create_language_font_group(&self, languageTag: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateLanguageFontGroup)(self as *const _ as *mut _, languageTag.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } } // Windows.Globalization.Fonts pub mod phonenumberformatting { // Windows.Globalization.PhoneNumberFormatting @@ -3134,48 +3134,48 @@ RT_INTERFACE!{interface IPhoneNumberFormatter(IPhoneNumberFormatterVtbl): IInspe fn FormatStringWithLeftToRightMarkers(&self, number: HSTRING, out: *mut HSTRING) -> HRESULT }} impl IPhoneNumberFormatter { - #[inline] pub unsafe fn format(&self, number: &PhoneNumberInfo) -> Result { + #[inline] pub fn format(&self, number: &PhoneNumberInfo) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Format)(self as *const _ as *mut _, 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(&self, number: &PhoneNumberInfo, numberFormat: PhoneNumberFormat) -> Result { + }} + #[inline] pub fn format_with_output_format(&self, number: &PhoneNumberInfo, numberFormat: PhoneNumberFormat) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FormatWithOutputFormat)(self as *const _ as *mut _, 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(&self, number: &HStringArg) -> Result { + }} + #[inline] pub fn format_partial_string(&self, number: &HStringArg) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FormatPartialString)(self as *const _ as *mut _, number.get(), &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn format_string(&self, number: &HStringArg) -> Result { + }} + #[inline] pub fn format_string(&self, number: &HStringArg) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FormatString)(self as *const _ as *mut _, 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(&self, number: &HStringArg) -> Result { + }} + #[inline] pub fn format_string_with_left_to_right_markers(&self, number: &HStringArg) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FormatStringWithLeftToRightMarkers)(self as *const _ as *mut _, number.get(), &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PhoneNumberFormatter: IPhoneNumberFormatter} impl RtActivatable for PhoneNumberFormatter {} impl RtActivatable for PhoneNumberFormatter {} impl PhoneNumberFormatter { - #[inline] pub fn try_create(regionCode: &HStringArg) -> Result> { unsafe { + #[inline] pub fn try_create(regionCode: &HStringArg) -> Result>> { >::get_activation_factory().try_create(regionCode) - }} - #[inline] pub fn get_country_code_for_region(regionCode: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn get_country_code_for_region(regionCode: &HStringArg) -> Result { >::get_activation_factory().get_country_code_for_region(regionCode) - }} - #[inline] pub fn get_national_direct_dialing_prefix_for_region(regionCode: &HStringArg, stripNonDigit: bool) -> Result { unsafe { + } + #[inline] pub fn get_national_direct_dialing_prefix_for_region(regionCode: &HStringArg, stripNonDigit: bool) -> Result { >::get_activation_factory().get_national_direct_dialing_prefix_for_region(regionCode, stripNonDigit) - }} - #[inline] pub fn wrap_with_left_to_right_markers(number: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn wrap_with_left_to_right_markers(number: &HStringArg) -> Result { >::get_activation_factory().wrap_with_left_to_right_markers(number) - }} + } } DEFINE_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]) [CLSID_PhoneNumberFormatter]); DEFINE_IID!(IID_IPhoneNumberFormatterStatics, 1554446641, 34009, 16715, 171, 78, 160, 85, 44, 135, 134, 2); @@ -3186,26 +3186,26 @@ RT_INTERFACE!{static interface IPhoneNumberFormatterStatics(IPhoneNumberFormatte fn WrapWithLeftToRightMarkers(&self, number: HSTRING, out: *mut HSTRING) -> HRESULT }} impl IPhoneNumberFormatterStatics { - #[inline] pub unsafe fn try_create(&self, regionCode: &HStringArg) -> Result> { + #[inline] pub fn try_create(&self, regionCode: &HStringArg) -> Result>> { unsafe { let mut phoneNumber = null_mut(); let hr = ((*self.lpVtbl).TryCreate)(self as *const _ as *mut _, regionCode.get(), &mut phoneNumber); - if hr == S_OK { Ok(ComPtr::wrap(phoneNumber)) } else { err(hr) } - } - #[inline] pub unsafe fn get_country_code_for_region(&self, regionCode: &HStringArg) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(phoneNumber)) } else { err(hr) } + }} + #[inline] pub fn get_country_code_for_region(&self, regionCode: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetCountryCodeForRegion)(self as *const _ as *mut _, regionCode.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_national_direct_dialing_prefix_for_region(&self, regionCode: &HStringArg, stripNonDigit: bool) -> Result { + }} + #[inline] pub fn get_national_direct_dialing_prefix_for_region(&self, regionCode: &HStringArg, stripNonDigit: bool) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetNationalDirectDialingPrefixForRegion)(self as *const _ as *mut _, 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(&self, number: &HStringArg) -> Result { + }} + #[inline] pub fn wrap_with_left_to_right_markers(&self, number: &HStringArg) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).WrapWithLeftToRightMarkers)(self as *const _ as *mut _, number.get(), &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IPhoneNumberInfo, 477947101, 51380, 20131, 154, 239, 179, 66, 226, 197, 180, 23); RT_INTERFACE!{interface IPhoneNumberInfo(IPhoneNumberInfoVtbl): IInspectable(IInspectableVtbl) [IID_IPhoneNumberInfo] { @@ -3219,60 +3219,60 @@ RT_INTERFACE!{interface IPhoneNumberInfo(IPhoneNumberInfoVtbl): IInspectable(IIn fn CheckNumberMatch(&self, otherNumber: *mut PhoneNumberInfo, out: *mut PhoneNumberMatchResult) -> HRESULT }} impl IPhoneNumberInfo { - #[inline] pub unsafe fn get_country_code(&self) -> Result { + #[inline] pub fn get_country_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CountryCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_phone_number(&self) -> Result { + }} + #[inline] pub fn get_phone_number(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PhoneNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_length_of_geographical_area_code(&self) -> Result { + }} + #[inline] pub fn get_length_of_geographical_area_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetLengthOfGeographicalAreaCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_national_significant_number(&self) -> Result { + }} + #[inline] pub fn get_national_significant_number(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetNationalSignificantNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_length_of_national_destination_code(&self) -> Result { + }} + #[inline] pub fn get_length_of_national_destination_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetLengthOfNationalDestinationCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn predict_number_kind(&self) -> Result { + }} + #[inline] pub fn predict_number_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).PredictNumberKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_geographic_region_code(&self) -> Result { + }} + #[inline] pub fn get_geographic_region_code(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetGeographicRegionCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn check_number_match(&self, otherNumber: &PhoneNumberInfo) -> Result { + }} + #[inline] pub fn check_number_match(&self, otherNumber: &PhoneNumberInfo) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).CheckNumberMatch)(self as *const _ as *mut _, otherNumber as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PhoneNumberInfo: IPhoneNumberInfo} impl RtActivatable for PhoneNumberInfo {} impl RtActivatable for PhoneNumberInfo {} impl PhoneNumberInfo { - #[inline] pub fn create(number: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(number: &HStringArg) -> Result> { >::get_activation_factory().create(number) - }} - #[inline] pub fn try_parse(input: &HStringArg) -> Result<(ComPtr, PhoneNumberParseResult)> { unsafe { + } + #[inline] pub fn try_parse(input: &HStringArg) -> Result<(Option>, PhoneNumberParseResult)> { >::get_activation_factory().try_parse(input) - }} - #[inline] pub fn try_parse_with_region(input: &HStringArg, regionCode: &HStringArg) -> Result<(ComPtr, PhoneNumberParseResult)> { unsafe { + } + #[inline] pub fn try_parse_with_region(input: &HStringArg, regionCode: &HStringArg) -> Result<(Option>, PhoneNumberParseResult)> { >::get_activation_factory().try_parse_with_region(input, regionCode) - }} + } } DEFINE_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]) [CLSID_PhoneNumberInfo]); DEFINE_IID!(IID_IPhoneNumberInfoFactory, 2181216612, 44458, 19711, 143, 207, 23, 231, 81, 106, 40, 255); @@ -3280,11 +3280,11 @@ RT_INTERFACE!{static interface IPhoneNumberInfoFactory(IPhoneNumberInfoFactoryVt fn Create(&self, number: HSTRING, out: *mut *mut PhoneNumberInfo) -> HRESULT }} impl IPhoneNumberInfoFactory { - #[inline] pub unsafe fn create(&self, number: &HStringArg) -> Result> { + #[inline] pub fn create(&self, number: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, 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] { @@ -3292,16 +3292,16 @@ RT_INTERFACE!{static interface IPhoneNumberInfoStatics(IPhoneNumberInfoStaticsVt fn TryParseWithRegion(&self, input: HSTRING, regionCode: HSTRING, phoneNumber: *mut *mut PhoneNumberInfo, out: *mut PhoneNumberParseResult) -> HRESULT }} impl IPhoneNumberInfoStatics { - #[inline] pub unsafe fn try_parse(&self, input: &HStringArg) -> Result<(ComPtr, PhoneNumberParseResult)> { + #[inline] pub fn try_parse(&self, input: &HStringArg) -> Result<(Option>, PhoneNumberParseResult)> { unsafe { let mut phoneNumber = null_mut(); let mut out = zeroed(); let hr = ((*self.lpVtbl).TryParse)(self as *const _ as *mut _, 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(&self, input: &HStringArg, regionCode: &HStringArg) -> Result<(ComPtr, PhoneNumberParseResult)> { + if hr == S_OK { Ok((ComPtr::wrap_optional(phoneNumber), out)) } else { err(hr) } + }} + #[inline] pub fn try_parse_with_region(&self, input: &HStringArg, regionCode: &HStringArg) -> Result<(Option>, PhoneNumberParseResult)> { unsafe { let mut phoneNumber = null_mut(); let mut out = zeroed(); let hr = ((*self.lpVtbl).TryParseWithRegion)(self as *const _ as *mut _, input.get(), regionCode.get(), &mut phoneNumber, &mut out); - if hr == S_OK { Ok((ComPtr::wrap(phoneNumber), out)) } else { err(hr) } - } + if hr == S_OK { Ok((ComPtr::wrap_optional(phoneNumber), out)) } else { err(hr) } + }} } RT_ENUM! { enum PhoneNumberMatchResult: i32 { NoMatch (PhoneNumberMatchResult_NoMatch) = 0, ShortNationalSignificantNumberMatch (PhoneNumberMatchResult_ShortNationalSignificantNumberMatch) = 1, NationalSignificantNumberMatch (PhoneNumberMatchResult_NationalSignificantNumberMatch) = 2, ExactMatch (PhoneNumberMatchResult_ExactMatch) = 3, @@ -3317,15 +3317,15 @@ pub mod datetimeformatting { // Windows.Globalization.DateTimeFormatting use ::prelude::*; 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Languages(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_GeographicRegion(&self, out: *mut HSTRING) -> HRESULT, fn get_Calendar(&self, out: *mut HSTRING) -> HRESULT, fn get_Clock(&self, out: *mut HSTRING) -> HRESULT, fn get_NumeralSystem(&self, out: *mut HSTRING) -> HRESULT, fn put_NumeralSystem(&self, value: HSTRING) -> HRESULT, - fn get_Patterns(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Patterns(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_Template(&self, out: *mut HSTRING) -> HRESULT, - fn Format(&self, value: super::super::foundation::DateTime, out: *mut HSTRING) -> HRESULT, + fn Format(&self, value: foundation::DateTime, out: *mut HSTRING) -> HRESULT, fn get_IncludeYear(&self, out: *mut YearFormat) -> HRESULT, fn get_IncludeMonth(&self, out: *mut MonthFormat) -> HRESULT, fn get_IncludeDayOfWeek(&self, out: *mut DayOfWeekFormat) -> HRESULT, @@ -3337,192 +3337,192 @@ RT_INTERFACE!{interface IDateTimeFormatter(IDateTimeFormatterVtbl): IInspectable fn get_ResolvedGeographicRegion(&self, out: *mut HSTRING) -> HRESULT }} impl IDateTimeFormatter { - #[inline] pub unsafe fn get_languages(&self) -> Result>> { + #[inline] pub fn get_languages(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Languages)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_geographic_region(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_geographic_region(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_GeographicRegion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_calendar(&self) -> Result { + }} + #[inline] pub fn get_calendar(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Calendar)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_clock(&self) -> Result { + }} + #[inline] pub fn get_clock(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Clock)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_numeral_system(&self) -> Result { + }} + #[inline] pub fn get_numeral_system(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NumeralSystem)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_numeral_system(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_numeral_system(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_NumeralSystem)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_patterns(&self) -> Result>> { + }} + #[inline] pub fn get_patterns(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Patterns)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_template(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_template(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Template)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn format(&self, value: super::super::foundation::DateTime) -> Result { + }} + #[inline] pub fn format(&self, value: foundation::DateTime) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Format)(self as *const _ as *mut _, value, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_include_year(&self) -> Result { + }} + #[inline] pub fn get_include_year(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IncludeYear)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_include_month(&self) -> Result { + }} + #[inline] pub fn get_include_month(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IncludeMonth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_include_day_of_week(&self) -> Result { + }} + #[inline] pub fn get_include_day_of_week(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IncludeDayOfWeek)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_include_day(&self) -> Result { + }} + #[inline] pub fn get_include_day(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IncludeDay)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_include_hour(&self) -> Result { + }} + #[inline] pub fn get_include_hour(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IncludeHour)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_include_minute(&self) -> Result { + }} + #[inline] pub fn get_include_minute(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IncludeMinute)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_include_second(&self) -> Result { + }} + #[inline] pub fn get_include_second(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IncludeSecond)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_resolved_language(&self) -> Result { + }} + #[inline] pub fn get_resolved_language(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResolvedLanguage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_resolved_geographic_region(&self) -> Result { + }} + #[inline] pub fn get_resolved_geographic_region(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResolvedGeographicRegion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class DateTimeFormatter: IDateTimeFormatter} impl RtActivatable for DateTimeFormatter {} impl RtActivatable for DateTimeFormatter {} impl DateTimeFormatter { - #[inline] pub fn create_date_time_formatter(formatTemplate: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_date_time_formatter(formatTemplate: &HStringArg) -> Result> { >::get_activation_factory().create_date_time_formatter(formatTemplate) - }} - #[inline] pub fn create_date_time_formatter_languages(formatTemplate: &HStringArg, languages: &super::super::foundation::collections::IIterable) -> Result> { unsafe { + } + #[inline] pub fn create_date_time_formatter_languages(formatTemplate: &HStringArg, languages: &foundation::collections::IIterable) -> Result> { >::get_activation_factory().create_date_time_formatter_languages(formatTemplate, languages) - }} - #[inline] pub fn create_date_time_formatter_context(formatTemplate: &HStringArg, languages: &super::super::foundation::collections::IIterable, geographicRegion: &HStringArg, calendar: &HStringArg, clock: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_date_time_formatter_context(formatTemplate: &HStringArg, languages: &foundation::collections::IIterable, geographicRegion: &HStringArg, calendar: &HStringArg, clock: &HStringArg) -> Result> { >::get_activation_factory().create_date_time_formatter_context(formatTemplate, languages, geographicRegion, calendar, clock) - }} - #[inline] pub fn create_date_time_formatter_date(yearFormat: YearFormat, monthFormat: MonthFormat, dayFormat: DayFormat, dayOfWeekFormat: DayOfWeekFormat) -> Result> { unsafe { + } + #[inline] pub fn create_date_time_formatter_date(yearFormat: YearFormat, monthFormat: MonthFormat, dayFormat: DayFormat, dayOfWeekFormat: DayOfWeekFormat) -> Result> { >::get_activation_factory().create_date_time_formatter_date(yearFormat, monthFormat, dayFormat, dayOfWeekFormat) - }} - #[inline] pub fn create_date_time_formatter_time(hourFormat: HourFormat, minuteFormat: MinuteFormat, secondFormat: SecondFormat) -> Result> { unsafe { + } + #[inline] pub fn create_date_time_formatter_time(hourFormat: HourFormat, minuteFormat: MinuteFormat, secondFormat: SecondFormat) -> Result> { >::get_activation_factory().create_date_time_formatter_time(hourFormat, minuteFormat, secondFormat) - }} - #[inline] pub fn create_date_time_formatter_date_time_languages(yearFormat: YearFormat, monthFormat: MonthFormat, dayFormat: DayFormat, dayOfWeekFormat: DayOfWeekFormat, hourFormat: HourFormat, minuteFormat: MinuteFormat, secondFormat: SecondFormat, languages: &super::super::foundation::collections::IIterable) -> Result> { unsafe { + } + #[inline] pub fn create_date_time_formatter_date_time_languages(yearFormat: YearFormat, monthFormat: MonthFormat, dayFormat: DayFormat, dayOfWeekFormat: DayOfWeekFormat, hourFormat: HourFormat, minuteFormat: MinuteFormat, secondFormat: SecondFormat, languages: &foundation::collections::IIterable) -> Result> { >::get_activation_factory().create_date_time_formatter_date_time_languages(yearFormat, monthFormat, dayFormat, dayOfWeekFormat, hourFormat, minuteFormat, secondFormat, languages) - }} - #[inline] pub fn create_date_time_formatter_date_time_context(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> { unsafe { + } + #[inline] pub fn create_date_time_formatter_date_time_context(yearFormat: YearFormat, monthFormat: MonthFormat, dayFormat: DayFormat, dayOfWeekFormat: DayOfWeekFormat, hourFormat: HourFormat, minuteFormat: MinuteFormat, secondFormat: SecondFormat, languages: &foundation::collections::IIterable, geographicRegion: &HStringArg, calendar: &HStringArg, clock: &HStringArg) -> Result> { >::get_activation_factory().create_date_time_formatter_date_time_context(yearFormat, monthFormat, dayFormat, dayOfWeekFormat, hourFormat, minuteFormat, secondFormat, languages, geographicRegion, calendar, clock) - }} - #[inline] pub fn get_long_date() -> Result> { unsafe { + } + #[inline] pub fn get_long_date() -> Result>> { >::get_activation_factory().get_long_date() - }} - #[inline] pub fn get_long_time() -> Result> { unsafe { + } + #[inline] pub fn get_long_time() -> Result>> { >::get_activation_factory().get_long_time() - }} - #[inline] pub fn get_short_date() -> Result> { unsafe { + } + #[inline] pub fn get_short_date() -> Result>> { >::get_activation_factory().get_short_date() - }} - #[inline] pub fn get_short_time() -> Result> { unsafe { + } + #[inline] pub fn get_short_time() -> Result>> { >::get_activation_factory().get_short_time() - }} + } } DEFINE_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]) [CLSID_DateTimeFormatter]); 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(&self, datetime: super::super::foundation::DateTime, timeZoneId: HSTRING, out: *mut HSTRING) -> HRESULT + fn FormatUsingTimeZone(&self, datetime: foundation::DateTime, timeZoneId: HSTRING, out: *mut HSTRING) -> HRESULT }} impl IDateTimeFormatter2 { - #[inline] pub unsafe fn format_using_time_zone(&self, datetime: super::super::foundation::DateTime, timeZoneId: &HStringArg) -> Result { + #[inline] pub fn format_using_time_zone(&self, datetime: foundation::DateTime, timeZoneId: &HStringArg) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FormatUsingTimeZone)(self as *const _ as *mut _, datetime, timeZoneId.get(), &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(&self, formatTemplate: HSTRING, out: *mut *mut DateTimeFormatter) -> HRESULT, - fn CreateDateTimeFormatterLanguages(&self, formatTemplate: HSTRING, languages: *mut super::super::foundation::collections::IIterable, out: *mut *mut DateTimeFormatter) -> HRESULT, - fn CreateDateTimeFormatterContext(&self, formatTemplate: HSTRING, languages: *mut super::super::foundation::collections::IIterable, geographicRegion: HSTRING, calendar: HSTRING, clock: HSTRING, out: *mut *mut DateTimeFormatter) -> HRESULT, + fn CreateDateTimeFormatterLanguages(&self, formatTemplate: HSTRING, languages: *mut foundation::collections::IIterable, out: *mut *mut DateTimeFormatter) -> HRESULT, + fn CreateDateTimeFormatterContext(&self, formatTemplate: HSTRING, languages: *mut foundation::collections::IIterable, geographicRegion: HSTRING, calendar: HSTRING, clock: HSTRING, out: *mut *mut DateTimeFormatter) -> HRESULT, fn CreateDateTimeFormatterDate(&self, yearFormat: YearFormat, monthFormat: MonthFormat, dayFormat: DayFormat, dayOfWeekFormat: DayOfWeekFormat, out: *mut *mut DateTimeFormatter) -> HRESULT, fn CreateDateTimeFormatterTime(&self, hourFormat: HourFormat, minuteFormat: MinuteFormat, secondFormat: SecondFormat, out: *mut *mut DateTimeFormatter) -> HRESULT, - fn CreateDateTimeFormatterDateTimeLanguages(&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(&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 + fn CreateDateTimeFormatterDateTimeLanguages(&self, yearFormat: YearFormat, monthFormat: MonthFormat, dayFormat: DayFormat, dayOfWeekFormat: DayOfWeekFormat, hourFormat: HourFormat, minuteFormat: MinuteFormat, secondFormat: SecondFormat, languages: *mut foundation::collections::IIterable, out: *mut *mut DateTimeFormatter) -> HRESULT, + fn CreateDateTimeFormatterDateTimeContext(&self, yearFormat: YearFormat, monthFormat: MonthFormat, dayFormat: DayFormat, dayOfWeekFormat: DayOfWeekFormat, hourFormat: HourFormat, minuteFormat: MinuteFormat, secondFormat: SecondFormat, languages: *mut foundation::collections::IIterable, geographicRegion: HSTRING, calendar: HSTRING, clock: HSTRING, out: *mut *mut DateTimeFormatter) -> HRESULT }} impl IDateTimeFormatterFactory { - #[inline] pub unsafe fn create_date_time_formatter(&self, formatTemplate: &HStringArg) -> Result> { + #[inline] pub fn create_date_time_formatter(&self, formatTemplate: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDateTimeFormatter)(self as *const _ as *mut _, formatTemplate.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_date_time_formatter_languages(&self, formatTemplate: &HStringArg, languages: &super::super::foundation::collections::IIterable) -> Result> { + }} + #[inline] pub fn create_date_time_formatter_languages(&self, formatTemplate: &HStringArg, languages: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDateTimeFormatterLanguages)(self as *const _ as *mut _, 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(&self, formatTemplate: &HStringArg, languages: &super::super::foundation::collections::IIterable, geographicRegion: &HStringArg, calendar: &HStringArg, clock: &HStringArg) -> Result> { + }} + #[inline] pub fn create_date_time_formatter_context(&self, formatTemplate: &HStringArg, languages: &foundation::collections::IIterable, geographicRegion: &HStringArg, calendar: &HStringArg, clock: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDateTimeFormatterContext)(self as *const _ as *mut _, 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(&self, yearFormat: YearFormat, monthFormat: MonthFormat, dayFormat: DayFormat, dayOfWeekFormat: DayOfWeekFormat) -> Result> { + }} + #[inline] pub fn create_date_time_formatter_date(&self, yearFormat: YearFormat, monthFormat: MonthFormat, dayFormat: DayFormat, dayOfWeekFormat: DayOfWeekFormat) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDateTimeFormatterDate)(self as *const _ as *mut _, 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(&self, hourFormat: HourFormat, minuteFormat: MinuteFormat, secondFormat: SecondFormat) -> Result> { + }} + #[inline] pub fn create_date_time_formatter_time(&self, hourFormat: HourFormat, minuteFormat: MinuteFormat, secondFormat: SecondFormat) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDateTimeFormatterTime)(self as *const _ as *mut _, 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(&self, yearFormat: YearFormat, monthFormat: MonthFormat, dayFormat: DayFormat, dayOfWeekFormat: DayOfWeekFormat, hourFormat: HourFormat, minuteFormat: MinuteFormat, secondFormat: SecondFormat, languages: &super::super::foundation::collections::IIterable) -> Result> { + }} + #[inline] pub fn create_date_time_formatter_date_time_languages(&self, yearFormat: YearFormat, monthFormat: MonthFormat, dayFormat: DayFormat, dayOfWeekFormat: DayOfWeekFormat, hourFormat: HourFormat, minuteFormat: MinuteFormat, secondFormat: SecondFormat, languages: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDateTimeFormatterDateTimeLanguages)(self as *const _ as *mut _, 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(&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> { + }} + #[inline] pub fn create_date_time_formatter_date_time_context(&self, yearFormat: YearFormat, monthFormat: MonthFormat, dayFormat: DayFormat, dayOfWeekFormat: DayOfWeekFormat, hourFormat: HourFormat, minuteFormat: MinuteFormat, secondFormat: SecondFormat, languages: &foundation::collections::IIterable, geographicRegion: &HStringArg, calendar: &HStringArg, clock: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDateTimeFormatterDateTimeContext)(self as *const _ as *mut _, 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) } - } + }} } 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] { @@ -3532,26 +3532,26 @@ RT_INTERFACE!{static interface IDateTimeFormatterStatics(IDateTimeFormatterStati fn get_ShortTime(&self, out: *mut *mut DateTimeFormatter) -> HRESULT }} impl IDateTimeFormatterStatics { - #[inline] pub unsafe fn get_long_date(&self) -> Result> { + #[inline] pub fn get_long_date(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LongDate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_long_time(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_long_time(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LongTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_short_date(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_short_date(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ShortDate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_short_time(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_short_time(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ShortTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum DayFormat: i32 { None (DayFormat_None) = 0, Default (DayFormat_Default) = 1, @@ -3583,25 +3583,25 @@ RT_INTERFACE!{interface ICurrencyFormatter(ICurrencyFormatterVtbl): IInspectable fn put_Currency(&self, value: HSTRING) -> HRESULT }} impl ICurrencyFormatter { - #[inline] pub unsafe fn get_currency(&self) -> Result { + #[inline] pub fn get_currency(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Currency)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_currency(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_currency(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Currency)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CurrencyFormatter: ICurrencyFormatter} impl RtActivatable for CurrencyFormatter {} impl CurrencyFormatter { - #[inline] pub fn create_currency_formatter_code(currencyCode: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_currency_formatter_code(currencyCode: &HStringArg) -> Result> { >::get_activation_factory().create_currency_formatter_code(currencyCode) - }} - #[inline] pub fn create_currency_formatter_code_context(currencyCode: &HStringArg, languages: &super::super::foundation::collections::IIterable, geographicRegion: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_currency_formatter_code_context(currencyCode: &HStringArg, languages: &foundation::collections::IIterable, geographicRegion: &HStringArg) -> Result> { >::get_activation_factory().create_currency_formatter_code_context(currencyCode, languages, geographicRegion) - }} + } } DEFINE_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]) [CLSID_CurrencyFormatter]); DEFINE_IID!(IID_ICurrencyFormatter2, 120336157, 59322, 16791, 146, 14, 36, 124, 146, 247, 222, 166); @@ -3611,36 +3611,36 @@ RT_INTERFACE!{interface ICurrencyFormatter2(ICurrencyFormatter2Vtbl): IInspectab fn ApplyRoundingForCurrency(&self, roundingAlgorithm: RoundingAlgorithm) -> HRESULT }} impl ICurrencyFormatter2 { - #[inline] pub unsafe fn get_mode(&self) -> Result { + #[inline] pub fn get_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Mode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_mode(&self, value: CurrencyFormatterMode) -> Result<()> { + }} + #[inline] pub fn set_mode(&self, value: CurrencyFormatterMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Mode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn apply_rounding_for_currency(&self, roundingAlgorithm: RoundingAlgorithm) -> Result<()> { + }} + #[inline] pub fn apply_rounding_for_currency(&self, roundingAlgorithm: RoundingAlgorithm) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ApplyRoundingForCurrency)(self as *const _ as *mut _, roundingAlgorithm); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, currencyCode: HSTRING, out: *mut *mut CurrencyFormatter) -> HRESULT, - fn CreateCurrencyFormatterCodeContext(&self, currencyCode: HSTRING, languages: *mut super::super::foundation::collections::IIterable, geographicRegion: HSTRING, out: *mut *mut CurrencyFormatter) -> HRESULT + fn CreateCurrencyFormatterCodeContext(&self, currencyCode: HSTRING, languages: *mut foundation::collections::IIterable, geographicRegion: HSTRING, out: *mut *mut CurrencyFormatter) -> HRESULT }} impl ICurrencyFormatterFactory { - #[inline] pub unsafe fn create_currency_formatter_code(&self, currencyCode: &HStringArg) -> Result> { + #[inline] pub fn create_currency_formatter_code(&self, currencyCode: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateCurrencyFormatterCode)(self as *const _ as *mut _, currencyCode.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_currency_formatter_code_context(&self, currencyCode: &HStringArg, languages: &super::super::foundation::collections::IIterable, geographicRegion: &HStringArg) -> Result> { + }} + #[inline] pub fn create_currency_formatter_code_context(&self, currencyCode: &HStringArg, languages: &foundation::collections::IIterable, geographicRegion: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateCurrencyFormatterCodeContext)(self as *const _ as *mut _, currencyCode.get(), languages as *const _ as *mut _, geographicRegion.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum CurrencyFormatterMode: i32 { UseSymbol (CurrencyFormatterMode_UseSymbol) = 0, UseCurrencyCode (CurrencyFormatterMode_UseCurrencyCode) = 1, @@ -3649,21 +3649,21 @@ RT_CLASS!{class DecimalFormatter: INumberFormatter} impl RtActivatable for DecimalFormatter {} impl RtActivatable for DecimalFormatter {} impl DecimalFormatter { - #[inline] pub fn create_decimal_formatter(languages: &super::super::foundation::collections::IIterable, geographicRegion: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_decimal_formatter(languages: &foundation::collections::IIterable, geographicRegion: &HStringArg) -> Result> { >::get_activation_factory().create_decimal_formatter(languages, geographicRegion) - }} + } } DEFINE_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]) [CLSID_DecimalFormatter]); 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(&self, languages: *mut super::super::foundation::collections::IIterable, geographicRegion: HSTRING, out: *mut *mut DecimalFormatter) -> HRESULT + fn CreateDecimalFormatter(&self, languages: *mut foundation::collections::IIterable, geographicRegion: HSTRING, out: *mut *mut DecimalFormatter) -> HRESULT }} impl IDecimalFormatterFactory { - #[inline] pub unsafe fn create_decimal_formatter(&self, languages: &super::super::foundation::collections::IIterable, geographicRegion: &HStringArg) -> Result> { + #[inline] pub fn create_decimal_formatter(&self, languages: &foundation::collections::IIterable, geographicRegion: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDecimalFormatter)(self as *const _ as *mut _, languages as *const _ as *mut _, geographicRegion.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } 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] { @@ -3673,24 +3673,24 @@ RT_INTERFACE!{interface IIncrementNumberRounder(IIncrementNumberRounderVtbl): II fn put_Increment(&self, value: f64) -> HRESULT }} impl IIncrementNumberRounder { - #[inline] pub unsafe fn get_rounding_algorithm(&self) -> Result { + #[inline] pub fn get_rounding_algorithm(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RoundingAlgorithm)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_rounding_algorithm(&self, value: RoundingAlgorithm) -> Result<()> { + }} + #[inline] pub fn set_rounding_algorithm(&self, value: RoundingAlgorithm) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RoundingAlgorithm)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_increment(&self) -> Result { + }} + #[inline] pub fn get_increment(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Increment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_increment(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_increment(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Increment)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class IncrementNumberRounder: INumberRounder} impl RtActivatable for IncrementNumberRounder {} @@ -3702,21 +3702,21 @@ RT_INTERFACE!{interface INumberFormatter(INumberFormatterVtbl): IInspectable(IIn fn FormatDouble(&self, value: f64, out: *mut HSTRING) -> HRESULT }} impl INumberFormatter { - #[inline] pub unsafe fn format_int(&self, value: i64) -> Result { + #[inline] pub fn format_int(&self, value: i64) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FormatInt)(self as *const _ as *mut _, value, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn format_uint(&self, value: u64) -> Result { + }} + #[inline] pub fn format_uint(&self, value: u64) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FormatUInt)(self as *const _ as *mut _, value, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn format_double(&self, value: f64) -> Result { + }} + #[inline] pub fn format_double(&self, value: f64) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FormatDouble)(self as *const _ as *mut _, 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] { @@ -3725,25 +3725,25 @@ RT_INTERFACE!{interface INumberFormatter2(INumberFormatter2Vtbl): IInspectable(I fn FormatDouble(&self, value: f64, out: *mut HSTRING) -> HRESULT }} impl INumberFormatter2 { - #[inline] pub unsafe fn format_int(&self, value: i64) -> Result { + #[inline] pub fn format_int(&self, value: i64) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FormatInt)(self as *const _ as *mut _, value, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn format_uint(&self, value: u64) -> Result { + }} + #[inline] pub fn format_uint(&self, value: u64) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FormatUInt)(self as *const _ as *mut _, value, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn format_double(&self, value: f64) -> Result { + }} + #[inline] pub fn format_double(&self, value: f64) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FormatDouble)(self as *const _ as *mut _, value, &mut out); if hr == S_OK { Ok(HString::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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Languages(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_GeographicRegion(&self, out: *mut HSTRING) -> HRESULT, fn get_IntegerDigits(&self, out: *mut i32) -> HRESULT, fn put_IntegerDigits(&self, value: i32) -> HRESULT, @@ -3759,94 +3759,94 @@ RT_INTERFACE!{interface INumberFormatterOptions(INumberFormatterOptionsVtbl): II fn get_ResolvedGeographicRegion(&self, out: *mut HSTRING) -> HRESULT }} impl INumberFormatterOptions { - #[inline] pub unsafe fn get_languages(&self) -> Result>> { + #[inline] pub fn get_languages(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Languages)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_geographic_region(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_geographic_region(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_GeographicRegion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_integer_digits(&self) -> Result { + }} + #[inline] pub fn get_integer_digits(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IntegerDigits)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_integer_digits(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_integer_digits(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IntegerDigits)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_fraction_digits(&self) -> Result { + }} + #[inline] pub fn get_fraction_digits(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FractionDigits)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_fraction_digits(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_fraction_digits(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FractionDigits)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_grouped(&self) -> Result { + }} + #[inline] pub fn get_is_grouped(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsGrouped)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_grouped(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_grouped(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsGrouped)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_decimal_point_always_displayed(&self) -> Result { + }} + #[inline] pub fn get_is_decimal_point_always_displayed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDecimalPointAlwaysDisplayed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_decimal_point_always_displayed(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_decimal_point_always_displayed(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsDecimalPointAlwaysDisplayed)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_numeral_system(&self) -> Result { + }} + #[inline] pub fn get_numeral_system(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NumeralSystem)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_numeral_system(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_numeral_system(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_NumeralSystem)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_resolved_language(&self) -> Result { + }} + #[inline] pub fn get_resolved_language(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResolvedLanguage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_resolved_geographic_region(&self) -> Result { + }} + #[inline] pub fn get_resolved_geographic_region(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResolvedGeographicRegion)(self as *const _ as *mut _, &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(&self, text: HSTRING, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn ParseUInt(&self, text: HSTRING, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn ParseDouble(&self, text: HSTRING, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn ParseInt(&self, text: HSTRING, out: *mut *mut foundation::IReference) -> HRESULT, + fn ParseUInt(&self, text: HSTRING, out: *mut *mut foundation::IReference) -> HRESULT, + fn ParseDouble(&self, text: HSTRING, out: *mut *mut foundation::IReference) -> HRESULT }} impl INumberParser { - #[inline] pub unsafe fn parse_int(&self, text: &HStringArg) -> Result>> { + #[inline] pub fn parse_int(&self, text: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ParseInt)(self as *const _ as *mut _, text.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn parse_uint(&self, text: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn parse_uint(&self, text: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ParseUInt)(self as *const _ as *mut _, text.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn parse_double(&self, text: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn parse_double(&self, text: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ParseDouble)(self as *const _ as *mut _, text.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_INumberRounder, 1416872821, 14573, 17969, 184, 12, 239, 52, 252, 72, 183, 245); RT_INTERFACE!{interface INumberRounder(INumberRounderVtbl): IInspectable(IInspectableVtbl) [IID_INumberRounder] { @@ -3858,36 +3858,36 @@ RT_INTERFACE!{interface INumberRounder(INumberRounderVtbl): IInspectable(IInspec fn RoundDouble(&self, value: f64, out: *mut f64) -> HRESULT }} impl INumberRounder { - #[inline] pub unsafe fn round_int32(&self, value: i32) -> Result { + #[inline] pub fn round_int32(&self, value: i32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).RoundInt32)(self as *const _ as *mut _, value, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn round_uint32(&self, value: u32) -> Result { + }} + #[inline] pub fn round_uint32(&self, value: u32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).RoundUInt32)(self as *const _ as *mut _, value, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn round_int64(&self, value: i64) -> Result { + }} + #[inline] pub fn round_int64(&self, value: i64) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).RoundInt64)(self as *const _ as *mut _, value, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn round_uint64(&self, value: u64) -> Result { + }} + #[inline] pub fn round_uint64(&self, value: u64) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).RoundUInt64)(self as *const _ as *mut _, value, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn round_single(&self, value: f32) -> Result { + }} + #[inline] pub fn round_single(&self, value: f32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).RoundSingle)(self as *const _ as *mut _, value, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn round_double(&self, value: f64) -> Result { + }} + #[inline] pub fn round_double(&self, value: f64) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).RoundDouble)(self as *const _ as *mut _, value, &mut out); if hr == S_OK { Ok(out) } 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] { @@ -3895,109 +3895,109 @@ RT_INTERFACE!{interface INumberRounderOption(INumberRounderOptionVtbl): IInspect fn put_NumberRounder(&self, value: *mut INumberRounder) -> HRESULT }} impl INumberRounderOption { - #[inline] pub unsafe fn get_number_rounder(&self) -> Result> { + #[inline] pub fn get_number_rounder(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NumberRounder)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_number_rounder(&self, value: &INumberRounder) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_number_rounder(&self, value: &INumberRounder) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_NumberRounder)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Languages(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_ResolvedLanguage(&self, out: *mut HSTRING) -> HRESULT, fn get_NumeralSystem(&self, out: *mut HSTRING) -> HRESULT, fn put_NumeralSystem(&self, value: HSTRING) -> HRESULT, fn TranslateNumerals(&self, value: HSTRING, out: *mut HSTRING) -> HRESULT }} impl INumeralSystemTranslator { - #[inline] pub unsafe fn get_languages(&self) -> Result>> { + #[inline] pub fn get_languages(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Languages)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_resolved_language(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_resolved_language(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResolvedLanguage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_numeral_system(&self) -> Result { + }} + #[inline] pub fn get_numeral_system(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NumeralSystem)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_numeral_system(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_numeral_system(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_NumeralSystem)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn translate_numerals(&self, value: &HStringArg) -> Result { + }} + #[inline] pub fn translate_numerals(&self, value: &HStringArg) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TranslateNumerals)(self as *const _ as *mut _, value.get(), &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class NumeralSystemTranslator: INumeralSystemTranslator} impl RtActivatable for NumeralSystemTranslator {} impl RtActivatable for NumeralSystemTranslator {} impl NumeralSystemTranslator { - #[inline] pub fn create(languages: &super::super::foundation::collections::IIterable) -> Result> { unsafe { + #[inline] pub fn create(languages: &foundation::collections::IIterable) -> Result> { >::get_activation_factory().create(languages) - }} + } } DEFINE_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]) [CLSID_NumeralSystemTranslator]); 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(&self, languages: *mut super::super::foundation::collections::IIterable, out: *mut *mut NumeralSystemTranslator) -> HRESULT + fn Create(&self, languages: *mut foundation::collections::IIterable, out: *mut *mut NumeralSystemTranslator) -> HRESULT }} impl INumeralSystemTranslatorFactory { - #[inline] pub unsafe fn create(&self, languages: &super::super::foundation::collections::IIterable) -> Result> { + #[inline] pub fn create(&self, languages: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, languages as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PercentFormatter: INumberFormatter} impl RtActivatable for PercentFormatter {} impl RtActivatable for PercentFormatter {} impl PercentFormatter { - #[inline] pub fn create_percent_formatter(languages: &super::super::foundation::collections::IIterable, geographicRegion: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_percent_formatter(languages: &foundation::collections::IIterable, geographicRegion: &HStringArg) -> Result> { >::get_activation_factory().create_percent_formatter(languages, geographicRegion) - }} + } } DEFINE_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]) [CLSID_PercentFormatter]); 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(&self, languages: *mut super::super::foundation::collections::IIterable, geographicRegion: HSTRING, out: *mut *mut PercentFormatter) -> HRESULT + fn CreatePercentFormatter(&self, languages: *mut foundation::collections::IIterable, geographicRegion: HSTRING, out: *mut *mut PercentFormatter) -> HRESULT }} impl IPercentFormatterFactory { - #[inline] pub unsafe fn create_percent_formatter(&self, languages: &super::super::foundation::collections::IIterable, geographicRegion: &HStringArg) -> Result> { + #[inline] pub fn create_percent_formatter(&self, languages: &foundation::collections::IIterable, geographicRegion: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreatePercentFormatter)(self as *const _ as *mut _, languages as *const _ as *mut _, geographicRegion.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PermilleFormatter: INumberFormatter} impl RtActivatable for PermilleFormatter {} impl RtActivatable for PermilleFormatter {} impl PermilleFormatter { - #[inline] pub fn create_permille_formatter(languages: &super::super::foundation::collections::IIterable, geographicRegion: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_permille_formatter(languages: &foundation::collections::IIterable, geographicRegion: &HStringArg) -> Result> { >::get_activation_factory().create_permille_formatter(languages, geographicRegion) - }} + } } DEFINE_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]) [CLSID_PermilleFormatter]); 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(&self, languages: *mut super::super::foundation::collections::IIterable, geographicRegion: HSTRING, out: *mut *mut PermilleFormatter) -> HRESULT + fn CreatePermilleFormatter(&self, languages: *mut foundation::collections::IIterable, geographicRegion: HSTRING, out: *mut *mut PermilleFormatter) -> HRESULT }} impl IPermilleFormatterFactory { - #[inline] pub unsafe fn create_permille_formatter(&self, languages: &super::super::foundation::collections::IIterable, geographicRegion: &HStringArg) -> Result> { + #[inline] pub fn create_permille_formatter(&self, languages: &foundation::collections::IIterable, geographicRegion: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreatePermilleFormatter)(self as *const _ as *mut _, languages as *const _ as *mut _, geographicRegion.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(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, @@ -4008,15 +4008,15 @@ RT_INTERFACE!{interface ISignedZeroOption(ISignedZeroOptionVtbl): IInspectable(I fn put_IsZeroSigned(&self, value: bool) -> HRESULT }} impl ISignedZeroOption { - #[inline] pub unsafe fn get_is_zero_signed(&self) -> Result { + #[inline] pub fn get_is_zero_signed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsZeroSigned)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_zero_signed(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_zero_signed(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsZeroSigned)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ISignificantDigitsNumberRounder, 4120124362, 26182, 18707, 140, 118, 27, 25, 31, 249, 77, 253); RT_INTERFACE!{interface ISignificantDigitsNumberRounder(ISignificantDigitsNumberRounderVtbl): IInspectable(IInspectableVtbl) [IID_ISignificantDigitsNumberRounder] { @@ -4026,24 +4026,24 @@ RT_INTERFACE!{interface ISignificantDigitsNumberRounder(ISignificantDigitsNumber fn put_SignificantDigits(&self, value: u32) -> HRESULT }} impl ISignificantDigitsNumberRounder { - #[inline] pub unsafe fn get_rounding_algorithm(&self) -> Result { + #[inline] pub fn get_rounding_algorithm(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RoundingAlgorithm)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_rounding_algorithm(&self, value: RoundingAlgorithm) -> Result<()> { + }} + #[inline] pub fn set_rounding_algorithm(&self, value: RoundingAlgorithm) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RoundingAlgorithm)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_significant_digits(&self) -> Result { + }} + #[inline] pub fn get_significant_digits(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SignificantDigits)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_significant_digits(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_significant_digits(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SignificantDigits)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SignificantDigitsNumberRounder: INumberRounder} impl RtActivatable for SignificantDigitsNumberRounder {} @@ -4054,15 +4054,15 @@ RT_INTERFACE!{interface ISignificantDigitsOption(ISignificantDigitsOptionVtbl): fn put_SignificantDigits(&self, value: i32) -> HRESULT }} impl ISignificantDigitsOption { - #[inline] pub unsafe fn get_significant_digits(&self) -> Result { + #[inline] pub fn get_significant_digits(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SignificantDigits)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_significant_digits(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_significant_digits(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SignificantDigits)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } } // Windows.Globalization.NumberFormatting pub mod collation { // Windows.Globalization.Collation @@ -4073,16 +4073,16 @@ RT_INTERFACE!{interface ICharacterGrouping(ICharacterGroupingVtbl): IInspectable fn get_Label(&self, out: *mut HSTRING) -> HRESULT }} impl ICharacterGrouping { - #[inline] pub unsafe fn get_first(&self) -> Result { + #[inline] pub fn get_first(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_First)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_label(&self) -> Result { + }} + #[inline] pub fn get_label(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Label)(self as *const _ as *mut _, &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); @@ -4090,19 +4090,19 @@ RT_INTERFACE!{interface ICharacterGroupings(ICharacterGroupingsVtbl): IInspectab fn Lookup(&self, text: HSTRING, out: *mut HSTRING) -> HRESULT }} impl ICharacterGroupings { - #[inline] pub unsafe fn lookup(&self, text: &HStringArg) -> Result { + #[inline] pub fn lookup(&self, text: &HStringArg) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Lookup)(self as *const _ as *mut _, text.get(), &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class CharacterGroupings: ICharacterGroupings} impl RtActivatable for CharacterGroupings {} impl RtActivatable for CharacterGroupings {} impl CharacterGroupings { - #[inline] pub fn create(language: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(language: &HStringArg) -> Result> { >::get_activation_factory().create(language) - }} + } } DEFINE_CLSID!(CharacterGroupings(&[87,105,110,100,111,119,115,46,71,108,111,98,97,108,105,122,97,116,105,111,110,46,67,111,108,108,97,116,105,111,110,46,67,104,97,114,97,99,116,101,114,71,114,111,117,112,105,110,103,115,0]) [CLSID_CharacterGroupings]); DEFINE_IID!(IID_ICharacterGroupingsFactory, 2582290393, 34925, 17409, 159, 152, 105, 200, 45, 76, 47, 120); @@ -4110,10 +4110,10 @@ RT_INTERFACE!{static interface ICharacterGroupingsFactory(ICharacterGroupingsFac fn Create(&self, language: HSTRING, out: *mut *mut CharacterGroupings) -> HRESULT }} impl ICharacterGroupingsFactory { - #[inline] pub unsafe fn create(&self, language: &HStringArg) -> Result> { + #[inline] pub fn create(&self, language: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, language.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } } // Windows.Globalization.Collation diff --git a/src/rt/gen/windows/graphics.rs b/src/rt/gen/windows/graphics.rs index 7dff33c..7d8679d 100644 --- a/src/rt/gen/windows/graphics.rs +++ b/src/rt/gen/windows/graphics.rs @@ -12,91 +12,91 @@ pub mod printing3d { // Windows.Graphics.Printing3D use ::prelude::*; 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(&self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_TaskRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_TaskRequested(&self, eventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_TaskRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IPrint3DManager { - #[inline] pub unsafe fn add_task_requested(&self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_task_requested(&self, eventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_TaskRequested)(self as *const _ as *mut _, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_task_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_task_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_TaskRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Print3DManager: IPrint3DManager} impl RtActivatable for Print3DManager {} impl Print3DManager { - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} - #[inline] pub fn show_print_uiasync() -> Result>> { unsafe { + } + #[inline] pub fn show_print_uiasync() -> Result>> { >::get_activation_factory().show_print_uiasync() - }} + } } DEFINE_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]) [CLSID_Print3DManager]); 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(&self, out: *mut *mut Print3DManager) -> HRESULT, - fn ShowPrintUIAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn ShowPrintUIAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IPrint3DManagerStatics { - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn show_print_uiasync(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn show_print_uiasync(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowPrintUIAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut Printing3D3MFPackage) -> HRESULT, - fn add_Submitting(&self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Submitting(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Completed(&self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Completed(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_SourceChanged(&self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SourceChanged(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_Submitting(&self, eventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Submitting(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_Completed(&self, eventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Completed(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_SourceChanged(&self, eventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceChanged(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT }} impl IPrint3DTask { - #[inline] pub unsafe fn get_source(&self) -> Result> { + #[inline] pub fn get_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Source)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_submitting(&self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_submitting(&self, eventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Submitting)(self as *const _ as *mut _, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_submitting(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_submitting(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Submitting)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_completed(&self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_completed(&self, eventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Completed)(self as *const _ as *mut _, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_completed(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_completed(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Completed)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_source_changed(&self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_source_changed(&self, eventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SourceChanged)(self as *const _ as *mut _, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_source_changed(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_source_changed(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SourceChanged)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Print3DTask: IPrint3DTask} DEFINE_IID!(IID_IPrint3DTaskCompletedEventArgs, 3424195759, 9748, 20253, 172, 204, 214, 252, 79, 218, 84, 85); @@ -105,16 +105,16 @@ RT_INTERFACE!{interface IPrint3DTaskCompletedEventArgs(IPrint3DTaskCompletedEven fn get_ExtendedStatus(&self, out: *mut Print3DTaskDetail) -> HRESULT }} impl IPrint3DTaskCompletedEventArgs { - #[inline] pub unsafe fn get_completion(&self) -> Result { + #[inline] pub fn get_completion(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Completion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_status(&self) -> Result { + }} + #[inline] pub fn get_extended_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class Print3DTaskCompletedEventArgs: IPrint3DTaskCompletedEventArgs} RT_ENUM! { enum Print3DTaskCompletion: i32 { @@ -128,11 +128,11 @@ RT_INTERFACE!{interface IPrint3DTaskRequest(IPrint3DTaskRequestVtbl): IInspectab fn CreateTask(&self, title: HSTRING, printerId: HSTRING, handler: *mut Print3DTaskSourceRequestedHandler, out: *mut *mut Print3DTask) -> HRESULT }} impl IPrint3DTaskRequest { - #[inline] pub unsafe fn create_task(&self, title: &HStringArg, printerId: &HStringArg, handler: &Print3DTaskSourceRequestedHandler) -> Result> { + #[inline] pub fn create_task(&self, title: &HStringArg, printerId: &HStringArg, handler: &Print3DTaskSourceRequestedHandler) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateTask)(self as *const _ as *mut _, title.get(), printerId.get(), handler as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class Print3DTaskRequest: IPrint3DTaskRequest} DEFINE_IID!(IID_IPrint3DTaskRequestedEventArgs, 353154943, 6341, 16599, 159, 64, 250, 179, 9, 110, 5, 169); @@ -140,11 +140,11 @@ RT_INTERFACE!{interface IPrint3DTaskRequestedEventArgs(IPrint3DTaskRequestedEven fn get_Request(&self, out: *mut *mut Print3DTaskRequest) -> HRESULT }} impl IPrint3DTaskRequestedEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class Print3DTaskRequestedEventArgs: IPrint3DTaskRequestedEventArgs} DEFINE_IID!(IID_IPrint3DTaskSourceChangedEventArgs, 1540175023, 9449, 19472, 141, 7, 20, 195, 70, 186, 63, 207); @@ -152,11 +152,11 @@ RT_INTERFACE!{interface IPrint3DTaskSourceChangedEventArgs(IPrint3DTaskSourceCha fn get_Source(&self, out: *mut *mut Printing3D3MFPackage) -> HRESULT }} impl IPrint3DTaskSourceChangedEventArgs { - #[inline] pub unsafe fn get_source(&self) -> Result> { + #[inline] pub fn get_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Source)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class Print3DTaskSourceChangedEventArgs: IPrint3DTaskSourceChangedEventArgs} DEFINE_IID!(IID_IPrint3DTaskSourceRequestedArgs, 3346832058, 9391, 16973, 163, 191, 146, 37, 12, 53, 86, 2); @@ -164,10 +164,10 @@ RT_INTERFACE!{interface IPrint3DTaskSourceRequestedArgs(IPrint3DTaskSourceReques fn SetSource(&self, source: *mut Printing3D3MFPackage) -> HRESULT }} impl IPrint3DTaskSourceRequestedArgs { - #[inline] pub unsafe fn set_source(&self, source: &Printing3D3MFPackage) -> Result<()> { + #[inline] pub fn set_source(&self, source: &Printing3D3MFPackage) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetSource)(self as *const _ as *mut _, 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); @@ -175,15 +175,15 @@ RT_DELEGATE!{delegate Print3DTaskSourceRequestedHandler(Print3DTaskSourceRequest fn Invoke(&self, args: *mut Print3DTaskSourceRequestedArgs) -> HRESULT }} impl Print3DTaskSourceRequestedHandler { - #[inline] pub unsafe fn invoke(&self, args: &Print3DTaskSourceRequestedArgs) -> Result<()> { + #[inline] pub fn invoke(&self, args: &Print3DTaskSourceRequestedArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, args as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self) -> (), - #[cfg(feature="windows-storage")] fn SaveAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn SaveAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy1(&self) -> (), #[cfg(feature="windows-storage")] fn get_PrintTicket(&self, out: *mut *mut super::super::storage::streams::IRandomAccessStream) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy2(&self) -> (), @@ -194,67 +194,67 @@ RT_INTERFACE!{interface IPrinting3D3MFPackage(IPrinting3D3MFPackageVtbl): IInspe #[cfg(feature="windows-storage")] fn put_ModelPart(&self, value: *mut super::super::storage::streams::IRandomAccessStream) -> HRESULT, fn get_Thumbnail(&self, out: *mut *mut Printing3DTextureResource) -> HRESULT, fn put_Thumbnail(&self, value: *mut Printing3DTextureResource) -> HRESULT, - fn get_Textures(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Textures(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy8(&self) -> (), - #[cfg(feature="windows-storage")] fn LoadModelFromPackageAsync(&self, value: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn SaveModelToPackageAsync(&self, value: *mut Printing3DModel, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + #[cfg(feature="windows-storage")] fn LoadModelFromPackageAsync(&self, value: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn SaveModelToPackageAsync(&self, value: *mut Printing3DModel, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IPrinting3D3MFPackage { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn save_async(&self) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn save_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveAsync)(self 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_print_ticket(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_print_ticket(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PrintTicket)(self 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_print_ticket(&self, value: &super::super::storage::streams::IRandomAccessStream) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_print_ticket(&self, value: &super::super::storage::streams::IRandomAccessStream) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PrintTicket)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_model_part(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_model_part(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ModelPart)(self 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_model_part(&self, value: &super::super::storage::streams::IRandomAccessStream) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_model_part(&self, value: &super::super::storage::streams::IRandomAccessStream) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ModelPart)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_thumbnail(&self) -> Result> { + }} + #[inline] pub fn get_thumbnail(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Thumbnail)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_thumbnail(&self, value: &Printing3DTextureResource) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_thumbnail(&self, value: &Printing3DTextureResource) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Thumbnail)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_textures(&self) -> Result>> { + }} + #[inline] pub fn get_textures(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Textures)(self 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_model_from_package_async(&self, value: &super::super::storage::streams::IRandomAccessStream) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn load_model_from_package_async(&self, value: &super::super::storage::streams::IRandomAccessStream) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LoadModelFromPackageAsync)(self as *const _ as *mut _, 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(&self, value: &Printing3DModel) -> Result> { + }} + #[inline] pub fn save_model_to_package_async(&self, value: &Printing3DModel) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveModelToPackageAsync)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class Printing3D3MFPackage: IPrinting3D3MFPackage} impl RtActivatable for Printing3D3MFPackage {} impl RtActivatable for Printing3D3MFPackage {} impl Printing3D3MFPackage { - #[cfg(feature="windows-storage")] #[inline] pub fn load_async(value: &super::super::storage::streams::IRandomAccessStream) -> Result>> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn load_async(value: &super::super::storage::streams::IRandomAccessStream) -> Result>> { >::get_activation_factory().load_async(value) - }} + } } DEFINE_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]) [CLSID_Printing3D3MFPackage]); DEFINE_IID!(IID_IPrinting3D3MFPackage2, 2522643140, 37835, 17456, 146, 184, 120, 156, 212, 84, 248, 131); @@ -263,26 +263,26 @@ RT_INTERFACE!{interface IPrinting3D3MFPackage2(IPrinting3D3MFPackage2Vtbl): IIns fn put_Compression(&self, value: Printing3DPackageCompression) -> HRESULT }} impl IPrinting3D3MFPackage2 { - #[inline] pub unsafe fn get_compression(&self) -> Result { + #[inline] pub fn get_compression(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Compression)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_compression(&self, value: Printing3DPackageCompression) -> Result<()> { + }} + #[inline] pub fn set_compression(&self, value: Printing3DPackageCompression) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Compression)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, value: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn LoadAsync(&self, value: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IPrinting3D3MFPackageStatics { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn load_async(&self, value: &super::super::storage::streams::IRandomAccessStream) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn load_async(&self, value: &super::super::storage::streams::IRandomAccessStream) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LoadAsync)(self 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_IPrinting3DBaseMaterial, 3505448771, 50444, 19403, 157, 4, 252, 22, 173, 206, 162, 201); RT_INTERFACE!{interface IPrinting3DBaseMaterial(IPrinting3DBaseMaterialVtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DBaseMaterial] { @@ -292,60 +292,60 @@ RT_INTERFACE!{interface IPrinting3DBaseMaterial(IPrinting3DBaseMaterialVtbl): II fn put_Color(&self, value: *mut Printing3DColorMaterial) -> HRESULT }} impl IPrinting3DBaseMaterial { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Name)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_color(&self) -> Result> { + }} + #[inline] pub fn get_color(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Color)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_color(&self, value: &Printing3DColorMaterial) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_color(&self, value: &Printing3DColorMaterial) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Color)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Printing3DBaseMaterial: IPrinting3DBaseMaterial} impl RtActivatable for Printing3DBaseMaterial {} impl RtActivatable for Printing3DBaseMaterial {} impl Printing3DBaseMaterial { - #[inline] pub fn get_abs() -> Result { unsafe { + #[inline] pub fn get_abs() -> Result { >::get_activation_factory().get_abs() - }} - #[inline] pub fn get_pla() -> Result { unsafe { + } + #[inline] pub fn get_pla() -> Result { >::get_activation_factory().get_pla() - }} + } } DEFINE_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]) [CLSID_Printing3DBaseMaterial]); 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Bases(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_MaterialGroupId(&self, out: *mut u32) -> HRESULT }} impl IPrinting3DBaseMaterialGroup { - #[inline] pub unsafe fn get_bases(&self) -> Result>> { + #[inline] pub fn get_bases(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Bases)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_material_group_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_material_group_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaterialGroupId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class Printing3DBaseMaterialGroup: IPrinting3DBaseMaterialGroup} impl RtActivatable for Printing3DBaseMaterialGroup {} impl Printing3DBaseMaterialGroup { - #[inline] pub fn create(materialGroupId: u32) -> Result> { unsafe { + #[inline] pub fn create(materialGroupId: u32) -> Result> { >::get_activation_factory().create(materialGroupId) - }} + } } DEFINE_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]) [CLSID_Printing3DBaseMaterialGroup]); DEFINE_IID!(IID_IPrinting3DBaseMaterialGroupFactory, 1544898268, 34455, 16787, 151, 107, 132, 187, 65, 22, 229, 191); @@ -353,11 +353,11 @@ RT_INTERFACE!{static interface IPrinting3DBaseMaterialGroupFactory(IPrinting3DBa fn Create(&self, materialGroupId: u32, out: *mut *mut Printing3DBaseMaterialGroup) -> HRESULT }} impl IPrinting3DBaseMaterialGroupFactory { - #[inline] pub unsafe fn create(&self, materialGroupId: u32) -> Result> { + #[inline] pub fn create(&self, materialGroupId: u32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, materialGroupId, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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] { @@ -365,16 +365,16 @@ RT_INTERFACE!{static interface IPrinting3DBaseMaterialStatics(IPrinting3DBaseMat fn get_Pla(&self, out: *mut HSTRING) -> HRESULT }} impl IPrinting3DBaseMaterialStatics { - #[inline] pub unsafe fn get_abs(&self) -> Result { + #[inline] pub fn get_abs(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Abs)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pla(&self) -> Result { + }} + #[inline] pub fn get_pla(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Pla)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_STRUCT! { struct Printing3DBufferDescription { Format: Printing3DBufferFormat, Stride: u32, @@ -388,15 +388,15 @@ RT_INTERFACE!{interface IPrinting3DColorMaterial(IPrinting3DColorMaterialVtbl): fn put_Value(&self, value: u32) -> HRESULT }} impl IPrinting3DColorMaterial { - #[inline] pub unsafe fn get_value(&self) -> Result { + #[inline] pub fn get_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_value(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_value(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Value)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Printing3DColorMaterial: IPrinting3DColorMaterial} impl RtActivatable for Printing3DColorMaterial {} @@ -407,39 +407,39 @@ RT_INTERFACE!{interface IPrinting3DColorMaterial2(IPrinting3DColorMaterial2Vtbl) #[cfg(feature="windows-ui")] fn put_Color(&self, value: super::super::ui::Color) -> HRESULT }} impl IPrinting3DColorMaterial2 { - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_color(&self) -> Result { + #[cfg(feature="windows-ui")] #[inline] pub fn get_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Color)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn set_color(&self, value: super::super::ui::Color) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_color(&self, value: super::super::ui::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Color)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Colors(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_MaterialGroupId(&self, out: *mut u32) -> HRESULT }} impl IPrinting3DColorMaterialGroup { - #[inline] pub unsafe fn get_colors(&self) -> Result>> { + #[inline] pub fn get_colors(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Colors)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_material_group_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_material_group_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaterialGroupId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class Printing3DColorMaterialGroup: IPrinting3DColorMaterialGroup} impl RtActivatable for Printing3DColorMaterialGroup {} impl Printing3DColorMaterialGroup { - #[inline] pub fn create(materialGroupId: u32) -> Result> { unsafe { + #[inline] pub fn create(materialGroupId: u32) -> Result> { >::get_activation_factory().create(materialGroupId) - }} + } } DEFINE_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]) [CLSID_Printing3DColorMaterialGroup]); DEFINE_IID!(IID_IPrinting3DColorMaterialGroupFactory, 1909689709, 45546, 19035, 188, 84, 25, 198, 95, 61, 240, 68); @@ -447,17 +447,17 @@ RT_INTERFACE!{static interface IPrinting3DColorMaterialGroupFactory(IPrinting3DC fn Create(&self, materialGroupId: u32, out: *mut *mut Printing3DColorMaterialGroup) -> HRESULT }} impl IPrinting3DColorMaterialGroupFactory { - #[inline] pub unsafe fn create(&self, materialGroupId: u32) -> Result> { + #[inline] pub fn create(&self, materialGroupId: u32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, materialGroupId, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut Printing3DMesh) -> HRESULT, fn put_Mesh(&self, value: *mut Printing3DMesh) -> HRESULT, - fn get_Components(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Components(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_Thumbnail(&self, out: *mut *mut Printing3DTextureResource) -> HRESULT, fn put_Thumbnail(&self, value: *mut Printing3DTextureResource) -> HRESULT, fn get_Type(&self, out: *mut Printing3DObjectType) -> HRESULT, @@ -468,56 +468,56 @@ RT_INTERFACE!{interface IPrinting3DComponent(IPrinting3DComponentVtbl): IInspect fn put_PartNumber(&self, value: HSTRING) -> HRESULT }} impl IPrinting3DComponent { - #[inline] pub unsafe fn get_mesh(&self) -> Result> { + #[inline] pub fn get_mesh(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Mesh)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_mesh(&self, value: &Printing3DMesh) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_mesh(&self, value: &Printing3DMesh) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Mesh)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_components(&self) -> Result>> { + }} + #[inline] pub fn get_components(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Components)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_thumbnail(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_thumbnail(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Thumbnail)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_thumbnail(&self, value: &Printing3DTextureResource) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_thumbnail(&self, value: &Printing3DTextureResource) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Thumbnail)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_type(&self) -> Result { + }} + #[inline] pub fn get_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Type)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_type(&self, value: Printing3DObjectType) -> Result<()> { + }} + #[inline] pub fn set_type(&self, value: Printing3DObjectType) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Type)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_name(&self) -> Result { + }} + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Name)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_part_number(&self) -> Result { + }} + #[inline] pub fn get_part_number(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PartNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_part_number(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_part_number(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PartNumber)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Printing3DComponent: IPrinting3DComponent} impl RtActivatable for Printing3DComponent {} @@ -526,75 +526,75 @@ DEFINE_IID!(IID_IPrinting3DComponentWithMatrix, 846852917, 3824, 17771, 154, 33, RT_INTERFACE!{interface IPrinting3DComponentWithMatrix(IPrinting3DComponentWithMatrixVtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DComponentWithMatrix] { fn get_Component(&self, out: *mut *mut Printing3DComponent) -> HRESULT, fn put_Component(&self, value: *mut Printing3DComponent) -> HRESULT, - fn get_Matrix(&self, out: *mut super::super::foundation::numerics::Matrix4x4) -> HRESULT, - fn put_Matrix(&self, value: super::super::foundation::numerics::Matrix4x4) -> HRESULT + fn get_Matrix(&self, out: *mut foundation::numerics::Matrix4x4) -> HRESULT, + fn put_Matrix(&self, value: foundation::numerics::Matrix4x4) -> HRESULT }} impl IPrinting3DComponentWithMatrix { - #[inline] pub unsafe fn get_component(&self) -> Result> { + #[inline] pub fn get_component(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Component)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_component(&self, value: &Printing3DComponent) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_component(&self, value: &Printing3DComponent) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Component)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_matrix(&self) -> Result { + }} + #[inline] pub fn get_matrix(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Matrix)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_matrix(&self, value: super::super::foundation::numerics::Matrix4x4) -> Result<()> { + }} + #[inline] pub fn set_matrix(&self, value: foundation::numerics::Matrix4x4) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Matrix)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Printing3DComponentWithMatrix: IPrinting3DComponentWithMatrix} impl RtActivatable for Printing3DComponentWithMatrix {} DEFINE_CLSID!(Printing3DComponentWithMatrix(&[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,110,101,110,116,87,105,116,104,77,97,116,114,105,120,0]) [CLSID_Printing3DComponentWithMatrix]); 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_Values(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IPrinting3DCompositeMaterial { - #[inline] pub unsafe fn get_values(&self) -> Result>> { + #[inline] pub fn get_values(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Values)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class Printing3DCompositeMaterial: IPrinting3DCompositeMaterial} impl RtActivatable for Printing3DCompositeMaterial {} DEFINE_CLSID!(Printing3DCompositeMaterial(&[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,0]) [CLSID_Printing3DCompositeMaterial]); 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Composites(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_MaterialGroupId(&self, out: *mut u32) -> HRESULT, - fn get_MaterialIndices(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_MaterialIndices(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IPrinting3DCompositeMaterialGroup { - #[inline] pub unsafe fn get_composites(&self) -> Result>> { + #[inline] pub fn get_composites(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Composites)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_material_group_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_material_group_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaterialGroupId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_material_indices(&self) -> Result>> { + }} + #[inline] pub fn get_material_indices(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaterialIndices)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class Printing3DCompositeMaterialGroup: IPrinting3DCompositeMaterialGroup} impl RtActivatable for Printing3DCompositeMaterialGroup {} impl Printing3DCompositeMaterialGroup { - #[inline] pub fn create(materialGroupId: u32) -> Result> { unsafe { + #[inline] pub fn create(materialGroupId: u32) -> Result> { >::get_activation_factory().create(materialGroupId) - }} + } } DEFINE_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]) [CLSID_Printing3DCompositeMaterialGroup]); DEFINE_IID!(IID_IPrinting3DCompositeMaterialGroup2, 115895650, 32059, 16865, 148, 76, 186, 253, 228, 85, 84, 131); @@ -603,26 +603,26 @@ RT_INTERFACE!{interface IPrinting3DCompositeMaterialGroup2(IPrinting3DCompositeM fn put_BaseMaterialGroup(&self, value: *mut Printing3DBaseMaterialGroup) -> HRESULT }} impl IPrinting3DCompositeMaterialGroup2 { - #[inline] pub unsafe fn get_base_material_group(&self) -> Result> { + #[inline] pub fn get_base_material_group(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BaseMaterialGroup)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_base_material_group(&self, value: &Printing3DBaseMaterialGroup) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_base_material_group(&self, value: &Printing3DBaseMaterialGroup) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BaseMaterialGroup)(self as *const _ as *mut _, 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(&self, materialGroupId: u32, out: *mut *mut Printing3DCompositeMaterialGroup) -> HRESULT }} impl IPrinting3DCompositeMaterialGroupFactory { - #[inline] pub unsafe fn create(&self, materialGroupId: u32) -> Result> { + #[inline] pub fn create(&self, materialGroupId: u32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, materialGroupId, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IPrinting3DFaceReductionOptions, 3154039703, 11636, 18167, 190, 133, 153, 166, 123, 187, 102, 41); RT_INTERFACE!{interface IPrinting3DFaceReductionOptions(IPrinting3DFaceReductionOptionsVtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DFaceReductionOptions] { @@ -634,71 +634,71 @@ RT_INTERFACE!{interface IPrinting3DFaceReductionOptions(IPrinting3DFaceReduction fn put_MaxEdgeLength(&self, value: f64) -> HRESULT }} impl IPrinting3DFaceReductionOptions { - #[inline] pub unsafe fn get_max_reduction_area(&self) -> Result { + #[inline] pub fn get_max_reduction_area(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxReductionArea)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_reduction_area(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_max_reduction_area(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxReductionArea)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_target_triangle_count(&self) -> Result { + }} + #[inline] pub fn get_target_triangle_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TargetTriangleCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_target_triangle_count(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_target_triangle_count(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TargetTriangleCount)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_edge_length(&self) -> Result { + }} + #[inline] pub fn get_max_edge_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxEdgeLength)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_edge_length(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_max_edge_length(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxEdgeLength)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Printing3DFaceReductionOptions: IPrinting3DFaceReductionOptions} impl RtActivatable for Printing3DFaceReductionOptions {} DEFINE_CLSID!(Printing3DFaceReductionOptions(&[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,70,97,99,101,82,101,100,117,99,116,105,111,110,79,112,116,105,111,110,115,0]) [CLSID_Printing3DFaceReductionOptions]); 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_ColorGroups(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_Texture2CoordGroups(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_CompositeGroups(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_MultiplePropertyGroups(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_BaseGroups(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_ColorGroups(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_Texture2CoordGroups(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_CompositeGroups(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_MultiplePropertyGroups(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IPrinting3DMaterial { - #[inline] pub unsafe fn get_base_groups(&self) -> Result>> { + #[inline] pub fn get_base_groups(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BaseGroups)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_color_groups(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_color_groups(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ColorGroups)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_texture2_coord_groups(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_texture2_coord_groups(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Texture2CoordGroups)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_composite_groups(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_composite_groups(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CompositeGroups)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_multiple_property_groups(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_multiple_property_groups(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MultiplePropertyGroups)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class Printing3DMaterial: IPrinting3DMaterial} impl RtActivatable for Printing3DMaterial {} @@ -729,116 +729,116 @@ RT_INTERFACE!{interface IPrinting3DMesh(IPrinting3DMeshVtbl): IInspectable(IInsp #[cfg(not(feature="windows-storage"))] fn __Dummy18(&self) -> (), #[cfg(feature="windows-storage")] fn GetTriangleMaterialIndices(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, fn CreateTriangleMaterialIndices(&self, value: u32) -> HRESULT, - fn get_BufferDescriptionSet(&self, out: *mut *mut super::super::foundation::collections::IPropertySet) -> HRESULT, - fn get_BufferSet(&self, out: *mut *mut super::super::foundation::collections::IPropertySet) -> HRESULT, - fn VerifyAsync(&self, value: Printing3DMeshVerificationMode, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn get_BufferDescriptionSet(&self, out: *mut *mut foundation::collections::IPropertySet) -> HRESULT, + fn get_BufferSet(&self, out: *mut *mut foundation::collections::IPropertySet) -> HRESULT, + fn VerifyAsync(&self, value: Printing3DMeshVerificationMode, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IPrinting3DMesh { - #[inline] pub unsafe fn get_vertex_count(&self) -> Result { + #[inline] pub fn get_vertex_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VertexCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_vertex_count(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_vertex_count(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_VertexCount)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_index_count(&self) -> Result { + }} + #[inline] pub fn get_index_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IndexCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_index_count(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_index_count(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IndexCount)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_vertex_positions_description(&self) -> Result { + }} + #[inline] pub fn get_vertex_positions_description(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VertexPositionsDescription)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_vertex_positions_description(&self, value: Printing3DBufferDescription) -> Result<()> { + }} + #[inline] pub fn set_vertex_positions_description(&self, value: Printing3DBufferDescription) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_VertexPositionsDescription)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_vertex_normals_description(&self) -> Result { + }} + #[inline] pub fn get_vertex_normals_description(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VertexNormalsDescription)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_vertex_normals_description(&self, value: Printing3DBufferDescription) -> Result<()> { + }} + #[inline] pub fn set_vertex_normals_description(&self, value: Printing3DBufferDescription) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_VertexNormalsDescription)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_triangle_indices_description(&self) -> Result { + }} + #[inline] pub fn get_triangle_indices_description(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TriangleIndicesDescription)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_triangle_indices_description(&self, value: Printing3DBufferDescription) -> Result<()> { + }} + #[inline] pub fn set_triangle_indices_description(&self, value: Printing3DBufferDescription) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TriangleIndicesDescription)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_triangle_material_indices_description(&self) -> Result { + }} + #[inline] pub fn get_triangle_material_indices_description(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TriangleMaterialIndicesDescription)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_triangle_material_indices_description(&self, value: Printing3DBufferDescription) -> Result<()> { + }} + #[inline] pub fn set_triangle_material_indices_description(&self, value: Printing3DBufferDescription) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TriangleMaterialIndicesDescription)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_vertex_positions(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_vertex_positions(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetVertexPositions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_vertex_positions(&self, value: u32) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_vertex_positions(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).CreateVertexPositions)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_vertex_normals(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_vertex_normals(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetVertexNormals)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_vertex_normals(&self, value: u32) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_vertex_normals(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).CreateVertexNormals)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_triangle_indices(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_triangle_indices(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetTriangleIndices)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_triangle_indices(&self, value: u32) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_triangle_indices(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).CreateTriangleIndices)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_triangle_material_indices(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_triangle_material_indices(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetTriangleMaterialIndices)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_triangle_material_indices(&self, value: u32) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_triangle_material_indices(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).CreateTriangleMaterialIndices)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_buffer_description_set(&self) -> Result> { + }} + #[inline] pub fn get_buffer_description_set(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BufferDescriptionSet)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_buffer_set(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_buffer_set(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BufferSet)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn verify_async(&self, value: Printing3DMeshVerificationMode) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn verify_async(&self, value: Printing3DMeshVerificationMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).VerifyAsync)(self as *const _ as *mut _, value, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class Printing3DMesh: IPrinting3DMesh} impl RtActivatable for Printing3DMesh {} @@ -849,161 +849,161 @@ RT_ENUM! { enum Printing3DMeshVerificationMode: i32 { 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(&self, out: *mut bool) -> HRESULT, - fn get_NonmanifoldTriangles(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_ReversedNormalTriangles(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_NonmanifoldTriangles(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_ReversedNormalTriangles(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IPrinting3DMeshVerificationResult { - #[inline] pub unsafe fn get_is_valid(&self) -> Result { + #[inline] pub fn get_is_valid(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsValid)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_nonmanifold_triangles(&self) -> Result>> { + }} + #[inline] pub fn get_nonmanifold_triangles(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NonmanifoldTriangles)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_reversed_normal_triangles(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_reversed_normal_triangles(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ReversedNormalTriangles)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class Printing3DMeshVerificationResult: IPrinting3DMeshVerificationResult} 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(&self, out: *mut Printing3DModelUnit) -> HRESULT, fn put_Unit(&self, value: Printing3DModelUnit) -> HRESULT, - fn get_Textures(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_Meshes(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_Components(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Textures(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_Meshes(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_Components(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_Material(&self, out: *mut *mut Printing3DMaterial) -> HRESULT, fn put_Material(&self, value: *mut Printing3DMaterial) -> HRESULT, fn get_Build(&self, out: *mut *mut Printing3DComponent) -> HRESULT, fn put_Build(&self, value: *mut Printing3DComponent) -> HRESULT, fn get_Version(&self, out: *mut HSTRING) -> HRESULT, fn put_Version(&self, value: HSTRING) -> HRESULT, - fn get_RequiredExtensions(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_Metadata(&self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, - fn RepairAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn get_RequiredExtensions(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_Metadata(&self, out: *mut *mut foundation::collections::IMap) -> HRESULT, + fn RepairAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn Clone(&self, out: *mut *mut Printing3DModel) -> HRESULT }} impl IPrinting3DModel { - #[inline] pub unsafe fn get_unit(&self) -> Result { + #[inline] pub fn get_unit(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Unit)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_unit(&self, value: Printing3DModelUnit) -> Result<()> { + }} + #[inline] pub fn set_unit(&self, value: Printing3DModelUnit) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Unit)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_textures(&self) -> Result>> { + }} + #[inline] pub fn get_textures(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Textures)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_meshes(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_meshes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Meshes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_components(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_components(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Components)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_material(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_material(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Material)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_material(&self, value: &Printing3DMaterial) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_material(&self, value: &Printing3DMaterial) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Material)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_build(&self) -> Result> { + }} + #[inline] pub fn get_build(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Build)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_build(&self, value: &Printing3DComponent) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_build(&self, value: &Printing3DComponent) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Build)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_version(&self) -> Result { + }} + #[inline] pub fn get_version(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Version)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_version(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_version(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Version)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_required_extensions(&self) -> Result>> { + }} + #[inline] pub fn get_required_extensions(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RequiredExtensions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_metadata(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_metadata(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Metadata)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn repair_async(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn repair_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RepairAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn clone(&self) -> Result> { + }} + #[inline] pub fn clone(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Clone)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class Printing3DModel: IPrinting3DModel} impl RtActivatable for Printing3DModel {} DEFINE_CLSID!(Printing3DModel(&[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,111,100,101,108,0]) [CLSID_Printing3DModel]); 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryPartialRepairWithTimeAsync(&self, maxWaitTime: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryReduceFacesAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, - fn TryReduceFacesWithOptionsAsync(&self, printing3DFaceReductionOptions: *mut Printing3DFaceReductionOptions, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, - fn TryReduceFacesWithOptionsAndTimeAsync(&self, printing3DFaceReductionOptions: *mut Printing3DFaceReductionOptions, maxWait: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, - fn RepairWithProgressAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT + fn TryPartialRepairAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryPartialRepairWithTimeAsync(&self, maxWaitTime: foundation::TimeSpan, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryReduceFacesAsync(&self, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + fn TryReduceFacesWithOptionsAsync(&self, printing3DFaceReductionOptions: *mut Printing3DFaceReductionOptions, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + fn TryReduceFacesWithOptionsAndTimeAsync(&self, printing3DFaceReductionOptions: *mut Printing3DFaceReductionOptions, maxWait: foundation::TimeSpan, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + fn RepairWithProgressAsync(&self, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT }} impl IPrinting3DModel2 { - #[inline] pub unsafe fn try_partial_repair_async(&self) -> Result>> { + #[inline] pub fn try_partial_repair_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryPartialRepairAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_partial_repair_with_time_async(&self, maxWaitTime: super::super::foundation::TimeSpan) -> Result>> { + }} + #[inline] pub fn try_partial_repair_with_time_async(&self, maxWaitTime: foundation::TimeSpan) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryPartialRepairWithTimeAsync)(self as *const _ as *mut _, maxWaitTime, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_reduce_faces_async(&self) -> Result>> { + }} + #[inline] pub fn try_reduce_faces_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryReduceFacesAsync)(self 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_async(&self, printing3DFaceReductionOptions: &Printing3DFaceReductionOptions) -> Result>> { + }} + #[inline] pub fn try_reduce_faces_with_options_async(&self, printing3DFaceReductionOptions: &Printing3DFaceReductionOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryReduceFacesWithOptionsAsync)(self as *const _ as *mut _, 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(&self, printing3DFaceReductionOptions: &Printing3DFaceReductionOptions, maxWait: super::super::foundation::TimeSpan) -> Result>> { + }} + #[inline] pub fn try_reduce_faces_with_options_and_time_async(&self, printing3DFaceReductionOptions: &Printing3DFaceReductionOptions, maxWait: foundation::TimeSpan) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryReduceFacesWithOptionsAndTimeAsync)(self as *const _ as *mut _, 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(&self) -> Result>> { + }} + #[inline] pub fn repair_with_progress_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RepairWithProgressAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IPrinting3DModelTexture, 1571802881, 46493, 18492, 151, 187, 164, 213, 70, 209, 199, 92); RT_INTERFACE!{interface IPrinting3DModelTexture(IPrinting3DModelTextureVtbl): IInspectable(IInspectableVtbl) [IID_IPrinting3DModelTexture] { @@ -1015,33 +1015,33 @@ RT_INTERFACE!{interface IPrinting3DModelTexture(IPrinting3DModelTextureVtbl): II fn put_TileStyleV(&self, value: Printing3DTextureEdgeBehavior) -> HRESULT }} impl IPrinting3DModelTexture { - #[inline] pub unsafe fn get_texture_resource(&self) -> Result> { + #[inline] pub fn get_texture_resource(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TextureResource)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_texture_resource(&self, value: &Printing3DTextureResource) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_texture_resource(&self, value: &Printing3DTextureResource) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TextureResource)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_tile_style_u(&self) -> Result { + }} + #[inline] pub fn get_tile_style_u(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TileStyleU)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_tile_style_u(&self, value: Printing3DTextureEdgeBehavior) -> Result<()> { + }} + #[inline] pub fn set_tile_style_u(&self, value: Printing3DTextureEdgeBehavior) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TileStyleU)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_tile_style_v(&self) -> Result { + }} + #[inline] pub fn get_tile_style_v(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TileStyleV)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_tile_style_v(&self, value: Printing3DTextureEdgeBehavior) -> Result<()> { + }} + #[inline] pub fn set_tile_style_v(&self, value: Printing3DTextureEdgeBehavior) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TileStyleV)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Printing3DModelTexture: IPrinting3DModelTexture} impl RtActivatable for Printing3DModelTexture {} @@ -1051,47 +1051,47 @@ RT_ENUM! { enum Printing3DModelUnit: i32 { }} 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_MaterialIndices(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IPrinting3DMultiplePropertyMaterial { - #[inline] pub unsafe fn get_material_indices(&self) -> Result>> { + #[inline] pub fn get_material_indices(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaterialIndices)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class Printing3DMultiplePropertyMaterial: IPrinting3DMultiplePropertyMaterial} impl RtActivatable for Printing3DMultiplePropertyMaterial {} DEFINE_CLSID!(Printing3DMultiplePropertyMaterial(&[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,0]) [CLSID_Printing3DMultiplePropertyMaterial]); 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_MaterialGroupIndices(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_MultipleProperties(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_MaterialGroupIndices(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_MaterialGroupId(&self, out: *mut u32) -> HRESULT }} impl IPrinting3DMultiplePropertyMaterialGroup { - #[inline] pub unsafe fn get_multiple_properties(&self) -> Result>> { + #[inline] pub fn get_multiple_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MultipleProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_material_group_indices(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_material_group_indices(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaterialGroupIndices)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_material_group_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_material_group_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaterialGroupId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class Printing3DMultiplePropertyMaterialGroup: IPrinting3DMultiplePropertyMaterialGroup} impl RtActivatable for Printing3DMultiplePropertyMaterialGroup {} impl Printing3DMultiplePropertyMaterialGroup { - #[inline] pub fn create(materialGroupId: u32) -> Result> { unsafe { + #[inline] pub fn create(materialGroupId: u32) -> Result> { >::get_activation_factory().create(materialGroupId) - }} + } } DEFINE_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]) [CLSID_Printing3DMultiplePropertyMaterialGroup]); DEFINE_IID!(IID_IPrinting3DMultiplePropertyMaterialGroupFactory, 842930542, 54470, 17694, 168, 20, 77, 120, 162, 16, 254, 83); @@ -1099,11 +1099,11 @@ RT_INTERFACE!{static interface IPrinting3DMultiplePropertyMaterialGroupFactory(I fn Create(&self, materialGroupId: u32, out: *mut *mut Printing3DMultiplePropertyMaterialGroup) -> HRESULT }} impl IPrinting3DMultiplePropertyMaterialGroupFactory { - #[inline] pub unsafe fn create(&self, materialGroupId: u32) -> Result> { + #[inline] pub fn create(&self, materialGroupId: u32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, materialGroupId, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum Printing3DObjectType: i32 { Model (Printing3DObjectType_Model) = 0, Support (Printing3DObjectType_Support) = 1, Others (Printing3DObjectType_Others) = 2, @@ -1121,60 +1121,60 @@ RT_INTERFACE!{interface IPrinting3DTexture2CoordMaterial(IPrinting3DTexture2Coor fn put_V(&self, value: f64) -> HRESULT }} impl IPrinting3DTexture2CoordMaterial { - #[inline] pub unsafe fn get_texture(&self) -> Result> { + #[inline] pub fn get_texture(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Texture)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_texture(&self, value: &Printing3DModelTexture) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_texture(&self, value: &Printing3DModelTexture) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Texture)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_u(&self) -> Result { + }} + #[inline] pub fn get_u(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_U)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_u(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_u(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_U)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_v(&self) -> Result { + }} + #[inline] pub fn get_v(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_V)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_v(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_v(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_V)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Printing3DTexture2CoordMaterial: IPrinting3DTexture2CoordMaterial} impl RtActivatable for Printing3DTexture2CoordMaterial {} DEFINE_CLSID!(Printing3DTexture2CoordMaterial(&[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,0]) [CLSID_Printing3DTexture2CoordMaterial]); 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Texture2Coords(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_MaterialGroupId(&self, out: *mut u32) -> HRESULT }} impl IPrinting3DTexture2CoordMaterialGroup { - #[inline] pub unsafe fn get_texture2_coords(&self) -> Result>> { + #[inline] pub fn get_texture2_coords(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Texture2Coords)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_material_group_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_material_group_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaterialGroupId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class Printing3DTexture2CoordMaterialGroup: IPrinting3DTexture2CoordMaterialGroup} impl RtActivatable for Printing3DTexture2CoordMaterialGroup {} impl Printing3DTexture2CoordMaterialGroup { - #[inline] pub fn create(materialGroupId: u32) -> Result> { unsafe { + #[inline] pub fn create(materialGroupId: u32) -> Result> { >::get_activation_factory().create(materialGroupId) - }} + } } DEFINE_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]) [CLSID_Printing3DTexture2CoordMaterialGroup]); DEFINE_IID!(IID_IPrinting3DTexture2CoordMaterialGroup2, 1778113466, 45358, 17051, 131, 134, 223, 82, 132, 246, 232, 15); @@ -1183,26 +1183,26 @@ RT_INTERFACE!{interface IPrinting3DTexture2CoordMaterialGroup2(IPrinting3DTextur fn put_Texture(&self, value: *mut Printing3DModelTexture) -> HRESULT }} impl IPrinting3DTexture2CoordMaterialGroup2 { - #[inline] pub unsafe fn get_texture(&self) -> Result> { + #[inline] pub fn get_texture(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Texture)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_texture(&self, value: &Printing3DModelTexture) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_texture(&self, value: &Printing3DModelTexture) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Texture)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } 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(&self, materialGroupId: u32, out: *mut *mut Printing3DTexture2CoordMaterialGroup) -> HRESULT }} impl IPrinting3DTexture2CoordMaterialGroupFactory { - #[inline] pub unsafe fn create(&self, materialGroupId: u32) -> Result> { + #[inline] pub fn create(&self, materialGroupId: u32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, materialGroupId, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum Printing3DTextureEdgeBehavior: i32 { None (Printing3DTextureEdgeBehavior_None) = 0, Wrap (Printing3DTextureEdgeBehavior_Wrap) = 1, Mirror (Printing3DTextureEdgeBehavior_Mirror) = 2, Clamp (Printing3DTextureEdgeBehavior_Clamp) = 3, @@ -1217,24 +1217,24 @@ RT_INTERFACE!{interface IPrinting3DTextureResource(IPrinting3DTextureResourceVtb fn put_Name(&self, value: HSTRING) -> HRESULT }} impl IPrinting3DTextureResource { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_texture_data(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_texture_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TextureData)(self 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_texture_data(&self, value: &super::super::storage::streams::IRandomAccessStreamWithContentType) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_texture_data(&self, value: &super::super::storage::streams::IRandomAccessStreamWithContentType) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TextureData)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_name(&self) -> Result { + }} + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Name)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Printing3DTextureResource: IPrinting3DTextureResource} impl RtActivatable for Printing3DTextureResource {} @@ -1252,114 +1252,114 @@ RT_INTERFACE!{interface IBrightnessOverride(IBrightnessOverrideVtbl): IInspectab fn GetLevelForScenario(&self, scenario: DisplayBrightnessScenario, out: *mut f64) -> HRESULT, fn StartOverride(&self) -> HRESULT, fn StopOverride(&self) -> HRESULT, - fn add_IsSupportedChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_IsSupportedChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_IsOverrideActiveChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_IsOverrideActiveChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_BrightnessLevelChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_BrightnessLevelChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_IsSupportedChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_IsSupportedChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_IsOverrideActiveChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_IsOverrideActiveChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_BrightnessLevelChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_BrightnessLevelChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IBrightnessOverride { - #[inline] pub unsafe fn get_is_supported(&self) -> Result { + #[inline] pub fn get_is_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_override_active(&self) -> Result { + }} + #[inline] pub fn get_is_override_active(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsOverrideActive)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_brightness_level(&self) -> Result { + }} + #[inline] pub fn get_brightness_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BrightnessLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_brightness_level(&self, brightnessLevel: f64, options: DisplayBrightnessOverrideOptions) -> Result<()> { + }} + #[inline] pub fn set_brightness_level(&self, brightnessLevel: f64, options: DisplayBrightnessOverrideOptions) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetBrightnessLevel)(self as *const _ as *mut _, brightnessLevel, options); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_brightness_scenario(&self, scenario: DisplayBrightnessScenario, options: DisplayBrightnessOverrideOptions) -> Result<()> { + }} + #[inline] pub fn set_brightness_scenario(&self, scenario: DisplayBrightnessScenario, options: DisplayBrightnessOverrideOptions) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetBrightnessScenario)(self as *const _ as *mut _, scenario, options); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_level_for_scenario(&self, scenario: DisplayBrightnessScenario) -> Result { + }} + #[inline] pub fn get_level_for_scenario(&self, scenario: DisplayBrightnessScenario) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetLevelForScenario)(self as *const _ as *mut _, scenario, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn start_override(&self) -> Result<()> { + }} + #[inline] pub fn start_override(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StartOverride)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop_override(&self) -> Result<()> { + }} + #[inline] pub fn stop_override(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StopOverride)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_is_supported_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_is_supported_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_IsSupportedChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_is_supported_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_is_supported_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_IsSupportedChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_is_override_active_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_is_override_active_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_IsOverrideActiveChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_is_override_active_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_is_override_active_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_IsOverrideActiveChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_brightness_level_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_brightness_level_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_BrightnessLevelChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_brightness_level_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_brightness_level_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_BrightnessLevelChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class BrightnessOverride: IBrightnessOverride} impl RtActivatable for BrightnessOverride {} impl BrightnessOverride { - #[inline] pub fn get_default_for_system() -> Result> { unsafe { + #[inline] pub fn get_default_for_system() -> Result>> { >::get_activation_factory().get_default_for_system() - }} - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + } + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} - #[inline] pub fn save_for_system_async(value: &BrightnessOverride) -> Result>> { unsafe { + } + #[inline] pub fn save_for_system_async(value: &BrightnessOverride) -> Result>> { >::get_activation_factory().save_for_system_async(value) - }} + } } DEFINE_CLSID!(BrightnessOverride(&[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,66,114,105,103,104,116,110,101,115,115,79,118,101,114,114,105,100,101,0]) [CLSID_BrightnessOverride]); DEFINE_IID!(IID_IBrightnessOverrideStatics, 61323757, 57841, 19048, 161, 31, 148, 106, 216, 206, 83, 147); RT_INTERFACE!{static interface IBrightnessOverrideStatics(IBrightnessOverrideStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBrightnessOverrideStatics] { fn GetDefaultForSystem(&self, out: *mut *mut BrightnessOverride) -> HRESULT, fn GetForCurrentView(&self, out: *mut *mut BrightnessOverride) -> HRESULT, - fn SaveForSystemAsync(&self, value: *mut BrightnessOverride, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn SaveForSystemAsync(&self, value: *mut BrightnessOverride, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IBrightnessOverrideStatics { - #[inline] pub unsafe fn get_default_for_system(&self) -> Result> { + #[inline] pub fn get_default_for_system(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefaultForSystem)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn save_for_system_async(&self, value: &BrightnessOverride) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn save_for_system_async(&self, value: &BrightnessOverride) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveForSystemAsync)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum DisplayBrightnessOverrideOptions: u32 { None (DisplayBrightnessOverrideOptions_None) = 0, UseDimmedPolicyWhenBatteryIsLow (DisplayBrightnessOverrideOptions_UseDimmedPolicyWhenBatteryIsLow) = 1, @@ -1371,118 +1371,118 @@ DEFINE_IID!(IID_IDisplayInformation, 3201372846, 44483, 19913, 174, 101, 133, 31 RT_INTERFACE!{interface IDisplayInformation(IDisplayInformationVtbl): IInspectable(IInspectableVtbl) [IID_IDisplayInformation] { fn get_CurrentOrientation(&self, out: *mut DisplayOrientations) -> HRESULT, fn get_NativeOrientation(&self, out: *mut DisplayOrientations) -> HRESULT, - fn add_OrientationChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_OrientationChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_OrientationChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_OrientationChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_ResolutionScale(&self, out: *mut ResolutionScale) -> HRESULT, fn get_LogicalDpi(&self, out: *mut f32) -> HRESULT, fn get_RawDpiX(&self, out: *mut f32) -> HRESULT, fn get_RawDpiY(&self, out: *mut f32) -> HRESULT, - fn add_DpiChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DpiChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_DpiChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DpiChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_StereoEnabled(&self, out: *mut bool) -> HRESULT, - fn add_StereoEnabledChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StereoEnabledChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_StereoEnabledChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StereoEnabledChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy13(&self) -> (), - #[cfg(feature="windows-storage")] fn GetColorProfileAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_ColorProfileChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ColorProfileChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + #[cfg(feature="windows-storage")] fn GetColorProfileAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_ColorProfileChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ColorProfileChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IDisplayInformation { - #[inline] pub unsafe fn get_current_orientation(&self) -> Result { + #[inline] pub fn get_current_orientation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CurrentOrientation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_native_orientation(&self) -> Result { + }} + #[inline] pub fn get_native_orientation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NativeOrientation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_orientation_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_orientation_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_OrientationChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_orientation_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_orientation_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_OrientationChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_resolution_scale(&self) -> Result { + }} + #[inline] pub fn get_resolution_scale(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ResolutionScale)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_logical_dpi(&self) -> Result { + }} + #[inline] pub fn get_logical_dpi(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LogicalDpi)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_raw_dpi_x(&self) -> Result { + }} + #[inline] pub fn get_raw_dpi_x(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RawDpiX)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_raw_dpi_y(&self) -> Result { + }} + #[inline] pub fn get_raw_dpi_y(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RawDpiY)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_dpi_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_dpi_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DpiChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_dpi_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_dpi_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DpiChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_stereo_enabled(&self) -> Result { + }} + #[inline] pub fn get_stereo_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StereoEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_stereo_enabled_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_stereo_enabled_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StereoEnabledChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_stereo_enabled_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_stereo_enabled_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StereoEnabledChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_color_profile_async(&self) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_color_profile_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetColorProfileAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_color_profile_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_color_profile_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ColorProfileChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_color_profile_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_color_profile_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ColorProfileChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DisplayInformation: IDisplayInformation} impl RtActivatable for DisplayInformation {} impl DisplayInformation { - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} - #[inline] pub fn get_auto_rotation_preferences() -> Result { unsafe { + } + #[inline] pub fn get_auto_rotation_preferences() -> Result { >::get_activation_factory().get_auto_rotation_preferences() - }} - #[inline] pub fn set_auto_rotation_preferences(value: DisplayOrientations) -> Result<()> { unsafe { + } + #[inline] pub fn set_auto_rotation_preferences(value: DisplayOrientations) -> Result<()> { >::get_activation_factory().set_auto_rotation_preferences(value) - }} - #[inline] pub fn add_display_contents_invalidated(handler: &super::super::foundation::TypedEventHandler) -> Result { unsafe { + } + #[inline] pub fn add_display_contents_invalidated(handler: &foundation::TypedEventHandler) -> Result { >::get_activation_factory().add_display_contents_invalidated(handler) - }} - #[inline] pub fn remove_display_contents_invalidated(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_display_contents_invalidated(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_display_contents_invalidated(token) - }} + } } DEFINE_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]) [CLSID_DisplayInformation]); DEFINE_IID!(IID_IDisplayInformation2, 1305280545, 64209, 19342, 142, 223, 119, 88, 135, 184, 191, 25); @@ -1490,22 +1490,22 @@ RT_INTERFACE!{interface IDisplayInformation2(IDisplayInformation2Vtbl): IInspect fn get_RawPixelsPerViewPixel(&self, out: *mut f64) -> HRESULT }} impl IDisplayInformation2 { - #[inline] pub unsafe fn get_raw_pixels_per_view_pixel(&self) -> Result { + #[inline] pub fn get_raw_pixels_per_view_pixel(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RawPixelsPerViewPixel)(self as *const _ as *mut _, &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(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn get_DiagonalSizeInInches(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IDisplayInformation3 { - #[inline] pub unsafe fn get_diagonal_size_in_inches(&self) -> Result>> { + #[inline] pub fn get_diagonal_size_in_inches(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DiagonalSizeInInches)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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] { @@ -1513,49 +1513,49 @@ RT_INTERFACE!{interface IDisplayInformation4(IDisplayInformation4Vtbl): IInspect fn get_ScreenHeightInRawPixels(&self, out: *mut u32) -> HRESULT }} impl IDisplayInformation4 { - #[inline] pub unsafe fn get_screen_width_in_raw_pixels(&self) -> Result { + #[inline] pub fn get_screen_width_in_raw_pixels(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ScreenWidthInRawPixels)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_screen_height_in_raw_pixels(&self) -> Result { + }} + #[inline] pub fn get_screen_height_in_raw_pixels(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ScreenHeightInRawPixels)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut DisplayInformation) -> HRESULT, fn get_AutoRotationPreferences(&self, out: *mut DisplayOrientations) -> HRESULT, fn put_AutoRotationPreferences(&self, value: DisplayOrientations) -> HRESULT, - fn add_DisplayContentsInvalidated(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DisplayContentsInvalidated(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_DisplayContentsInvalidated(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DisplayContentsInvalidated(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IDisplayInformationStatics { - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_auto_rotation_preferences(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_auto_rotation_preferences(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AutoRotationPreferences)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_auto_rotation_preferences(&self, value: DisplayOrientations) -> Result<()> { + }} + #[inline] pub fn set_auto_rotation_preferences(&self, value: DisplayOrientations) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AutoRotationPreferences)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_display_contents_invalidated(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_display_contents_invalidated(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DisplayContentsInvalidated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_display_contents_invalidated(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_display_contents_invalidated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DisplayContentsInvalidated)(self as *const _ as *mut _, token); 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, @@ -1563,60 +1563,60 @@ RT_ENUM! { enum DisplayOrientations: u32 { RT_CLASS!{static class DisplayProperties} impl RtActivatable for DisplayProperties {} impl DisplayProperties { - #[inline] pub fn get_current_orientation() -> Result { unsafe { + #[inline] pub fn get_current_orientation() -> Result { >::get_activation_factory().get_current_orientation() - }} - #[inline] pub fn get_native_orientation() -> Result { unsafe { + } + #[inline] pub fn get_native_orientation() -> Result { >::get_activation_factory().get_native_orientation() - }} - #[inline] pub fn get_auto_rotation_preferences() -> Result { unsafe { + } + #[inline] pub fn get_auto_rotation_preferences() -> Result { >::get_activation_factory().get_auto_rotation_preferences() - }} - #[inline] pub fn set_auto_rotation_preferences(value: DisplayOrientations) -> Result<()> { unsafe { + } + #[inline] pub fn set_auto_rotation_preferences(value: DisplayOrientations) -> Result<()> { >::get_activation_factory().set_auto_rotation_preferences(value) - }} - #[inline] pub fn add_orientation_changed(handler: &DisplayPropertiesEventHandler) -> Result { unsafe { + } + #[inline] pub fn add_orientation_changed(handler: &DisplayPropertiesEventHandler) -> Result { >::get_activation_factory().add_orientation_changed(handler) - }} - #[inline] pub fn remove_orientation_changed(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_orientation_changed(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_orientation_changed(token) - }} - #[inline] pub fn get_resolution_scale() -> Result { unsafe { + } + #[inline] pub fn get_resolution_scale() -> Result { >::get_activation_factory().get_resolution_scale() - }} - #[inline] pub fn get_logical_dpi() -> Result { unsafe { + } + #[inline] pub fn get_logical_dpi() -> Result { >::get_activation_factory().get_logical_dpi() - }} - #[inline] pub fn add_logical_dpi_changed(handler: &DisplayPropertiesEventHandler) -> Result { unsafe { + } + #[inline] pub fn add_logical_dpi_changed(handler: &DisplayPropertiesEventHandler) -> Result { >::get_activation_factory().add_logical_dpi_changed(handler) - }} - #[inline] pub fn remove_logical_dpi_changed(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_logical_dpi_changed(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_logical_dpi_changed(token) - }} - #[inline] pub fn get_stereo_enabled() -> Result { unsafe { + } + #[inline] pub fn get_stereo_enabled() -> Result { >::get_activation_factory().get_stereo_enabled() - }} - #[inline] pub fn add_stereo_enabled_changed(handler: &DisplayPropertiesEventHandler) -> Result { unsafe { + } + #[inline] pub fn add_stereo_enabled_changed(handler: &DisplayPropertiesEventHandler) -> Result { >::get_activation_factory().add_stereo_enabled_changed(handler) - }} - #[inline] pub fn remove_stereo_enabled_changed(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_stereo_enabled_changed(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_stereo_enabled_changed(token) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn get_color_profile_async() -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn get_color_profile_async() -> Result>> { >::get_activation_factory().get_color_profile_async() - }} - #[inline] pub fn add_color_profile_changed(handler: &DisplayPropertiesEventHandler) -> Result { unsafe { + } + #[inline] pub fn add_color_profile_changed(handler: &DisplayPropertiesEventHandler) -> Result { >::get_activation_factory().add_color_profile_changed(handler) - }} - #[inline] pub fn remove_color_profile_changed(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_color_profile_changed(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_color_profile_changed(token) - }} - #[inline] pub fn add_display_contents_invalidated(handler: &DisplayPropertiesEventHandler) -> Result { unsafe { + } + #[inline] pub fn add_display_contents_invalidated(handler: &DisplayPropertiesEventHandler) -> Result { >::get_activation_factory().add_display_contents_invalidated(handler) - }} - #[inline] pub fn remove_display_contents_invalidated(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_display_contents_invalidated(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_display_contents_invalidated(token) - }} + } } DEFINE_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]) [CLSID_DisplayProperties]); DEFINE_IID!(IID_DisplayPropertiesEventHandler, 3688729345, 61857, 18129, 158, 227, 84, 59, 204, 153, 89, 128); @@ -1624,10 +1624,10 @@ RT_DELEGATE!{delegate DisplayPropertiesEventHandler(DisplayPropertiesEventHandle fn Invoke(&self, sender: *mut IInspectable) -> HRESULT }} impl DisplayPropertiesEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &IInspectable) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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] { @@ -1635,107 +1635,107 @@ RT_INTERFACE!{static interface IDisplayPropertiesStatics(IDisplayPropertiesStati fn get_NativeOrientation(&self, out: *mut DisplayOrientations) -> HRESULT, fn get_AutoRotationPreferences(&self, out: *mut DisplayOrientations) -> HRESULT, fn put_AutoRotationPreferences(&self, value: DisplayOrientations) -> HRESULT, - fn add_OrientationChanged(&self, handler: *mut DisplayPropertiesEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_OrientationChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_OrientationChanged(&self, handler: *mut DisplayPropertiesEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_OrientationChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_ResolutionScale(&self, out: *mut ResolutionScale) -> HRESULT, fn get_LogicalDpi(&self, out: *mut f32) -> HRESULT, - fn add_LogicalDpiChanged(&self, handler: *mut DisplayPropertiesEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_LogicalDpiChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_LogicalDpiChanged(&self, handler: *mut DisplayPropertiesEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_LogicalDpiChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_StereoEnabled(&self, out: *mut bool) -> HRESULT, - fn add_StereoEnabledChanged(&self, handler: *mut DisplayPropertiesEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StereoEnabledChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_StereoEnabledChanged(&self, handler: *mut DisplayPropertiesEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StereoEnabledChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy13(&self) -> (), - #[cfg(feature="windows-storage")] fn GetColorProfileAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_ColorProfileChanged(&self, handler: *mut DisplayPropertiesEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ColorProfileChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_DisplayContentsInvalidated(&self, handler: *mut DisplayPropertiesEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DisplayContentsInvalidated(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + #[cfg(feature="windows-storage")] fn GetColorProfileAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_ColorProfileChanged(&self, handler: *mut DisplayPropertiesEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ColorProfileChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_DisplayContentsInvalidated(&self, handler: *mut DisplayPropertiesEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DisplayContentsInvalidated(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IDisplayPropertiesStatics { - #[inline] pub unsafe fn get_current_orientation(&self) -> Result { + #[inline] pub fn get_current_orientation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CurrentOrientation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_native_orientation(&self) -> Result { + }} + #[inline] pub fn get_native_orientation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NativeOrientation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_auto_rotation_preferences(&self) -> Result { + }} + #[inline] pub fn get_auto_rotation_preferences(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AutoRotationPreferences)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_auto_rotation_preferences(&self, value: DisplayOrientations) -> Result<()> { + }} + #[inline] pub fn set_auto_rotation_preferences(&self, value: DisplayOrientations) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AutoRotationPreferences)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_orientation_changed(&self, handler: &DisplayPropertiesEventHandler) -> Result { + }} + #[inline] pub fn add_orientation_changed(&self, handler: &DisplayPropertiesEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_OrientationChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_orientation_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_orientation_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_OrientationChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_resolution_scale(&self) -> Result { + }} + #[inline] pub fn get_resolution_scale(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ResolutionScale)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_logical_dpi(&self) -> Result { + }} + #[inline] pub fn get_logical_dpi(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LogicalDpi)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_logical_dpi_changed(&self, handler: &DisplayPropertiesEventHandler) -> Result { + }} + #[inline] pub fn add_logical_dpi_changed(&self, handler: &DisplayPropertiesEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_LogicalDpiChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_logical_dpi_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_logical_dpi_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_LogicalDpiChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_stereo_enabled(&self) -> Result { + }} + #[inline] pub fn get_stereo_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StereoEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_stereo_enabled_changed(&self, handler: &DisplayPropertiesEventHandler) -> Result { + }} + #[inline] pub fn add_stereo_enabled_changed(&self, handler: &DisplayPropertiesEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StereoEnabledChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_stereo_enabled_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_stereo_enabled_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StereoEnabledChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_color_profile_async(&self) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_color_profile_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetColorProfileAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_color_profile_changed(&self, handler: &DisplayPropertiesEventHandler) -> Result { + }} + #[inline] pub fn add_color_profile_changed(&self, handler: &DisplayPropertiesEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ColorProfileChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_color_profile_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_color_profile_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ColorProfileChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_display_contents_invalidated(&self, handler: &DisplayPropertiesEventHandler) -> Result { + }} + #[inline] pub fn add_display_contents_invalidated(&self, handler: &DisplayPropertiesEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DisplayContentsInvalidated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_display_contents_invalidated(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_display_contents_invalidated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DisplayContentsInvalidated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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, @@ -1753,62 +1753,62 @@ RT_ENUM! { enum HdmiDisplayHdrOption: i32 { }} DEFINE_IID!(IID_IHdmiDisplayInformation, 319503370, 62821, 18286, 171, 213, 234, 5, 174, 231, 76, 105); RT_INTERFACE!{interface IHdmiDisplayInformation(IHdmiDisplayInformationVtbl): IInspectable(IInspectableVtbl) [IID_IHdmiDisplayInformation] { - fn GetSupportedDisplayModes(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn GetSupportedDisplayModes(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn GetCurrentDisplayMode(&self, out: *mut *mut HdmiDisplayMode) -> HRESULT, - fn SetDefaultDisplayModeAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn RequestSetCurrentDisplayModeAsync(&self, mode: *mut HdmiDisplayMode, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn RequestSetCurrentDisplayModeWithHdrAsync(&self, mode: *mut HdmiDisplayMode, hdrOption: HdmiDisplayHdrOption, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn RequestSetCurrentDisplayModeWithHdrAndMetadataAsync(&self, mode: *mut HdmiDisplayMode, hdrOption: HdmiDisplayHdrOption, hdrMetadata: HdmiDisplayHdr2086Metadata, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn add_DisplayModesChanged(&self, value: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DisplayModesChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn SetDefaultDisplayModeAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn RequestSetCurrentDisplayModeAsync(&self, mode: *mut HdmiDisplayMode, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestSetCurrentDisplayModeWithHdrAsync(&self, mode: *mut HdmiDisplayMode, hdrOption: HdmiDisplayHdrOption, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestSetCurrentDisplayModeWithHdrAndMetadataAsync(&self, mode: *mut HdmiDisplayMode, hdrOption: HdmiDisplayHdrOption, hdrMetadata: HdmiDisplayHdr2086Metadata, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_DisplayModesChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DisplayModesChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IHdmiDisplayInformation { - #[inline] pub unsafe fn get_supported_display_modes(&self) -> Result>> { + #[inline] pub fn get_supported_display_modes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSupportedDisplayModes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_display_mode(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_current_display_mode(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentDisplayMode)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_default_display_mode_async(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_default_display_mode_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetDefaultDisplayModeAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_set_current_display_mode_async(&self, mode: &HdmiDisplayMode) -> Result>> { + }} + #[inline] pub fn request_set_current_display_mode_async(&self, mode: &HdmiDisplayMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestSetCurrentDisplayModeAsync)(self as *const _ as *mut _, mode as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_set_current_display_mode_with_hdr_async(&self, mode: &HdmiDisplayMode, hdrOption: HdmiDisplayHdrOption) -> Result>> { + }} + #[inline] pub fn request_set_current_display_mode_with_hdr_async(&self, mode: &HdmiDisplayMode, hdrOption: HdmiDisplayHdrOption) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestSetCurrentDisplayModeWithHdrAsync)(self as *const _ as *mut _, mode as *const _ as *mut _, hdrOption, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_set_current_display_mode_with_hdr_and_metadata_async(&self, mode: &HdmiDisplayMode, hdrOption: HdmiDisplayHdrOption, hdrMetadata: HdmiDisplayHdr2086Metadata) -> Result>> { + }} + #[inline] pub fn request_set_current_display_mode_with_hdr_and_metadata_async(&self, mode: &HdmiDisplayMode, hdrOption: HdmiDisplayHdrOption, hdrMetadata: HdmiDisplayHdr2086Metadata) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestSetCurrentDisplayModeWithHdrAndMetadataAsync)(self as *const _ as *mut _, mode as *const _ as *mut _, hdrOption, hdrMetadata, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_display_modes_changed(&self, value: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_display_modes_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DisplayModesChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_display_modes_changed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_display_modes_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DisplayModesChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class HdmiDisplayInformation: IHdmiDisplayInformation} impl RtActivatable for HdmiDisplayInformation {} impl HdmiDisplayInformation { - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} + } } DEFINE_CLSID!(HdmiDisplayInformation(&[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,67,111,114,101,46,72,100,109,105,68,105,115,112,108,97,121,73,110,102,111,114,109,97,116,105,111,110,0]) [CLSID_HdmiDisplayInformation]); DEFINE_IID!(IID_IHdmiDisplayInformationStatics, 1827058272, 62506, 18965, 145, 76, 123, 142, 42, 90, 101, 223); @@ -1816,11 +1816,11 @@ RT_INTERFACE!{static interface IHdmiDisplayInformationStatics(IHdmiDisplayInform fn GetForCurrentView(&self, out: *mut *mut HdmiDisplayInformation) -> HRESULT }} impl IHdmiDisplayInformationStatics { - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IHdmiDisplayMode, 201774509, 7056, 20305, 153, 129, 239, 90, 28, 13, 223, 102); RT_INTERFACE!{interface IHdmiDisplayMode(IHdmiDisplayModeVtbl): IInspectable(IInspectableVtbl) [IID_IHdmiDisplayMode] { @@ -1837,61 +1837,61 @@ RT_INTERFACE!{interface IHdmiDisplayMode(IHdmiDisplayModeVtbl): IInspectable(IIn fn get_Is2086MetadataSupported(&self, out: *mut bool) -> HRESULT }} impl IHdmiDisplayMode { - #[inline] pub unsafe fn get_resolution_width_in_raw_pixels(&self) -> Result { + #[inline] pub fn get_resolution_width_in_raw_pixels(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ResolutionWidthInRawPixels)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_resolution_height_in_raw_pixels(&self) -> Result { + }} + #[inline] pub fn get_resolution_height_in_raw_pixels(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ResolutionHeightInRawPixels)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_refresh_rate(&self) -> Result { + }} + #[inline] pub fn get_refresh_rate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RefreshRate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_stereo_enabled(&self) -> Result { + }} + #[inline] pub fn get_stereo_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StereoEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_bits_per_pixel(&self) -> Result { + }} + #[inline] pub fn get_bits_per_pixel(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BitsPerPixel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_equal(&self, mode: &HdmiDisplayMode) -> Result { + }} + #[inline] pub fn is_equal(&self, mode: &HdmiDisplayMode) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsEqual)(self as *const _ as *mut _, mode as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_color_space(&self) -> Result { + }} + #[inline] pub fn get_color_space(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ColorSpace)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pixel_encoding(&self) -> Result { + }} + #[inline] pub fn get_pixel_encoding(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PixelEncoding)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_sdr_luminance_supported(&self) -> Result { + }} + #[inline] pub fn get_is_sdr_luminance_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSdrLuminanceSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_smpte2084_supported(&self) -> Result { + }} + #[inline] pub fn get_is_smpte2084_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSmpte2084Supported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is2086_metadata_supported(&self) -> Result { + }} + #[inline] pub fn get_is2086_metadata_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Is2086MetadataSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class HdmiDisplayMode: IHdmiDisplayMode} RT_ENUM! { enum HdmiDisplayPixelEncoding: i32 { @@ -1913,16 +1913,16 @@ RT_INTERFACE!{interface IBitmapBuffer(IBitmapBufferVtbl): IInspectable(IInspecta fn GetPlaneDescription(&self, index: i32, out: *mut BitmapPlaneDescription) -> HRESULT }} impl IBitmapBuffer { - #[inline] pub unsafe fn get_plane_count(&self) -> Result { + #[inline] pub fn get_plane_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetPlaneCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_plane_description(&self, index: i32) -> Result { + }} + #[inline] pub fn get_plane_description(&self, index: i32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetPlaneDescription)(self as *const _ as *mut _, index, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class BitmapBuffer: IBitmapBuffer} RT_ENUM! { enum BitmapBufferAccessMode: i32 { @@ -1931,31 +1931,31 @@ RT_ENUM! { enum BitmapBufferAccessMode: i32 { 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(&self, out: *mut Guid) -> HRESULT, - fn get_FileExtensions(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_FileExtensions(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_FriendlyName(&self, out: *mut HSTRING) -> HRESULT, - fn get_MimeTypes(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_MimeTypes(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IBitmapCodecInformation { - #[inline] pub unsafe fn get_codec_id(&self) -> Result { + #[inline] pub fn get_codec_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CodecId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_file_extensions(&self) -> Result>> { + }} + #[inline] pub fn get_file_extensions(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FileExtensions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_friendly_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_friendly_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FriendlyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mime_types(&self) -> Result>> { + }} + #[inline] pub fn get_mime_types(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MimeTypes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class BitmapCodecInformation: IBitmapCodecInformation} DEFINE_IID!(IID_IBitmapDecoder, 2901353146, 7540, 19601, 157, 252, 150, 32, 116, 82, 51, 230); @@ -1963,69 +1963,69 @@ RT_INTERFACE!{interface IBitmapDecoder(IBitmapDecoderVtbl): IInspectable(IInspec fn get_BitmapContainerProperties(&self, out: *mut *mut BitmapPropertiesView) -> HRESULT, fn get_DecoderInformation(&self, out: *mut *mut BitmapCodecInformation) -> HRESULT, fn get_FrameCount(&self, out: *mut u32) -> HRESULT, - fn GetPreviewAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetFrameAsync(&self, frameIndex: u32, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetPreviewAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetFrameAsync(&self, frameIndex: u32, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IBitmapDecoder { - #[inline] pub unsafe fn get_bitmap_container_properties(&self) -> Result> { + #[inline] pub fn get_bitmap_container_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BitmapContainerProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_decoder_information(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_decoder_information(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DecoderInformation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_frame_count(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_frame_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FrameCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_preview_async(&self) -> Result>> { + }} + #[inline] pub fn get_preview_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPreviewAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_frame_async(&self, frameIndex: u32) -> Result>> { + }} + #[inline] pub fn get_frame_async(&self, frameIndex: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFrameAsync)(self as *const _ as *mut _, frameIndex, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class BitmapDecoder: IBitmapDecoder} impl RtActivatable for BitmapDecoder {} impl BitmapDecoder { - #[inline] pub fn get_bmp_decoder_id() -> Result { unsafe { + #[inline] pub fn get_bmp_decoder_id() -> Result { >::get_activation_factory().get_bmp_decoder_id() - }} - #[inline] pub fn get_jpeg_decoder_id() -> Result { unsafe { + } + #[inline] pub fn get_jpeg_decoder_id() -> Result { >::get_activation_factory().get_jpeg_decoder_id() - }} - #[inline] pub fn get_png_decoder_id() -> Result { unsafe { + } + #[inline] pub fn get_png_decoder_id() -> Result { >::get_activation_factory().get_png_decoder_id() - }} - #[inline] pub fn get_tiff_decoder_id() -> Result { unsafe { + } + #[inline] pub fn get_tiff_decoder_id() -> Result { >::get_activation_factory().get_tiff_decoder_id() - }} - #[inline] pub fn get_gif_decoder_id() -> Result { unsafe { + } + #[inline] pub fn get_gif_decoder_id() -> Result { >::get_activation_factory().get_gif_decoder_id() - }} - #[inline] pub fn get_jpeg_xrdecoder_id() -> Result { unsafe { + } + #[inline] pub fn get_jpeg_xrdecoder_id() -> Result { >::get_activation_factory().get_jpeg_xrdecoder_id() - }} - #[inline] pub fn get_ico_decoder_id() -> Result { unsafe { + } + #[inline] pub fn get_ico_decoder_id() -> Result { >::get_activation_factory().get_ico_decoder_id() - }} - #[inline] pub fn get_decoder_information_enumerator() -> Result>> { unsafe { + } + #[inline] pub fn get_decoder_information_enumerator() -> Result>>> { >::get_activation_factory().get_decoder_information_enumerator() - }} - #[cfg(feature="windows-storage")] #[inline] pub fn create_async(stream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn create_async(stream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { >::get_activation_factory().create_async(stream) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn create_with_id_async(decoderId: Guid, stream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn create_with_id_async(decoderId: Guid, stream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { >::get_activation_factory().create_with_id_async(decoderId, stream) - }} + } } DEFINE_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]) [CLSID_BitmapDecoder]); DEFINE_IID!(IID_IBitmapDecoderStatics, 1133300518, 48367, 20117, 186, 214, 35, 168, 34, 229, 141, 1); @@ -2037,61 +2037,61 @@ RT_INTERFACE!{static interface IBitmapDecoderStatics(IBitmapDecoderStaticsVtbl): fn get_GifDecoderId(&self, out: *mut Guid) -> HRESULT, fn get_JpegXRDecoderId(&self, out: *mut Guid) -> HRESULT, fn get_IcoDecoderId(&self, out: *mut Guid) -> HRESULT, - fn GetDecoderInformationEnumerator(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - #[cfg(feature="windows-storage")] fn CreateAsync(&self, stream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn CreateWithIdAsync(&self, decoderId: Guid, stream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetDecoderInformationEnumerator(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + #[cfg(feature="windows-storage")] fn CreateAsync(&self, stream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn CreateWithIdAsync(&self, decoderId: Guid, stream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IBitmapDecoderStatics { - #[inline] pub unsafe fn get_bmp_decoder_id(&self) -> Result { + #[inline] pub fn get_bmp_decoder_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BmpDecoderId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_jpeg_decoder_id(&self) -> Result { + }} + #[inline] pub fn get_jpeg_decoder_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_JpegDecoderId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_png_decoder_id(&self) -> Result { + }} + #[inline] pub fn get_png_decoder_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PngDecoderId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_tiff_decoder_id(&self) -> Result { + }} + #[inline] pub fn get_tiff_decoder_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TiffDecoderId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_gif_decoder_id(&self) -> Result { + }} + #[inline] pub fn get_gif_decoder_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_GifDecoderId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_jpeg_xrdecoder_id(&self) -> Result { + }} + #[inline] pub fn get_jpeg_xrdecoder_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_JpegXRDecoderId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ico_decoder_id(&self) -> Result { + }} + #[inline] pub fn get_ico_decoder_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IcoDecoderId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_decoder_information_enumerator(&self) -> Result>> { + }} + #[inline] pub fn get_decoder_information_enumerator(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDecoderInformationEnumerator)(self 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_async(&self, stream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_async(&self, stream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAsync)(self as *const _ as *mut _, 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(&self, decoderId: Guid, stream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_with_id_async(&self, decoderId: Guid, stream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithIdAsync)(self as *const _ as *mut _, decoderId, stream as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IBitmapEncoder, 734292195, 57848, 19284, 149, 232, 50, 145, 149, 81, 206, 98); RT_INTERFACE!{interface IBitmapEncoder(IBitmapEncoderVtbl): IInspectable(IInspectableVtbl) [IID_IBitmapEncoder] { @@ -2106,114 +2106,114 @@ RT_INTERFACE!{interface IBitmapEncoder(IBitmapEncoderVtbl): IInspectable(IInspec fn put_GeneratedThumbnailHeight(&self, value: u32) -> HRESULT, fn get_BitmapTransform(&self, out: *mut *mut BitmapTransform) -> HRESULT, fn SetPixelData(&self, pixelFormat: BitmapPixelFormat, alphaMode: BitmapAlphaMode, width: u32, height: u32, dpiX: f64, dpiY: f64, pixelsSize: u32, pixels: *mut u8) -> HRESULT, - fn GoToNextFrameAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn GoToNextFrameWithEncodingOptionsAsync(&self, encodingOptions: *mut super::super::foundation::collections::IIterable>, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn FlushAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn GoToNextFrameAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn GoToNextFrameWithEncodingOptionsAsync(&self, encodingOptions: *mut foundation::collections::IIterable>, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn FlushAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IBitmapEncoder { - #[inline] pub unsafe fn get_encoder_information(&self) -> Result> { + #[inline] pub fn get_encoder_information(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EncoderInformation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_bitmap_properties(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_bitmap_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BitmapProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_bitmap_container_properties(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_bitmap_container_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BitmapContainerProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_thumbnail_generated(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_thumbnail_generated(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsThumbnailGenerated)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_thumbnail_generated(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_thumbnail_generated(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsThumbnailGenerated)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_generated_thumbnail_width(&self) -> Result { + }} + #[inline] pub fn get_generated_thumbnail_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_GeneratedThumbnailWidth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_generated_thumbnail_width(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_generated_thumbnail_width(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_GeneratedThumbnailWidth)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_generated_thumbnail_height(&self) -> Result { + }} + #[inline] pub fn get_generated_thumbnail_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_GeneratedThumbnailHeight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_generated_thumbnail_height(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_generated_thumbnail_height(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_GeneratedThumbnailHeight)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_bitmap_transform(&self) -> Result> { + }} + #[inline] pub fn get_bitmap_transform(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BitmapTransform)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_pixel_data(&self, pixelFormat: BitmapPixelFormat, alphaMode: BitmapAlphaMode, width: u32, height: u32, dpiX: f64, dpiY: f64, pixels: &[u8]) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_pixel_data(&self, pixelFormat: BitmapPixelFormat, alphaMode: BitmapAlphaMode, width: u32, height: u32, dpiX: f64, dpiY: f64, pixels: &[u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetPixelData)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[inline] pub fn go_to_next_frame_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GoToNextFrameAsync)(self as *const _ as *mut _, &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(&self, encodingOptions: &super::super::foundation::collections::IIterable>) -> Result> { + }} + #[inline] pub fn go_to_next_frame_with_encoding_options_async(&self, encodingOptions: &foundation::collections::IIterable>) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GoToNextFrameWithEncodingOptionsAsync)(self as *const _ as *mut _, encodingOptions as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn flush_async(&self) -> Result> { + }} + #[inline] pub fn flush_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FlushAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class BitmapEncoder: IBitmapEncoder} impl RtActivatable for BitmapEncoder {} impl BitmapEncoder { - #[inline] pub fn get_bmp_encoder_id() -> Result { unsafe { + #[inline] pub fn get_bmp_encoder_id() -> Result { >::get_activation_factory().get_bmp_encoder_id() - }} - #[inline] pub fn get_jpeg_encoder_id() -> Result { unsafe { + } + #[inline] pub fn get_jpeg_encoder_id() -> Result { >::get_activation_factory().get_jpeg_encoder_id() - }} - #[inline] pub fn get_png_encoder_id() -> Result { unsafe { + } + #[inline] pub fn get_png_encoder_id() -> Result { >::get_activation_factory().get_png_encoder_id() - }} - #[inline] pub fn get_tiff_encoder_id() -> Result { unsafe { + } + #[inline] pub fn get_tiff_encoder_id() -> Result { >::get_activation_factory().get_tiff_encoder_id() - }} - #[inline] pub fn get_gif_encoder_id() -> Result { unsafe { + } + #[inline] pub fn get_gif_encoder_id() -> Result { >::get_activation_factory().get_gif_encoder_id() - }} - #[inline] pub fn get_jpeg_xrencoder_id() -> Result { unsafe { + } + #[inline] pub fn get_jpeg_xrencoder_id() -> Result { >::get_activation_factory().get_jpeg_xrencoder_id() - }} - #[inline] pub fn get_encoder_information_enumerator() -> Result>> { unsafe { + } + #[inline] pub fn get_encoder_information_enumerator() -> Result>>> { >::get_activation_factory().get_encoder_information_enumerator() - }} - #[cfg(feature="windows-storage")] #[inline] pub fn create_async(encoderId: Guid, stream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn create_async(encoderId: Guid, stream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { >::get_activation_factory().create_async(encoderId, stream) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn create_with_encoding_options_async(encoderId: Guid, stream: &super::super::storage::streams::IRandomAccessStream, encodingOptions: &super::super::foundation::collections::IIterable>) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn create_with_encoding_options_async(encoderId: Guid, stream: &super::super::storage::streams::IRandomAccessStream, encodingOptions: &foundation::collections::IIterable>) -> Result>> { >::get_activation_factory().create_with_encoding_options_async(encoderId, stream, encodingOptions) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn create_for_transcoding_async(stream: &super::super::storage::streams::IRandomAccessStream, bitmapDecoder: &BitmapDecoder) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn create_for_transcoding_async(stream: &super::super::storage::streams::IRandomAccessStream, bitmapDecoder: &BitmapDecoder) -> Result>> { >::get_activation_factory().create_for_transcoding_async(stream, bitmapDecoder) - }} - #[inline] pub fn create_for_in_place_property_encoding_async(bitmapDecoder: &BitmapDecoder) -> Result>> { unsafe { + } + #[inline] pub fn create_for_in_place_property_encoding_async(bitmapDecoder: &BitmapDecoder) -> Result>> { >::get_activation_factory().create_for_in_place_property_encoding_async(bitmapDecoder) - }} + } } DEFINE_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]) [CLSID_BitmapEncoder]); DEFINE_IID!(IID_IBitmapEncoderStatics, 2806208167, 42212, 20153, 142, 64, 86, 77, 231, 225, 204, 178); @@ -2224,88 +2224,88 @@ RT_INTERFACE!{static interface IBitmapEncoderStatics(IBitmapEncoderStaticsVtbl): fn get_TiffEncoderId(&self, out: *mut Guid) -> HRESULT, fn get_GifEncoderId(&self, out: *mut Guid) -> HRESULT, fn get_JpegXREncoderId(&self, out: *mut Guid) -> HRESULT, - fn GetEncoderInformationEnumerator(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn GetEncoderInformationEnumerator(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy7(&self) -> (), - #[cfg(feature="windows-storage")] fn CreateAsync(&self, encoderId: Guid, stream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn CreateAsync(&self, encoderId: Guid, stream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy8(&self) -> (), - #[cfg(feature="windows-storage")] fn CreateWithEncodingOptionsAsync(&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(feature="windows-storage")] fn CreateWithEncodingOptionsAsync(&self, encoderId: Guid, stream: *mut super::super::storage::streams::IRandomAccessStream, encodingOptions: *mut foundation::collections::IIterable>, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy9(&self) -> (), - #[cfg(feature="windows-storage")] fn CreateForTranscodingAsync(&self, stream: *mut super::super::storage::streams::IRandomAccessStream, bitmapDecoder: *mut BitmapDecoder, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CreateForInPlacePropertyEncodingAsync(&self, bitmapDecoder: *mut BitmapDecoder, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn CreateForTranscodingAsync(&self, stream: *mut super::super::storage::streams::IRandomAccessStream, bitmapDecoder: *mut BitmapDecoder, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreateForInPlacePropertyEncodingAsync(&self, bitmapDecoder: *mut BitmapDecoder, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IBitmapEncoderStatics { - #[inline] pub unsafe fn get_bmp_encoder_id(&self) -> Result { + #[inline] pub fn get_bmp_encoder_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BmpEncoderId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_jpeg_encoder_id(&self) -> Result { + }} + #[inline] pub fn get_jpeg_encoder_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_JpegEncoderId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_png_encoder_id(&self) -> Result { + }} + #[inline] pub fn get_png_encoder_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PngEncoderId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_tiff_encoder_id(&self) -> Result { + }} + #[inline] pub fn get_tiff_encoder_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TiffEncoderId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_gif_encoder_id(&self) -> Result { + }} + #[inline] pub fn get_gif_encoder_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_GifEncoderId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_jpeg_xrencoder_id(&self) -> Result { + }} + #[inline] pub fn get_jpeg_xrencoder_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_JpegXREncoderId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_encoder_information_enumerator(&self) -> Result>> { + }} + #[inline] pub fn get_encoder_information_enumerator(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetEncoderInformationEnumerator)(self 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_async(&self, encoderId: Guid, stream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_async(&self, encoderId: Guid, stream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAsync)(self as *const _ as *mut _, 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(&self, encoderId: Guid, stream: &super::super::storage::streams::IRandomAccessStream, encodingOptions: &super::super::foundation::collections::IIterable>) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_with_encoding_options_async(&self, encoderId: Guid, stream: &super::super::storage::streams::IRandomAccessStream, encodingOptions: &foundation::collections::IIterable>) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithEncodingOptionsAsync)(self as *const _ as *mut _, 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(&self, stream: &super::super::storage::streams::IRandomAccessStream, bitmapDecoder: &BitmapDecoder) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_for_transcoding_async(&self, stream: &super::super::storage::streams::IRandomAccessStream, bitmapDecoder: &BitmapDecoder) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateForTranscodingAsync)(self as *const _ as *mut _, 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(&self, bitmapDecoder: &BitmapDecoder) -> Result>> { + }} + #[inline] pub fn create_for_in_place_property_encoding_async(&self, bitmapDecoder: &BitmapDecoder) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateForInPlacePropertyEncodingAsync)(self as *const _ as *mut _, bitmapDecoder as *const _ as *mut _, &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(&self, bitmap: *mut SoftwareBitmap) -> HRESULT }} impl IBitmapEncoderWithSoftwareBitmap { - #[inline] pub unsafe fn set_software_bitmap(&self, bitmap: &SoftwareBitmap) -> Result<()> { + #[inline] pub fn set_software_bitmap(&self, bitmap: &SoftwareBitmap) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetSoftwareBitmap)(self as *const _ as *mut _, bitmap as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum BitmapFlip: i32 { None (BitmapFlip_None) = 0, Horizontal (BitmapFlip_Horizontal) = 1, Vertical (BitmapFlip_Vertical) = 2, }} 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetThumbnailAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn get_BitmapProperties(&self, out: *mut *mut BitmapPropertiesView) -> HRESULT, fn get_BitmapPixelFormat(&self, out: *mut BitmapPixelFormat) -> HRESULT, fn get_BitmapAlphaMode(&self, out: *mut BitmapAlphaMode) -> HRESULT, @@ -2315,94 +2315,94 @@ RT_INTERFACE!{interface IBitmapFrame(IBitmapFrameVtbl): IInspectable(IInspectabl fn get_PixelHeight(&self, out: *mut u32) -> HRESULT, fn get_OrientedPixelWidth(&self, out: *mut u32) -> HRESULT, fn get_OrientedPixelHeight(&self, out: *mut u32) -> HRESULT, - fn GetPixelDataAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetPixelDataTransformedAsync(&self, pixelFormat: BitmapPixelFormat, alphaMode: BitmapAlphaMode, transform: *mut BitmapTransform, exifOrientationMode: ExifOrientationMode, colorManagementMode: ColorManagementMode, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetPixelDataAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetPixelDataTransformedAsync(&self, pixelFormat: BitmapPixelFormat, alphaMode: BitmapAlphaMode, transform: *mut BitmapTransform, exifOrientationMode: ExifOrientationMode, colorManagementMode: ColorManagementMode, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IBitmapFrame { - #[inline] pub unsafe fn get_thumbnail_async(&self) -> Result>> { + #[inline] pub fn get_thumbnail_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetThumbnailAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_bitmap_properties(&self) -> Result> { + }} + #[inline] pub fn get_bitmap_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BitmapProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_bitmap_pixel_format(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_bitmap_pixel_format(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BitmapPixelFormat)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_bitmap_alpha_mode(&self) -> Result { + }} + #[inline] pub fn get_bitmap_alpha_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BitmapAlphaMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_dpi_x(&self) -> Result { + }} + #[inline] pub fn get_dpi_x(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DpiX)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_dpi_y(&self) -> Result { + }} + #[inline] pub fn get_dpi_y(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DpiY)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pixel_width(&self) -> Result { + }} + #[inline] pub fn get_pixel_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PixelWidth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pixel_height(&self) -> Result { + }} + #[inline] pub fn get_pixel_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PixelHeight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_oriented_pixel_width(&self) -> Result { + }} + #[inline] pub fn get_oriented_pixel_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OrientedPixelWidth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_oriented_pixel_height(&self) -> Result { + }} + #[inline] pub fn get_oriented_pixel_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OrientedPixelHeight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pixel_data_async(&self) -> Result>> { + }} + #[inline] pub fn get_pixel_data_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPixelDataAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pixel_data_transformed_async(&self, pixelFormat: BitmapPixelFormat, alphaMode: BitmapAlphaMode, transform: &BitmapTransform, exifOrientationMode: ExifOrientationMode, colorManagementMode: ColorManagementMode) -> Result>> { + }} + #[inline] pub fn get_pixel_data_transformed_async(&self, pixelFormat: BitmapPixelFormat, alphaMode: BitmapAlphaMode, transform: &BitmapTransform, exifOrientationMode: ExifOrientationMode, colorManagementMode: ColorManagementMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPixelDataTransformedAsync)(self as *const _ as *mut _, 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_IBitmapFrameWithSoftwareBitmap, 4264066202, 16908, 18787, 135, 173, 105, 20, 54, 224, 131, 131); RT_INTERFACE!{interface IBitmapFrameWithSoftwareBitmap(IBitmapFrameWithSoftwareBitmapVtbl): IInspectable(IInspectableVtbl) [IID_IBitmapFrameWithSoftwareBitmap] { - fn GetSoftwareBitmapAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetSoftwareBitmapConvertedAsync(&self, pixelFormat: BitmapPixelFormat, alphaMode: BitmapAlphaMode, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetSoftwareBitmapTransformedAsync(&self, pixelFormat: BitmapPixelFormat, alphaMode: BitmapAlphaMode, transform: *mut BitmapTransform, exifOrientationMode: ExifOrientationMode, colorManagementMode: ColorManagementMode, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetSoftwareBitmapAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetSoftwareBitmapConvertedAsync(&self, pixelFormat: BitmapPixelFormat, alphaMode: BitmapAlphaMode, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetSoftwareBitmapTransformedAsync(&self, pixelFormat: BitmapPixelFormat, alphaMode: BitmapAlphaMode, transform: *mut BitmapTransform, exifOrientationMode: ExifOrientationMode, colorManagementMode: ColorManagementMode, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IBitmapFrameWithSoftwareBitmap { - #[inline] pub unsafe fn get_software_bitmap_async(&self) -> Result>> { + #[inline] pub fn get_software_bitmap_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSoftwareBitmapAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_software_bitmap_converted_async(&self, pixelFormat: BitmapPixelFormat, alphaMode: BitmapAlphaMode) -> Result>> { + }} + #[inline] pub fn get_software_bitmap_converted_async(&self, pixelFormat: BitmapPixelFormat, alphaMode: BitmapAlphaMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSoftwareBitmapConvertedAsync)(self as *const _ as *mut _, pixelFormat, alphaMode, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_software_bitmap_transformed_async(&self, pixelFormat: BitmapPixelFormat, alphaMode: BitmapAlphaMode, transform: &BitmapTransform, exifOrientationMode: ExifOrientationMode, colorManagementMode: ColorManagementMode) -> Result>> { + }} + #[inline] pub fn get_software_bitmap_transformed_async(&self, pixelFormat: BitmapPixelFormat, alphaMode: BitmapAlphaMode, transform: &BitmapTransform, exifOrientationMode: ExifOrientationMode, colorManagementMode: ColorManagementMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSoftwareBitmapTransformedAsync)(self as *const _ as *mut _, pixelFormat, alphaMode, transform as *const _ as *mut _, exifOrientationMode, colorManagementMode, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum BitmapInterpolationMode: i32 { NearestNeighbor (BitmapInterpolationMode_NearestNeighbor) = 0, Linear (BitmapInterpolationMode_Linear) = 1, Cubic (BitmapInterpolationMode_Cubic) = 2, Fant (BitmapInterpolationMode_Fant) = 3, @@ -2415,29 +2415,29 @@ RT_STRUCT! { struct BitmapPlaneDescription { }} 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(&self, propertiesToSet: *mut super::super::foundation::collections::IIterable>, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn SetPropertiesAsync(&self, propertiesToSet: *mut foundation::collections::IIterable>, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IBitmapProperties { - #[inline] pub unsafe fn set_properties_async(&self, propertiesToSet: &super::super::foundation::collections::IIterable>) -> Result> { + #[inline] pub fn set_properties_async(&self, propertiesToSet: &foundation::collections::IIterable>) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetPropertiesAsync)(self as *const _ as *mut _, propertiesToSet as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class BitmapProperties: IBitmapProperties} 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(&self, propertiesToRetrieve: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetPropertiesAsync(&self, propertiesToRetrieve: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IBitmapPropertiesView { - #[inline] pub unsafe fn get_properties_async(&self, propertiesToRetrieve: &super::super::foundation::collections::IIterable) -> Result>> { + #[inline] pub fn get_properties_async(&self, propertiesToRetrieve: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPropertiesAsync)(self as *const _ as *mut _, propertiesToRetrieve 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 BitmapPropertySet: super::super::foundation::collections::IMap} +RT_CLASS!{class BitmapPropertySet: foundation::collections::IMap} impl RtActivatable for BitmapPropertySet {} DEFINE_CLSID!(BitmapPropertySet(&[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,80,114,111,112,101,114,116,121,83,101,116,0]) [CLSID_BitmapPropertySet]); RT_ENUM! { enum BitmapRotation: i32 { @@ -2462,60 +2462,60 @@ RT_INTERFACE!{interface IBitmapTransform(IBitmapTransformVtbl): IInspectable(IIn fn put_Bounds(&self, value: BitmapBounds) -> HRESULT }} impl IBitmapTransform { - #[inline] pub unsafe fn get_scaled_width(&self) -> Result { + #[inline] pub fn get_scaled_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ScaledWidth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_scaled_width(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_scaled_width(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ScaledWidth)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_scaled_height(&self) -> Result { + }} + #[inline] pub fn get_scaled_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ScaledHeight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_scaled_height(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_scaled_height(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ScaledHeight)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_interpolation_mode(&self) -> Result { + }} + #[inline] pub fn get_interpolation_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InterpolationMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_interpolation_mode(&self, value: BitmapInterpolationMode) -> Result<()> { + }} + #[inline] pub fn set_interpolation_mode(&self, value: BitmapInterpolationMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InterpolationMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_flip(&self) -> Result { + }} + #[inline] pub fn get_flip(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Flip)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_flip(&self, value: BitmapFlip) -> Result<()> { + }} + #[inline] pub fn set_flip(&self, value: BitmapFlip) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Flip)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_rotation(&self) -> Result { + }} + #[inline] pub fn get_rotation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Rotation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_rotation(&self, value: BitmapRotation) -> Result<()> { + }} + #[inline] pub fn set_rotation(&self, value: BitmapRotation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Rotation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_bounds(&self) -> Result { + }} + #[inline] pub fn get_bounds(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Bounds)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_bounds(&self, value: BitmapBounds) -> Result<()> { + }} + #[inline] pub fn set_bounds(&self, value: BitmapBounds) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Bounds)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class BitmapTransform: IBitmapTransform} impl RtActivatable for BitmapTransform {} @@ -2523,38 +2523,38 @@ DEFINE_CLSID!(BitmapTransform(&[87,105,110,100,111,119,115,46,71,114,97,112,104, 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(&self, out: *mut *mut IInspectable) -> HRESULT, - fn get_Type(&self, out: *mut super::super::foundation::PropertyType) -> HRESULT + fn get_Type(&self, out: *mut foundation::PropertyType) -> HRESULT }} impl IBitmapTypedValue { - #[inline] pub unsafe fn get_value(&self) -> Result> { + #[inline] pub fn get_value(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_type(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Type)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class BitmapTypedValue: IBitmapTypedValue} impl RtActivatable for BitmapTypedValue {} impl BitmapTypedValue { - #[inline] pub fn create(value: &IInspectable, type_: super::super::foundation::PropertyType) -> Result> { unsafe { + #[inline] pub fn create(value: &IInspectable, type_: foundation::PropertyType) -> Result> { >::get_activation_factory().create(value, type_) - }} + } } DEFINE_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]) [CLSID_BitmapTypedValue]); 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(&self, value: *mut IInspectable, type_: super::super::foundation::PropertyType, out: *mut *mut BitmapTypedValue) -> HRESULT + fn Create(&self, value: *mut IInspectable, type_: foundation::PropertyType, out: *mut *mut BitmapTypedValue) -> HRESULT }} impl IBitmapTypedValueFactory { - #[inline] pub unsafe fn create(&self, value: &IInspectable, type_: super::super::foundation::PropertyType) -> Result> { + #[inline] pub fn create(&self, value: &IInspectable, type_: foundation::PropertyType) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, value as *const _ as *mut _, type_, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum ColorManagementMode: i32 { DoNotColorManage (ColorManagementMode_DoNotColorManage) = 0, ColorManageToSRgb (ColorManagementMode_ColorManageToSRgb) = 1, @@ -2572,11 +2572,11 @@ RT_INTERFACE!{interface IPixelDataProvider(IPixelDataProviderVtbl): IInspectable fn DetachPixelData(&self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT }} impl IPixelDataProvider { - #[inline] pub unsafe fn detach_pixel_data(&self) -> Result> { + #[inline] pub fn detach_pixel_data(&self) -> Result> { unsafe { let mut outSize = 0; let mut out = null_mut(); let hr = ((*self.lpVtbl).DetachPixelData)(self as *const _ as *mut _, &mut outSize, &mut out); if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } - } + }} } RT_CLASS!{class PixelDataProvider: IPixelDataProvider} RT_ENUM! { enum PngFilterMode: i32 { @@ -2602,103 +2602,103 @@ RT_INTERFACE!{interface ISoftwareBitmap(ISoftwareBitmapVtbl): IInspectable(IInsp fn GetReadOnlyView(&self, out: *mut *mut SoftwareBitmap) -> HRESULT }} impl ISoftwareBitmap { - #[inline] pub unsafe fn get_bitmap_pixel_format(&self) -> Result { + #[inline] pub fn get_bitmap_pixel_format(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BitmapPixelFormat)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_bitmap_alpha_mode(&self) -> Result { + }} + #[inline] pub fn get_bitmap_alpha_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BitmapAlphaMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pixel_width(&self) -> Result { + }} + #[inline] pub fn get_pixel_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PixelWidth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pixel_height(&self) -> Result { + }} + #[inline] pub fn get_pixel_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PixelHeight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_read_only(&self) -> Result { + }} + #[inline] pub fn get_is_read_only(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsReadOnly)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_dpi_x(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_dpi_x(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DpiX)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_dpi_x(&self) -> Result { + }} + #[inline] pub fn get_dpi_x(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DpiX)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_dpi_y(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_dpi_y(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DpiY)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_dpi_y(&self) -> Result { + }} + #[inline] pub fn get_dpi_y(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DpiY)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn lock_buffer(&self, mode: BitmapBufferAccessMode) -> Result> { + }} + #[inline] pub fn lock_buffer(&self, mode: BitmapBufferAccessMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LockBuffer)(self as *const _ as *mut _, mode, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn copy_to(&self, bitmap: &SoftwareBitmap) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn copy_to(&self, bitmap: &SoftwareBitmap) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).CopyTo)(self as *const _ as *mut _, bitmap as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn copy_from_buffer(&self, buffer: &super::super::storage::streams::IBuffer) -> Result<()> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn copy_from_buffer(&self, buffer: &super::super::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).CopyFromBuffer)(self as *const _ as *mut _, buffer as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn copy_to_buffer(&self, buffer: &super::super::storage::streams::IBuffer) -> Result<()> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn copy_to_buffer(&self, buffer: &super::super::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).CopyToBuffer)(self as *const _ as *mut _, buffer as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_read_only_view(&self) -> Result> { + }} + #[inline] pub fn get_read_only_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetReadOnlyView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SoftwareBitmap: ISoftwareBitmap} impl RtActivatable for SoftwareBitmap {} impl RtActivatable for SoftwareBitmap {} impl SoftwareBitmap { - #[inline] pub fn create(format: BitmapPixelFormat, width: i32, height: i32) -> Result> { unsafe { + #[inline] pub fn create(format: BitmapPixelFormat, width: i32, height: i32) -> Result> { >::get_activation_factory().create(format, width, height) - }} - #[inline] pub fn create_with_alpha(format: BitmapPixelFormat, width: i32, height: i32, alpha: BitmapAlphaMode) -> Result> { unsafe { + } + #[inline] pub fn create_with_alpha(format: BitmapPixelFormat, width: i32, height: i32, alpha: BitmapAlphaMode) -> Result> { >::get_activation_factory().create_with_alpha(format, width, height, alpha) - }} - #[inline] pub fn copy(source: &SoftwareBitmap) -> Result> { unsafe { + } + #[inline] pub fn copy(source: &SoftwareBitmap) -> Result>> { >::get_activation_factory().copy(source) - }} - #[inline] pub fn convert(source: &SoftwareBitmap, format: BitmapPixelFormat) -> Result> { unsafe { + } + #[inline] pub fn convert(source: &SoftwareBitmap, format: BitmapPixelFormat) -> Result>> { >::get_activation_factory().convert(source, format) - }} - #[inline] pub fn convert_with_alpha(source: &SoftwareBitmap, format: BitmapPixelFormat, alpha: BitmapAlphaMode) -> Result> { unsafe { + } + #[inline] pub fn convert_with_alpha(source: &SoftwareBitmap, format: BitmapPixelFormat, alpha: BitmapAlphaMode) -> Result>> { >::get_activation_factory().convert_with_alpha(source, format, alpha) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn create_copy_from_buffer(source: &super::super::storage::streams::IBuffer, format: BitmapPixelFormat, width: i32, height: i32) -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn create_copy_from_buffer(source: &super::super::storage::streams::IBuffer, format: BitmapPixelFormat, width: i32, height: i32) -> Result>> { >::get_activation_factory().create_copy_from_buffer(source, format, width, height) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn create_copy_with_alpha_from_buffer(source: &super::super::storage::streams::IBuffer, format: BitmapPixelFormat, width: i32, height: i32, alpha: BitmapAlphaMode) -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn create_copy_with_alpha_from_buffer(source: &super::super::storage::streams::IBuffer, format: BitmapPixelFormat, width: i32, height: i32, alpha: BitmapAlphaMode) -> Result>> { >::get_activation_factory().create_copy_with_alpha_from_buffer(source, format, width, height, alpha) - }} - #[inline] pub fn create_copy_from_surface_async(surface: &super::directx::direct3d11::IDirect3DSurface) -> Result>> { unsafe { + } + #[inline] pub fn create_copy_from_surface_async(surface: &super::directx::direct3d11::IDirect3DSurface) -> Result>> { >::get_activation_factory().create_copy_from_surface_async(surface) - }} - #[inline] pub fn create_copy_with_alpha_from_surface_async(surface: &super::directx::direct3d11::IDirect3DSurface, alpha: BitmapAlphaMode) -> Result>> { unsafe { + } + #[inline] pub fn create_copy_with_alpha_from_surface_async(surface: &super::directx::direct3d11::IDirect3DSurface, alpha: BitmapAlphaMode) -> Result>> { >::get_activation_factory().create_copy_with_alpha_from_surface_async(surface, alpha) - }} + } } DEFINE_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]) [CLSID_SoftwareBitmap]); DEFINE_IID!(IID_ISoftwareBitmapFactory, 3382700905, 11618, 19783, 166, 179, 79, 219, 106, 7, 253, 248); @@ -2707,16 +2707,16 @@ RT_INTERFACE!{static interface ISoftwareBitmapFactory(ISoftwareBitmapFactoryVtbl fn CreateWithAlpha(&self, format: BitmapPixelFormat, width: i32, height: i32, alpha: BitmapAlphaMode, out: *mut *mut SoftwareBitmap) -> HRESULT }} impl ISoftwareBitmapFactory { - #[inline] pub unsafe fn create(&self, format: BitmapPixelFormat, width: i32, height: i32) -> Result> { + #[inline] pub fn create(&self, format: BitmapPixelFormat, width: i32, height: i32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, format, width, height, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_alpha(&self, format: BitmapPixelFormat, width: i32, height: i32, alpha: BitmapAlphaMode) -> Result> { + }} + #[inline] pub fn create_with_alpha(&self, format: BitmapPixelFormat, width: i32, height: i32, alpha: BitmapAlphaMode) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithAlpha)(self as *const _ as *mut _, 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] { @@ -2727,45 +2727,45 @@ RT_INTERFACE!{static interface ISoftwareBitmapStatics(ISoftwareBitmapStaticsVtbl #[cfg(feature="windows-storage")] fn CreateCopyFromBuffer(&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(&self) -> (), #[cfg(feature="windows-storage")] fn CreateCopyWithAlphaFromBuffer(&self, source: *mut super::super::storage::streams::IBuffer, format: BitmapPixelFormat, width: i32, height: i32, alpha: BitmapAlphaMode, out: *mut *mut SoftwareBitmap) -> HRESULT, - fn CreateCopyFromSurfaceAsync(&self, surface: *mut super::directx::direct3d11::IDirect3DSurface, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CreateCopyWithAlphaFromSurfaceAsync(&self, surface: *mut super::directx::direct3d11::IDirect3DSurface, alpha: BitmapAlphaMode, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn CreateCopyFromSurfaceAsync(&self, surface: *mut super::directx::direct3d11::IDirect3DSurface, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreateCopyWithAlphaFromSurfaceAsync(&self, surface: *mut super::directx::direct3d11::IDirect3DSurface, alpha: BitmapAlphaMode, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ISoftwareBitmapStatics { - #[inline] pub unsafe fn copy(&self, source: &SoftwareBitmap) -> Result> { + #[inline] pub fn copy(&self, source: &SoftwareBitmap) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Copy)(self as *const _ as *mut _, source as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn convert(&self, source: &SoftwareBitmap, format: BitmapPixelFormat) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn convert(&self, source: &SoftwareBitmap, format: BitmapPixelFormat) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Convert)(self as *const _ as *mut _, 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(&self, source: &SoftwareBitmap, format: BitmapPixelFormat, alpha: BitmapAlphaMode) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn convert_with_alpha(&self, source: &SoftwareBitmap, format: BitmapPixelFormat, alpha: BitmapAlphaMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConvertWithAlpha)(self as *const _ as *mut _, 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(&self, source: &super::super::storage::streams::IBuffer, format: BitmapPixelFormat, width: i32, height: i32) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_copy_from_buffer(&self, source: &super::super::storage::streams::IBuffer, format: BitmapPixelFormat, width: i32, height: i32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateCopyFromBuffer)(self as *const _ as *mut _, 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(&self, source: &super::super::storage::streams::IBuffer, format: BitmapPixelFormat, width: i32, height: i32, alpha: BitmapAlphaMode) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_copy_with_alpha_from_buffer(&self, source: &super::super::storage::streams::IBuffer, format: BitmapPixelFormat, width: i32, height: i32, alpha: BitmapAlphaMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateCopyWithAlphaFromBuffer)(self as *const _ as *mut _, 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(&self, surface: &super::directx::direct3d11::IDirect3DSurface) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_copy_from_surface_async(&self, surface: &super::directx::direct3d11::IDirect3DSurface) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateCopyFromSurfaceAsync)(self as *const _ as *mut _, 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(&self, surface: &super::directx::direct3d11::IDirect3DSurface, alpha: BitmapAlphaMode) -> Result>> { + }} + #[inline] pub fn create_copy_with_alpha_from_surface_async(&self, surface: &super::directx::direct3d11::IDirect3DSurface, alpha: BitmapAlphaMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateCopyWithAlphaFromSurfaceAsync)(self as *const _ as *mut _, surface as *const _ as *mut _, alpha, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -2779,15 +2779,15 @@ RT_INTERFACE!{interface IGraphicsEffect(IGraphicsEffectVtbl): IInspectable(IInsp fn put_Name(&self, name: HSTRING) -> HRESULT }} impl IGraphicsEffect { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_name(&self, name: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_name(&self, name: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Name)(self as *const _ as *mut _, name.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IGraphicsEffectSource, 764386780, 17209, 20153, 146, 22, 249, 222, 183, 86, 88, 162); RT_INTERFACE!{interface IGraphicsEffectSource(IGraphicsEffectSourceVtbl): IInspectable(IInspectableVtbl) [IID_IGraphicsEffectSource] { @@ -2820,62 +2820,62 @@ RT_ENUM! { enum PrintHolePunch: i32 { }} 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(&self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PrintTaskRequested(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_PrintTaskRequested(&self, eventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PrintTaskRequested(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT }} impl IPrintManager { - #[inline] pub unsafe fn add_print_task_requested(&self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_print_task_requested(&self, eventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PrintTaskRequested)(self as *const _ as *mut _, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_print_task_requested(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_print_task_requested(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PrintTaskRequested)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PrintManager: IPrintManager} impl RtActivatable for PrintManager {} impl RtActivatable for PrintManager {} impl PrintManager { - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} - #[inline] pub fn show_print_uiasync() -> Result>> { unsafe { + } + #[inline] pub fn show_print_uiasync() -> Result>> { >::get_activation_factory().show_print_uiasync() - }} - #[inline] pub fn is_supported() -> Result { unsafe { + } + #[inline] pub fn is_supported() -> Result { >::get_activation_factory().is_supported() - }} + } } DEFINE_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]) [CLSID_PrintManager]); 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(&self, out: *mut *mut PrintManager) -> HRESULT, - fn ShowPrintUIAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn ShowPrintUIAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IPrintManagerStatic { - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn show_print_uiasync(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn show_print_uiasync(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowPrintUIAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut bool) -> HRESULT }} impl IPrintManagerStatic2 { - #[inline] pub unsafe fn is_supported(&self) -> Result { + #[inline] pub fn is_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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, @@ -2887,14 +2887,14 @@ 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_STRUCT! { struct PrintPageDescription { - PageSize: super::super::foundation::Size, ImageableRect: super::super::foundation::Rect, DpiX: u32, DpiY: u32, + PageSize: foundation::Size, ImageableRect: foundation::Rect, DpiX: u32, DpiY: u32, }} 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(&self, value: PrintMediaSize) -> HRESULT, fn get_MediaSize(&self, out: *mut PrintMediaSize) -> HRESULT, - fn put_PageSize(&self, value: super::super::foundation::Size) -> HRESULT, - fn get_PageSize(&self, out: *mut super::super::foundation::Size) -> HRESULT, + fn put_PageSize(&self, value: foundation::Size) -> HRESULT, + fn get_PageSize(&self, out: *mut foundation::Size) -> HRESULT, fn put_DpiX(&self, value: u32) -> HRESULT, fn get_DpiX(&self, out: *mut u32) -> HRESULT, fn put_DpiY(&self, value: u32) -> HRESULT, @@ -2903,51 +2903,51 @@ RT_INTERFACE!{interface IPrintPageInfo(IPrintPageInfoVtbl): IInspectable(IInspec fn get_Orientation(&self, out: *mut PrintOrientation) -> HRESULT }} impl IPrintPageInfo { - #[inline] pub unsafe fn set_media_size(&self, value: PrintMediaSize) -> Result<()> { + #[inline] pub fn set_media_size(&self, value: PrintMediaSize) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MediaSize)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_media_size(&self) -> Result { + }} + #[inline] pub fn get_media_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MediaSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_page_size(&self, value: super::super::foundation::Size) -> Result<()> { + }} + #[inline] pub fn set_page_size(&self, value: foundation::Size) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PageSize)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_page_size(&self) -> Result { + }} + #[inline] pub fn get_page_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PageSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_dpi_x(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_dpi_x(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DpiX)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_dpi_x(&self) -> Result { + }} + #[inline] pub fn get_dpi_x(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DpiX)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_dpi_y(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_dpi_y(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DpiY)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_dpi_y(&self) -> Result { + }} + #[inline] pub fn get_dpi_y(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DpiY)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_orientation(&self, value: PrintOrientation) -> Result<()> { + }} + #[inline] pub fn set_orientation(&self, value: PrintOrientation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Orientation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_orientation(&self) -> Result { + }} + #[inline] pub fn get_orientation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Orientation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PrintPageInfo: IPrintPageInfo} impl RtActivatable for PrintPageInfo {} @@ -2964,67 +2964,67 @@ RT_INTERFACE!{interface IPrintTask(IPrintTaskVtbl): IInspectable(IInspectableVtb #[cfg(feature="windows-applicationmodel")] fn get_Properties(&self, out: *mut *mut super::super::applicationmodel::datatransfer::DataPackagePropertySet) -> HRESULT, fn get_Source(&self, out: *mut *mut IPrintDocumentSource) -> HRESULT, fn get_Options(&self, out: *mut *mut PrintTaskOptions) -> HRESULT, - fn add_Previewing(&self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Previewing(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Submitting(&self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Submitting(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Progressing(&self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Progressing(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Completed(&self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Completed(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_Previewing(&self, eventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Previewing(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_Submitting(&self, eventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Submitting(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_Progressing(&self, eventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Progressing(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_Completed(&self, eventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Completed(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT }} impl IPrintTask { - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn get_properties(&self) -> Result> { + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn get_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_source(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Source)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_options(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_options(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Options)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_previewing(&self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_previewing(&self, eventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Previewing)(self as *const _ as *mut _, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_previewing(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_previewing(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Previewing)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_submitting(&self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_submitting(&self, eventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Submitting)(self as *const _ as *mut _, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_submitting(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_submitting(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Submitting)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_progressing(&self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_progressing(&self, eventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Progressing)(self as *const _ as *mut _, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_progressing(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_progressing(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Progressing)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_completed(&self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_completed(&self, eventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Completed)(self as *const _ as *mut _, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_completed(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_completed(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Completed)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PrintTask: IPrintTask} DEFINE_IID!(IID_IPrintTask2, 908281975, 15955, 19869, 143, 94, 49, 106, 200, 222, 218, 225); @@ -3033,26 +3033,26 @@ RT_INTERFACE!{interface IPrintTask2(IPrintTask2Vtbl): IInspectable(IInspectableV fn get_IsPreviewEnabled(&self, out: *mut bool) -> HRESULT }} impl IPrintTask2 { - #[inline] pub unsafe fn set_is_preview_enabled(&self, value: bool) -> Result<()> { + #[inline] pub fn set_is_preview_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsPreviewEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_preview_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_preview_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPreviewEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, out: *mut PrintTaskCompletion) -> HRESULT }} impl IPrintTaskCompletedEventArgs { - #[inline] pub unsafe fn get_completion(&self) -> Result { + #[inline] pub fn get_completion(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Completion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PrintTaskCompletedEventArgs: IPrintTaskCompletedEventArgs} RT_ENUM! { enum PrintTaskCompletion: i32 { @@ -3065,20 +3065,20 @@ RT_INTERFACE!{interface IPrintTaskOptions(IPrintTaskOptionsVtbl): IInspectable(I #[cfg(feature="windows-storage")] fn GetPagePrintTicket(&self, printPageInfo: *mut PrintPageInfo, out: *mut *mut super::super::storage::streams::IRandomAccessStream) -> HRESULT }} impl IPrintTaskOptions { - #[inline] pub unsafe fn set_bordering(&self, value: PrintBordering) -> Result<()> { + #[inline] pub fn set_bordering(&self, value: PrintBordering) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Bordering)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_bordering(&self) -> Result { + }} + #[inline] pub fn get_bordering(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Bordering)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_page_print_ticket(&self, printPageInfo: &PrintPageInfo) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_page_print_ticket(&self, printPageInfo: &PrintPageInfo) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPagePrintTicket)(self as *const _ as *mut _, printPageInfo as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PrintTaskOptions: IPrintTaskOptionsCore} DEFINE_IID!(IID_IPrintTaskOptionsCore, 467383412, 20177, 16875, 190, 60, 114, 209, 142, 214, 115, 55); @@ -3086,11 +3086,11 @@ RT_INTERFACE!{interface IPrintTaskOptionsCore(IPrintTaskOptionsCoreVtbl): IInspe fn GetPageDescription(&self, jobPageNumber: u32, out: *mut PrintPageDescription) -> HRESULT }} impl IPrintTaskOptionsCore { - #[inline] pub unsafe fn get_page_description(&self, jobPageNumber: u32) -> Result { + #[inline] pub fn get_page_description(&self, jobPageNumber: u32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetPageDescription)(self as *const _ as *mut _, jobPageNumber, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IPrintTaskOptionsCoreProperties, 3250001970, 40595, 20053, 129, 75, 51, 38, 165, 158, 252, 225); RT_INTERFACE!{interface IPrintTaskOptionsCoreProperties(IPrintTaskOptionsCorePropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IPrintTaskOptionsCoreProperties] { @@ -3120,161 +3120,161 @@ RT_INTERFACE!{interface IPrintTaskOptionsCoreProperties(IPrintTaskOptionsCorePro fn get_NumberOfCopies(&self, out: *mut u32) -> HRESULT }} impl IPrintTaskOptionsCoreProperties { - #[inline] pub unsafe fn set_media_size(&self, value: PrintMediaSize) -> Result<()> { + #[inline] pub fn set_media_size(&self, value: PrintMediaSize) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MediaSize)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_media_size(&self) -> Result { + }} + #[inline] pub fn get_media_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MediaSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_media_type(&self, value: PrintMediaType) -> Result<()> { + }} + #[inline] pub fn set_media_type(&self, value: PrintMediaType) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MediaType)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_media_type(&self) -> Result { + }} + #[inline] pub fn get_media_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MediaType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_orientation(&self, value: PrintOrientation) -> Result<()> { + }} + #[inline] pub fn set_orientation(&self, value: PrintOrientation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Orientation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_orientation(&self) -> Result { + }} + #[inline] pub fn get_orientation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Orientation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_print_quality(&self, value: PrintQuality) -> Result<()> { + }} + #[inline] pub fn set_print_quality(&self, value: PrintQuality) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PrintQuality)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_print_quality(&self) -> Result { + }} + #[inline] pub fn get_print_quality(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PrintQuality)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_color_mode(&self, value: PrintColorMode) -> Result<()> { + }} + #[inline] pub fn set_color_mode(&self, value: PrintColorMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ColorMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_color_mode(&self) -> Result { + }} + #[inline] pub fn get_color_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ColorMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_duplex(&self, value: PrintDuplex) -> Result<()> { + }} + #[inline] pub fn set_duplex(&self, value: PrintDuplex) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Duplex)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_duplex(&self) -> Result { + }} + #[inline] pub fn get_duplex(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Duplex)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_collation(&self, value: PrintCollation) -> Result<()> { + }} + #[inline] pub fn set_collation(&self, value: PrintCollation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Collation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_collation(&self) -> Result { + }} + #[inline] pub fn get_collation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Collation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_staple(&self, value: PrintStaple) -> Result<()> { + }} + #[inline] pub fn set_staple(&self, value: PrintStaple) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Staple)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_staple(&self) -> Result { + }} + #[inline] pub fn get_staple(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Staple)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_hole_punch(&self, value: PrintHolePunch) -> Result<()> { + }} + #[inline] pub fn set_hole_punch(&self, value: PrintHolePunch) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_HolePunch)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_hole_punch(&self) -> Result { + }} + #[inline] pub fn get_hole_punch(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HolePunch)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_binding(&self, value: PrintBinding) -> Result<()> { + }} + #[inline] pub fn set_binding(&self, value: PrintBinding) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Binding)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_binding(&self) -> Result { + }} + #[inline] pub fn get_binding(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Binding)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_copies(&self) -> Result { + }} + #[inline] pub fn get_min_copies(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinCopies)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_copies(&self) -> Result { + }} + #[inline] pub fn get_max_copies(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxCopies)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_number_of_copies(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_number_of_copies(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_NumberOfCopies)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_number_of_copies(&self) -> Result { + }} + #[inline] pub fn get_number_of_copies(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NumberOfCopies)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_DisplayedOptions(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IPrintTaskOptionsCoreUIConfiguration { - #[inline] pub unsafe fn get_displayed_options(&self) -> Result>> { + #[inline] pub fn get_displayed_options(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayedOptions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut u32) -> HRESULT }} impl IPrintTaskProgressingEventArgs { - #[inline] pub unsafe fn get_document_page_count(&self) -> Result { + #[inline] pub fn get_document_page_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DocumentPageCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PrintTaskProgressingEventArgs: IPrintTaskProgressingEventArgs} 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(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Deadline(&self, out: *mut foundation::DateTime) -> HRESULT, fn CreatePrintTask(&self, title: HSTRING, handler: *mut PrintTaskSourceRequestedHandler, out: *mut *mut PrintTask) -> HRESULT, fn GetDeferral(&self, out: *mut *mut PrintTaskRequestedDeferral) -> HRESULT }} impl IPrintTaskRequest { - #[inline] pub unsafe fn get_deadline(&self) -> Result { + #[inline] pub fn get_deadline(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Deadline)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn create_print_task(&self, title: &HStringArg, handler: &PrintTaskSourceRequestedHandler) -> Result> { + }} + #[inline] pub fn create_print_task(&self, title: &HStringArg, handler: &PrintTaskSourceRequestedHandler) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreatePrintTask)(self as *const _ as *mut _, 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(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PrintTaskRequest: IPrintTaskRequest} DEFINE_IID!(IID_IPrintTaskRequestedDeferral, 3488592880, 52798, 17095, 148, 150, 100, 128, 12, 98, 44, 68); @@ -3282,10 +3282,10 @@ RT_INTERFACE!{interface IPrintTaskRequestedDeferral(IPrintTaskRequestedDeferralV fn Complete(&self) -> HRESULT }} impl IPrintTaskRequestedDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PrintTaskRequestedDeferral: IPrintTaskRequestedDeferral} DEFINE_IID!(IID_IPrintTaskRequestedEventArgs, 3501193508, 41755, 17740, 167, 182, 93, 12, 197, 34, 252, 22); @@ -3293,34 +3293,34 @@ RT_INTERFACE!{interface IPrintTaskRequestedEventArgs(IPrintTaskRequestedEventArg fn get_Request(&self, out: *mut *mut PrintTaskRequest) -> HRESULT }} impl IPrintTaskRequestedEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PrintTaskRequestedEventArgs: IPrintTaskRequestedEventArgs} 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(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Deadline(&self, out: *mut foundation::DateTime) -> HRESULT, fn SetSource(&self, source: *mut IPrintDocumentSource) -> HRESULT, fn GetDeferral(&self, out: *mut *mut PrintTaskSourceRequestedDeferral) -> HRESULT }} impl IPrintTaskSourceRequestedArgs { - #[inline] pub unsafe fn get_deadline(&self) -> Result { + #[inline] pub fn get_deadline(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Deadline)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_source(&self, source: &IPrintDocumentSource) -> Result<()> { + }} + #[inline] pub fn set_source(&self, source: &IPrintDocumentSource) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetSource)(self as *const _ as *mut _, source as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PrintTaskSourceRequestedArgs: IPrintTaskSourceRequestedArgs} DEFINE_IID!(IID_IPrintTaskSourceRequestedDeferral, 1242915025, 27026, 19869, 133, 85, 76, 164, 86, 63, 177, 102); @@ -3328,10 +3328,10 @@ RT_INTERFACE!{interface IPrintTaskSourceRequestedDeferral(IPrintTaskSourceReques fn Complete(&self) -> HRESULT }} impl IPrintTaskSourceRequestedDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PrintTaskSourceRequestedDeferral: IPrintTaskSourceRequestedDeferral} DEFINE_IID!(IID_PrintTaskSourceRequestedHandler, 1813028776, 23734, 19258, 134, 99, 243, 156, 176, 45, 201, 180); @@ -3339,10 +3339,10 @@ RT_DELEGATE!{delegate PrintTaskSourceRequestedHandler(PrintTaskSourceRequestedHa fn Invoke(&self, args: *mut PrintTaskSourceRequestedArgs) -> HRESULT }} impl PrintTaskSourceRequestedHandler { - #[inline] pub unsafe fn invoke(&self, args: &PrintTaskSourceRequestedArgs) -> Result<()> { + #[inline] pub fn invoke(&self, args: &PrintTaskSourceRequestedArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, args as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IPrintTaskTargetDeviceSupport, 693989568, 49867, 19325, 176, 234, 147, 9, 80, 145, 162, 32); RT_INTERFACE!{interface IPrintTaskTargetDeviceSupport(IPrintTaskTargetDeviceSupportVtbl): IInspectable(IInspectableVtbl) [IID_IPrintTaskTargetDeviceSupport] { @@ -3352,71 +3352,71 @@ RT_INTERFACE!{interface IPrintTaskTargetDeviceSupport(IPrintTaskTargetDeviceSupp fn get_Is3DManufacturingTargetEnabled(&self, out: *mut bool) -> HRESULT }} impl IPrintTaskTargetDeviceSupport { - #[inline] pub unsafe fn set_is_printer_target_enabled(&self, value: bool) -> Result<()> { + #[inline] pub fn set_is_printer_target_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsPrinterTargetEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_printer_target_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_printer_target_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPrinterTargetEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is3_dmanufacturing_target_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is3_dmanufacturing_target_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Is3DManufacturingTargetEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is3_dmanufacturing_target_enabled(&self) -> Result { + }} + #[inline] pub fn get_is3_dmanufacturing_target_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Is3DManufacturingTargetEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{static class StandardPrintTaskOptions} impl RtActivatable for StandardPrintTaskOptions {} impl RtActivatable for StandardPrintTaskOptions {} impl StandardPrintTaskOptions { - #[inline] pub fn get_media_size() -> Result { unsafe { + #[inline] pub fn get_media_size() -> Result { >::get_activation_factory().get_media_size() - }} - #[inline] pub fn get_media_type() -> Result { unsafe { + } + #[inline] pub fn get_media_type() -> Result { >::get_activation_factory().get_media_type() - }} - #[inline] pub fn get_orientation() -> Result { unsafe { + } + #[inline] pub fn get_orientation() -> Result { >::get_activation_factory().get_orientation() - }} - #[inline] pub fn get_print_quality() -> Result { unsafe { + } + #[inline] pub fn get_print_quality() -> Result { >::get_activation_factory().get_print_quality() - }} - #[inline] pub fn get_color_mode() -> Result { unsafe { + } + #[inline] pub fn get_color_mode() -> Result { >::get_activation_factory().get_color_mode() - }} - #[inline] pub fn get_duplex() -> Result { unsafe { + } + #[inline] pub fn get_duplex() -> Result { >::get_activation_factory().get_duplex() - }} - #[inline] pub fn get_collation() -> Result { unsafe { + } + #[inline] pub fn get_collation() -> Result { >::get_activation_factory().get_collation() - }} - #[inline] pub fn get_staple() -> Result { unsafe { + } + #[inline] pub fn get_staple() -> Result { >::get_activation_factory().get_staple() - }} - #[inline] pub fn get_hole_punch() -> Result { unsafe { + } + #[inline] pub fn get_hole_punch() -> Result { >::get_activation_factory().get_hole_punch() - }} - #[inline] pub fn get_binding() -> Result { unsafe { + } + #[inline] pub fn get_binding() -> Result { >::get_activation_factory().get_binding() - }} - #[inline] pub fn get_copies() -> Result { unsafe { + } + #[inline] pub fn get_copies() -> Result { >::get_activation_factory().get_copies() - }} - #[inline] pub fn get_nup() -> Result { unsafe { + } + #[inline] pub fn get_nup() -> Result { >::get_activation_factory().get_nup() - }} - #[inline] pub fn get_input_bin() -> Result { unsafe { + } + #[inline] pub fn get_input_bin() -> Result { >::get_activation_factory().get_input_bin() - }} - #[inline] pub fn get_bordering() -> Result { unsafe { + } + #[inline] pub fn get_bordering() -> Result { >::get_activation_factory().get_bordering() - }} + } } DEFINE_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]) [CLSID_StandardPrintTaskOptions]); DEFINE_IID!(IID_IStandardPrintTaskOptionsStatic, 3024633126, 3536, 19668, 186, 255, 147, 15, 199, 214, 165, 116); @@ -3436,82 +3436,82 @@ RT_INTERFACE!{static interface IStandardPrintTaskOptionsStatic(IStandardPrintTas fn get_InputBin(&self, out: *mut HSTRING) -> HRESULT }} impl IStandardPrintTaskOptionsStatic { - #[inline] pub unsafe fn get_media_size(&self) -> Result { + #[inline] pub fn get_media_size(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MediaSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_media_type(&self) -> Result { + }} + #[inline] pub fn get_media_type(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MediaType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_orientation(&self) -> Result { + }} + #[inline] pub fn get_orientation(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Orientation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_print_quality(&self) -> Result { + }} + #[inline] pub fn get_print_quality(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PrintQuality)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_color_mode(&self) -> Result { + }} + #[inline] pub fn get_color_mode(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ColorMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_duplex(&self) -> Result { + }} + #[inline] pub fn get_duplex(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Duplex)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_collation(&self) -> Result { + }} + #[inline] pub fn get_collation(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Collation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_staple(&self) -> Result { + }} + #[inline] pub fn get_staple(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Staple)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_hole_punch(&self) -> Result { + }} + #[inline] pub fn get_hole_punch(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HolePunch)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_binding(&self) -> Result { + }} + #[inline] pub fn get_binding(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Binding)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_copies(&self) -> Result { + }} + #[inline] pub fn get_copies(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Copies)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_nup(&self) -> Result { + }} + #[inline] pub fn get_nup(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NUp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_input_bin(&self) -> Result { + }} + #[inline] pub fn get_input_bin(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InputBin)(self as *const _ as *mut _, &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(&self, out: *mut HSTRING) -> HRESULT }} impl IStandardPrintTaskOptionsStatic2 { - #[inline] pub unsafe fn get_bordering(&self) -> Result { + #[inline] pub fn get_bordering(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Bordering)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } pub mod optiondetails { // Windows.Graphics.Printing.OptionDetails use ::prelude::*; @@ -3527,20 +3527,20 @@ RT_INTERFACE!{interface IPrintCustomItemDetails(IPrintCustomItemDetailsVtbl): II fn get_ItemDisplayName(&self, out: *mut HSTRING) -> HRESULT }} impl IPrintCustomItemDetails { - #[inline] pub unsafe fn get_item_id(&self) -> Result { + #[inline] pub fn get_item_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ItemId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_item_display_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_item_display_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ItemDisplayName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_item_display_name(&self) -> Result { + }} + #[inline] pub fn get_item_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ItemDisplayName)(self as *const _ as *mut _, &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); @@ -3548,10 +3548,10 @@ RT_INTERFACE!{interface IPrintCustomItemListOptionDetails(IPrintCustomItemListOp fn AddItem(&self, itemId: HSTRING, displayName: HSTRING) -> HRESULT }} impl IPrintCustomItemListOptionDetails { - #[inline] pub unsafe fn add_item(&self, itemId: &HStringArg, displayName: &HStringArg) -> Result<()> { + #[inline] pub fn add_item(&self, itemId: &HStringArg, displayName: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddItem)(self as *const _ as *mut _, itemId.get(), displayName.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PrintCustomItemListOptionDetails: IPrintOptionDetails} DEFINE_IID!(IID_IPrintCustomOptionDetails, 3811302940, 10415, 19344, 149, 218, 163, 172, 243, 32, 185, 41); @@ -3560,15 +3560,15 @@ RT_INTERFACE!{interface IPrintCustomOptionDetails(IPrintCustomOptionDetailsVtbl) fn get_DisplayName(&self, out: *mut HSTRING) -> HRESULT }} impl IPrintCustomOptionDetails { - #[inline] pub unsafe fn set_display_name(&self, value: &HStringArg) -> Result<()> { + #[inline] pub fn set_display_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &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] { @@ -3576,29 +3576,29 @@ RT_INTERFACE!{interface IPrintCustomTextOptionDetails(IPrintCustomTextOptionDeta fn get_MaxCharacters(&self, out: *mut u32) -> HRESULT }} impl IPrintCustomTextOptionDetails { - #[inline] pub unsafe fn set_max_characters(&self, value: u32) -> Result<()> { + #[inline] pub fn set_max_characters(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxCharacters)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_characters(&self) -> Result { + }} + #[inline] pub fn get_max_characters(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxCharacters)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PrintCustomTextOptionDetails: IPrintOptionDetails} RT_CLASS!{class PrintDuplexOptionDetails: IPrintOptionDetails} RT_CLASS!{class PrintHolePunchOptionDetails: IPrintOptionDetails} 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(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn get_Items(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IPrintItemListOptionDetails { - #[inline] pub unsafe fn get_items(&self) -> Result>> { + #[inline] pub fn get_items(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Items)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PrintMediaSizeOptionDetails: IPrintOptionDetails} RT_CLASS!{class PrintMediaTypeOptionDetails: IPrintOptionDetails} @@ -3608,16 +3608,16 @@ RT_INTERFACE!{interface IPrintNumberOptionDetails(IPrintNumberOptionDetailsVtbl) fn get_MaxValue(&self, out: *mut u32) -> HRESULT }} impl IPrintNumberOptionDetails { - #[inline] pub unsafe fn get_min_value(&self) -> Result { + #[inline] pub fn get_min_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinValue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_value(&self) -> Result { + }} + #[inline] pub fn get_max_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxValue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IPrintOptionDetails, 956729039, 54914, 18783, 173, 254, 215, 51, 63, 92, 24, 8); RT_INTERFACE!{interface IPrintOptionDetails(IPrintOptionDetailsVtbl): IInspectable(IInspectableVtbl) [IID_IPrintOptionDetails] { @@ -3631,44 +3631,44 @@ RT_INTERFACE!{interface IPrintOptionDetails(IPrintOptionDetailsVtbl): IInspectab fn TrySetValue(&self, value: *mut IInspectable, out: *mut bool) -> HRESULT }} impl IPrintOptionDetails { - #[inline] pub unsafe fn get_option_id(&self) -> Result { + #[inline] pub fn get_option_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OptionId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_option_type(&self) -> Result { + }} + #[inline] pub fn get_option_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OptionType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_error_text(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_error_text(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ErrorText)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_error_text(&self) -> Result { + }} + #[inline] pub fn get_error_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ErrorText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_state(&self, value: PrintOptionStates) -> Result<()> { + }} + #[inline] pub fn set_state(&self, value: PrintOptionStates) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_State)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_state(&self) -> Result { + }} + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result> { + }} + #[inline] pub fn get_value(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_set_value(&self, value: &IInspectable) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn try_set_value(&self, value: &IInspectable) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TrySetValue)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum PrintOptionStates: u32 { None (PrintOptionStates_None) = 0, Enabled (PrintOptionStates_Enabled) = 1, Constrained (PrintOptionStates_Constrained) = 2, @@ -3684,64 +3684,64 @@ RT_INTERFACE!{interface IPrintTaskOptionChangedEventArgs(IPrintTaskOptionChanged fn get_OptionId(&self, out: *mut *mut IInspectable) -> HRESULT }} impl IPrintTaskOptionChangedEventArgs { - #[inline] pub unsafe fn get_option_id(&self) -> Result> { + #[inline] pub fn get_option_id(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OptionId)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMapView) -> HRESULT, + fn get_Options(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT, fn CreateItemListOption(&self, optionId: HSTRING, displayName: HSTRING, out: *mut *mut PrintCustomItemListOptionDetails) -> HRESULT, fn CreateTextOption(&self, optionId: HSTRING, displayName: HSTRING, out: *mut *mut PrintCustomTextOptionDetails) -> HRESULT, - fn add_OptionChanged(&self, eventHandler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_OptionChanged(&self, eventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_BeginValidation(&self, eventHandler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_BeginValidation(&self, eventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn add_OptionChanged(&self, eventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_OptionChanged(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_BeginValidation(&self, eventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_BeginValidation(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT }} impl IPrintTaskOptionDetails { - #[inline] pub unsafe fn get_options(&self) -> Result>> { + #[inline] pub fn get_options(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Options)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_item_list_option(&self, optionId: &HStringArg, displayName: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_item_list_option(&self, optionId: &HStringArg, displayName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateItemListOption)(self as *const _ as *mut _, optionId.get(), displayName.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_text_option(&self, optionId: &HStringArg, displayName: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_text_option(&self, optionId: &HStringArg, displayName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateTextOption)(self as *const _ as *mut _, optionId.get(), displayName.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_option_changed(&self, eventHandler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_option_changed(&self, eventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_OptionChanged)(self as *const _ as *mut _, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_option_changed(&self, eventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_option_changed(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_OptionChanged)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_begin_validation(&self, eventHandler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_begin_validation(&self, eventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_BeginValidation)(self as *const _ as *mut _, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_begin_validation(&self, eventCookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_begin_validation(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_BeginValidation)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PrintTaskOptionDetails: IPrintTaskOptionDetails} impl RtActivatable for PrintTaskOptionDetails {} impl PrintTaskOptionDetails { - #[inline] pub fn get_from_print_task_options(printTaskOptions: &super::PrintTaskOptions) -> Result> { unsafe { + #[inline] pub fn get_from_print_task_options(printTaskOptions: &super::PrintTaskOptions) -> Result>> { >::get_activation_factory().get_from_print_task_options(printTaskOptions) - }} + } } DEFINE_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]) [CLSID_PrintTaskOptionDetails]); DEFINE_IID!(IID_IPrintTaskOptionDetailsStatic, 324903315, 2401, 19310, 135, 102, 241, 59, 127, 188, 205, 88); @@ -3749,22 +3749,22 @@ RT_INTERFACE!{static interface IPrintTaskOptionDetailsStatic(IPrintTaskOptionDet fn GetFromPrintTaskOptions(&self, printTaskOptions: *mut super::PrintTaskOptions, out: *mut *mut PrintTaskOptionDetails) -> HRESULT }} impl IPrintTaskOptionDetailsStatic { - #[inline] pub unsafe fn get_from_print_task_options(&self, printTaskOptions: &super::PrintTaskOptions) -> Result> { + #[inline] pub fn get_from_print_task_options(&self, printTaskOptions: &super::PrintTaskOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFromPrintTaskOptions)(self as *const _ as *mut _, printTaskOptions as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut u32) -> HRESULT }} impl IPrintTextOptionDetails { - #[inline] pub unsafe fn get_max_characters(&self) -> Result { + #[inline] pub fn get_max_characters(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxCharacters)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } } // Windows.Graphics.Printing.OptionDetails pub mod printticket { // Windows.Graphics.Printing.PrintTicket @@ -3794,106 +3794,106 @@ RT_INTERFACE!{interface IPrintTicketCapabilities(IPrintTicketCapabilitiesVtbl): fn GetParameterDefinition(&self, name: HSTRING, xmlNamespace: HSTRING, out: *mut *mut PrintTicketParameterDefinition) -> HRESULT }} impl IPrintTicketCapabilities { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_xml_namespace(&self) -> Result { + }} + #[inline] pub fn get_xml_namespace(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_XmlNamespace)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-data")] #[inline] pub unsafe fn get_xml_node(&self) -> Result> { + }} + #[cfg(feature="windows-data")] #[inline] pub fn get_xml_node(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_XmlNode)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_document_binding_feature(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_document_binding_feature(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DocumentBindingFeature)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_document_collate_feature(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_document_collate_feature(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DocumentCollateFeature)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_document_duplex_feature(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_document_duplex_feature(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DocumentDuplexFeature)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_document_hole_punch_feature(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_document_hole_punch_feature(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DocumentHolePunchFeature)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_document_input_bin_feature(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_document_input_bin_feature(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DocumentInputBinFeature)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_document_nup_feature(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_document_nup_feature(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DocumentNUpFeature)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_document_staple_feature(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_document_staple_feature(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DocumentStapleFeature)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_job_passcode_feature(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_job_passcode_feature(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_JobPasscodeFeature)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_page_borderless_feature(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_page_borderless_feature(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PageBorderlessFeature)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_page_media_size_feature(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_page_media_size_feature(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PageMediaSizeFeature)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_page_media_type_feature(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_page_media_type_feature(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PageMediaTypeFeature)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_page_orientation_feature(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_page_orientation_feature(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PageOrientationFeature)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_page_output_color_feature(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_page_output_color_feature(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PageOutputColorFeature)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_page_output_quality_feature(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_page_output_quality_feature(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PageOutputQualityFeature)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_page_resolution_feature(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_page_resolution_feature(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PageResolutionFeature)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_feature(&self, name: &HStringArg, xmlNamespace: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_feature(&self, name: &HStringArg, xmlNamespace: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFeature)(self as *const _ as *mut _, name.get(), xmlNamespace.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_parameter_definition(&self, name: &HStringArg, xmlNamespace: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_parameter_definition(&self, name: &HStringArg, xmlNamespace: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetParameterDefinition)(self as *const _ as *mut _, name.get(), xmlNamespace.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PrintTicketCapabilities: IPrintTicketCapabilities} DEFINE_IID!(IID_IPrintTicketFeature, 3881860458, 23029, 16643, 136, 88, 185, 119, 16, 150, 61, 57); @@ -3904,56 +3904,56 @@ RT_INTERFACE!{interface IPrintTicketFeature(IPrintTicketFeatureVtbl): IInspectab #[cfg(feature="windows-data")] fn get_XmlNode(&self, out: *mut *mut ::rt::gen::windows::data::xml::dom::IXmlNode) -> HRESULT, fn get_DisplayName(&self, out: *mut HSTRING) -> HRESULT, fn GetOption(&self, name: HSTRING, xmlNamespace: HSTRING, out: *mut *mut PrintTicketOption) -> HRESULT, - fn get_Options(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_Options(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn GetSelectedOption(&self, out: *mut *mut PrintTicketOption) -> HRESULT, fn SetSelectedOption(&self, value: *mut PrintTicketOption) -> HRESULT, fn get_SelectionType(&self, out: *mut PrintTicketFeatureSelectionType) -> HRESULT }} impl IPrintTicketFeature { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_xml_namespace(&self) -> Result { + }} + #[inline] pub fn get_xml_namespace(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_XmlNamespace)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-data")] #[inline] pub unsafe fn get_xml_node(&self) -> Result> { + }} + #[cfg(feature="windows-data")] #[inline] pub fn get_xml_node(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_XmlNode)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_option(&self, name: &HStringArg, xmlNamespace: &HStringArg) -> Result> { + }} + #[inline] pub fn get_option(&self, name: &HStringArg, xmlNamespace: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetOption)(self as *const _ as *mut _, name.get(), xmlNamespace.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_options(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_options(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Options)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_selected_option(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_selected_option(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSelectedOption)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_selected_option(&self, value: &PrintTicketOption) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_selected_option(&self, value: &PrintTicketOption) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetSelectedOption)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_selection_type(&self) -> Result { + }} + #[inline] pub fn get_selection_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SelectionType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PrintTicketFeature: IPrintTicketFeature} RT_ENUM! { enum PrintTicketFeatureSelectionType: i32 { @@ -3974,46 +3974,46 @@ RT_INTERFACE!{interface IPrintTicketOption(IPrintTicketOptionVtbl): IInspectable fn GetScoredPropertyValue(&self, name: HSTRING, xmlNamespace: HSTRING, out: *mut *mut PrintTicketValue) -> HRESULT }} impl IPrintTicketOption { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_xml_namespace(&self) -> Result { + }} + #[inline] pub fn get_xml_namespace(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_XmlNamespace)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-data")] #[inline] pub unsafe fn get_xml_node(&self) -> Result> { + }} + #[cfg(feature="windows-data")] #[inline] pub fn get_xml_node(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_XmlNode)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-data")] #[inline] pub unsafe fn get_property_node(&self, name: &HStringArg, xmlNamespace: &HStringArg) -> Result> { + }} + #[cfg(feature="windows-data")] #[inline] pub fn get_property_node(&self, name: &HStringArg, xmlNamespace: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPropertyNode)(self as *const _ as *mut _, name.get(), xmlNamespace.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-data")] #[inline] pub unsafe fn get_scored_property_node(&self, name: &HStringArg, xmlNamespace: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-data")] #[inline] pub fn get_scored_property_node(&self, name: &HStringArg, xmlNamespace: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetScoredPropertyNode)(self as *const _ as *mut _, name.get(), xmlNamespace.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_property_value(&self, name: &HStringArg, xmlNamespace: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_property_value(&self, name: &HStringArg, xmlNamespace: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPropertyValue)(self as *const _ as *mut _, name.get(), xmlNamespace.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_scored_property_value(&self, name: &HStringArg, xmlNamespace: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_scored_property_value(&self, name: &HStringArg, xmlNamespace: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetScoredPropertyValue)(self as *const _ as *mut _, name.get(), xmlNamespace.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PrintTicketOption: IPrintTicketOption} RT_ENUM! { enum PrintTicketParameterDataType: i32 { @@ -4031,41 +4031,41 @@ RT_INTERFACE!{interface IPrintTicketParameterDefinition(IPrintTicketParameterDef fn get_RangeMax(&self, out: *mut i32) -> HRESULT }} impl IPrintTicketParameterDefinition { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_xml_namespace(&self) -> Result { + }} + #[inline] pub fn get_xml_namespace(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_XmlNamespace)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-data")] #[inline] pub unsafe fn get_xml_node(&self) -> Result> { + }} + #[cfg(feature="windows-data")] #[inline] pub fn get_xml_node(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_XmlNode)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_data_type(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_data_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DataType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_unit_type(&self) -> Result { + }} + #[inline] pub fn get_unit_type(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UnitType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_range_min(&self) -> Result { + }} + #[inline] pub fn get_range_min(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RangeMin)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_range_max(&self) -> Result { + }} + #[inline] pub fn get_range_max(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RangeMax)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PrintTicketParameterDefinition: IPrintTicketParameterDefinition} DEFINE_IID!(IID_IPrintTicketParameterInitializer, 1580414395, 41125, 18609, 157, 92, 7, 17, 109, 220, 89, 122); @@ -4078,30 +4078,30 @@ RT_INTERFACE!{interface IPrintTicketParameterInitializer(IPrintTicketParameterIn fn get_Value(&self, out: *mut *mut PrintTicketValue) -> HRESULT }} impl IPrintTicketParameterInitializer { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_xml_namespace(&self) -> Result { + }} + #[inline] pub fn get_xml_namespace(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_XmlNamespace)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-data")] #[inline] pub unsafe fn get_xml_node(&self) -> Result> { + }} + #[cfg(feature="windows-data")] #[inline] pub fn get_xml_node(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_XmlNode)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_value(&self, value: &PrintTicketValue) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_value(&self, value: &PrintTicketValue) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Value)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result> { + }} + #[inline] pub fn get_value(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PrintTicketParameterInitializer: IPrintTicketParameterInitializer} DEFINE_IID!(IID_IPrintTicketValue, 1723009586, 9293, 20002, 169, 139, 187, 60, 241, 242, 221, 145); @@ -4111,21 +4111,21 @@ RT_INTERFACE!{interface IPrintTicketValue(IPrintTicketValueVtbl): IInspectable(I fn GetValueAsString(&self, out: *mut HSTRING) -> HRESULT }} impl IPrintTicketValue { - #[inline] pub unsafe fn get_type(&self) -> Result { + #[inline] pub fn get_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Type)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_value_as_integer(&self) -> Result { + }} + #[inline] pub fn get_value_as_integer(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetValueAsInteger)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_value_as_string(&self) -> Result { + }} + #[inline] pub fn get_value_as_string(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetValueAsString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PrintTicketValue: IPrintTicketValue} RT_ENUM! { enum PrintTicketValueType: i32 { @@ -4154,162 +4154,162 @@ RT_INTERFACE!{interface IWorkflowPrintTicket(IWorkflowPrintTicketVtbl): IInspect fn get_PageOutputQualityFeature(&self, out: *mut *mut PrintTicketFeature) -> HRESULT, fn get_PageResolutionFeature(&self, out: *mut *mut PrintTicketFeature) -> HRESULT, fn GetFeature(&self, name: HSTRING, xmlNamespace: HSTRING, out: *mut *mut PrintTicketFeature) -> HRESULT, - fn NotifyXmlChangedAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ValidateAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn NotifyXmlChangedAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ValidateAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetParameterInitializer(&self, name: HSTRING, xmlNamespace: HSTRING, out: *mut *mut PrintTicketParameterInitializer) -> HRESULT, fn SetParameterInitializerAsInteger(&self, name: HSTRING, xmlNamespace: HSTRING, integerValue: i32, out: *mut *mut PrintTicketParameterInitializer) -> HRESULT, fn SetParameterInitializerAsString(&self, name: HSTRING, xmlNamespace: HSTRING, stringValue: HSTRING, out: *mut *mut PrintTicketParameterInitializer) -> HRESULT, fn MergeAndValidateTicket(&self, deltaShemaTicket: *mut WorkflowPrintTicket, out: *mut *mut WorkflowPrintTicket) -> HRESULT }} impl IWorkflowPrintTicket { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_xml_namespace(&self) -> Result { + }} + #[inline] pub fn get_xml_namespace(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_XmlNamespace)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-data")] #[inline] pub unsafe fn get_xml_node(&self) -> Result> { + }} + #[cfg(feature="windows-data")] #[inline] pub fn get_xml_node(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_XmlNode)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_capabilities(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_capabilities(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCapabilities)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_document_binding_feature(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_document_binding_feature(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DocumentBindingFeature)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_document_collate_feature(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_document_collate_feature(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DocumentCollateFeature)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_document_duplex_feature(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_document_duplex_feature(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DocumentDuplexFeature)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_document_hole_punch_feature(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_document_hole_punch_feature(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DocumentHolePunchFeature)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_document_input_bin_feature(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_document_input_bin_feature(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DocumentInputBinFeature)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_document_nup_feature(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_document_nup_feature(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DocumentNUpFeature)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_document_staple_feature(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_document_staple_feature(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DocumentStapleFeature)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_job_passcode_feature(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_job_passcode_feature(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_JobPasscodeFeature)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_page_borderless_feature(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_page_borderless_feature(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PageBorderlessFeature)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_page_media_size_feature(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_page_media_size_feature(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PageMediaSizeFeature)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_page_media_type_feature(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_page_media_type_feature(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PageMediaTypeFeature)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_page_orientation_feature(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_page_orientation_feature(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PageOrientationFeature)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_page_output_color_feature(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_page_output_color_feature(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PageOutputColorFeature)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_page_output_quality_feature(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_page_output_quality_feature(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PageOutputQualityFeature)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_page_resolution_feature(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_page_resolution_feature(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PageResolutionFeature)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_feature(&self, name: &HStringArg, xmlNamespace: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_feature(&self, name: &HStringArg, xmlNamespace: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFeature)(self as *const _ as *mut _, name.get(), xmlNamespace.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn notify_xml_changed_async(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn notify_xml_changed_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).NotifyXmlChangedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn validate_async(&self) -> Result>> { + }} + #[inline] pub fn validate_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ValidateAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_parameter_initializer(&self, name: &HStringArg, xmlNamespace: &HStringArg) -> Result> { + }} + #[inline] pub fn get_parameter_initializer(&self, name: &HStringArg, xmlNamespace: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetParameterInitializer)(self as *const _ as *mut _, name.get(), xmlNamespace.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_parameter_initializer_as_integer(&self, name: &HStringArg, xmlNamespace: &HStringArg, integerValue: i32) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_parameter_initializer_as_integer(&self, name: &HStringArg, xmlNamespace: &HStringArg, integerValue: i32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetParameterInitializerAsInteger)(self as *const _ as *mut _, name.get(), xmlNamespace.get(), integerValue, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_parameter_initializer_as_string(&self, name: &HStringArg, xmlNamespace: &HStringArg, stringValue: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_parameter_initializer_as_string(&self, name: &HStringArg, xmlNamespace: &HStringArg, stringValue: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetParameterInitializerAsString)(self as *const _ as *mut _, name.get(), xmlNamespace.get(), stringValue.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn merge_and_validate_ticket(&self, deltaShemaTicket: &WorkflowPrintTicket) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn merge_and_validate_ticket(&self, deltaShemaTicket: &WorkflowPrintTicket) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MergeAndValidateTicket)(self as *const _ as *mut _, deltaShemaTicket as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class WorkflowPrintTicket: IWorkflowPrintTicket} DEFINE_IID!(IID_IWorkflowPrintTicketValidationResult, 181531538, 55931, 18998, 191, 54, 106, 153, 166, 46, 32, 89); RT_INTERFACE!{interface IWorkflowPrintTicketValidationResult(IWorkflowPrintTicketValidationResultVtbl): IInspectable(IInspectableVtbl) [IID_IWorkflowPrintTicketValidationResult] { fn get_Validated(&self, out: *mut bool) -> HRESULT, - fn get_ExtendedError(&self, out: *mut ::rt::gen::windows::foundation::HResult) -> HRESULT + fn get_ExtendedError(&self, out: *mut foundation::HResult) -> HRESULT }} impl IWorkflowPrintTicketValidationResult { - #[inline] pub unsafe fn get_validated(&self) -> Result { + #[inline] pub fn get_validated(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Validated)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_error(&self) -> Result<::rt::gen::windows::foundation::HResult> { + }} + #[inline] pub fn get_extended_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class WorkflowPrintTicketValidationResult: IWorkflowPrintTicketValidationResult} } // Windows.Graphics.Printing.PrintTicket @@ -4317,70 +4317,70 @@ pub mod workflow { // Windows.Graphics.Printing.Workflow use ::prelude::*; DEFINE_IID!(IID_IPrintWorkflowBackgroundSession, 1534661562, 3166, 21130, 116, 88, 134, 164, 108, 189, 220, 69); RT_INTERFACE!{interface IPrintWorkflowBackgroundSession(IPrintWorkflowBackgroundSessionVtbl): IInspectable(IInspectableVtbl) [IID_IPrintWorkflowBackgroundSession] { - fn add_SetupRequested(&self, setupEventHandler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SetupRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_Submitted(&self, submittedEventHandler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Submitted(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_SetupRequested(&self, setupEventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SetupRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Submitted(&self, submittedEventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Submitted(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_Status(&self, out: *mut PrintWorkflowSessionStatus) -> HRESULT, fn Start(&self) -> HRESULT }} impl IPrintWorkflowBackgroundSession { - #[inline] pub unsafe fn add_setup_requested(&self, setupEventHandler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub fn add_setup_requested(&self, setupEventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SetupRequested)(self as *const _ as *mut _, setupEventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_setup_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_setup_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SetupRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_submitted(&self, submittedEventHandler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_submitted(&self, submittedEventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Submitted)(self as *const _ as *mut _, submittedEventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_submitted(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_submitted(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Submitted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PrintWorkflowBackgroundSession: IPrintWorkflowBackgroundSession} DEFINE_IID!(IID_IPrintWorkflowBackgroundSetupRequestedEventArgs, 1139372866, 5968, 22985, 97, 251, 56, 55, 72, 162, 3, 98); RT_INTERFACE!{interface IPrintWorkflowBackgroundSetupRequestedEventArgs(IPrintWorkflowBackgroundSetupRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPrintWorkflowBackgroundSetupRequestedEventArgs] { - fn GetUserPrintTicketAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn GetUserPrintTicketAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn get_Configuration(&self, out: *mut *mut PrintWorkflowConfiguration) -> HRESULT, fn SetRequiresUI(&self) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IPrintWorkflowBackgroundSetupRequestedEventArgs { - #[inline] pub unsafe fn get_user_print_ticket_async(&self) -> Result>> { + #[inline] pub fn get_user_print_ticket_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetUserPrintTicketAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_configuration(&self) -> Result> { + }} + #[inline] pub fn get_configuration(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Configuration)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_requires_ui(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_requires_ui(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetRequiresUI)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PrintWorkflowBackgroundSetupRequestedEventArgs: IPrintWorkflowBackgroundSetupRequestedEventArgs} DEFINE_IID!(IID_IPrintWorkflowConfiguration, 3500852461, 64843, 24053, 75, 182, 141, 13, 21, 158, 190, 63); @@ -4390,84 +4390,84 @@ RT_INTERFACE!{interface IPrintWorkflowConfiguration(IPrintWorkflowConfigurationV fn get_SessionId(&self, out: *mut HSTRING) -> HRESULT }} impl IPrintWorkflowConfiguration { - #[inline] pub unsafe fn get_source_app_display_name(&self) -> Result { + #[inline] pub fn get_source_app_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SourceAppDisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_job_title(&self) -> Result { + }} + #[inline] pub fn get_job_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_JobTitle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_session_id(&self) -> Result { + }} + #[inline] pub fn get_session_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SessionId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PrintWorkflowConfiguration: IPrintWorkflowConfiguration} DEFINE_IID!(IID_IPrintWorkflowForegroundSession, 3348849616, 63724, 19691, 149, 58, 200, 135, 97, 87, 221, 51); RT_INTERFACE!{interface IPrintWorkflowForegroundSession(IPrintWorkflowForegroundSessionVtbl): IInspectable(IInspectableVtbl) [IID_IPrintWorkflowForegroundSession] { - fn add_SetupRequested(&self, setupEventHandler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SetupRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_XpsDataAvailable(&self, xpsDataAvailableEventHandler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_XpsDataAvailable(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_SetupRequested(&self, setupEventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SetupRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_XpsDataAvailable(&self, xpsDataAvailableEventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_XpsDataAvailable(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_Status(&self, out: *mut PrintWorkflowSessionStatus) -> HRESULT, fn Start(&self) -> HRESULT }} impl IPrintWorkflowForegroundSession { - #[inline] pub unsafe fn add_setup_requested(&self, setupEventHandler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub fn add_setup_requested(&self, setupEventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SetupRequested)(self as *const _ as *mut _, setupEventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_setup_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_setup_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SetupRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_xps_data_available(&self, xpsDataAvailableEventHandler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_xps_data_available(&self, xpsDataAvailableEventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_XpsDataAvailable)(self as *const _ as *mut _, xpsDataAvailableEventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_xps_data_available(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_xps_data_available(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_XpsDataAvailable)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PrintWorkflowForegroundSession: IPrintWorkflowForegroundSession} DEFINE_IID!(IID_IPrintWorkflowForegroundSetupRequestedEventArgs, 3152249415, 39963, 19923, 155, 43, 200, 4, 104, 217, 65, 179); RT_INTERFACE!{interface IPrintWorkflowForegroundSetupRequestedEventArgs(IPrintWorkflowForegroundSetupRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPrintWorkflowForegroundSetupRequestedEventArgs] { - fn GetUserPrintTicketAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn GetUserPrintTicketAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn get_Configuration(&self, out: *mut *mut PrintWorkflowConfiguration) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IPrintWorkflowForegroundSetupRequestedEventArgs { - #[inline] pub unsafe fn get_user_print_ticket_async(&self) -> Result>> { + #[inline] pub fn get_user_print_ticket_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetUserPrintTicketAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_configuration(&self) -> Result> { + }} + #[inline] pub fn get_configuration(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Configuration)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PrintWorkflowForegroundSetupRequestedEventArgs: IPrintWorkflowForegroundSetupRequestedEventArgs} DEFINE_IID!(IID_IPrintWorkflowObjectModelSourceFileContent, 3278670442, 35370, 16794, 179, 195, 32, 144, 230, 191, 171, 47); @@ -4485,26 +4485,26 @@ RT_ENUM! { enum PrintWorkflowSessionStatus: i32 { }} DEFINE_IID!(IID_IPrintWorkflowSourceContent, 438879809, 52913, 17715, 187, 115, 251, 230, 62, 239, 219, 24); RT_INTERFACE!{interface IPrintWorkflowSourceContent(IPrintWorkflowSourceContentVtbl): IInspectable(IInspectableVtbl) [IID_IPrintWorkflowSourceContent] { - fn GetJobPrintTicketAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn GetJobPrintTicketAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetSourceSpoolDataAsStreamContent(&self, out: *mut *mut PrintWorkflowSpoolStreamContent) -> HRESULT, fn GetSourceSpoolDataAsXpsObjectModel(&self, out: *mut *mut PrintWorkflowObjectModelSourceFileContent) -> HRESULT }} impl IPrintWorkflowSourceContent { - #[inline] pub unsafe fn get_job_print_ticket_async(&self) -> Result>> { + #[inline] pub fn get_job_print_ticket_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetJobPrintTicketAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_source_spool_data_as_stream_content(&self) -> Result> { + }} + #[inline] pub fn get_source_spool_data_as_stream_content(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSourceSpoolDataAsStreamContent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_source_spool_data_as_xps_object_model(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_source_spool_data_as_xps_object_model(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSourceSpoolDataAsXpsObjectModel)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PrintWorkflowSourceContent: IPrintWorkflowSourceContent} DEFINE_IID!(IID_IPrintWorkflowSpoolStreamContent, 1927634638, 58374, 19316, 132, 225, 63, 243, 253, 205, 175, 112); @@ -4512,11 +4512,11 @@ RT_INTERFACE!{interface IPrintWorkflowSpoolStreamContent(IPrintWorkflowSpoolStre #[cfg(feature="windows-storage")] fn GetInputStream(&self, out: *mut *mut ::rt::gen::windows::storage::streams::IInputStream) -> HRESULT }} impl IPrintWorkflowSpoolStreamContent { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_input_stream(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_input_stream(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetInputStream)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PrintWorkflowSpoolStreamContent: IPrintWorkflowSpoolStreamContent} DEFINE_IID!(IID_IPrintWorkflowStreamTarget, 2990258820, 34149, 18571, 152, 57, 28, 158, 124, 122, 169, 22); @@ -4524,35 +4524,35 @@ RT_INTERFACE!{interface IPrintWorkflowStreamTarget(IPrintWorkflowStreamTargetVtb #[cfg(feature="windows-storage")] fn GetOutputStream(&self, out: *mut *mut ::rt::gen::windows::storage::streams::IOutputStream) -> HRESULT }} impl IPrintWorkflowStreamTarget { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_output_stream(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_output_stream(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetOutputStream)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PrintWorkflowStreamTarget: IPrintWorkflowStreamTarget} DEFINE_IID!(IID_IPrintWorkflowSubmittedEventArgs, 987564609, 14228, 21865, 92, 135, 64, 232, 255, 114, 15, 131); RT_INTERFACE!{interface IPrintWorkflowSubmittedEventArgs(IPrintWorkflowSubmittedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPrintWorkflowSubmittedEventArgs] { fn get_Operation(&self, out: *mut *mut PrintWorkflowSubmittedOperation) -> HRESULT, fn GetTarget(&self, jobPrintTicket: *mut super::printticket::WorkflowPrintTicket, out: *mut *mut PrintWorkflowTarget) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IPrintWorkflowSubmittedEventArgs { - #[inline] pub unsafe fn get_operation(&self) -> Result> { + #[inline] pub fn get_operation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Operation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_target(&self, jobPrintTicket: &super::printticket::WorkflowPrintTicket) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_target(&self, jobPrintTicket: &super::printticket::WorkflowPrintTicket) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetTarget)(self as *const _ as *mut _, jobPrintTicket as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PrintWorkflowSubmittedEventArgs: IPrintWorkflowSubmittedEventArgs} DEFINE_IID!(IID_IPrintWorkflowSubmittedOperation, 776888854, 15329, 24335, 92, 129, 165, 162, 189, 78, 171, 14); @@ -4562,20 +4562,20 @@ RT_INTERFACE!{interface IPrintWorkflowSubmittedOperation(IPrintWorkflowSubmitted fn get_XpsContent(&self, out: *mut *mut PrintWorkflowSourceContent) -> HRESULT }} impl IPrintWorkflowSubmittedOperation { - #[inline] pub unsafe fn complete(&self, status: PrintWorkflowSubmittedStatus) -> Result<()> { + #[inline] pub fn complete(&self, status: PrintWorkflowSubmittedStatus) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _, status); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_configuration(&self) -> Result> { + }} + #[inline] pub fn get_configuration(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Configuration)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_xps_content(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_xps_content(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_XpsContent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PrintWorkflowSubmittedOperation: IPrintWorkflowSubmittedOperation} RT_ENUM! { enum PrintWorkflowSubmittedStatus: i32 { @@ -4587,16 +4587,16 @@ RT_INTERFACE!{interface IPrintWorkflowTarget(IPrintWorkflowTargetVtbl): IInspect fn get_TargetAsXpsObjectModelPackage(&self, out: *mut *mut PrintWorkflowObjectModelTargetPackage) -> HRESULT }} impl IPrintWorkflowTarget { - #[inline] pub unsafe fn get_target_as_stream(&self) -> Result> { + #[inline] pub fn get_target_as_stream(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TargetAsStream)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_target_as_xps_object_model_package(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_target_as_xps_object_model_package(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TargetAsXpsObjectModelPackage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PrintWorkflowTarget: IPrintWorkflowTarget} DEFINE_IID!(IID_IPrintWorkflowTriggerDetails, 1463408744, 40326, 16466, 176, 203, 243, 16, 190, 205, 89, 187); @@ -4604,11 +4604,11 @@ RT_INTERFACE!{interface IPrintWorkflowTriggerDetails(IPrintWorkflowTriggerDetail fn get_PrintWorkflowSession(&self, out: *mut *mut PrintWorkflowBackgroundSession) -> HRESULT }} impl IPrintWorkflowTriggerDetails { - #[inline] pub unsafe fn get_print_workflow_session(&self) -> Result> { + #[inline] pub fn get_print_workflow_session(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PrintWorkflowSession)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PrintWorkflowTriggerDetails: IPrintWorkflowTriggerDetails} DEFINE_IID!(IID_IPrintWorkflowUIActivatedEventArgs, 3163194445, 2539, 22342, 114, 166, 141, 200, 181, 237, 190, 155); @@ -4616,29 +4616,29 @@ RT_INTERFACE!{interface IPrintWorkflowUIActivatedEventArgs(IPrintWorkflowUIActiv fn get_PrintWorkflowSession(&self, out: *mut *mut PrintWorkflowForegroundSession) -> HRESULT }} impl IPrintWorkflowUIActivatedEventArgs { - #[inline] pub unsafe fn get_print_workflow_session(&self) -> Result> { + #[inline] pub fn get_print_workflow_session(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PrintWorkflowSession)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PrintWorkflowUIActivatedEventArgs: IPrintWorkflowUIActivatedEventArgs} DEFINE_IID!(IID_IPrintWorkflowXpsDataAvailableEventArgs, 1293009713, 21713, 17230, 190, 14, 130, 197, 250, 88, 229, 178); RT_INTERFACE!{interface IPrintWorkflowXpsDataAvailableEventArgs(IPrintWorkflowXpsDataAvailableEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPrintWorkflowXpsDataAvailableEventArgs] { fn get_Operation(&self, out: *mut *mut PrintWorkflowSubmittedOperation) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IPrintWorkflowXpsDataAvailableEventArgs { - #[inline] pub unsafe fn get_operation(&self) -> Result> { + #[inline] pub fn get_operation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Operation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PrintWorkflowXpsDataAvailableEventArgs: IPrintWorkflowXpsDataAvailableEventArgs} } // Windows.Graphics.Printing.Workflow @@ -4650,7 +4650,7 @@ RT_STRUCT! { struct HolographicAdapterId { }} 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(&self, out: *mut super::super::foundation::Size) -> HRESULT, + fn get_RenderTargetSize(&self, out: *mut foundation::Size) -> HRESULT, fn get_ViewportScaleFactor(&self, out: *mut f64) -> HRESULT, fn put_ViewportScaleFactor(&self, value: f64) -> HRESULT, fn get_IsStereo(&self, out: *mut bool) -> HRESULT, @@ -4659,38 +4659,38 @@ RT_INTERFACE!{interface IHolographicCamera(IHolographicCameraVtbl): IInspectable fn SetFarPlaneDistance(&self, value: f64) -> HRESULT }} impl IHolographicCamera { - #[inline] pub unsafe fn get_render_target_size(&self) -> Result { + #[inline] pub fn get_render_target_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RenderTargetSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_viewport_scale_factor(&self) -> Result { + }} + #[inline] pub fn get_viewport_scale_factor(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ViewportScaleFactor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_viewport_scale_factor(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_viewport_scale_factor(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ViewportScaleFactor)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_stereo(&self) -> Result { + }} + #[inline] pub fn get_is_stereo(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsStereo)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&self) -> Result { + }} + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_near_plane_distance(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_near_plane_distance(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetNearPlaneDistance)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_far_plane_distance(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_far_plane_distance(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetFarPlaneDistance)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class HolographicCamera: IHolographicCamera} DEFINE_IID!(IID_IHolographicCamera2, 3042680602, 47756, 20356, 173, 121, 46, 126, 30, 36, 80, 243); @@ -4700,141 +4700,141 @@ RT_INTERFACE!{interface IHolographicCamera2(IHolographicCamera2Vtbl): IInspectab fn get_Display(&self, out: *mut *mut HolographicDisplay) -> HRESULT }} impl IHolographicCamera2 { - #[inline] pub unsafe fn get_left_viewport_parameters(&self) -> Result> { + #[inline] pub fn get_left_viewport_parameters(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LeftViewportParameters)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_right_viewport_parameters(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_right_viewport_parameters(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RightViewportParameters)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_display(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Display)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IHolographicCamera3, 1168789427, 31577, 21070, 74, 63, 74, 106, 214, 101, 4, 119); RT_INTERFACE!{interface IHolographicCamera3(IHolographicCamera3Vtbl): IInspectable(IInspectableVtbl) [IID_IHolographicCamera3] { fn get_IsPrimaryLayerEnabled(&self, out: *mut bool) -> HRESULT, fn put_IsPrimaryLayerEnabled(&self, value: bool) -> HRESULT, fn get_MaxQuadLayerCount(&self, out: *mut u32) -> HRESULT, - fn get_QuadLayers(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_QuadLayers(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IHolographicCamera3 { - #[inline] pub unsafe fn get_is_primary_layer_enabled(&self) -> Result { + #[inline] pub fn get_is_primary_layer_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPrimaryLayerEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_primary_layer_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_primary_layer_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsPrimaryLayerEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_quad_layer_count(&self) -> Result { + }} + #[inline] pub fn get_max_quad_layer_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxQuadLayerCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_quad_layers(&self) -> Result>> { + }} + #[inline] pub fn get_quad_layers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_QuadLayers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut HolographicCamera) -> HRESULT, - fn get_Viewport(&self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn get_Viewport(&self, out: *mut foundation::Rect) -> HRESULT, #[cfg(not(feature="windows-perception"))] fn __Dummy2(&self) -> (), - #[cfg(feature="windows-perception")] fn TryGetViewTransform(&self, coordinateSystem: *mut super::super::perception::spatial::SpatialCoordinateSystem, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + #[cfg(feature="windows-perception")] fn TryGetViewTransform(&self, coordinateSystem: *mut super::super::perception::spatial::SpatialCoordinateSystem, out: *mut *mut foundation::IReference) -> HRESULT, fn get_ProjectionTransform(&self, out: *mut HolographicStereoTransform) -> HRESULT, #[cfg(not(feature="windows-perception"))] fn __Dummy4(&self) -> (), - #[cfg(feature="windows-perception")] fn TryGetCullingFrustum(&self, coordinateSystem: *mut super::super::perception::spatial::SpatialCoordinateSystem, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + #[cfg(feature="windows-perception")] fn TryGetCullingFrustum(&self, coordinateSystem: *mut super::super::perception::spatial::SpatialCoordinateSystem, out: *mut *mut foundation::IReference) -> HRESULT, #[cfg(not(feature="windows-perception"))] fn __Dummy5(&self) -> (), - #[cfg(feature="windows-perception")] fn TryGetVisibleFrustum(&self, coordinateSystem: *mut super::super::perception::spatial::SpatialCoordinateSystem, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + #[cfg(feature="windows-perception")] fn TryGetVisibleFrustum(&self, coordinateSystem: *mut super::super::perception::spatial::SpatialCoordinateSystem, out: *mut *mut foundation::IReference) -> HRESULT, fn get_NearPlaneDistance(&self, out: *mut f64) -> HRESULT, fn get_FarPlaneDistance(&self, out: *mut f64) -> HRESULT }} impl IHolographicCameraPose { - #[inline] pub unsafe fn get_holographic_camera(&self) -> Result> { + #[inline] pub fn get_holographic_camera(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HolographicCamera)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_viewport(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_viewport(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Viewport)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-perception")] #[inline] pub unsafe fn try_get_view_transform(&self, coordinateSystem: &super::super::perception::spatial::SpatialCoordinateSystem) -> Result>> { + }} + #[cfg(feature="windows-perception")] #[inline] pub fn try_get_view_transform(&self, coordinateSystem: &super::super::perception::spatial::SpatialCoordinateSystem) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetViewTransform)(self 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 get_projection_transform(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_projection_transform(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProjectionTransform)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-perception")] #[inline] pub unsafe fn try_get_culling_frustum(&self, coordinateSystem: &super::super::perception::spatial::SpatialCoordinateSystem) -> Result>> { + }} + #[cfg(feature="windows-perception")] #[inline] pub fn try_get_culling_frustum(&self, coordinateSystem: &super::super::perception::spatial::SpatialCoordinateSystem) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetCullingFrustum)(self as *const _ as *mut _, 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(&self, coordinateSystem: &super::super::perception::spatial::SpatialCoordinateSystem) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-perception")] #[inline] pub fn try_get_visible_frustum(&self, coordinateSystem: &super::super::perception::spatial::SpatialCoordinateSystem) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetVisibleFrustum)(self 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 get_near_plane_distance(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_near_plane_distance(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NearPlaneDistance)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_far_plane_distance(&self) -> Result { + }} + #[inline] pub fn get_far_plane_distance(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FarPlaneDistance)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(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(&self) -> (), - #[cfg(feature="windows-perception")] fn SetFocusPoint(&self, coordinateSystem: *mut super::super::perception::spatial::SpatialCoordinateSystem, position: super::super::foundation::numerics::Vector3) -> HRESULT, + #[cfg(feature="windows-perception")] fn SetFocusPoint(&self, coordinateSystem: *mut super::super::perception::spatial::SpatialCoordinateSystem, position: foundation::numerics::Vector3) -> HRESULT, #[cfg(not(feature="windows-perception"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-perception")] fn SetFocusPointWithNormal(&self, coordinateSystem: *mut super::super::perception::spatial::SpatialCoordinateSystem, position: super::super::foundation::numerics::Vector3, normal: super::super::foundation::numerics::Vector3) -> HRESULT, + #[cfg(feature="windows-perception")] fn SetFocusPointWithNormal(&self, coordinateSystem: *mut super::super::perception::spatial::SpatialCoordinateSystem, position: foundation::numerics::Vector3, normal: foundation::numerics::Vector3) -> HRESULT, #[cfg(not(feature="windows-perception"))] fn __Dummy2(&self) -> (), - #[cfg(feature="windows-perception")] fn SetFocusPointWithNormalLinearVelocity(&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, + #[cfg(feature="windows-perception")] fn SetFocusPointWithNormalLinearVelocity(&self, coordinateSystem: *mut super::super::perception::spatial::SpatialCoordinateSystem, position: foundation::numerics::Vector3, normal: foundation::numerics::Vector3, linearVelocity: foundation::numerics::Vector3) -> HRESULT, fn get_Direct3D11Device(&self, out: *mut *mut super::directx::direct3d11::IDirect3DDevice) -> HRESULT, fn get_Direct3D11BackBuffer(&self, out: *mut *mut super::directx::direct3d11::IDirect3DSurface) -> HRESULT }} impl IHolographicCameraRenderingParameters { - #[cfg(feature="windows-perception")] #[inline] pub unsafe fn set_focus_point(&self, coordinateSystem: &super::super::perception::spatial::SpatialCoordinateSystem, position: super::super::foundation::numerics::Vector3) -> Result<()> { + #[cfg(feature="windows-perception")] #[inline] pub fn set_focus_point(&self, coordinateSystem: &super::super::perception::spatial::SpatialCoordinateSystem, position: foundation::numerics::Vector3) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetFocusPoint)(self as *const _ as *mut _, 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(&self, coordinateSystem: &super::super::perception::spatial::SpatialCoordinateSystem, position: super::super::foundation::numerics::Vector3, normal: super::super::foundation::numerics::Vector3) -> Result<()> { + }} + #[cfg(feature="windows-perception")] #[inline] pub fn set_focus_point_with_normal(&self, coordinateSystem: &super::super::perception::spatial::SpatialCoordinateSystem, position: foundation::numerics::Vector3, normal: foundation::numerics::Vector3) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetFocusPointWithNormal)(self as *const _ as *mut _, 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(&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<()> { + }} + #[cfg(feature="windows-perception")] #[inline] pub fn set_focus_point_with_normal_linear_velocity(&self, coordinateSystem: &super::super::perception::spatial::SpatialCoordinateSystem, position: foundation::numerics::Vector3, normal: foundation::numerics::Vector3, linearVelocity: foundation::numerics::Vector3) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetFocusPointWithNormalLinearVelocity)(self as *const _ as *mut _, coordinateSystem as *const _ as *mut _, position, normal, linearVelocity); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_direct3_d11_device(&self) -> Result> { + }} + #[inline] pub fn get_direct3_d11_device(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Direct3D11Device)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_direct3_d11_back_buffer(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_direct3_d11_back_buffer(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Direct3D11BackBuffer)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class HolographicCameraRenderingParameters: IHolographicCameraRenderingParameters} DEFINE_IID!(IID_IHolographicCameraRenderingParameters2, 638742755, 46742, 17972, 148, 214, 190, 6, 129, 100, 53, 153); @@ -4844,19 +4844,19 @@ RT_INTERFACE!{interface IHolographicCameraRenderingParameters2(IHolographicCamer fn CommitDirect3D11DepthBuffer(&self, value: *mut super::directx::direct3d11::IDirect3DSurface) -> HRESULT }} impl IHolographicCameraRenderingParameters2 { - #[inline] pub unsafe fn get_reprojection_mode(&self) -> Result { + #[inline] pub fn get_reprojection_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReprojectionMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_reprojection_mode(&self, value: HolographicReprojectionMode) -> Result<()> { + }} + #[inline] pub fn set_reprojection_mode(&self, value: HolographicReprojectionMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReprojectionMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn commit_direct3_d11_depth_buffer(&self, value: &super::directx::direct3d11::IDirect3DSurface) -> Result<()> { + }} + #[inline] pub fn commit_direct3_d11_depth_buffer(&self, value: &super::directx::direct3d11::IDirect3DSurface) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).CommitDirect3D11DepthBuffer)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IHolographicCameraRenderingParameters3, 2980729151, 4973, 19206, 185, 212, 228, 185, 20, 205, 6, 131); RT_INTERFACE!{interface IHolographicCameraRenderingParameters3(IHolographicCameraRenderingParameters3Vtbl): IInspectable(IInspectableVtbl) [IID_IHolographicCameraRenderingParameters3] { @@ -4864,81 +4864,81 @@ RT_INTERFACE!{interface IHolographicCameraRenderingParameters3(IHolographicCamer fn put_IsContentProtectionEnabled(&self, value: bool) -> HRESULT }} impl IHolographicCameraRenderingParameters3 { - #[inline] pub unsafe fn get_is_content_protection_enabled(&self) -> Result { + #[inline] pub fn get_is_content_protection_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsContentProtectionEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_content_protection_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_content_protection_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsContentProtectionEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IHolographicCameraViewportParameters, 2160980983, 33834, 16865, 147, 237, 86, 146, 171, 31, 187, 16); RT_INTERFACE!{interface IHolographicCameraViewportParameters(IHolographicCameraViewportParametersVtbl): IInspectable(IInspectableVtbl) [IID_IHolographicCameraViewportParameters] { - fn get_HiddenAreaMesh(&self, outSize: *mut u32, out: *mut *mut super::super::foundation::numerics::Vector2) -> HRESULT, - fn get_VisibleAreaMesh(&self, outSize: *mut u32, out: *mut *mut super::super::foundation::numerics::Vector2) -> HRESULT + fn get_HiddenAreaMesh(&self, outSize: *mut u32, out: *mut *mut foundation::numerics::Vector2) -> HRESULT, + fn get_VisibleAreaMesh(&self, outSize: *mut u32, out: *mut *mut foundation::numerics::Vector2) -> HRESULT }} impl IHolographicCameraViewportParameters { - #[inline] pub unsafe fn get_hidden_area_mesh(&self) -> Result> { + #[inline] pub fn get_hidden_area_mesh(&self) -> Result> { unsafe { let mut outSize = 0; let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HiddenAreaMesh)(self as *const _ as *mut _, &mut outSize, &mut out); if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_visible_area_mesh(&self) -> Result> { + }} + #[inline] pub fn get_visible_area_mesh(&self) -> Result> { unsafe { let mut outSize = 0; let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VisibleAreaMesh)(self as *const _ as *mut _, &mut outSize, &mut out); if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } - } + }} } RT_CLASS!{class HolographicCameraViewportParameters: IHolographicCameraViewportParameters} DEFINE_IID!(IID_IHolographicDisplay, 2597233684, 7583, 16528, 163, 136, 144, 192, 111, 110, 174, 156); RT_INTERFACE!{interface IHolographicDisplay(IHolographicDisplayVtbl): IInspectable(IInspectableVtbl) [IID_IHolographicDisplay] { fn get_DisplayName(&self, out: *mut HSTRING) -> HRESULT, - fn get_MaxViewportSize(&self, out: *mut super::super::foundation::Size) -> HRESULT, + fn get_MaxViewportSize(&self, out: *mut foundation::Size) -> HRESULT, fn get_IsStereo(&self, out: *mut bool) -> HRESULT, fn get_IsOpaque(&self, out: *mut bool) -> HRESULT, fn get_AdapterId(&self, out: *mut HolographicAdapterId) -> HRESULT, #[cfg(feature="windows-perception")] fn get_SpatialLocator(&self, out: *mut *mut super::super::perception::spatial::SpatialLocator) -> HRESULT }} impl IHolographicDisplay { - #[inline] pub unsafe fn get_display_name(&self) -> Result { + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_viewport_size(&self) -> Result { + }} + #[inline] pub fn get_max_viewport_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxViewportSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_stereo(&self) -> Result { + }} + #[inline] pub fn get_is_stereo(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsStereo)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_opaque(&self) -> Result { + }} + #[inline] pub fn get_is_opaque(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsOpaque)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_adapter_id(&self) -> Result { + }} + #[inline] pub fn get_adapter_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AdapterId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-perception")] #[inline] pub unsafe fn get_spatial_locator(&self) -> Result> { + }} + #[cfg(feature="windows-perception")] #[inline] pub fn get_spatial_locator(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SpatialLocator)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class HolographicDisplay: IHolographicDisplay} impl RtActivatable for HolographicDisplay {} impl HolographicDisplay { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} + } } DEFINE_CLSID!(HolographicDisplay(&[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,68,105,115,112,108,97,121,0]) [CLSID_HolographicDisplay]); DEFINE_IID!(IID_IHolographicDisplay2, 1974222722, 59221, 17260, 141, 150, 77, 50, 209, 49, 71, 62); @@ -4946,29 +4946,29 @@ RT_INTERFACE!{interface IHolographicDisplay2(IHolographicDisplay2Vtbl): IInspect fn get_RefreshRate(&self, out: *mut f64) -> HRESULT }} impl IHolographicDisplay2 { - #[inline] pub unsafe fn get_refresh_rate(&self) -> Result { + #[inline] pub fn get_refresh_rate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RefreshRate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IHolographicDisplayStatics, 3409398147, 59312, 18497, 131, 85, 58, 229, 181, 54, 233, 164); RT_INTERFACE!{static interface IHolographicDisplayStatics(IHolographicDisplayStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IHolographicDisplayStatics] { fn GetDefault(&self, out: *mut *mut HolographicDisplay) -> HRESULT }} impl IHolographicDisplayStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_RemovedCameras(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_AddedCameras(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_RemovedCameras(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn GetRenderingParameters(&self, cameraPose: *mut HolographicCameraPose, out: *mut *mut HolographicCameraRenderingParameters) -> HRESULT, - fn get_Duration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_Duration(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn get_CurrentPrediction(&self, out: *mut *mut HolographicFramePrediction) -> HRESULT, fn UpdateCurrentPrediction(&self) -> HRESULT, fn PresentUsingCurrentPrediction(&self, out: *mut HolographicFramePresentResult) -> HRESULT, @@ -4976,49 +4976,49 @@ RT_INTERFACE!{interface IHolographicFrame(IHolographicFrameVtbl): IInspectable(I fn WaitForFrameToFinish(&self) -> HRESULT }} impl IHolographicFrame { - #[inline] pub unsafe fn get_added_cameras(&self) -> Result>> { + #[inline] pub fn get_added_cameras(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AddedCameras)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_removed_cameras(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_removed_cameras(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemovedCameras)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rendering_parameters(&self, cameraPose: &HolographicCameraPose) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_rendering_parameters(&self, cameraPose: &HolographicCameraPose) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetRenderingParameters)(self as *const _ as *mut _, cameraPose as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_duration(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Duration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_prediction(&self) -> Result> { + }} + #[inline] pub fn get_current_prediction(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CurrentPrediction)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn update_current_prediction(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn update_current_prediction(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).UpdateCurrentPrediction)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn present_using_current_prediction(&self) -> Result { + }} + #[inline] pub fn present_using_current_prediction(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).PresentUsingCurrentPrediction)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn present_using_current_prediction_with_behavior(&self, waitBehavior: HolographicFramePresentWaitBehavior) -> Result { + }} + #[inline] pub fn present_using_current_prediction_with_behavior(&self, waitBehavior: HolographicFramePresentWaitBehavior) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).PresentUsingCurrentPredictionWithBehavior)(self as *const _ as *mut _, waitBehavior, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn wait_for_frame_to_finish(&self) -> Result<()> { + }} + #[inline] pub fn wait_for_frame_to_finish(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).WaitForFrameToFinish)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class HolographicFrame: IHolographicFrame} DEFINE_IID!(IID_IHolographicFrame2, 675231679, 15346, 24209, 102, 51, 135, 5, 116, 230, 242, 23); @@ -5026,28 +5026,28 @@ RT_INTERFACE!{interface IHolographicFrame2(IHolographicFrame2Vtbl): IInspectable fn GetQuadLayerUpdateParameters(&self, layer: *mut HolographicQuadLayer, out: *mut *mut HolographicQuadLayerUpdateParameters) -> HRESULT }} impl IHolographicFrame2 { - #[inline] pub unsafe fn get_quad_layer_update_parameters(&self, layer: &HolographicQuadLayer) -> Result> { + #[inline] pub fn get_quad_layer_update_parameters(&self, layer: &HolographicQuadLayer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetQuadLayerUpdateParameters)(self as *const _ as *mut _, layer as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_CameraPoses(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, #[cfg(feature="windows-perception")] fn get_Timestamp(&self, out: *mut *mut super::super::perception::PerceptionTimestamp) -> HRESULT }} impl IHolographicFramePrediction { - #[inline] pub unsafe fn get_camera_poses(&self) -> Result>> { + #[inline] pub fn get_camera_poses(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CameraPoses)(self 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 get_timestamp(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-perception")] #[inline] pub fn get_timestamp(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class HolographicFramePrediction: IHolographicFramePrediction} RT_ENUM! { enum HolographicFramePresentResult: i32 { @@ -5059,84 +5059,84 @@ RT_ENUM! { enum HolographicFramePresentWaitBehavior: i32 { DEFINE_IID!(IID_IHolographicQuadLayer, 2419351753, 51673, 23900, 65, 172, 162, 213, 171, 15, 211, 49); RT_INTERFACE!{interface IHolographicQuadLayer(IHolographicQuadLayerVtbl): IInspectable(IInspectableVtbl) [IID_IHolographicQuadLayer] { fn get_PixelFormat(&self, out: *mut super::directx::DirectXPixelFormat) -> HRESULT, - fn get_Size(&self, out: *mut super::super::foundation::Size) -> HRESULT + fn get_Size(&self, out: *mut foundation::Size) -> HRESULT }} impl IHolographicQuadLayer { - #[inline] pub unsafe fn get_pixel_format(&self) -> Result { + #[inline] pub fn get_pixel_format(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PixelFormat)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_size(&self) -> Result { + }} + #[inline] pub fn get_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Size)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class HolographicQuadLayer: IHolographicQuadLayer} impl RtActivatable for HolographicQuadLayer {} impl HolographicQuadLayer { - #[inline] pub fn create(size: super::super::foundation::Size) -> Result> { unsafe { + #[inline] pub fn create(size: foundation::Size) -> Result> { >::get_activation_factory().create(size) - }} - #[inline] pub fn create_with_pixel_format(size: super::super::foundation::Size, pixelFormat: super::directx::DirectXPixelFormat) -> Result> { unsafe { + } + #[inline] pub fn create_with_pixel_format(size: foundation::Size, pixelFormat: super::directx::DirectXPixelFormat) -> Result> { >::get_activation_factory().create_with_pixel_format(size, pixelFormat) - }} + } } DEFINE_CLSID!(HolographicQuadLayer(&[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,81,117,97,100,76,97,121,101,114,0]) [CLSID_HolographicQuadLayer]); DEFINE_IID!(IID_IHolographicQuadLayerFactory, 2792700147, 23060, 23056, 72, 154, 69, 80, 101, 179, 123, 118); RT_INTERFACE!{static interface IHolographicQuadLayerFactory(IHolographicQuadLayerFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IHolographicQuadLayerFactory] { - fn Create(&self, size: super::super::foundation::Size, out: *mut *mut HolographicQuadLayer) -> HRESULT, - fn CreateWithPixelFormat(&self, size: super::super::foundation::Size, pixelFormat: super::directx::DirectXPixelFormat, out: *mut *mut HolographicQuadLayer) -> HRESULT + fn Create(&self, size: foundation::Size, out: *mut *mut HolographicQuadLayer) -> HRESULT, + fn CreateWithPixelFormat(&self, size: foundation::Size, pixelFormat: super::directx::DirectXPixelFormat, out: *mut *mut HolographicQuadLayer) -> HRESULT }} impl IHolographicQuadLayerFactory { - #[inline] pub unsafe fn create(&self, size: super::super::foundation::Size) -> Result> { + #[inline] pub fn create(&self, size: foundation::Size) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, size, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_pixel_format(&self, size: super::super::foundation::Size, pixelFormat: super::directx::DirectXPixelFormat) -> Result> { + }} + #[inline] pub fn create_with_pixel_format(&self, size: foundation::Size, pixelFormat: super::directx::DirectXPixelFormat) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithPixelFormat)(self as *const _ as *mut _, size, pixelFormat, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IHolographicQuadLayerUpdateParameters, 722379696, 31117, 23498, 85, 194, 44, 12, 118, 46, 187, 8); RT_INTERFACE!{interface IHolographicQuadLayerUpdateParameters(IHolographicQuadLayerUpdateParametersVtbl): IInspectable(IInspectableVtbl) [IID_IHolographicQuadLayerUpdateParameters] { fn AcquireBufferToUpdateContent(&self, out: *mut *mut super::directx::direct3d11::IDirect3DSurface) -> HRESULT, - fn UpdateViewport(&self, value: super::super::foundation::Rect) -> HRESULT, + fn UpdateViewport(&self, value: foundation::Rect) -> HRESULT, fn UpdateContentProtectionEnabled(&self, value: bool) -> HRESULT, - fn UpdateExtents(&self, value: super::super::foundation::numerics::Vector2) -> HRESULT, + fn UpdateExtents(&self, value: foundation::numerics::Vector2) -> HRESULT, #[cfg(not(feature="windows-perception"))] fn __Dummy4(&self) -> (), - #[cfg(feature="windows-perception")] fn UpdateLocationWithStationaryMode(&self, coordinateSystem: *mut super::super::perception::spatial::SpatialCoordinateSystem, position: super::super::foundation::numerics::Vector3, orientation: super::super::foundation::numerics::Quaternion) -> HRESULT, - fn UpdateLocationWithDisplayRelativeMode(&self, position: super::super::foundation::numerics::Vector3, orientation: super::super::foundation::numerics::Quaternion) -> HRESULT + #[cfg(feature="windows-perception")] fn UpdateLocationWithStationaryMode(&self, coordinateSystem: *mut super::super::perception::spatial::SpatialCoordinateSystem, position: foundation::numerics::Vector3, orientation: foundation::numerics::Quaternion) -> HRESULT, + fn UpdateLocationWithDisplayRelativeMode(&self, position: foundation::numerics::Vector3, orientation: foundation::numerics::Quaternion) -> HRESULT }} impl IHolographicQuadLayerUpdateParameters { - #[inline] pub unsafe fn acquire_buffer_to_update_content(&self) -> Result> { + #[inline] pub fn acquire_buffer_to_update_content(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AcquireBufferToUpdateContent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn update_viewport(&self, value: super::super::foundation::Rect) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn update_viewport(&self, value: foundation::Rect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).UpdateViewport)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn update_content_protection_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn update_content_protection_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).UpdateContentProtectionEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn update_extents(&self, value: super::super::foundation::numerics::Vector2) -> Result<()> { + }} + #[inline] pub fn update_extents(&self, value: foundation::numerics::Vector2) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).UpdateExtents)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-perception")] #[inline] pub unsafe fn update_location_with_stationary_mode(&self, coordinateSystem: &super::super::perception::spatial::SpatialCoordinateSystem, position: super::super::foundation::numerics::Vector3, orientation: super::super::foundation::numerics::Quaternion) -> Result<()> { + }} + #[cfg(feature="windows-perception")] #[inline] pub fn update_location_with_stationary_mode(&self, coordinateSystem: &super::super::perception::spatial::SpatialCoordinateSystem, position: foundation::numerics::Vector3, orientation: foundation::numerics::Quaternion) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).UpdateLocationWithStationaryMode)(self as *const _ as *mut _, coordinateSystem as *const _ as *mut _, position, orientation); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn update_location_with_display_relative_mode(&self, position: super::super::foundation::numerics::Vector3, orientation: super::super::foundation::numerics::Quaternion) -> Result<()> { + }} + #[inline] pub fn update_location_with_display_relative_mode(&self, position: foundation::numerics::Vector3, orientation: foundation::numerics::Quaternion) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).UpdateLocationWithDisplayRelativeMode)(self as *const _ as *mut _, position, orientation); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class HolographicQuadLayerUpdateParameters: IHolographicQuadLayerUpdateParameters} RT_ENUM! { enum HolographicReprojectionMode: i32 { @@ -5146,87 +5146,87 @@ DEFINE_IID!(IID_IHolographicSpace, 1132518310, 24184, 17231, 128, 124, 52, 51, 2 RT_INTERFACE!{interface IHolographicSpace(IHolographicSpaceVtbl): IInspectable(IInspectableVtbl) [IID_IHolographicSpace] { fn get_PrimaryAdapterId(&self, out: *mut HolographicAdapterId) -> HRESULT, fn SetDirect3D11Device(&self, value: *mut super::directx::direct3d11::IDirect3DDevice) -> HRESULT, - fn add_CameraAdded(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CameraAdded(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_CameraRemoved(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CameraRemoved(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_CameraAdded(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CameraAdded(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_CameraRemoved(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CameraRemoved(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, fn CreateNextFrame(&self, out: *mut *mut HolographicFrame) -> HRESULT }} impl IHolographicSpace { - #[inline] pub unsafe fn get_primary_adapter_id(&self) -> Result { + #[inline] pub fn get_primary_adapter_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PrimaryAdapterId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_direct3_d11_device(&self, value: &super::directx::direct3d11::IDirect3DDevice) -> Result<()> { + }} + #[inline] pub fn set_direct3_d11_device(&self, value: &super::directx::direct3d11::IDirect3DDevice) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetDirect3D11Device)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_camera_added(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_camera_added(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CameraAdded)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_camera_added(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_camera_added(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CameraAdded)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_camera_removed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_camera_removed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CameraRemoved)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_camera_removed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_camera_removed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CameraRemoved)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn create_next_frame(&self) -> Result> { + }} + #[inline] pub fn create_next_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateNextFrame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class HolographicSpace: IHolographicSpace} impl RtActivatable for HolographicSpace {} impl RtActivatable for HolographicSpace {} impl RtActivatable for HolographicSpace {} impl HolographicSpace { - #[cfg(feature="windows-ui")] #[inline] pub fn create_for_core_window(window: &super::super::ui::core::CoreWindow) -> Result> { unsafe { + #[cfg(feature="windows-ui")] #[inline] pub fn create_for_core_window(window: &super::super::ui::core::CoreWindow) -> Result>> { >::get_activation_factory().create_for_core_window(window) - }} - #[inline] pub fn get_is_supported() -> Result { unsafe { + } + #[inline] pub fn get_is_supported() -> Result { >::get_activation_factory().get_is_supported() - }} - #[inline] pub fn get_is_available() -> Result { unsafe { + } + #[inline] pub fn get_is_available() -> Result { >::get_activation_factory().get_is_available() - }} - #[inline] pub fn add_is_available_changed(handler: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_is_available_changed(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_is_available_changed(handler) - }} - #[inline] pub fn remove_is_available_changed(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_is_available_changed(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_is_available_changed(token) - }} - #[inline] pub fn get_is_configured() -> Result { unsafe { + } + #[inline] pub fn get_is_configured() -> Result { >::get_activation_factory().get_is_configured() - }} + } } DEFINE_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]) [CLSID_HolographicSpace]); 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(&self, out: *mut *mut HolographicCamera) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IHolographicSpaceCameraAddedEventArgs { - #[inline] pub unsafe fn get_camera(&self) -> Result> { + #[inline] pub fn get_camera(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Camera)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class HolographicSpaceCameraAddedEventArgs: IHolographicSpaceCameraAddedEventArgs} DEFINE_IID!(IID_IHolographicSpaceCameraRemovedEventArgs, 2153006248, 62126, 12846, 141, 169, 131, 106, 10, 149, 164, 193); @@ -5234,11 +5234,11 @@ RT_INTERFACE!{interface IHolographicSpaceCameraRemovedEventArgs(IHolographicSpac fn get_Camera(&self, out: *mut *mut HolographicCamera) -> HRESULT }} impl IHolographicSpaceCameraRemovedEventArgs { - #[inline] pub unsafe fn get_camera(&self) -> Result> { + #[inline] pub fn get_camera(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Camera)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class HolographicSpaceCameraRemovedEventArgs: IHolographicSpaceCameraRemovedEventArgs} DEFINE_IID!(IID_IHolographicSpaceStatics, 911106148, 51442, 15265, 131, 145, 102, 184, 72, 158, 103, 253); @@ -5246,53 +5246,53 @@ RT_INTERFACE!{static interface IHolographicSpaceStatics(IHolographicSpaceStatics #[cfg(feature="windows-ui")] fn CreateForCoreWindow(&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(&self, window: &super::super::ui::core::CoreWindow) -> Result> { + #[cfg(feature="windows-ui")] #[inline] pub fn create_for_core_window(&self, window: &super::super::ui::core::CoreWindow) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateForCoreWindow)(self as *const _ as *mut _, window as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IHolographicSpaceStatics2, 242708616, 30204, 18607, 135, 88, 6, 82, 246, 240, 124, 89); RT_INTERFACE!{static interface IHolographicSpaceStatics2(IHolographicSpaceStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IHolographicSpaceStatics2] { fn get_IsSupported(&self, out: *mut bool) -> HRESULT, fn get_IsAvailable(&self, out: *mut bool) -> HRESULT, - fn add_IsAvailableChanged(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_IsAvailableChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_IsAvailableChanged(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_IsAvailableChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IHolographicSpaceStatics2 { - #[inline] pub unsafe fn get_is_supported(&self) -> Result { + #[inline] pub fn get_is_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_available(&self) -> Result { + }} + #[inline] pub fn get_is_available(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsAvailable)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_is_available_changed(&self, handler: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_is_available_changed(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_IsAvailableChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_is_available_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_is_available_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_IsAvailableChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IHolographicSpaceStatics3, 989912637, 45475, 19966, 142, 121, 254, 197, 144, 158, 109, 248); RT_INTERFACE!{static interface IHolographicSpaceStatics3(IHolographicSpaceStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IHolographicSpaceStatics3] { fn get_IsConfigured(&self, out: *mut bool) -> HRESULT }} impl IHolographicSpaceStatics3 { - #[inline] pub unsafe fn get_is_configured(&self) -> Result { + #[inline] pub fn get_is_configured(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsConfigured)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_STRUCT! { struct HolographicStereoTransform { - Left: super::super::foundation::numerics::Matrix4x4, Right: super::super::foundation::numerics::Matrix4x4, + Left: foundation::numerics::Matrix4x4, Right: foundation::numerics::Matrix4x4, }} } // Windows.Graphics.Holographic pub mod directx { // Windows.Graphics.DirectX @@ -5313,10 +5313,10 @@ RT_INTERFACE!{interface IDirect3DDevice(IDirect3DDeviceVtbl): IInspectable(IInsp fn Trim(&self) -> HRESULT }} impl IDirect3DDevice { - #[inline] pub unsafe fn trim(&self) -> Result<()> { + #[inline] pub fn trim(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Trim)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_STRUCT! { struct Direct3DMultisampleDescription { Count: i32, Quality: i32, @@ -5326,11 +5326,11 @@ RT_INTERFACE!{interface IDirect3DSurface(IDirect3DSurfaceVtbl): IInspectable(IIn fn get_Description(&self, out: *mut Direct3DSurfaceDescription) -> HRESULT }} impl IDirect3DSurface { - #[inline] pub unsafe fn get_description(&self) -> Result { + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_STRUCT! { struct Direct3DSurfaceDescription { Width: i32, Height: i32, Format: super::DirectXPixelFormat, MultisampleDescription: Direct3DMultisampleDescription, diff --git a/src/rt/gen/windows/management.rs b/src/rt/gen/windows/management.rs index e10bdee..a2c13c3 100644 --- a/src/rt/gen/windows/management.rs +++ b/src/rt/gen/windows/management.rs @@ -16,65 +16,65 @@ RT_INTERFACE!{interface IMdmAlert(IMdmAlertVtbl): IInspectable(IInspectableVtbl) fn put_Type(&self, value: HSTRING) -> HRESULT }} impl IMdmAlert { - #[inline] pub unsafe fn get_data(&self) -> Result { + #[inline] pub fn get_data(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Data)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_data(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_data(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Data)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_format(&self) -> Result { + }} + #[inline] pub fn get_format(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Format)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_format(&self, value: MdmAlertDataType) -> Result<()> { + }} + #[inline] pub fn set_format(&self, value: MdmAlertDataType) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Format)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_mark(&self) -> Result { + }} + #[inline] pub fn get_mark(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Mark)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_mark(&self, value: MdmAlertMark) -> Result<()> { + }} + #[inline] pub fn set_mark(&self, value: MdmAlertMark) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Mark)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_source(&self) -> Result { + }} + #[inline] pub fn get_source(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Source)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_source(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_source(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Source)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_target(&self) -> Result { + }} + #[inline] pub fn get_target(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Target)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_target(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_target(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Target)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_type(&self) -> Result { + }} + #[inline] pub fn get_type(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Type)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_type(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_type(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Type)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MdmAlert: IMdmAlert} impl RtActivatable for MdmAlert {} @@ -87,101 +87,101 @@ RT_ENUM! { enum MdmAlertMark: i32 { }} DEFINE_IID!(IID_IMdmSession, 4270403916, 36708, 18327, 169, 215, 157, 136, 248, 106, 225, 102); RT_INTERFACE!{interface IMdmSession(IMdmSessionVtbl): IInspectable(IInspectableVtbl) [IID_IMdmSession] { - fn get_Alerts(&self, out: *mut *mut super::foundation::collections::IVectorView) -> HRESULT, - fn get_ExtendedError(&self, out: *mut super::foundation::HResult) -> HRESULT, + fn get_Alerts(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_ExtendedError(&self, out: *mut foundation::HResult) -> HRESULT, fn get_Id(&self, out: *mut HSTRING) -> HRESULT, fn get_State(&self, out: *mut MdmSessionState) -> HRESULT, - fn AttachAsync(&self, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn AttachAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn Delete(&self) -> HRESULT, - fn StartAsync(&self, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn StartWithAlertsAsync(&self, alerts: *mut super::foundation::collections::IIterable, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT + fn StartAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn StartWithAlertsAsync(&self, alerts: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IMdmSession { - #[inline] pub unsafe fn get_alerts(&self) -> Result>> { + #[inline] pub fn get_alerts(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Alerts)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_error(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_extended_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&self) -> Result { + }} + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_state(&self) -> Result { + }} + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn attach_async(&self) -> Result> { + }} + #[inline] pub fn attach_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AttachAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete(&self) -> Result<()> { + }} + #[inline] pub fn delete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Delete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start_async(&self) -> Result> { + }} + #[inline] pub fn start_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn start_with_alerts_async(&self, alerts: &super::foundation::collections::IIterable) -> Result> { + }} + #[inline] pub fn start_with_alerts_async(&self, alerts: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartWithAlertsAsync)(self as *const _ as *mut _, alerts as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class MdmSession: IMdmSession} RT_CLASS!{static class MdmSessionManager} impl RtActivatable for MdmSessionManager {} impl MdmSessionManager { - #[inline] pub fn get_session_ids() -> Result>> { unsafe { + #[inline] pub fn get_session_ids() -> Result>>> { >::get_activation_factory().get_session_ids() - }} - #[inline] pub fn try_create_session() -> Result> { unsafe { + } + #[inline] pub fn try_create_session() -> Result>> { >::get_activation_factory().try_create_session() - }} - #[inline] pub fn delete_session_by_id(sessionId: &HStringArg) -> Result<()> { unsafe { + } + #[inline] pub fn delete_session_by_id(sessionId: &HStringArg) -> Result<()> { >::get_activation_factory().delete_session_by_id(sessionId) - }} - #[inline] pub fn get_session_by_id(sessionId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn get_session_by_id(sessionId: &HStringArg) -> Result>> { >::get_activation_factory().get_session_by_id(sessionId) - }} + } } DEFINE_CLSID!(MdmSessionManager(&[87,105,110,100,111,119,115,46,77,97,110,97,103,101,109,101,110,116,46,77,100,109,83,101,115,115,105,111,110,77,97,110,97,103,101,114,0]) [CLSID_MdmSessionManager]); DEFINE_IID!(IID_IMdmSessionManagerStatics, 3477789017, 63301, 19321, 155, 92, 222, 11, 248, 239, 228, 75); RT_INTERFACE!{static interface IMdmSessionManagerStatics(IMdmSessionManagerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IMdmSessionManagerStatics] { - fn get_SessionIds(&self, out: *mut *mut super::foundation::collections::IVectorView) -> HRESULT, + fn get_SessionIds(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn TryCreateSession(&self, out: *mut *mut MdmSession) -> HRESULT, fn DeleteSessionById(&self, sessionId: HSTRING) -> HRESULT, fn GetSessionById(&self, sessionId: HSTRING, out: *mut *mut MdmSession) -> HRESULT }} impl IMdmSessionManagerStatics { - #[inline] pub unsafe fn get_session_ids(&self) -> Result>> { + #[inline] pub fn get_session_ids(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SessionIds)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_create_session(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn try_create_session(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryCreateSession)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete_session_by_id(&self, sessionId: &HStringArg) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn delete_session_by_id(&self, sessionId: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).DeleteSessionById)(self as *const _ as *mut _, sessionId.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_session_by_id(&self, sessionId: &HStringArg) -> Result> { + }} + #[inline] pub fn get_session_by_id(&self, sessionId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSessionById)(self as *const _ as *mut _, sessionId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum MdmSessionState: i32 { NotStarted (MdmSessionState_NotStarted) = 0, Starting (MdmSessionState_Starting) = 1, Connecting (MdmSessionState_Connecting) = 2, Communicating (MdmSessionState_Communicating) = 3, AlertStatusAvailable (MdmSessionState_AlertStatusAvailable) = 4, Retrying (MdmSessionState_Retrying) = 5, Completed (MdmSessionState_Completed) = 6, @@ -204,24 +204,24 @@ DEFINE_IID!(IID_IDeploymentResult, 627292590, 46973, 19487, 138, 123, 32, 230, 1 RT_INTERFACE!{interface IDeploymentResult(IDeploymentResultVtbl): IInspectable(IInspectableVtbl) [IID_IDeploymentResult] { fn get_ErrorText(&self, out: *mut HSTRING) -> HRESULT, fn get_ActivityId(&self, out: *mut Guid) -> HRESULT, - fn get_ExtendedErrorCode(&self, out: *mut super::super::foundation::HResult) -> HRESULT + fn get_ExtendedErrorCode(&self, out: *mut foundation::HResult) -> HRESULT }} impl IDeploymentResult { - #[inline] pub unsafe fn get_error_text(&self) -> Result { + #[inline] pub fn get_error_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ErrorText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_activity_id(&self) -> Result { + }} + #[inline] pub fn get_activity_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ActivityId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_error_code(&self) -> Result { + }} + #[inline] pub fn get_extended_error_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedErrorCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class DeploymentResult: IDeploymentResult} DEFINE_IID!(IID_IDeploymentResult2, 4228804956, 23041, 19415, 188, 241, 56, 28, 140, 130, 224, 74); @@ -229,378 +229,378 @@ RT_INTERFACE!{interface IDeploymentResult2(IDeploymentResult2Vtbl): IInspectable fn get_IsRegistered(&self, out: *mut bool) -> HRESULT }} impl IDeploymentResult2 { - #[inline] pub unsafe fn get_is_registered(&self) -> Result { + #[inline] pub fn get_is_registered(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsRegistered)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum PackageInstallState: i32 { NotInstalled (PackageInstallState_NotInstalled) = 0, Staged (PackageInstallState_Staged) = 1, Installed (PackageInstallState_Installed) = 2, Paused (PackageInstallState_Paused) = 6, }} 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(&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(&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(&self, packageFullName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, - fn StagePackageAsync(&self, packageUri: *mut super::super::foundation::Uri, dependencyPackageUris: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, - fn RegisterPackageAsync(&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(&self, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT, - #[cfg(feature="windows-applicationmodel")] fn FindPackagesByUserSecurityId(&self, userSecurityId: HSTRING, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT, - #[cfg(feature="windows-applicationmodel")] fn FindPackagesByNamePublisher(&self, packageName: HSTRING, packagePublisher: HSTRING, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT, - #[cfg(feature="windows-applicationmodel")] fn FindPackagesByUserSecurityIdNamePublisher(&self, userSecurityId: HSTRING, packageName: HSTRING, packagePublisher: HSTRING, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT, - fn FindUsers(&self, packageFullName: HSTRING, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT, + fn AddPackageAsync(&self, packageUri: *mut foundation::Uri, dependencyPackageUris: *mut foundation::collections::IIterable, deploymentOptions: DeploymentOptions, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + fn UpdatePackageAsync(&self, packageUri: *mut foundation::Uri, dependencyPackageUris: *mut foundation::collections::IIterable, deploymentOptions: DeploymentOptions, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + fn RemovePackageAsync(&self, packageFullName: HSTRING, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + fn StagePackageAsync(&self, packageUri: *mut foundation::Uri, dependencyPackageUris: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + fn RegisterPackageAsync(&self, manifestUri: *mut foundation::Uri, dependencyPackageUris: *mut foundation::collections::IIterable, deploymentOptions: DeploymentOptions, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + #[cfg(feature="windows-applicationmodel")] fn FindPackages(&self, out: *mut *mut foundation::collections::IIterable) -> HRESULT, + #[cfg(feature="windows-applicationmodel")] fn FindPackagesByUserSecurityId(&self, userSecurityId: HSTRING, out: *mut *mut foundation::collections::IIterable) -> HRESULT, + #[cfg(feature="windows-applicationmodel")] fn FindPackagesByNamePublisher(&self, packageName: HSTRING, packagePublisher: HSTRING, out: *mut *mut foundation::collections::IIterable) -> HRESULT, + #[cfg(feature="windows-applicationmodel")] fn FindPackagesByUserSecurityIdNamePublisher(&self, userSecurityId: HSTRING, packageName: HSTRING, packagePublisher: HSTRING, out: *mut *mut foundation::collections::IIterable) -> HRESULT, + fn FindUsers(&self, packageFullName: HSTRING, out: *mut *mut foundation::collections::IIterable) -> HRESULT, fn SetPackageState(&self, packageFullName: HSTRING, packageState: PackageState) -> HRESULT, #[cfg(feature="windows-applicationmodel")] fn FindPackageByPackageFullName(&self, packageFullName: HSTRING, out: *mut *mut super::super::applicationmodel::Package) -> HRESULT, - fn CleanupPackageForUserAsync(&self, packageName: HSTRING, userSecurityId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, - #[cfg(feature="windows-applicationmodel")] fn FindPackagesByPackageFamilyName(&self, packageFamilyName: HSTRING, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT, - #[cfg(feature="windows-applicationmodel")] fn FindPackagesByUserSecurityIdPackageFamilyName(&self, userSecurityId: HSTRING, packageFamilyName: HSTRING, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT, + fn CleanupPackageForUserAsync(&self, packageName: HSTRING, userSecurityId: HSTRING, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + #[cfg(feature="windows-applicationmodel")] fn FindPackagesByPackageFamilyName(&self, packageFamilyName: HSTRING, out: *mut *mut foundation::collections::IIterable) -> HRESULT, + #[cfg(feature="windows-applicationmodel")] fn FindPackagesByUserSecurityIdPackageFamilyName(&self, userSecurityId: HSTRING, packageFamilyName: HSTRING, out: *mut *mut foundation::collections::IIterable) -> HRESULT, #[cfg(feature="windows-applicationmodel")] fn FindPackageByUserSecurityIdPackageFullName(&self, userSecurityId: HSTRING, packageFullName: HSTRING, out: *mut *mut super::super::applicationmodel::Package) -> HRESULT }} impl IPackageManager { - #[inline] pub unsafe fn add_package_async(&self, packageUri: &super::super::foundation::Uri, dependencyPackageUris: &super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions) -> Result>> { + #[inline] pub fn add_package_async(&self, packageUri: &foundation::Uri, dependencyPackageUris: &foundation::collections::IIterable, deploymentOptions: DeploymentOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AddPackageAsync)(self as *const _ as *mut _, 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(&self, packageUri: &super::super::foundation::Uri, dependencyPackageUris: &super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions) -> Result>> { + }} + #[inline] pub fn update_package_async(&self, packageUri: &foundation::Uri, dependencyPackageUris: &foundation::collections::IIterable, deploymentOptions: DeploymentOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UpdatePackageAsync)(self as *const _ as *mut _, 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(&self, packageFullName: &HStringArg) -> Result>> { + }} + #[inline] pub fn remove_package_async(&self, packageFullName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RemovePackageAsync)(self as *const _ as *mut _, packageFullName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn stage_package_async(&self, packageUri: &super::super::foundation::Uri, dependencyPackageUris: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn stage_package_async(&self, packageUri: &foundation::Uri, dependencyPackageUris: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StagePackageAsync)(self as *const _ as *mut _, 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(&self, manifestUri: &super::super::foundation::Uri, dependencyPackageUris: &super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions) -> Result>> { + }} + #[inline] pub fn register_package_async(&self, manifestUri: &foundation::Uri, dependencyPackageUris: &foundation::collections::IIterable, deploymentOptions: DeploymentOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RegisterPackageAsync)(self as *const _ as *mut _, 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(&self) -> Result>> { + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_packages(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackages)(self as *const _ as *mut _, &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(&self, userSecurityId: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_packages_by_user_security_id(&self, userSecurityId: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackagesByUserSecurityId)(self as *const _ as *mut _, 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(&self, packageName: &HStringArg, packagePublisher: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_packages_by_name_publisher(&self, packageName: &HStringArg, packagePublisher: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackagesByNamePublisher)(self as *const _ as *mut _, 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(&self, userSecurityId: &HStringArg, packageName: &HStringArg, packagePublisher: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_packages_by_user_security_id_name_publisher(&self, userSecurityId: &HStringArg, packageName: &HStringArg, packagePublisher: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackagesByUserSecurityIdNamePublisher)(self as *const _ as *mut _, 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(&self, packageFullName: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn find_users(&self, packageFullName: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindUsers)(self as *const _ as *mut _, packageFullName.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_package_state(&self, packageFullName: &HStringArg, packageState: PackageState) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_package_state(&self, packageFullName: &HStringArg, packageState: PackageState) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetPackageState)(self as *const _ as *mut _, 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(&self, packageFullName: &HStringArg) -> Result> { + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_package_by_package_full_name(&self, packageFullName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackageByPackageFullName)(self as *const _ as *mut _, packageFullName.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn cleanup_package_for_user_async(&self, packageName: &HStringArg, userSecurityId: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn cleanup_package_for_user_async(&self, packageName: &HStringArg, userSecurityId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CleanupPackageForUserAsync)(self as *const _ as *mut _, 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(&self, packageFamilyName: &HStringArg) -> Result>> { + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_packages_by_package_family_name(&self, packageFamilyName: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackagesByPackageFamilyName)(self 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_packages_by_user_security_id_package_family_name(&self, userSecurityId: &HStringArg, packageFamilyName: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_packages_by_user_security_id_package_family_name(&self, userSecurityId: &HStringArg, packageFamilyName: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackagesByUserSecurityIdPackageFamilyName)(self as *const _ as *mut _, 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(&self, userSecurityId: &HStringArg, packageFullName: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_package_by_user_security_id_package_full_name(&self, userSecurityId: &HStringArg, packageFullName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackageByUserSecurityIdPackageFullName)(self as *const _ as *mut _, userSecurityId.get(), packageFullName.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PackageManager: IPackageManager} impl RtActivatable for PackageManager {} DEFINE_CLSID!(PackageManager(&[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,97,99,107,97,103,101,77,97,110,97,103,101,114,0]) [CLSID_PackageManager]); 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(&self, packageFullName: HSTRING, removalOptions: RemovalOptions, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, - fn StagePackageWithOptionsAsync(&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(&self, mainPackageFullName: HSTRING, dependencyPackageFullNames: *mut super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn RemovePackageWithOptionsAsync(&self, packageFullName: HSTRING, removalOptions: RemovalOptions, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + fn StagePackageWithOptionsAsync(&self, packageUri: *mut foundation::Uri, dependencyPackageUris: *mut foundation::collections::IIterable, deploymentOptions: DeploymentOptions, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + fn RegisterPackageByFullNameAsync(&self, mainPackageFullName: HSTRING, dependencyPackageFullNames: *mut foundation::collections::IIterable, deploymentOptions: DeploymentOptions, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, #[cfg(not(feature="windows-applicationmodel"))] fn __Dummy3(&self) -> (), - #[cfg(feature="windows-applicationmodel")] fn FindPackagesWithPackageTypes(&self, packageTypes: PackageTypes, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT, + #[cfg(feature="windows-applicationmodel")] fn FindPackagesWithPackageTypes(&self, packageTypes: PackageTypes, out: *mut *mut foundation::collections::IIterable) -> HRESULT, #[cfg(not(feature="windows-applicationmodel"))] fn __Dummy4(&self) -> (), - #[cfg(feature="windows-applicationmodel")] fn FindPackagesByUserSecurityIdWithPackageTypes(&self, userSecurityId: HSTRING, packageTypes: PackageTypes, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT, + #[cfg(feature="windows-applicationmodel")] fn FindPackagesByUserSecurityIdWithPackageTypes(&self, userSecurityId: HSTRING, packageTypes: PackageTypes, out: *mut *mut foundation::collections::IIterable) -> HRESULT, #[cfg(not(feature="windows-applicationmodel"))] fn __Dummy5(&self) -> (), - #[cfg(feature="windows-applicationmodel")] fn FindPackagesByNamePublisherWithPackageTypes(&self, packageName: HSTRING, packagePublisher: HSTRING, packageTypes: PackageTypes, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT, + #[cfg(feature="windows-applicationmodel")] fn FindPackagesByNamePublisherWithPackageTypes(&self, packageName: HSTRING, packagePublisher: HSTRING, packageTypes: PackageTypes, out: *mut *mut foundation::collections::IIterable) -> HRESULT, #[cfg(not(feature="windows-applicationmodel"))] fn __Dummy6(&self) -> (), - #[cfg(feature="windows-applicationmodel")] fn FindPackagesByUserSecurityIdNamePublisherWithPackageTypes(&self, userSecurityId: HSTRING, packageName: HSTRING, packagePublisher: HSTRING, packageTypes: PackageTypes, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT, + #[cfg(feature="windows-applicationmodel")] fn FindPackagesByUserSecurityIdNamePublisherWithPackageTypes(&self, userSecurityId: HSTRING, packageName: HSTRING, packagePublisher: HSTRING, packageTypes: PackageTypes, out: *mut *mut foundation::collections::IIterable) -> HRESULT, #[cfg(not(feature="windows-applicationmodel"))] fn __Dummy7(&self) -> (), - #[cfg(feature="windows-applicationmodel")] fn FindPackagesByPackageFamilyNameWithPackageTypes(&self, packageFamilyName: HSTRING, packageTypes: PackageTypes, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT, + #[cfg(feature="windows-applicationmodel")] fn FindPackagesByPackageFamilyNameWithPackageTypes(&self, packageFamilyName: HSTRING, packageTypes: PackageTypes, out: *mut *mut foundation::collections::IIterable) -> HRESULT, #[cfg(not(feature="windows-applicationmodel"))] fn __Dummy8(&self) -> (), - #[cfg(feature="windows-applicationmodel")] fn FindPackagesByUserSecurityIdPackageFamilyNameWithPackageTypes(&self, userSecurityId: HSTRING, packageFamilyName: HSTRING, packageTypes: PackageTypes, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT, - fn StageUserDataAsync(&self, packageFullName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT + #[cfg(feature="windows-applicationmodel")] fn FindPackagesByUserSecurityIdPackageFamilyNameWithPackageTypes(&self, userSecurityId: HSTRING, packageFamilyName: HSTRING, packageTypes: PackageTypes, out: *mut *mut foundation::collections::IIterable) -> HRESULT, + fn StageUserDataAsync(&self, packageFullName: HSTRING, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT }} impl IPackageManager2 { - #[inline] pub unsafe fn remove_package_with_options_async(&self, packageFullName: &HStringArg, removalOptions: RemovalOptions) -> Result>> { + #[inline] pub fn remove_package_with_options_async(&self, packageFullName: &HStringArg, removalOptions: RemovalOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RemovePackageWithOptionsAsync)(self as *const _ as *mut _, 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(&self, packageUri: &super::super::foundation::Uri, dependencyPackageUris: &super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions) -> Result>> { + }} + #[inline] pub fn stage_package_with_options_async(&self, packageUri: &foundation::Uri, dependencyPackageUris: &foundation::collections::IIterable, deploymentOptions: DeploymentOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StagePackageWithOptionsAsync)(self as *const _ as *mut _, 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(&self, mainPackageFullName: &HStringArg, dependencyPackageFullNames: &super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions) -> Result>> { + }} + #[inline] pub fn register_package_by_full_name_async(&self, mainPackageFullName: &HStringArg, dependencyPackageFullNames: &foundation::collections::IIterable, deploymentOptions: DeploymentOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RegisterPackageByFullNameAsync)(self as *const _ as *mut _, 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(&self, packageTypes: PackageTypes) -> Result>> { + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_packages_with_package_types(&self, packageTypes: PackageTypes) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackagesWithPackageTypes)(self as *const _ as *mut _, 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(&self, userSecurityId: &HStringArg, packageTypes: PackageTypes) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_packages_by_user_security_id_with_package_types(&self, userSecurityId: &HStringArg, packageTypes: PackageTypes) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackagesByUserSecurityIdWithPackageTypes)(self as *const _ as *mut _, 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(&self, packageName: &HStringArg, packagePublisher: &HStringArg, packageTypes: PackageTypes) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_packages_by_name_publisher_with_package_types(&self, packageName: &HStringArg, packagePublisher: &HStringArg, packageTypes: PackageTypes) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackagesByNamePublisherWithPackageTypes)(self as *const _ as *mut _, 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(&self, userSecurityId: &HStringArg, packageName: &HStringArg, packagePublisher: &HStringArg, packageTypes: PackageTypes) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_packages_by_user_security_id_name_publisher_with_package_types(&self, userSecurityId: &HStringArg, packageName: &HStringArg, packagePublisher: &HStringArg, packageTypes: PackageTypes) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackagesByUserSecurityIdNamePublisherWithPackageTypes)(self as *const _ as *mut _, 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(&self, packageFamilyName: &HStringArg, packageTypes: PackageTypes) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_packages_by_package_family_name_with_package_types(&self, packageFamilyName: &HStringArg, packageTypes: PackageTypes) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackagesByPackageFamilyNameWithPackageTypes)(self as *const _ as *mut _, 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(&self, userSecurityId: &HStringArg, packageFamilyName: &HStringArg, packageTypes: PackageTypes) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_packages_by_user_security_id_package_family_name_with_package_types(&self, userSecurityId: &HStringArg, packageFamilyName: &HStringArg, packageTypes: PackageTypes) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackagesByUserSecurityIdPackageFamilyNameWithPackageTypes)(self as *const _ as *mut _, 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(&self, packageFullName: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn stage_user_data_async(&self, packageFullName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StageUserDataAsync)(self as *const _ as *mut _, 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(&self, packageStorePath: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn AddPackageToVolumeAsync(&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 AddPackageVolumeAsync(&self, packageStorePath: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn AddPackageToVolumeAsync(&self, packageUri: *mut foundation::Uri, dependencyPackageUris: *mut foundation::collections::IIterable, deploymentOptions: DeploymentOptions, targetVolume: *mut PackageVolume, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, fn ClearPackageStatus(&self, packageFullName: HSTRING, status: PackageStatus) -> HRESULT, - fn RegisterPackageWithAppDataVolumeAsync(&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 RegisterPackageWithAppDataVolumeAsync(&self, manifestUri: *mut foundation::Uri, dependencyPackageUris: *mut foundation::collections::IIterable, deploymentOptions: DeploymentOptions, appDataVolume: *mut PackageVolume, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, fn FindPackageVolumeByName(&self, volumeName: HSTRING, out: *mut *mut PackageVolume) -> HRESULT, - fn FindPackageVolumes(&self, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT, + fn FindPackageVolumes(&self, out: *mut *mut foundation::collections::IIterable) -> HRESULT, fn GetDefaultPackageVolume(&self, out: *mut *mut PackageVolume) -> HRESULT, - fn MovePackageToVolumeAsync(&self, packageFullName: HSTRING, deploymentOptions: DeploymentOptions, targetVolume: *mut PackageVolume, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, - fn RemovePackageVolumeAsync(&self, volume: *mut PackageVolume, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn MovePackageToVolumeAsync(&self, packageFullName: HSTRING, deploymentOptions: DeploymentOptions, targetVolume: *mut PackageVolume, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + fn RemovePackageVolumeAsync(&self, volume: *mut PackageVolume, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, fn SetDefaultPackageVolume(&self, volume: *mut PackageVolume) -> HRESULT, fn SetPackageStatus(&self, packageFullName: HSTRING, status: PackageStatus) -> HRESULT, - fn SetPackageVolumeOfflineAsync(&self, packageVolume: *mut PackageVolume, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, - fn SetPackageVolumeOnlineAsync(&self, packageVolume: *mut PackageVolume, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, - fn StagePackageToVolumeAsync(&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(&self, packageFullName: HSTRING, deploymentOptions: DeploymentOptions, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT + fn SetPackageVolumeOfflineAsync(&self, packageVolume: *mut PackageVolume, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + fn SetPackageVolumeOnlineAsync(&self, packageVolume: *mut PackageVolume, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + fn StagePackageToVolumeAsync(&self, packageUri: *mut foundation::Uri, dependencyPackageUris: *mut foundation::collections::IIterable, deploymentOptions: DeploymentOptions, targetVolume: *mut PackageVolume, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + fn StageUserDataWithOptionsAsync(&self, packageFullName: HSTRING, deploymentOptions: DeploymentOptions, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT }} impl IPackageManager3 { - #[inline] pub unsafe fn add_package_volume_async(&self, packageStorePath: &HStringArg) -> Result>> { + #[inline] pub fn add_package_volume_async(&self, packageStorePath: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AddPackageVolumeAsync)(self as *const _ as *mut _, packageStorePath.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_package_to_volume_async(&self, packageUri: &super::super::foundation::Uri, dependencyPackageUris: &super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions, targetVolume: &PackageVolume) -> Result>> { + }} + #[inline] pub fn add_package_to_volume_async(&self, packageUri: &foundation::Uri, dependencyPackageUris: &foundation::collections::IIterable, deploymentOptions: DeploymentOptions, targetVolume: &PackageVolume) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AddPackageToVolumeAsync)(self as *const _ as *mut _, 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(&self, packageFullName: &HStringArg, status: PackageStatus) -> Result<()> { + }} + #[inline] pub fn clear_package_status(&self, packageFullName: &HStringArg, status: PackageStatus) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ClearPackageStatus)(self as *const _ as *mut _, packageFullName.get(), status); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn register_package_with_app_data_volume_async(&self, manifestUri: &super::super::foundation::Uri, dependencyPackageUris: &super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions, appDataVolume: &PackageVolume) -> Result>> { + }} + #[inline] pub fn register_package_with_app_data_volume_async(&self, manifestUri: &foundation::Uri, dependencyPackageUris: &foundation::collections::IIterable, deploymentOptions: DeploymentOptions, appDataVolume: &PackageVolume) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RegisterPackageWithAppDataVolumeAsync)(self as *const _ as *mut _, 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(&self, volumeName: &HStringArg) -> Result> { + }} + #[inline] pub fn find_package_volume_by_name(&self, volumeName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackageVolumeByName)(self as *const _ as *mut _, volumeName.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_package_volumes(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn find_package_volumes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackageVolumes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_package_volume(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_default_package_volume(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefaultPackageVolume)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn move_package_to_volume_async(&self, packageFullName: &HStringArg, deploymentOptions: DeploymentOptions, targetVolume: &PackageVolume) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn move_package_to_volume_async(&self, packageFullName: &HStringArg, deploymentOptions: DeploymentOptions, targetVolume: &PackageVolume) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MovePackageToVolumeAsync)(self as *const _ as *mut _, 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(&self, volume: &PackageVolume) -> Result>> { + }} + #[inline] pub fn remove_package_volume_async(&self, volume: &PackageVolume) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RemovePackageVolumeAsync)(self as *const _ as *mut _, 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(&self, volume: &PackageVolume) -> Result<()> { + }} + #[inline] pub fn set_default_package_volume(&self, volume: &PackageVolume) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetDefaultPackageVolume)(self as *const _ as *mut _, volume as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_package_status(&self, packageFullName: &HStringArg, status: PackageStatus) -> Result<()> { + }} + #[inline] pub fn set_package_status(&self, packageFullName: &HStringArg, status: PackageStatus) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetPackageStatus)(self as *const _ as *mut _, packageFullName.get(), status); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_package_volume_offline_async(&self, packageVolume: &PackageVolume) -> Result>> { + }} + #[inline] pub fn set_package_volume_offline_async(&self, packageVolume: &PackageVolume) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetPackageVolumeOfflineAsync)(self as *const _ as *mut _, 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(&self, packageVolume: &PackageVolume) -> Result>> { + }} + #[inline] pub fn set_package_volume_online_async(&self, packageVolume: &PackageVolume) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetPackageVolumeOnlineAsync)(self as *const _ as *mut _, 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(&self, packageUri: &super::super::foundation::Uri, dependencyPackageUris: &super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions, targetVolume: &PackageVolume) -> Result>> { + }} + #[inline] pub fn stage_package_to_volume_async(&self, packageUri: &foundation::Uri, dependencyPackageUris: &foundation::collections::IIterable, deploymentOptions: DeploymentOptions, targetVolume: &PackageVolume) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StagePackageToVolumeAsync)(self as *const _ as *mut _, 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(&self, packageFullName: &HStringArg, deploymentOptions: DeploymentOptions) -> Result>> { + }} + #[inline] pub fn stage_user_data_with_options_async(&self, packageFullName: &HStringArg, deploymentOptions: DeploymentOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StageUserDataWithOptionsAsync)(self as *const _ as *mut _, packageFullName.get(), deploymentOptions, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn GetPackageVolumesAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IPackageManager4 { - #[inline] pub unsafe fn get_package_volumes_async(&self) -> Result>>> { + #[inline] pub fn get_package_volumes_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPackageVolumesAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IPackageManager5, 1897869591, 6909, 17171, 151, 140, 155, 182, 225, 184, 100, 167); RT_INTERFACE!{interface IPackageManager5(IPackageManager5Vtbl): IInspectable(IInspectableVtbl) [IID_IPackageManager5] { - fn AddPackageToVolumeAndOptionalPackagesAsync(&self, packageUri: *mut super::super::foundation::Uri, dependencyPackageUris: *mut super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions, targetVolume: *mut PackageVolume, optionalPackageFamilyNames: *mut super::super::foundation::collections::IIterable, externalPackageUris: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, - fn StagePackageToVolumeAndOptionalPackagesAsync(&self, packageUri: *mut super::super::foundation::Uri, dependencyPackageUris: *mut super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions, targetVolume: *mut PackageVolume, optionalPackageFamilyNames: *mut super::super::foundation::collections::IIterable, externalPackageUris: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, - fn RegisterPackageByFamilyNameAndOptionalPackagesAsync(&self, mainPackageFamilyName: HSTRING, dependencyPackageFamilyNames: *mut super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions, appDataVolume: *mut PackageVolume, optionalPackageFamilyNames: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn AddPackageToVolumeAndOptionalPackagesAsync(&self, packageUri: *mut foundation::Uri, dependencyPackageUris: *mut foundation::collections::IIterable, deploymentOptions: DeploymentOptions, targetVolume: *mut PackageVolume, optionalPackageFamilyNames: *mut foundation::collections::IIterable, externalPackageUris: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + fn StagePackageToVolumeAndOptionalPackagesAsync(&self, packageUri: *mut foundation::Uri, dependencyPackageUris: *mut foundation::collections::IIterable, deploymentOptions: DeploymentOptions, targetVolume: *mut PackageVolume, optionalPackageFamilyNames: *mut foundation::collections::IIterable, externalPackageUris: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + fn RegisterPackageByFamilyNameAndOptionalPackagesAsync(&self, mainPackageFamilyName: HSTRING, dependencyPackageFamilyNames: *mut foundation::collections::IIterable, deploymentOptions: DeploymentOptions, appDataVolume: *mut PackageVolume, optionalPackageFamilyNames: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, fn get_DebugSettings(&self, out: *mut *mut PackageManagerDebugSettings) -> HRESULT }} impl IPackageManager5 { - #[inline] pub unsafe fn add_package_to_volume_and_optional_packages_async(&self, packageUri: &super::super::foundation::Uri, dependencyPackageUris: &super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions, targetVolume: &PackageVolume, optionalPackageFamilyNames: &super::super::foundation::collections::IIterable, externalPackageUris: &super::super::foundation::collections::IIterable) -> Result>> { + #[inline] pub fn add_package_to_volume_and_optional_packages_async(&self, packageUri: &foundation::Uri, dependencyPackageUris: &foundation::collections::IIterable, deploymentOptions: DeploymentOptions, targetVolume: &PackageVolume, optionalPackageFamilyNames: &foundation::collections::IIterable, externalPackageUris: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AddPackageToVolumeAndOptionalPackagesAsync)(self as *const _ as *mut _, packageUri as *const _ as *mut _, dependencyPackageUris as *const _ as *mut _, deploymentOptions, targetVolume as *const _ as *mut _, optionalPackageFamilyNames as *const _ as *mut _, externalPackageUris 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_and_optional_packages_async(&self, packageUri: &super::super::foundation::Uri, dependencyPackageUris: &super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions, targetVolume: &PackageVolume, optionalPackageFamilyNames: &super::super::foundation::collections::IIterable, externalPackageUris: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn stage_package_to_volume_and_optional_packages_async(&self, packageUri: &foundation::Uri, dependencyPackageUris: &foundation::collections::IIterable, deploymentOptions: DeploymentOptions, targetVolume: &PackageVolume, optionalPackageFamilyNames: &foundation::collections::IIterable, externalPackageUris: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StagePackageToVolumeAndOptionalPackagesAsync)(self as *const _ as *mut _, packageUri as *const _ as *mut _, dependencyPackageUris as *const _ as *mut _, deploymentOptions, targetVolume as *const _ as *mut _, optionalPackageFamilyNames as *const _ as *mut _, externalPackageUris as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn register_package_by_family_name_and_optional_packages_async(&self, mainPackageFamilyName: &HStringArg, dependencyPackageFamilyNames: &super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions, appDataVolume: &PackageVolume, optionalPackageFamilyNames: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn register_package_by_family_name_and_optional_packages_async(&self, mainPackageFamilyName: &HStringArg, dependencyPackageFamilyNames: &foundation::collections::IIterable, deploymentOptions: DeploymentOptions, appDataVolume: &PackageVolume, optionalPackageFamilyNames: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RegisterPackageByFamilyNameAndOptionalPackagesAsync)(self as *const _ as *mut _, mainPackageFamilyName.get(), dependencyPackageFamilyNames as *const _ as *mut _, deploymentOptions, appDataVolume as *const _ as *mut _, optionalPackageFamilyNames as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_debug_settings(&self) -> Result> { + }} + #[inline] pub fn get_debug_settings(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DebugSettings)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IPackageManager6, 138930441, 21453, 20047, 131, 46, 87, 209, 128, 246, 228, 71); RT_INTERFACE!{interface IPackageManager6(IPackageManager6Vtbl): IInspectable(IInspectableVtbl) [IID_IPackageManager6] { - fn ProvisionPackageForAllUsersAsync(&self, packageFamilyName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, - fn AddPackageByAppInstallerFileAsync(&self, appInstallerFileUri: *mut super::super::foundation::Uri, options: AddPackageByAppInstallerOptions, targetVolume: *mut PackageVolume, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, - fn RequestAddPackageByAppInstallerFileAsync(&self, appInstallerFileUri: *mut super::super::foundation::Uri, options: AddPackageByAppInstallerOptions, targetVolume: *mut PackageVolume, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, - fn AddPackageToVolumeAndRelatedSetAsync(&self, packageUri: *mut super::super::foundation::Uri, dependencyPackageUris: *mut super::super::foundation::collections::IIterable, options: DeploymentOptions, targetVolume: *mut PackageVolume, optionalPackageFamilyNames: *mut super::super::foundation::collections::IIterable, packageUrisToInstall: *mut super::super::foundation::collections::IIterable, relatedPackageUris: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, - fn StagePackageToVolumeAndRelatedSetAsync(&self, packageUri: *mut super::super::foundation::Uri, dependencyPackageUris: *mut super::super::foundation::collections::IIterable, options: DeploymentOptions, targetVolume: *mut PackageVolume, optionalPackageFamilyNames: *mut super::super::foundation::collections::IIterable, packageUrisToInstall: *mut super::super::foundation::collections::IIterable, relatedPackageUris: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, - fn RequestAddPackageAsync(&self, packageUri: *mut super::super::foundation::Uri, dependencyPackageUris: *mut super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions, targetVolume: *mut PackageVolume, optionalPackageFamilyNames: *mut super::super::foundation::collections::IIterable, relatedPackageUris: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT + fn ProvisionPackageForAllUsersAsync(&self, packageFamilyName: HSTRING, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + fn AddPackageByAppInstallerFileAsync(&self, appInstallerFileUri: *mut foundation::Uri, options: AddPackageByAppInstallerOptions, targetVolume: *mut PackageVolume, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + fn RequestAddPackageByAppInstallerFileAsync(&self, appInstallerFileUri: *mut foundation::Uri, options: AddPackageByAppInstallerOptions, targetVolume: *mut PackageVolume, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + fn AddPackageToVolumeAndRelatedSetAsync(&self, packageUri: *mut foundation::Uri, dependencyPackageUris: *mut foundation::collections::IIterable, options: DeploymentOptions, targetVolume: *mut PackageVolume, optionalPackageFamilyNames: *mut foundation::collections::IIterable, packageUrisToInstall: *mut foundation::collections::IIterable, relatedPackageUris: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + fn StagePackageToVolumeAndRelatedSetAsync(&self, packageUri: *mut foundation::Uri, dependencyPackageUris: *mut foundation::collections::IIterable, options: DeploymentOptions, targetVolume: *mut PackageVolume, optionalPackageFamilyNames: *mut foundation::collections::IIterable, packageUrisToInstall: *mut foundation::collections::IIterable, relatedPackageUris: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + fn RequestAddPackageAsync(&self, packageUri: *mut foundation::Uri, dependencyPackageUris: *mut foundation::collections::IIterable, deploymentOptions: DeploymentOptions, targetVolume: *mut PackageVolume, optionalPackageFamilyNames: *mut foundation::collections::IIterable, relatedPackageUris: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT }} impl IPackageManager6 { - #[inline] pub unsafe fn provision_package_for_all_users_async(&self, packageFamilyName: &HStringArg) -> Result>> { + #[inline] pub fn provision_package_for_all_users_async(&self, packageFamilyName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ProvisionPackageForAllUsersAsync)(self as *const _ as *mut _, packageFamilyName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_package_by_app_installer_file_async(&self, appInstallerFileUri: &super::super::foundation::Uri, options: AddPackageByAppInstallerOptions, targetVolume: &PackageVolume) -> Result>> { + }} + #[inline] pub fn add_package_by_app_installer_file_async(&self, appInstallerFileUri: &foundation::Uri, options: AddPackageByAppInstallerOptions, targetVolume: &PackageVolume) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AddPackageByAppInstallerFileAsync)(self as *const _ as *mut _, appInstallerFileUri as *const _ as *mut _, options, targetVolume as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_add_package_by_app_installer_file_async(&self, appInstallerFileUri: &super::super::foundation::Uri, options: AddPackageByAppInstallerOptions, targetVolume: &PackageVolume) -> Result>> { + }} + #[inline] pub fn request_add_package_by_app_installer_file_async(&self, appInstallerFileUri: &foundation::Uri, options: AddPackageByAppInstallerOptions, targetVolume: &PackageVolume) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAddPackageByAppInstallerFileAsync)(self as *const _ as *mut _, appInstallerFileUri as *const _ as *mut _, options, targetVolume as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_package_to_volume_and_related_set_async(&self, packageUri: &super::super::foundation::Uri, dependencyPackageUris: &super::super::foundation::collections::IIterable, options: DeploymentOptions, targetVolume: &PackageVolume, optionalPackageFamilyNames: &super::super::foundation::collections::IIterable, packageUrisToInstall: &super::super::foundation::collections::IIterable, relatedPackageUris: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn add_package_to_volume_and_related_set_async(&self, packageUri: &foundation::Uri, dependencyPackageUris: &foundation::collections::IIterable, options: DeploymentOptions, targetVolume: &PackageVolume, optionalPackageFamilyNames: &foundation::collections::IIterable, packageUrisToInstall: &foundation::collections::IIterable, relatedPackageUris: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AddPackageToVolumeAndRelatedSetAsync)(self as *const _ as *mut _, packageUri as *const _ as *mut _, dependencyPackageUris as *const _ as *mut _, options, targetVolume as *const _ as *mut _, optionalPackageFamilyNames as *const _ as *mut _, packageUrisToInstall as *const _ as *mut _, relatedPackageUris 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_and_related_set_async(&self, packageUri: &super::super::foundation::Uri, dependencyPackageUris: &super::super::foundation::collections::IIterable, options: DeploymentOptions, targetVolume: &PackageVolume, optionalPackageFamilyNames: &super::super::foundation::collections::IIterable, packageUrisToInstall: &super::super::foundation::collections::IIterable, relatedPackageUris: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn stage_package_to_volume_and_related_set_async(&self, packageUri: &foundation::Uri, dependencyPackageUris: &foundation::collections::IIterable, options: DeploymentOptions, targetVolume: &PackageVolume, optionalPackageFamilyNames: &foundation::collections::IIterable, packageUrisToInstall: &foundation::collections::IIterable, relatedPackageUris: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StagePackageToVolumeAndRelatedSetAsync)(self as *const _ as *mut _, packageUri as *const _ as *mut _, dependencyPackageUris as *const _ as *mut _, options, targetVolume as *const _ as *mut _, optionalPackageFamilyNames as *const _ as *mut _, packageUrisToInstall as *const _ as *mut _, relatedPackageUris as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_add_package_async(&self, packageUri: &super::super::foundation::Uri, dependencyPackageUris: &super::super::foundation::collections::IIterable, deploymentOptions: DeploymentOptions, targetVolume: &PackageVolume, optionalPackageFamilyNames: &super::super::foundation::collections::IIterable, relatedPackageUris: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn request_add_package_async(&self, packageUri: &foundation::Uri, dependencyPackageUris: &foundation::collections::IIterable, deploymentOptions: DeploymentOptions, targetVolume: &PackageVolume, optionalPackageFamilyNames: &foundation::collections::IIterable, relatedPackageUris: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAddPackageAsync)(self as *const _ as *mut _, packageUri as *const _ as *mut _, dependencyPackageUris as *const _ as *mut _, deploymentOptions, targetVolume as *const _ as *mut _, optionalPackageFamilyNames as *const _ as *mut _, relatedPackageUris as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IPackageManagerDebugSettings, 442570371, 43400, 20431, 143, 15, 206, 23, 88, 152, 232, 235); RT_INTERFACE!{interface IPackageManagerDebugSettings(IPackageManagerDebugSettingsVtbl): IInspectable(IInspectableVtbl) [IID_IPackageManagerDebugSettings] { - #[cfg(feature="windows-applicationmodel")] fn SetContentGroupStateAsync(&self, package: *mut super::super::applicationmodel::Package, contentGroupName: HSTRING, state: super::super::applicationmodel::PackageContentGroupState, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - #[cfg(feature="windows-applicationmodel")] fn SetContentGroupStateWithPercentageAsync(&self, package: *mut super::super::applicationmodel::Package, contentGroupName: HSTRING, state: super::super::applicationmodel::PackageContentGroupState, completionPercentage: f64, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + #[cfg(feature="windows-applicationmodel")] fn SetContentGroupStateAsync(&self, package: *mut super::super::applicationmodel::Package, contentGroupName: HSTRING, state: super::super::applicationmodel::PackageContentGroupState, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + #[cfg(feature="windows-applicationmodel")] fn SetContentGroupStateWithPercentageAsync(&self, package: *mut super::super::applicationmodel::Package, contentGroupName: HSTRING, state: super::super::applicationmodel::PackageContentGroupState, completionPercentage: f64, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IPackageManagerDebugSettings { - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn set_content_group_state_async(&self, package: &super::super::applicationmodel::Package, contentGroupName: &HStringArg, state: super::super::applicationmodel::PackageContentGroupState) -> Result> { + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn set_content_group_state_async(&self, package: &super::super::applicationmodel::Package, contentGroupName: &HStringArg, state: super::super::applicationmodel::PackageContentGroupState) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetContentGroupStateAsync)(self as *const _ as *mut _, package as *const _ as *mut _, contentGroupName.get(), state, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn set_content_group_state_with_percentage_async(&self, package: &super::super::applicationmodel::Package, contentGroupName: &HStringArg, state: super::super::applicationmodel::PackageContentGroupState, completionPercentage: f64) -> Result> { + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn set_content_group_state_with_percentage_async(&self, package: &super::super::applicationmodel::Package, contentGroupName: &HStringArg, state: super::super::applicationmodel::PackageContentGroupState, completionPercentage: f64) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetContentGroupStateWithPercentageAsync)(self as *const _ as *mut _, package as *const _ as *mut _, contentGroupName.get(), state, completionPercentage, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PackageManagerDebugSettings: IPackageManagerDebugSettings} RT_ENUM! { enum PackageState: i32 { @@ -618,16 +618,16 @@ RT_INTERFACE!{interface IPackageUserInformation(IPackageUserInformationVtbl): II fn get_InstallState(&self, out: *mut PackageInstallState) -> HRESULT }} impl IPackageUserInformation { - #[inline] pub unsafe fn get_user_security_id(&self) -> Result { + #[inline] pub fn get_user_security_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UserSecurityId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_install_state(&self) -> Result { + }} + #[inline] pub fn get_install_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InstallState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PackageUserInformation: IPackageUserInformation} DEFINE_IID!(IID_IPackageVolume, 3475403459, 6720, 17488, 151, 57, 42, 206, 46, 137, 136, 83); @@ -638,146 +638,146 @@ RT_INTERFACE!{interface IPackageVolume(IPackageVolumeVtbl): IInspectable(IInspec fn get_Name(&self, out: *mut HSTRING) -> HRESULT, fn get_PackageStorePath(&self, out: *mut HSTRING) -> HRESULT, fn get_SupportsHardLinks(&self, out: *mut bool) -> HRESULT, - #[cfg(feature="windows-applicationmodel")] fn FindPackages(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - #[cfg(feature="windows-applicationmodel")] fn FindPackagesByNamePublisher(&self, packageName: HSTRING, packagePublisher: HSTRING, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - #[cfg(feature="windows-applicationmodel")] fn FindPackagesByPackageFamilyName(&self, packageFamilyName: HSTRING, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - #[cfg(feature="windows-applicationmodel")] fn FindPackagesWithPackageTypes(&self, packageTypes: PackageTypes, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - #[cfg(feature="windows-applicationmodel")] fn FindPackagesByNamePublisherWithPackagesTypes(&self, packageTypes: PackageTypes, packageName: HSTRING, packagePublisher: HSTRING, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - #[cfg(feature="windows-applicationmodel")] fn FindPackagesByPackageFamilyNameWithPackageTypes(&self, packageTypes: PackageTypes, packageFamilyName: HSTRING, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - #[cfg(feature="windows-applicationmodel")] fn FindPackageByPackageFullName(&self, packageFullName: HSTRING, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - #[cfg(feature="windows-applicationmodel")] fn FindPackagesByUserSecurityId(&self, userSecurityId: HSTRING, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - #[cfg(feature="windows-applicationmodel")] fn FindPackagesByUserSecurityIdNamePublisher(&self, userSecurityId: HSTRING, packageName: HSTRING, packagePublisher: HSTRING, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - #[cfg(feature="windows-applicationmodel")] fn FindPackagesByUserSecurityIdPackageFamilyName(&self, userSecurityId: HSTRING, packageFamilyName: HSTRING, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - #[cfg(feature="windows-applicationmodel")] fn FindPackagesByUserSecurityIdWithPackageTypes(&self, userSecurityId: HSTRING, packageTypes: PackageTypes, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - #[cfg(feature="windows-applicationmodel")] fn FindPackagesByUserSecurityIdNamePublisherWithPackageTypes(&self, userSecurityId: HSTRING, packageTypes: PackageTypes, packageName: HSTRING, packagePublisher: HSTRING, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - #[cfg(feature="windows-applicationmodel")] fn FindPackagesByUserSecurityIdPackageFamilyNameWithPackagesTypes(&self, userSecurityId: HSTRING, packageTypes: PackageTypes, packageFamilyName: HSTRING, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - #[cfg(feature="windows-applicationmodel")] fn FindPackageByUserSecurityIdPackageFullName(&self, userSecurityId: HSTRING, packageFullName: HSTRING, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + #[cfg(feature="windows-applicationmodel")] fn FindPackages(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + #[cfg(feature="windows-applicationmodel")] fn FindPackagesByNamePublisher(&self, packageName: HSTRING, packagePublisher: HSTRING, out: *mut *mut foundation::collections::IVector) -> HRESULT, + #[cfg(feature="windows-applicationmodel")] fn FindPackagesByPackageFamilyName(&self, packageFamilyName: HSTRING, out: *mut *mut foundation::collections::IVector) -> HRESULT, + #[cfg(feature="windows-applicationmodel")] fn FindPackagesWithPackageTypes(&self, packageTypes: PackageTypes, out: *mut *mut foundation::collections::IVector) -> HRESULT, + #[cfg(feature="windows-applicationmodel")] fn FindPackagesByNamePublisherWithPackagesTypes(&self, packageTypes: PackageTypes, packageName: HSTRING, packagePublisher: HSTRING, out: *mut *mut foundation::collections::IVector) -> HRESULT, + #[cfg(feature="windows-applicationmodel")] fn FindPackagesByPackageFamilyNameWithPackageTypes(&self, packageTypes: PackageTypes, packageFamilyName: HSTRING, out: *mut *mut foundation::collections::IVector) -> HRESULT, + #[cfg(feature="windows-applicationmodel")] fn FindPackageByPackageFullName(&self, packageFullName: HSTRING, out: *mut *mut foundation::collections::IVector) -> HRESULT, + #[cfg(feature="windows-applicationmodel")] fn FindPackagesByUserSecurityId(&self, userSecurityId: HSTRING, out: *mut *mut foundation::collections::IVector) -> HRESULT, + #[cfg(feature="windows-applicationmodel")] fn FindPackagesByUserSecurityIdNamePublisher(&self, userSecurityId: HSTRING, packageName: HSTRING, packagePublisher: HSTRING, out: *mut *mut foundation::collections::IVector) -> HRESULT, + #[cfg(feature="windows-applicationmodel")] fn FindPackagesByUserSecurityIdPackageFamilyName(&self, userSecurityId: HSTRING, packageFamilyName: HSTRING, out: *mut *mut foundation::collections::IVector) -> HRESULT, + #[cfg(feature="windows-applicationmodel")] fn FindPackagesByUserSecurityIdWithPackageTypes(&self, userSecurityId: HSTRING, packageTypes: PackageTypes, out: *mut *mut foundation::collections::IVector) -> HRESULT, + #[cfg(feature="windows-applicationmodel")] fn FindPackagesByUserSecurityIdNamePublisherWithPackageTypes(&self, userSecurityId: HSTRING, packageTypes: PackageTypes, packageName: HSTRING, packagePublisher: HSTRING, out: *mut *mut foundation::collections::IVector) -> HRESULT, + #[cfg(feature="windows-applicationmodel")] fn FindPackagesByUserSecurityIdPackageFamilyNameWithPackagesTypes(&self, userSecurityId: HSTRING, packageTypes: PackageTypes, packageFamilyName: HSTRING, out: *mut *mut foundation::collections::IVector) -> HRESULT, + #[cfg(feature="windows-applicationmodel")] fn FindPackageByUserSecurityIdPackageFullName(&self, userSecurityId: HSTRING, packageFullName: HSTRING, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IPackageVolume { - #[inline] pub unsafe fn get_is_offline(&self) -> Result { + #[inline] pub fn get_is_offline(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsOffline)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_system_volume(&self) -> Result { + }} + #[inline] pub fn get_is_system_volume(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSystemVolume)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_mount_point(&self) -> Result { + }} + #[inline] pub fn get_mount_point(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MountPoint)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_name(&self) -> Result { + }} + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_package_store_path(&self) -> Result { + }} + #[inline] pub fn get_package_store_path(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PackageStorePath)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supports_hard_links(&self) -> Result { + }} + #[inline] pub fn get_supports_hard_links(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SupportsHardLinks)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn find_packages(&self) -> Result>> { + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_packages(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackages)(self as *const _ as *mut _, &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(&self, packageName: &HStringArg, packagePublisher: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_packages_by_name_publisher(&self, packageName: &HStringArg, packagePublisher: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackagesByNamePublisher)(self as *const _ as *mut _, 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(&self, packageFamilyName: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_packages_by_package_family_name(&self, packageFamilyName: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackagesByPackageFamilyName)(self 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_packages_with_package_types(&self, packageTypes: PackageTypes) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_packages_with_package_types(&self, packageTypes: PackageTypes) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackagesWithPackageTypes)(self as *const _ as *mut _, 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(&self, packageTypes: PackageTypes, packageName: &HStringArg, packagePublisher: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_packages_by_name_publisher_with_packages_types(&self, packageTypes: PackageTypes, packageName: &HStringArg, packagePublisher: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackagesByNamePublisherWithPackagesTypes)(self as *const _ as *mut _, 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(&self, packageTypes: PackageTypes, packageFamilyName: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_packages_by_package_family_name_with_package_types(&self, packageTypes: PackageTypes, packageFamilyName: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackagesByPackageFamilyNameWithPackageTypes)(self as *const _ as *mut _, 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(&self, packageFullName: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_package_by_package_full_name(&self, packageFullName: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackageByPackageFullName)(self as *const _ as *mut _, 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(&self, userSecurityId: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_packages_by_user_security_id(&self, userSecurityId: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackagesByUserSecurityId)(self as *const _ as *mut _, 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(&self, userSecurityId: &HStringArg, packageName: &HStringArg, packagePublisher: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_packages_by_user_security_id_name_publisher(&self, userSecurityId: &HStringArg, packageName: &HStringArg, packagePublisher: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackagesByUserSecurityIdNamePublisher)(self as *const _ as *mut _, 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(&self, userSecurityId: &HStringArg, packageFamilyName: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_packages_by_user_security_id_package_family_name(&self, userSecurityId: &HStringArg, packageFamilyName: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackagesByUserSecurityIdPackageFamilyName)(self as *const _ as *mut _, 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(&self, userSecurityId: &HStringArg, packageTypes: PackageTypes) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_packages_by_user_security_id_with_package_types(&self, userSecurityId: &HStringArg, packageTypes: PackageTypes) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackagesByUserSecurityIdWithPackageTypes)(self as *const _ as *mut _, 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(&self, userSecurityId: &HStringArg, packageTypes: PackageTypes, packageName: &HStringArg, packagePublisher: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_packages_by_user_security_id_name_publisher_with_package_types(&self, userSecurityId: &HStringArg, packageTypes: PackageTypes, packageName: &HStringArg, packagePublisher: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackagesByUserSecurityIdNamePublisherWithPackageTypes)(self as *const _ as *mut _, 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(&self, userSecurityId: &HStringArg, packageTypes: PackageTypes, packageFamilyName: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_packages_by_user_security_id_package_family_name_with_packages_types(&self, userSecurityId: &HStringArg, packageTypes: PackageTypes, packageFamilyName: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackagesByUserSecurityIdPackageFamilyNameWithPackagesTypes)(self as *const _ as *mut _, 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(&self, userSecurityId: &HStringArg, packageFullName: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_package_by_user_security_id_package_full_name(&self, userSecurityId: &HStringArg, packageFullName: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackageByUserSecurityIdPackageFullName)(self as *const _ as *mut _, userSecurityId.get(), packageFullName.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PackageVolume: IPackageVolume} 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(&self, out: *mut bool) -> HRESULT, fn get_IsAppxInstallSupported(&self, out: *mut bool) -> HRESULT, - fn GetAvailableSpaceAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetAvailableSpaceAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IPackageVolume2 { - #[inline] pub unsafe fn get_is_full_trust_package_supported(&self) -> Result { + #[inline] pub fn get_is_full_trust_package_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsFullTrustPackageSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_appx_install_supported(&self) -> Result { + }} + #[inline] pub fn get_is_appx_install_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsAppxInstallSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_available_space_async(&self) -> Result>> { + }} + #[inline] pub fn get_available_space_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAvailableSpaceAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum RemovalOptions: u32 { None (RemovalOptions_None) = 0, PreserveApplicationData (RemovalOptions_PreserveApplicationData) = 4096, @@ -787,9 +787,9 @@ use ::prelude::*; RT_CLASS!{static class ClassicAppManager} impl RtActivatable for ClassicAppManager {} impl ClassicAppManager { - #[inline] pub fn find_installed_app(appUninstallKey: &HStringArg) -> Result> { unsafe { + #[inline] pub fn find_installed_app(appUninstallKey: &HStringArg) -> Result>> { >::get_activation_factory().find_installed_app(appUninstallKey) - }} + } } DEFINE_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]) [CLSID_ClassicAppManager]); DEFINE_IID!(IID_IClassicAppManagerStatics, 3808089704, 34860, 20275, 176, 53, 13, 247, 185, 13, 103, 230); @@ -797,11 +797,11 @@ RT_INTERFACE!{static interface IClassicAppManagerStatics(IClassicAppManagerStati fn FindInstalledApp(&self, appUninstallKey: HSTRING, out: *mut *mut InstalledClassicAppInfo) -> HRESULT }} impl IClassicAppManagerStatics { - #[inline] pub unsafe fn find_installed_app(&self, appUninstallKey: &HStringArg) -> Result> { + #[inline] pub fn find_installed_app(&self, appUninstallKey: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindInstalledApp)(self as *const _ as *mut _, appUninstallKey.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IInstalledClassicAppInfo, 175979939, 26064, 16518, 128, 214, 6, 16, 215, 96, 32, 125); RT_INTERFACE!{interface IInstalledClassicAppInfo(IInstalledClassicAppInfoVtbl): IInspectable(IInspectableVtbl) [IID_IInstalledClassicAppInfo] { @@ -809,16 +809,16 @@ RT_INTERFACE!{interface IInstalledClassicAppInfo(IInstalledClassicAppInfoVtbl): fn get_DisplayVersion(&self, out: *mut HSTRING) -> HRESULT }} impl IInstalledClassicAppInfo { - #[inline] pub unsafe fn get_display_name(&self) -> Result { + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_version(&self) -> Result { + }} + #[inline] pub fn get_display_version(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayVersion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class InstalledClassicAppInfo: IInstalledClassicAppInfo} } // Windows.Management.Deployment.Preview @@ -832,9 +832,9 @@ RT_INTERFACE!{interface IApplicationDataManager(IApplicationDataManagerVtbl): II RT_CLASS!{class ApplicationDataManager: IApplicationDataManager} impl RtActivatable for ApplicationDataManager {} impl ApplicationDataManager { - #[cfg(feature="windows-storage")] #[inline] pub fn create_for_package_family(packageFamilyName: &HStringArg) -> Result> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn create_for_package_family(packageFamilyName: &HStringArg) -> Result>> { >::get_activation_factory().create_for_package_family(packageFamilyName) - }} + } } DEFINE_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]) [CLSID_ApplicationDataManager]); DEFINE_IID!(IID_IApplicationDataManagerStatics, 504914659, 27022, 18849, 151, 82, 222, 233, 73, 37, 185, 179); @@ -842,11 +842,11 @@ RT_INTERFACE!{static interface IApplicationDataManagerStatics(IApplicationDataMa #[cfg(feature="windows-storage")] fn CreateForPackageFamily(&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(&self, packageFamilyName: &HStringArg) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn create_for_package_family(&self, packageFamilyName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateForPackageFamily)(self as *const _ as *mut _, packageFamilyName.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } } // Windows.Management.Core pub mod policies { // Windows.Management.Policies @@ -854,12 +854,12 @@ use ::prelude::*; RT_CLASS!{static class NamedPolicy} impl RtActivatable for NamedPolicy {} impl NamedPolicy { - #[inline] pub fn get_policy_from_path(area: &HStringArg, name: &HStringArg) -> Result> { unsafe { + #[inline] pub fn get_policy_from_path(area: &HStringArg, name: &HStringArg) -> Result>> { >::get_activation_factory().get_policy_from_path(area, name) - }} - #[cfg(feature="windows-system")] #[inline] pub fn get_policy_from_path_for_user(user: &super::super::system::User, area: &HStringArg, name: &HStringArg) -> Result> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn get_policy_from_path_for_user(user: &super::super::system::User, area: &HStringArg, name: &HStringArg) -> Result>> { >::get_activation_factory().get_policy_from_path_for_user(user, area, name) - }} + } } DEFINE_CLSID!(NamedPolicy(&[87,105,110,100,111,119,115,46,77,97,110,97,103,101,109,101,110,116,46,80,111,108,105,99,105,101,115,46,78,97,109,101,100,80,111,108,105,99,121,0]) [CLSID_NamedPolicy]); DEFINE_IID!(IID_INamedPolicyData, 953987480, 38316, 16503, 166, 67, 128, 120, 202, 226, 100, 0); @@ -877,74 +877,74 @@ RT_INTERFACE!{interface INamedPolicyData(INamedPolicyDataVtbl): IInspectable(IIn fn GetInt32(&self, out: *mut i32) -> HRESULT, fn GetInt64(&self, out: *mut i64) -> HRESULT, fn GetString(&self, out: *mut HSTRING) -> HRESULT, - fn add_Changed(&self, changedHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Changed(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_Changed(&self, changedHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Changed(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl INamedPolicyData { - #[inline] pub unsafe fn get_area(&self) -> Result { + #[inline] pub fn get_area(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Area)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_name(&self) -> Result { + }} + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_kind(&self) -> Result { + }} + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_managed(&self) -> Result { + }} + #[inline] pub fn get_is_managed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsManaged)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_user_policy(&self) -> Result { + }} + #[inline] pub fn get_is_user_policy(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsUserPolicy)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_user(&self) -> Result> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_User)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_boolean(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_boolean(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetBoolean)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_binary(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_binary(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetBinary)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_int32(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_int32(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetInt32)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_int64(&self) -> Result { + }} + #[inline] pub fn get_int64(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetInt64)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_string(&self) -> Result { + }} + #[inline] pub fn get_string(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_changed(&self, changedHandler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_changed(&self, changedHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Changed)(self as *const _ as *mut _, changedHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_changed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_changed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Changed)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class NamedPolicyData: INamedPolicyData} RT_ENUM! { enum NamedPolicyKind: i32 { @@ -956,16 +956,16 @@ RT_INTERFACE!{static interface INamedPolicyStatics(INamedPolicyStaticsVtbl): IIn #[cfg(feature="windows-system")] fn GetPolicyFromPathForUser(&self, user: *mut super::super::system::User, area: HSTRING, name: HSTRING, out: *mut *mut NamedPolicyData) -> HRESULT }} impl INamedPolicyStatics { - #[inline] pub unsafe fn get_policy_from_path(&self, area: &HStringArg, name: &HStringArg) -> Result> { + #[inline] pub fn get_policy_from_path(&self, area: &HStringArg, name: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPolicyFromPath)(self as *const _ as *mut _, area.get(), name.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_policy_from_path_for_user(&self, user: &super::super::system::User, area: &HStringArg, name: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_policy_from_path_for_user(&self, user: &super::super::system::User, area: &HStringArg, name: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPolicyFromPathForUser)(self as *const _ as *mut _, user as *const _ as *mut _, area.get(), name.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } } // Windows.Management.Policies pub mod workplace { // Windows.Management.Workplace @@ -978,46 +978,46 @@ RT_INTERFACE!{static interface IMdmAllowPolicyStatics(IMdmAllowPolicyStaticsVtbl fn IsStoreAllowed(&self, out: *mut bool) -> HRESULT }} impl IMdmAllowPolicyStatics { - #[inline] pub unsafe fn is_browser_allowed(&self) -> Result { + #[inline] pub fn is_browser_allowed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsBrowserAllowed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_camera_allowed(&self) -> Result { + }} + #[inline] pub fn is_camera_allowed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsCameraAllowed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_microsoft_account_allowed(&self) -> Result { + }} + #[inline] pub fn is_microsoft_account_allowed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsMicrosoftAccountAllowed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_store_allowed(&self) -> Result { + }} + #[inline] pub fn is_store_allowed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsStoreAllowed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{static class MdmPolicy} impl RtActivatable for MdmPolicy {} impl RtActivatable for MdmPolicy {} impl MdmPolicy { - #[inline] pub fn is_browser_allowed() -> Result { unsafe { + #[inline] pub fn is_browser_allowed() -> Result { >::get_activation_factory().is_browser_allowed() - }} - #[inline] pub fn is_camera_allowed() -> Result { unsafe { + } + #[inline] pub fn is_camera_allowed() -> Result { >::get_activation_factory().is_camera_allowed() - }} - #[inline] pub fn is_microsoft_account_allowed() -> Result { unsafe { + } + #[inline] pub fn is_microsoft_account_allowed() -> Result { >::get_activation_factory().is_microsoft_account_allowed() - }} - #[inline] pub fn is_store_allowed() -> Result { unsafe { + } + #[inline] pub fn is_store_allowed() -> Result { >::get_activation_factory().is_store_allowed() - }} - #[inline] pub fn get_messaging_sync_policy() -> Result { unsafe { + } + #[inline] pub fn get_messaging_sync_policy() -> Result { >::get_activation_factory().get_messaging_sync_policy() - }} + } } DEFINE_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]) [CLSID_MdmPolicy]); DEFINE_IID!(IID_IMdmPolicyStatics2, 3382474022, 980, 18937, 169, 147, 67, 239, 204, 210, 101, 196); @@ -1025,11 +1025,11 @@ RT_INTERFACE!{static interface IMdmPolicyStatics2(IMdmPolicyStatics2Vtbl): IInsp fn GetMessagingSyncPolicy(&self, out: *mut MessagingSyncPolicy) -> HRESULT }} impl IMdmPolicyStatics2 { - #[inline] pub unsafe fn get_messaging_sync_policy(&self) -> Result { + #[inline] pub fn get_messaging_sync_policy(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetMessagingSyncPolicy)(self as *const _ as *mut _, &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, @@ -1037,9 +1037,9 @@ RT_ENUM! { enum MessagingSyncPolicy: i32 { RT_CLASS!{static class WorkplaceSettings} impl RtActivatable for WorkplaceSettings {} impl WorkplaceSettings { - #[inline] pub fn get_is_microsoft_account_optional() -> Result { unsafe { + #[inline] pub fn get_is_microsoft_account_optional() -> Result { >::get_activation_factory().get_is_microsoft_account_optional() - }} + } } DEFINE_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]) [CLSID_WorkplaceSettings]); DEFINE_IID!(IID_IWorkplaceSettingsStatics, 3831984125, 11666, 19464, 186, 212, 246, 89, 11, 84, 166, 211); @@ -1047,10 +1047,10 @@ RT_INTERFACE!{static interface IWorkplaceSettingsStatics(IWorkplaceSettingsStati fn get_IsMicrosoftAccountOptional(&self, out: *mut bool) -> HRESULT }} impl IWorkplaceSettingsStatics { - #[inline] pub unsafe fn get_is_microsoft_account_optional(&self) -> Result { + #[inline] pub fn get_is_microsoft_account_optional(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsMicrosoftAccountOptional)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } } // Windows.Management.Workplace diff --git a/src/rt/gen/windows/media.rs b/src/rt/gen/windows/media.rs index c7bb8a6..97bbaf1 100644 --- a/src/rt/gen/windows/media.rs +++ b/src/rt/gen/windows/media.rs @@ -6,20 +6,20 @@ RT_INTERFACE!{interface IAudioBuffer(IAudioBufferVtbl): IInspectable(IInspectabl fn put_Length(&self, value: u32) -> HRESULT }} impl IAudioBuffer { - #[inline] pub unsafe fn get_capacity(&self) -> Result { + #[inline] pub fn get_capacity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Capacity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_length(&self) -> Result { + }} + #[inline] pub fn get_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Length)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_length(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_length(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Length)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AudioBuffer: IAudioBuffer} RT_ENUM! { enum AudioBufferAccessMode: i32 { @@ -30,18 +30,18 @@ RT_INTERFACE!{interface IAudioFrame(IAudioFrameVtbl): IInspectable(IInspectableV fn LockBuffer(&self, mode: AudioBufferAccessMode, out: *mut *mut AudioBuffer) -> HRESULT }} impl IAudioFrame { - #[inline] pub unsafe fn lock_buffer(&self, mode: AudioBufferAccessMode) -> Result> { + #[inline] pub fn lock_buffer(&self, mode: AudioBufferAccessMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LockBuffer)(self as *const _ as *mut _, mode, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AudioFrame: IAudioFrame} impl RtActivatable for AudioFrame {} impl AudioFrame { - #[inline] pub fn create(capacity: u32) -> Result> { unsafe { + #[inline] pub fn create(capacity: u32) -> Result> { >::get_activation_factory().create(capacity) - }} + } } DEFINE_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]) [CLSID_AudioFrame]); DEFINE_IID!(IID_IAudioFrameFactory, 2443774686, 9250, 16550, 185, 173, 48, 208, 36, 4, 49, 125); @@ -49,11 +49,11 @@ RT_INTERFACE!{static interface IAudioFrameFactory(IAudioFrameFactoryVtbl): IInsp fn Create(&self, capacity: u32, out: *mut *mut AudioFrame) -> HRESULT }} impl IAudioFrameFactory { - #[inline] pub unsafe fn create(&self, capacity: u32) -> Result> { + #[inline] pub fn create(&self, capacity: u32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, capacity, &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, @@ -63,11 +63,11 @@ RT_INTERFACE!{interface IAutoRepeatModeChangeRequestedEventArgs(IAutoRepeatModeC fn get_RequestedAutoRepeatMode(&self, out: *mut MediaPlaybackAutoRepeatMode) -> HRESULT }} impl IAutoRepeatModeChangeRequestedEventArgs { - #[inline] pub unsafe fn get_requested_auto_repeat_mode(&self) -> Result { + #[inline] pub fn get_requested_auto_repeat_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RequestedAutoRepeatMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AutoRepeatModeChangeRequestedEventArgs: IAutoRepeatModeChangeRequestedEventArgs} DEFINE_IID!(IID_IImageDisplayProperties, 3440101359, 21735, 16671, 153, 51, 240, 233, 139, 10, 150, 210); @@ -78,52 +78,52 @@ RT_INTERFACE!{interface IImageDisplayProperties(IImageDisplayPropertiesVtbl): II fn put_Subtitle(&self, value: HSTRING) -> HRESULT }} impl IImageDisplayProperties { - #[inline] pub unsafe fn get_title(&self) -> Result { + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_title(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_title(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Title)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_subtitle(&self) -> Result { + }} + #[inline] pub fn get_subtitle(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Subtitle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_subtitle(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_subtitle(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Subtitle)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ImageDisplayProperties: IImageDisplayProperties} 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(&self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SoundLevelChanged(&self, cookie: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PlayPressed(&self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PlayPressed(&self, cookie: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PausePressed(&self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PausePressed(&self, cookie: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_StopPressed(&self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StopPressed(&self, cookie: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PlayPauseTogglePressed(&self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PlayPauseTogglePressed(&self, cookie: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_RecordPressed(&self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RecordPressed(&self, cookie: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_NextTrackPressed(&self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_NextTrackPressed(&self, cookie: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PreviousTrackPressed(&self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PreviousTrackPressed(&self, cookie: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_FastForwardPressed(&self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_FastForwardPressed(&self, cookie: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_RewindPressed(&self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RewindPressed(&self, cookie: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ChannelUpPressed(&self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ChannelUpPressed(&self, cookie: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ChannelDownPressed(&self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ChannelDownPressed(&self, cookie: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_SoundLevelChanged(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SoundLevelChanged(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PlayPressed(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PlayPressed(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PausePressed(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PausePressed(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_StopPressed(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StopPressed(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PlayPauseTogglePressed(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PlayPauseTogglePressed(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_RecordPressed(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RecordPressed(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_NextTrackPressed(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_NextTrackPressed(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PreviousTrackPressed(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PreviousTrackPressed(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_FastForwardPressed(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_FastForwardPressed(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_RewindPressed(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RewindPressed(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_ChannelUpPressed(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ChannelUpPressed(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_ChannelDownPressed(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ChannelDownPressed(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, fn get_SoundLevel(&self, out: *mut SoundLevel) -> HRESULT, fn put_TrackName(&self, value: HSTRING) -> HRESULT, fn get_TrackName(&self, out: *mut HSTRING) -> HRESULT, @@ -131,338 +131,338 @@ RT_INTERFACE!{static interface IMediaControl(IMediaControlVtbl): IInspectable(II fn get_ArtistName(&self, out: *mut HSTRING) -> HRESULT, fn put_IsPlaying(&self, value: bool) -> HRESULT, fn get_IsPlaying(&self, out: *mut bool) -> HRESULT, - fn put_AlbumArt(&self, value: *mut super::foundation::Uri) -> HRESULT, - fn get_AlbumArt(&self, out: *mut *mut super::foundation::Uri) -> HRESULT + fn put_AlbumArt(&self, value: *mut foundation::Uri) -> HRESULT, + fn get_AlbumArt(&self, out: *mut *mut foundation::Uri) -> HRESULT }} impl IMediaControl { - #[inline] pub unsafe fn add_sound_level_changed(&self, handler: &super::foundation::EventHandler) -> Result { + #[inline] pub fn add_sound_level_changed(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SoundLevelChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_sound_level_changed(&self, cookie: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_sound_level_changed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SoundLevelChanged)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_play_pressed(&self, handler: &super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_play_pressed(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PlayPressed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_play_pressed(&self, cookie: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_play_pressed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PlayPressed)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pause_pressed(&self, handler: &super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_pause_pressed(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PausePressed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pause_pressed(&self, cookie: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pause_pressed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PausePressed)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_stop_pressed(&self, handler: &super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_stop_pressed(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StopPressed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_stop_pressed(&self, cookie: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_stop_pressed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StopPressed)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_play_pause_toggle_pressed(&self, handler: &super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_play_pause_toggle_pressed(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PlayPauseTogglePressed)(self as *const _ as *mut _, 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(&self, cookie: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_play_pause_toggle_pressed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PlayPauseTogglePressed)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_record_pressed(&self, handler: &super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_record_pressed(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RecordPressed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_record_pressed(&self, cookie: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_record_pressed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RecordPressed)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_next_track_pressed(&self, handler: &super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_next_track_pressed(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_NextTrackPressed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_next_track_pressed(&self, cookie: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_next_track_pressed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_NextTrackPressed)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_previous_track_pressed(&self, handler: &super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_previous_track_pressed(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PreviousTrackPressed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_previous_track_pressed(&self, cookie: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_previous_track_pressed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PreviousTrackPressed)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_fast_forward_pressed(&self, handler: &super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_fast_forward_pressed(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_FastForwardPressed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_fast_forward_pressed(&self, cookie: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_fast_forward_pressed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_FastForwardPressed)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_rewind_pressed(&self, handler: &super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_rewind_pressed(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RewindPressed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_rewind_pressed(&self, cookie: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_rewind_pressed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RewindPressed)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_channel_up_pressed(&self, handler: &super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_channel_up_pressed(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ChannelUpPressed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_channel_up_pressed(&self, cookie: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_channel_up_pressed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ChannelUpPressed)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_channel_down_pressed(&self, handler: &super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_channel_down_pressed(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ChannelDownPressed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_channel_down_pressed(&self, cookie: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_channel_down_pressed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ChannelDownPressed)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_sound_level(&self) -> Result { + }} + #[inline] pub fn get_sound_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SoundLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_track_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_track_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TrackName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_track_name(&self) -> Result { + }} + #[inline] pub fn get_track_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TrackName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_artist_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_artist_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ArtistName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_artist_name(&self) -> Result { + }} + #[inline] pub fn get_artist_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ArtistName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_playing(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_playing(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsPlaying)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_playing(&self) -> Result { + }} + #[inline] pub fn get_is_playing(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPlaying)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_album_art(&self, value: &super::foundation::Uri) -> Result<()> { + }} + #[inline] pub fn set_album_art(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AlbumArt)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_album_art(&self) -> Result> { + }} + #[inline] pub fn get_album_art(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AlbumArt)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{static class MediaControl} impl RtActivatable for MediaControl {} impl MediaControl { - #[inline] pub fn add_sound_level_changed(handler: &super::foundation::EventHandler) -> Result { unsafe { + #[inline] pub fn add_sound_level_changed(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_sound_level_changed(handler) - }} - #[inline] pub fn remove_sound_level_changed(cookie: super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_sound_level_changed(cookie: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_sound_level_changed(cookie) - }} - #[inline] pub fn add_play_pressed(handler: &super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_play_pressed(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_play_pressed(handler) - }} - #[inline] pub fn remove_play_pressed(cookie: super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_play_pressed(cookie: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_play_pressed(cookie) - }} - #[inline] pub fn add_pause_pressed(handler: &super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_pause_pressed(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_pause_pressed(handler) - }} - #[inline] pub fn remove_pause_pressed(cookie: super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_pause_pressed(cookie: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_pause_pressed(cookie) - }} - #[inline] pub fn add_stop_pressed(handler: &super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_stop_pressed(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_stop_pressed(handler) - }} - #[inline] pub fn remove_stop_pressed(cookie: super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_stop_pressed(cookie: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_stop_pressed(cookie) - }} - #[inline] pub fn add_play_pause_toggle_pressed(handler: &super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_play_pause_toggle_pressed(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_play_pause_toggle_pressed(handler) - }} - #[inline] pub fn remove_play_pause_toggle_pressed(cookie: super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_play_pause_toggle_pressed(cookie: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_play_pause_toggle_pressed(cookie) - }} - #[inline] pub fn add_record_pressed(handler: &super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_record_pressed(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_record_pressed(handler) - }} - #[inline] pub fn remove_record_pressed(cookie: super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_record_pressed(cookie: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_record_pressed(cookie) - }} - #[inline] pub fn add_next_track_pressed(handler: &super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_next_track_pressed(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_next_track_pressed(handler) - }} - #[inline] pub fn remove_next_track_pressed(cookie: super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_next_track_pressed(cookie: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_next_track_pressed(cookie) - }} - #[inline] pub fn add_previous_track_pressed(handler: &super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_previous_track_pressed(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_previous_track_pressed(handler) - }} - #[inline] pub fn remove_previous_track_pressed(cookie: super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_previous_track_pressed(cookie: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_previous_track_pressed(cookie) - }} - #[inline] pub fn add_fast_forward_pressed(handler: &super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_fast_forward_pressed(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_fast_forward_pressed(handler) - }} - #[inline] pub fn remove_fast_forward_pressed(cookie: super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_fast_forward_pressed(cookie: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_fast_forward_pressed(cookie) - }} - #[inline] pub fn add_rewind_pressed(handler: &super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_rewind_pressed(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_rewind_pressed(handler) - }} - #[inline] pub fn remove_rewind_pressed(cookie: super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_rewind_pressed(cookie: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_rewind_pressed(cookie) - }} - #[inline] pub fn add_channel_up_pressed(handler: &super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_channel_up_pressed(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_channel_up_pressed(handler) - }} - #[inline] pub fn remove_channel_up_pressed(cookie: super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_channel_up_pressed(cookie: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_channel_up_pressed(cookie) - }} - #[inline] pub fn add_channel_down_pressed(handler: &super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_channel_down_pressed(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_channel_down_pressed(handler) - }} - #[inline] pub fn remove_channel_down_pressed(cookie: super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_channel_down_pressed(cookie: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_channel_down_pressed(cookie) - }} - #[inline] pub fn get_sound_level() -> Result { unsafe { + } + #[inline] pub fn get_sound_level() -> Result { >::get_activation_factory().get_sound_level() - }} - #[inline] pub fn set_track_name(value: &HStringArg) -> Result<()> { unsafe { + } + #[inline] pub fn set_track_name(value: &HStringArg) -> Result<()> { >::get_activation_factory().set_track_name(value) - }} - #[inline] pub fn get_track_name() -> Result { unsafe { + } + #[inline] pub fn get_track_name() -> Result { >::get_activation_factory().get_track_name() - }} - #[inline] pub fn set_artist_name(value: &HStringArg) -> Result<()> { unsafe { + } + #[inline] pub fn set_artist_name(value: &HStringArg) -> Result<()> { >::get_activation_factory().set_artist_name(value) - }} - #[inline] pub fn get_artist_name() -> Result { unsafe { + } + #[inline] pub fn get_artist_name() -> Result { >::get_activation_factory().get_artist_name() - }} - #[inline] pub fn set_is_playing(value: bool) -> Result<()> { unsafe { + } + #[inline] pub fn set_is_playing(value: bool) -> Result<()> { >::get_activation_factory().set_is_playing(value) - }} - #[inline] pub fn get_is_playing() -> Result { unsafe { + } + #[inline] pub fn get_is_playing() -> Result { >::get_activation_factory().get_is_playing() - }} - #[inline] pub fn set_album_art(value: &super::foundation::Uri) -> Result<()> { unsafe { + } + #[inline] pub fn set_album_art(value: &foundation::Uri) -> Result<()> { >::get_activation_factory().set_album_art(value) - }} - #[inline] pub fn get_album_art() -> Result> { unsafe { + } + #[inline] pub fn get_album_art() -> Result>> { >::get_activation_factory().get_album_art() - }} + } } DEFINE_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]) [CLSID_MediaControl]); 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(&self, configuration: *mut super::foundation::collections::IPropertySet) -> HRESULT + fn SetProperties(&self, configuration: *mut foundation::collections::IPropertySet) -> HRESULT }} impl IMediaExtension { - #[inline] pub unsafe fn set_properties(&self, configuration: &super::foundation::collections::IPropertySet) -> Result<()> { + #[inline] pub fn set_properties(&self, configuration: &foundation::collections::IPropertySet) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetProperties)(self as *const _ as *mut _, 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(&self, activatableClassId: HSTRING, scheme: HSTRING) -> HRESULT, - fn RegisterSchemeHandlerWithSettings(&self, activatableClassId: HSTRING, scheme: HSTRING, configuration: *mut super::foundation::collections::IPropertySet) -> HRESULT, + fn RegisterSchemeHandlerWithSettings(&self, activatableClassId: HSTRING, scheme: HSTRING, configuration: *mut foundation::collections::IPropertySet) -> HRESULT, fn RegisterByteStreamHandler(&self, activatableClassId: HSTRING, fileExtension: HSTRING, mimeType: HSTRING) -> HRESULT, - fn RegisterByteStreamHandlerWithSettings(&self, activatableClassId: HSTRING, fileExtension: HSTRING, mimeType: HSTRING, configuration: *mut super::foundation::collections::IPropertySet) -> HRESULT, + fn RegisterByteStreamHandlerWithSettings(&self, activatableClassId: HSTRING, fileExtension: HSTRING, mimeType: HSTRING, configuration: *mut foundation::collections::IPropertySet) -> HRESULT, fn RegisterAudioDecoder(&self, activatableClassId: HSTRING, inputSubtype: Guid, outputSubtype: Guid) -> HRESULT, - fn RegisterAudioDecoderWithSettings(&self, activatableClassId: HSTRING, inputSubtype: Guid, outputSubtype: Guid, configuration: *mut super::foundation::collections::IPropertySet) -> HRESULT, + fn RegisterAudioDecoderWithSettings(&self, activatableClassId: HSTRING, inputSubtype: Guid, outputSubtype: Guid, configuration: *mut foundation::collections::IPropertySet) -> HRESULT, fn RegisterAudioEncoder(&self, activatableClassId: HSTRING, inputSubtype: Guid, outputSubtype: Guid) -> HRESULT, - fn RegisterAudioEncoderWithSettings(&self, activatableClassId: HSTRING, inputSubtype: Guid, outputSubtype: Guid, configuration: *mut super::foundation::collections::IPropertySet) -> HRESULT, + fn RegisterAudioEncoderWithSettings(&self, activatableClassId: HSTRING, inputSubtype: Guid, outputSubtype: Guid, configuration: *mut foundation::collections::IPropertySet) -> HRESULT, fn RegisterVideoDecoder(&self, activatableClassId: HSTRING, inputSubtype: Guid, outputSubtype: Guid) -> HRESULT, - fn RegisterVideoDecoderWithSettings(&self, activatableClassId: HSTRING, inputSubtype: Guid, outputSubtype: Guid, configuration: *mut super::foundation::collections::IPropertySet) -> HRESULT, + fn RegisterVideoDecoderWithSettings(&self, activatableClassId: HSTRING, inputSubtype: Guid, outputSubtype: Guid, configuration: *mut foundation::collections::IPropertySet) -> HRESULT, fn RegisterVideoEncoder(&self, activatableClassId: HSTRING, inputSubtype: Guid, outputSubtype: Guid) -> HRESULT, - fn RegisterVideoEncoderWithSettings(&self, activatableClassId: HSTRING, inputSubtype: Guid, outputSubtype: Guid, configuration: *mut super::foundation::collections::IPropertySet) -> HRESULT + fn RegisterVideoEncoderWithSettings(&self, activatableClassId: HSTRING, inputSubtype: Guid, outputSubtype: Guid, configuration: *mut foundation::collections::IPropertySet) -> HRESULT }} impl IMediaExtensionManager { - #[inline] pub unsafe fn register_scheme_handler(&self, activatableClassId: &HStringArg, scheme: &HStringArg) -> Result<()> { + #[inline] pub fn register_scheme_handler(&self, activatableClassId: &HStringArg, scheme: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RegisterSchemeHandler)(self as *const _ as *mut _, activatableClassId.get(), scheme.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn register_scheme_handler_with_settings(&self, activatableClassId: &HStringArg, scheme: &HStringArg, configuration: &super::foundation::collections::IPropertySet) -> Result<()> { + }} + #[inline] pub fn register_scheme_handler_with_settings(&self, activatableClassId: &HStringArg, scheme: &HStringArg, configuration: &foundation::collections::IPropertySet) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RegisterSchemeHandlerWithSettings)(self as *const _ as *mut _, 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(&self, activatableClassId: &HStringArg, fileExtension: &HStringArg, mimeType: &HStringArg) -> Result<()> { + }} + #[inline] pub fn register_byte_stream_handler(&self, activatableClassId: &HStringArg, fileExtension: &HStringArg, mimeType: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RegisterByteStreamHandler)(self as *const _ as *mut _, activatableClassId.get(), fileExtension.get(), mimeType.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn register_byte_stream_handler_with_settings(&self, activatableClassId: &HStringArg, fileExtension: &HStringArg, mimeType: &HStringArg, configuration: &super::foundation::collections::IPropertySet) -> Result<()> { + }} + #[inline] pub fn register_byte_stream_handler_with_settings(&self, activatableClassId: &HStringArg, fileExtension: &HStringArg, mimeType: &HStringArg, configuration: &foundation::collections::IPropertySet) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RegisterByteStreamHandlerWithSettings)(self as *const _ as *mut _, 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(&self, activatableClassId: &HStringArg, inputSubtype: Guid, outputSubtype: Guid) -> Result<()> { + }} + #[inline] pub fn register_audio_decoder(&self, activatableClassId: &HStringArg, inputSubtype: Guid, outputSubtype: Guid) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RegisterAudioDecoder)(self as *const _ as *mut _, activatableClassId.get(), inputSubtype, outputSubtype); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn register_audio_decoder_with_settings(&self, activatableClassId: &HStringArg, inputSubtype: Guid, outputSubtype: Guid, configuration: &super::foundation::collections::IPropertySet) -> Result<()> { + }} + #[inline] pub fn register_audio_decoder_with_settings(&self, activatableClassId: &HStringArg, inputSubtype: Guid, outputSubtype: Guid, configuration: &foundation::collections::IPropertySet) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RegisterAudioDecoderWithSettings)(self as *const _ as *mut _, activatableClassId.get(), inputSubtype, outputSubtype, configuration as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn register_audio_encoder(&self, activatableClassId: &HStringArg, inputSubtype: Guid, outputSubtype: Guid) -> Result<()> { + }} + #[inline] pub fn register_audio_encoder(&self, activatableClassId: &HStringArg, inputSubtype: Guid, outputSubtype: Guid) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RegisterAudioEncoder)(self as *const _ as *mut _, activatableClassId.get(), inputSubtype, outputSubtype); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn register_audio_encoder_with_settings(&self, activatableClassId: &HStringArg, inputSubtype: Guid, outputSubtype: Guid, configuration: &super::foundation::collections::IPropertySet) -> Result<()> { + }} + #[inline] pub fn register_audio_encoder_with_settings(&self, activatableClassId: &HStringArg, inputSubtype: Guid, outputSubtype: Guid, configuration: &foundation::collections::IPropertySet) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RegisterAudioEncoderWithSettings)(self as *const _ as *mut _, activatableClassId.get(), inputSubtype, outputSubtype, configuration as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn register_video_decoder(&self, activatableClassId: &HStringArg, inputSubtype: Guid, outputSubtype: Guid) -> Result<()> { + }} + #[inline] pub fn register_video_decoder(&self, activatableClassId: &HStringArg, inputSubtype: Guid, outputSubtype: Guid) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RegisterVideoDecoder)(self as *const _ as *mut _, activatableClassId.get(), inputSubtype, outputSubtype); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn register_video_decoder_with_settings(&self, activatableClassId: &HStringArg, inputSubtype: Guid, outputSubtype: Guid, configuration: &super::foundation::collections::IPropertySet) -> Result<()> { + }} + #[inline] pub fn register_video_decoder_with_settings(&self, activatableClassId: &HStringArg, inputSubtype: Guid, outputSubtype: Guid, configuration: &foundation::collections::IPropertySet) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RegisterVideoDecoderWithSettings)(self as *const _ as *mut _, activatableClassId.get(), inputSubtype, outputSubtype, configuration as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn register_video_encoder(&self, activatableClassId: &HStringArg, inputSubtype: Guid, outputSubtype: Guid) -> Result<()> { + }} + #[inline] pub fn register_video_encoder(&self, activatableClassId: &HStringArg, inputSubtype: Guid, outputSubtype: Guid) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RegisterVideoEncoder)(self as *const _ as *mut _, activatableClassId.get(), inputSubtype, outputSubtype); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn register_video_encoder_with_settings(&self, activatableClassId: &HStringArg, inputSubtype: Guid, outputSubtype: Guid, configuration: &super::foundation::collections::IPropertySet) -> Result<()> { + }} + #[inline] pub fn register_video_encoder_with_settings(&self, activatableClassId: &HStringArg, inputSubtype: Guid, outputSubtype: Guid, configuration: &foundation::collections::IPropertySet) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RegisterVideoEncoderWithSettings)(self as *const _ as *mut _, activatableClassId.get(), inputSubtype, outputSubtype, configuration as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MediaExtensionManager: IMediaExtensionManager} impl RtActivatable for MediaExtensionManager {} @@ -472,118 +472,118 @@ RT_INTERFACE!{interface IMediaExtensionManager2(IMediaExtensionManager2Vtbl): II #[cfg(feature="windows-applicationmodel")] fn RegisterMediaExtensionForAppService(&self, extension: *mut IMediaExtension, connection: *mut super::applicationmodel::appservice::AppServiceConnection) -> HRESULT }} impl IMediaExtensionManager2 { - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn register_media_extension_for_app_service(&self, extension: &IMediaExtension, connection: &super::applicationmodel::appservice::AppServiceConnection) -> Result<()> { + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn register_media_extension_for_app_service(&self, extension: &IMediaExtension, connection: &super::applicationmodel::appservice::AppServiceConnection) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RegisterMediaExtensionForAppService)(self as *const _ as *mut _, extension as *const _ as *mut _, connection as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut HSTRING) -> HRESULT, fn get_IsReadOnly(&self, out: *mut bool) -> HRESULT, - fn put_RelativeTime(&self, value: *mut super::foundation::IReference) -> HRESULT, - fn get_RelativeTime(&self, out: *mut *mut super::foundation::IReference) -> HRESULT, - fn put_SystemRelativeTime(&self, value: *mut super::foundation::IReference) -> HRESULT, - fn get_SystemRelativeTime(&self, out: *mut *mut super::foundation::IReference) -> HRESULT, - fn put_Duration(&self, value: *mut super::foundation::IReference) -> HRESULT, - fn get_Duration(&self, out: *mut *mut super::foundation::IReference) -> HRESULT, + fn put_RelativeTime(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_RelativeTime(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_SystemRelativeTime(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_SystemRelativeTime(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_Duration(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_Duration(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn put_IsDiscontinuous(&self, value: bool) -> HRESULT, fn get_IsDiscontinuous(&self, out: *mut bool) -> HRESULT, - fn get_ExtendedProperties(&self, out: *mut *mut super::foundation::collections::IPropertySet) -> HRESULT + fn get_ExtendedProperties(&self, out: *mut *mut foundation::collections::IPropertySet) -> HRESULT }} impl IMediaFrame { - #[inline] pub unsafe fn get_type(&self) -> Result { + #[inline] pub fn get_type(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Type)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_read_only(&self) -> Result { + }} + #[inline] pub fn get_is_read_only(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsReadOnly)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_relative_time(&self, value: &super::foundation::IReference) -> Result<()> { + }} + #[inline] pub fn set_relative_time(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RelativeTime)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_relative_time(&self) -> Result>> { + }} + #[inline] pub fn get_relative_time(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RelativeTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_system_relative_time(&self, value: &super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_system_relative_time(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SystemRelativeTime)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_system_relative_time(&self) -> Result>> { + }} + #[inline] pub fn get_system_relative_time(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SystemRelativeTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_duration(&self, value: &super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_duration(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Duration)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_duration(&self) -> Result>> { + }} + #[inline] pub fn get_duration(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Duration)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_discontinuous(&self, value: bool) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_is_discontinuous(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsDiscontinuous)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_discontinuous(&self) -> Result { + }} + #[inline] pub fn get_is_discontinuous(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDiscontinuous)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_properties(&self) -> Result> { + }} + #[inline] pub fn get_extended_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExtendedProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut super::foundation::TimeSpan) -> HRESULT, + fn get_Time(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn get_MediaMarkerType(&self, out: *mut HSTRING) -> HRESULT, fn get_Text(&self, out: *mut HSTRING) -> HRESULT }} impl IMediaMarker { - #[inline] pub unsafe fn get_time(&self) -> Result { + #[inline] pub fn get_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Time)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_media_marker_type(&self) -> Result { + }} + #[inline] pub fn get_media_marker_type(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MediaMarkerType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_text(&self) -> Result { + }} + #[inline] pub fn get_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Text)(self as *const _ as *mut _, &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(&self, out: *mut *mut super::foundation::collections::IVectorView) -> HRESULT + fn get_Markers(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IMediaMarkers { - #[inline] pub unsafe fn get_markers(&self) -> Result>> { + #[inline] pub fn get_markers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Markers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{static class MediaMarkerTypes} impl RtActivatable for MediaMarkerTypes {} impl MediaMarkerTypes { - #[inline] pub fn get_bookmark() -> Result { unsafe { + #[inline] pub fn get_bookmark() -> Result { >::get_activation_factory().get_bookmark() - }} + } } DEFINE_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]) [CLSID_MediaMarkerTypes]); DEFINE_IID!(IID_IMediaMarkerTypesStatics, 3139010624, 18479, 18243, 136, 50, 69, 133, 56, 33, 236, 224); @@ -591,11 +591,11 @@ RT_INTERFACE!{static interface IMediaMarkerTypesStatics(IMediaMarkerTypesStatics fn get_Bookmark(&self, out: *mut HSTRING) -> HRESULT }} impl IMediaMarkerTypesStatics { - #[inline] pub unsafe fn get_bookmark(&self) -> Result { + #[inline] pub fn get_bookmark(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Bookmark)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum MediaPlaybackAutoRepeatMode: i32 { None (MediaPlaybackAutoRepeatMode_None) = 0, Track (MediaPlaybackAutoRepeatMode_Track) = 1, List (MediaPlaybackAutoRepeatMode_List) = 2, @@ -608,14 +608,14 @@ RT_ENUM! { enum MediaPlaybackType: i32 { }} 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(&self, out: *mut *mut super::foundation::collections::ValueSet) -> HRESULT + fn get_Arguments(&self, out: *mut *mut foundation::collections::ValueSet) -> HRESULT }} impl IMediaProcessingTriggerDetails { - #[inline] pub unsafe fn get_arguments(&self) -> Result> { + #[inline] pub fn get_arguments(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Arguments)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaProcessingTriggerDetails: IMediaProcessingTriggerDetails} DEFINE_IID!(IID_IMediaTimelineController, 2396217843, 2936, 17248, 191, 113, 12, 132, 25, 153, 234, 27); @@ -623,140 +623,140 @@ RT_INTERFACE!{interface IMediaTimelineController(IMediaTimelineControllerVtbl): fn Start(&self) -> HRESULT, fn Resume(&self) -> HRESULT, fn Pause(&self) -> HRESULT, - fn get_Position(&self, out: *mut super::foundation::TimeSpan) -> HRESULT, - fn put_Position(&self, value: super::foundation::TimeSpan) -> HRESULT, + fn get_Position(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_Position(&self, value: foundation::TimeSpan) -> HRESULT, fn get_ClockRate(&self, out: *mut f64) -> HRESULT, fn put_ClockRate(&self, value: f64) -> HRESULT, fn get_State(&self, out: *mut MediaTimelineControllerState) -> HRESULT, - fn add_PositionChanged(&self, positionChangedEventHandler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PositionChanged(&self, eventCookie: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_StateChanged(&self, stateChangedEventHandler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StateChanged(&self, eventCookie: super::foundation::EventRegistrationToken) -> HRESULT + fn add_PositionChanged(&self, positionChangedEventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PositionChanged(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_StateChanged(&self, stateChangedEventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StateChanged(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT }} impl IMediaTimelineController { - #[inline] pub unsafe fn start(&self) -> Result<()> { + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn resume(&self) -> Result<()> { + }} + #[inline] pub fn resume(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Resume)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn pause(&self) -> Result<()> { + }} + #[inline] pub fn pause(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Pause)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_position(&self) -> Result { + }} + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_position(&self, value: super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_position(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Position)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_clock_rate(&self) -> Result { + }} + #[inline] pub fn get_clock_rate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ClockRate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_clock_rate(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_clock_rate(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ClockRate)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_state(&self) -> Result { + }} + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_position_changed(&self, positionChangedEventHandler: &super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_position_changed(&self, positionChangedEventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PositionChanged)(self as *const _ as *mut _, positionChangedEventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_position_changed(&self, eventCookie: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_position_changed(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PositionChanged)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_state_changed(&self, stateChangedEventHandler: &super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_state_changed(&self, stateChangedEventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StateChanged)(self as *const _ as *mut _, stateChangedEventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_state_changed(&self, eventCookie: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_state_changed(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StateChanged)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MediaTimelineController: IMediaTimelineController} impl RtActivatable for MediaTimelineController {} DEFINE_CLSID!(MediaTimelineController(&[87,105,110,100,111,119,115,46,77,101,100,105,97,46,77,101,100,105,97,84,105,109,101,108,105,110,101,67,111,110,116,114,111,108,108,101,114,0]) [CLSID_MediaTimelineController]); DEFINE_IID!(IID_IMediaTimelineController2, 4017416760, 40562, 19961, 131, 85, 110, 144, 200, 27, 186, 221); RT_INTERFACE!{interface IMediaTimelineController2(IMediaTimelineController2Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaTimelineController2] { - fn get_Duration(&self, out: *mut *mut super::foundation::IReference) -> HRESULT, - fn put_Duration(&self, value: *mut super::foundation::IReference) -> HRESULT, + fn get_Duration(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_Duration(&self, value: *mut foundation::IReference) -> HRESULT, fn get_IsLoopingEnabled(&self, out: *mut bool) -> HRESULT, fn put_IsLoopingEnabled(&self, value: bool) -> HRESULT, - fn add_Failed(&self, eventHandler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Failed(&self, token: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Ended(&self, eventHandler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Ended(&self, token: super::foundation::EventRegistrationToken) -> HRESULT + fn add_Failed(&self, eventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Failed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Ended(&self, eventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Ended(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IMediaTimelineController2 { - #[inline] pub unsafe fn get_duration(&self) -> Result>> { + #[inline] pub fn get_duration(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Duration)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_duration(&self, value: &super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_duration(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Duration)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_looping_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_looping_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsLoopingEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_looping_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_looping_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsLoopingEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_failed(&self, eventHandler: &super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_failed(&self, eventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Failed)(self as *const _ as *mut _, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_failed(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_failed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Failed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_ended(&self, eventHandler: &super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_ended(&self, eventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Ended)(self as *const _ as *mut _, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_ended(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_ended(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Ended)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMediaTimelineControllerFailedEventArgs, 2283927581, 15991, 17403, 190, 38, 79, 200, 122, 4, 72, 52); RT_INTERFACE!{interface IMediaTimelineControllerFailedEventArgs(IMediaTimelineControllerFailedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaTimelineControllerFailedEventArgs] { - fn get_ExtendedError(&self, out: *mut super::foundation::HResult) -> HRESULT + fn get_ExtendedError(&self, out: *mut foundation::HResult) -> HRESULT }} impl IMediaTimelineControllerFailedEventArgs { - #[inline] pub unsafe fn get_extended_error(&self) -> Result { + #[inline] pub fn get_extended_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MediaTimelineControllerFailedEventArgs: IMediaTimelineControllerFailedEventArgs} RT_ENUM! { enum MediaTimelineControllerState: i32 { Paused (MediaTimelineControllerState_Paused) = 0, Running (MediaTimelineControllerState_Running) = 1, Stalled (MediaTimelineControllerState_Stalled) = 2, Error (MediaTimelineControllerState_Error) = 3, }} RT_STRUCT! { struct MediaTimeRange { - Start: super::foundation::TimeSpan, End: super::foundation::TimeSpan, + Start: foundation::TimeSpan, End: foundation::TimeSpan, }} DEFINE_IID!(IID_IMusicDisplayProperties, 1807682649, 53408, 19750, 146, 160, 249, 120, 225, 209, 142, 123); RT_INTERFACE!{interface IMusicDisplayProperties(IMusicDisplayPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IMusicDisplayProperties] { @@ -768,33 +768,33 @@ RT_INTERFACE!{interface IMusicDisplayProperties(IMusicDisplayPropertiesVtbl): II fn put_Artist(&self, value: HSTRING) -> HRESULT }} impl IMusicDisplayProperties { - #[inline] pub unsafe fn get_title(&self) -> Result { + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_title(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_title(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Title)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_album_artist(&self) -> Result { + }} + #[inline] pub fn get_album_artist(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AlbumArtist)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_album_artist(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_album_artist(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AlbumArtist)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_artist(&self) -> Result { + }} + #[inline] pub fn get_artist(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Artist)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_artist(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_artist(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Artist)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MusicDisplayProperties: IMusicDisplayProperties} DEFINE_IID!(IID_IMusicDisplayProperties2, 3572834, 38867, 17593, 176, 15, 0, 138, 252, 239, 175, 24); @@ -803,32 +803,32 @@ RT_INTERFACE!{interface IMusicDisplayProperties2(IMusicDisplayProperties2Vtbl): fn put_AlbumTitle(&self, value: HSTRING) -> HRESULT, fn get_TrackNumber(&self, out: *mut u32) -> HRESULT, fn put_TrackNumber(&self, value: u32) -> HRESULT, - fn get_Genres(&self, out: *mut *mut super::foundation::collections::IVector) -> HRESULT + fn get_Genres(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IMusicDisplayProperties2 { - #[inline] pub unsafe fn get_album_title(&self) -> Result { + #[inline] pub fn get_album_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AlbumTitle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_album_title(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_album_title(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AlbumTitle)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_track_number(&self) -> Result { + }} + #[inline] pub fn get_track_number(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TrackNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_track_number(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_track_number(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TrackNumber)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_genres(&self) -> Result>> { + }} + #[inline] pub fn get_genres(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Genres)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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] { @@ -836,26 +836,26 @@ RT_INTERFACE!{interface IMusicDisplayProperties3(IMusicDisplayProperties3Vtbl): fn put_AlbumTrackCount(&self, value: u32) -> HRESULT }} impl IMusicDisplayProperties3 { - #[inline] pub unsafe fn get_album_track_count(&self) -> Result { + #[inline] pub fn get_album_track_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AlbumTrackCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_album_track_count(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_album_track_count(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AlbumTrackCount)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut super::foundation::TimeSpan) -> HRESULT + fn get_RequestedPlaybackPosition(&self, out: *mut foundation::TimeSpan) -> HRESULT }} impl IPlaybackPositionChangeRequestedEventArgs { - #[inline] pub unsafe fn get_requested_playback_position(&self) -> Result { + #[inline] pub fn get_requested_playback_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RequestedPlaybackPosition)(self as *const _ as *mut _, &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); @@ -863,11 +863,11 @@ RT_INTERFACE!{interface IPlaybackRateChangeRequestedEventArgs(IPlaybackRateChang fn get_RequestedPlaybackRate(&self, out: *mut f64) -> HRESULT }} impl IPlaybackRateChangeRequestedEventArgs { - #[inline] pub unsafe fn get_requested_playback_rate(&self) -> Result { + #[inline] pub fn get_requested_playback_rate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RequestedPlaybackRate)(self as *const _ as *mut _, &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); @@ -875,11 +875,11 @@ RT_INTERFACE!{interface IShuffleEnabledChangeRequestedEventArgs(IShuffleEnabledC fn get_RequestedShuffleEnabled(&self, out: *mut bool) -> HRESULT }} impl IShuffleEnabledChangeRequestedEventArgs { - #[inline] pub unsafe fn get_requested_shuffle_enabled(&self) -> Result { + #[inline] pub fn get_requested_shuffle_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RequestedShuffleEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ShuffleEnabledChangeRequestedEventArgs: IShuffleEnabledChangeRequestedEventArgs} RT_ENUM! { enum SoundLevel: i32 { @@ -913,155 +913,155 @@ RT_INTERFACE!{interface ISystemMediaTransportControls(ISystemMediaTransportContr fn put_IsChannelUpEnabled(&self, value: bool) -> HRESULT, fn get_IsChannelDownEnabled(&self, out: *mut bool) -> HRESULT, fn put_IsChannelDownEnabled(&self, value: bool) -> HRESULT, - fn add_ButtonPressed(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ButtonPressed(&self, token: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PropertyChanged(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PropertyChanged(&self, token: super::foundation::EventRegistrationToken) -> HRESULT + fn add_ButtonPressed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ButtonPressed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PropertyChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PropertyChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl ISystemMediaTransportControls { - #[inline] pub unsafe fn get_playback_status(&self) -> Result { + #[inline] pub fn get_playback_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PlaybackStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_playback_status(&self, value: MediaPlaybackStatus) -> Result<()> { + }} + #[inline] pub fn set_playback_status(&self, value: MediaPlaybackStatus) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PlaybackStatus)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_updater(&self) -> Result> { + }} + #[inline] pub fn get_display_updater(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayUpdater)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sound_level(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_sound_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SoundLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_play_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_play_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPlayEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_play_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_play_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsPlayEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_stop_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_stop_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsStopEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_stop_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_stop_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsStopEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_pause_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_pause_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPauseEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_pause_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_pause_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsPauseEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_record_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_record_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsRecordEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_record_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_record_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsRecordEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_fast_forward_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_fast_forward_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsFastForwardEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_fast_forward_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_fast_forward_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsFastForwardEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_rewind_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_rewind_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsRewindEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_rewind_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_rewind_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsRewindEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_previous_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_previous_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPreviousEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_previous_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_previous_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsPreviousEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_next_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_next_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsNextEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_next_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_next_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsNextEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_channel_up_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_channel_up_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsChannelUpEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_channel_up_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_channel_up_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsChannelUpEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_channel_down_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_channel_down_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsChannelDownEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_channel_down_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_channel_down_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsChannelDownEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_button_pressed(&self, handler: &super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_button_pressed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ButtonPressed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_button_pressed(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_button_pressed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ButtonPressed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_property_changed(&self, handler: &super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_property_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PropertyChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_property_changed(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_property_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PropertyChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SystemMediaTransportControls: ISystemMediaTransportControls} impl RtActivatable for SystemMediaTransportControls {} impl SystemMediaTransportControls { - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} + } } DEFINE_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]) [CLSID_SystemMediaTransportControls]); DEFINE_IID!(IID_ISystemMediaTransportControls2, 3935884022, 32572, 19186, 165, 134, 114, 136, 152, 8, 239, 177); @@ -1073,83 +1073,83 @@ RT_INTERFACE!{interface ISystemMediaTransportControls2(ISystemMediaTransportCont fn get_PlaybackRate(&self, out: *mut f64) -> HRESULT, fn put_PlaybackRate(&self, value: f64) -> HRESULT, fn UpdateTimelineProperties(&self, timelineProperties: *mut SystemMediaTransportControlsTimelineProperties) -> HRESULT, - fn add_PlaybackPositionChangeRequested(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PlaybackPositionChangeRequested(&self, token: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PlaybackRateChangeRequested(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PlaybackRateChangeRequested(&self, token: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ShuffleEnabledChangeRequested(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ShuffleEnabledChangeRequested(&self, token: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_AutoRepeatModeChangeRequested(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AutoRepeatModeChangeRequested(&self, token: super::foundation::EventRegistrationToken) -> HRESULT + fn add_PlaybackPositionChangeRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PlaybackPositionChangeRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PlaybackRateChangeRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PlaybackRateChangeRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ShuffleEnabledChangeRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ShuffleEnabledChangeRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_AutoRepeatModeChangeRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AutoRepeatModeChangeRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl ISystemMediaTransportControls2 { - #[inline] pub unsafe fn get_auto_repeat_mode(&self) -> Result { + #[inline] pub fn get_auto_repeat_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AutoRepeatMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_auto_repeat_mode(&self, value: MediaPlaybackAutoRepeatMode) -> Result<()> { + }} + #[inline] pub fn set_auto_repeat_mode(&self, value: MediaPlaybackAutoRepeatMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AutoRepeatMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_shuffle_enabled(&self) -> Result { + }} + #[inline] pub fn get_shuffle_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ShuffleEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_shuffle_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_shuffle_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ShuffleEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_playback_rate(&self) -> Result { + }} + #[inline] pub fn get_playback_rate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PlaybackRate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_playback_rate(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_playback_rate(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PlaybackRate)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn update_timeline_properties(&self, timelineProperties: &SystemMediaTransportControlsTimelineProperties) -> Result<()> { + }} + #[inline] pub fn update_timeline_properties(&self, timelineProperties: &SystemMediaTransportControlsTimelineProperties) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).UpdateTimelineProperties)(self as *const _ as *mut _, timelineProperties as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_playback_position_change_requested(&self, handler: &super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_playback_position_change_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PlaybackPositionChangeRequested)(self as *const _ as *mut _, 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(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_playback_position_change_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PlaybackPositionChangeRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_playback_rate_change_requested(&self, handler: &super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_playback_rate_change_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PlaybackRateChangeRequested)(self as *const _ as *mut _, 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(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_playback_rate_change_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PlaybackRateChangeRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_shuffle_enabled_change_requested(&self, handler: &super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_shuffle_enabled_change_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ShuffleEnabledChangeRequested)(self as *const _ as *mut _, 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(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_shuffle_enabled_change_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ShuffleEnabledChangeRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_auto_repeat_mode_change_requested(&self, handler: &super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_auto_repeat_mode_change_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AutoRepeatModeChangeRequested)(self as *const _ as *mut _, 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(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_auto_repeat_mode_change_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AutoRepeatModeChangeRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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, @@ -1159,11 +1159,11 @@ RT_INTERFACE!{interface ISystemMediaTransportControlsButtonPressedEventArgs(ISys fn get_Button(&self, out: *mut SystemMediaTransportControlsButton) -> HRESULT }} impl ISystemMediaTransportControlsButtonPressedEventArgs { - #[inline] pub unsafe fn get_button(&self) -> Result { + #[inline] pub fn get_button(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Button)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SystemMediaTransportControlsButtonPressedEventArgs: ISystemMediaTransportControlsButtonPressedEventArgs} DEFINE_IID!(IID_ISystemMediaTransportControlsDisplayUpdater, 2327561534, 64085, 20175, 173, 142, 201, 132, 229, 221, 21, 80); @@ -1180,66 +1180,66 @@ RT_INTERFACE!{interface ISystemMediaTransportControlsDisplayUpdater(ISystemMedia fn get_VideoProperties(&self, out: *mut *mut VideoDisplayProperties) -> HRESULT, fn get_ImageProperties(&self, out: *mut *mut ImageDisplayProperties) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy9(&self) -> (), - #[cfg(feature="windows-storage")] fn CopyFromFileAsync(&self, type_: MediaPlaybackType, source: *mut super::storage::StorageFile, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn CopyFromFileAsync(&self, type_: MediaPlaybackType, source: *mut super::storage::StorageFile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn ClearAll(&self) -> HRESULT, fn Update(&self) -> HRESULT }} impl ISystemMediaTransportControlsDisplayUpdater { - #[inline] pub unsafe fn get_type(&self) -> Result { + #[inline] pub fn get_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Type)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_type(&self, value: MediaPlaybackType) -> Result<()> { + }} + #[inline] pub fn set_type(&self, value: MediaPlaybackType) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Type)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_media_id(&self) -> Result { + }} + #[inline] pub fn get_app_media_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppMediaId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_app_media_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_app_media_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AppMediaId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_thumbnail(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_thumbnail(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Thumbnail)(self 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_thumbnail(&self, value: &super::storage::streams::RandomAccessStreamReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_thumbnail(&self, value: &super::storage::streams::RandomAccessStreamReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Thumbnail)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_music_properties(&self) -> Result> { + }} + #[inline] pub fn get_music_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MusicProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_properties(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_video_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_image_properties(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_image_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ImageProperties)(self 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 copy_from_file_async(&self, type_: MediaPlaybackType, source: &super::storage::StorageFile) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn copy_from_file_async(&self, type_: MediaPlaybackType, source: &super::storage::StorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CopyFromFileAsync)(self as *const _ as *mut _, 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(&self) -> Result<()> { + }} + #[inline] pub fn clear_all(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ClearAll)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn update(&self) -> Result<()> { + }} + #[inline] pub fn update(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Update)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SystemMediaTransportControlsDisplayUpdater: ISystemMediaTransportControlsDisplayUpdater} RT_ENUM! { enum SystemMediaTransportControlsProperty: i32 { @@ -1250,11 +1250,11 @@ RT_INTERFACE!{interface ISystemMediaTransportControlsPropertyChangedEventArgs(IS fn get_Property(&self, out: *mut SystemMediaTransportControlsProperty) -> HRESULT }} impl ISystemMediaTransportControlsPropertyChangedEventArgs { - #[inline] pub unsafe fn get_property(&self) -> Result { + #[inline] pub fn get_property(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Property)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SystemMediaTransportControlsPropertyChangedEventArgs: ISystemMediaTransportControlsPropertyChangedEventArgs} DEFINE_IID!(IID_ISystemMediaTransportControlsStatics, 1136277514, 60580, 18482, 145, 171, 212, 21, 250, 228, 132, 198); @@ -1262,71 +1262,71 @@ RT_INTERFACE!{static interface ISystemMediaTransportControlsStatics(ISystemMedia fn GetForCurrentView(&self, out: *mut *mut SystemMediaTransportControls) -> HRESULT }} impl ISystemMediaTransportControlsStatics { - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut super::foundation::TimeSpan) -> HRESULT, - fn put_StartTime(&self, value: super::foundation::TimeSpan) -> HRESULT, - fn get_EndTime(&self, out: *mut super::foundation::TimeSpan) -> HRESULT, - fn put_EndTime(&self, value: super::foundation::TimeSpan) -> HRESULT, - fn get_MinSeekTime(&self, out: *mut super::foundation::TimeSpan) -> HRESULT, - fn put_MinSeekTime(&self, value: super::foundation::TimeSpan) -> HRESULT, - fn get_MaxSeekTime(&self, out: *mut super::foundation::TimeSpan) -> HRESULT, - fn put_MaxSeekTime(&self, value: super::foundation::TimeSpan) -> HRESULT, - fn get_Position(&self, out: *mut super::foundation::TimeSpan) -> HRESULT, - fn put_Position(&self, value: super::foundation::TimeSpan) -> HRESULT + fn get_StartTime(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_StartTime(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_EndTime(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_EndTime(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_MinSeekTime(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_MinSeekTime(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_MaxSeekTime(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_MaxSeekTime(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_Position(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_Position(&self, value: foundation::TimeSpan) -> HRESULT }} impl ISystemMediaTransportControlsTimelineProperties { - #[inline] pub unsafe fn get_start_time(&self) -> Result { + #[inline] pub fn get_start_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StartTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_start_time(&self, value: super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_start_time(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StartTime)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_end_time(&self) -> Result { + }} + #[inline] pub fn get_end_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EndTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_end_time(&self, value: super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_end_time(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_EndTime)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_seek_time(&self) -> Result { + }} + #[inline] pub fn get_min_seek_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinSeekTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_min_seek_time(&self, value: super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_min_seek_time(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MinSeekTime)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_seek_time(&self) -> Result { + }} + #[inline] pub fn get_max_seek_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxSeekTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_seek_time(&self, value: super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_max_seek_time(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxSeekTime)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_position(&self) -> Result { + }} + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_position(&self, value: super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_position(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Position)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SystemMediaTransportControlsTimelineProperties: ISystemMediaTransportControlsTimelineProperties} impl RtActivatable for SystemMediaTransportControlsTimelineProperties {} @@ -1339,43 +1339,43 @@ RT_INTERFACE!{interface IVideoDisplayProperties(IVideoDisplayPropertiesVtbl): II fn put_Subtitle(&self, value: HSTRING) -> HRESULT }} impl IVideoDisplayProperties { - #[inline] pub unsafe fn get_title(&self) -> Result { + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_title(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_title(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Title)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_subtitle(&self) -> Result { + }} + #[inline] pub fn get_subtitle(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Subtitle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_subtitle(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_subtitle(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Subtitle)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class VideoDisplayProperties: IVideoDisplayProperties} 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(&self, out: *mut *mut super::foundation::collections::IVector) -> HRESULT + fn get_Genres(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IVideoDisplayProperties2 { - #[inline] pub unsafe fn get_genres(&self) -> Result>> { + #[inline] pub fn get_genres(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Genres)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{static class VideoEffects} impl RtActivatable for VideoEffects {} impl VideoEffects { - #[inline] pub fn get_video_stabilization() -> Result { unsafe { + #[inline] pub fn get_video_stabilization() -> Result { >::get_activation_factory().get_video_stabilization() - }} + } } DEFINE_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]) [CLSID_VideoEffects]); DEFINE_IID!(IID_IVideoEffectsStatics, 533571048, 47857, 17697, 152, 12, 59, 206, 187, 68, 207, 56); @@ -1383,44 +1383,44 @@ RT_INTERFACE!{static interface IVideoEffectsStatics(IVideoEffectsStaticsVtbl): I fn get_VideoStabilization(&self, out: *mut HSTRING) -> HRESULT }} impl IVideoEffectsStatics { - #[inline] pub unsafe fn get_video_stabilization(&self) -> Result { + #[inline] pub fn get_video_stabilization(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoStabilization)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::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(&self, out: *mut *mut super::graphics::imaging::SoftwareBitmap) -> HRESULT, - fn CopyToAsync(&self, frame: *mut VideoFrame, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn CopyToAsync(&self, frame: *mut VideoFrame, out: *mut *mut foundation::IAsyncAction) -> HRESULT, #[cfg(feature="windows-graphics")] fn get_Direct3DSurface(&self, out: *mut *mut super::graphics::directx::direct3d11::IDirect3DSurface) -> HRESULT }} impl IVideoFrame { - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn get_software_bitmap(&self) -> Result> { + #[cfg(feature="windows-graphics")] #[inline] pub fn get_software_bitmap(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SoftwareBitmap)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn copy_to_async(&self, frame: &VideoFrame) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn copy_to_async(&self, frame: &VideoFrame) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CopyToAsync)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_direct3_dsurface(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Direct3DSurface)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class VideoFrame: IVideoFrame} impl RtActivatable for VideoFrame {} impl VideoFrame { - #[cfg(feature="windows-graphics")] #[inline] pub fn create(format: super::graphics::imaging::BitmapPixelFormat, width: i32, height: i32) -> Result> { unsafe { + #[cfg(feature="windows-graphics")] #[inline] pub fn create(format: super::graphics::imaging::BitmapPixelFormat, width: i32, height: i32) -> Result> { >::get_activation_factory().create(format, width, height) - }} - #[cfg(feature="windows-graphics")] #[inline] pub fn create_with_alpha(format: super::graphics::imaging::BitmapPixelFormat, width: i32, height: i32, alpha: super::graphics::imaging::BitmapAlphaMode) -> Result> { unsafe { + } + #[cfg(feature="windows-graphics")] #[inline] pub fn create_with_alpha(format: super::graphics::imaging::BitmapPixelFormat, width: i32, height: i32, alpha: super::graphics::imaging::BitmapAlphaMode) -> Result> { >::get_activation_factory().create_with_alpha(format, width, height, alpha) - }} + } } DEFINE_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]) [CLSID_VideoFrame]); DEFINE_IID!(IID_IVideoFrameFactory, 21720425, 8744, 19602, 146, 255, 80, 195, 128, 211, 231, 118); @@ -1429,16 +1429,16 @@ RT_INTERFACE!{static interface IVideoFrameFactory(IVideoFrameFactoryVtbl): IInsp #[cfg(feature="windows-graphics")] fn CreateWithAlpha(&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(&self, format: super::graphics::imaging::BitmapPixelFormat, width: i32, height: i32) -> Result> { + #[cfg(feature="windows-graphics")] #[inline] pub fn create(&self, format: super::graphics::imaging::BitmapPixelFormat, width: i32, height: i32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, 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(&self, format: super::graphics::imaging::BitmapPixelFormat, width: i32, height: i32, alpha: super::graphics::imaging::BitmapAlphaMode) -> Result> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn create_with_alpha(&self, format: super::graphics::imaging::BitmapPixelFormat, width: i32, height: i32, alpha: super::graphics::imaging::BitmapAlphaMode) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithAlpha)(self as *const _ as *mut _, format, width, height, alpha, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } pub mod capture { // Windows.Media.Capture use ::prelude::*; @@ -1449,78 +1449,78 @@ RT_INTERFACE!{interface IAdvancedCapturedPhoto(IAdvancedCapturedPhotoVtbl): IIns fn get_Context(&self, out: *mut *mut IInspectable) -> HRESULT }} impl IAdvancedCapturedPhoto { - #[inline] pub unsafe fn get_frame(&self) -> Result> { + #[inline] pub fn get_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Frame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mode(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Mode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_context(&self) -> Result> { + }} + #[inline] pub fn get_context(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Context)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AdvancedCapturedPhoto: IAdvancedCapturedPhoto} 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(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn get_FrameBoundsRelativeToReferencePhoto(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IAdvancedCapturedPhoto2 { - #[inline] pub unsafe fn get_frame_bounds_relative_to_reference_photo(&self) -> Result>> { + #[inline] pub fn get_frame_bounds_relative_to_reference_photo(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FrameBoundsRelativeToReferencePhoto)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CaptureWithContextAsync(&self, context: *mut IInspectable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_OptionalReferencePhotoCaptured(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_OptionalReferencePhotoCaptured(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_AllPhotosCaptured(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AllPhotosCaptured(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn FinishAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn CaptureAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CaptureWithContextAsync(&self, context: *mut IInspectable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_OptionalReferencePhotoCaptured(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_OptionalReferencePhotoCaptured(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_AllPhotosCaptured(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AllPhotosCaptured(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn FinishAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IAdvancedPhotoCapture { - #[inline] pub unsafe fn capture_async(&self) -> Result>> { + #[inline] pub fn capture_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CaptureAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn capture_with_context_async(&self, context: &IInspectable) -> Result>> { + }} + #[inline] pub fn capture_with_context_async(&self, context: &IInspectable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CaptureWithContextAsync)(self as *const _ as *mut _, 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(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_optional_reference_photo_captured(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_OptionalReferencePhotoCaptured)(self as *const _ as *mut _, 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(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_optional_reference_photo_captured(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_OptionalReferencePhotoCaptured)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_all_photos_captured(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_all_photos_captured(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AllPhotosCaptured)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_all_photos_captured(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_all_photos_captured(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AllPhotosCaptured)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn finish_async(&self) -> Result> { + }} + #[inline] pub fn finish_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FinishAsync)(self 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_IAppBroadcastBackgroundService, 3134318378, 64148, 18169, 149, 252, 215, 21, 17, 205, 167, 11); @@ -1536,75 +1536,75 @@ RT_INTERFACE!{interface IAppBroadcastBackgroundService(IAppBroadcastBackgroundSe fn put_ViewerCount(&self, value: u32) -> HRESULT, fn get_ViewerCount(&self, out: *mut u32) -> HRESULT, fn TerminateBroadcast(&self, reason: AppBroadcastTerminationReason, providerSpecificReason: u32) -> HRESULT, - fn add_HeartbeatRequested(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_HeartbeatRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_HeartbeatRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_HeartbeatRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_TitleId(&self, out: *mut HSTRING) -> HRESULT }} impl IAppBroadcastBackgroundService { - #[inline] pub unsafe fn set_plug_in_state(&self, value: AppBroadcastPlugInState) -> Result<()> { + #[inline] pub fn set_plug_in_state(&self, value: AppBroadcastPlugInState) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PlugInState)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_plug_in_state(&self) -> Result { + }} + #[inline] pub fn get_plug_in_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PlugInState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_sign_in_info(&self, value: &AppBroadcastBackgroundServiceSignInInfo) -> Result<()> { + }} + #[inline] pub fn set_sign_in_info(&self, value: &AppBroadcastBackgroundServiceSignInInfo) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SignInInfo)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_sign_in_info(&self) -> Result> { + }} + #[inline] pub fn get_sign_in_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SignInInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_stream_info(&self, value: &AppBroadcastBackgroundServiceStreamInfo) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_stream_info(&self, value: &AppBroadcastBackgroundServiceStreamInfo) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StreamInfo)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_stream_info(&self) -> Result> { + }} + #[inline] pub fn get_stream_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StreamInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_app_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_broadcast_title(&self) -> Result { + }} + #[inline] pub fn get_broadcast_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BroadcastTitle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_viewer_count(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_viewer_count(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ViewerCount)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_viewer_count(&self) -> Result { + }} + #[inline] pub fn get_viewer_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ViewerCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn terminate_broadcast(&self, reason: AppBroadcastTerminationReason, providerSpecificReason: u32) -> Result<()> { + }} + #[inline] pub fn terminate_broadcast(&self, reason: AppBroadcastTerminationReason, providerSpecificReason: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).TerminateBroadcast)(self as *const _ as *mut _, reason, providerSpecificReason); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_heartbeat_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_heartbeat_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_HeartbeatRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_heartbeat_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_heartbeat_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_HeartbeatRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_title_id(&self) -> Result { + }} + #[inline] pub fn get_title_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TitleId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class AppBroadcastBackgroundService: IAppBroadcastBackgroundService} DEFINE_IID!(IID_IAppBroadcastBackgroundService2, 4237085631, 21833, 19335, 149, 159, 35, 202, 64, 31, 212, 115); @@ -1614,142 +1614,142 @@ RT_INTERFACE!{interface IAppBroadcastBackgroundService2(IAppBroadcastBackgroundS fn put_BroadcastLanguage(&self, value: HSTRING) -> HRESULT, fn get_BroadcastChannel(&self, out: *mut HSTRING) -> HRESULT, fn put_BroadcastChannel(&self, value: HSTRING) -> HRESULT, - fn add_BroadcastTitleChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_BroadcastTitleChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_BroadcastLanguageChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_BroadcastLanguageChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_BroadcastChannelChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_BroadcastChannelChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_BroadcastTitleChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_BroadcastTitleChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_BroadcastLanguageChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_BroadcastLanguageChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_BroadcastChannelChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_BroadcastChannelChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IAppBroadcastBackgroundService2 { - #[inline] pub unsafe fn set_broadcast_title(&self, value: &HStringArg) -> Result<()> { + #[inline] pub fn set_broadcast_title(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BroadcastTitle)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_broadcast_language(&self) -> Result { + }} + #[inline] pub fn get_broadcast_language(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BroadcastLanguage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_broadcast_language(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_broadcast_language(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BroadcastLanguage)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_broadcast_channel(&self) -> Result { + }} + #[inline] pub fn get_broadcast_channel(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BroadcastChannel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_broadcast_channel(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_broadcast_channel(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BroadcastChannel)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_broadcast_title_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_broadcast_title_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_BroadcastTitleChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_broadcast_title_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_broadcast_title_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_BroadcastTitleChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_broadcast_language_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_broadcast_language_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_BroadcastLanguageChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_broadcast_language_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_broadcast_language_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_BroadcastLanguageChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_broadcast_channel_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_broadcast_channel_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_BroadcastChannelChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_broadcast_channel_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_broadcast_channel_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_BroadcastChannelChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IAppBroadcastBackgroundServiceSignInInfo, 1584616053, 35016, 20170, 137, 186, 72, 37, 152, 93, 184, 128); RT_INTERFACE!{interface IAppBroadcastBackgroundServiceSignInInfo(IAppBroadcastBackgroundServiceSignInInfoVtbl): IInspectable(IInspectableVtbl) [IID_IAppBroadcastBackgroundServiceSignInInfo] { fn get_SignInState(&self, out: *mut AppBroadcastSignInState) -> HRESULT, - fn put_OAuthRequestUri(&self, value: *mut super::super::foundation::Uri) -> HRESULT, - fn get_OAuthRequestUri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_OAuthCallbackUri(&self, value: *mut super::super::foundation::Uri) -> HRESULT, - fn get_OAuthCallbackUri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn put_OAuthRequestUri(&self, value: *mut foundation::Uri) -> HRESULT, + fn get_OAuthRequestUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_OAuthCallbackUri(&self, value: *mut foundation::Uri) -> HRESULT, + fn get_OAuthCallbackUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, #[cfg(not(feature="windows-security"))] fn __Dummy5(&self) -> (), #[cfg(feature="windows-security")] fn get_AuthenticationResult(&self, out: *mut *mut super::super::security::authentication::web::WebAuthenticationResult) -> HRESULT, fn put_UserName(&self, value: HSTRING) -> HRESULT, fn get_UserName(&self, out: *mut HSTRING) -> HRESULT, - fn add_SignInStateChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SignInStateChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_SignInStateChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SignInStateChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IAppBroadcastBackgroundServiceSignInInfo { - #[inline] pub unsafe fn get_sign_in_state(&self) -> Result { + #[inline] pub fn get_sign_in_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SignInState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_oauth_request_uri(&self, value: &super::super::foundation::Uri) -> Result<()> { + }} + #[inline] pub fn set_oauth_request_uri(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OAuthRequestUri)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_oauth_request_uri(&self) -> Result> { + }} + #[inline] pub fn get_oauth_request_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OAuthRequestUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_oauth_callback_uri(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_oauth_callback_uri(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OAuthCallbackUri)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_oauth_callback_uri(&self) -> Result> { + }} + #[inline] pub fn get_oauth_callback_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OAuthCallbackUri)(self 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 get_authentication_result(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-security")] #[inline] pub fn get_authentication_result(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AuthenticationResult)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_user_name(&self, value: &HStringArg) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_user_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_UserName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_user_name(&self) -> Result { + }} + #[inline] pub fn get_user_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UserName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_sign_in_state_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_sign_in_state_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SignInStateChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_sign_in_state_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_sign_in_state_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SignInStateChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AppBroadcastBackgroundServiceSignInInfo: IAppBroadcastBackgroundServiceSignInInfo} DEFINE_IID!(IID_IAppBroadcastBackgroundServiceSignInInfo2, 2432968796, 25295, 19004, 167, 238, 174, 181, 7, 64, 70, 69); RT_INTERFACE!{interface IAppBroadcastBackgroundServiceSignInInfo2(IAppBroadcastBackgroundServiceSignInInfo2Vtbl): IInspectable(IInspectableVtbl) [IID_IAppBroadcastBackgroundServiceSignInInfo2] { - fn add_UserNameChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_UserNameChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_UserNameChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_UserNameChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IAppBroadcastBackgroundServiceSignInInfo2 { - #[inline] pub unsafe fn add_user_name_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_user_name_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_UserNameChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_user_name_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_user_name_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_UserNameChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IAppBroadcastBackgroundServiceStreamInfo, 836502204, 39178, 18692, 170, 150, 254, 54, 67, 129, 241, 54); RT_INTERFACE!{interface IAppBroadcastBackgroundServiceStreamInfo(IAppBroadcastBackgroundServiceStreamInfoVtbl): IInspectable(IInspectableVtbl) [IID_IAppBroadcastBackgroundServiceStreamInfo] { @@ -1761,78 +1761,78 @@ RT_INTERFACE!{interface IAppBroadcastBackgroundServiceStreamInfo(IAppBroadcastBa fn put_AudioCodec(&self, value: HSTRING) -> HRESULT, fn get_AudioCodec(&self, out: *mut HSTRING) -> HRESULT, fn get_BroadcastStreamReader(&self, out: *mut *mut AppBroadcastStreamReader) -> HRESULT, - fn add_StreamStateChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StreamStateChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_VideoEncodingResolutionChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_VideoEncodingResolutionChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_VideoEncodingBitrateChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_VideoEncodingBitrateChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_StreamStateChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StreamStateChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_VideoEncodingResolutionChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_VideoEncodingResolutionChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_VideoEncodingBitrateChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_VideoEncodingBitrateChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IAppBroadcastBackgroundServiceStreamInfo { - #[inline] pub unsafe fn get_stream_state(&self) -> Result { + #[inline] pub fn get_stream_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StreamState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_desired_video_encoding_bitrate(&self, value: u64) -> Result<()> { + }} + #[inline] pub fn set_desired_video_encoding_bitrate(&self, value: u64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DesiredVideoEncodingBitrate)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_desired_video_encoding_bitrate(&self) -> Result { + }} + #[inline] pub fn get_desired_video_encoding_bitrate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DesiredVideoEncodingBitrate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_bandwidth_test_bitrate(&self, value: u64) -> Result<()> { + }} + #[inline] pub fn set_bandwidth_test_bitrate(&self, value: u64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BandwidthTestBitrate)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_bandwidth_test_bitrate(&self) -> Result { + }} + #[inline] pub fn get_bandwidth_test_bitrate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BandwidthTestBitrate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_audio_codec(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_audio_codec(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AudioCodec)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_codec(&self) -> Result { + }} + #[inline] pub fn get_audio_codec(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioCodec)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_broadcast_stream_reader(&self) -> Result> { + }} + #[inline] pub fn get_broadcast_stream_reader(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BroadcastStreamReader)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_stream_state_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_stream_state_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StreamStateChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_stream_state_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_stream_state_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StreamStateChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_video_encoding_resolution_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_video_encoding_resolution_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_VideoEncodingResolutionChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_video_encoding_resolution_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_video_encoding_resolution_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_VideoEncodingResolutionChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_video_encoding_bitrate_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_video_encoding_bitrate_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_VideoEncodingBitrateChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_video_encoding_bitrate_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_video_encoding_bitrate_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_VideoEncodingBitrateChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AppBroadcastBackgroundServiceStreamInfo: IAppBroadcastBackgroundServiceStreamInfo} DEFINE_IID!(IID_IAppBroadcastBackgroundServiceStreamInfo2, 3172900717, 38108, 20430, 149, 65, 169, 241, 41, 89, 99, 52); @@ -1840,10 +1840,10 @@ RT_INTERFACE!{interface IAppBroadcastBackgroundServiceStreamInfo2(IAppBroadcastB fn ReportProblemWithStream(&self) -> HRESULT }} impl IAppBroadcastBackgroundServiceStreamInfo2 { - #[inline] pub unsafe fn report_problem_with_stream(&self) -> Result<()> { + #[inline] pub fn report_problem_with_stream(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportProblemWithStream)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum AppBroadcastCameraCaptureState: i32 { Stopped (AppBroadcastCameraCaptureState_Stopped) = 0, Started (AppBroadcastCameraCaptureState_Started) = 1, Failed (AppBroadcastCameraCaptureState_Failed) = 2, @@ -1854,16 +1854,16 @@ RT_INTERFACE!{interface IAppBroadcastCameraCaptureStateChangedEventArgs(IAppBroa fn get_ErrorCode(&self, out: *mut u32) -> HRESULT }} impl IAppBroadcastCameraCaptureStateChangedEventArgs { - #[inline] pub unsafe fn get_state(&self) -> Result { + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_error_code(&self) -> Result { + }} + #[inline] pub fn get_error_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ErrorCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppBroadcastCameraCaptureStateChangedEventArgs: IAppBroadcastCameraCaptureStateChangedEventArgs} RT_ENUM! { enum AppBroadcastCameraOverlayLocation: i32 { @@ -1906,116 +1906,116 @@ RT_INTERFACE!{interface IAppBroadcastGlobalSettings(IAppBroadcastGlobalSettingsV fn get_IsCursorImageCaptureEnabled(&self, out: *mut bool) -> HRESULT }} impl IAppBroadcastGlobalSettings { - #[inline] pub unsafe fn get_is_broadcast_enabled(&self) -> Result { + #[inline] pub fn get_is_broadcast_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsBroadcastEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_disabled_by_policy(&self) -> Result { + }} + #[inline] pub fn get_is_disabled_by_policy(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDisabledByPolicy)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_gpu_constrained(&self) -> Result { + }} + #[inline] pub fn get_is_gpu_constrained(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsGpuConstrained)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_hardware_encoder(&self) -> Result { + }} + #[inline] pub fn get_has_hardware_encoder(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasHardwareEncoder)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_audio_capture_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_audio_capture_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsAudioCaptureEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_audio_capture_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_audio_capture_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsAudioCaptureEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_microphone_capture_enabled_by_default(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_microphone_capture_enabled_by_default(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsMicrophoneCaptureEnabledByDefault)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_microphone_capture_enabled_by_default(&self) -> Result { + }} + #[inline] pub fn get_is_microphone_capture_enabled_by_default(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsMicrophoneCaptureEnabledByDefault)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_echo_cancellation_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_echo_cancellation_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsEchoCancellationEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_echo_cancellation_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_echo_cancellation_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsEchoCancellationEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_system_audio_gain(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_system_audio_gain(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SystemAudioGain)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_system_audio_gain(&self) -> Result { + }} + #[inline] pub fn get_system_audio_gain(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SystemAudioGain)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_microphone_gain(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_microphone_gain(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MicrophoneGain)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_microphone_gain(&self) -> Result { + }} + #[inline] pub fn get_microphone_gain(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MicrophoneGain)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_camera_capture_enabled_by_default(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_camera_capture_enabled_by_default(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsCameraCaptureEnabledByDefault)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_camera_capture_enabled_by_default(&self) -> Result { + }} + #[inline] pub fn get_is_camera_capture_enabled_by_default(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCameraCaptureEnabledByDefault)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_selected_camera_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_selected_camera_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SelectedCameraId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_selected_camera_id(&self) -> Result { + }} + #[inline] pub fn get_selected_camera_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SelectedCameraId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_camera_overlay_location(&self, value: AppBroadcastCameraOverlayLocation) -> Result<()> { + }} + #[inline] pub fn set_camera_overlay_location(&self, value: AppBroadcastCameraOverlayLocation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CameraOverlayLocation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_camera_overlay_location(&self) -> Result { + }} + #[inline] pub fn get_camera_overlay_location(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CameraOverlayLocation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_camera_overlay_size(&self, value: AppBroadcastCameraOverlaySize) -> Result<()> { + }} + #[inline] pub fn set_camera_overlay_size(&self, value: AppBroadcastCameraOverlaySize) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CameraOverlaySize)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_camera_overlay_size(&self) -> Result { + }} + #[inline] pub fn get_camera_overlay_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CameraOverlaySize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_cursor_image_capture_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_cursor_image_capture_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsCursorImageCaptureEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_cursor_image_capture_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_cursor_image_capture_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCursorImageCaptureEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppBroadcastGlobalSettings: IAppBroadcastGlobalSettings} DEFINE_IID!(IID_IAppBroadcastHeartbeatRequestedEventArgs, 3466936963, 61009, 19903, 148, 114, 121, 169, 237, 78, 33, 101); @@ -2024,32 +2024,32 @@ RT_INTERFACE!{interface IAppBroadcastHeartbeatRequestedEventArgs(IAppBroadcastHe fn get_Handled(&self, out: *mut bool) -> HRESULT }} impl IAppBroadcastHeartbeatRequestedEventArgs { - #[inline] pub unsafe fn set_handled(&self, value: bool) -> Result<()> { + #[inline] pub fn set_handled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Handled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_handled(&self) -> Result { + }} + #[inline] pub fn get_handled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Handled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppBroadcastHeartbeatRequestedEventArgs: IAppBroadcastHeartbeatRequestedEventArgs} RT_CLASS!{static class AppBroadcastManager} impl RtActivatable for AppBroadcastManager {} impl AppBroadcastManager { - #[inline] pub fn get_global_settings() -> Result> { unsafe { + #[inline] pub fn get_global_settings() -> Result>> { >::get_activation_factory().get_global_settings() - }} - #[inline] pub fn apply_global_settings(value: &AppBroadcastGlobalSettings) -> Result<()> { unsafe { + } + #[inline] pub fn apply_global_settings(value: &AppBroadcastGlobalSettings) -> Result<()> { >::get_activation_factory().apply_global_settings(value) - }} - #[inline] pub fn get_provider_settings() -> Result> { unsafe { + } + #[inline] pub fn get_provider_settings() -> Result>> { >::get_activation_factory().get_provider_settings() - }} - #[inline] pub fn apply_provider_settings(value: &AppBroadcastProviderSettings) -> Result<()> { unsafe { + } + #[inline] pub fn apply_provider_settings(value: &AppBroadcastProviderSettings) -> Result<()> { >::get_activation_factory().apply_provider_settings(value) - }} + } } DEFINE_CLSID!(AppBroadcastManager(&[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,66,114,111,97,100,99,97,115,116,77,97,110,97,103,101,114,0]) [CLSID_AppBroadcastManager]); DEFINE_IID!(IID_IAppBroadcastManagerStatics, 911081867, 7758, 16671, 171, 62, 146, 149, 152, 68, 193, 86); @@ -2060,24 +2060,24 @@ RT_INTERFACE!{static interface IAppBroadcastManagerStatics(IAppBroadcastManagerS fn ApplyProviderSettings(&self, value: *mut AppBroadcastProviderSettings) -> HRESULT }} impl IAppBroadcastManagerStatics { - #[inline] pub unsafe fn get_global_settings(&self) -> Result> { + #[inline] pub fn get_global_settings(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetGlobalSettings)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn apply_global_settings(&self, value: &AppBroadcastGlobalSettings) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn apply_global_settings(&self, value: &AppBroadcastGlobalSettings) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ApplyGlobalSettings)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_provider_settings(&self) -> Result> { + }} + #[inline] pub fn get_provider_settings(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetProviderSettings)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn apply_provider_settings(&self, value: &AppBroadcastProviderSettings) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn apply_provider_settings(&self, value: &AppBroadcastProviderSettings) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ApplyProviderSettings)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum AppBroadcastMicrophoneCaptureState: i32 { Stopped (AppBroadcastMicrophoneCaptureState_Stopped) = 0, Started (AppBroadcastMicrophoneCaptureState_Started) = 1, Failed (AppBroadcastMicrophoneCaptureState_Failed) = 2, @@ -2088,16 +2088,16 @@ RT_INTERFACE!{interface IAppBroadcastMicrophoneCaptureStateChangedEventArgs(IApp fn get_ErrorCode(&self, out: *mut u32) -> HRESULT }} impl IAppBroadcastMicrophoneCaptureStateChangedEventArgs { - #[inline] pub unsafe fn get_state(&self) -> Result { + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_error_code(&self) -> Result { + }} + #[inline] pub fn get_error_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ErrorCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppBroadcastMicrophoneCaptureStateChangedEventArgs: IAppBroadcastMicrophoneCaptureStateChangedEventArgs} DEFINE_IID!(IID_IAppBroadcastPlugIn, 1376525926, 25875, 17780, 172, 84, 35, 183, 151, 41, 97, 91); @@ -2109,65 +2109,65 @@ RT_INTERFACE!{interface IAppBroadcastPlugIn(IAppBroadcastPlugInVtbl): IInspectab fn get_DisplayName(&self, out: *mut HSTRING) -> HRESULT }} impl IAppBroadcastPlugIn { - #[inline] pub unsafe fn get_app_id(&self) -> Result { + #[inline] pub fn get_app_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_provider_settings(&self) -> Result> { + }} + #[inline] pub fn get_provider_settings(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProviderSettings)(self 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_logo(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_logo(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Logo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class AppBroadcastPlugIn: IAppBroadcastPlugIn} DEFINE_IID!(IID_IAppBroadcastPlugInManager, 3847281017, 10145, 18855, 187, 244, 215, 169, 233, 208, 118, 104); RT_INTERFACE!{interface IAppBroadcastPlugInManager(IAppBroadcastPlugInManagerVtbl): IInspectable(IInspectableVtbl) [IID_IAppBroadcastPlugInManager] { fn get_IsBroadcastProviderAvailable(&self, out: *mut bool) -> HRESULT, - fn get_PlugInList(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_PlugInList(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_DefaultPlugIn(&self, out: *mut *mut AppBroadcastPlugIn) -> HRESULT, fn put_DefaultPlugIn(&self, value: *mut AppBroadcastPlugIn) -> HRESULT }} impl IAppBroadcastPlugInManager { - #[inline] pub unsafe fn get_is_broadcast_provider_available(&self) -> Result { + #[inline] pub fn get_is_broadcast_provider_available(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsBroadcastProviderAvailable)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_plug_in_list(&self) -> Result>> { + }} + #[inline] pub fn get_plug_in_list(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PlugInList)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_plug_in(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_default_plug_in(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DefaultPlugIn)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_default_plug_in(&self, value: &AppBroadcastPlugIn) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_default_plug_in(&self, value: &AppBroadcastPlugIn) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DefaultPlugIn)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AppBroadcastPlugInManager: IAppBroadcastPlugInManager} impl RtActivatable for AppBroadcastPlugInManager {} impl AppBroadcastPlugInManager { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} - #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::super::system::User) -> Result> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::super::system::User) -> Result>> { >::get_activation_factory().get_for_user(user) - }} + } } DEFINE_CLSID!(AppBroadcastPlugInManager(&[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,66,114,111,97,100,99,97,115,116,80,108,117,103,73,110,77,97,110,97,103,101,114,0]) [CLSID_AppBroadcastPlugInManager]); DEFINE_IID!(IID_IAppBroadcastPlugInManagerStatics, 4066663456, 23670, 19676, 147, 100, 130, 254, 158, 182, 83, 77); @@ -2176,16 +2176,16 @@ RT_INTERFACE!{static interface IAppBroadcastPlugInManagerStatics(IAppBroadcastPl #[cfg(feature="windows-system")] fn GetForUser(&self, user: *mut super::super::system::User, out: *mut *mut AppBroadcastPlugInManager) -> HRESULT }} impl IAppBroadcastPlugInManagerStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self 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 get_for_user(&self, user: &super::super::system::User) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(&self, user: &super::super::system::User) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForUser)(self as *const _ as *mut _, user as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum AppBroadcastPlugInState: i32 { Unknown (AppBroadcastPlugInState_Unknown) = 0, Initialized (AppBroadcastPlugInState_Initialized) = 1, MicrosoftSignInRequired (AppBroadcastPlugInState_MicrosoftSignInRequired) = 2, OAuthSignInRequired (AppBroadcastPlugInState_OAuthSignInRequired) = 3, ProviderSignInRequired (AppBroadcastPlugInState_ProviderSignInRequired) = 4, InBandwidthTest (AppBroadcastPlugInState_InBandwidthTest) = 5, ReadyToBroadcast (AppBroadcastPlugInState_ReadyToBroadcast) = 6, @@ -2195,51 +2195,51 @@ RT_INTERFACE!{interface IAppBroadcastPlugInStateChangedEventArgs(IAppBroadcastPl fn get_PlugInState(&self, out: *mut AppBroadcastPlugInState) -> HRESULT }} impl IAppBroadcastPlugInStateChangedEventArgs { - #[inline] pub unsafe fn get_plug_in_state(&self) -> Result { + #[inline] pub fn get_plug_in_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PlugInState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppBroadcastPlugInStateChangedEventArgs: IAppBroadcastPlugInStateChangedEventArgs} DEFINE_IID!(IID_IAppBroadcastPreview, 347475802, 28234, 19328, 161, 79, 103, 238, 119, 209, 83, 231); RT_INTERFACE!{interface IAppBroadcastPreview(IAppBroadcastPreviewVtbl): IInspectable(IInspectableVtbl) [IID_IAppBroadcastPreview] { fn StopPreview(&self) -> HRESULT, fn get_PreviewState(&self, out: *mut AppBroadcastPreviewState) -> HRESULT, - fn get_ErrorCode(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn add_PreviewStateChanged(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PreviewStateChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_ErrorCode(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn add_PreviewStateChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PreviewStateChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_PreviewStreamReader(&self, out: *mut *mut AppBroadcastPreviewStreamReader) -> HRESULT }} impl IAppBroadcastPreview { - #[inline] pub unsafe fn stop_preview(&self) -> Result<()> { + #[inline] pub fn stop_preview(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StopPreview)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_preview_state(&self) -> Result { + }} + #[inline] pub fn get_preview_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PreviewState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_error_code(&self) -> Result>> { + }} + #[inline] pub fn get_error_code(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ErrorCode)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_preview_state_changed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_preview_state_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PreviewStateChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_preview_state_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_preview_state_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PreviewStateChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_preview_stream_reader(&self) -> Result> { + }} + #[inline] pub fn get_preview_stream_reader(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PreviewStreamReader)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppBroadcastPreview: IAppBroadcastPreview} RT_ENUM! { enum AppBroadcastPreviewState: i32 { @@ -2251,16 +2251,16 @@ RT_INTERFACE!{interface IAppBroadcastPreviewStateChangedEventArgs(IAppBroadcastP fn get_ErrorCode(&self, out: *mut u32) -> HRESULT }} impl IAppBroadcastPreviewStateChangedEventArgs { - #[inline] pub unsafe fn get_preview_state(&self) -> Result { + #[inline] pub fn get_preview_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PreviewState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_error_code(&self) -> Result { + }} + #[inline] pub fn get_error_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ErrorCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppBroadcastPreviewStateChangedEventArgs: IAppBroadcastPreviewStateChangedEventArgs} DEFINE_IID!(IID_IAppBroadcastPreviewStreamReader, 2451737936, 56127, 16552, 140, 212, 244, 227, 113, 221, 171, 55); @@ -2273,49 +2273,49 @@ RT_INTERFACE!{interface IAppBroadcastPreviewStreamReader(IAppBroadcastPreviewStr #[cfg(not(feature="windows-graphics"))] fn __Dummy4(&self) -> (), #[cfg(feature="windows-graphics")] fn get_VideoBitmapAlphaMode(&self, out: *mut super::super::graphics::imaging::BitmapAlphaMode) -> HRESULT, fn TryGetNextVideoFrame(&self, out: *mut *mut AppBroadcastPreviewStreamVideoFrame) -> HRESULT, - fn add_VideoFrameArrived(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_VideoFrameArrived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_VideoFrameArrived(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_VideoFrameArrived(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IAppBroadcastPreviewStreamReader { - #[inline] pub unsafe fn get_video_width(&self) -> Result { + #[inline] pub fn get_video_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VideoWidth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_height(&self) -> Result { + }} + #[inline] pub fn get_video_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VideoHeight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_stride(&self) -> Result { + }} + #[inline] pub fn get_video_stride(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VideoStride)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn get_video_bitmap_pixel_format(&self) -> Result { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_video_bitmap_pixel_format(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VideoBitmapPixelFormat)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn get_video_bitmap_alpha_mode(&self) -> Result { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_video_bitmap_alpha_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VideoBitmapAlphaMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn try_get_next_video_frame(&self) -> Result> { + }} + #[inline] pub fn try_get_next_video_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetNextVideoFrame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_video_frame_arrived(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_video_frame_arrived(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_VideoFrameArrived)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_video_frame_arrived(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_video_frame_arrived(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_VideoFrameArrived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AppBroadcastPreviewStreamReader: IAppBroadcastPreviewStreamReader} DEFINE_IID!(IID_IAppBroadcastPreviewStreamVideoFrame, 17809057, 38142, 17561, 184, 192, 141, 36, 66, 121, 251, 18); @@ -2324,46 +2324,46 @@ RT_INTERFACE!{interface IAppBroadcastPreviewStreamVideoFrame(IAppBroadcastPrevie #[cfg(feature="windows-storage")] fn get_VideoBuffer(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT }} impl IAppBroadcastPreviewStreamVideoFrame { - #[inline] pub unsafe fn get_video_header(&self) -> Result> { + #[inline] pub fn get_video_header(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoHeader)(self 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_video_buffer(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_video_buffer(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoBuffer)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppBroadcastPreviewStreamVideoFrame: IAppBroadcastPreviewStreamVideoFrame} DEFINE_IID!(IID_IAppBroadcastPreviewStreamVideoHeader, 2347720979, 55940, 17561, 167, 171, 135, 17, 140, 180, 161, 87); RT_INTERFACE!{interface IAppBroadcastPreviewStreamVideoHeader(IAppBroadcastPreviewStreamVideoHeaderVtbl): IInspectable(IInspectableVtbl) [IID_IAppBroadcastPreviewStreamVideoHeader] { - fn get_AbsoluteTimestamp(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_RelativeTimestamp(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn get_Duration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_AbsoluteTimestamp(&self, out: *mut foundation::DateTime) -> HRESULT, + fn get_RelativeTimestamp(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_Duration(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn get_FrameId(&self, out: *mut u64) -> HRESULT }} impl IAppBroadcastPreviewStreamVideoHeader { - #[inline] pub unsafe fn get_absolute_timestamp(&self) -> Result { + #[inline] pub fn get_absolute_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AbsoluteTimestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_relative_timestamp(&self) -> Result { + }} + #[inline] pub fn get_relative_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RelativeTimestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_duration(&self) -> Result { + }} + #[inline] pub fn get_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Duration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_frame_id(&self) -> Result { + }} + #[inline] pub fn get_frame_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FrameId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppBroadcastPreviewStreamVideoHeader: IAppBroadcastPreviewStreamVideoHeader} DEFINE_IID!(IID_IAppBroadcastProviderSettings, 3272335202, 39240, 17807, 173, 80, 170, 6, 236, 3, 218, 8); @@ -2384,69 +2384,69 @@ RT_INTERFACE!{interface IAppBroadcastProviderSettings(IAppBroadcastProviderSetti fn get_VideoEncodingResolutionMode(&self, out: *mut AppBroadcastVideoEncodingResolutionMode) -> HRESULT }} impl IAppBroadcastProviderSettings { - #[inline] pub unsafe fn set_default_broadcast_title(&self, value: &HStringArg) -> Result<()> { + #[inline] pub fn set_default_broadcast_title(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DefaultBroadcastTitle)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_broadcast_title(&self) -> Result { + }} + #[inline] pub fn get_default_broadcast_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DefaultBroadcastTitle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_audio_encoding_bitrate(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_audio_encoding_bitrate(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AudioEncodingBitrate)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_encoding_bitrate(&self) -> Result { + }} + #[inline] pub fn get_audio_encoding_bitrate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AudioEncodingBitrate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_custom_video_encoding_bitrate(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_custom_video_encoding_bitrate(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CustomVideoEncodingBitrate)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_custom_video_encoding_bitrate(&self) -> Result { + }} + #[inline] pub fn get_custom_video_encoding_bitrate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CustomVideoEncodingBitrate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_custom_video_encoding_height(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_custom_video_encoding_height(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CustomVideoEncodingHeight)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_custom_video_encoding_height(&self) -> Result { + }} + #[inline] pub fn get_custom_video_encoding_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CustomVideoEncodingHeight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_custom_video_encoding_width(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_custom_video_encoding_width(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CustomVideoEncodingWidth)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_custom_video_encoding_width(&self) -> Result { + }} + #[inline] pub fn get_custom_video_encoding_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CustomVideoEncodingWidth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_video_encoding_bitrate_mode(&self, value: AppBroadcastVideoEncodingBitrateMode) -> Result<()> { + }} + #[inline] pub fn set_video_encoding_bitrate_mode(&self, value: AppBroadcastVideoEncodingBitrateMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_VideoEncodingBitrateMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_encoding_bitrate_mode(&self) -> Result { + }} + #[inline] pub fn get_video_encoding_bitrate_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VideoEncodingBitrateMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_video_encoding_resolution_mode(&self, value: AppBroadcastVideoEncodingResolutionMode) -> Result<()> { + }} + #[inline] pub fn set_video_encoding_resolution_mode(&self, value: AppBroadcastVideoEncodingResolutionMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_VideoEncodingResolutionMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_encoding_resolution_mode(&self) -> Result { + }} + #[inline] pub fn get_video_encoding_resolution_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VideoEncodingResolutionMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppBroadcastProviderSettings: IAppBroadcastProviderSettings} DEFINE_IID!(IID_IAppBroadcastServices, 2254484694, 38555, 20028, 172, 58, 139, 4, 46, 228, 238, 99); @@ -2459,83 +2459,83 @@ RT_INTERFACE!{interface IAppBroadcastServices(IAppBroadcastServicesVtbl): IInspe fn put_BroadcastLanguage(&self, value: HSTRING) -> HRESULT, fn get_UserName(&self, out: *mut HSTRING) -> HRESULT, fn get_CanCapture(&self, out: *mut bool) -> HRESULT, - fn EnterBroadcastModeAsync(&self, plugIn: *mut AppBroadcastPlugIn, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn EnterBroadcastModeAsync(&self, plugIn: *mut AppBroadcastPlugIn, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn ExitBroadcastMode(&self, reason: AppBroadcastExitBroadcastModeReason) -> HRESULT, fn StartBroadcast(&self) -> HRESULT, fn PauseBroadcast(&self) -> HRESULT, fn ResumeBroadcast(&self) -> HRESULT, - fn StartPreview(&self, desiredSize: super::super::foundation::Size, out: *mut *mut AppBroadcastPreview) -> HRESULT, + fn StartPreview(&self, desiredSize: foundation::Size, out: *mut *mut AppBroadcastPreview) -> HRESULT, fn get_State(&self, out: *mut *mut AppBroadcastState) -> HRESULT }} impl IAppBroadcastServices { - #[inline] pub unsafe fn get_capture_target_type(&self) -> Result { + #[inline] pub fn get_capture_target_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CaptureTargetType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_capture_target_type(&self, value: AppBroadcastCaptureTargetType) -> Result<()> { + }} + #[inline] pub fn set_capture_target_type(&self, value: AppBroadcastCaptureTargetType) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CaptureTargetType)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_broadcast_title(&self) -> Result { + }} + #[inline] pub fn get_broadcast_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BroadcastTitle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_broadcast_title(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_broadcast_title(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BroadcastTitle)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_broadcast_language(&self) -> Result { + }} + #[inline] pub fn get_broadcast_language(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BroadcastLanguage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_broadcast_language(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_broadcast_language(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BroadcastLanguage)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_user_name(&self) -> Result { + }} + #[inline] pub fn get_user_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UserName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_capture(&self) -> Result { + }} + #[inline] pub fn get_can_capture(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanCapture)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn enter_broadcast_mode_async(&self, plugIn: &AppBroadcastPlugIn) -> Result>> { + }} + #[inline] pub fn enter_broadcast_mode_async(&self, plugIn: &AppBroadcastPlugIn) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).EnterBroadcastModeAsync)(self as *const _ as *mut _, plugIn as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn exit_broadcast_mode(&self, reason: AppBroadcastExitBroadcastModeReason) -> Result<()> { + }} + #[inline] pub fn exit_broadcast_mode(&self, reason: AppBroadcastExitBroadcastModeReason) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ExitBroadcastMode)(self as *const _ as *mut _, reason); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start_broadcast(&self) -> Result<()> { + }} + #[inline] pub fn start_broadcast(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StartBroadcast)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn pause_broadcast(&self) -> Result<()> { + }} + #[inline] pub fn pause_broadcast(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).PauseBroadcast)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn resume_broadcast(&self) -> Result<()> { + }} + #[inline] pub fn resume_broadcast(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ResumeBroadcast)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start_preview(&self, desiredSize: super::super::foundation::Size) -> Result> { + }} + #[inline] pub fn start_preview(&self, desiredSize: foundation::Size) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartPreview)(self as *const _ as *mut _, desiredSize, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_state(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_state(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppBroadcastServices: IAppBroadcastServices} RT_ENUM! { enum AppBroadcastSignInResult: i32 { @@ -2550,16 +2550,16 @@ RT_INTERFACE!{interface IAppBroadcastSignInStateChangedEventArgs(IAppBroadcastSi fn get_Result(&self, out: *mut AppBroadcastSignInResult) -> HRESULT }} impl IAppBroadcastSignInStateChangedEventArgs { - #[inline] pub unsafe fn get_sign_in_state(&self) -> Result { + #[inline] pub fn get_sign_in_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SignInState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_result(&self) -> Result { + }} + #[inline] pub fn get_result(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Result)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppBroadcastSignInStateChangedEventArgs: IAppBroadcastSignInStateChangedEventArgs} DEFINE_IID!(IID_IAppBroadcastState, 3993503085, 32921, 19933, 146, 46, 197, 109, 172, 88, 171, 251); @@ -2572,15 +2572,15 @@ RT_INTERFACE!{interface IAppBroadcastState(IAppBroadcastStateVtbl): IInspectable fn get_ShouldCaptureCamera(&self, out: *mut bool) -> HRESULT, fn put_ShouldCaptureCamera(&self, value: bool) -> HRESULT, fn RestartCameraCapture(&self) -> HRESULT, - fn get_EncodedVideoSize(&self, out: *mut super::super::foundation::Size) -> HRESULT, + fn get_EncodedVideoSize(&self, out: *mut foundation::Size) -> HRESULT, fn get_MicrophoneCaptureState(&self, out: *mut AppBroadcastMicrophoneCaptureState) -> HRESULT, fn get_MicrophoneCaptureError(&self, out: *mut u32) -> HRESULT, fn get_CameraCaptureState(&self, out: *mut AppBroadcastCameraCaptureState) -> HRESULT, fn get_CameraCaptureError(&self, out: *mut u32) -> HRESULT, fn get_StreamState(&self, out: *mut AppBroadcastStreamState) -> HRESULT, fn get_PlugInState(&self, out: *mut AppBroadcastPlugInState) -> HRESULT, - fn get_OAuthRequestUri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn get_OAuthCallbackUri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn get_OAuthRequestUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn get_OAuthCallbackUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, #[cfg(not(feature="windows-security"))] fn __Dummy17(&self) -> (), #[cfg(feature="windows-security")] fn get_AuthenticationResult(&self, out: *mut *mut super::super::security::authentication::web::WebAuthenticationResult) -> HRESULT, #[cfg(not(feature="windows-security"))] fn __Dummy18(&self) -> (), @@ -2589,183 +2589,183 @@ RT_INTERFACE!{interface IAppBroadcastState(IAppBroadcastStateVtbl): IInspectable fn get_SignInState(&self, out: *mut AppBroadcastSignInState) -> HRESULT, fn get_TerminationReason(&self, out: *mut AppBroadcastTerminationReason) -> HRESULT, fn get_TerminationReasonPlugInSpecific(&self, out: *mut u32) -> HRESULT, - fn add_ViewerCountChanged(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ViewerCountChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_MicrophoneCaptureStateChanged(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_MicrophoneCaptureStateChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_CameraCaptureStateChanged(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CameraCaptureStateChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PlugInStateChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PlugInStateChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_StreamStateChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StreamStateChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_CaptureTargetClosed(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CaptureTargetClosed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ViewerCountChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ViewerCountChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_MicrophoneCaptureStateChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_MicrophoneCaptureStateChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_CameraCaptureStateChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CameraCaptureStateChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PlugInStateChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PlugInStateChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_StreamStateChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StreamStateChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_CaptureTargetClosed(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CaptureTargetClosed(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IAppBroadcastState { - #[inline] pub unsafe fn get_is_capture_target_running(&self) -> Result { + #[inline] pub fn get_is_capture_target_running(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCaptureTargetRunning)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_viewer_count(&self) -> Result { + }} + #[inline] pub fn get_viewer_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ViewerCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_should_capture_microphone(&self) -> Result { + }} + #[inline] pub fn get_should_capture_microphone(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ShouldCaptureMicrophone)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_should_capture_microphone(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_should_capture_microphone(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ShouldCaptureMicrophone)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn restart_microphone_capture(&self) -> Result<()> { + }} + #[inline] pub fn restart_microphone_capture(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RestartMicrophoneCapture)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_should_capture_camera(&self) -> Result { + }} + #[inline] pub fn get_should_capture_camera(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ShouldCaptureCamera)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_should_capture_camera(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_should_capture_camera(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ShouldCaptureCamera)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn restart_camera_capture(&self) -> Result<()> { + }} + #[inline] pub fn restart_camera_capture(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RestartCameraCapture)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_encoded_video_size(&self) -> Result { + }} + #[inline] pub fn get_encoded_video_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EncodedVideoSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_microphone_capture_state(&self) -> Result { + }} + #[inline] pub fn get_microphone_capture_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MicrophoneCaptureState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_microphone_capture_error(&self) -> Result { + }} + #[inline] pub fn get_microphone_capture_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MicrophoneCaptureError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_camera_capture_state(&self) -> Result { + }} + #[inline] pub fn get_camera_capture_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CameraCaptureState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_camera_capture_error(&self) -> Result { + }} + #[inline] pub fn get_camera_capture_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CameraCaptureError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_stream_state(&self) -> Result { + }} + #[inline] pub fn get_stream_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StreamState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_plug_in_state(&self) -> Result { + }} + #[inline] pub fn get_plug_in_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PlugInState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_oauth_request_uri(&self) -> Result> { + }} + #[inline] pub fn get_oauth_request_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OAuthRequestUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_oauth_callback_uri(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_oauth_callback_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OAuthCallbackUri)(self 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 get_authentication_result(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-security")] #[inline] pub fn get_authentication_result(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AuthenticationResult)(self 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 set_authentication_result(&self, value: &super::super::security::authentication::web::WebAuthenticationResult) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-security")] #[inline] pub fn set_authentication_result(&self, value: &super::super::security::authentication::web::WebAuthenticationResult) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AuthenticationResult)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_sign_in_state(&self, value: AppBroadcastSignInState) -> Result<()> { + }} + #[inline] pub fn set_sign_in_state(&self, value: AppBroadcastSignInState) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SignInState)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_sign_in_state(&self) -> Result { + }} + #[inline] pub fn get_sign_in_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SignInState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_termination_reason(&self) -> Result { + }} + #[inline] pub fn get_termination_reason(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TerminationReason)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_termination_reason_plug_in_specific(&self) -> Result { + }} + #[inline] pub fn get_termination_reason_plug_in_specific(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TerminationReasonPlugInSpecific)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_viewer_count_changed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_viewer_count_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ViewerCountChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_viewer_count_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_viewer_count_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ViewerCountChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_microphone_capture_state_changed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_microphone_capture_state_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_MicrophoneCaptureStateChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_microphone_capture_state_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_microphone_capture_state_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_MicrophoneCaptureStateChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_camera_capture_state_changed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_camera_capture_state_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CameraCaptureStateChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_camera_capture_state_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_camera_capture_state_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CameraCaptureStateChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_plug_in_state_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_plug_in_state_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PlugInStateChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_plug_in_state_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_plug_in_state_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PlugInStateChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_stream_state_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_stream_state_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StreamStateChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_stream_state_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_stream_state_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StreamStateChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_capture_target_closed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_capture_target_closed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CaptureTargetClosed)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_capture_target_closed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_capture_target_closed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CaptureTargetClosed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AppBroadcastState: IAppBroadcastState} DEFINE_IID!(IID_IAppBroadcastStreamAudioFrame, 4020980424, 8634, 17727, 139, 183, 94, 147, 138, 46, 154, 116); @@ -2774,52 +2774,52 @@ RT_INTERFACE!{interface IAppBroadcastStreamAudioFrame(IAppBroadcastStreamAudioFr #[cfg(feature="windows-storage")] fn get_AudioBuffer(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT }} impl IAppBroadcastStreamAudioFrame { - #[inline] pub unsafe fn get_audio_header(&self) -> Result> { + #[inline] pub fn get_audio_header(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioHeader)(self 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_audio_buffer(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_audio_buffer(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioBuffer)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppBroadcastStreamAudioFrame: IAppBroadcastStreamAudioFrame} DEFINE_IID!(IID_IAppBroadcastStreamAudioHeader, 3206653296, 27512, 16918, 159, 7, 90, 255, 82, 86, 241, 183); RT_INTERFACE!{interface IAppBroadcastStreamAudioHeader(IAppBroadcastStreamAudioHeaderVtbl): IInspectable(IInspectableVtbl) [IID_IAppBroadcastStreamAudioHeader] { - fn get_AbsoluteTimestamp(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_RelativeTimestamp(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn get_Duration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_AbsoluteTimestamp(&self, out: *mut foundation::DateTime) -> HRESULT, + fn get_RelativeTimestamp(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_Duration(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn get_HasDiscontinuity(&self, out: *mut bool) -> HRESULT, fn get_FrameId(&self, out: *mut u64) -> HRESULT }} impl IAppBroadcastStreamAudioHeader { - #[inline] pub unsafe fn get_absolute_timestamp(&self) -> Result { + #[inline] pub fn get_absolute_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AbsoluteTimestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_relative_timestamp(&self) -> Result { + }} + #[inline] pub fn get_relative_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RelativeTimestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_duration(&self) -> Result { + }} + #[inline] pub fn get_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Duration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_discontinuity(&self) -> Result { + }} + #[inline] pub fn get_has_discontinuity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasDiscontinuity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_frame_id(&self) -> Result { + }} + #[inline] pub fn get_frame_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FrameId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppBroadcastStreamAudioHeader: IAppBroadcastStreamAudioHeader} DEFINE_IID!(IID_IAppBroadcastStreamReader, 3006840057, 13156, 17504, 181, 241, 60, 194, 121, 106, 138, 162); @@ -2834,75 +2834,75 @@ RT_INTERFACE!{interface IAppBroadcastStreamReader(IAppBroadcastStreamReaderVtbl) fn get_VideoHeight(&self, out: *mut u32) -> HRESULT, fn get_VideoBitrate(&self, out: *mut u32) -> HRESULT, fn TryGetNextVideoFrame(&self, out: *mut *mut AppBroadcastStreamVideoFrame) -> HRESULT, - fn add_AudioFrameArrived(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AudioFrameArrived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_VideoFrameArrived(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_VideoFrameArrived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_AudioFrameArrived(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AudioFrameArrived(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_VideoFrameArrived(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_VideoFrameArrived(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IAppBroadcastStreamReader { - #[inline] pub unsafe fn get_audio_channels(&self) -> Result { + #[inline] pub fn get_audio_channels(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AudioChannels)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_sample_rate(&self) -> Result { + }} + #[inline] pub fn get_audio_sample_rate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AudioSampleRate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_audio_aac_sequence(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_audio_aac_sequence(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioAacSequence)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_bitrate(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_audio_bitrate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AudioBitrate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn try_get_next_audio_frame(&self) -> Result> { + }} + #[inline] pub fn try_get_next_audio_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetNextAudioFrame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_width(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_video_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VideoWidth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_height(&self) -> Result { + }} + #[inline] pub fn get_video_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VideoHeight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_bitrate(&self) -> Result { + }} + #[inline] pub fn get_video_bitrate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VideoBitrate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn try_get_next_video_frame(&self) -> Result> { + }} + #[inline] pub fn try_get_next_video_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetNextVideoFrame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_audio_frame_arrived(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_audio_frame_arrived(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AudioFrameArrived)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_audio_frame_arrived(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_audio_frame_arrived(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AudioFrameArrived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_video_frame_arrived(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_video_frame_arrived(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_VideoFrameArrived)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_video_frame_arrived(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_video_frame_arrived(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_VideoFrameArrived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AppBroadcastStreamReader: IAppBroadcastStreamReader} RT_ENUM! { enum AppBroadcastStreamState: i32 { @@ -2913,11 +2913,11 @@ RT_INTERFACE!{interface IAppBroadcastStreamStateChangedEventArgs(IAppBroadcastSt fn get_StreamState(&self, out: *mut AppBroadcastStreamState) -> HRESULT }} impl IAppBroadcastStreamStateChangedEventArgs { - #[inline] pub unsafe fn get_stream_state(&self) -> Result { + #[inline] pub fn get_stream_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StreamState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppBroadcastStreamStateChangedEventArgs: IAppBroadcastStreamStateChangedEventArgs} DEFINE_IID!(IID_IAppBroadcastStreamVideoFrame, 261607211, 51684, 20104, 129, 148, 216, 20, 203, 213, 133, 216); @@ -2926,58 +2926,58 @@ RT_INTERFACE!{interface IAppBroadcastStreamVideoFrame(IAppBroadcastStreamVideoFr #[cfg(feature="windows-storage")] fn get_VideoBuffer(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT }} impl IAppBroadcastStreamVideoFrame { - #[inline] pub unsafe fn get_video_header(&self) -> Result> { + #[inline] pub fn get_video_header(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoHeader)(self 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_video_buffer(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_video_buffer(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoBuffer)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppBroadcastStreamVideoFrame: IAppBroadcastStreamVideoFrame} DEFINE_IID!(IID_IAppBroadcastStreamVideoHeader, 194952910, 32306, 17197, 140, 162, 54, 191, 16, 185, 244, 98); RT_INTERFACE!{interface IAppBroadcastStreamVideoHeader(IAppBroadcastStreamVideoHeaderVtbl): IInspectable(IInspectableVtbl) [IID_IAppBroadcastStreamVideoHeader] { - fn get_AbsoluteTimestamp(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_RelativeTimestamp(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn get_Duration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_AbsoluteTimestamp(&self, out: *mut foundation::DateTime) -> HRESULT, + fn get_RelativeTimestamp(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_Duration(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn get_IsKeyFrame(&self, out: *mut bool) -> HRESULT, fn get_HasDiscontinuity(&self, out: *mut bool) -> HRESULT, fn get_FrameId(&self, out: *mut u64) -> HRESULT }} impl IAppBroadcastStreamVideoHeader { - #[inline] pub unsafe fn get_absolute_timestamp(&self) -> Result { + #[inline] pub fn get_absolute_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AbsoluteTimestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_relative_timestamp(&self) -> Result { + }} + #[inline] pub fn get_relative_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RelativeTimestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_duration(&self) -> Result { + }} + #[inline] pub fn get_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Duration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_key_frame(&self) -> Result { + }} + #[inline] pub fn get_is_key_frame(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsKeyFrame)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_discontinuity(&self) -> Result { + }} + #[inline] pub fn get_has_discontinuity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasDiscontinuity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_frame_id(&self) -> Result { + }} + #[inline] pub fn get_frame_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FrameId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppBroadcastStreamVideoHeader: IAppBroadcastStreamVideoHeader} RT_ENUM! { enum AppBroadcastTerminationReason: i32 { @@ -2988,11 +2988,11 @@ RT_INTERFACE!{interface IAppBroadcastTriggerDetails(IAppBroadcastTriggerDetailsV fn get_BackgroundService(&self, out: *mut *mut AppBroadcastBackgroundService) -> HRESULT }} impl IAppBroadcastTriggerDetails { - #[inline] pub unsafe fn get_background_service(&self) -> Result> { + #[inline] pub fn get_background_service(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BackgroundService)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppBroadcastTriggerDetails: IAppBroadcastTriggerDetails} RT_ENUM! { enum AppBroadcastVideoEncodingBitrateMode: i32 { @@ -3006,51 +3006,51 @@ RT_INTERFACE!{interface IAppBroadcastViewerCountChangedEventArgs(IAppBroadcastVi fn get_ViewerCount(&self, out: *mut u32) -> HRESULT }} impl IAppBroadcastViewerCountChangedEventArgs { - #[inline] pub unsafe fn get_viewer_count(&self) -> Result { + #[inline] pub fn get_viewer_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ViewerCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppBroadcastViewerCountChangedEventArgs: IAppBroadcastViewerCountChangedEventArgs} 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(&self, out: *mut bool) -> HRESULT, fn get_IsCapturingVideo(&self, out: *mut bool) -> HRESULT, - fn add_CapturingChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CapturingChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_CapturingChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CapturingChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IAppCapture { - #[inline] pub unsafe fn get_is_capturing_audio(&self) -> Result { + #[inline] pub fn get_is_capturing_audio(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCapturingAudio)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_capturing_video(&self) -> Result { + }} + #[inline] pub fn get_is_capturing_video(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCapturingVideo)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_capturing_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_capturing_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CapturingChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_capturing_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_capturing_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CapturingChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AppCapture: IAppCapture} impl RtActivatable for AppCapture {} impl RtActivatable for AppCapture {} impl AppCapture { - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} - #[inline] pub fn set_allowed_async(allowed: bool) -> Result> { unsafe { + } + #[inline] pub fn set_allowed_async(allowed: bool) -> Result> { >::get_activation_factory().set_allowed_async(allowed) - }} + } } DEFINE_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]) [CLSID_AppCapture]); DEFINE_IID!(IID_IAppCaptureAlternateShortcutKeys, 434692335, 9068, 16633, 179, 143, 155, 125, 214, 93, 28, 204); @@ -3077,96 +3077,96 @@ RT_INTERFACE!{interface IAppCaptureAlternateShortcutKeys(IAppCaptureAlternateSho #[cfg(feature="windows-system")] fn get_ToggleRecordingIndicatorKeyModifiers(&self, out: *mut super::super::system::VirtualKeyModifiers) -> HRESULT }} impl IAppCaptureAlternateShortcutKeys { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn set_toggle_game_bar_key(&self, value: super::super::system::VirtualKey) -> Result<()> { + #[cfg(feature="windows-system")] #[inline] pub fn set_toggle_game_bar_key(&self, value: super::super::system::VirtualKey) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ToggleGameBarKey)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_toggle_game_bar_key(&self) -> Result { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_toggle_game_bar_key(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ToggleGameBarKey)(self as *const _ as *mut _, &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(&self, value: super::super::system::VirtualKeyModifiers) -> Result<()> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn set_toggle_game_bar_key_modifiers(&self, value: super::super::system::VirtualKeyModifiers) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ToggleGameBarKeyModifiers)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_toggle_game_bar_key_modifiers(&self) -> Result { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_toggle_game_bar_key_modifiers(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ToggleGameBarKeyModifiers)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn set_save_historical_video_key(&self, value: super::super::system::VirtualKey) -> Result<()> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn set_save_historical_video_key(&self, value: super::super::system::VirtualKey) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SaveHistoricalVideoKey)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_save_historical_video_key(&self) -> Result { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_save_historical_video_key(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SaveHistoricalVideoKey)(self as *const _ as *mut _, &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(&self, value: super::super::system::VirtualKeyModifiers) -> Result<()> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn set_save_historical_video_key_modifiers(&self, value: super::super::system::VirtualKeyModifiers) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SaveHistoricalVideoKeyModifiers)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_save_historical_video_key_modifiers(&self) -> Result { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_save_historical_video_key_modifiers(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SaveHistoricalVideoKeyModifiers)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn set_toggle_recording_key(&self, value: super::super::system::VirtualKey) -> Result<()> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn set_toggle_recording_key(&self, value: super::super::system::VirtualKey) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ToggleRecordingKey)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_toggle_recording_key(&self) -> Result { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_toggle_recording_key(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ToggleRecordingKey)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn set_toggle_recording_key_modifiers(&self, value: super::super::system::VirtualKeyModifiers) -> Result<()> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn set_toggle_recording_key_modifiers(&self, value: super::super::system::VirtualKeyModifiers) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ToggleRecordingKeyModifiers)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_toggle_recording_key_modifiers(&self) -> Result { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_toggle_recording_key_modifiers(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ToggleRecordingKeyModifiers)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn set_take_screenshot_key(&self, value: super::super::system::VirtualKey) -> Result<()> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn set_take_screenshot_key(&self, value: super::super::system::VirtualKey) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TakeScreenshotKey)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_take_screenshot_key(&self) -> Result { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_take_screenshot_key(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TakeScreenshotKey)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn set_take_screenshot_key_modifiers(&self, value: super::super::system::VirtualKeyModifiers) -> Result<()> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn set_take_screenshot_key_modifiers(&self, value: super::super::system::VirtualKeyModifiers) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TakeScreenshotKeyModifiers)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_take_screenshot_key_modifiers(&self) -> Result { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_take_screenshot_key_modifiers(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TakeScreenshotKeyModifiers)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn set_toggle_recording_indicator_key(&self, value: super::super::system::VirtualKey) -> Result<()> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn set_toggle_recording_indicator_key(&self, value: super::super::system::VirtualKey) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ToggleRecordingIndicatorKey)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_toggle_recording_indicator_key(&self) -> Result { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_toggle_recording_indicator_key(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ToggleRecordingIndicatorKey)(self as *const _ as *mut _, &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(&self, value: super::super::system::VirtualKeyModifiers) -> Result<()> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn set_toggle_recording_indicator_key_modifiers(&self, value: super::super::system::VirtualKeyModifiers) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ToggleRecordingIndicatorKeyModifiers)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_toggle_recording_indicator_key_modifiers(&self) -> Result { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_toggle_recording_indicator_key_modifiers(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ToggleRecordingIndicatorKeyModifiers)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppCaptureAlternateShortcutKeys: IAppCaptureAlternateShortcutKeys} DEFINE_IID!(IID_IAppCaptureAlternateShortcutKeys2, 3278278800, 56599, 18416, 149, 229, 206, 66, 40, 108, 243, 56); @@ -3177,24 +3177,24 @@ RT_INTERFACE!{interface IAppCaptureAlternateShortcutKeys2(IAppCaptureAlternateSh #[cfg(feature="windows-system")] fn get_ToggleMicrophoneCaptureKeyModifiers(&self, out: *mut super::super::system::VirtualKeyModifiers) -> HRESULT }} impl IAppCaptureAlternateShortcutKeys2 { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn set_toggle_microphone_capture_key(&self, value: super::super::system::VirtualKey) -> Result<()> { + #[cfg(feature="windows-system")] #[inline] pub fn set_toggle_microphone_capture_key(&self, value: super::super::system::VirtualKey) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ToggleMicrophoneCaptureKey)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_toggle_microphone_capture_key(&self) -> Result { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_toggle_microphone_capture_key(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ToggleMicrophoneCaptureKey)(self as *const _ as *mut _, &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(&self, value: super::super::system::VirtualKeyModifiers) -> Result<()> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn set_toggle_microphone_capture_key_modifiers(&self, value: super::super::system::VirtualKeyModifiers) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ToggleMicrophoneCaptureKeyModifiers)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_toggle_microphone_capture_key_modifiers(&self) -> Result { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_toggle_microphone_capture_key_modifiers(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ToggleMicrophoneCaptureKeyModifiers)(self as *const _ as *mut _, &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] { @@ -3208,53 +3208,53 @@ RT_INTERFACE!{interface IAppCaptureAlternateShortcutKeys3(IAppCaptureAlternateSh #[cfg(feature="windows-system")] fn get_ToggleBroadcastKeyModifiers(&self, out: *mut super::super::system::VirtualKeyModifiers) -> HRESULT }} impl IAppCaptureAlternateShortcutKeys3 { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn set_toggle_camera_capture_key(&self, value: super::super::system::VirtualKey) -> Result<()> { + #[cfg(feature="windows-system")] #[inline] pub fn set_toggle_camera_capture_key(&self, value: super::super::system::VirtualKey) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ToggleCameraCaptureKey)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_toggle_camera_capture_key(&self) -> Result { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_toggle_camera_capture_key(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ToggleCameraCaptureKey)(self as *const _ as *mut _, &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(&self, value: super::super::system::VirtualKeyModifiers) -> Result<()> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn set_toggle_camera_capture_key_modifiers(&self, value: super::super::system::VirtualKeyModifiers) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ToggleCameraCaptureKeyModifiers)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_toggle_camera_capture_key_modifiers(&self) -> Result { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_toggle_camera_capture_key_modifiers(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ToggleCameraCaptureKeyModifiers)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn set_toggle_broadcast_key(&self, value: super::super::system::VirtualKey) -> Result<()> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn set_toggle_broadcast_key(&self, value: super::super::system::VirtualKey) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ToggleBroadcastKey)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_toggle_broadcast_key(&self) -> Result { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_toggle_broadcast_key(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ToggleBroadcastKey)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn set_toggle_broadcast_key_modifiers(&self, value: super::super::system::VirtualKeyModifiers) -> Result<()> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn set_toggle_broadcast_key_modifiers(&self, value: super::super::system::VirtualKeyModifiers) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ToggleBroadcastKeyModifiers)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_toggle_broadcast_key_modifiers(&self) -> Result { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_toggle_broadcast_key_modifiers(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ToggleBroadcastKeyModifiers)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IAppCaptureDurationGeneratedEventArgs, 3254081083, 65441, 17609, 151, 95, 39, 251, 235, 85, 59, 53); RT_INTERFACE!{interface IAppCaptureDurationGeneratedEventArgs(IAppCaptureDurationGeneratedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAppCaptureDurationGeneratedEventArgs] { - fn get_Duration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + fn get_Duration(&self, out: *mut foundation::TimeSpan) -> HRESULT }} impl IAppCaptureDurationGeneratedEventArgs { - #[inline] pub unsafe fn get_duration(&self) -> Result { + #[inline] pub fn get_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Duration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppCaptureDurationGeneratedEventArgs: IAppCaptureDurationGeneratedEventArgs} DEFINE_IID!(IID_IAppCaptureFileGeneratedEventArgs, 1099561972, 18014, 17855, 144, 127, 22, 91, 63, 178, 55, 88); @@ -3262,11 +3262,11 @@ RT_INTERFACE!{interface IAppCaptureFileGeneratedEventArgs(IAppCaptureFileGenerat #[cfg(feature="windows-storage")] fn get_File(&self, out: *mut *mut super::super::storage::StorageFile) -> HRESULT }} impl IAppCaptureFileGeneratedEventArgs { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_file(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_file(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_File)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppCaptureFileGeneratedEventArgs: IAppCaptureFileGeneratedEventArgs} RT_ENUM! { enum AppCaptureHistoricalBufferLengthUnit: i32 { @@ -3275,12 +3275,12 @@ RT_ENUM! { enum AppCaptureHistoricalBufferLengthUnit: i32 { RT_CLASS!{static class AppCaptureManager} impl RtActivatable for AppCaptureManager {} impl AppCaptureManager { - #[inline] pub fn get_current_settings() -> Result> { unsafe { + #[inline] pub fn get_current_settings() -> Result>> { >::get_activation_factory().get_current_settings() - }} - #[inline] pub fn apply_settings(appCaptureSettings: &AppCaptureSettings) -> Result<()> { unsafe { + } + #[inline] pub fn apply_settings(appCaptureSettings: &AppCaptureSettings) -> Result<()> { >::get_activation_factory().apply_settings(appCaptureSettings) - }} + } } DEFINE_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]) [CLSID_AppCaptureManager]); DEFINE_IID!(IID_IAppCaptureManagerStatics, 2107522727, 25218, 18229, 141, 78, 170, 69, 249, 15, 103, 35); @@ -3289,15 +3289,15 @@ RT_INTERFACE!{static interface IAppCaptureManagerStatics(IAppCaptureManagerStati fn ApplySettings(&self, appCaptureSettings: *mut AppCaptureSettings) -> HRESULT }} impl IAppCaptureManagerStatics { - #[inline] pub unsafe fn get_current_settings(&self) -> Result> { + #[inline] pub fn get_current_settings(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentSettings)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn apply_settings(&self, appCaptureSettings: &AppCaptureSettings) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn apply_settings(&self, appCaptureSettings: &AppCaptureSettings) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ApplySettings)(self as *const _ as *mut _, appCaptureSettings as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum AppCaptureMetadataPriority: i32 { Informational (AppCaptureMetadataPriority_Informational) = 0, Important (AppCaptureMetadataPriority_Important) = 1, @@ -3313,56 +3313,56 @@ RT_INTERFACE!{interface IAppCaptureMetadataWriter(IAppCaptureMetadataWriterVtbl) fn StopState(&self, name: HSTRING) -> HRESULT, fn StopAllStates(&self) -> HRESULT, fn get_RemainingStorageBytesAvailable(&self, out: *mut u64) -> HRESULT, - fn add_MetadataPurged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_MetadataPurged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_MetadataPurged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_MetadataPurged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IAppCaptureMetadataWriter { - #[inline] pub unsafe fn add_string_event(&self, name: &HStringArg, value: &HStringArg, priority: AppCaptureMetadataPriority) -> Result<()> { + #[inline] pub fn add_string_event(&self, name: &HStringArg, value: &HStringArg, priority: AppCaptureMetadataPriority) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddStringEvent)(self as *const _ as *mut _, name.get(), value.get(), priority); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_int32_event(&self, name: &HStringArg, value: i32, priority: AppCaptureMetadataPriority) -> Result<()> { + }} + #[inline] pub fn add_int32_event(&self, name: &HStringArg, value: i32, priority: AppCaptureMetadataPriority) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddInt32Event)(self as *const _ as *mut _, name.get(), value, priority); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_double_event(&self, name: &HStringArg, value: f64, priority: AppCaptureMetadataPriority) -> Result<()> { + }} + #[inline] pub fn add_double_event(&self, name: &HStringArg, value: f64, priority: AppCaptureMetadataPriority) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddDoubleEvent)(self as *const _ as *mut _, name.get(), value, priority); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start_string_state(&self, name: &HStringArg, value: &HStringArg, priority: AppCaptureMetadataPriority) -> Result<()> { + }} + #[inline] pub fn start_string_state(&self, name: &HStringArg, value: &HStringArg, priority: AppCaptureMetadataPriority) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StartStringState)(self as *const _ as *mut _, name.get(), value.get(), priority); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start_int32_state(&self, name: &HStringArg, value: i32, priority: AppCaptureMetadataPriority) -> Result<()> { + }} + #[inline] pub fn start_int32_state(&self, name: &HStringArg, value: i32, priority: AppCaptureMetadataPriority) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StartInt32State)(self as *const _ as *mut _, name.get(), value, priority); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start_double_state(&self, name: &HStringArg, value: f64, priority: AppCaptureMetadataPriority) -> Result<()> { + }} + #[inline] pub fn start_double_state(&self, name: &HStringArg, value: f64, priority: AppCaptureMetadataPriority) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StartDoubleState)(self as *const _ as *mut _, name.get(), value, priority); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop_state(&self, name: &HStringArg) -> Result<()> { + }} + #[inline] pub fn stop_state(&self, name: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StopState)(self as *const _ as *mut _, name.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop_all_states(&self) -> Result<()> { + }} + #[inline] pub fn stop_all_states(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StopAllStates)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_remaining_storage_bytes_available(&self) -> Result { + }} + #[inline] pub fn get_remaining_storage_bytes_available(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RemainingStorageBytesAvailable)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_metadata_purged(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_metadata_purged(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_MetadataPurged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_metadata_purged(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_metadata_purged(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_MetadataPurged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AppCaptureMetadataWriter: IAppCaptureMetadataWriter} impl RtActivatable for AppCaptureMetadataWriter {} @@ -3376,16 +3376,16 @@ RT_INTERFACE!{interface IAppCaptureMicrophoneCaptureStateChangedEventArgs(IAppCa fn get_ErrorCode(&self, out: *mut u32) -> HRESULT }} impl IAppCaptureMicrophoneCaptureStateChangedEventArgs { - #[inline] pub unsafe fn get_state(&self) -> Result { + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_error_code(&self) -> Result { + }} + #[inline] pub fn get_error_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ErrorCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppCaptureMicrophoneCaptureStateChangedEventArgs: IAppCaptureMicrophoneCaptureStateChangedEventArgs} RT_ENUM! { enum AppCaptureRecordingState: i32 { @@ -3397,121 +3397,121 @@ RT_INTERFACE!{interface IAppCaptureRecordingStateChangedEventArgs(IAppCaptureRec fn get_ErrorCode(&self, out: *mut u32) -> HRESULT }} impl IAppCaptureRecordingStateChangedEventArgs { - #[inline] pub unsafe fn get_state(&self) -> Result { + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_error_code(&self) -> Result { + }} + #[inline] pub fn get_error_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ErrorCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppCaptureRecordingStateChangedEventArgs: IAppCaptureRecordingStateChangedEventArgs} DEFINE_IID!(IID_IAppCaptureRecordOperation, 3328188585, 5432, 18780, 155, 187, 43, 168, 112, 236, 88, 97); RT_INTERFACE!{interface IAppCaptureRecordOperation(IAppCaptureRecordOperationVtbl): IInspectable(IInspectableVtbl) [IID_IAppCaptureRecordOperation] { fn StopRecording(&self) -> HRESULT, fn get_State(&self, out: *mut AppCaptureRecordingState) -> HRESULT, - fn get_ErrorCode(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_Duration(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_ErrorCode(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_Duration(&self, out: *mut *mut foundation::IReference) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy4(&self) -> (), #[cfg(feature="windows-storage")] fn get_File(&self, out: *mut *mut super::super::storage::StorageFile) -> HRESULT, - fn get_IsFileTruncated(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn add_StateChanged(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StateChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_DurationGenerated(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DurationGenerated(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_FileGenerated(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_FileGenerated(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn get_IsFileTruncated(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn add_StateChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StateChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_DurationGenerated(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DurationGenerated(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_FileGenerated(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_FileGenerated(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IAppCaptureRecordOperation { - #[inline] pub unsafe fn stop_recording(&self) -> Result<()> { + #[inline] pub fn stop_recording(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StopRecording)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_state(&self) -> Result { + }} + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_error_code(&self) -> Result>> { + }} + #[inline] pub fn get_error_code(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ErrorCode)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_duration(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_duration(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Duration)(self 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_file(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_file(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_File)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_file_truncated(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_file_truncated(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsFileTruncated)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_state_changed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_state_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StateChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_state_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_state_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StateChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_duration_generated(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_duration_generated(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DurationGenerated)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_duration_generated(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_duration_generated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DurationGenerated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_file_generated(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_file_generated(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_FileGenerated)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_file_generated(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_file_generated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_FileGenerated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AppCaptureRecordOperation: IAppCaptureRecordOperation} DEFINE_IID!(IID_IAppCaptureServices, 1157546165, 13557, 20248, 174, 140, 185, 18, 58, 187, 252, 13); RT_INTERFACE!{interface IAppCaptureServices(IAppCaptureServicesVtbl): IInspectable(IInspectableVtbl) [IID_IAppCaptureServices] { fn Record(&self, out: *mut *mut AppCaptureRecordOperation) -> HRESULT, - fn RecordTimeSpan(&self, startTime: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan, out: *mut *mut AppCaptureRecordOperation) -> HRESULT, + fn RecordTimeSpan(&self, startTime: foundation::DateTime, duration: foundation::TimeSpan, out: *mut *mut AppCaptureRecordOperation) -> HRESULT, fn get_CanCapture(&self, out: *mut bool) -> HRESULT, fn get_State(&self, out: *mut *mut AppCaptureState) -> HRESULT }} impl IAppCaptureServices { - #[inline] pub unsafe fn record(&self) -> Result> { + #[inline] pub fn record(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Record)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn record_time_span(&self, startTime: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn record_time_span(&self, startTime: foundation::DateTime, duration: foundation::TimeSpan) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RecordTimeSpan)(self as *const _ as *mut _, startTime, duration, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_capture(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_can_capture(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanCapture)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_state(&self) -> Result> { + }} + #[inline] pub fn get_state(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppCaptureServices: IAppCaptureServices} DEFINE_IID!(IID_IAppCaptureSettings, 342375046, 34823, 18643, 136, 58, 151, 14, 228, 83, 42, 57); @@ -3540,8 +3540,8 @@ RT_INTERFACE!{interface IAppCaptureSettings(IAppCaptureSettingsVtbl): IInspectab fn get_IsHistoricalCaptureOnBatteryAllowed(&self, out: *mut bool) -> HRESULT, fn put_IsHistoricalCaptureOnWirelessDisplayAllowed(&self, value: bool) -> HRESULT, fn get_IsHistoricalCaptureOnWirelessDisplayAllowed(&self, out: *mut bool) -> HRESULT, - fn put_MaximumRecordLength(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_MaximumRecordLength(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_MaximumRecordLength(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_MaximumRecordLength(&self, out: *mut foundation::TimeSpan) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy24(&self) -> (), #[cfg(feature="windows-storage")] fn put_ScreenshotDestinationFolder(&self, value: *mut super::super::storage::StorageFolder) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy25(&self) -> (), @@ -3558,170 +3558,170 @@ RT_INTERFACE!{interface IAppCaptureSettings(IAppCaptureSettingsVtbl): IInspectab fn get_HasHardwareEncoder(&self, out: *mut bool) -> HRESULT }} impl IAppCaptureSettings { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn set_app_capture_destination_folder(&self, value: &super::super::storage::StorageFolder) -> Result<()> { + #[cfg(feature="windows-storage")] #[inline] pub fn set_app_capture_destination_folder(&self, value: &super::super::storage::StorageFolder) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AppCaptureDestinationFolder)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_app_capture_destination_folder(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppCaptureDestinationFolder)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_audio_encoding_bitrate(&self, value: u32) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_audio_encoding_bitrate(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AudioEncodingBitrate)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_encoding_bitrate(&self) -> Result { + }} + #[inline] pub fn get_audio_encoding_bitrate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AudioEncodingBitrate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_audio_capture_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_audio_capture_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsAudioCaptureEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_audio_capture_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_audio_capture_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsAudioCaptureEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_custom_video_encoding_bitrate(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_custom_video_encoding_bitrate(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CustomVideoEncodingBitrate)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_custom_video_encoding_bitrate(&self) -> Result { + }} + #[inline] pub fn get_custom_video_encoding_bitrate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CustomVideoEncodingBitrate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_custom_video_encoding_height(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_custom_video_encoding_height(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CustomVideoEncodingHeight)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_custom_video_encoding_height(&self) -> Result { + }} + #[inline] pub fn get_custom_video_encoding_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CustomVideoEncodingHeight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_custom_video_encoding_width(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_custom_video_encoding_width(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CustomVideoEncodingWidth)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_custom_video_encoding_width(&self) -> Result { + }} + #[inline] pub fn get_custom_video_encoding_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CustomVideoEncodingWidth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_historical_buffer_length(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_historical_buffer_length(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_HistoricalBufferLength)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_historical_buffer_length(&self) -> Result { + }} + #[inline] pub fn get_historical_buffer_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HistoricalBufferLength)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_historical_buffer_length_unit(&self, value: AppCaptureHistoricalBufferLengthUnit) -> Result<()> { + }} + #[inline] pub fn set_historical_buffer_length_unit(&self, value: AppCaptureHistoricalBufferLengthUnit) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_HistoricalBufferLengthUnit)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_historical_buffer_length_unit(&self) -> Result { + }} + #[inline] pub fn get_historical_buffer_length_unit(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HistoricalBufferLengthUnit)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_historical_capture_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_historical_capture_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsHistoricalCaptureEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_historical_capture_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_historical_capture_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsHistoricalCaptureEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_historical_capture_on_battery_allowed(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_historical_capture_on_battery_allowed(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsHistoricalCaptureOnBatteryAllowed)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_historical_capture_on_battery_allowed(&self) -> Result { + }} + #[inline] pub fn get_is_historical_capture_on_battery_allowed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsHistoricalCaptureOnBatteryAllowed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_historical_capture_on_wireless_display_allowed(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_historical_capture_on_wireless_display_allowed(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsHistoricalCaptureOnWirelessDisplayAllowed)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_historical_capture_on_wireless_display_allowed(&self) -> Result { + }} + #[inline] pub fn get_is_historical_capture_on_wireless_display_allowed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsHistoricalCaptureOnWirelessDisplayAllowed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_maximum_record_length(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_maximum_record_length(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaximumRecordLength)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_maximum_record_length(&self) -> Result { + }} + #[inline] pub fn get_maximum_record_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaximumRecordLength)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn set_screenshot_destination_folder(&self, value: &super::super::storage::StorageFolder) -> Result<()> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_screenshot_destination_folder(&self, value: &super::super::storage::StorageFolder) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ScreenshotDestinationFolder)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_screenshot_destination_folder(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ScreenshotDestinationFolder)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_video_encoding_bitrate_mode(&self, value: AppCaptureVideoEncodingBitrateMode) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_video_encoding_bitrate_mode(&self, value: AppCaptureVideoEncodingBitrateMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_VideoEncodingBitrateMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_encoding_bitrate_mode(&self) -> Result { + }} + #[inline] pub fn get_video_encoding_bitrate_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VideoEncodingBitrateMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_video_encoding_resolution_mode(&self, value: AppCaptureVideoEncodingResolutionMode) -> Result<()> { + }} + #[inline] pub fn set_video_encoding_resolution_mode(&self, value: AppCaptureVideoEncodingResolutionMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_VideoEncodingResolutionMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_encoding_resolution_mode(&self) -> Result { + }} + #[inline] pub fn get_video_encoding_resolution_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VideoEncodingResolutionMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_app_capture_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_app_capture_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsAppCaptureEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_app_capture_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_app_capture_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsAppCaptureEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_cpu_constrained(&self) -> Result { + }} + #[inline] pub fn get_is_cpu_constrained(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCpuConstrained)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_disabled_by_policy(&self) -> Result { + }} + #[inline] pub fn get_is_disabled_by_policy(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDisabledByPolicy)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_memory_constrained(&self) -> Result { + }} + #[inline] pub fn get_is_memory_constrained(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsMemoryConstrained)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_hardware_encoder(&self) -> Result { + }} + #[inline] pub fn get_has_hardware_encoder(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasHardwareEncoder)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppCaptureSettings: IAppCaptureSettings} DEFINE_IID!(IID_IAppCaptureSettings2, 4239970023, 57963, 18287, 155, 26, 236, 52, 45, 42, 143, 222); @@ -3730,16 +3730,16 @@ RT_INTERFACE!{interface IAppCaptureSettings2(IAppCaptureSettings2Vtbl): IInspect fn get_AlternateShortcutKeys(&self, out: *mut *mut AppCaptureAlternateShortcutKeys) -> HRESULT }} impl IAppCaptureSettings2 { - #[inline] pub unsafe fn get_is_gpu_constrained(&self) -> Result { + #[inline] pub fn get_is_gpu_constrained(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsGpuConstrained)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_alternate_shortcut_keys(&self) -> Result> { + }} + #[inline] pub fn get_alternate_shortcut_keys(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AlternateShortcutKeys)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IAppCaptureSettings3, 2838823678, 35010, 17110, 170, 170, 64, 254, 255, 215, 90, 236); RT_INTERFACE!{interface IAppCaptureSettings3(IAppCaptureSettings3Vtbl): IInspectable(IInspectableVtbl) [IID_IAppCaptureSettings3] { @@ -3747,15 +3747,15 @@ RT_INTERFACE!{interface IAppCaptureSettings3(IAppCaptureSettings3Vtbl): IInspect fn get_IsMicrophoneCaptureEnabled(&self, out: *mut bool) -> HRESULT }} impl IAppCaptureSettings3 { - #[inline] pub unsafe fn set_is_microphone_capture_enabled(&self, value: bool) -> Result<()> { + #[inline] pub fn set_is_microphone_capture_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsMicrophoneCaptureEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_microphone_capture_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_microphone_capture_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsMicrophoneCaptureEnabled)(self as *const _ as *mut _, &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] { @@ -3769,42 +3769,42 @@ RT_INTERFACE!{interface IAppCaptureSettings4(IAppCaptureSettings4Vtbl): IInspect fn get_VideoEncodingFrameRateMode(&self, out: *mut AppCaptureVideoEncodingFrameRateMode) -> HRESULT }} impl IAppCaptureSettings4 { - #[inline] pub unsafe fn set_is_microphone_capture_enabled_by_default(&self, value: bool) -> Result<()> { + #[inline] pub fn set_is_microphone_capture_enabled_by_default(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsMicrophoneCaptureEnabledByDefault)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_microphone_capture_enabled_by_default(&self) -> Result { + }} + #[inline] pub fn get_is_microphone_capture_enabled_by_default(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsMicrophoneCaptureEnabledByDefault)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_system_audio_gain(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_system_audio_gain(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SystemAudioGain)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_system_audio_gain(&self) -> Result { + }} + #[inline] pub fn get_system_audio_gain(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SystemAudioGain)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_microphone_gain(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_microphone_gain(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MicrophoneGain)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_microphone_gain(&self) -> Result { + }} + #[inline] pub fn get_microphone_gain(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MicrophoneGain)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_video_encoding_frame_rate_mode(&self, value: AppCaptureVideoEncodingFrameRateMode) -> Result<()> { + }} + #[inline] pub fn set_video_encoding_frame_rate_mode(&self, value: AppCaptureVideoEncodingFrameRateMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_VideoEncodingFrameRateMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_encoding_frame_rate_mode(&self) -> Result { + }} + #[inline] pub fn get_video_encoding_frame_rate_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VideoEncodingFrameRateMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IAppCaptureSettings5, 411649314, 45288, 19360, 143, 19, 62, 170, 95, 164, 1, 59); RT_INTERFACE!{interface IAppCaptureSettings5(IAppCaptureSettings5Vtbl): IInspectable(IInspectableVtbl) [IID_IAppCaptureSettings5] { @@ -3814,24 +3814,24 @@ RT_INTERFACE!{interface IAppCaptureSettings5(IAppCaptureSettings5Vtbl): IInspect fn get_IsCursorImageCaptureEnabled(&self, out: *mut bool) -> HRESULT }} impl IAppCaptureSettings5 { - #[inline] pub unsafe fn set_is_echo_cancellation_enabled(&self, value: bool) -> Result<()> { + #[inline] pub fn set_is_echo_cancellation_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsEchoCancellationEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_echo_cancellation_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_echo_cancellation_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsEchoCancellationEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_cursor_image_capture_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_cursor_image_capture_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsCursorImageCaptureEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_cursor_image_capture_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_cursor_image_capture_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCursorImageCaptureEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IAppCaptureState, 1930642290, 54507, 17614, 149, 56, 70, 95, 80, 106, 196, 234); RT_INTERFACE!{interface IAppCaptureState(IAppCaptureStateVtbl): IInspectable(IInspectableVtbl) [IID_IAppCaptureState] { @@ -3842,63 +3842,63 @@ RT_INTERFACE!{interface IAppCaptureState(IAppCaptureStateVtbl): IInspectable(IIn fn RestartMicrophoneCapture(&self) -> HRESULT, fn get_MicrophoneCaptureState(&self, out: *mut AppCaptureMicrophoneCaptureState) -> HRESULT, fn get_MicrophoneCaptureError(&self, out: *mut u32) -> HRESULT, - fn add_MicrophoneCaptureStateChanged(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_MicrophoneCaptureStateChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_CaptureTargetClosed(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CaptureTargetClosed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_MicrophoneCaptureStateChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_MicrophoneCaptureStateChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_CaptureTargetClosed(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CaptureTargetClosed(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IAppCaptureState { - #[inline] pub unsafe fn get_is_target_running(&self) -> Result { + #[inline] pub fn get_is_target_running(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsTargetRunning)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_historical_capture_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_historical_capture_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsHistoricalCaptureEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_should_capture_microphone(&self) -> Result { + }} + #[inline] pub fn get_should_capture_microphone(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ShouldCaptureMicrophone)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_should_capture_microphone(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_should_capture_microphone(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ShouldCaptureMicrophone)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn restart_microphone_capture(&self) -> Result<()> { + }} + #[inline] pub fn restart_microphone_capture(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RestartMicrophoneCapture)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_microphone_capture_state(&self) -> Result { + }} + #[inline] pub fn get_microphone_capture_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MicrophoneCaptureState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_microphone_capture_error(&self) -> Result { + }} + #[inline] pub fn get_microphone_capture_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MicrophoneCaptureError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_microphone_capture_state_changed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_microphone_capture_state_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_MicrophoneCaptureStateChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_microphone_capture_state_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_microphone_capture_state_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_MicrophoneCaptureStateChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_capture_target_closed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_capture_target_closed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CaptureTargetClosed)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_capture_target_closed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_capture_target_closed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CaptureTargetClosed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AppCaptureState: IAppCaptureState} DEFINE_IID!(IID_IAppCaptureStatics, 4179811692, 2686, 20084, 139, 32, 156, 31, 144, 45, 8, 161); @@ -3906,22 +3906,22 @@ RT_INTERFACE!{static interface IAppCaptureStatics(IAppCaptureStaticsVtbl): IInsp fn GetForCurrentView(&self, out: *mut *mut AppCapture) -> HRESULT }} impl IAppCaptureStatics { - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IAppCaptureStatics2, 3000533460, 33644, 19876, 175, 215, 250, 204, 4, 30, 28, 243); RT_INTERFACE!{static interface IAppCaptureStatics2(IAppCaptureStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IAppCaptureStatics2] { - fn SetAllowedAsync(&self, allowed: bool, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn SetAllowedAsync(&self, allowed: bool, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IAppCaptureStatics2 { - #[inline] pub unsafe fn set_allowed_async(&self, allowed: bool) -> Result> { + #[inline] pub fn set_allowed_async(&self, allowed: bool) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetAllowedAsync)(self as *const _ as *mut _, allowed, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum AppCaptureVideoEncodingBitrateMode: i32 { Custom (AppCaptureVideoEncodingBitrateMode_Custom) = 0, High (AppCaptureVideoEncodingBitrateMode_High) = 1, Standard (AppCaptureVideoEncodingBitrateMode_Standard) = 2, @@ -3936,24 +3936,24 @@ DEFINE_IID!(IID_ICameraCaptureUI, 1213756736, 28563, 19380, 184, 243, 232, 158, RT_INTERFACE!{interface ICameraCaptureUI(ICameraCaptureUIVtbl): IInspectable(IInspectableVtbl) [IID_ICameraCaptureUI] { fn get_PhotoSettings(&self, out: *mut *mut CameraCaptureUIPhotoCaptureSettings) -> HRESULT, fn get_VideoSettings(&self, out: *mut *mut CameraCaptureUIVideoCaptureSettings) -> HRESULT, - #[cfg(feature="windows-storage")] fn CaptureFileAsync(&self, mode: CameraCaptureUIMode, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn CaptureFileAsync(&self, mode: CameraCaptureUIMode, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ICameraCaptureUI { - #[inline] pub unsafe fn get_photo_settings(&self) -> Result> { + #[inline] pub fn get_photo_settings(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PhotoSettings)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_settings(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_video_settings(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoSettings)(self 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_file_async(&self, mode: CameraCaptureUIMode) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn capture_file_async(&self, mode: CameraCaptureUIMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CaptureFileAsync)(self as *const _ as *mut _, mode, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class CameraCaptureUI: ICameraCaptureUI} impl RtActivatable for CameraCaptureUI {} @@ -3973,59 +3973,59 @@ RT_INTERFACE!{interface ICameraCaptureUIPhotoCaptureSettings(ICameraCaptureUIPho fn put_Format(&self, value: CameraCaptureUIPhotoFormat) -> HRESULT, fn get_MaxResolution(&self, out: *mut CameraCaptureUIMaxPhotoResolution) -> HRESULT, fn put_MaxResolution(&self, value: CameraCaptureUIMaxPhotoResolution) -> HRESULT, - fn get_CroppedSizeInPixels(&self, out: *mut super::super::foundation::Size) -> HRESULT, - fn put_CroppedSizeInPixels(&self, value: super::super::foundation::Size) -> HRESULT, - fn get_CroppedAspectRatio(&self, out: *mut super::super::foundation::Size) -> HRESULT, - fn put_CroppedAspectRatio(&self, value: super::super::foundation::Size) -> HRESULT, + fn get_CroppedSizeInPixels(&self, out: *mut foundation::Size) -> HRESULT, + fn put_CroppedSizeInPixels(&self, value: foundation::Size) -> HRESULT, + fn get_CroppedAspectRatio(&self, out: *mut foundation::Size) -> HRESULT, + fn put_CroppedAspectRatio(&self, value: foundation::Size) -> HRESULT, fn get_AllowCropping(&self, out: *mut bool) -> HRESULT, fn put_AllowCropping(&self, value: bool) -> HRESULT }} impl ICameraCaptureUIPhotoCaptureSettings { - #[inline] pub unsafe fn get_format(&self) -> Result { + #[inline] pub fn get_format(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Format)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_format(&self, value: CameraCaptureUIPhotoFormat) -> Result<()> { + }} + #[inline] pub fn set_format(&self, value: CameraCaptureUIPhotoFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Format)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_resolution(&self) -> Result { + }} + #[inline] pub fn get_max_resolution(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxResolution)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_resolution(&self, value: CameraCaptureUIMaxPhotoResolution) -> Result<()> { + }} + #[inline] pub fn set_max_resolution(&self, value: CameraCaptureUIMaxPhotoResolution) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxResolution)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_cropped_size_in_pixels(&self) -> Result { + }} + #[inline] pub fn get_cropped_size_in_pixels(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CroppedSizeInPixels)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_cropped_size_in_pixels(&self, value: super::super::foundation::Size) -> Result<()> { + }} + #[inline] pub fn set_cropped_size_in_pixels(&self, value: foundation::Size) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CroppedSizeInPixels)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_cropped_aspect_ratio(&self) -> Result { + }} + #[inline] pub fn get_cropped_aspect_ratio(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CroppedAspectRatio)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_cropped_aspect_ratio(&self, value: super::super::foundation::Size) -> Result<()> { + }} + #[inline] pub fn set_cropped_aspect_ratio(&self, value: foundation::Size) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CroppedAspectRatio)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_allow_cropping(&self) -> Result { + }} + #[inline] pub fn get_allow_cropping(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AllowCropping)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_allow_cropping(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_allow_cropping(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AllowCropping)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CameraCaptureUIPhotoCaptureSettings: ICameraCaptureUIPhotoCaptureSettings} RT_ENUM! { enum CameraCaptureUIPhotoFormat: i32 { @@ -4043,42 +4043,42 @@ RT_INTERFACE!{interface ICameraCaptureUIVideoCaptureSettings(ICameraCaptureUIVid fn put_AllowTrimming(&self, value: bool) -> HRESULT }} impl ICameraCaptureUIVideoCaptureSettings { - #[inline] pub unsafe fn get_format(&self) -> Result { + #[inline] pub fn get_format(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Format)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_format(&self, value: CameraCaptureUIVideoFormat) -> Result<()> { + }} + #[inline] pub fn set_format(&self, value: CameraCaptureUIVideoFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Format)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_resolution(&self) -> Result { + }} + #[inline] pub fn get_max_resolution(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxResolution)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_resolution(&self, value: CameraCaptureUIMaxVideoResolution) -> Result<()> { + }} + #[inline] pub fn set_max_resolution(&self, value: CameraCaptureUIMaxVideoResolution) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxResolution)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_duration_in_seconds(&self) -> Result { + }} + #[inline] pub fn get_max_duration_in_seconds(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxDurationInSeconds)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_duration_in_seconds(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_max_duration_in_seconds(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxDurationInSeconds)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_allow_trimming(&self) -> Result { + }} + #[inline] pub fn get_allow_trimming(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AllowTrimming)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_allow_trimming(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_allow_trimming(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AllowTrimming)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CameraCaptureUIVideoCaptureSettings: ICameraCaptureUIVideoCaptureSettings} RT_ENUM! { enum CameraCaptureUIVideoFormat: i32 { @@ -4087,9 +4087,9 @@ RT_ENUM! { enum CameraCaptureUIVideoFormat: i32 { RT_CLASS!{static class CameraOptionsUI} impl RtActivatable for CameraOptionsUI {} impl CameraOptionsUI { - #[inline] pub fn show(mediaCapture: &MediaCapture) -> Result<()> { unsafe { + #[inline] pub fn show(mediaCapture: &MediaCapture) -> Result<()> { >::get_activation_factory().show(mediaCapture) - }} + } } DEFINE_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]) [CLSID_CameraOptionsUI]); DEFINE_IID!(IID_ICameraOptionsUIStatics, 990731828, 14598, 19325, 148, 108, 123, 222, 132, 68, 153, 174); @@ -4097,10 +4097,10 @@ RT_INTERFACE!{static interface ICameraOptionsUIStatics(ICameraOptionsUIStaticsVt fn Show(&self, mediaCapture: *mut MediaCapture) -> HRESULT }} impl ICameraOptionsUIStatics { - #[inline] pub unsafe fn show(&self, mediaCapture: &MediaCapture) -> Result<()> { + #[inline] pub fn show(&self, mediaCapture: &MediaCapture) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Show)(self as *const _ as *mut _, mediaCapture as *const _ as *mut _); if hr == S_OK { Ok(()) } 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] { @@ -4108,123 +4108,123 @@ RT_INTERFACE!{interface ICapturedFrame(ICapturedFrameVtbl): IInspectable(IInspec fn get_Height(&self, out: *mut u32) -> HRESULT }} impl ICapturedFrame { - #[inline] pub unsafe fn get_width(&self) -> Result { + #[inline] pub fn get_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Width)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_height(&self) -> Result { + }} + #[inline] pub fn get_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Height)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class CapturedFrame: ICapturedFrame} 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(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_ExposureCompensation(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_IsoSpeed(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_Focus(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_SceneMode(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_Flashed(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_FlashPowerPercent(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_WhiteBalance(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_ZoomFactor(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn get_Exposure(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_ExposureCompensation(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_IsoSpeed(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_Focus(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_SceneMode(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_Flashed(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_FlashPowerPercent(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_WhiteBalance(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_ZoomFactor(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl ICapturedFrameControlValues { - #[inline] pub unsafe fn get_exposure(&self) -> Result>> { + #[inline] pub fn get_exposure(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Exposure)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_exposure_compensation(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_exposure_compensation(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExposureCompensation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_iso_speed(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_iso_speed(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsoSpeed)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_focus(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_focus(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Focus)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_scene_mode(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_scene_mode(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SceneMode)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_flashed(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_flashed(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Flashed)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_flash_power_percent(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_flash_power_percent(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FlashPowerPercent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_white_balance(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_white_balance(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WhiteBalance)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_zoom_factor(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_zoom_factor(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ZoomFactor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CapturedFrameControlValues: ICapturedFrameControlValues} 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(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_IsoDigitalGain(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_IsoAnalogGain(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_FocusState(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_IsoDigitalGain(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_IsoAnalogGain(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn get_SensorFrameRate(&self, out: *mut *mut super::mediaproperties::MediaRatio) -> HRESULT, - fn get_WhiteBalanceGain(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn get_WhiteBalanceGain(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl ICapturedFrameControlValues2 { - #[inline] pub unsafe fn get_focus_state(&self) -> Result>> { + #[inline] pub fn get_focus_state(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FocusState)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_iso_digital_gain(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_iso_digital_gain(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsoDigitalGain)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_iso_analog_gain(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_iso_analog_gain(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsoAnalogGain)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sensor_frame_rate(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_sensor_frame_rate(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SensorFrameRate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_white_balance_gain(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_white_balance_gain(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WhiteBalanceGain)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut super::super::graphics::imaging::SoftwareBitmap) -> HRESULT }} impl ICapturedFrameWithSoftwareBitmap { - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn get_software_bitmap(&self) -> Result> { + #[cfg(feature="windows-graphics")] #[inline] pub fn get_software_bitmap(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SoftwareBitmap)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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] { @@ -4232,16 +4232,16 @@ RT_INTERFACE!{interface ICapturedPhoto(ICapturedPhotoVtbl): IInspectable(IInspec fn get_Thumbnail(&self, out: *mut *mut CapturedFrame) -> HRESULT }} impl ICapturedPhoto { - #[inline] pub unsafe fn get_frame(&self) -> Result> { + #[inline] pub fn get_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Frame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_thumbnail(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_thumbnail(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Thumbnail)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CapturedPhoto: ICapturedPhoto} RT_ENUM! { enum ForegroundActivationArgument: i32 { @@ -4262,52 +4262,52 @@ RT_INTERFACE!{interface IGameBarServices(IGameBarServicesVtbl): IInspectable(IIn fn get_SessionId(&self, out: *mut HSTRING) -> HRESULT, fn get_AppBroadcastServices(&self, out: *mut *mut AppBroadcastServices) -> HRESULT, fn get_AppCaptureServices(&self, out: *mut *mut AppCaptureServices) -> HRESULT, - fn add_CommandReceived(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CommandReceived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_CommandReceived(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CommandReceived(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IGameBarServices { - #[inline] pub unsafe fn get_target_capture_policy(&self) -> Result { + #[inline] pub fn get_target_capture_policy(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TargetCapturePolicy)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn enable_capture(&self) -> Result<()> { + }} + #[inline] pub fn enable_capture(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).EnableCapture)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn disable_capture(&self) -> Result<()> { + }} + #[inline] pub fn disable_capture(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).DisableCapture)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_target_info(&self) -> Result> { + }} + #[inline] pub fn get_target_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TargetInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_session_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_session_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SessionId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_broadcast_services(&self) -> Result> { + }} + #[inline] pub fn get_app_broadcast_services(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppBroadcastServices)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_capture_services(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_app_capture_services(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppCaptureServices)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_command_received(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_command_received(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CommandReceived)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_command_received(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_command_received(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CommandReceived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class GameBarServices: IGameBarServices} DEFINE_IID!(IID_IGameBarServicesCommandEventArgs, 2806130354, 61814, 20431, 143, 187, 207, 105, 139, 46, 184, 224); @@ -4316,16 +4316,16 @@ RT_INTERFACE!{interface IGameBarServicesCommandEventArgs(IGameBarServicesCommand fn get_Origin(&self, out: *mut GameBarCommandOrigin) -> HRESULT }} impl IGameBarServicesCommandEventArgs { - #[inline] pub unsafe fn get_command(&self) -> Result { + #[inline] pub fn get_command(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Command)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_origin(&self) -> Result { + }} + #[inline] pub fn get_origin(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Origin)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class GameBarServicesCommandEventArgs: IGameBarServicesCommandEventArgs} RT_ENUM! { enum GameBarServicesDisplayMode: i32 { @@ -4333,26 +4333,26 @@ RT_ENUM! { enum GameBarServicesDisplayMode: i32 { }} DEFINE_IID!(IID_IGameBarServicesManager, 978033914, 32651, 19552, 157, 187, 11, 205, 38, 45, 255, 198); RT_INTERFACE!{interface IGameBarServicesManager(IGameBarServicesManagerVtbl): IInspectable(IInspectableVtbl) [IID_IGameBarServicesManager] { - fn add_GameBarServicesCreated(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_GameBarServicesCreated(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_GameBarServicesCreated(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_GameBarServicesCreated(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IGameBarServicesManager { - #[inline] pub unsafe fn add_game_bar_services_created(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_game_bar_services_created(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_GameBarServicesCreated)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_game_bar_services_created(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_game_bar_services_created(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_GameBarServicesCreated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class GameBarServicesManager: IGameBarServicesManager} impl RtActivatable for GameBarServicesManager {} impl GameBarServicesManager { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} + } } DEFINE_CLSID!(GameBarServicesManager(&[87,105,110,100,111,119,115,46,77,101,100,105,97,46,67,97,112,116,117,114,101,46,71,97,109,101,66,97,114,83,101,114,118,105,99,101,115,77,97,110,97,103,101,114,0]) [CLSID_GameBarServicesManager]); DEFINE_IID!(IID_IGameBarServicesManagerGameBarServicesCreatedEventArgs, 3991780764, 5182, 18851, 165, 234, 11, 25, 149, 200, 212, 110); @@ -4360,11 +4360,11 @@ RT_INTERFACE!{interface IGameBarServicesManagerGameBarServicesCreatedEventArgs(I fn get_GameBarServices(&self, out: *mut *mut GameBarServices) -> HRESULT }} impl IGameBarServicesManagerGameBarServicesCreatedEventArgs { - #[inline] pub unsafe fn get_game_bar_services(&self) -> Result> { + #[inline] pub fn get_game_bar_services(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_GameBarServices)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class GameBarServicesManagerGameBarServicesCreatedEventArgs: IGameBarServicesManagerGameBarServicesCreatedEventArgs} DEFINE_IID!(IID_IGameBarServicesManagerStatics, 885110294, 65317, 18322, 152, 242, 211, 117, 63, 21, 172, 19); @@ -4372,11 +4372,11 @@ RT_INTERFACE!{static interface IGameBarServicesManagerStatics(IGameBarServicesMa fn GetDefault(&self, out: *mut *mut GameBarServicesManager) -> HRESULT }} impl IGameBarServicesManagerStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IGameBarServicesTargetInfo, 3022008210, 5649, 19973, 182, 239, 223, 215, 55, 174, 51, 176); RT_INTERFACE!{interface IGameBarServicesTargetInfo(IGameBarServicesTargetInfoVtbl): IInspectable(IInspectableVtbl) [IID_IGameBarServicesTargetInfo] { @@ -4386,26 +4386,26 @@ RT_INTERFACE!{interface IGameBarServicesTargetInfo(IGameBarServicesTargetInfoVtb fn get_DisplayMode(&self, out: *mut GameBarServicesDisplayMode) -> HRESULT }} impl IGameBarServicesTargetInfo { - #[inline] pub unsafe fn get_display_name(&self) -> Result { + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_id(&self) -> Result { + }} + #[inline] pub fn get_app_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_title_id(&self) -> Result { + }} + #[inline] pub fn get_title_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TitleId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_mode(&self) -> Result { + }} + #[inline] pub fn get_display_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DisplayMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class GameBarServicesTargetInfo: IGameBarServicesTargetInfo} RT_ENUM! { enum GameBarTargetCapturePolicy: i32 { @@ -4416,138 +4416,138 @@ RT_ENUM! { enum KnownVideoProfile: i32 { }} 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(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn StopAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn FinishAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn StartAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn StopAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn FinishAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl ILowLagMediaRecording { - #[inline] pub unsafe fn start_async(&self) -> Result> { + #[inline] pub fn start_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn stop_async(&self) -> Result> { + }} + #[inline] pub fn stop_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StopAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn finish_async(&self) -> Result> { + }} + #[inline] pub fn finish_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FinishAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class LowLagMediaRecording: ILowLagMediaRecording} 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(&self, behavior: super::devices::MediaCapturePauseBehavior, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn ResumeAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn PauseAsync(&self, behavior: super::devices::MediaCapturePauseBehavior, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ResumeAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl ILowLagMediaRecording2 { - #[inline] pub unsafe fn pause_async(&self, behavior: super::devices::MediaCapturePauseBehavior) -> Result> { + #[inline] pub fn pause_async(&self, behavior: super::devices::MediaCapturePauseBehavior) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PauseAsync)(self as *const _ as *mut _, behavior, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn resume_async(&self) -> Result> { + }} + #[inline] pub fn resume_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ResumeAsync)(self as *const _ as *mut _, &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(&self, behavior: super::devices::MediaCapturePauseBehavior, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn StopWithResultAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn PauseWithResultAsync(&self, behavior: super::devices::MediaCapturePauseBehavior, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn StopWithResultAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ILowLagMediaRecording3 { - #[inline] pub unsafe fn pause_with_result_async(&self, behavior: super::devices::MediaCapturePauseBehavior) -> Result>> { + #[inline] pub fn pause_with_result_async(&self, behavior: super::devices::MediaCapturePauseBehavior) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PauseWithResultAsync)(self as *const _ as *mut _, behavior, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn stop_with_result_async(&self) -> Result>> { + }} + #[inline] pub fn stop_with_result_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StopWithResultAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FinishAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn CaptureAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn FinishAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl ILowLagPhotoCapture { - #[inline] pub unsafe fn capture_async(&self) -> Result>> { + #[inline] pub fn capture_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CaptureAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn finish_async(&self) -> Result> { + }} + #[inline] pub fn finish_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FinishAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class LowLagPhotoCapture: ILowLagPhotoCapture} 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(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn StopAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn FinishAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn add_PhotoCaptured(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PhotoCaptured(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn StartAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn StopAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn FinishAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn add_PhotoCaptured(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PhotoCaptured(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl ILowLagPhotoSequenceCapture { - #[inline] pub unsafe fn start_async(&self) -> Result> { + #[inline] pub fn start_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn stop_async(&self) -> Result> { + }} + #[inline] pub fn stop_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StopAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn finish_async(&self) -> Result> { + }} + #[inline] pub fn finish_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FinishAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_photo_captured(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_photo_captured(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PhotoCaptured)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_photo_captured(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_photo_captured(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PhotoCaptured)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class LowLagPhotoSequenceCapture: ILowLagPhotoSequenceCapture} 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(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn InitializeWithSettingsAsync(&self, mediaCaptureInitializationSettings: *mut MediaCaptureInitializationSettings, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn InitializeAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn InitializeWithSettingsAsync(&self, mediaCaptureInitializationSettings: *mut MediaCaptureInitializationSettings, out: *mut *mut foundation::IAsyncAction) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy2(&self) -> (), - #[cfg(feature="windows-storage")] fn StartRecordToStorageFileAsync(&self, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, file: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + #[cfg(feature="windows-storage")] fn StartRecordToStorageFileAsync(&self, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, file: *mut super::super::storage::IStorageFile, out: *mut *mut foundation::IAsyncAction) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy3(&self) -> (), - #[cfg(feature="windows-storage")] fn StartRecordToStreamAsync(&self, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, stream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn StartRecordToCustomSinkAsync(&self, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, customMediaSink: *mut super::IMediaExtension, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn StartRecordToCustomSinkIdAsync(&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(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + #[cfg(feature="windows-storage")] fn StartRecordToStreamAsync(&self, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, stream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn StartRecordToCustomSinkAsync(&self, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, customMediaSink: *mut super::IMediaExtension, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn StartRecordToCustomSinkIdAsync(&self, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, customSinkActivationId: HSTRING, customSinkSettings: *mut foundation::collections::IPropertySet, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn StopRecordAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy7(&self) -> (), - #[cfg(feature="windows-storage")] fn CapturePhotoToStorageFileAsync(&self, type_: *mut super::mediaproperties::ImageEncodingProperties, file: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + #[cfg(feature="windows-storage")] fn CapturePhotoToStorageFileAsync(&self, type_: *mut super::mediaproperties::ImageEncodingProperties, file: *mut super::super::storage::IStorageFile, out: *mut *mut foundation::IAsyncAction) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy8(&self) -> (), - #[cfg(feature="windows-storage")] fn CapturePhotoToStreamAsync(&self, type_: *mut super::mediaproperties::ImageEncodingProperties, stream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn AddEffectAsync(&self, mediaStreamType: MediaStreamType, effectActivationID: HSTRING, effectSettings: *mut super::super::foundation::collections::IPropertySet, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn ClearEffectsAsync(&self, mediaStreamType: MediaStreamType, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + #[cfg(feature="windows-storage")] fn CapturePhotoToStreamAsync(&self, type_: *mut super::mediaproperties::ImageEncodingProperties, stream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn AddEffectAsync(&self, mediaStreamType: MediaStreamType, effectActivationID: HSTRING, effectSettings: *mut foundation::collections::IPropertySet, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ClearEffectsAsync(&self, mediaStreamType: MediaStreamType, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn SetEncoderProperty(&self, mediaStreamType: MediaStreamType, propertyId: Guid, propertyValue: *mut IInspectable) -> HRESULT, fn GetEncoderProperty(&self, mediaStreamType: MediaStreamType, propertyId: Guid, out: *mut *mut IInspectable) -> HRESULT, - fn add_Failed(&self, errorEventHandler: *mut MediaCaptureFailedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Failed(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_RecordLimitationExceeded(&self, recordLimitationExceededEventHandler: *mut RecordLimitationExceededEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RecordLimitationExceeded(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Failed(&self, errorEventHandler: *mut MediaCaptureFailedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Failed(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_RecordLimitationExceeded(&self, recordLimitationExceededEventHandler: *mut RecordLimitationExceededEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RecordLimitationExceeded(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT, fn get_MediaCaptureSettings(&self, out: *mut *mut MediaCaptureSettings) -> HRESULT, fn get_AudioDeviceController(&self, out: *mut *mut super::devices::AudioDeviceController) -> HRESULT, fn get_VideoDeviceController(&self, out: *mut *mut super::devices::VideoDeviceController) -> HRESULT, @@ -4559,380 +4559,380 @@ RT_INTERFACE!{interface IMediaCapture(IMediaCaptureVtbl): IInspectable(IInspecta fn GetRecordRotation(&self, out: *mut VideoRotation) -> HRESULT }} impl IMediaCapture { - #[inline] pub unsafe fn initialize_async(&self) -> Result> { + #[inline] pub fn initialize_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).InitializeAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn initialize_with_settings_async(&self, mediaCaptureInitializationSettings: &MediaCaptureInitializationSettings) -> Result> { + }} + #[inline] pub fn initialize_with_settings_async(&self, mediaCaptureInitializationSettings: &MediaCaptureInitializationSettings) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).InitializeWithSettingsAsync)(self as *const _ as *mut _, 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(&self, encodingProfile: &super::mediaproperties::MediaEncodingProfile, file: &super::super::storage::IStorageFile) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn start_record_to_storage_file_async(&self, encodingProfile: &super::mediaproperties::MediaEncodingProfile, file: &super::super::storage::IStorageFile) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartRecordToStorageFileAsync)(self as *const _ as *mut _, 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(&self, encodingProfile: &super::mediaproperties::MediaEncodingProfile, stream: &super::super::storage::streams::IRandomAccessStream) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn start_record_to_stream_async(&self, encodingProfile: &super::mediaproperties::MediaEncodingProfile, stream: &super::super::storage::streams::IRandomAccessStream) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartRecordToStreamAsync)(self as *const _ as *mut _, 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(&self, encodingProfile: &super::mediaproperties::MediaEncodingProfile, customMediaSink: &super::IMediaExtension) -> Result> { + }} + #[inline] pub fn start_record_to_custom_sink_async(&self, encodingProfile: &super::mediaproperties::MediaEncodingProfile, customMediaSink: &super::IMediaExtension) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartRecordToCustomSinkAsync)(self as *const _ as *mut _, 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(&self, encodingProfile: &super::mediaproperties::MediaEncodingProfile, customSinkActivationId: &HStringArg, customSinkSettings: &super::super::foundation::collections::IPropertySet) -> Result> { + }} + #[inline] pub fn start_record_to_custom_sink_id_async(&self, encodingProfile: &super::mediaproperties::MediaEncodingProfile, customSinkActivationId: &HStringArg, customSinkSettings: &foundation::collections::IPropertySet) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartRecordToCustomSinkIdAsync)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[inline] pub fn stop_record_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StopRecordAsync)(self 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_storage_file_async(&self, type_: &super::mediaproperties::ImageEncodingProperties, file: &super::super::storage::IStorageFile) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn capture_photo_to_storage_file_async(&self, type_: &super::mediaproperties::ImageEncodingProperties, file: &super::super::storage::IStorageFile) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CapturePhotoToStorageFileAsync)(self as *const _ as *mut _, 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(&self, type_: &super::mediaproperties::ImageEncodingProperties, stream: &super::super::storage::streams::IRandomAccessStream) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn capture_photo_to_stream_async(&self, type_: &super::mediaproperties::ImageEncodingProperties, stream: &super::super::storage::streams::IRandomAccessStream) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CapturePhotoToStreamAsync)(self as *const _ as *mut _, 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(&self, mediaStreamType: MediaStreamType, effectActivationID: &HStringArg, effectSettings: &super::super::foundation::collections::IPropertySet) -> Result> { + }} + #[inline] pub fn add_effect_async(&self, mediaStreamType: MediaStreamType, effectActivationID: &HStringArg, effectSettings: &foundation::collections::IPropertySet) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AddEffectAsync)(self as *const _ as *mut _, 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(&self, mediaStreamType: MediaStreamType) -> Result> { + }} + #[inline] pub fn clear_effects_async(&self, mediaStreamType: MediaStreamType) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ClearEffectsAsync)(self as *const _ as *mut _, mediaStreamType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_encoder_property(&self, mediaStreamType: MediaStreamType, propertyId: Guid, propertyValue: &IInspectable) -> Result<()> { + }} + #[inline] pub fn set_encoder_property(&self, mediaStreamType: MediaStreamType, propertyId: Guid, propertyValue: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetEncoderProperty)(self as *const _ as *mut _, mediaStreamType, propertyId, propertyValue as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_encoder_property(&self, mediaStreamType: MediaStreamType, propertyId: Guid) -> Result> { + }} + #[inline] pub fn get_encoder_property(&self, mediaStreamType: MediaStreamType, propertyId: Guid) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetEncoderProperty)(self as *const _ as *mut _, mediaStreamType, propertyId, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_failed(&self, errorEventHandler: &MediaCaptureFailedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_failed(&self, errorEventHandler: &MediaCaptureFailedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Failed)(self as *const _ as *mut _, errorEventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_failed(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_failed(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Failed)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_record_limitation_exceeded(&self, recordLimitationExceededEventHandler: &RecordLimitationExceededEventHandler) -> Result { + }} + #[inline] pub fn add_record_limitation_exceeded(&self, recordLimitationExceededEventHandler: &RecordLimitationExceededEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RecordLimitationExceeded)(self as *const _ as *mut _, recordLimitationExceededEventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_record_limitation_exceeded(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_record_limitation_exceeded(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RecordLimitationExceeded)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_media_capture_settings(&self) -> Result> { + }} + #[inline] pub fn get_media_capture_settings(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MediaCaptureSettings)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_device_controller(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_audio_device_controller(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioDeviceController)(self 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(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_video_device_controller(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoDeviceController)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_preview_mirroring(&self, value: bool) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_preview_mirroring(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetPreviewMirroring)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_preview_mirroring(&self) -> Result { + }} + #[inline] pub fn get_preview_mirroring(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetPreviewMirroring)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_preview_rotation(&self, value: VideoRotation) -> Result<()> { + }} + #[inline] pub fn set_preview_rotation(&self, value: VideoRotation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetPreviewRotation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_preview_rotation(&self) -> Result { + }} + #[inline] pub fn get_preview_rotation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetPreviewRotation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_record_rotation(&self, value: VideoRotation) -> Result<()> { + }} + #[inline] pub fn set_record_rotation(&self, value: VideoRotation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetRecordRotation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_record_rotation(&self) -> Result { + }} + #[inline] pub fn get_record_rotation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetRecordRotation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MediaCapture: IMediaCapture} impl RtActivatable for MediaCapture {} impl RtActivatable for MediaCapture {} impl MediaCapture { - #[inline] pub fn is_video_profile_supported(videoDeviceId: &HStringArg) -> Result { unsafe { + #[inline] pub fn is_video_profile_supported(videoDeviceId: &HStringArg) -> Result { >::get_activation_factory().is_video_profile_supported(videoDeviceId) - }} - #[inline] pub fn find_all_video_profiles(videoDeviceId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn find_all_video_profiles(videoDeviceId: &HStringArg) -> Result>>> { >::get_activation_factory().find_all_video_profiles(videoDeviceId) - }} - #[inline] pub fn find_concurrent_profiles(videoDeviceId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn find_concurrent_profiles(videoDeviceId: &HStringArg) -> Result>>> { >::get_activation_factory().find_concurrent_profiles(videoDeviceId) - }} - #[inline] pub fn find_known_video_profiles(videoDeviceId: &HStringArg, name: KnownVideoProfile) -> Result>> { unsafe { + } + #[inline] pub fn find_known_video_profiles(videoDeviceId: &HStringArg, name: KnownVideoProfile) -> Result>>> { >::get_activation_factory().find_known_video_profiles(videoDeviceId, name) - }} + } } DEFINE_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]) [CLSID_MediaCapture]); 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(&self) -> (), - #[cfg(feature="windows-storage")] fn PrepareLowLagRecordToStorageFileAsync(&self, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, file: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn PrepareLowLagRecordToStorageFileAsync(&self, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, file: *mut super::super::storage::IStorageFile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-storage")] fn PrepareLowLagRecordToStreamAsync(&self, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, stream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn PrepareLowLagRecordToCustomSinkAsync(&self, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, customMediaSink: *mut super::IMediaExtension, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn PrepareLowLagRecordToCustomSinkIdAsync(&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(&self, type_: *mut super::mediaproperties::ImageEncodingProperties, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn PrepareLowLagPhotoSequenceCaptureAsync(&self, type_: *mut super::mediaproperties::ImageEncodingProperties, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn SetEncodingPropertiesAsync(&self, mediaStreamType: MediaStreamType, mediaEncodingProperties: *mut super::mediaproperties::IMediaEncodingProperties, encoderProperties: *mut super::mediaproperties::MediaPropertySet, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + #[cfg(feature="windows-storage")] fn PrepareLowLagRecordToStreamAsync(&self, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, stream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn PrepareLowLagRecordToCustomSinkAsync(&self, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, customMediaSink: *mut super::IMediaExtension, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn PrepareLowLagRecordToCustomSinkIdAsync(&self, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, customSinkActivationId: HSTRING, customSinkSettings: *mut foundation::collections::IPropertySet, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn PrepareLowLagPhotoCaptureAsync(&self, type_: *mut super::mediaproperties::ImageEncodingProperties, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn PrepareLowLagPhotoSequenceCaptureAsync(&self, type_: *mut super::mediaproperties::ImageEncodingProperties, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn SetEncodingPropertiesAsync(&self, mediaStreamType: MediaStreamType, mediaEncodingProperties: *mut super::mediaproperties::IMediaEncodingProperties, encoderProperties: *mut super::mediaproperties::MediaPropertySet, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IMediaCapture2 { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn prepare_low_lag_record_to_storage_file_async(&self, encodingProfile: &super::mediaproperties::MediaEncodingProfile, file: &super::super::storage::IStorageFile) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn prepare_low_lag_record_to_storage_file_async(&self, encodingProfile: &super::mediaproperties::MediaEncodingProfile, file: &super::super::storage::IStorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PrepareLowLagRecordToStorageFileAsync)(self as *const _ as *mut _, 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(&self, encodingProfile: &super::mediaproperties::MediaEncodingProfile, stream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn prepare_low_lag_record_to_stream_async(&self, encodingProfile: &super::mediaproperties::MediaEncodingProfile, stream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PrepareLowLagRecordToStreamAsync)(self as *const _ as *mut _, 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(&self, encodingProfile: &super::mediaproperties::MediaEncodingProfile, customMediaSink: &super::IMediaExtension) -> Result>> { + }} + #[inline] pub fn prepare_low_lag_record_to_custom_sink_async(&self, encodingProfile: &super::mediaproperties::MediaEncodingProfile, customMediaSink: &super::IMediaExtension) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PrepareLowLagRecordToCustomSinkAsync)(self as *const _ as *mut _, 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(&self, encodingProfile: &super::mediaproperties::MediaEncodingProfile, customSinkActivationId: &HStringArg, customSinkSettings: &super::super::foundation::collections::IPropertySet) -> Result>> { + }} + #[inline] pub fn prepare_low_lag_record_to_custom_sink_id_async(&self, encodingProfile: &super::mediaproperties::MediaEncodingProfile, customSinkActivationId: &HStringArg, customSinkSettings: &foundation::collections::IPropertySet) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PrepareLowLagRecordToCustomSinkIdAsync)(self as *const _ as *mut _, 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(&self, type_: &super::mediaproperties::ImageEncodingProperties) -> Result>> { + }} + #[inline] pub fn prepare_low_lag_photo_capture_async(&self, type_: &super::mediaproperties::ImageEncodingProperties) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PrepareLowLagPhotoCaptureAsync)(self as *const _ as *mut _, 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(&self, type_: &super::mediaproperties::ImageEncodingProperties) -> Result>> { + }} + #[inline] pub fn prepare_low_lag_photo_sequence_capture_async(&self, type_: &super::mediaproperties::ImageEncodingProperties) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PrepareLowLagPhotoSequenceCaptureAsync)(self as *const _ as *mut _, 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(&self, mediaStreamType: MediaStreamType, mediaEncodingProperties: &super::mediaproperties::IMediaEncodingProperties, encoderProperties: &super::mediaproperties::MediaPropertySet) -> Result> { + }} + #[inline] pub fn set_encoding_properties_async(&self, mediaStreamType: MediaStreamType, mediaEncodingProperties: &super::mediaproperties::IMediaEncodingProperties, encoderProperties: &super::mediaproperties::MediaPropertySet) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetEncodingPropertiesAsync)(self as *const _ as *mut _, mediaStreamType, mediaEncodingProperties as *const _ as *mut _, encoderProperties as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, type_: *mut super::mediaproperties::ImageEncodingProperties, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_FocusChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_FocusChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PhotoConfirmationCaptured(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PhotoConfirmationCaptured(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn PrepareVariablePhotoSequenceCaptureAsync(&self, type_: *mut super::mediaproperties::ImageEncodingProperties, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_FocusChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_FocusChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PhotoConfirmationCaptured(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PhotoConfirmationCaptured(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IMediaCapture3 { - #[inline] pub unsafe fn prepare_variable_photo_sequence_capture_async(&self, type_: &super::mediaproperties::ImageEncodingProperties) -> Result>> { + #[inline] pub fn prepare_variable_photo_sequence_capture_async(&self, type_: &super::mediaproperties::ImageEncodingProperties) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PrepareVariablePhotoSequenceCaptureAsync)(self as *const _ as *mut _, 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(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_focus_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_FocusChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_focus_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_focus_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_FocusChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_photo_confirmation_captured(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_photo_confirmation_captured(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PhotoConfirmationCaptured)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_photo_confirmation_captured(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_photo_confirmation_captured(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PhotoConfirmationCaptured)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, definition: *mut super::effects::IAudioEffectDefinition, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn AddVideoEffectAsync(&self, definition: *mut super::effects::IVideoEffectDefinition, mediaStreamType: MediaStreamType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn PauseRecordAsync(&self, behavior: super::devices::MediaCapturePauseBehavior, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn ResumeRecordAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn add_CameraStreamStateChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CameraStreamStateChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn AddAudioEffectAsync(&self, definition: *mut super::effects::IAudioEffectDefinition, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn AddVideoEffectAsync(&self, definition: *mut super::effects::IVideoEffectDefinition, mediaStreamType: MediaStreamType, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn PauseRecordAsync(&self, behavior: super::devices::MediaCapturePauseBehavior, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ResumeRecordAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn add_CameraStreamStateChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CameraStreamStateChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_CameraStreamState(&self, out: *mut super::devices::CameraStreamState) -> HRESULT, - fn GetPreviewFrameAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetPreviewFrameCopyAsync(&self, destination: *mut super::VideoFrame, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_ThermalStatusChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ThermalStatusChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn GetPreviewFrameAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetPreviewFrameCopyAsync(&self, destination: *mut super::VideoFrame, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_ThermalStatusChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ThermalStatusChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_ThermalStatus(&self, out: *mut MediaCaptureThermalStatus) -> HRESULT, - fn PrepareAdvancedPhotoCaptureAsync(&self, encodingProperties: *mut super::mediaproperties::ImageEncodingProperties, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn PrepareAdvancedPhotoCaptureAsync(&self, encodingProperties: *mut super::mediaproperties::ImageEncodingProperties, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IMediaCapture4 { - #[inline] pub unsafe fn add_audio_effect_async(&self, definition: &super::effects::IAudioEffectDefinition) -> Result>> { + #[inline] pub fn add_audio_effect_async(&self, definition: &super::effects::IAudioEffectDefinition) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AddAudioEffectAsync)(self as *const _ as *mut _, 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(&self, definition: &super::effects::IVideoEffectDefinition, mediaStreamType: MediaStreamType) -> Result>> { + }} + #[inline] pub fn add_video_effect_async(&self, definition: &super::effects::IVideoEffectDefinition, mediaStreamType: MediaStreamType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AddVideoEffectAsync)(self as *const _ as *mut _, 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(&self, behavior: super::devices::MediaCapturePauseBehavior) -> Result> { + }} + #[inline] pub fn pause_record_async(&self, behavior: super::devices::MediaCapturePauseBehavior) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PauseRecordAsync)(self as *const _ as *mut _, behavior, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn resume_record_async(&self) -> Result> { + }} + #[inline] pub fn resume_record_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ResumeRecordAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_camera_stream_state_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_camera_stream_state_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CameraStreamStateChanged)(self as *const _ as *mut _, 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(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_camera_stream_state_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CameraStreamStateChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_camera_stream_state(&self) -> Result { + }} + #[inline] pub fn get_camera_stream_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CameraStreamState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_preview_frame_async(&self) -> Result>> { + }} + #[inline] pub fn get_preview_frame_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPreviewFrameAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_preview_frame_copy_async(&self, destination: &super::VideoFrame) -> Result>> { + }} + #[inline] pub fn get_preview_frame_copy_async(&self, destination: &super::VideoFrame) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPreviewFrameCopyAsync)(self 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 add_thermal_status_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_thermal_status_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ThermalStatusChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_thermal_status_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_thermal_status_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ThermalStatusChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_thermal_status(&self) -> Result { + }} + #[inline] pub fn get_thermal_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ThermalStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn prepare_advanced_photo_capture_async(&self, encodingProperties: &super::mediaproperties::ImageEncodingProperties) -> Result>> { + }} + #[inline] pub fn prepare_advanced_photo_capture_async(&self, encodingProperties: &super::mediaproperties::ImageEncodingProperties) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PrepareAdvancedPhotoCaptureAsync)(self as *const _ as *mut _, encodingProperties as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, effect: *mut super::IMediaExtension, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn PauseRecordWithResultAsync(&self, behavior: super::devices::MediaCapturePauseBehavior, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn StopRecordWithResultAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn get_FrameSources(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, - fn CreateFrameReaderAsync(&self, inputSource: *mut frames::MediaFrameSource, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CreateFrameReaderWithSubtypeAsync(&self, inputSource: *mut frames::MediaFrameSource, outputSubtype: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-graphics")] fn CreateFrameReaderWithSubtypeAndSizeAsync(&self, inputSource: *mut frames::MediaFrameSource, outputSubtype: HSTRING, outputSize: super::super::graphics::imaging::BitmapSize, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn RemoveEffectAsync(&self, effect: *mut super::IMediaExtension, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn PauseRecordWithResultAsync(&self, behavior: super::devices::MediaCapturePauseBehavior, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn StopRecordWithResultAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn get_FrameSources(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT, + fn CreateFrameReaderAsync(&self, inputSource: *mut frames::MediaFrameSource, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreateFrameReaderWithSubtypeAsync(&self, inputSource: *mut frames::MediaFrameSource, outputSubtype: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-graphics")] fn CreateFrameReaderWithSubtypeAndSizeAsync(&self, inputSource: *mut frames::MediaFrameSource, outputSubtype: HSTRING, outputSize: super::super::graphics::imaging::BitmapSize, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IMediaCapture5 { - #[inline] pub unsafe fn remove_effect_async(&self, effect: &super::IMediaExtension) -> Result> { + #[inline] pub fn remove_effect_async(&self, effect: &super::IMediaExtension) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RemoveEffectAsync)(self as *const _ as *mut _, 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(&self, behavior: super::devices::MediaCapturePauseBehavior) -> Result>> { + }} + #[inline] pub fn pause_record_with_result_async(&self, behavior: super::devices::MediaCapturePauseBehavior) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PauseRecordWithResultAsync)(self as *const _ as *mut _, behavior, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn stop_record_with_result_async(&self) -> Result>> { + }} + #[inline] pub fn stop_record_with_result_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StopRecordWithResultAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_frame_sources(&self) -> Result>> { + }} + #[inline] pub fn get_frame_sources(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FrameSources)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_frame_reader_async(&self, inputSource: &frames::MediaFrameSource) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_frame_reader_async(&self, inputSource: &frames::MediaFrameSource) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFrameReaderAsync)(self as *const _ as *mut _, 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(&self, inputSource: &frames::MediaFrameSource, outputSubtype: &HStringArg) -> Result>> { + }} + #[inline] pub fn create_frame_reader_with_subtype_async(&self, inputSource: &frames::MediaFrameSource, outputSubtype: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFrameReaderWithSubtypeAsync)(self as *const _ as *mut _, 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(&self, inputSource: &frames::MediaFrameSource, outputSubtype: &HStringArg, outputSize: super::super::graphics::imaging::BitmapSize) -> Result>> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn create_frame_reader_with_subtype_and_size_async(&self, inputSource: &frames::MediaFrameSource, outputSubtype: &HStringArg, outputSize: super::super::graphics::imaging::BitmapSize) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFrameReaderWithSubtypeAndSizeAsync)(self as *const _ as *mut _, inputSource as *const _ as *mut _, outputSubtype.get(), outputSize, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMediaCapture6, 579422397, 19232, 19377, 159, 214, 165, 131, 33, 42, 16, 18); RT_INTERFACE!{interface IMediaCapture6(IMediaCapture6Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaCapture6] { - fn add_CaptureDeviceExclusiveControlStatusChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CaptureDeviceExclusiveControlStatusChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn CreateMultiSourceFrameReaderAsync(&self, inputSources: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn add_CaptureDeviceExclusiveControlStatusChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CaptureDeviceExclusiveControlStatusChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn CreateMultiSourceFrameReaderAsync(&self, inputSources: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IMediaCapture6 { - #[inline] pub unsafe fn add_capture_device_exclusive_control_status_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_capture_device_exclusive_control_status_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CaptureDeviceExclusiveControlStatusChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_capture_device_exclusive_control_status_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_capture_device_exclusive_control_status_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CaptureDeviceExclusiveControlStatusChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn create_multi_source_frame_reader_async(&self, inputSources: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn create_multi_source_frame_reader_async(&self, inputSources: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateMultiSourceFrameReaderAsync)(self as *const _ as *mut _, inputSources as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum MediaCaptureDeviceExclusiveControlStatus: i32 { ExclusiveControlAvailable (MediaCaptureDeviceExclusiveControlStatus_ExclusiveControlAvailable) = 0, SharedReadOnlyAvailable (MediaCaptureDeviceExclusiveControlStatus_SharedReadOnlyAvailable) = 1, @@ -4943,16 +4943,16 @@ RT_INTERFACE!{interface IMediaCaptureDeviceExclusiveControlStatusChangedEventArg fn get_Status(&self, out: *mut MediaCaptureDeviceExclusiveControlStatus) -> HRESULT }} impl IMediaCaptureDeviceExclusiveControlStatusChangedEventArgs { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MediaCaptureDeviceExclusiveControlStatusChangedEventArgs: IMediaCaptureDeviceExclusiveControlStatusChangedEventArgs} DEFINE_IID!(IID_IMediaCaptureFailedEventArgs, 2164122612, 21700, 17088, 141, 25, 206, 161, 168, 124, 161, 139); @@ -4961,16 +4961,16 @@ RT_INTERFACE!{interface IMediaCaptureFailedEventArgs(IMediaCaptureFailedEventArg fn get_Code(&self, out: *mut u32) -> HRESULT }} impl IMediaCaptureFailedEventArgs { - #[inline] pub unsafe fn get_message(&self) -> Result { + #[inline] pub fn get_message(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Message)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_code(&self) -> Result { + }} + #[inline] pub fn get_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Code)(self as *const _ as *mut _, &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); @@ -4978,21 +4978,21 @@ RT_DELEGATE!{delegate MediaCaptureFailedEventHandler(MediaCaptureFailedEventHand fn Invoke(&self, sender: *mut MediaCapture, errorEventArgs: *mut MediaCaptureFailedEventArgs) -> HRESULT }} impl MediaCaptureFailedEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &MediaCapture, errorEventArgs: &MediaCaptureFailedEventArgs) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &MediaCapture, errorEventArgs: &MediaCaptureFailedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, errorEventArgs as *const _ as *mut _); if hr == S_OK { Ok(()) } 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(&self, out: *mut super::devices::MediaCaptureFocusState) -> HRESULT }} impl IMediaCaptureFocusChangedEventArgs { - #[inline] pub unsafe fn get_focus_state(&self) -> Result { + #[inline] pub fn get_focus_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FocusState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MediaCaptureFocusChangedEventArgs: IMediaCaptureFocusChangedEventArgs} DEFINE_IID!(IID_IMediaCaptureInitializationSettings, 2541927024, 60005, 18688, 147, 86, 140, 168, 135, 114, 104, 132); @@ -5007,42 +5007,42 @@ RT_INTERFACE!{interface IMediaCaptureInitializationSettings(IMediaCaptureInitial fn get_PhotoCaptureSource(&self, out: *mut PhotoCaptureSource) -> HRESULT }} impl IMediaCaptureInitializationSettings { - #[inline] pub unsafe fn set_audio_device_id(&self, value: &HStringArg) -> Result<()> { + #[inline] pub fn set_audio_device_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AudioDeviceId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_device_id(&self) -> Result { + }} + #[inline] pub fn get_audio_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioDeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_video_device_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_video_device_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_VideoDeviceId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_device_id(&self) -> Result { + }} + #[inline] pub fn get_video_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoDeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_streaming_capture_mode(&self, value: StreamingCaptureMode) -> Result<()> { + }} + #[inline] pub fn set_streaming_capture_mode(&self, value: StreamingCaptureMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StreamingCaptureMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_streaming_capture_mode(&self) -> Result { + }} + #[inline] pub fn get_streaming_capture_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StreamingCaptureMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_photo_capture_source(&self, value: PhotoCaptureSource) -> Result<()> { + }} + #[inline] pub fn set_photo_capture_source(&self, value: PhotoCaptureSource) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PhotoCaptureSource)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_photo_capture_source(&self) -> Result { + }} + #[inline] pub fn get_photo_capture_source(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PhotoCaptureSource)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MediaCaptureInitializationSettings: IMediaCaptureInitializationSettings} impl RtActivatable for MediaCaptureInitializationSettings {} @@ -5055,24 +5055,24 @@ RT_INTERFACE!{interface IMediaCaptureInitializationSettings2(IMediaCaptureInitia fn get_AudioProcessing(&self, out: *mut super::AudioProcessing) -> HRESULT }} impl IMediaCaptureInitializationSettings2 { - #[inline] pub unsafe fn set_media_category(&self, value: MediaCategory) -> Result<()> { + #[inline] pub fn set_media_category(&self, value: MediaCategory) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MediaCategory)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_media_category(&self) -> Result { + }} + #[inline] pub fn get_media_category(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MediaCategory)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_audio_processing(&self, value: super::AudioProcessing) -> Result<()> { + }} + #[inline] pub fn set_audio_processing(&self, value: super::AudioProcessing) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AudioProcessing)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_processing(&self) -> Result { + }} + #[inline] pub fn get_audio_processing(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AudioProcessing)(self as *const _ as *mut _, &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] { @@ -5082,24 +5082,24 @@ RT_INTERFACE!{interface IMediaCaptureInitializationSettings3(IMediaCaptureInitia fn get_VideoSource(&self, out: *mut *mut super::core::IMediaSource) -> HRESULT }} impl IMediaCaptureInitializationSettings3 { - #[inline] pub unsafe fn set_audio_source(&self, value: &super::core::IMediaSource) -> Result<()> { + #[inline] pub fn set_audio_source(&self, value: &super::core::IMediaSource) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AudioSource)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_source(&self) -> Result> { + }} + #[inline] pub fn get_audio_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioSource)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_video_source(&self, value: &super::core::IMediaSource) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_video_source(&self, value: &super::core::IMediaSource) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_VideoSource)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_source(&self) -> Result> { + }} + #[inline] pub fn get_video_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoSource)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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] { @@ -5113,42 +5113,42 @@ RT_INTERFACE!{interface IMediaCaptureInitializationSettings4(IMediaCaptureInitia fn put_PhotoMediaDescription(&self, value: *mut MediaCaptureVideoProfileMediaDescription) -> HRESULT }} impl IMediaCaptureInitializationSettings4 { - #[inline] pub unsafe fn get_video_profile(&self) -> Result> { + #[inline] pub fn get_video_profile(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoProfile)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_video_profile(&self, value: &MediaCaptureVideoProfile) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_video_profile(&self, value: &MediaCaptureVideoProfile) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_VideoProfile)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_preview_media_description(&self) -> Result> { + }} + #[inline] pub fn get_preview_media_description(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PreviewMediaDescription)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_preview_media_description(&self, value: &MediaCaptureVideoProfileMediaDescription) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_preview_media_description(&self, value: &MediaCaptureVideoProfileMediaDescription) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PreviewMediaDescription)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_record_media_description(&self) -> Result> { + }} + #[inline] pub fn get_record_media_description(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RecordMediaDescription)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_record_media_description(&self, value: &MediaCaptureVideoProfileMediaDescription) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_record_media_description(&self, value: &MediaCaptureVideoProfileMediaDescription) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RecordMediaDescription)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_photo_media_description(&self) -> Result> { + }} + #[inline] pub fn get_photo_media_description(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PhotoMediaDescription)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_photo_media_description(&self, value: &MediaCaptureVideoProfileMediaDescription) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_photo_media_description(&self, value: &MediaCaptureVideoProfileMediaDescription) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PhotoMediaDescription)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMediaCaptureInitializationSettings5, 3584222136, 9766, 20116, 183, 179, 83, 8, 160, 246, 75, 26); RT_INTERFACE!{interface IMediaCaptureInitializationSettings5(IMediaCaptureInitializationSettings5Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaCaptureInitializationSettings5] { @@ -5160,33 +5160,33 @@ RT_INTERFACE!{interface IMediaCaptureInitializationSettings5(IMediaCaptureInitia fn put_MemoryPreference(&self, value: MediaCaptureMemoryPreference) -> HRESULT }} impl IMediaCaptureInitializationSettings5 { - #[inline] pub unsafe fn get_source_group(&self) -> Result> { + #[inline] pub fn get_source_group(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SourceGroup)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_source_group(&self, value: &frames::MediaFrameSourceGroup) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_source_group(&self, value: &frames::MediaFrameSourceGroup) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SourceGroup)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_sharing_mode(&self) -> Result { + }} + #[inline] pub fn get_sharing_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SharingMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_sharing_mode(&self, value: MediaCaptureSharingMode) -> Result<()> { + }} + #[inline] pub fn set_sharing_mode(&self, value: MediaCaptureSharingMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SharingMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_memory_preference(&self) -> Result { + }} + #[inline] pub fn get_memory_preference(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MemoryPreference)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_memory_preference(&self, value: MediaCaptureMemoryPreference) -> Result<()> { + }} + #[inline] pub fn set_memory_preference(&self, value: MediaCaptureMemoryPreference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MemoryPreference)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMediaCaptureInitializationSettings6, 3001183047, 15793, 19763, 171, 99, 15, 250, 9, 5, 101, 133); RT_INTERFACE!{interface IMediaCaptureInitializationSettings6(IMediaCaptureInitializationSettings6Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaCaptureInitializationSettings6] { @@ -5194,15 +5194,15 @@ RT_INTERFACE!{interface IMediaCaptureInitializationSettings6(IMediaCaptureInitia fn put_AlwaysPlaySystemShutterSound(&self, value: bool) -> HRESULT }} impl IMediaCaptureInitializationSettings6 { - #[inline] pub unsafe fn get_always_play_system_shutter_sound(&self) -> Result { + #[inline] pub fn get_always_play_system_shutter_sound(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AlwaysPlaySystemShutterSound)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_always_play_system_shutter_sound(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_always_play_system_shutter_sound(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AlwaysPlaySystemShutterSound)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum MediaCaptureMemoryPreference: i32 { Auto (MediaCaptureMemoryPreference_Auto) = 0, Cpu (MediaCaptureMemoryPreference_Cpu) = 1, @@ -5210,19 +5210,19 @@ RT_ENUM! { enum MediaCaptureMemoryPreference: i32 { 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(&self, out: *mut *mut super::VideoFrame) -> HRESULT, - fn get_RecordDuration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + fn get_RecordDuration(&self, out: *mut foundation::TimeSpan) -> HRESULT }} impl IMediaCapturePauseResult { - #[inline] pub unsafe fn get_last_frame(&self) -> Result> { + #[inline] pub fn get_last_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LastFrame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_record_duration(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_record_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RecordDuration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MediaCapturePauseResult: IMediaCapturePauseResult} DEFINE_IID!(IID_IMediaCaptureSettings, 495168254, 27973, 17527, 141, 196, 172, 91, 192, 28, 64, 145); @@ -5234,31 +5234,31 @@ RT_INTERFACE!{interface IMediaCaptureSettings(IMediaCaptureSettingsVtbl): IInspe fn get_VideoDeviceCharacteristic(&self, out: *mut VideoDeviceCharacteristic) -> HRESULT }} impl IMediaCaptureSettings { - #[inline] pub unsafe fn get_audio_device_id(&self) -> Result { + #[inline] pub fn get_audio_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioDeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_device_id(&self) -> Result { + }} + #[inline] pub fn get_video_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoDeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_streaming_capture_mode(&self) -> Result { + }} + #[inline] pub fn get_streaming_capture_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StreamingCaptureMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_photo_capture_source(&self) -> Result { + }} + #[inline] pub fn get_photo_capture_source(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PhotoCaptureSource)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_device_characteristic(&self) -> Result { + }} + #[inline] pub fn get_video_device_characteristic(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VideoDeviceCharacteristic)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MediaCaptureSettings: IMediaCaptureSettings} DEFINE_IID!(IID_IMediaCaptureSettings2, 1872657659, 64159, 19219, 156, 190, 90, 185, 79, 31, 52, 147); @@ -5266,53 +5266,53 @@ RT_INTERFACE!{interface IMediaCaptureSettings2(IMediaCaptureSettings2Vtbl): IIns fn get_ConcurrentRecordAndPhotoSupported(&self, out: *mut bool) -> HRESULT, fn get_ConcurrentRecordAndPhotoSequenceSupported(&self, out: *mut bool) -> HRESULT, fn get_CameraSoundRequiredForRegion(&self, out: *mut bool) -> HRESULT, - fn get_Horizontal35mmEquivalentFocalLength(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_PitchOffsetDegrees(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_Vertical35mmEquivalentFocalLength(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_Horizontal35mmEquivalentFocalLength(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_PitchOffsetDegrees(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_Vertical35mmEquivalentFocalLength(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn get_MediaCategory(&self, out: *mut MediaCategory) -> HRESULT, fn get_AudioProcessing(&self, out: *mut super::AudioProcessing) -> HRESULT }} impl IMediaCaptureSettings2 { - #[inline] pub unsafe fn get_concurrent_record_and_photo_supported(&self) -> Result { + #[inline] pub fn get_concurrent_record_and_photo_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ConcurrentRecordAndPhotoSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_concurrent_record_and_photo_sequence_supported(&self) -> Result { + }} + #[inline] pub fn get_concurrent_record_and_photo_sequence_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ConcurrentRecordAndPhotoSequenceSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_camera_sound_required_for_region(&self) -> Result { + }} + #[inline] pub fn get_camera_sound_required_for_region(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CameraSoundRequiredForRegion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_horizontal35mm_equivalent_focal_length(&self) -> Result>> { + }} + #[inline] pub fn get_horizontal35mm_equivalent_focal_length(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Horizontal35mmEquivalentFocalLength)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pitch_offset_degrees(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_pitch_offset_degrees(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PitchOffsetDegrees)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_vertical35mm_equivalent_focal_length(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_vertical35mm_equivalent_focal_length(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Vertical35mmEquivalentFocalLength)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_media_category(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_media_category(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MediaCategory)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_processing(&self) -> Result { + }} + #[inline] pub fn get_audio_processing(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AudioProcessing)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum MediaCaptureSharingMode: i32 { ExclusiveControl (MediaCaptureSharingMode_ExclusiveControl) = 0, SharedReadOnly (MediaCaptureSharingMode_SharedReadOnly) = 1, @@ -5320,48 +5320,48 @@ RT_ENUM! { enum MediaCaptureSharingMode: i32 { 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(&self, videoDeviceId: HSTRING, out: *mut bool) -> HRESULT, - fn FindAllVideoProfiles(&self, videoDeviceId: HSTRING, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn FindConcurrentProfiles(&self, videoDeviceId: HSTRING, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn FindKnownVideoProfiles(&self, videoDeviceId: HSTRING, name: KnownVideoProfile, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn FindAllVideoProfiles(&self, videoDeviceId: HSTRING, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn FindConcurrentProfiles(&self, videoDeviceId: HSTRING, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn FindKnownVideoProfiles(&self, videoDeviceId: HSTRING, name: KnownVideoProfile, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IMediaCaptureStatics { - #[inline] pub unsafe fn is_video_profile_supported(&self, videoDeviceId: &HStringArg) -> Result { + #[inline] pub fn is_video_profile_supported(&self, videoDeviceId: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsVideoProfileSupported)(self as *const _ as *mut _, videoDeviceId.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn find_all_video_profiles(&self, videoDeviceId: &HStringArg) -> Result>> { + }} + #[inline] pub fn find_all_video_profiles(&self, videoDeviceId: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllVideoProfiles)(self as *const _ as *mut _, videoDeviceId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_concurrent_profiles(&self, videoDeviceId: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn find_concurrent_profiles(&self, videoDeviceId: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindConcurrentProfiles)(self as *const _ as *mut _, videoDeviceId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_known_video_profiles(&self, videoDeviceId: &HStringArg, name: KnownVideoProfile) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn find_known_video_profiles(&self, videoDeviceId: &HStringArg, name: KnownVideoProfile) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindKnownVideoProfiles)(self as *const _ as *mut _, videoDeviceId.get(), name, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut super::VideoFrame) -> HRESULT, - fn get_RecordDuration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + fn get_RecordDuration(&self, out: *mut foundation::TimeSpan) -> HRESULT }} impl IMediaCaptureStopResult { - #[inline] pub unsafe fn get_last_frame(&self) -> Result> { + #[inline] pub fn get_last_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LastFrame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_record_duration(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_record_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RecordDuration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MediaCaptureStopResult: IMediaCaptureStopResult} RT_ENUM! { enum MediaCaptureThermalStatus: i32 { @@ -5369,73 +5369,73 @@ RT_ENUM! { enum MediaCaptureThermalStatus: i32 { }} 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(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn StartPreviewToCustomSinkAsync(&self, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, customMediaSink: *mut super::IMediaExtension, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn StartPreviewToCustomSinkIdAsync(&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(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn StartPreviewAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn StartPreviewToCustomSinkAsync(&self, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, customMediaSink: *mut super::IMediaExtension, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn StartPreviewToCustomSinkIdAsync(&self, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, customSinkActivationId: HSTRING, customSinkSettings: *mut foundation::collections::IPropertySet, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn StopPreviewAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IMediaCaptureVideoPreview { - #[inline] pub unsafe fn start_preview_async(&self) -> Result> { + #[inline] pub fn start_preview_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartPreviewAsync)(self 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_async(&self, encodingProfile: &super::mediaproperties::MediaEncodingProfile, customMediaSink: &super::IMediaExtension) -> Result> { + }} + #[inline] pub fn start_preview_to_custom_sink_async(&self, encodingProfile: &super::mediaproperties::MediaEncodingProfile, customMediaSink: &super::IMediaExtension) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartPreviewToCustomSinkAsync)(self as *const _ as *mut _, 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(&self, encodingProfile: &super::mediaproperties::MediaEncodingProfile, customSinkActivationId: &HStringArg, customSinkSettings: &super::super::foundation::collections::IPropertySet) -> Result> { + }} + #[inline] pub fn start_preview_to_custom_sink_id_async(&self, encodingProfile: &super::mediaproperties::MediaEncodingProfile, customSinkActivationId: &HStringArg, customSinkSettings: &foundation::collections::IPropertySet) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartPreviewToCustomSinkIdAsync)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[inline] pub fn stop_preview_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StopPreviewAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(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(&self, out: *mut HSTRING) -> HRESULT, fn get_VideoDeviceId(&self, out: *mut HSTRING) -> HRESULT, - fn get_SupportedPreviewMediaDescription(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_SupportedRecordMediaDescription(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_SupportedPhotoMediaDescription(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn GetConcurrency(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_SupportedPreviewMediaDescription(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedRecordMediaDescription(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedPhotoMediaDescription(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn GetConcurrency(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IMediaCaptureVideoProfile { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_device_id(&self) -> Result { + }} + #[inline] pub fn get_video_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoDeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_preview_media_description(&self) -> Result>> { + }} + #[inline] pub fn get_supported_preview_media_description(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedPreviewMediaDescription)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_record_media_description(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_supported_record_media_description(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedRecordMediaDescription)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_photo_media_description(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_supported_photo_media_description(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedPhotoMediaDescription)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_concurrency(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_concurrency(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetConcurrency)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaCaptureVideoProfile: IMediaCaptureVideoProfile} DEFINE_IID!(IID_IMediaCaptureVideoProfileMediaDescription, 2148708335, 46737, 18943, 131, 242, 193, 231, 110, 170, 234, 27); @@ -5447,31 +5447,31 @@ RT_INTERFACE!{interface IMediaCaptureVideoProfileMediaDescription(IMediaCaptureV fn get_IsHdrVideoSupported(&self, out: *mut bool) -> HRESULT }} impl IMediaCaptureVideoProfileMediaDescription { - #[inline] pub unsafe fn get_width(&self) -> Result { + #[inline] pub fn get_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Width)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_height(&self) -> Result { + }} + #[inline] pub fn get_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Height)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_frame_rate(&self) -> Result { + }} + #[inline] pub fn get_frame_rate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FrameRate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_variable_photo_sequence_supported(&self) -> Result { + }} + #[inline] pub fn get_is_variable_photo_sequence_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsVariablePhotoSequenceSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_hdr_video_supported(&self) -> Result { + }} + #[inline] pub fn get_is_hdr_video_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsHdrVideoSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MediaCaptureVideoProfileMediaDescription: IMediaCaptureVideoProfileMediaDescription} RT_ENUM! { enum MediaCategory: i32 { @@ -5486,40 +5486,40 @@ RT_INTERFACE!{interface IOptionalReferencePhotoCapturedEventArgs(IOptionalRefere fn get_Context(&self, out: *mut *mut IInspectable) -> HRESULT }} impl IOptionalReferencePhotoCapturedEventArgs { - #[inline] pub unsafe fn get_frame(&self) -> Result> { + #[inline] pub fn get_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Frame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_context(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_context(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Context)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class OptionalReferencePhotoCapturedEventArgs: IOptionalReferencePhotoCapturedEventArgs} 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(&self, out: *mut *mut CapturedFrame) -> HRESULT, fn get_Thumbnail(&self, out: *mut *mut CapturedFrame) -> HRESULT, - fn get_CaptureTimeOffset(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + fn get_CaptureTimeOffset(&self, out: *mut foundation::TimeSpan) -> HRESULT }} impl IPhotoCapturedEventArgs { - #[inline] pub unsafe fn get_frame(&self) -> Result> { + #[inline] pub fn get_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Frame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_thumbnail(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_thumbnail(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Thumbnail)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_capture_time_offset(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_capture_time_offset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CaptureTimeOffset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PhotoCapturedEventArgs: IPhotoCapturedEventArgs} RT_ENUM! { enum PhotoCaptureSource: i32 { @@ -5528,19 +5528,19 @@ RT_ENUM! { enum PhotoCaptureSource: i32 { 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(&self, out: *mut *mut CapturedFrame) -> HRESULT, - fn get_CaptureTimeOffset(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + fn get_CaptureTimeOffset(&self, out: *mut foundation::TimeSpan) -> HRESULT }} impl IPhotoConfirmationCapturedEventArgs { - #[inline] pub unsafe fn get_frame(&self) -> Result> { + #[inline] pub fn get_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Frame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_capture_time_offset(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_capture_time_offset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CaptureTimeOffset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PhotoConfirmationCapturedEventArgs: IPhotoConfirmationCapturedEventArgs} RT_ENUM! { enum PowerlineFrequency: i32 { @@ -5551,10 +5551,10 @@ RT_DELEGATE!{delegate RecordLimitationExceededEventHandler(RecordLimitationExcee fn Invoke(&self, sender: *mut MediaCapture) -> HRESULT }} impl RecordLimitationExceededEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &MediaCapture) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &MediaCapture) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum StreamingCaptureMode: i32 { AudioAndVideo (StreamingCaptureMode_AudioAndVideo) = 0, Audio (StreamingCaptureMode_Audio) = 1, Video (StreamingCaptureMode_Video) = 2, @@ -5571,16 +5571,16 @@ RT_INTERFACE!{interface IVideoStreamConfiguration(IVideoStreamConfigurationVtbl) fn get_OutputProperties(&self, out: *mut *mut super::mediaproperties::VideoEncodingProperties) -> HRESULT }} impl IVideoStreamConfiguration { - #[inline] pub unsafe fn get_input_properties(&self) -> Result> { + #[inline] pub fn get_input_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InputProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_output_properties(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_output_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OutputProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class VideoStreamConfiguration: IVideoStreamConfiguration} RT_STRUCT! { struct WhiteBalanceGain { @@ -5594,16 +5594,16 @@ RT_INTERFACE!{interface IBufferMediaFrame(IBufferMediaFrameVtbl): IInspectable(I #[cfg(feature="windows-storage")] fn get_Buffer(&self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT }} impl IBufferMediaFrame { - #[inline] pub unsafe fn get_frame_reference(&self) -> Result> { + #[inline] pub fn get_frame_reference(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FrameReference)(self 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_buffer(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_buffer(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Buffer)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class BufferMediaFrame: IBufferMediaFrame} DEFINE_IID!(IID_IDepthMediaFrame, 1192451663, 34121, 17856, 146, 91, 128, 211, 94, 253, 177, 10); @@ -5614,26 +5614,26 @@ RT_INTERFACE!{interface IDepthMediaFrame(IDepthMediaFrameVtbl): IInspectable(IIn #[cfg(feature="windows-perception")] fn TryCreateCoordinateMapper(&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(&self) -> Result> { + #[inline] pub fn get_frame_reference(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FrameReference)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_media_frame(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_video_media_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoMediaFrame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_depth_format(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_depth_format(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DepthFormat)(self 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_create_coordinate_mapper(&self, cameraIntrinsics: &super::super::devices::core::CameraIntrinsics, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-perception")] #[inline] pub fn try_create_coordinate_mapper(&self, cameraIntrinsics: &super::super::devices::core::CameraIntrinsics, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryCreateCoordinateMapper)(self as *const _ as *mut _, cameraIntrinsics as *const _ as *mut _, coordinateSystem as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DepthMediaFrame: IDepthMediaFrame} DEFINE_IID!(IID_IDepthMediaFrame2, 1825195837, 50340, 16758, 176, 205, 51, 234, 227, 179, 90, 163); @@ -5642,16 +5642,16 @@ RT_INTERFACE!{interface IDepthMediaFrame2(IDepthMediaFrame2Vtbl): IInspectable(I fn get_MinReliableDepth(&self, out: *mut u32) -> HRESULT }} impl IDepthMediaFrame2 { - #[inline] pub unsafe fn get_max_reliable_depth(&self) -> Result { + #[inline] pub fn get_max_reliable_depth(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxReliableDepth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_reliable_depth(&self) -> Result { + }} + #[inline] pub fn get_min_reliable_depth(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinReliableDepth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(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] { @@ -5659,16 +5659,16 @@ RT_INTERFACE!{interface IDepthMediaFrameFormat(IDepthMediaFrameFormatVtbl): IIns fn get_DepthScaleInMeters(&self, out: *mut f64) -> HRESULT }} impl IDepthMediaFrameFormat { - #[inline] pub unsafe fn get_video_format(&self) -> Result> { + #[inline] pub fn get_video_format(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormat)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_depth_scale_in_meters(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_depth_scale_in_meters(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DepthScaleInMeters)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class DepthMediaFrameFormat: IDepthMediaFrameFormat} DEFINE_IID!(IID_IInfraredMediaFrame, 1070675203, 75, 20238, 145, 172, 70, 82, 153, 180, 22, 88); @@ -5678,21 +5678,21 @@ RT_INTERFACE!{interface IInfraredMediaFrame(IInfraredMediaFrameVtbl): IInspectab fn get_IsIlluminated(&self, out: *mut bool) -> HRESULT }} impl IInfraredMediaFrame { - #[inline] pub unsafe fn get_frame_reference(&self) -> Result> { + #[inline] pub fn get_frame_reference(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FrameReference)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_media_frame(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_video_media_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoMediaFrame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_illuminated(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_illuminated(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsIlluminated)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class InfraredMediaFrame: IInfraredMediaFrame} DEFINE_IID!(IID_IMediaFrameArrivedEventArgs, 188943069, 42128, 17461, 173, 161, 154, 255, 213, 82, 57, 247); @@ -5705,70 +5705,70 @@ RT_INTERFACE!{interface IMediaFrameFormat(IMediaFrameFormatVtbl): IInspectable(I fn get_MajorType(&self, out: *mut HSTRING) -> HRESULT, fn get_Subtype(&self, out: *mut HSTRING) -> HRESULT, fn get_FrameRate(&self, out: *mut *mut super::super::mediaproperties::MediaRatio) -> HRESULT, - fn get_Properties(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMapView) -> HRESULT, + fn get_Properties(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT, fn get_VideoFormat(&self, out: *mut *mut VideoMediaFrameFormat) -> HRESULT }} impl IMediaFrameFormat { - #[inline] pub unsafe fn get_major_type(&self) -> Result { + #[inline] pub fn get_major_type(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MajorType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_subtype(&self) -> Result { + }} + #[inline] pub fn get_subtype(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Subtype)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_frame_rate(&self) -> Result> { + }} + #[inline] pub fn get_frame_rate(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FrameRate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_format(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_video_format(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormat)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaFrameFormat: IMediaFrameFormat} 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(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_FrameArrived(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_FrameArrived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_FrameArrived(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn TryAcquireLatestFrame(&self, out: *mut *mut MediaFrameReference) -> HRESULT, - fn StartAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn StopAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn StartAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn StopAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IMediaFrameReader { - #[inline] pub unsafe fn add_frame_arrived(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub fn add_frame_arrived(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_FrameArrived)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_frame_arrived(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_frame_arrived(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_FrameArrived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn try_acquire_latest_frame(&self) -> Result> { + }} + #[inline] pub fn try_acquire_latest_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryAcquireLatestFrame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn start_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn start_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn stop_async(&self) -> Result> { + }} + #[inline] pub fn stop_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StopAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class MediaFrameReader: IMediaFrameReader} DEFINE_IID!(IID_IMediaFrameReader2, 2266048435, 34097, 16464, 135, 204, 161, 55, 51, 207, 62, 155); @@ -5777,15 +5777,15 @@ RT_INTERFACE!{interface IMediaFrameReader2(IMediaFrameReader2Vtbl): IInspectable fn get_AcquisitionMode(&self, out: *mut MediaFrameReaderAcquisitionMode) -> HRESULT }} impl IMediaFrameReader2 { - #[inline] pub unsafe fn set_acquisition_mode(&self, value: MediaFrameReaderAcquisitionMode) -> Result<()> { + #[inline] pub fn set_acquisition_mode(&self, value: MediaFrameReaderAcquisitionMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AcquisitionMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_acquisition_mode(&self) -> Result { + }} + #[inline] pub fn get_acquisition_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AcquisitionMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum MediaFrameReaderAcquisitionMode: i32 { Realtime (MediaFrameReaderAcquisitionMode_Realtime) = 0, Buffered (MediaFrameReaderAcquisitionMode_Buffered) = 1, @@ -5797,149 +5797,149 @@ DEFINE_IID!(IID_IMediaFrameReference, 4139288129, 61660, 16452, 141, 201, 150, 2 RT_INTERFACE!{interface IMediaFrameReference(IMediaFrameReferenceVtbl): IInspectable(IInspectableVtbl) [IID_IMediaFrameReference] { fn get_SourceKind(&self, out: *mut MediaFrameSourceKind) -> HRESULT, fn get_Format(&self, out: *mut *mut MediaFrameFormat) -> HRESULT, - fn get_SystemRelativeTime(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::TimeSpan>) -> HRESULT, - fn get_Duration(&self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn get_Properties(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMapView) -> HRESULT, + fn get_SystemRelativeTime(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_Duration(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_Properties(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT, fn get_BufferMediaFrame(&self, out: *mut *mut BufferMediaFrame) -> HRESULT, fn get_VideoMediaFrame(&self, out: *mut *mut VideoMediaFrame) -> HRESULT, #[cfg(feature="windows-perception")] fn get_CoordinateSystem(&self, out: *mut *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> HRESULT }} impl IMediaFrameReference { - #[inline] pub unsafe fn get_source_kind(&self) -> Result { + #[inline] pub fn get_source_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SourceKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_format(&self) -> Result> { + }} + #[inline] pub fn get_format(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Format)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_system_relative_time(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_system_relative_time(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SystemRelativeTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_duration(&self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Duration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_buffer_media_frame(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_buffer_media_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BufferMediaFrame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_media_frame(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_video_media_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoMediaFrame)(self 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 get_coordinate_system(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-perception")] #[inline] pub fn get_coordinate_system(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CoordinateSystem)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaFrameReference: IMediaFrameReference} 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(&self, out: *mut *mut MediaFrameSourceInfo) -> HRESULT, fn get_Controller(&self, out: *mut *mut MediaFrameSourceController) -> HRESULT, - fn get_SupportedFormats(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedFormats(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_CurrentFormat(&self, out: *mut *mut MediaFrameFormat) -> HRESULT, - fn SetFormatAsync(&self, format: *mut MediaFrameFormat, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn add_FormatChanged(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_FormatChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn SetFormatAsync(&self, format: *mut MediaFrameFormat, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn add_FormatChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_FormatChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn TryGetCameraIntrinsics(&self, format: *mut MediaFrameFormat, out: *mut *mut super::super::devices::core::CameraIntrinsics) -> HRESULT }} impl IMediaFrameSource { - #[inline] pub unsafe fn get_info(&self) -> Result> { + #[inline] pub fn get_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Info)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_controller(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_controller(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Controller)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_formats(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_supported_formats(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedFormats)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_format(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_current_format(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CurrentFormat)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_format_async(&self, format: &MediaFrameFormat) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_format_async(&self, format: &MediaFrameFormat) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetFormatAsync)(self as *const _ as *mut _, 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(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_format_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_FormatChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_format_changed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_format_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_FormatChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn try_get_camera_intrinsics(&self, format: &MediaFrameFormat) -> Result> { + }} + #[inline] pub fn try_get_camera_intrinsics(&self, format: &MediaFrameFormat) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetCameraIntrinsics)(self as *const _ as *mut _, format as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaFrameSource: IMediaFrameSource} 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(&self, propertyId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn SetPropertyAsync(&self, propertyId: HSTRING, propertyValue: *mut IInspectable, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn GetPropertyAsync(&self, propertyId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn SetPropertyAsync(&self, propertyId: HSTRING, propertyValue: *mut IInspectable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn get_VideoDeviceController(&self, out: *mut *mut super::super::devices::VideoDeviceController) -> HRESULT }} impl IMediaFrameSourceController { - #[inline] pub unsafe fn get_property_async(&self, propertyId: &HStringArg) -> Result>> { + #[inline] pub fn get_property_async(&self, propertyId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPropertyAsync)(self as *const _ as *mut _, propertyId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_property_async(&self, propertyId: &HStringArg, propertyValue: &IInspectable) -> Result>> { + }} + #[inline] pub fn set_property_async(&self, propertyId: &HStringArg, propertyValue: &IInspectable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetPropertyAsync)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[inline] pub fn get_video_device_controller(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoDeviceController)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaFrameSourceController: IMediaFrameSourceController} DEFINE_IID!(IID_IMediaFrameSourceController2, 4022640596, 64754, 18947, 180, 228, 172, 150, 40, 115, 155, 238); RT_INTERFACE!{interface IMediaFrameSourceController2(IMediaFrameSourceController2Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaFrameSourceController2] { - fn GetPropertyByExtendedIdAsync(&self, extendedPropertyIdSize: u32, extendedPropertyId: *mut u8, maxPropertyValueSize: *mut ::rt::gen::windows::foundation::IReference, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn SetPropertyByExtendedIdAsync(&self, extendedPropertyIdSize: u32, extendedPropertyId: *mut u8, propertyValueSize: u32, propertyValue: *mut u8, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn GetPropertyByExtendedIdAsync(&self, extendedPropertyIdSize: u32, extendedPropertyId: *mut u8, maxPropertyValueSize: *mut foundation::IReference, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn SetPropertyByExtendedIdAsync(&self, extendedPropertyIdSize: u32, extendedPropertyId: *mut u8, propertyValueSize: u32, propertyValue: *mut u8, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IMediaFrameSourceController2 { - #[inline] pub unsafe fn get_property_by_extended_id_async(&self, extendedPropertyId: &[u8], maxPropertyValueSize: &::rt::gen::windows::foundation::IReference) -> Result>> { + #[inline] pub fn get_property_by_extended_id_async(&self, extendedPropertyId: &[u8], maxPropertyValueSize: &foundation::IReference) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPropertyByExtendedIdAsync)(self as *const _ as *mut _, extendedPropertyId.len() as u32, extendedPropertyId.as_ptr() as *mut _, maxPropertyValueSize as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_property_by_extended_id_async(&self, extendedPropertyId: &[u8], propertyValue: &[u8]) -> Result>> { + }} + #[inline] pub fn set_property_by_extended_id_async(&self, extendedPropertyId: &[u8], propertyValue: &[u8]) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetPropertyByExtendedIdAsync)(self as *const _ as *mut _, extendedPropertyId.len() as u32, extendedPropertyId.as_ptr() as *mut _, propertyValue.len() as u32, propertyValue.as_ptr() as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMediaFrameSourceGetPropertyResult, 143005378, 14948, 19413, 189, 43, 231, 200, 152, 210, 243, 122); RT_INTERFACE!{interface IMediaFrameSourceGetPropertyResult(IMediaFrameSourceGetPropertyResultVtbl): IInspectable(IInspectableVtbl) [IID_IMediaFrameSourceGetPropertyResult] { @@ -5947,16 +5947,16 @@ RT_INTERFACE!{interface IMediaFrameSourceGetPropertyResult(IMediaFrameSourceGetP fn get_Value(&self, out: *mut *mut IInspectable) -> HRESULT }} impl IMediaFrameSourceGetPropertyResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result> { + }} + #[inline] pub fn get_value(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaFrameSourceGetPropertyResult: IMediaFrameSourceGetPropertyResult} RT_ENUM! { enum MediaFrameSourceGetPropertyStatus: i32 { @@ -5966,61 +5966,61 @@ DEFINE_IID!(IID_IMediaFrameSourceGroup, 2137021319, 18482, 19295, 174, 61, 65, 4 RT_INTERFACE!{interface IMediaFrameSourceGroup(IMediaFrameSourceGroupVtbl): IInspectable(IInspectableVtbl) [IID_IMediaFrameSourceGroup] { fn get_Id(&self, out: *mut HSTRING) -> HRESULT, fn get_DisplayName(&self, out: *mut HSTRING) -> HRESULT, - fn get_SourceInfos(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn get_SourceInfos(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IMediaFrameSourceGroup { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_source_infos(&self) -> Result>> { + }} + #[inline] pub fn get_source_infos(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SourceInfos)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaFrameSourceGroup: IMediaFrameSourceGroup} impl RtActivatable for MediaFrameSourceGroup {} impl MediaFrameSourceGroup { - #[inline] pub fn find_all_async() -> Result>>> { unsafe { + #[inline] pub fn find_all_async() -> Result>>> { >::get_activation_factory().find_all_async() - }} - #[inline] pub fn from_id_async(id: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(id: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(id) - }} - #[inline] pub fn get_device_selector() -> Result { unsafe { + } + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} + } } DEFINE_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]) [CLSID_MediaFrameSourceGroup]); 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(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, - fn FromIdAsync(&self, id: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn FindAllAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn FromIdAsync(&self, id: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetDeviceSelector(&self, out: *mut HSTRING) -> HRESULT }} impl IMediaFrameSourceGroupStatics { - #[inline] pub unsafe fn find_all_async(&self) -> Result>>> { + #[inline] pub fn find_all_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, id: &HStringArg) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, id: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, id.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + }} + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &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] { @@ -6030,45 +6030,45 @@ RT_INTERFACE!{interface IMediaFrameSourceInfo(IMediaFrameSourceInfoVtbl): IInspe fn get_SourceGroup(&self, out: *mut *mut MediaFrameSourceGroup) -> HRESULT, #[cfg(not(feature="windows-devices"))] fn __Dummy4(&self) -> (), #[cfg(feature="windows-devices")] fn get_DeviceInformation(&self, out: *mut *mut ::rt::gen::windows::devices::enumeration::DeviceInformation) -> HRESULT, - fn get_Properties(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMapView) -> HRESULT, + fn get_Properties(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT, #[cfg(feature="windows-perception")] fn get_CoordinateSystem(&self, out: *mut *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> HRESULT }} impl IMediaFrameSourceInfo { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_media_stream_type(&self) -> Result { + }} + #[inline] pub fn get_media_stream_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MediaStreamType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_source_kind(&self) -> Result { + }} + #[inline] pub fn get_source_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SourceKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_source_group(&self) -> Result> { + }} + #[inline] pub fn get_source_group(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SourceGroup)(self 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_device_information(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_device_information(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceInformation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self 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 get_coordinate_system(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-perception")] #[inline] pub fn get_coordinate_system(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CoordinateSystem)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaFrameSourceInfo: IMediaFrameSourceInfo} RT_ENUM! { enum MediaFrameSourceKind: i32 { @@ -6084,37 +6084,37 @@ RT_INTERFACE!{interface IMultiSourceMediaFrameArrivedEventArgs(IMultiSourceMedia RT_CLASS!{class MultiSourceMediaFrameArrivedEventArgs: IMultiSourceMediaFrameArrivedEventArgs} DEFINE_IID!(IID_IMultiSourceMediaFrameReader, 2366915586, 63331, 18573, 152, 242, 180, 55, 188, 240, 117, 231); RT_INTERFACE!{interface IMultiSourceMediaFrameReader(IMultiSourceMediaFrameReaderVtbl): IInspectable(IInspectableVtbl) [IID_IMultiSourceMediaFrameReader] { - fn add_FrameArrived(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_FrameArrived(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_FrameArrived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_FrameArrived(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn TryAcquireLatestFrame(&self, out: *mut *mut MultiSourceMediaFrameReference) -> HRESULT, - fn StartAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn StopAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn StartAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn StopAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IMultiSourceMediaFrameReader { - #[inline] pub unsafe fn add_frame_arrived(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub fn add_frame_arrived(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_FrameArrived)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_frame_arrived(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_frame_arrived(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_FrameArrived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn try_acquire_latest_frame(&self) -> Result> { + }} + #[inline] pub fn try_acquire_latest_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryAcquireLatestFrame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn start_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn start_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn stop_async(&self) -> Result> { + }} + #[inline] pub fn stop_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StopAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class MultiSourceMediaFrameReader: IMultiSourceMediaFrameReader} DEFINE_IID!(IID_IMultiSourceMediaFrameReader2, 4015819453, 64604, 19563, 157, 129, 60, 185, 204, 99, 124, 38); @@ -6123,15 +6123,15 @@ RT_INTERFACE!{interface IMultiSourceMediaFrameReader2(IMultiSourceMediaFrameRead fn get_AcquisitionMode(&self, out: *mut MediaFrameReaderAcquisitionMode) -> HRESULT }} impl IMultiSourceMediaFrameReader2 { - #[inline] pub unsafe fn set_acquisition_mode(&self, value: MediaFrameReaderAcquisitionMode) -> Result<()> { + #[inline] pub fn set_acquisition_mode(&self, value: MediaFrameReaderAcquisitionMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AcquisitionMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_acquisition_mode(&self) -> Result { + }} + #[inline] pub fn get_acquisition_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AcquisitionMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum MultiSourceMediaFrameReaderStartStatus: i32 { Success (MultiSourceMediaFrameReaderStartStatus_Success) = 0, NotSupported (MultiSourceMediaFrameReaderStartStatus_NotSupported) = 1, InsufficientResources (MultiSourceMediaFrameReaderStartStatus_InsufficientResources) = 2, DeviceNotAvailable (MultiSourceMediaFrameReaderStartStatus_DeviceNotAvailable) = 3, UnknownFailure (MultiSourceMediaFrameReaderStartStatus_UnknownFailure) = 4, @@ -6141,11 +6141,11 @@ RT_INTERFACE!{interface IMultiSourceMediaFrameReference(IMultiSourceMediaFrameRe fn TryGetFrameReferenceBySourceId(&self, sourceId: HSTRING, out: *mut *mut MediaFrameReference) -> HRESULT }} impl IMultiSourceMediaFrameReference { - #[inline] pub unsafe fn try_get_frame_reference_by_source_id(&self, sourceId: &HStringArg) -> Result> { + #[inline] pub fn try_get_frame_reference_by_source_id(&self, sourceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetFrameReferenceBySourceId)(self as *const _ as *mut _, sourceId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MultiSourceMediaFrameReference: IMultiSourceMediaFrameReference} DEFINE_IID!(IID_IVideoMediaFrame, 14503115, 12989, 20449, 160, 19, 124, 193, 60, 245, 219, 207); @@ -6162,46 +6162,46 @@ RT_INTERFACE!{interface IVideoMediaFrame(IVideoMediaFrameVtbl): IInspectable(IIn fn GetVideoFrame(&self, out: *mut *mut super::super::VideoFrame) -> HRESULT }} impl IVideoMediaFrame { - #[inline] pub unsafe fn get_frame_reference(&self) -> Result> { + #[inline] pub fn get_frame_reference(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FrameReference)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_format(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_video_format(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormat)(self 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_software_bitmap(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_software_bitmap(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SoftwareBitmap)(self 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(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_direct3_dsurface(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Direct3DSurface)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_camera_intrinsics(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_camera_intrinsics(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CameraIntrinsics)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_infrared_media_frame(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_infrared_media_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InfraredMediaFrame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_depth_media_frame(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_depth_media_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DepthMediaFrame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_frame(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_video_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetVideoFrame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class VideoMediaFrame: IVideoMediaFrame} DEFINE_IID!(IID_IVideoMediaFrameFormat, 1174568896, 55067, 17863, 143, 20, 109, 154, 10, 230, 4, 228); @@ -6212,26 +6212,26 @@ RT_INTERFACE!{interface IVideoMediaFrameFormat(IVideoMediaFrameFormatVtbl): IIns fn get_Height(&self, out: *mut u32) -> HRESULT }} impl IVideoMediaFrameFormat { - #[inline] pub unsafe fn get_media_frame_format(&self) -> Result> { + #[inline] pub fn get_media_frame_format(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MediaFrameFormat)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_depth_format(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_depth_format(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DepthFormat)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_width(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Width)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_height(&self) -> Result { + }} + #[inline] pub fn get_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Height)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class VideoMediaFrameFormat: IVideoMediaFrameFormat} } // Windows.Media.Capture.Frames @@ -6240,89 +6240,89 @@ use ::prelude::*; 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(&self, out: *mut *mut super::CapturedFrame) -> HRESULT, - fn get_CaptureTimeOffset(&self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn get_UsedFrameControllerIndex(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_CaptureTimeOffset(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_UsedFrameControllerIndex(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn get_CapturedFrameControlValues(&self, out: *mut *mut super::CapturedFrameControlValues) -> HRESULT }} impl IVariablePhotoCapturedEventArgs { - #[inline] pub unsafe fn get_frame(&self) -> Result> { + #[inline] pub fn get_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Frame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_capture_time_offset(&self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_capture_time_offset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CaptureTimeOffset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_used_frame_controller_index(&self) -> Result>> { + }} + #[inline] pub fn get_used_frame_controller_index(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UsedFrameControllerIndex)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_captured_frame_control_values(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_captured_frame_control_values(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CapturedFrameControlValues)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn StopAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn FinishAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn add_PhotoCaptured(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PhotoCaptured(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_Stopped(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Stopped(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn StartAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn StopAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn FinishAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn add_PhotoCaptured(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PhotoCaptured(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Stopped(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Stopped(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IVariablePhotoSequenceCapture { - #[inline] pub unsafe fn start_async(&self) -> Result> { + #[inline] pub fn start_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn stop_async(&self) -> Result> { + }} + #[inline] pub fn stop_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StopAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn finish_async(&self) -> Result> { + }} + #[inline] pub fn finish_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FinishAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_photo_captured(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_photo_captured(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PhotoCaptured)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_photo_captured(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_photo_captured(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PhotoCaptured)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_stopped(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_stopped(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Stopped)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_stopped(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_stopped(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Stopped)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class VariablePhotoSequenceCapture: IVariablePhotoSequenceCapture} 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(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn UpdateSettingsAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IVariablePhotoSequenceCapture2 { - #[inline] pub unsafe fn update_settings_async(&self) -> Result> { + #[inline] pub fn update_settings_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UpdateSettingsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } } // Windows.Media.Capture.Core } // Windows.Media.Capture @@ -6331,44 +6331,44 @@ use ::prelude::*; DEFINE_IID!(IID_IAppRecordingManager, 3890372726, 41028, 18658, 165, 18, 48, 148, 213, 116, 199, 204); RT_INTERFACE!{interface IAppRecordingManager(IAppRecordingManagerVtbl): IInspectable(IInspectableVtbl) [IID_IAppRecordingManager] { fn GetStatus(&self, out: *mut *mut AppRecordingStatus) -> HRESULT, - #[cfg(feature="windows-storage")] fn StartRecordingToFileAsync(&self, file: *mut super::super::storage::StorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn RecordTimeSpanToFileAsync(&self, startTime: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan, file: *mut super::super::storage::StorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn get_SupportedScreenshotMediaEncodingSubtypes(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - #[cfg(feature="windows-storage")] fn SaveScreenshotToFilesAsync(&self, folder: *mut super::super::storage::StorageFolder, filenamePrefix: HSTRING, option: AppRecordingSaveScreenshotOption, requestedFormats: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn StartRecordingToFileAsync(&self, file: *mut super::super::storage::StorageFile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn RecordTimeSpanToFileAsync(&self, startTime: foundation::DateTime, duration: foundation::TimeSpan, file: *mut super::super::storage::StorageFile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn get_SupportedScreenshotMediaEncodingSubtypes(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + #[cfg(feature="windows-storage")] fn SaveScreenshotToFilesAsync(&self, folder: *mut super::super::storage::StorageFolder, filenamePrefix: HSTRING, option: AppRecordingSaveScreenshotOption, requestedFormats: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IAppRecordingManager { - #[inline] pub unsafe fn get_status(&self) -> Result> { + #[inline] pub fn get_status(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetStatus)(self 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_recording_to_file_async(&self, file: &super::super::storage::StorageFile) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn start_recording_to_file_async(&self, file: &super::super::storage::StorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartRecordingToFileAsync)(self 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 record_time_span_to_file_async(&self, startTime: super::super::foundation::DateTime, duration: super::super::foundation::TimeSpan, file: &super::super::storage::StorageFile) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn record_time_span_to_file_async(&self, startTime: foundation::DateTime, duration: foundation::TimeSpan, file: &super::super::storage::StorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RecordTimeSpanToFileAsync)(self as *const _ as *mut _, startTime, duration, file as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_screenshot_media_encoding_subtypes(&self) -> Result>> { + }} + #[inline] pub fn get_supported_screenshot_media_encoding_subtypes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedScreenshotMediaEncodingSubtypes)(self 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_screenshot_to_files_async(&self, folder: &super::super::storage::StorageFolder, filenamePrefix: &HStringArg, option: AppRecordingSaveScreenshotOption, requestedFormats: &super::super::foundation::collections::IIterable) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn save_screenshot_to_files_async(&self, folder: &super::super::storage::StorageFolder, filenamePrefix: &HStringArg, option: AppRecordingSaveScreenshotOption, requestedFormats: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveScreenshotToFilesAsync)(self as *const _ as *mut _, folder as *const _ as *mut _, filenamePrefix.get(), option, requestedFormats as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class AppRecordingManager: IAppRecordingManager} impl RtActivatable for AppRecordingManager {} impl AppRecordingManager { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} + } } DEFINE_CLSID!(AppRecordingManager(&[87,105,110,100,111,119,115,46,77,101,100,105,97,46,65,112,112,82,101,99,111,114,100,105,110,103,46,65,112,112,82,101,99,111,114,100,105,110,103,77,97,110,97,103,101,114,0]) [CLSID_AppRecordingManager]); DEFINE_IID!(IID_IAppRecordingManagerStatics, 1357318647, 14542, 19411, 157, 178, 231, 43, 190, 157, 225, 29); @@ -6376,40 +6376,40 @@ RT_INTERFACE!{static interface IAppRecordingManagerStatics(IAppRecordingManagerS fn GetDefault(&self, out: *mut *mut AppRecordingManager) -> HRESULT }} impl IAppRecordingManagerStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IAppRecordingResult, 982517860, 50797, 18169, 178, 217, 91, 194, 218, 208, 112, 215); RT_INTERFACE!{interface IAppRecordingResult(IAppRecordingResultVtbl): IInspectable(IInspectableVtbl) [IID_IAppRecordingResult] { fn get_Succeeded(&self, out: *mut bool) -> HRESULT, - fn get_ExtendedError(&self, out: *mut super::super::foundation::HResult) -> HRESULT, - fn get_Duration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_ExtendedError(&self, out: *mut foundation::HResult) -> HRESULT, + fn get_Duration(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn get_IsFileTruncated(&self, out: *mut bool) -> HRESULT }} impl IAppRecordingResult { - #[inline] pub unsafe fn get_succeeded(&self) -> Result { + #[inline] pub fn get_succeeded(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Succeeded)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_error(&self) -> Result { + }} + #[inline] pub fn get_extended_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_duration(&self) -> Result { + }} + #[inline] pub fn get_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Duration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_file_truncated(&self) -> Result { + }} + #[inline] pub fn get_is_file_truncated(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsFileTruncated)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppRecordingResult: IAppRecordingResult} DEFINE_IID!(IID_IAppRecordingSavedScreenshotInfo, 2607033610, 6298, 19712, 191, 37, 225, 187, 18, 73, 213, 148); @@ -6419,16 +6419,16 @@ RT_INTERFACE!{interface IAppRecordingSavedScreenshotInfo(IAppRecordingSavedScree fn get_MediaEncodingSubtype(&self, out: *mut HSTRING) -> HRESULT }} impl IAppRecordingSavedScreenshotInfo { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_file(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_file(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_File)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_media_encoding_subtype(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_media_encoding_subtype(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MediaEncodingSubtype)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class AppRecordingSavedScreenshotInfo: IAppRecordingSavedScreenshotInfo} RT_ENUM! { enum AppRecordingSaveScreenshotOption: i32 { @@ -6437,55 +6437,55 @@ RT_ENUM! { enum AppRecordingSaveScreenshotOption: i32 { DEFINE_IID!(IID_IAppRecordingSaveScreenshotResult, 2623245578, 2747, 17495, 170, 238, 36, 249, 193, 46, 199, 120); RT_INTERFACE!{interface IAppRecordingSaveScreenshotResult(IAppRecordingSaveScreenshotResultVtbl): IInspectable(IInspectableVtbl) [IID_IAppRecordingSaveScreenshotResult] { fn get_Succeeded(&self, out: *mut bool) -> HRESULT, - fn get_ExtendedError(&self, out: *mut super::super::foundation::HResult) -> HRESULT, - fn get_SavedScreenshotInfos(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_ExtendedError(&self, out: *mut foundation::HResult) -> HRESULT, + fn get_SavedScreenshotInfos(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IAppRecordingSaveScreenshotResult { - #[inline] pub unsafe fn get_succeeded(&self) -> Result { + #[inline] pub fn get_succeeded(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Succeeded)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_error(&self) -> Result { + }} + #[inline] pub fn get_extended_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_saved_screenshot_infos(&self) -> Result>> { + }} + #[inline] pub fn get_saved_screenshot_infos(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SavedScreenshotInfos)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppRecordingSaveScreenshotResult: IAppRecordingSaveScreenshotResult} DEFINE_IID!(IID_IAppRecordingStatus, 487376940, 48152, 19338, 166, 239, 18, 126, 250, 179, 181, 217); RT_INTERFACE!{interface IAppRecordingStatus(IAppRecordingStatusVtbl): IInspectable(IInspectableVtbl) [IID_IAppRecordingStatus] { fn get_CanRecord(&self, out: *mut bool) -> HRESULT, fn get_CanRecordTimeSpan(&self, out: *mut bool) -> HRESULT, - fn get_HistoricalBufferDuration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_HistoricalBufferDuration(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn get_Details(&self, out: *mut *mut AppRecordingStatusDetails) -> HRESULT }} impl IAppRecordingStatus { - #[inline] pub unsafe fn get_can_record(&self) -> Result { + #[inline] pub fn get_can_record(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanRecord)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_record_time_span(&self) -> Result { + }} + #[inline] pub fn get_can_record_time_span(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanRecordTimeSpan)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_historical_buffer_duration(&self) -> Result { + }} + #[inline] pub fn get_historical_buffer_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HistoricalBufferDuration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_details(&self) -> Result> { + }} + #[inline] pub fn get_details(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Details)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppRecordingStatus: IAppRecordingStatus} DEFINE_IID!(IID_IAppRecordingStatusDetails, 3040389552, 5357, 17426, 172, 69, 109, 103, 44, 156, 153, 73); @@ -6501,51 +6501,51 @@ RT_INTERFACE!{interface IAppRecordingStatusDetails(IAppRecordingStatusDetailsVtb fn get_IsDisabledBySystem(&self, out: *mut bool) -> HRESULT }} impl IAppRecordingStatusDetails { - #[inline] pub unsafe fn get_is_any_app_broadcasting(&self) -> Result { + #[inline] pub fn get_is_any_app_broadcasting(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsAnyAppBroadcasting)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_capture_resource_unavailable(&self) -> Result { + }} + #[inline] pub fn get_is_capture_resource_unavailable(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCaptureResourceUnavailable)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_game_stream_in_progress(&self) -> Result { + }} + #[inline] pub fn get_is_game_stream_in_progress(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsGameStreamInProgress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_time_span_recording_disabled(&self) -> Result { + }} + #[inline] pub fn get_is_time_span_recording_disabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsTimeSpanRecordingDisabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_gpu_constrained(&self) -> Result { + }} + #[inline] pub fn get_is_gpu_constrained(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsGpuConstrained)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_app_inactive(&self) -> Result { + }} + #[inline] pub fn get_is_app_inactive(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsAppInactive)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_blocked_for_app(&self) -> Result { + }} + #[inline] pub fn get_is_blocked_for_app(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsBlockedForApp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_disabled_by_user(&self) -> Result { + }} + #[inline] pub fn get_is_disabled_by_user(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDisabledByUser)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_disabled_by_system(&self) -> Result { + }} + #[inline] pub fn get_is_disabled_by_system(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDisabledBySystem)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppRecordingStatusDetails: IAppRecordingStatusDetails} } // Windows.Media.AppRecording @@ -6554,24 +6554,24 @@ use ::prelude::*; DEFINE_IID!(IID_IAppBroadcastingMonitor, 16341608, 35079, 18592, 184, 239, 36, 210, 8, 19, 117, 66); RT_INTERFACE!{interface IAppBroadcastingMonitor(IAppBroadcastingMonitorVtbl): IInspectable(IInspectableVtbl) [IID_IAppBroadcastingMonitor] { fn get_IsCurrentAppBroadcasting(&self, out: *mut bool) -> HRESULT, - fn add_IsCurrentAppBroadcastingChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_IsCurrentAppBroadcastingChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_IsCurrentAppBroadcastingChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_IsCurrentAppBroadcastingChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IAppBroadcastingMonitor { - #[inline] pub unsafe fn get_is_current_app_broadcasting(&self) -> Result { + #[inline] pub fn get_is_current_app_broadcasting(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCurrentAppBroadcasting)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_is_current_app_broadcasting_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_is_current_app_broadcasting_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_IsCurrentAppBroadcastingChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_is_current_app_broadcasting_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_is_current_app_broadcasting_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_IsCurrentAppBroadcastingChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AppBroadcastingMonitor: IAppBroadcastingMonitor} impl RtActivatable for AppBroadcastingMonitor {} @@ -6582,16 +6582,16 @@ RT_INTERFACE!{interface IAppBroadcastingStatus(IAppBroadcastingStatusVtbl): IIns fn get_Details(&self, out: *mut *mut AppBroadcastingStatusDetails) -> HRESULT }} impl IAppBroadcastingStatus { - #[inline] pub unsafe fn get_can_start_broadcast(&self) -> Result { + #[inline] pub fn get_can_start_broadcast(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanStartBroadcast)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_details(&self) -> Result> { + }} + #[inline] pub fn get_details(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Details)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppBroadcastingStatus: IAppBroadcastingStatus} DEFINE_IID!(IID_IAppBroadcastingStatusDetails, 110996900, 46451, 20028, 142, 25, 27, 175, 172, 208, 151, 19); @@ -6606,46 +6606,46 @@ RT_INTERFACE!{interface IAppBroadcastingStatusDetails(IAppBroadcastingStatusDeta fn get_IsDisabledBySystem(&self, out: *mut bool) -> HRESULT }} impl IAppBroadcastingStatusDetails { - #[inline] pub unsafe fn get_is_any_app_broadcasting(&self) -> Result { + #[inline] pub fn get_is_any_app_broadcasting(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsAnyAppBroadcasting)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_capture_resource_unavailable(&self) -> Result { + }} + #[inline] pub fn get_is_capture_resource_unavailable(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCaptureResourceUnavailable)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_game_stream_in_progress(&self) -> Result { + }} + #[inline] pub fn get_is_game_stream_in_progress(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsGameStreamInProgress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_gpu_constrained(&self) -> Result { + }} + #[inline] pub fn get_is_gpu_constrained(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsGpuConstrained)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_app_inactive(&self) -> Result { + }} + #[inline] pub fn get_is_app_inactive(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsAppInactive)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_blocked_for_app(&self) -> Result { + }} + #[inline] pub fn get_is_blocked_for_app(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsBlockedForApp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_disabled_by_user(&self) -> Result { + }} + #[inline] pub fn get_is_disabled_by_user(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDisabledByUser)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_disabled_by_system(&self) -> Result { + }} + #[inline] pub fn get_is_disabled_by_system(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDisabledBySystem)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppBroadcastingStatusDetails: IAppBroadcastingStatusDetails} DEFINE_IID!(IID_IAppBroadcastingUI, 3849297807, 61081, 19914, 163, 195, 112, 175, 61, 180, 79, 95); @@ -6654,25 +6654,25 @@ RT_INTERFACE!{interface IAppBroadcastingUI(IAppBroadcastingUIVtbl): IInspectable fn ShowBroadcastUI(&self) -> HRESULT }} impl IAppBroadcastingUI { - #[inline] pub unsafe fn get_status(&self) -> Result> { + #[inline] pub fn get_status(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetStatus)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn show_broadcast_ui(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn show_broadcast_ui(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ShowBroadcastUI)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AppBroadcastingUI: IAppBroadcastingUI} impl RtActivatable for AppBroadcastingUI {} impl AppBroadcastingUI { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} - #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::super::system::User) -> Result> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::super::system::User) -> Result>> { >::get_activation_factory().get_for_user(user) - }} + } } DEFINE_CLSID!(AppBroadcastingUI(&[87,105,110,100,111,119,115,46,77,101,100,105,97,46,65,112,112,66,114,111,97,100,99,97,115,116,105,110,103,46,65,112,112,66,114,111,97,100,99,97,115,116,105,110,103,85,73,0]) [CLSID_AppBroadcastingUI]); DEFINE_IID!(IID_IAppBroadcastingUIStatics, 1437116317, 9163, 17785, 156, 52, 136, 111, 224, 44, 4, 90); @@ -6681,16 +6681,16 @@ RT_INTERFACE!{static interface IAppBroadcastingUIStatics(IAppBroadcastingUIStati #[cfg(feature="windows-system")] fn GetForUser(&self, user: *mut super::super::system::User, out: *mut *mut AppBroadcastingUI) -> HRESULT }} impl IAppBroadcastingUIStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self 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 get_for_user(&self, user: &super::super::system::User) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(&self, user: &super::super::system::User) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForUser)(self as *const _ as *mut _, user as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } } // Windows.Media.AppBroadcasting pub mod audio { // Windows.Media.Audio @@ -6700,11 +6700,11 @@ RT_INTERFACE!{interface IAudioDeviceInputNode(IAudioDeviceInputNodeVtbl): IInspe #[cfg(feature="windows-devices")] fn get_Device(&self, out: *mut *mut super::super::devices::enumeration::DeviceInformation) -> HRESULT }} impl IAudioDeviceInputNode { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_device(&self) -> Result> { + #[cfg(feature="windows-devices")] #[inline] pub fn get_device(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Device)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AudioDeviceInputNode: IAudioDeviceInputNode} RT_ENUM! { enum AudioDeviceNodeCreationStatus: i32 { @@ -6715,96 +6715,96 @@ RT_INTERFACE!{interface IAudioDeviceOutputNode(IAudioDeviceOutputNodeVtbl): IIns #[cfg(feature="windows-devices")] fn get_Device(&self, out: *mut *mut super::super::devices::enumeration::DeviceInformation) -> HRESULT }} impl IAudioDeviceOutputNode { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_device(&self) -> Result> { + #[cfg(feature="windows-devices")] #[inline] pub fn get_device(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Device)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AudioDeviceOutputNode: IAudioDeviceOutputNode} 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(&self, value: f64) -> HRESULT, fn get_PlaybackSpeedFactor(&self, out: *mut f64) -> HRESULT, - fn get_Position(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn Seek(&self, position: super::super::foundation::TimeSpan) -> HRESULT, - fn get_StartTime(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_StartTime(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_EndTime(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_EndTime(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_LoopCount(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_LoopCount(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_Duration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_Position(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn Seek(&self, position: foundation::TimeSpan) -> HRESULT, + fn get_StartTime(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_StartTime(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_EndTime(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_EndTime(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_LoopCount(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_LoopCount(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_Duration(&self, out: *mut foundation::TimeSpan) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy11(&self) -> (), #[cfg(feature="windows-storage")] fn get_SourceFile(&self, out: *mut *mut super::super::storage::StorageFile) -> HRESULT, - fn add_FileCompleted(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_FileCompleted(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_FileCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_FileCompleted(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IAudioFileInputNode { - #[inline] pub unsafe fn set_playback_speed_factor(&self, value: f64) -> Result<()> { + #[inline] pub fn set_playback_speed_factor(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PlaybackSpeedFactor)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_playback_speed_factor(&self) -> Result { + }} + #[inline] pub fn get_playback_speed_factor(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PlaybackSpeedFactor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_position(&self) -> Result { + }} + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn seek(&self, position: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn seek(&self, position: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Seek)(self as *const _ as *mut _, position); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_start_time(&self) -> Result>> { + }} + #[inline] pub fn get_start_time(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StartTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_start_time(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_start_time(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StartTime)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_end_time(&self) -> Result>> { + }} + #[inline] pub fn get_end_time(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EndTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_end_time(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_end_time(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_EndTime)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_loop_count(&self) -> Result>> { + }} + #[inline] pub fn get_loop_count(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LoopCount)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_loop_count(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_loop_count(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LoopCount)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_duration(&self) -> Result { + }} + #[inline] pub fn get_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Duration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_source_file(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_source_file(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SourceFile)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_file_completed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_file_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_FileCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_file_completed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_file_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_FileCompleted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AudioFileInputNode: IAudioFileInputNode} RT_ENUM! { enum AudioFileNodeCreationStatus: i32 { @@ -6815,24 +6815,24 @@ RT_INTERFACE!{interface IAudioFileOutputNode(IAudioFileOutputNodeVtbl): IInspect #[cfg(not(feature="windows-storage"))] fn __Dummy0(&self) -> (), #[cfg(feature="windows-storage")] fn get_File(&self, out: *mut *mut super::super::storage::IStorageFile) -> HRESULT, fn get_FileEncodingProfile(&self, out: *mut *mut super::mediaproperties::MediaEncodingProfile) -> HRESULT, - fn FinalizeAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FinalizeAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IAudioFileOutputNode { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_file(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_file(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_File)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_file_encoding_profile(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_file_encoding_profile(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FileEncodingProfile)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn finalize_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn finalize_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FinalizeAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class AudioFileOutputNode: IAudioFileOutputNode} DEFINE_IID!(IID_IAudioFrameCompletedEventArgs, 3699147422, 520, 17668, 165, 168, 240, 242, 104, 146, 10, 101); @@ -6840,11 +6840,11 @@ RT_INTERFACE!{interface IAudioFrameCompletedEventArgs(IAudioFrameCompletedEventA fn get_Frame(&self, out: *mut *mut super::AudioFrame) -> HRESULT }} impl IAudioFrameCompletedEventArgs { - #[inline] pub unsafe fn get_frame(&self) -> Result> { + #[inline] pub fn get_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Frame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AudioFrameCompletedEventArgs: IAudioFrameCompletedEventArgs} DEFINE_IID!(IID_IAudioFrameInputNode, 28468935, 64918, 20469, 163, 197, 210, 122, 155, 244, 66, 55); @@ -6854,52 +6854,52 @@ RT_INTERFACE!{interface IAudioFrameInputNode(IAudioFrameInputNodeVtbl): IInspect fn AddFrame(&self, frame: *mut super::AudioFrame) -> HRESULT, fn DiscardQueuedFrames(&self) -> HRESULT, fn get_QueuedSampleCount(&self, out: *mut u64) -> HRESULT, - fn add_AudioFrameCompleted(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AudioFrameCompleted(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_QuantumStarted(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_QuantumStarted(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_AudioFrameCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AudioFrameCompleted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_QuantumStarted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_QuantumStarted(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IAudioFrameInputNode { - #[inline] pub unsafe fn set_playback_speed_factor(&self, value: f64) -> Result<()> { + #[inline] pub fn set_playback_speed_factor(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PlaybackSpeedFactor)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_playback_speed_factor(&self) -> Result { + }} + #[inline] pub fn get_playback_speed_factor(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PlaybackSpeedFactor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_frame(&self, frame: &super::AudioFrame) -> Result<()> { + }} + #[inline] pub fn add_frame(&self, frame: &super::AudioFrame) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddFrame)(self as *const _ as *mut _, frame as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn discard_queued_frames(&self) -> Result<()> { + }} + #[inline] pub fn discard_queued_frames(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).DiscardQueuedFrames)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_queued_sample_count(&self) -> Result { + }} + #[inline] pub fn get_queued_sample_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_QueuedSampleCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_audio_frame_completed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_audio_frame_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AudioFrameCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_audio_frame_completed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_audio_frame_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AudioFrameCompleted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_quantum_started(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_quantum_started(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_QuantumStarted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_quantum_started(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_quantum_started(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_QuantumStarted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AudioFrameInputNode: IAudioFrameInputNode} DEFINE_IID!(IID_IAudioFrameOutputNode, 3091674907, 12953, 17909, 136, 179, 201, 209, 42, 63, 28, 200); @@ -6907,41 +6907,41 @@ RT_INTERFACE!{interface IAudioFrameOutputNode(IAudioFrameOutputNodeVtbl): IInspe fn GetFrame(&self, out: *mut *mut super::AudioFrame) -> HRESULT }} impl IAudioFrameOutputNode { - #[inline] pub unsafe fn get_frame(&self) -> Result> { + #[inline] pub fn get_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFrame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AudioFrameOutputNode: IAudioFrameOutputNode} 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(&self, out: *mut *mut AudioFrameInputNode) -> HRESULT, fn CreateFrameInputNodeWithFormat(&self, encodingProperties: *mut super::mediaproperties::AudioEncodingProperties, out: *mut *mut AudioFrameInputNode) -> HRESULT, - fn CreateDeviceInputNodeAsync(&self, category: super::capture::MediaCategory, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CreateDeviceInputNodeWithFormatAsync(&self, category: super::capture::MediaCategory, encodingProperties: *mut super::mediaproperties::AudioEncodingProperties, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateDeviceInputNodeAsync(&self, category: super::capture::MediaCategory, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreateDeviceInputNodeWithFormatAsync(&self, category: super::capture::MediaCategory, encodingProperties: *mut super::mediaproperties::AudioEncodingProperties, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-devices"))] fn __Dummy4(&self) -> (), - #[cfg(feature="windows-devices")] fn CreateDeviceInputNodeWithFormatOnDeviceAsync(&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, + #[cfg(feature="windows-devices")] fn CreateDeviceInputNodeWithFormatOnDeviceAsync(&self, category: super::capture::MediaCategory, encodingProperties: *mut super::mediaproperties::AudioEncodingProperties, device: *mut super::super::devices::enumeration::DeviceInformation, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn CreateFrameOutputNode(&self, out: *mut *mut AudioFrameOutputNode) -> HRESULT, fn CreateFrameOutputNodeWithFormat(&self, encodingProperties: *mut super::mediaproperties::AudioEncodingProperties, out: *mut *mut AudioFrameOutputNode) -> HRESULT, - fn CreateDeviceOutputNodeAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateDeviceOutputNodeAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy8(&self) -> (), - #[cfg(feature="windows-storage")] fn CreateFileInputNodeAsync(&self, file: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn CreateFileInputNodeAsync(&self, file: *mut super::super::storage::IStorageFile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy9(&self) -> (), - #[cfg(feature="windows-storage")] fn CreateFileOutputNodeAsync(&self, file: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn CreateFileOutputNodeAsync(&self, file: *mut super::super::storage::IStorageFile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy10(&self) -> (), - #[cfg(feature="windows-storage")] fn CreateFileOutputNodeWithFileProfileAsync(&self, file: *mut super::super::storage::IStorageFile, fileEncodingProfile: *mut super::mediaproperties::MediaEncodingProfile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn CreateFileOutputNodeWithFileProfileAsync(&self, file: *mut super::super::storage::IStorageFile, fileEncodingProfile: *mut super::mediaproperties::MediaEncodingProfile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn CreateSubmixNode(&self, out: *mut *mut AudioSubmixNode) -> HRESULT, fn CreateSubmixNodeWithFormat(&self, encodingProperties: *mut super::mediaproperties::AudioEncodingProperties, out: *mut *mut AudioSubmixNode) -> HRESULT, fn Start(&self) -> HRESULT, fn Stop(&self) -> HRESULT, fn ResetAllNodes(&self) -> HRESULT, - fn add_QuantumStarted(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_QuantumStarted(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_QuantumProcessed(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_QuantumProcessed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_UnrecoverableErrorOccurred(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_UnrecoverableErrorOccurred(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_QuantumStarted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_QuantumStarted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_QuantumProcessed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_QuantumProcessed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_UnrecoverableErrorOccurred(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_UnrecoverableErrorOccurred(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_CompletedQuantumCount(&self, out: *mut u64) -> HRESULT, fn get_EncodingProperties(&self, out: *mut *mut super::mediaproperties::AudioEncodingProperties) -> HRESULT, fn get_LatencyInSamples(&self, out: *mut i32) -> HRESULT, @@ -6951,187 +6951,187 @@ RT_INTERFACE!{interface IAudioGraph(IAudioGraphVtbl): IInspectable(IInspectableV fn get_SamplesPerQuantum(&self, out: *mut i32) -> HRESULT }} impl IAudioGraph { - #[inline] pub unsafe fn create_frame_input_node(&self) -> Result> { + #[inline] pub fn create_frame_input_node(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFrameInputNode)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_frame_input_node_with_format(&self, encodingProperties: &super::mediaproperties::AudioEncodingProperties) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_frame_input_node_with_format(&self, encodingProperties: &super::mediaproperties::AudioEncodingProperties) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFrameInputNodeWithFormat)(self as *const _ as *mut _, 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(&self, category: super::capture::MediaCategory) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_device_input_node_async(&self, category: super::capture::MediaCategory) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDeviceInputNodeAsync)(self as *const _ as *mut _, 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(&self, category: super::capture::MediaCategory, encodingProperties: &super::mediaproperties::AudioEncodingProperties) -> Result>> { + }} + #[inline] pub fn create_device_input_node_with_format_async(&self, category: super::capture::MediaCategory, encodingProperties: &super::mediaproperties::AudioEncodingProperties) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDeviceInputNodeWithFormatAsync)(self as *const _ as *mut _, 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(&self, category: super::capture::MediaCategory, encodingProperties: &super::mediaproperties::AudioEncodingProperties, device: &super::super::devices::enumeration::DeviceInformation) -> Result>> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn create_device_input_node_with_format_on_device_async(&self, category: super::capture::MediaCategory, encodingProperties: &super::mediaproperties::AudioEncodingProperties, device: &super::super::devices::enumeration::DeviceInformation) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDeviceInputNodeWithFormatOnDeviceAsync)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[inline] pub fn create_frame_output_node(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFrameOutputNode)(self 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_with_format(&self, encodingProperties: &super::mediaproperties::AudioEncodingProperties) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_frame_output_node_with_format(&self, encodingProperties: &super::mediaproperties::AudioEncodingProperties) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFrameOutputNodeWithFormat)(self as *const _ as *mut _, 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(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_device_output_node_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDeviceOutputNodeAsync)(self 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_async(&self, file: &super::super::storage::IStorageFile) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_file_input_node_async(&self, file: &super::super::storage::IStorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFileInputNodeAsync)(self 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 create_file_output_node_async(&self, file: &super::super::storage::IStorageFile) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_file_output_node_async(&self, file: &super::super::storage::IStorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFileOutputNodeAsync)(self 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 create_file_output_node_with_file_profile_async(&self, file: &super::super::storage::IStorageFile, fileEncodingProfile: &super::mediaproperties::MediaEncodingProfile) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_file_output_node_with_file_profile_async(&self, file: &super::super::storage::IStorageFile, fileEncodingProfile: &super::mediaproperties::MediaEncodingProfile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFileOutputNodeWithFileProfileAsync)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[inline] pub fn create_submix_node(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateSubmixNode)(self 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(&self, encodingProperties: &super::mediaproperties::AudioEncodingProperties) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_submix_node_with_format(&self, encodingProperties: &super::mediaproperties::AudioEncodingProperties) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateSubmixNodeWithFormat)(self as *const _ as *mut _, encodingProperties as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn reset_all_nodes(&self) -> Result<()> { + }} + #[inline] pub fn reset_all_nodes(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ResetAllNodes)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_quantum_started(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_quantum_started(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_QuantumStarted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_quantum_started(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_quantum_started(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_QuantumStarted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_quantum_processed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_quantum_processed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_QuantumProcessed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_quantum_processed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_quantum_processed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_QuantumProcessed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_unrecoverable_error_occurred(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_unrecoverable_error_occurred(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_UnrecoverableErrorOccurred)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_unrecoverable_error_occurred(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_unrecoverable_error_occurred(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_UnrecoverableErrorOccurred)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_completed_quantum_count(&self) -> Result { + }} + #[inline] pub fn get_completed_quantum_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CompletedQuantumCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_encoding_properties(&self) -> Result> { + }} + #[inline] pub fn get_encoding_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EncodingProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_latency_in_samples(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_latency_in_samples(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LatencyInSamples)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_primary_render_device(&self) -> Result> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_primary_render_device(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PrimaryRenderDevice)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_render_device_audio_processing(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_render_device_audio_processing(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RenderDeviceAudioProcessing)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_samples_per_quantum(&self) -> Result { + }} + #[inline] pub fn get_samples_per_quantum(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SamplesPerQuantum)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AudioGraph: IAudioGraph} impl RtActivatable for AudioGraph {} impl AudioGraph { - #[inline] pub fn create_async(settings: &AudioGraphSettings) -> Result>> { unsafe { + #[inline] pub fn create_async(settings: &AudioGraphSettings) -> Result>> { >::get_activation_factory().create_async(settings) - }} + } } DEFINE_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]) [CLSID_AudioGraph]); 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(&self, encodingProperties: *mut super::mediaproperties::AudioEncodingProperties, emitter: *mut AudioNodeEmitter, out: *mut *mut AudioFrameInputNode) -> HRESULT, #[cfg(not(feature="windows-devices"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-devices")] fn CreateDeviceInputNodeWithFormatAndEmitterOnDeviceAsync(&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(feature="windows-devices")] fn CreateDeviceInputNodeWithFormatAndEmitterOnDeviceAsync(&self, category: super::capture::MediaCategory, encodingProperties: *mut super::mediaproperties::AudioEncodingProperties, device: *mut super::super::devices::enumeration::DeviceInformation, emitter: *mut AudioNodeEmitter, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy2(&self) -> (), - #[cfg(feature="windows-storage")] fn CreateFileInputNodeWithEmitterAsync(&self, file: *mut super::super::storage::IStorageFile, emitter: *mut AudioNodeEmitter, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn CreateFileInputNodeWithEmitterAsync(&self, file: *mut super::super::storage::IStorageFile, emitter: *mut AudioNodeEmitter, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn CreateSubmixNodeWithFormatAndEmitter(&self, encodingProperties: *mut super::mediaproperties::AudioEncodingProperties, emitter: *mut AudioNodeEmitter, out: *mut *mut AudioSubmixNode) -> HRESULT, fn CreateBatchUpdater(&self, out: *mut *mut AudioGraphBatchUpdater) -> HRESULT }} impl IAudioGraph2 { - #[inline] pub unsafe fn create_frame_input_node_with_format_and_emitter(&self, encodingProperties: &super::mediaproperties::AudioEncodingProperties, emitter: &AudioNodeEmitter) -> Result> { + #[inline] pub fn create_frame_input_node_with_format_and_emitter(&self, encodingProperties: &super::mediaproperties::AudioEncodingProperties, emitter: &AudioNodeEmitter) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFrameInputNodeWithFormatAndEmitter)(self as *const _ as *mut _, 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(&self, category: super::capture::MediaCategory, encodingProperties: &super::mediaproperties::AudioEncodingProperties, device: &super::super::devices::enumeration::DeviceInformation, emitter: &AudioNodeEmitter) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-devices")] #[inline] pub fn create_device_input_node_with_format_and_emitter_on_device_async(&self, category: super::capture::MediaCategory, encodingProperties: &super::mediaproperties::AudioEncodingProperties, device: &super::super::devices::enumeration::DeviceInformation, emitter: &AudioNodeEmitter) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDeviceInputNodeWithFormatAndEmitterOnDeviceAsync)(self as *const _ as *mut _, 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(&self, file: &super::super::storage::IStorageFile, emitter: &AudioNodeEmitter) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_file_input_node_with_emitter_async(&self, file: &super::super::storage::IStorageFile, emitter: &AudioNodeEmitter) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFileInputNodeWithEmitterAsync)(self as *const _ as *mut _, 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(&self, encodingProperties: &super::mediaproperties::AudioEncodingProperties, emitter: &AudioNodeEmitter) -> Result> { + }} + #[inline] pub fn create_submix_node_with_format_and_emitter(&self, encodingProperties: &super::mediaproperties::AudioEncodingProperties, emitter: &AudioNodeEmitter) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateSubmixNodeWithFormatAndEmitter)(self as *const _ as *mut _, 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(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_batch_updater(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateBatchUpdater)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } -RT_CLASS!{class AudioGraphBatchUpdater: super::super::foundation::IClosable} +RT_CLASS!{class AudioGraphBatchUpdater: foundation::IClosable} 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(&self, out: *mut *mut IAudioNode) -> HRESULT, @@ -7139,20 +7139,20 @@ RT_INTERFACE!{interface IAudioGraphConnection(IAudioGraphConnectionVtbl): IInspe fn get_Gain(&self, out: *mut f64) -> HRESULT }} impl IAudioGraphConnection { - #[inline] pub unsafe fn get_destination(&self) -> Result> { + #[inline] pub fn get_destination(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Destination)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_gain(&self, value: f64) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_gain(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Gain)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_gain(&self) -> Result { + }} + #[inline] pub fn get_gain(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Gain)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AudioGraphConnection: IAudioGraphConnection} RT_ENUM! { enum AudioGraphCreationStatus: i32 { @@ -7176,67 +7176,67 @@ RT_INTERFACE!{interface IAudioGraphSettings(IAudioGraphSettingsVtbl): IInspectab fn put_DesiredRenderDeviceAudioProcessing(&self, value: super::AudioProcessing) -> HRESULT }} impl IAudioGraphSettings { - #[inline] pub unsafe fn get_encoding_properties(&self) -> Result> { + #[inline] pub fn get_encoding_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EncodingProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_encoding_properties(&self, value: &super::mediaproperties::AudioEncodingProperties) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_encoding_properties(&self, value: &super::mediaproperties::AudioEncodingProperties) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_EncodingProperties)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_primary_render_device(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PrimaryRenderDevice)(self 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_primary_render_device(&self, value: &super::super::devices::enumeration::DeviceInformation) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-devices")] #[inline] pub fn set_primary_render_device(&self, value: &super::super::devices::enumeration::DeviceInformation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PrimaryRenderDevice)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_quantum_size_selection_mode(&self) -> Result { + }} + #[inline] pub fn get_quantum_size_selection_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_QuantumSizeSelectionMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_quantum_size_selection_mode(&self, value: QuantumSizeSelectionMode) -> Result<()> { + }} + #[inline] pub fn set_quantum_size_selection_mode(&self, value: QuantumSizeSelectionMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_QuantumSizeSelectionMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_desired_samples_per_quantum(&self) -> Result { + }} + #[inline] pub fn get_desired_samples_per_quantum(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DesiredSamplesPerQuantum)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_desired_samples_per_quantum(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_desired_samples_per_quantum(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DesiredSamplesPerQuantum)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_render_category(&self) -> Result { + }} + #[inline] pub fn get_audio_render_category(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AudioRenderCategory)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_audio_render_category(&self, value: super::render::AudioRenderCategory) -> Result<()> { + }} + #[inline] pub fn set_audio_render_category(&self, value: super::render::AudioRenderCategory) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AudioRenderCategory)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_desired_render_device_audio_processing(&self) -> Result { + }} + #[inline] pub fn get_desired_render_device_audio_processing(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DesiredRenderDeviceAudioProcessing)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_desired_render_device_audio_processing(&self, value: super::AudioProcessing) -> Result<()> { + }} + #[inline] pub fn set_desired_render_device_audio_processing(&self, value: super::AudioProcessing) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DesiredRenderDeviceAudioProcessing)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AudioGraphSettings: IAudioGraphSettings} impl RtActivatable for AudioGraphSettings {} impl AudioGraphSettings { - #[inline] pub fn create(audioRenderCategory: super::render::AudioRenderCategory) -> Result> { unsafe { + #[inline] pub fn create(audioRenderCategory: super::render::AudioRenderCategory) -> Result> { >::get_activation_factory().create(audioRenderCategory) - }} + } } DEFINE_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]) [CLSID_AudioGraphSettings]); DEFINE_IID!(IID_IAudioGraphSettingsFactory, 2782469318, 49899, 19041, 162, 20, 29, 102, 215, 95, 131, 218); @@ -7244,22 +7244,22 @@ RT_INTERFACE!{static interface IAudioGraphSettingsFactory(IAudioGraphSettingsFac fn Create(&self, audioRenderCategory: super::render::AudioRenderCategory, out: *mut *mut AudioGraphSettings) -> HRESULT }} impl IAudioGraphSettingsFactory { - #[inline] pub unsafe fn create(&self, audioRenderCategory: super::render::AudioRenderCategory) -> Result> { + #[inline] pub fn create(&self, audioRenderCategory: super::render::AudioRenderCategory) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, audioRenderCategory, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } 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(&self, settings: *mut AudioGraphSettings, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn CreateAsync(&self, settings: *mut AudioGraphSettings, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IAudioGraphStatics { - #[inline] pub unsafe fn create_async(&self, settings: &AudioGraphSettings) -> Result>> { + #[inline] pub fn create_async(&self, settings: &AudioGraphSettings) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAsync)(self as *const _ as *mut _, settings as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum AudioGraphUnrecoverableError: i32 { None (AudioGraphUnrecoverableError_None) = 0, AudioDeviceLost (AudioGraphUnrecoverableError_AudioDeviceLost) = 1, AudioSessionDisconnected (AudioGraphUnrecoverableError_AudioSessionDisconnected) = 2, UnknownFailure (AudioGraphUnrecoverableError_UnknownFailure) = 3, @@ -7269,53 +7269,53 @@ RT_INTERFACE!{interface IAudioGraphUnrecoverableErrorOccurredEventArgs(IAudioGra fn get_Error(&self, out: *mut AudioGraphUnrecoverableError) -> HRESULT }} impl IAudioGraphUnrecoverableErrorOccurredEventArgs { - #[inline] pub unsafe fn get_error(&self) -> Result { + #[inline] pub fn get_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Error)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AudioGraphUnrecoverableErrorOccurredEventArgs: IAudioGraphUnrecoverableErrorOccurredEventArgs} 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_OutgoingConnections(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn AddOutgoingConnection(&self, destination: *mut IAudioNode) -> HRESULT, fn AddOutgoingConnectionWithGain(&self, destination: *mut IAudioNode, gain: f64) -> HRESULT, fn RemoveOutgoingConnection(&self, destination: *mut IAudioNode) -> HRESULT }} impl IAudioInputNode { - #[inline] pub unsafe fn get_outgoing_connections(&self) -> Result>> { + #[inline] pub fn get_outgoing_connections(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OutgoingConnections)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_outgoing_connection(&self, destination: &IAudioNode) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_outgoing_connection(&self, destination: &IAudioNode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddOutgoingConnection)(self as *const _ as *mut _, destination as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_outgoing_connection_with_gain(&self, destination: &IAudioNode, gain: f64) -> Result<()> { + }} + #[inline] pub fn add_outgoing_connection_with_gain(&self, destination: &IAudioNode, gain: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddOutgoingConnectionWithGain)(self as *const _ as *mut _, destination as *const _ as *mut _, gain); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove_outgoing_connection(&self, destination: &IAudioNode) -> Result<()> { + }} + #[inline] pub fn remove_outgoing_connection(&self, destination: &IAudioNode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveOutgoingConnection)(self as *const _ as *mut _, destination as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut AudioNodeEmitter) -> HRESULT }} impl IAudioInputNode2 { - #[inline] pub unsafe fn get_emitter(&self) -> Result> { + #[inline] pub fn get_emitter(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Emitter)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_EffectDefinitions(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn put_OutgoingGain(&self, value: f64) -> HRESULT, fn get_OutgoingGain(&self, out: *mut f64) -> HRESULT, fn get_EncodingProperties(&self, out: *mut *mut super::mediaproperties::AudioEncodingProperties) -> HRESULT, @@ -7328,61 +7328,61 @@ RT_INTERFACE!{interface IAudioNode(IAudioNodeVtbl): IInspectable(IInspectableVtb fn EnableEffectsByDefinition(&self, definition: *mut super::effects::IAudioEffectDefinition) -> HRESULT }} impl IAudioNode { - #[inline] pub unsafe fn get_effect_definitions(&self) -> Result>> { + #[inline] pub fn get_effect_definitions(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EffectDefinitions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_outgoing_gain(&self, value: f64) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_outgoing_gain(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OutgoingGain)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_outgoing_gain(&self) -> Result { + }} + #[inline] pub fn get_outgoing_gain(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OutgoingGain)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_encoding_properties(&self) -> Result> { + }} + #[inline] pub fn get_encoding_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EncodingProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_consume_input(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_consume_input(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ConsumeInput)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_consume_input(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_consume_input(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ConsumeInput)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn reset(&self) -> Result<()> { + }} + #[inline] pub fn reset(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Reset)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn disable_effects_by_definition(&self, definition: &super::effects::IAudioEffectDefinition) -> Result<()> { + }} + #[inline] pub fn disable_effects_by_definition(&self, definition: &super::effects::IAudioEffectDefinition) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).DisableEffectsByDefinition)(self as *const _ as *mut _, definition as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn enable_effects_by_definition(&self, definition: &super::effects::IAudioEffectDefinition) -> Result<()> { + }} + #[inline] pub fn enable_effects_by_definition(&self, definition: &super::effects::IAudioEffectDefinition) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).EnableEffectsByDefinition)(self as *const _ as *mut _, definition as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, - fn put_Position(&self, value: super::super::foundation::numerics::Vector3) -> HRESULT, - fn get_Direction(&self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, - fn put_Direction(&self, value: super::super::foundation::numerics::Vector3) -> HRESULT, + fn get_Position(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, + fn put_Position(&self, value: foundation::numerics::Vector3) -> HRESULT, + fn get_Direction(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, + fn put_Direction(&self, value: foundation::numerics::Vector3) -> HRESULT, fn get_Shape(&self, out: *mut *mut AudioNodeEmitterShape) -> HRESULT, fn get_DecayModel(&self, out: *mut *mut AudioNodeEmitterDecayModel) -> HRESULT, fn get_Gain(&self, out: *mut f64) -> HRESULT, @@ -7391,88 +7391,88 @@ RT_INTERFACE!{interface IAudioNodeEmitter(IAudioNodeEmitterVtbl): IInspectable(I fn put_DistanceScale(&self, value: f64) -> HRESULT, fn get_DopplerScale(&self, out: *mut f64) -> HRESULT, fn put_DopplerScale(&self, value: f64) -> HRESULT, - fn get_DopplerVelocity(&self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, - fn put_DopplerVelocity(&self, value: super::super::foundation::numerics::Vector3) -> HRESULT, + fn get_DopplerVelocity(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, + fn put_DopplerVelocity(&self, value: foundation::numerics::Vector3) -> HRESULT, fn get_IsDopplerDisabled(&self, out: *mut bool) -> HRESULT }} impl IAudioNodeEmitter { - #[inline] pub unsafe fn get_position(&self) -> Result { + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_position(&self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + }} + #[inline] pub fn set_position(&self, value: foundation::numerics::Vector3) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Position)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_direction(&self) -> Result { + }} + #[inline] pub fn get_direction(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Direction)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_direction(&self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + }} + #[inline] pub fn set_direction(&self, value: foundation::numerics::Vector3) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Direction)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_shape(&self) -> Result> { + }} + #[inline] pub fn get_shape(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Shape)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_decay_model(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_decay_model(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DecayModel)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_gain(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_gain(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Gain)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_gain(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_gain(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Gain)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_distance_scale(&self) -> Result { + }} + #[inline] pub fn get_distance_scale(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DistanceScale)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_distance_scale(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_distance_scale(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DistanceScale)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_doppler_scale(&self) -> Result { + }} + #[inline] pub fn get_doppler_scale(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DopplerScale)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_doppler_scale(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_doppler_scale(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DopplerScale)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_doppler_velocity(&self) -> Result { + }} + #[inline] pub fn get_doppler_velocity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DopplerVelocity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_doppler_velocity(&self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + }} + #[inline] pub fn set_doppler_velocity(&self, value: foundation::numerics::Vector3) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DopplerVelocity)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_doppler_disabled(&self) -> Result { + }} + #[inline] pub fn get_is_doppler_disabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDopplerDisabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AudioNodeEmitter: IAudioNodeEmitter} impl RtActivatable for AudioNodeEmitter {} impl RtActivatable for AudioNodeEmitter {} impl AudioNodeEmitter { - #[inline] pub fn create_audio_node_emitter(shape: &AudioNodeEmitterShape, decayModel: &AudioNodeEmitterDecayModel, settings: AudioNodeEmitterSettings) -> Result> { unsafe { + #[inline] pub fn create_audio_node_emitter(shape: &AudioNodeEmitterShape, decayModel: &AudioNodeEmitterDecayModel, settings: AudioNodeEmitterSettings) -> Result> { >::get_activation_factory().create_audio_node_emitter(shape, decayModel, settings) - }} + } } DEFINE_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]) [CLSID_AudioNodeEmitter]); DEFINE_IID!(IID_IAudioNodeEmitter2, 1253502667, 60457, 18424, 129, 140, 182, 182, 96, 165, 174, 177); @@ -7481,15 +7481,15 @@ RT_INTERFACE!{interface IAudioNodeEmitter2(IAudioNodeEmitter2Vtbl): IInspectable fn put_SpatialAudioModel(&self, value: SpatialAudioModel) -> HRESULT }} impl IAudioNodeEmitter2 { - #[inline] pub unsafe fn get_spatial_audio_model(&self) -> Result { + #[inline] pub fn get_spatial_audio_model(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SpatialAudioModel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_spatial_audio_model(&self, value: SpatialAudioModel) -> Result<()> { + }} + #[inline] pub fn set_spatial_audio_model(&self, value: SpatialAudioModel) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SpatialAudioModel)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IAudioNodeEmitterConeProperties, 3919260910, 714, 17269, 147, 38, 12, 106, 228, 188, 223, 181); RT_INTERFACE!{interface IAudioNodeEmitterConeProperties(IAudioNodeEmitterConePropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IAudioNodeEmitterConeProperties] { @@ -7498,21 +7498,21 @@ RT_INTERFACE!{interface IAudioNodeEmitterConeProperties(IAudioNodeEmitterConePro fn get_OuterAngleGain(&self, out: *mut f64) -> HRESULT }} impl IAudioNodeEmitterConeProperties { - #[inline] pub unsafe fn get_inner_angle(&self) -> Result { + #[inline] pub fn get_inner_angle(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InnerAngle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_outer_angle(&self) -> Result { + }} + #[inline] pub fn get_outer_angle(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OuterAngle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_outer_angle_gain(&self) -> Result { + }} + #[inline] pub fn get_outer_angle_gain(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OuterAngleGain)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AudioNodeEmitterConeProperties: IAudioNodeEmitterConeProperties} RT_ENUM! { enum AudioNodeEmitterDecayKind: i32 { @@ -7526,36 +7526,36 @@ RT_INTERFACE!{interface IAudioNodeEmitterDecayModel(IAudioNodeEmitterDecayModelV fn get_NaturalProperties(&self, out: *mut *mut AudioNodeEmitterNaturalDecayModelProperties) -> HRESULT }} impl IAudioNodeEmitterDecayModel { - #[inline] pub unsafe fn get_kind(&self) -> Result { + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_gain(&self) -> Result { + }} + #[inline] pub fn get_min_gain(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinGain)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_gain(&self) -> Result { + }} + #[inline] pub fn get_max_gain(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxGain)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_natural_properties(&self) -> Result> { + }} + #[inline] pub fn get_natural_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NaturalProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AudioNodeEmitterDecayModel: IAudioNodeEmitterDecayModel} impl RtActivatable for AudioNodeEmitterDecayModel {} impl AudioNodeEmitterDecayModel { - #[inline] pub fn create_natural(minGain: f64, maxGain: f64, unityGainDistance: f64, cutoffDistance: f64) -> Result> { unsafe { + #[inline] pub fn create_natural(minGain: f64, maxGain: f64, unityGainDistance: f64, cutoffDistance: f64) -> Result>> { >::get_activation_factory().create_natural(minGain, maxGain, unityGainDistance, cutoffDistance) - }} - #[inline] pub fn create_custom(minGain: f64, maxGain: f64) -> Result> { unsafe { + } + #[inline] pub fn create_custom(minGain: f64, maxGain: f64) -> Result>> { >::get_activation_factory().create_custom(minGain, maxGain) - }} + } } DEFINE_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]) [CLSID_AudioNodeEmitterDecayModel]); DEFINE_IID!(IID_IAudioNodeEmitterDecayModelStatics, 3346562216, 61816, 17967, 188, 129, 141, 213, 203, 229, 218, 232); @@ -7564,27 +7564,27 @@ RT_INTERFACE!{static interface IAudioNodeEmitterDecayModelStatics(IAudioNodeEmit fn CreateCustom(&self, minGain: f64, maxGain: f64, out: *mut *mut AudioNodeEmitterDecayModel) -> HRESULT }} impl IAudioNodeEmitterDecayModelStatics { - #[inline] pub unsafe fn create_natural(&self, minGain: f64, maxGain: f64, unityGainDistance: f64, cutoffDistance: f64) -> Result> { + #[inline] pub fn create_natural(&self, minGain: f64, maxGain: f64, unityGainDistance: f64, cutoffDistance: f64) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateNatural)(self as *const _ as *mut _, minGain, maxGain, unityGainDistance, cutoffDistance, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_custom(&self, minGain: f64, maxGain: f64) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_custom(&self, minGain: f64, maxGain: f64) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateCustom)(self as *const _ as *mut _, minGain, maxGain, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } 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(&self, shape: *mut AudioNodeEmitterShape, decayModel: *mut AudioNodeEmitterDecayModel, settings: AudioNodeEmitterSettings, out: *mut *mut AudioNodeEmitter) -> HRESULT }} impl IAudioNodeEmitterFactory { - #[inline] pub unsafe fn create_audio_node_emitter(&self, shape: &AudioNodeEmitterShape, decayModel: &AudioNodeEmitterDecayModel, settings: AudioNodeEmitterSettings) -> Result> { + #[inline] pub fn create_audio_node_emitter(&self, shape: &AudioNodeEmitterShape, decayModel: &AudioNodeEmitterDecayModel, settings: AudioNodeEmitterSettings) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAudioNodeEmitter)(self as *const _ as *mut _, 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_IAudioNodeEmitterNaturalDecayModelProperties, 1217612751, 53036, 20220, 147, 49, 117, 189, 34, 223, 31, 12); RT_INTERFACE!{interface IAudioNodeEmitterNaturalDecayModelProperties(IAudioNodeEmitterNaturalDecayModelPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IAudioNodeEmitterNaturalDecayModelProperties] { @@ -7592,16 +7592,16 @@ RT_INTERFACE!{interface IAudioNodeEmitterNaturalDecayModelProperties(IAudioNodeE fn get_CutoffDistance(&self, out: *mut f64) -> HRESULT }} impl IAudioNodeEmitterNaturalDecayModelProperties { - #[inline] pub unsafe fn get_unity_gain_distance(&self) -> Result { + #[inline] pub fn get_unity_gain_distance(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UnityGainDistance)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_cutoff_distance(&self) -> Result { + }} + #[inline] pub fn get_cutoff_distance(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CutoffDistance)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AudioNodeEmitterNaturalDecayModelProperties: IAudioNodeEmitterNaturalDecayModelProperties} RT_ENUM! { enum AudioNodeEmitterSettings: u32 { @@ -7613,26 +7613,26 @@ RT_INTERFACE!{interface IAudioNodeEmitterShape(IAudioNodeEmitterShapeVtbl): IIns fn get_ConeProperties(&self, out: *mut *mut AudioNodeEmitterConeProperties) -> HRESULT }} impl IAudioNodeEmitterShape { - #[inline] pub unsafe fn get_kind(&self) -> Result { + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_cone_properties(&self) -> Result> { + }} + #[inline] pub fn get_cone_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ConeProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AudioNodeEmitterShape: IAudioNodeEmitterShape} impl RtActivatable for AudioNodeEmitterShape {} impl AudioNodeEmitterShape { - #[inline] pub fn create_cone(innerAngle: f64, outerAngle: f64, outerAngleGain: f64) -> Result> { unsafe { + #[inline] pub fn create_cone(innerAngle: f64, outerAngle: f64, outerAngleGain: f64) -> Result>> { >::get_activation_factory().create_cone(innerAngle, outerAngle, outerAngleGain) - }} - #[inline] pub fn create_omnidirectional() -> Result> { unsafe { + } + #[inline] pub fn create_omnidirectional() -> Result>> { >::get_activation_factory().create_omnidirectional() - }} + } } DEFINE_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]) [CLSID_AudioNodeEmitterShape]); RT_ENUM! { enum AudioNodeEmitterShapeKind: i32 { @@ -7644,65 +7644,65 @@ RT_INTERFACE!{static interface IAudioNodeEmitterShapeStatics(IAudioNodeEmitterSh fn CreateOmnidirectional(&self, out: *mut *mut AudioNodeEmitterShape) -> HRESULT }} impl IAudioNodeEmitterShapeStatics { - #[inline] pub unsafe fn create_cone(&self, innerAngle: f64, outerAngle: f64, outerAngleGain: f64) -> Result> { + #[inline] pub fn create_cone(&self, innerAngle: f64, outerAngle: f64, outerAngleGain: f64) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateCone)(self as *const _ as *mut _, innerAngle, outerAngle, outerAngleGain, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_omnidirectional(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_omnidirectional(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateOmnidirectional)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, - fn put_Position(&self, value: super::super::foundation::numerics::Vector3) -> HRESULT, - fn get_Orientation(&self, out: *mut super::super::foundation::numerics::Quaternion) -> HRESULT, - fn put_Orientation(&self, value: super::super::foundation::numerics::Quaternion) -> HRESULT, + fn get_Position(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, + fn put_Position(&self, value: foundation::numerics::Vector3) -> HRESULT, + fn get_Orientation(&self, out: *mut foundation::numerics::Quaternion) -> HRESULT, + fn put_Orientation(&self, value: foundation::numerics::Quaternion) -> HRESULT, fn get_SpeedOfSound(&self, out: *mut f64) -> HRESULT, fn put_SpeedOfSound(&self, value: f64) -> HRESULT, - fn get_DopplerVelocity(&self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, - fn put_DopplerVelocity(&self, value: super::super::foundation::numerics::Vector3) -> HRESULT + fn get_DopplerVelocity(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, + fn put_DopplerVelocity(&self, value: foundation::numerics::Vector3) -> HRESULT }} impl IAudioNodeListener { - #[inline] pub unsafe fn get_position(&self) -> Result { + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_position(&self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + }} + #[inline] pub fn set_position(&self, value: foundation::numerics::Vector3) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Position)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_orientation(&self) -> Result { + }} + #[inline] pub fn get_orientation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Orientation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_orientation(&self, value: super::super::foundation::numerics::Quaternion) -> Result<()> { + }} + #[inline] pub fn set_orientation(&self, value: foundation::numerics::Quaternion) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Orientation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_speed_of_sound(&self) -> Result { + }} + #[inline] pub fn get_speed_of_sound(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SpeedOfSound)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_speed_of_sound(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_speed_of_sound(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SpeedOfSound)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_doppler_velocity(&self) -> Result { + }} + #[inline] pub fn get_doppler_velocity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DopplerVelocity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_doppler_velocity(&self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + }} + #[inline] pub fn set_doppler_velocity(&self, value: foundation::numerics::Vector3) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DopplerVelocity)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AudioNodeListener: IAudioNodeListener} impl RtActivatable for AudioNodeListener {} @@ -7713,15 +7713,15 @@ RT_INTERFACE!{interface IAudioNodeWithListener(IAudioNodeWithListenerVtbl): IIns fn get_Listener(&self, out: *mut *mut AudioNodeListener) -> HRESULT }} impl IAudioNodeWithListener { - #[inline] pub unsafe fn set_listener(&self, value: &AudioNodeListener) -> Result<()> { + #[inline] pub fn set_listener(&self, value: &AudioNodeListener) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Listener)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_listener(&self) -> Result> { + }} + #[inline] pub fn get_listener(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Listener)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AudioSubmixNode: IAudioInputNode} DEFINE_IID!(IID_ICreateAudioDeviceInputNodeResult, 384747432, 7335, 16623, 145, 164, 211, 70, 224, 170, 27, 186); @@ -7730,16 +7730,16 @@ RT_INTERFACE!{interface ICreateAudioDeviceInputNodeResult(ICreateAudioDeviceInpu fn get_DeviceInputNode(&self, out: *mut *mut AudioDeviceInputNode) -> HRESULT }} impl ICreateAudioDeviceInputNodeResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_input_node(&self) -> Result> { + }} + #[inline] pub fn get_device_input_node(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceInputNode)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CreateAudioDeviceInputNodeResult: ICreateAudioDeviceInputNodeResult} DEFINE_IID!(IID_ICreateAudioDeviceOutputNodeResult, 4151799079, 7578, 18423, 156, 212, 40, 89, 204, 27, 123, 255); @@ -7748,16 +7748,16 @@ RT_INTERFACE!{interface ICreateAudioDeviceOutputNodeResult(ICreateAudioDeviceOut fn get_DeviceOutputNode(&self, out: *mut *mut AudioDeviceOutputNode) -> HRESULT }} impl ICreateAudioDeviceOutputNodeResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_output_node(&self) -> Result> { + }} + #[inline] pub fn get_device_output_node(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceOutputNode)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CreateAudioDeviceOutputNodeResult: ICreateAudioDeviceOutputNodeResult} DEFINE_IID!(IID_ICreateAudioFileInputNodeResult, 3464746524, 58007, 19536, 156, 231, 28, 122, 105, 214, 189, 9); @@ -7766,16 +7766,16 @@ RT_INTERFACE!{interface ICreateAudioFileInputNodeResult(ICreateAudioFileInputNod fn get_FileInputNode(&self, out: *mut *mut AudioFileInputNode) -> HRESULT }} impl ICreateAudioFileInputNodeResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_file_input_node(&self) -> Result> { + }} + #[inline] pub fn get_file_input_node(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FileInputNode)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CreateAudioFileInputNodeResult: ICreateAudioFileInputNodeResult} DEFINE_IID!(IID_ICreateAudioFileOutputNodeResult, 1205254779, 59657, 17727, 134, 110, 85, 64, 205, 167, 52, 255); @@ -7784,16 +7784,16 @@ RT_INTERFACE!{interface ICreateAudioFileOutputNodeResult(ICreateAudioFileOutputN fn get_FileOutputNode(&self, out: *mut *mut AudioFileOutputNode) -> HRESULT }} impl ICreateAudioFileOutputNodeResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_file_output_node(&self) -> Result> { + }} + #[inline] pub fn get_file_output_node(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FileOutputNode)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CreateAudioFileOutputNodeResult: ICreateAudioFileOutputNodeResult} DEFINE_IID!(IID_ICreateAudioGraphResult, 1414786942, 31710, 19318, 187, 93, 72, 247, 156, 252, 140, 11); @@ -7802,16 +7802,16 @@ RT_INTERFACE!{interface ICreateAudioGraphResult(ICreateAudioGraphResultVtbl): II fn get_Graph(&self, out: *mut *mut AudioGraph) -> HRESULT }} impl ICreateAudioGraphResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_graph(&self) -> Result> { + }} + #[inline] pub fn get_graph(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Graph)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CreateAudioGraphResult: ICreateAudioGraphResult} DEFINE_IID!(IID_IEchoEffectDefinition, 239943594, 14008, 19601, 185, 218, 17, 244, 74, 138, 102, 16); @@ -7824,40 +7824,40 @@ RT_INTERFACE!{interface IEchoEffectDefinition(IEchoEffectDefinitionVtbl): IInspe fn get_Delay(&self, out: *mut f64) -> HRESULT }} impl IEchoEffectDefinition { - #[inline] pub unsafe fn set_wet_dry_mix(&self, value: f64) -> Result<()> { + #[inline] pub fn set_wet_dry_mix(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_WetDryMix)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_wet_dry_mix(&self) -> Result { + }} + #[inline] pub fn get_wet_dry_mix(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_WetDryMix)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_feedback(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_feedback(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Feedback)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_feedback(&self) -> Result { + }} + #[inline] pub fn get_feedback(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Feedback)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_delay(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_delay(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Delay)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_delay(&self) -> Result { + }} + #[inline] pub fn get_delay(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Delay)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class EchoEffectDefinition: IEchoEffectDefinition} impl RtActivatable for EchoEffectDefinition {} impl EchoEffectDefinition { - #[inline] pub fn create(audioGraph: &AudioGraph) -> Result> { unsafe { + #[inline] pub fn create(audioGraph: &AudioGraph) -> Result> { >::get_activation_factory().create(audioGraph) - }} + } } DEFINE_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]) [CLSID_EchoEffectDefinition]); DEFINE_IID!(IID_IEchoEffectDefinitionFactory, 223224407, 43762, 20102, 165, 76, 251, 121, 219, 143, 108, 18); @@ -7865,11 +7865,11 @@ RT_INTERFACE!{static interface IEchoEffectDefinitionFactory(IEchoEffectDefinitio fn Create(&self, audioGraph: *mut AudioGraph, out: *mut *mut EchoEffectDefinition) -> HRESULT }} impl IEchoEffectDefinitionFactory { - #[inline] pub unsafe fn create(&self, audioGraph: &AudioGraph) -> Result> { + #[inline] pub fn create(&self, audioGraph: &AudioGraph) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, audioGraph as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(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] { @@ -7881,52 +7881,52 @@ RT_INTERFACE!{interface IEqualizerBand(IEqualizerBandVtbl): IInspectable(IInspec fn put_Gain(&self, value: f64) -> HRESULT }} impl IEqualizerBand { - #[inline] pub unsafe fn get_bandwidth(&self) -> Result { + #[inline] pub fn get_bandwidth(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Bandwidth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_bandwidth(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_bandwidth(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Bandwidth)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_frequency_center(&self) -> Result { + }} + #[inline] pub fn get_frequency_center(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FrequencyCenter)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_frequency_center(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_frequency_center(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FrequencyCenter)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_gain(&self) -> Result { + }} + #[inline] pub fn get_gain(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Gain)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_gain(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_gain(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Gain)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class EqualizerBand: IEqualizerBand} 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_Bands(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IEqualizerEffectDefinition { - #[inline] pub unsafe fn get_bands(&self) -> Result>> { + #[inline] pub fn get_bands(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Bands)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class EqualizerEffectDefinition: IEqualizerEffectDefinition} impl RtActivatable for EqualizerEffectDefinition {} impl EqualizerEffectDefinition { - #[inline] pub fn create(audioGraph: &AudioGraph) -> Result> { unsafe { + #[inline] pub fn create(audioGraph: &AudioGraph) -> Result> { >::get_activation_factory().create(audioGraph) - }} + } } DEFINE_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]) [CLSID_EqualizerEffectDefinition]); DEFINE_IID!(IID_IEqualizerEffectDefinitionFactory, 3532091332, 54288, 20149, 158, 105, 201, 170, 18, 119, 234, 240); @@ -7934,22 +7934,22 @@ RT_INTERFACE!{static interface IEqualizerEffectDefinitionFactory(IEqualizerEffec fn Create(&self, audioGraph: *mut AudioGraph, out: *mut *mut EqualizerEffectDefinition) -> HRESULT }} impl IEqualizerEffectDefinitionFactory { - #[inline] pub unsafe fn create(&self, audioGraph: &AudioGraph) -> Result> { + #[inline] pub fn create(&self, audioGraph: &AudioGraph) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, audioGraph as *const _ as *mut _, &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(&self, out: *mut i32) -> HRESULT }} impl IFrameInputNodeQuantumStartedEventArgs { - #[inline] pub unsafe fn get_required_samples(&self) -> Result { + #[inline] pub fn get_required_samples(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RequiredSamples)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class FrameInputNodeQuantumStartedEventArgs: IFrameInputNodeQuantumStartedEventArgs} DEFINE_IID!(IID_ILimiterEffectDefinition, 1802853657, 9731, 18362, 189, 235, 57, 5, 94, 52, 134, 220); @@ -7960,31 +7960,31 @@ RT_INTERFACE!{interface ILimiterEffectDefinition(ILimiterEffectDefinitionVtbl): fn get_Loudness(&self, out: *mut u32) -> HRESULT }} impl ILimiterEffectDefinition { - #[inline] pub unsafe fn set_release(&self, value: u32) -> Result<()> { + #[inline] pub fn set_release(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Release)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_release(&self) -> Result { + }} + #[inline] pub fn get_release(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Release)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_loudness(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_loudness(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Loudness)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_loudness(&self) -> Result { + }} + #[inline] pub fn get_loudness(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Loudness)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class LimiterEffectDefinition: ILimiterEffectDefinition} impl RtActivatable for LimiterEffectDefinition {} impl LimiterEffectDefinition { - #[inline] pub fn create(audioGraph: &AudioGraph) -> Result> { unsafe { + #[inline] pub fn create(audioGraph: &AudioGraph) -> Result> { >::get_activation_factory().create(audioGraph) - }} + } } DEFINE_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]) [CLSID_LimiterEffectDefinition]); DEFINE_IID!(IID_ILimiterEffectDefinitionFactory, 3971671793, 25087, 17903, 184, 245, 72, 101, 154, 87, 199, 45); @@ -7992,11 +7992,11 @@ RT_INTERFACE!{static interface ILimiterEffectDefinitionFactory(ILimiterEffectDef fn Create(&self, audioGraph: *mut AudioGraph, out: *mut *mut LimiterEffectDefinition) -> HRESULT }} impl ILimiterEffectDefinitionFactory { - #[inline] pub unsafe fn create(&self, audioGraph: &AudioGraph) -> Result> { + #[inline] pub fn create(&self, audioGraph: &AudioGraph) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, audioGraph as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum QuantumSizeSelectionMode: i32 { SystemDefault (QuantumSizeSelectionMode_SystemDefault) = 0, LowestLatency (QuantumSizeSelectionMode_LowestLatency) = 1, ClosestToDesired (QuantumSizeSelectionMode_ClosestToDesired) = 2, @@ -8051,220 +8051,220 @@ RT_INTERFACE!{interface IReverbEffectDefinition(IReverbEffectDefinitionVtbl): II fn get_DisableLateField(&self, out: *mut bool) -> HRESULT }} impl IReverbEffectDefinition { - #[inline] pub unsafe fn set_wet_dry_mix(&self, value: f64) -> Result<()> { + #[inline] pub fn set_wet_dry_mix(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_WetDryMix)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_wet_dry_mix(&self) -> Result { + }} + #[inline] pub fn get_wet_dry_mix(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_WetDryMix)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_reflections_delay(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_reflections_delay(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReflectionsDelay)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_reflections_delay(&self) -> Result { + }} + #[inline] pub fn get_reflections_delay(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReflectionsDelay)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_reverb_delay(&self, value: u8) -> Result<()> { + }} + #[inline] pub fn set_reverb_delay(&self, value: u8) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReverbDelay)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_reverb_delay(&self) -> Result { + }} + #[inline] pub fn get_reverb_delay(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReverbDelay)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_rear_delay(&self, value: u8) -> Result<()> { + }} + #[inline] pub fn set_rear_delay(&self, value: u8) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RearDelay)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_rear_delay(&self) -> Result { + }} + #[inline] pub fn get_rear_delay(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RearDelay)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_position_left(&self, value: u8) -> Result<()> { + }} + #[inline] pub fn set_position_left(&self, value: u8) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PositionLeft)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_position_left(&self) -> Result { + }} + #[inline] pub fn get_position_left(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PositionLeft)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_position_right(&self, value: u8) -> Result<()> { + }} + #[inline] pub fn set_position_right(&self, value: u8) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PositionRight)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_position_right(&self) -> Result { + }} + #[inline] pub fn get_position_right(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PositionRight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_position_matrix_left(&self, value: u8) -> Result<()> { + }} + #[inline] pub fn set_position_matrix_left(&self, value: u8) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PositionMatrixLeft)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_position_matrix_left(&self) -> Result { + }} + #[inline] pub fn get_position_matrix_left(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PositionMatrixLeft)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_position_matrix_right(&self, value: u8) -> Result<()> { + }} + #[inline] pub fn set_position_matrix_right(&self, value: u8) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PositionMatrixRight)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_position_matrix_right(&self) -> Result { + }} + #[inline] pub fn get_position_matrix_right(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PositionMatrixRight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_early_diffusion(&self, value: u8) -> Result<()> { + }} + #[inline] pub fn set_early_diffusion(&self, value: u8) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_EarlyDiffusion)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_early_diffusion(&self) -> Result { + }} + #[inline] pub fn get_early_diffusion(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EarlyDiffusion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_late_diffusion(&self, value: u8) -> Result<()> { + }} + #[inline] pub fn set_late_diffusion(&self, value: u8) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LateDiffusion)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_late_diffusion(&self) -> Result { + }} + #[inline] pub fn get_late_diffusion(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LateDiffusion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_low_eqgain(&self, value: u8) -> Result<()> { + }} + #[inline] pub fn set_low_eqgain(&self, value: u8) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LowEQGain)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_low_eqgain(&self) -> Result { + }} + #[inline] pub fn get_low_eqgain(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LowEQGain)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_low_eqcutoff(&self, value: u8) -> Result<()> { + }} + #[inline] pub fn set_low_eqcutoff(&self, value: u8) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LowEQCutoff)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_low_eqcutoff(&self) -> Result { + }} + #[inline] pub fn get_low_eqcutoff(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LowEQCutoff)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_high_eqgain(&self, value: u8) -> Result<()> { + }} + #[inline] pub fn set_high_eqgain(&self, value: u8) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_HighEQGain)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_high_eqgain(&self) -> Result { + }} + #[inline] pub fn get_high_eqgain(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HighEQGain)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_high_eqcutoff(&self, value: u8) -> Result<()> { + }} + #[inline] pub fn set_high_eqcutoff(&self, value: u8) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_HighEQCutoff)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_high_eqcutoff(&self) -> Result { + }} + #[inline] pub fn get_high_eqcutoff(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HighEQCutoff)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_room_filter_freq(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_room_filter_freq(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RoomFilterFreq)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_room_filter_freq(&self) -> Result { + }} + #[inline] pub fn get_room_filter_freq(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RoomFilterFreq)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_room_filter_main(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_room_filter_main(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RoomFilterMain)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_room_filter_main(&self) -> Result { + }} + #[inline] pub fn get_room_filter_main(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RoomFilterMain)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_room_filter_hf(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_room_filter_hf(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RoomFilterHF)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_room_filter_hf(&self) -> Result { + }} + #[inline] pub fn get_room_filter_hf(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RoomFilterHF)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_reflections_gain(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_reflections_gain(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReflectionsGain)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_reflections_gain(&self) -> Result { + }} + #[inline] pub fn get_reflections_gain(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReflectionsGain)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_reverb_gain(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_reverb_gain(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReverbGain)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_reverb_gain(&self) -> Result { + }} + #[inline] pub fn get_reverb_gain(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReverbGain)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_decay_time(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_decay_time(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DecayTime)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_decay_time(&self) -> Result { + }} + #[inline] pub fn get_decay_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DecayTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_density(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_density(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Density)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_density(&self) -> Result { + }} + #[inline] pub fn get_density(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Density)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_room_size(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_room_size(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RoomSize)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_room_size(&self) -> Result { + }} + #[inline] pub fn get_room_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RoomSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_disable_late_field(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_disable_late_field(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisableLateField)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_disable_late_field(&self) -> Result { + }} + #[inline] pub fn get_disable_late_field(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DisableLateField)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ReverbEffectDefinition: IReverbEffectDefinition} impl RtActivatable for ReverbEffectDefinition {} impl ReverbEffectDefinition { - #[inline] pub fn create(audioGraph: &AudioGraph) -> Result> { unsafe { + #[inline] pub fn create(audioGraph: &AudioGraph) -> Result> { >::get_activation_factory().create(audioGraph) - }} + } } DEFINE_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]) [CLSID_ReverbEffectDefinition]); DEFINE_IID!(IID_IReverbEffectDefinitionFactory, 2815806462, 4107, 20464, 157, 166, 220, 78, 5, 167, 89, 240); @@ -8272,11 +8272,11 @@ RT_INTERFACE!{static interface IReverbEffectDefinitionFactory(IReverbEffectDefin fn Create(&self, audioGraph: *mut AudioGraph, out: *mut *mut ReverbEffectDefinition) -> HRESULT }} impl IReverbEffectDefinitionFactory { - #[inline] pub unsafe fn create(&self, audioGraph: &AudioGraph) -> Result> { + #[inline] pub fn create(&self, audioGraph: &AudioGraph) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, audioGraph as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum SpatialAudioModel: i32 { ObjectBased (SpatialAudioModel_ObjectBased) = 0, FoldDown (SpatialAudioModel_FoldDown) = 1, @@ -8290,61 +8290,61 @@ RT_INTERFACE!{interface ICastingConnection(ICastingConnectionVtbl): IInspectable fn get_Device(&self, out: *mut *mut CastingDevice) -> HRESULT, fn get_Source(&self, out: *mut *mut CastingSource) -> HRESULT, fn put_Source(&self, value: *mut CastingSource) -> HRESULT, - fn add_StateChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StateChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ErrorOccurred(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ErrorOccurred(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn RequestStartCastingAsync(&self, value: *mut CastingSource, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn DisconnectAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn add_StateChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StateChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ErrorOccurred(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ErrorOccurred(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn RequestStartCastingAsync(&self, value: *mut CastingSource, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn DisconnectAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ICastingConnection { - #[inline] pub unsafe fn get_state(&self) -> Result { + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_device(&self) -> Result> { + }} + #[inline] pub fn get_device(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Device)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_source(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Source)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_source(&self, value: &CastingSource) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_source(&self, value: &CastingSource) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Source)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_state_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_state_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StateChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_state_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_state_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StateChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_error_occurred(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_error_occurred(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ErrorOccurred)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_error_occurred(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_error_occurred(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ErrorOccurred)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn request_start_casting_async(&self, value: &CastingSource) -> Result>> { + }} + #[inline] pub fn request_start_casting_async(&self, value: &CastingSource) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestStartCastingAsync)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn disconnect_async(&self) -> Result>> { + }} + #[inline] pub fn disconnect_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DisconnectAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class CastingConnection: ICastingConnection} DEFINE_IID!(IID_ICastingConnectionErrorOccurredEventArgs, 2818260073, 34585, 20224, 129, 251, 150, 24, 99, 199, 154, 50); @@ -8353,16 +8353,16 @@ RT_INTERFACE!{interface ICastingConnectionErrorOccurredEventArgs(ICastingConnect fn get_Message(&self, out: *mut HSTRING) -> HRESULT }} impl ICastingConnectionErrorOccurredEventArgs { - #[inline] pub unsafe fn get_error_status(&self) -> Result { + #[inline] pub fn get_error_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ErrorStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_message(&self) -> Result { + }} + #[inline] pub fn get_message(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Message)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class CastingConnectionErrorOccurredEventArgs: ICastingConnectionErrorOccurredEventArgs} RT_ENUM! { enum CastingConnectionErrorStatus: i32 { @@ -8377,51 +8377,51 @@ RT_INTERFACE!{interface ICastingDevice(ICastingDeviceVtbl): IInspectable(IInspec fn get_FriendlyName(&self, out: *mut HSTRING) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy2(&self) -> (), #[cfg(feature="windows-storage")] fn get_Icon(&self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamWithContentType) -> HRESULT, - fn GetSupportedCastingPlaybackTypesAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetSupportedCastingPlaybackTypesAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn CreateCastingConnection(&self, out: *mut *mut CastingConnection) -> HRESULT }} impl ICastingDevice { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_friendly_name(&self) -> Result { + }} + #[inline] pub fn get_friendly_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FriendlyName)(self 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 get_icon(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_icon(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Icon)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_casting_playback_types_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_supported_casting_playback_types_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSupportedCastingPlaybackTypesAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_casting_connection(&self) -> Result> { + }} + #[inline] pub fn create_casting_connection(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateCastingConnection)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CastingDevice: ICastingDevice} impl RtActivatable for CastingDevice {} impl CastingDevice { - #[inline] pub fn get_device_selector(type_: CastingPlaybackTypes) -> Result { unsafe { + #[inline] pub fn get_device_selector(type_: CastingPlaybackTypes) -> Result { >::get_activation_factory().get_device_selector(type_) - }} - #[inline] pub fn get_device_selector_from_casting_source_async(castingSource: &CastingSource) -> Result>> { unsafe { + } + #[inline] pub fn get_device_selector_from_casting_source_async(castingSource: &CastingSource) -> Result>> { >::get_activation_factory().get_device_selector_from_casting_source_async(castingSource) - }} - #[inline] pub fn from_id_async(value: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(value: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(value) - }} - #[cfg(feature="windows-devices")] #[inline] pub fn device_info_supports_casting_async(device: &super::super::devices::enumeration::DeviceInformation) -> Result>> { unsafe { + } + #[cfg(feature="windows-devices")] #[inline] pub fn device_info_supports_casting_async(device: &super::super::devices::enumeration::DeviceInformation) -> Result>> { >::get_activation_factory().device_info_supports_casting_async(device) - }} + } } DEFINE_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]) [CLSID_CastingDevice]); DEFINE_IID!(IID_ICastingDevicePicker, 3704854820, 1425, 18878, 170, 203, 75, 130, 238, 117, 106, 149); @@ -8429,56 +8429,56 @@ RT_INTERFACE!{interface ICastingDevicePicker(ICastingDevicePickerVtbl): IInspect fn get_Filter(&self, out: *mut *mut CastingDevicePickerFilter) -> HRESULT, #[cfg(not(feature="windows-devices"))] fn __Dummy1(&self) -> (), #[cfg(feature="windows-devices")] fn get_Appearance(&self, out: *mut *mut super::super::devices::enumeration::DevicePickerAppearance) -> HRESULT, - fn add_CastingDeviceSelected(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CastingDeviceSelected(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_CastingDevicePickerDismissed(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CastingDevicePickerDismissed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn Show(&self, selection: super::super::foundation::Rect) -> HRESULT, + fn add_CastingDeviceSelected(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CastingDeviceSelected(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_CastingDevicePickerDismissed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CastingDevicePickerDismissed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn Show(&self, selection: foundation::Rect) -> HRESULT, #[cfg(not(feature="windows-ui"))] fn __Dummy7(&self) -> (), - #[cfg(feature="windows-ui")] fn ShowWithPlacement(&self, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> HRESULT, + #[cfg(feature="windows-ui")] fn ShowWithPlacement(&self, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> HRESULT, fn Hide(&self) -> HRESULT }} impl ICastingDevicePicker { - #[inline] pub unsafe fn get_filter(&self) -> Result> { + #[inline] pub fn get_filter(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Filter)(self 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_appearance(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_appearance(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Appearance)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_casting_device_selected(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_casting_device_selected(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CastingDeviceSelected)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_casting_device_selected(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_casting_device_selected(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CastingDeviceSelected)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_casting_device_picker_dismissed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_casting_device_picker_dismissed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CastingDevicePickerDismissed)(self as *const _ as *mut _, 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(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_casting_device_picker_dismissed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CastingDevicePickerDismissed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn show(&self, selection: super::super::foundation::Rect) -> Result<()> { + }} + #[inline] pub fn show(&self, selection: foundation::Rect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Show)(self as *const _ as *mut _, selection); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn show_with_placement(&self, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn show_with_placement(&self, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ShowWithPlacement)(self as *const _ as *mut _, selection, preferredPlacement); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn hide(&self) -> Result<()> { + }} + #[inline] pub fn hide(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Hide)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CastingDevicePicker: ICastingDevicePicker} impl RtActivatable for CastingDevicePicker {} @@ -8491,41 +8491,41 @@ RT_INTERFACE!{interface ICastingDevicePickerFilter(ICastingDevicePickerFilterVtb fn put_SupportsVideo(&self, value: bool) -> HRESULT, fn get_SupportsPictures(&self, out: *mut bool) -> HRESULT, fn put_SupportsPictures(&self, value: bool) -> HRESULT, - fn get_SupportedCastingSources(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_SupportedCastingSources(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl ICastingDevicePickerFilter { - #[inline] pub unsafe fn get_supports_audio(&self) -> Result { + #[inline] pub fn get_supports_audio(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SupportsAudio)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_supports_audio(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_supports_audio(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SupportsAudio)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_supports_video(&self) -> Result { + }} + #[inline] pub fn get_supports_video(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SupportsVideo)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_supports_video(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_supports_video(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SupportsVideo)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_supports_pictures(&self) -> Result { + }} + #[inline] pub fn get_supports_pictures(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SupportsPictures)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_supports_pictures(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_supports_pictures(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SupportsPictures)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_casting_sources(&self) -> Result>> { + }} + #[inline] pub fn get_supported_casting_sources(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedCastingSources)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CastingDevicePickerFilter: ICastingDevicePickerFilter} DEFINE_IID!(IID_ICastingDeviceSelectedEventArgs, 3695419014, 56663, 19725, 148, 0, 175, 69, 228, 251, 54, 99); @@ -8533,60 +8533,60 @@ RT_INTERFACE!{interface ICastingDeviceSelectedEventArgs(ICastingDeviceSelectedEv fn get_SelectedCastingDevice(&self, out: *mut *mut CastingDevice) -> HRESULT }} impl ICastingDeviceSelectedEventArgs { - #[inline] pub unsafe fn get_selected_casting_device(&self) -> Result> { + #[inline] pub fn get_selected_casting_device(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SelectedCastingDevice)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CastingDeviceSelectedEventArgs: ICastingDeviceSelectedEventArgs} 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(&self, type_: CastingPlaybackTypes, out: *mut HSTRING) -> HRESULT, - fn GetDeviceSelectorFromCastingSourceAsync(&self, castingSource: *mut CastingSource, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FromIdAsync(&self, value: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-devices")] fn DeviceInfoSupportsCastingAsync(&self, device: *mut super::super::devices::enumeration::DeviceInformation, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetDeviceSelectorFromCastingSourceAsync(&self, castingSource: *mut CastingSource, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn FromIdAsync(&self, value: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-devices")] fn DeviceInfoSupportsCastingAsync(&self, device: *mut super::super::devices::enumeration::DeviceInformation, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ICastingDeviceStatics { - #[inline] pub unsafe fn get_device_selector(&self, type_: CastingPlaybackTypes) -> Result { + #[inline] pub fn get_device_selector(&self, type_: CastingPlaybackTypes) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, 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(&self, castingSource: &CastingSource) -> Result>> { + }} + #[inline] pub fn get_device_selector_from_casting_source_async(&self, castingSource: &CastingSource) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelectorFromCastingSourceAsync)(self as *const _ as *mut _, 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(&self, value: &HStringArg) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, value: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, 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(&self, device: &super::super::devices::enumeration::DeviceInformation) -> Result>> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn device_info_supports_casting_async(&self, device: &super::super::devices::enumeration::DeviceInformation) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeviceInfoSupportsCastingAsync)(self as *const _ as *mut _, device as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum CastingPlaybackTypes: u32 { None (CastingPlaybackTypes_None) = 0, Audio (CastingPlaybackTypes_Audio) = 1, Video (CastingPlaybackTypes_Video) = 2, Picture (CastingPlaybackTypes_Picture) = 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(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_PreferredSourceUri(&self, value: *mut super::super::foundation::Uri) -> HRESULT + fn get_PreferredSourceUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_PreferredSourceUri(&self, value: *mut foundation::Uri) -> HRESULT }} impl ICastingSource { - #[inline] pub unsafe fn get_preferred_source_uri(&self) -> Result> { + #[inline] pub fn get_preferred_source_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PreferredSourceUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_preferred_source_uri(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_preferred_source_uri(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PreferredSourceUri)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CastingSource: ICastingSource} } // Windows.Media.Casting @@ -8603,109 +8603,109 @@ RT_INTERFACE!{interface IAudioStreamDescriptor(IAudioStreamDescriptorVtbl): IIns fn get_EncodingProperties(&self, out: *mut *mut super::mediaproperties::AudioEncodingProperties) -> HRESULT }} impl IAudioStreamDescriptor { - #[inline] pub unsafe fn get_encoding_properties(&self) -> Result> { + #[inline] pub fn get_encoding_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EncodingProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AudioStreamDescriptor: IAudioStreamDescriptor} impl RtActivatable for AudioStreamDescriptor {} impl AudioStreamDescriptor { - #[inline] pub fn create(encodingProperties: &super::mediaproperties::AudioEncodingProperties) -> Result> { unsafe { + #[inline] pub fn create(encodingProperties: &super::mediaproperties::AudioEncodingProperties) -> Result> { >::get_activation_factory().create(encodingProperties) - }} + } } DEFINE_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]) [CLSID_AudioStreamDescriptor]); 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(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_LeadingEncoderPadding(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_TrailingEncoderPadding(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_TrailingEncoderPadding(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn put_LeadingEncoderPadding(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_LeadingEncoderPadding(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_TrailingEncoderPadding(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_TrailingEncoderPadding(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IAudioStreamDescriptor2 { - #[inline] pub unsafe fn set_leading_encoder_padding(&self, value: &super::super::foundation::IReference) -> Result<()> { + #[inline] pub fn set_leading_encoder_padding(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LeadingEncoderPadding)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_leading_encoder_padding(&self) -> Result>> { + }} + #[inline] pub fn get_leading_encoder_padding(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LeadingEncoderPadding)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_trailing_encoder_padding(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_trailing_encoder_padding(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TrailingEncoderPadding)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_trailing_encoder_padding(&self) -> Result>> { + }} + #[inline] pub fn get_trailing_encoder_padding(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TrailingEncoderPadding)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, encodingProperties: *mut super::mediaproperties::AudioEncodingProperties, out: *mut *mut AudioStreamDescriptor) -> HRESULT }} impl IAudioStreamDescriptorFactory { - #[inline] pub unsafe fn create(&self, encodingProperties: &super::mediaproperties::AudioEncodingProperties) -> Result> { + #[inline] pub fn create(&self, encodingProperties: &super::mediaproperties::AudioEncodingProperties) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, encodingProperties as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_OpenFailed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_OpenFailed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_OpenFailed(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn GetEncodingProperties(&self, out: *mut *mut super::mediaproperties::AudioEncodingProperties) -> HRESULT, fn get_PlaybackItem(&self, out: *mut *mut super::playback::MediaPlaybackItem) -> HRESULT, fn get_Name(&self, out: *mut HSTRING) -> HRESULT, fn get_SupportInfo(&self, out: *mut *mut AudioTrackSupportInfo) -> HRESULT }} impl IAudioTrack { - #[inline] pub unsafe fn add_open_failed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_open_failed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_OpenFailed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_open_failed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_open_failed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_OpenFailed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_encoding_properties(&self) -> Result> { + }} + #[inline] pub fn get_encoding_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetEncodingProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_playback_item(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_playback_item(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PlaybackItem)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_support_info(&self) -> Result> { + }} + #[inline] pub fn get_support_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AudioTrack: IMediaTrack} 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(&self, out: *mut super::super::foundation::HResult) -> HRESULT + fn get_ExtendedError(&self, out: *mut foundation::HResult) -> HRESULT }} impl IAudioTrackOpenFailedEventArgs { - #[inline] pub unsafe fn get_extended_error(&self) -> Result { + #[inline] pub fn get_extended_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AudioTrackOpenFailedEventArgs: IAudioTrackOpenFailedEventArgs} DEFINE_IID!(IID_IAudioTrackSupportInfo, 395046903, 52281, 17574, 185, 81, 74, 86, 83, 240, 115, 250); @@ -8716,26 +8716,26 @@ RT_INTERFACE!{interface IAudioTrackSupportInfo(IAudioTrackSupportInfoVtbl): IIns fn get_MediaSourceStatus(&self, out: *mut MediaSourceStatus) -> HRESULT }} impl IAudioTrackSupportInfo { - #[inline] pub unsafe fn get_decoder_status(&self) -> Result { + #[inline] pub fn get_decoder_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DecoderStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_degradation(&self) -> Result { + }} + #[inline] pub fn get_degradation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Degradation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_degradation_reason(&self) -> Result { + }} + #[inline] pub fn get_degradation_reason(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DegradationReason)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_media_source_status(&self) -> Result { + }} + #[inline] pub fn get_media_source_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MediaSourceStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AudioTrackSupportInfo: IAudioTrackSupportInfo} DEFINE_IID!(IID_IChapterCue, 1923710977, 54154, 19466, 143, 166, 117, 205, 218, 244, 102, 76); @@ -8744,15 +8744,15 @@ RT_INTERFACE!{interface IChapterCue(IChapterCueVtbl): IInspectable(IInspectableV fn get_Title(&self, out: *mut HSTRING) -> HRESULT }} impl IChapterCue { - #[inline] pub unsafe fn set_title(&self, value: &HStringArg) -> Result<()> { + #[inline] pub fn set_title(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Title)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_title(&self) -> Result { + }} + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ChapterCue: IChapterCue} impl RtActivatable for ChapterCue {} @@ -8764,36 +8764,36 @@ DEFINE_IID!(IID_ICodecInfo, 1374199685, 60055, 18844, 134, 172, 76, 229, 231, 63 RT_INTERFACE!{interface ICodecInfo(ICodecInfoVtbl): IInspectable(IInspectableVtbl) [IID_ICodecInfo] { fn get_Kind(&self, out: *mut CodecKind) -> HRESULT, fn get_Category(&self, out: *mut CodecCategory) -> HRESULT, - fn get_Subtypes(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Subtypes(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_DisplayName(&self, out: *mut HSTRING) -> HRESULT, fn get_IsTrusted(&self, out: *mut bool) -> HRESULT }} impl ICodecInfo { - #[inline] pub unsafe fn get_kind(&self) -> Result { + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_category(&self) -> Result { + }} + #[inline] pub fn get_category(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Category)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_subtypes(&self) -> Result>> { + }} + #[inline] pub fn get_subtypes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Subtypes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_trusted(&self) -> Result { + }} + #[inline] pub fn get_is_trusted(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsTrusted)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class CodecInfo: ICodecInfo} RT_ENUM! { enum CodecKind: i32 { @@ -8801,14 +8801,14 @@ RT_ENUM! { enum CodecKind: i32 { }} DEFINE_IID!(IID_ICodecQuery, 573216058, 44897, 19972, 128, 138, 164, 99, 78, 47, 58, 196); RT_INTERFACE!{interface ICodecQuery(ICodecQueryVtbl): IInspectable(IInspectableVtbl) [IID_ICodecQuery] { - fn FindAllAsync(&self, kind: CodecKind, category: CodecCategory, subType: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn FindAllAsync(&self, kind: CodecKind, category: CodecCategory, subType: HSTRING, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl ICodecQuery { - #[inline] pub unsafe fn find_all_async(&self, kind: CodecKind, category: CodecCategory, subType: &HStringArg) -> Result>>> { + #[inline] pub fn find_all_async(&self, kind: CodecKind, category: CodecCategory, subType: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllAsync)(self as *const _ as *mut _, kind, category, subType.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class CodecQuery: ICodecQuery} impl RtActivatable for CodecQuery {} @@ -8816,159 +8816,159 @@ DEFINE_CLSID!(CodecQuery(&[87,105,110,100,111,119,115,46,77,101,100,105,97,46,67 RT_CLASS!{static class CodecSubtypes} impl RtActivatable for CodecSubtypes {} impl CodecSubtypes { - #[inline] pub fn get_video_format_dv25() -> Result { unsafe { + #[inline] pub fn get_video_format_dv25() -> Result { >::get_activation_factory().get_video_format_dv25() - }} - #[inline] pub fn get_video_format_dv50() -> Result { unsafe { + } + #[inline] pub fn get_video_format_dv50() -> Result { >::get_activation_factory().get_video_format_dv50() - }} - #[inline] pub fn get_video_format_dvc() -> Result { unsafe { + } + #[inline] pub fn get_video_format_dvc() -> Result { >::get_activation_factory().get_video_format_dvc() - }} - #[inline] pub fn get_video_format_dvh1() -> Result { unsafe { + } + #[inline] pub fn get_video_format_dvh1() -> Result { >::get_activation_factory().get_video_format_dvh1() - }} - #[inline] pub fn get_video_format_dvh_d() -> Result { unsafe { + } + #[inline] pub fn get_video_format_dvh_d() -> Result { >::get_activation_factory().get_video_format_dvh_d() - }} - #[inline] pub fn get_video_format_dvsd() -> Result { unsafe { + } + #[inline] pub fn get_video_format_dvsd() -> Result { >::get_activation_factory().get_video_format_dvsd() - }} - #[inline] pub fn get_video_format_dvsl() -> Result { unsafe { + } + #[inline] pub fn get_video_format_dvsl() -> Result { >::get_activation_factory().get_video_format_dvsl() - }} - #[inline] pub fn get_video_format_h263() -> Result { unsafe { + } + #[inline] pub fn get_video_format_h263() -> Result { >::get_activation_factory().get_video_format_h263() - }} - #[inline] pub fn get_video_format_h264() -> Result { unsafe { + } + #[inline] pub fn get_video_format_h264() -> Result { >::get_activation_factory().get_video_format_h264() - }} - #[inline] pub fn get_video_format_h265() -> Result { unsafe { + } + #[inline] pub fn get_video_format_h265() -> Result { >::get_activation_factory().get_video_format_h265() - }} - #[inline] pub fn get_video_format_h264_es() -> Result { unsafe { + } + #[inline] pub fn get_video_format_h264_es() -> Result { >::get_activation_factory().get_video_format_h264_es() - }} - #[inline] pub fn get_video_format_hevc() -> Result { unsafe { + } + #[inline] pub fn get_video_format_hevc() -> Result { >::get_activation_factory().get_video_format_hevc() - }} - #[inline] pub fn get_video_format_hevc_es() -> Result { unsafe { + } + #[inline] pub fn get_video_format_hevc_es() -> Result { >::get_activation_factory().get_video_format_hevc_es() - }} - #[inline] pub fn get_video_format_m4_s2() -> Result { unsafe { + } + #[inline] pub fn get_video_format_m4_s2() -> Result { >::get_activation_factory().get_video_format_m4_s2() - }} - #[inline] pub fn get_video_format_mjpg() -> Result { unsafe { + } + #[inline] pub fn get_video_format_mjpg() -> Result { >::get_activation_factory().get_video_format_mjpg() - }} - #[inline] pub fn get_video_format_mp43() -> Result { unsafe { + } + #[inline] pub fn get_video_format_mp43() -> Result { >::get_activation_factory().get_video_format_mp43() - }} - #[inline] pub fn get_video_format_mp4_s() -> Result { unsafe { + } + #[inline] pub fn get_video_format_mp4_s() -> Result { >::get_activation_factory().get_video_format_mp4_s() - }} - #[inline] pub fn get_video_format_mp4_v() -> Result { unsafe { + } + #[inline] pub fn get_video_format_mp4_v() -> Result { >::get_activation_factory().get_video_format_mp4_v() - }} - #[inline] pub fn get_video_format_mpeg2() -> Result { unsafe { + } + #[inline] pub fn get_video_format_mpeg2() -> Result { >::get_activation_factory().get_video_format_mpeg2() - }} - #[inline] pub fn get_video_format_vp80() -> Result { unsafe { + } + #[inline] pub fn get_video_format_vp80() -> Result { >::get_activation_factory().get_video_format_vp80() - }} - #[inline] pub fn get_video_format_vp90() -> Result { unsafe { + } + #[inline] pub fn get_video_format_vp90() -> Result { >::get_activation_factory().get_video_format_vp90() - }} - #[inline] pub fn get_video_format_mpg1() -> Result { unsafe { + } + #[inline] pub fn get_video_format_mpg1() -> Result { >::get_activation_factory().get_video_format_mpg1() - }} - #[inline] pub fn get_video_format_mss1() -> Result { unsafe { + } + #[inline] pub fn get_video_format_mss1() -> Result { >::get_activation_factory().get_video_format_mss1() - }} - #[inline] pub fn get_video_format_mss2() -> Result { unsafe { + } + #[inline] pub fn get_video_format_mss2() -> Result { >::get_activation_factory().get_video_format_mss2() - }} - #[inline] pub fn get_video_format_wmv1() -> Result { unsafe { + } + #[inline] pub fn get_video_format_wmv1() -> Result { >::get_activation_factory().get_video_format_wmv1() - }} - #[inline] pub fn get_video_format_wmv2() -> Result { unsafe { + } + #[inline] pub fn get_video_format_wmv2() -> Result { >::get_activation_factory().get_video_format_wmv2() - }} - #[inline] pub fn get_video_format_wmv3() -> Result { unsafe { + } + #[inline] pub fn get_video_format_wmv3() -> Result { >::get_activation_factory().get_video_format_wmv3() - }} - #[inline] pub fn get_video_format_wvc1() -> Result { unsafe { + } + #[inline] pub fn get_video_format_wvc1() -> Result { >::get_activation_factory().get_video_format_wvc1() - }} - #[inline] pub fn get_video_format420_o() -> Result { unsafe { + } + #[inline] pub fn get_video_format420_o() -> Result { >::get_activation_factory().get_video_format420_o() - }} - #[inline] pub fn get_audio_format_aac() -> Result { unsafe { + } + #[inline] pub fn get_audio_format_aac() -> Result { >::get_activation_factory().get_audio_format_aac() - }} - #[inline] pub fn get_audio_format_adts() -> Result { unsafe { + } + #[inline] pub fn get_audio_format_adts() -> Result { >::get_activation_factory().get_audio_format_adts() - }} - #[inline] pub fn get_audio_format_alac() -> Result { unsafe { + } + #[inline] pub fn get_audio_format_alac() -> Result { >::get_activation_factory().get_audio_format_alac() - }} - #[inline] pub fn get_audio_format_amr_nb() -> Result { unsafe { + } + #[inline] pub fn get_audio_format_amr_nb() -> Result { >::get_activation_factory().get_audio_format_amr_nb() - }} - #[inline] pub fn get_audio_format_amr_wb() -> Result { unsafe { + } + #[inline] pub fn get_audio_format_amr_wb() -> Result { >::get_activation_factory().get_audio_format_amr_wb() - }} - #[inline] pub fn get_audio_format_amr_wp() -> Result { unsafe { + } + #[inline] pub fn get_audio_format_amr_wp() -> Result { >::get_activation_factory().get_audio_format_amr_wp() - }} - #[inline] pub fn get_audio_format_dolby_ac3() -> Result { unsafe { + } + #[inline] pub fn get_audio_format_dolby_ac3() -> Result { >::get_activation_factory().get_audio_format_dolby_ac3() - }} - #[inline] pub fn get_audio_format_dolby_ac3_spdif() -> Result { unsafe { + } + #[inline] pub fn get_audio_format_dolby_ac3_spdif() -> Result { >::get_activation_factory().get_audio_format_dolby_ac3_spdif() - }} - #[inline] pub fn get_audio_format_dolby_ddplus() -> Result { unsafe { + } + #[inline] pub fn get_audio_format_dolby_ddplus() -> Result { >::get_activation_factory().get_audio_format_dolby_ddplus() - }} - #[inline] pub fn get_audio_format_drm() -> Result { unsafe { + } + #[inline] pub fn get_audio_format_drm() -> Result { >::get_activation_factory().get_audio_format_drm() - }} - #[inline] pub fn get_audio_format_dts() -> Result { unsafe { + } + #[inline] pub fn get_audio_format_dts() -> Result { >::get_activation_factory().get_audio_format_dts() - }} - #[inline] pub fn get_audio_format_flac() -> Result { unsafe { + } + #[inline] pub fn get_audio_format_flac() -> Result { >::get_activation_factory().get_audio_format_flac() - }} - #[inline] pub fn get_audio_format_float() -> Result { unsafe { + } + #[inline] pub fn get_audio_format_float() -> Result { >::get_activation_factory().get_audio_format_float() - }} - #[inline] pub fn get_audio_format_mp3() -> Result { unsafe { + } + #[inline] pub fn get_audio_format_mp3() -> Result { >::get_activation_factory().get_audio_format_mp3() - }} - #[inline] pub fn get_audio_format_mpeg() -> Result { unsafe { + } + #[inline] pub fn get_audio_format_mpeg() -> Result { >::get_activation_factory().get_audio_format_mpeg() - }} - #[inline] pub fn get_audio_format_msp1() -> Result { unsafe { + } + #[inline] pub fn get_audio_format_msp1() -> Result { >::get_activation_factory().get_audio_format_msp1() - }} - #[inline] pub fn get_audio_format_opus() -> Result { unsafe { + } + #[inline] pub fn get_audio_format_opus() -> Result { >::get_activation_factory().get_audio_format_opus() - }} - #[inline] pub fn get_audio_format_pcm() -> Result { unsafe { + } + #[inline] pub fn get_audio_format_pcm() -> Result { >::get_activation_factory().get_audio_format_pcm() - }} - #[inline] pub fn get_audio_format_wma_spdif() -> Result { unsafe { + } + #[inline] pub fn get_audio_format_wma_spdif() -> Result { >::get_activation_factory().get_audio_format_wma_spdif() - }} - #[inline] pub fn get_audio_format_wmaudio_lossless() -> Result { unsafe { + } + #[inline] pub fn get_audio_format_wmaudio_lossless() -> Result { >::get_activation_factory().get_audio_format_wmaudio_lossless() - }} - #[inline] pub fn get_audio_format_wmaudio_v8() -> Result { unsafe { + } + #[inline] pub fn get_audio_format_wmaudio_v8() -> Result { >::get_activation_factory().get_audio_format_wmaudio_v8() - }} - #[inline] pub fn get_audio_format_wmaudio_v9() -> Result { unsafe { + } + #[inline] pub fn get_audio_format_wmaudio_v9() -> Result { >::get_activation_factory().get_audio_format_wmaudio_v9() - }} + } } DEFINE_CLSID!(CodecSubtypes(&[87,105,110,100,111,119,115,46,77,101,100,105,97,46,67,111,114,101,46,67,111,100,101,99,83,117,98,116,121,112,101,115,0]) [CLSID_CodecSubtypes]); DEFINE_IID!(IID_ICodecSubtypesStatics, 2792015090, 34955, 16932, 140, 246, 42, 141, 78, 176, 35, 130); @@ -9026,261 +9026,261 @@ RT_INTERFACE!{static interface ICodecSubtypesStatics(ICodecSubtypesStaticsVtbl): fn get_AudioFormatWMAudioV9(&self, out: *mut HSTRING) -> HRESULT }} impl ICodecSubtypesStatics { - #[inline] pub unsafe fn get_video_format_dv25(&self) -> Result { + #[inline] pub fn get_video_format_dv25(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormatDV25)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_format_dv50(&self) -> Result { + }} + #[inline] pub fn get_video_format_dv50(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormatDV50)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_format_dvc(&self) -> Result { + }} + #[inline] pub fn get_video_format_dvc(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormatDvc)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_format_dvh1(&self) -> Result { + }} + #[inline] pub fn get_video_format_dvh1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormatDvh1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_format_dvh_d(&self) -> Result { + }} + #[inline] pub fn get_video_format_dvh_d(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormatDvhD)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_format_dvsd(&self) -> Result { + }} + #[inline] pub fn get_video_format_dvsd(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormatDvsd)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_format_dvsl(&self) -> Result { + }} + #[inline] pub fn get_video_format_dvsl(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormatDvsl)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_format_h263(&self) -> Result { + }} + #[inline] pub fn get_video_format_h263(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormatH263)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_format_h264(&self) -> Result { + }} + #[inline] pub fn get_video_format_h264(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormatH264)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_format_h265(&self) -> Result { + }} + #[inline] pub fn get_video_format_h265(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormatH265)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_format_h264_es(&self) -> Result { + }} + #[inline] pub fn get_video_format_h264_es(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormatH264ES)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_format_hevc(&self) -> Result { + }} + #[inline] pub fn get_video_format_hevc(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormatHevc)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_format_hevc_es(&self) -> Result { + }} + #[inline] pub fn get_video_format_hevc_es(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormatHevcES)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_format_m4_s2(&self) -> Result { + }} + #[inline] pub fn get_video_format_m4_s2(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormatM4S2)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_format_mjpg(&self) -> Result { + }} + #[inline] pub fn get_video_format_mjpg(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormatMjpg)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_format_mp43(&self) -> Result { + }} + #[inline] pub fn get_video_format_mp43(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormatMP43)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_format_mp4_s(&self) -> Result { + }} + #[inline] pub fn get_video_format_mp4_s(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormatMP4S)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_format_mp4_v(&self) -> Result { + }} + #[inline] pub fn get_video_format_mp4_v(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormatMP4V)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_format_mpeg2(&self) -> Result { + }} + #[inline] pub fn get_video_format_mpeg2(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormatMpeg2)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_format_vp80(&self) -> Result { + }} + #[inline] pub fn get_video_format_vp80(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormatVP80)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_format_vp90(&self) -> Result { + }} + #[inline] pub fn get_video_format_vp90(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormatVP90)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_format_mpg1(&self) -> Result { + }} + #[inline] pub fn get_video_format_mpg1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormatMpg1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_format_mss1(&self) -> Result { + }} + #[inline] pub fn get_video_format_mss1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormatMss1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_format_mss2(&self) -> Result { + }} + #[inline] pub fn get_video_format_mss2(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormatMss2)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_format_wmv1(&self) -> Result { + }} + #[inline] pub fn get_video_format_wmv1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormatWmv1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_format_wmv2(&self) -> Result { + }} + #[inline] pub fn get_video_format_wmv2(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormatWmv2)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_format_wmv3(&self) -> Result { + }} + #[inline] pub fn get_video_format_wmv3(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormatWmv3)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_format_wvc1(&self) -> Result { + }} + #[inline] pub fn get_video_format_wvc1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormatWvc1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_format420_o(&self) -> Result { + }} + #[inline] pub fn get_video_format420_o(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoFormat420O)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_format_aac(&self) -> Result { + }} + #[inline] pub fn get_audio_format_aac(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioFormatAac)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_format_adts(&self) -> Result { + }} + #[inline] pub fn get_audio_format_adts(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioFormatAdts)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_format_alac(&self) -> Result { + }} + #[inline] pub fn get_audio_format_alac(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioFormatAlac)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_format_amr_nb(&self) -> Result { + }} + #[inline] pub fn get_audio_format_amr_nb(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioFormatAmrNB)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_format_amr_wb(&self) -> Result { + }} + #[inline] pub fn get_audio_format_amr_wb(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioFormatAmrWB)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_format_amr_wp(&self) -> Result { + }} + #[inline] pub fn get_audio_format_amr_wp(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioFormatAmrWP)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_format_dolby_ac3(&self) -> Result { + }} + #[inline] pub fn get_audio_format_dolby_ac3(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioFormatDolbyAC3)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_format_dolby_ac3_spdif(&self) -> Result { + }} + #[inline] pub fn get_audio_format_dolby_ac3_spdif(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioFormatDolbyAC3Spdif)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_format_dolby_ddplus(&self) -> Result { + }} + #[inline] pub fn get_audio_format_dolby_ddplus(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioFormatDolbyDDPlus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_format_drm(&self) -> Result { + }} + #[inline] pub fn get_audio_format_drm(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioFormatDrm)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_format_dts(&self) -> Result { + }} + #[inline] pub fn get_audio_format_dts(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioFormatDts)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_format_flac(&self) -> Result { + }} + #[inline] pub fn get_audio_format_flac(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioFormatFlac)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_format_float(&self) -> Result { + }} + #[inline] pub fn get_audio_format_float(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioFormatFloat)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_format_mp3(&self) -> Result { + }} + #[inline] pub fn get_audio_format_mp3(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioFormatMP3)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_format_mpeg(&self) -> Result { + }} + #[inline] pub fn get_audio_format_mpeg(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioFormatMPeg)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_format_msp1(&self) -> Result { + }} + #[inline] pub fn get_audio_format_msp1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioFormatMsp1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_format_opus(&self) -> Result { + }} + #[inline] pub fn get_audio_format_opus(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioFormatOpus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_format_pcm(&self) -> Result { + }} + #[inline] pub fn get_audio_format_pcm(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioFormatPcm)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_format_wma_spdif(&self) -> Result { + }} + #[inline] pub fn get_audio_format_wma_spdif(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioFormatWmaSpdif)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_format_wmaudio_lossless(&self) -> Result { + }} + #[inline] pub fn get_audio_format_wmaudio_lossless(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioFormatWMAudioLossless)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_format_wmaudio_v8(&self) -> Result { + }} + #[inline] pub fn get_audio_format_wmaudio_v8(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioFormatWMAudioV8)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_format_wmaudio_v9(&self) -> Result { + }} + #[inline] pub fn get_audio_format_wmaudio_v9(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioFormatWMAudioV9)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IDataCue, 2088724333, 8124, 20013, 154, 135, 238, 56, 189, 29, 198, 55); RT_INTERFACE!{interface IDataCue(IDataCueVtbl): IInspectable(IInspectableVtbl) [IID_IDataCue] { @@ -9288,79 +9288,79 @@ RT_INTERFACE!{interface IDataCue(IDataCueVtbl): IInspectable(IInspectableVtbl) [ #[cfg(feature="windows-storage")] fn get_Data(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT }} impl IDataCue { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn set_data(&self, value: &super::super::storage::streams::IBuffer) -> Result<()> { + #[cfg(feature="windows-storage")] #[inline] pub fn set_data(&self, value: &super::super::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Data)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_data(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Data)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DataCue: IDataCue} impl RtActivatable for DataCue {} DEFINE_CLSID!(DataCue(&[87,105,110,100,111,119,115,46,77,101,100,105,97,46,67,111,114,101,46,68,97,116,97,67,117,101,0]) [CLSID_DataCue]); DEFINE_IID!(IID_IDataCue2, 3159759637, 38386, 18920, 150, 241, 141, 213, 218, 198, 141, 147); RT_INTERFACE!{interface IDataCue2(IDataCue2Vtbl): IInspectable(IInspectableVtbl) [IID_IDataCue2] { - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::PropertySet) -> HRESULT + fn get_Properties(&self, out: *mut *mut foundation::collections::PropertySet) -> HRESULT }} impl IDataCue2 { - #[inline] pub unsafe fn get_properties(&self) -> Result> { + #[inline] pub fn get_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut *mut FaceDetectionEffectFrame) -> HRESULT }} impl IFaceDetectedEventArgs { - #[inline] pub unsafe fn get_result_frame(&self) -> Result> { + #[inline] pub fn get_result_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResultFrame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, value: bool) -> HRESULT, fn get_Enabled(&self, out: *mut bool) -> HRESULT, - fn put_DesiredDetectionInterval(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_DesiredDetectionInterval(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn add_FaceDetected(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_FaceDetected(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn put_DesiredDetectionInterval(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_DesiredDetectionInterval(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn add_FaceDetected(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_FaceDetected(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl IFaceDetectionEffect { - #[inline] pub unsafe fn set_enabled(&self, value: bool) -> Result<()> { + #[inline] pub fn set_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Enabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_enabled(&self) -> Result { + }} + #[inline] pub fn get_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Enabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_desired_detection_interval(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_desired_detection_interval(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DesiredDetectionInterval)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_desired_detection_interval(&self) -> Result { + }} + #[inline] pub fn get_desired_detection_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DesiredDetectionInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_face_detected(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_face_detected(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_FaceDetected)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_face_detected(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_face_detected(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_FaceDetected)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class FaceDetectionEffect: IFaceDetectionEffect} DEFINE_IID!(IID_IFaceDetectionEffectDefinition, 1138532481, 47176, 20275, 183, 2, 31, 210, 98, 79, 176, 22); @@ -9371,38 +9371,38 @@ RT_INTERFACE!{interface IFaceDetectionEffectDefinition(IFaceDetectionEffectDefin fn get_SynchronousDetectionEnabled(&self, out: *mut bool) -> HRESULT }} impl IFaceDetectionEffectDefinition { - #[inline] pub unsafe fn set_detection_mode(&self, value: FaceDetectionMode) -> Result<()> { + #[inline] pub fn set_detection_mode(&self, value: FaceDetectionMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DetectionMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_detection_mode(&self) -> Result { + }} + #[inline] pub fn get_detection_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DetectionMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_synchronous_detection_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_synchronous_detection_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SynchronousDetectionEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_synchronous_detection_enabled(&self) -> Result { + }} + #[inline] pub fn get_synchronous_detection_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SynchronousDetectionEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class FaceDetectionEffectDefinition: super::effects::IVideoEffectDefinition} impl RtActivatable for FaceDetectionEffectDefinition {} DEFINE_CLSID!(FaceDetectionEffectDefinition(&[87,105,110,100,111,119,115,46,77,101,100,105,97,46,67,111,114,101,46,70,97,99,101,68,101,116,101,99,116,105,111,110,69,102,102,101,99,116,68,101,102,105,110,105,116,105,111,110,0]) [CLSID_FaceDetectionEffectDefinition]); 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_DetectedFaces(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IFaceDetectionEffectFrame { - #[inline] pub unsafe fn get_detected_faces(&self) -> Result>> { + #[inline] pub fn get_detected_faces(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DetectedFaces)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class FaceDetectionEffectFrame: IFaceDetectionEffectFrame} RT_ENUM! { enum FaceDetectionMode: i32 { @@ -9414,33 +9414,33 @@ RT_INTERFACE!{interface IHighDynamicRangeControl(IHighDynamicRangeControlVtbl): fn get_Enabled(&self, out: *mut bool) -> HRESULT }} impl IHighDynamicRangeControl { - #[inline] pub unsafe fn set_enabled(&self, value: bool) -> Result<()> { + #[inline] pub fn set_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Enabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_enabled(&self) -> Result { + }} + #[inline] pub fn get_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Enabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class HighDynamicRangeControl: IHighDynamicRangeControl} 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(&self, out: *mut f64) -> HRESULT, - fn get_FrameControllers(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_FrameControllers(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IHighDynamicRangeOutput { - #[inline] pub unsafe fn get_certainty(&self) -> Result { + #[inline] pub fn get_certainty(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Certainty)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_frame_controllers(&self) -> Result>> { + }} + #[inline] pub fn get_frame_controllers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FrameControllers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class HighDynamicRangeOutput: IHighDynamicRangeOutput} DEFINE_IID!(IID_IImageCue, 1384284802, 13947, 17419, 145, 22, 60, 132, 87, 13, 210, 112); @@ -9453,33 +9453,33 @@ RT_INTERFACE!{interface IImageCue(IImageCueVtbl): IInspectable(IInspectableVtbl) #[cfg(feature="windows-graphics")] fn get_SoftwareBitmap(&self, out: *mut *mut super::super::graphics::imaging::SoftwareBitmap) -> HRESULT }} impl IImageCue { - #[inline] pub unsafe fn get_position(&self) -> Result { + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_position(&self, value: TimedTextPoint) -> Result<()> { + }} + #[inline] pub fn set_position(&self, value: TimedTextPoint) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Position)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_extent(&self) -> Result { + }} + #[inline] pub fn get_extent(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Extent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_extent(&self, value: TimedTextSize) -> Result<()> { + }} + #[inline] pub fn set_extent(&self, value: TimedTextSize) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Extent)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn set_software_bitmap(&self, value: &super::super::graphics::imaging::SoftwareBitmap) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn set_software_bitmap(&self, value: &super::super::graphics::imaging::SoftwareBitmap) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SoftwareBitmap)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn get_software_bitmap(&self) -> Result> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_software_bitmap(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SoftwareBitmap)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ImageCue: IImageCue} impl RtActivatable for ImageCue {} @@ -9489,38 +9489,38 @@ RT_INTERFACE!{interface IInitializeMediaStreamSourceRequestedEventArgs(IInitiali fn get_Source(&self, out: *mut *mut MediaStreamSource) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy1(&self) -> (), #[cfg(feature="windows-storage")] fn get_RandomAccessStream(&self, out: *mut *mut super::super::storage::streams::IRandomAccessStream) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IInitializeMediaStreamSourceRequestedEventArgs { - #[inline] pub unsafe fn get_source(&self) -> Result> { + #[inline] pub fn get_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Source)(self 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_random_access_stream(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_random_access_stream(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RandomAccessStream)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class InitializeMediaStreamSourceRequestedEventArgs: IInitializeMediaStreamSourceRequestedEventArgs} RT_CLASS!{static class LowLightFusion} impl RtActivatable for LowLightFusion {} impl LowLightFusion { - #[cfg(feature="windows-graphics")] #[inline] pub fn get_supported_bitmap_pixel_formats() -> Result>> { unsafe { + #[cfg(feature="windows-graphics")] #[inline] pub fn get_supported_bitmap_pixel_formats() -> Result>>> { >::get_activation_factory().get_supported_bitmap_pixel_formats() - }} - #[inline] pub fn get_max_supported_frame_count() -> Result { unsafe { + } + #[inline] pub fn get_max_supported_frame_count() -> Result { >::get_activation_factory().get_max_supported_frame_count() - }} - #[cfg(feature="windows-graphics")] #[inline] pub fn fuse_async(frameSet: &super::super::foundation::collections::IIterable) -> Result>> { unsafe { + } + #[cfg(feature="windows-graphics")] #[inline] pub fn fuse_async(frameSet: &foundation::collections::IIterable) -> Result>> { >::get_activation_factory().fuse_async(frameSet) - }} + } } DEFINE_CLSID!(LowLightFusion(&[87,105,110,100,111,119,115,46,77,101,100,105,97,46,67,111,114,101,46,76,111,119,76,105,103,104,116,70,117,115,105,111,110,0]) [CLSID_LowLightFusion]); DEFINE_IID!(IID_ILowLightFusionResult, 2028846645, 10144, 17120, 156, 211, 115, 141, 32, 137, 222, 156); @@ -9528,114 +9528,114 @@ RT_INTERFACE!{interface ILowLightFusionResult(ILowLightFusionResultVtbl): IInspe #[cfg(feature="windows-graphics")] fn get_Frame(&self, out: *mut *mut super::super::graphics::imaging::SoftwareBitmap) -> HRESULT }} impl ILowLightFusionResult { - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn get_frame(&self) -> Result> { + #[cfg(feature="windows-graphics")] #[inline] pub fn get_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Frame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class LowLightFusionResult: ILowLightFusionResult} DEFINE_IID!(IID_ILowLightFusionStatics, 1392836973, 49822, 16610, 135, 169, 158, 31, 210, 241, 146, 245); RT_INTERFACE!{static interface ILowLightFusionStatics(ILowLightFusionStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ILowLightFusionStatics] { - #[cfg(feature="windows-graphics")] fn get_SupportedBitmapPixelFormats(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + #[cfg(feature="windows-graphics")] fn get_SupportedBitmapPixelFormats(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_MaxSupportedFrameCount(&self, out: *mut i32) -> HRESULT, - #[cfg(feature="windows-graphics")] fn FuseAsync(&self, frameSet: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT + #[cfg(feature="windows-graphics")] fn FuseAsync(&self, frameSet: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT }} impl ILowLightFusionStatics { - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn get_supported_bitmap_pixel_formats(&self) -> Result>> { + #[cfg(feature="windows-graphics")] #[inline] pub fn get_supported_bitmap_pixel_formats(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedBitmapPixelFormats)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_supported_frame_count(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_max_supported_frame_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxSupportedFrameCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn fuse_async(&self, frameSet: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn fuse_async(&self, frameSet: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FuseAsync)(self as *const _ as *mut _, frameSet as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Binding(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Binding(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Binding(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_Token(&self, out: *mut HSTRING) -> HRESULT, fn put_Token(&self, value: HSTRING) -> HRESULT, fn get_Source(&self, out: *mut *mut MediaSource) -> HRESULT }} impl IMediaBinder { - #[inline] pub unsafe fn add_binding(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_binding(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Binding)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_binding(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_binding(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Binding)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_token(&self) -> Result { + }} + #[inline] pub fn get_token(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Token)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_token(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_token(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Token)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_source(&self) -> Result> { + }} + #[inline] pub fn get_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Source)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaBinder: IMediaBinder} impl RtActivatable for MediaBinder {} DEFINE_CLSID!(MediaBinder(&[87,105,110,100,111,119,115,46,77,101,100,105,97,46,67,111,114,101,46,77,101,100,105,97,66,105,110,100,101,114,0]) [CLSID_MediaBinder]); 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Canceled(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Canceled(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Canceled(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_MediaBinder(&self, out: *mut *mut MediaBinder) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT, - fn SetUri(&self, uri: *mut super::super::foundation::Uri) -> HRESULT, + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT, + fn SetUri(&self, uri: *mut foundation::Uri) -> HRESULT, #[cfg(feature="windows-storage")] fn SetStream(&self, stream: *mut super::super::storage::streams::IRandomAccessStream, contentType: HSTRING) -> HRESULT, #[cfg(feature="windows-storage")] fn SetStreamReference(&self, stream: *mut super::super::storage::streams::IRandomAccessStreamReference, contentType: HSTRING) -> HRESULT }} impl IMediaBindingEventArgs { - #[inline] pub unsafe fn add_canceled(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_canceled(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Canceled)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_canceled(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_canceled(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Canceled)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_media_binder(&self) -> Result> { + }} + #[inline] pub fn get_media_binder(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MediaBinder)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_uri(&self, uri: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_uri(&self, uri: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetUri)(self as *const _ as *mut _, uri as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn set_stream(&self, stream: &super::super::storage::streams::IRandomAccessStream, contentType: &HStringArg) -> Result<()> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_stream(&self, stream: &super::super::storage::streams::IRandomAccessStream, contentType: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetStream)(self as *const _ as *mut _, 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(&self, stream: &super::super::storage::streams::IRandomAccessStreamReference, contentType: &HStringArg) -> Result<()> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_stream_reference(&self, stream: &super::super::storage::streams::IRandomAccessStreamReference, contentType: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetStreamReference)(self as *const _ as *mut _, stream as *const _ as *mut _, contentType.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MediaBindingEventArgs: IMediaBindingEventArgs} DEFINE_IID!(IID_IMediaBindingEventArgs2, 73714923, 47962, 18479, 184, 186, 240, 40, 76, 105, 101, 103); @@ -9644,63 +9644,63 @@ RT_INTERFACE!{interface IMediaBindingEventArgs2(IMediaBindingEventArgs2Vtbl): II #[cfg(feature="windows-storage")] fn SetStorageFile(&self, file: *mut super::super::storage::IStorageFile) -> HRESULT }} impl IMediaBindingEventArgs2 { - #[inline] pub unsafe fn set_adaptive_media_source(&self, mediaSource: &super::streaming::adaptive::AdaptiveMediaSource) -> Result<()> { + #[inline] pub fn set_adaptive_media_source(&self, mediaSource: &super::streaming::adaptive::AdaptiveMediaSource) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetAdaptiveMediaSource)(self as *const _ as *mut _, mediaSource as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn set_storage_file(&self, file: &super::super::storage::IStorageFile) -> Result<()> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_storage_file(&self, file: &super::super::storage::IStorageFile) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetStorageFile)(self as *const _ as *mut _, file as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_StartTime(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_Duration(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_Duration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_StartTime(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_StartTime(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_Duration(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_Duration(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn put_Id(&self, value: HSTRING) -> HRESULT, fn get_Id(&self, out: *mut HSTRING) -> HRESULT }} impl IMediaCue { - #[inline] pub unsafe fn set_start_time(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + #[inline] pub fn set_start_time(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StartTime)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_start_time(&self) -> Result { + }} + #[inline] pub fn get_start_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StartTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_duration(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_duration(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Duration)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_duration(&self) -> Result { + }} + #[inline] pub fn get_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Duration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Id)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&self) -> Result { + }} + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(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(&self, out: *mut *mut IMediaCue) -> HRESULT }} impl IMediaCueEventArgs { - #[inline] pub unsafe fn get_cue(&self) -> Result> { + #[inline] pub fn get_cue(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Cue)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaCueEventArgs: IMediaCueEventArgs} RT_ENUM! { enum MediaDecoderStatus: i32 { @@ -9715,173 +9715,173 @@ impl RtActivatable for MediaSource {} impl RtActivatable for MediaSource {} impl RtActivatable for MediaSource {} impl MediaSource { - #[inline] pub fn create_from_adaptive_media_source(mediaSource: &super::streaming::adaptive::AdaptiveMediaSource) -> Result> { unsafe { + #[inline] pub fn create_from_adaptive_media_source(mediaSource: &super::streaming::adaptive::AdaptiveMediaSource) -> Result>> { >::get_activation_factory().create_from_adaptive_media_source(mediaSource) - }} - #[inline] pub fn create_from_media_stream_source(mediaSource: &MediaStreamSource) -> Result> { unsafe { + } + #[inline] pub fn create_from_media_stream_source(mediaSource: &MediaStreamSource) -> Result>> { >::get_activation_factory().create_from_media_stream_source(mediaSource) - }} - #[inline] pub fn create_from_mse_stream_source(mediaSource: &MseStreamSource) -> Result> { unsafe { + } + #[inline] pub fn create_from_mse_stream_source(mediaSource: &MseStreamSource) -> Result>> { >::get_activation_factory().create_from_mse_stream_source(mediaSource) - }} - #[inline] pub fn create_from_imedia_source(mediaSource: &IMediaSource) -> Result> { unsafe { + } + #[inline] pub fn create_from_imedia_source(mediaSource: &IMediaSource) -> Result>> { >::get_activation_factory().create_from_imedia_source(mediaSource) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn create_from_storage_file(file: &super::super::storage::IStorageFile) -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_storage_file(file: &super::super::storage::IStorageFile) -> Result>> { >::get_activation_factory().create_from_storage_file(file) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn create_from_stream(stream: &super::super::storage::streams::IRandomAccessStream, contentType: &HStringArg) -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_stream(stream: &super::super::storage::streams::IRandomAccessStream, contentType: &HStringArg) -> Result>> { >::get_activation_factory().create_from_stream(stream, contentType) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn create_from_stream_reference(stream: &super::super::storage::streams::IRandomAccessStreamReference, contentType: &HStringArg) -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_stream_reference(stream: &super::super::storage::streams::IRandomAccessStreamReference, contentType: &HStringArg) -> Result>> { >::get_activation_factory().create_from_stream_reference(stream, contentType) - }} - #[inline] pub fn create_from_uri(uri: &super::super::foundation::Uri) -> Result> { unsafe { + } + #[inline] pub fn create_from_uri(uri: &foundation::Uri) -> Result>> { >::get_activation_factory().create_from_uri(uri) - }} - #[inline] pub fn create_from_media_binder(binder: &MediaBinder) -> Result> { unsafe { + } + #[inline] pub fn create_from_media_binder(binder: &MediaBinder) -> Result>> { >::get_activation_factory().create_from_media_binder(binder) - }} - #[inline] pub fn create_from_media_frame_source(frameSource: &super::capture::frames::MediaFrameSource) -> Result> { unsafe { + } + #[inline] pub fn create_from_media_frame_source(frameSource: &super::capture::frames::MediaFrameSource) -> Result>> { >::get_activation_factory().create_from_media_frame_source(frameSource) - }} + } } DEFINE_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]) [CLSID_MediaSource]); 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_OpenOperationCompleted(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_CustomProperties(&self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT, - fn get_Duration(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn add_OpenOperationCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_OpenOperationCompleted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn get_CustomProperties(&self, out: *mut *mut foundation::collections::ValueSet) -> HRESULT, + fn get_Duration(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn get_IsOpen(&self, out: *mut bool) -> HRESULT, - fn get_ExternalTimedTextSources(&self, out: *mut *mut super::super::foundation::collections::IObservableVector) -> HRESULT, - fn get_ExternalTimedMetadataTracks(&self, out: *mut *mut super::super::foundation::collections::IObservableVector) -> HRESULT + fn get_ExternalTimedTextSources(&self, out: *mut *mut foundation::collections::IObservableVector) -> HRESULT, + fn get_ExternalTimedMetadataTracks(&self, out: *mut *mut foundation::collections::IObservableVector) -> HRESULT }} impl IMediaSource2 { - #[inline] pub unsafe fn add_open_operation_completed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_open_operation_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_OpenOperationCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_open_operation_completed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_open_operation_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_OpenOperationCompleted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_custom_properties(&self) -> Result> { + }} + #[inline] pub fn get_custom_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CustomProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_duration(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_duration(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Duration)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_open(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_open(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsOpen)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_external_timed_text_sources(&self) -> Result>> { + }} + #[inline] pub fn get_external_timed_text_sources(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExternalTimedTextSources)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_external_timed_metadata_tracks(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_external_timed_metadata_tracks(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExternalTimedMetadataTracks)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StateChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_StateChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StateChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_State(&self, out: *mut MediaSourceState) -> HRESULT, fn Reset(&self) -> HRESULT }} impl IMediaSource3 { - #[inline] pub unsafe fn add_state_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_state_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StateChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_state_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_state_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StateChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_state(&self) -> Result { + }} + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn reset(&self) -> Result<()> { + }} + #[inline] pub fn reset(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Reset)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMediaSource4, 3182406999, 36607, 19555, 133, 166, 132, 222, 10, 227, 228, 242); RT_INTERFACE!{interface IMediaSource4(IMediaSource4Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaSource4] { fn get_AdaptiveMediaSource(&self, out: *mut *mut super::streaming::adaptive::AdaptiveMediaSource) -> HRESULT, fn get_MediaStreamSource(&self, out: *mut *mut MediaStreamSource) -> HRESULT, fn get_MseStreamSource(&self, out: *mut *mut MseStreamSource) -> HRESULT, - fn get_Uri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn OpenAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn get_Uri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn OpenAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IMediaSource4 { - #[inline] pub unsafe fn get_adaptive_media_source(&self) -> Result> { + #[inline] pub fn get_adaptive_media_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AdaptiveMediaSource)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_media_stream_source(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_media_stream_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MediaStreamSource)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mse_stream_source(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_mse_stream_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MseStreamSource)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_uri(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Uri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn open_async(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn open_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMediaSourceAppServiceConnection, 1642195607, 6422, 18448, 183, 244, 182, 66, 190, 130, 149, 150); RT_INTERFACE!{interface IMediaSourceAppServiceConnection(IMediaSourceAppServiceConnectionVtbl): IInspectable(IInspectableVtbl) [IID_IMediaSourceAppServiceConnection] { - fn add_InitializeMediaStreamSourceRequested(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_InitializeMediaStreamSourceRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_InitializeMediaStreamSourceRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_InitializeMediaStreamSourceRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn Start(&self) -> HRESULT }} impl IMediaSourceAppServiceConnection { - #[inline] pub unsafe fn add_initialize_media_stream_source_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_initialize_media_stream_source_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_InitializeMediaStreamSourceRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_initialize_media_stream_source_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_initialize_media_stream_source_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_InitializeMediaStreamSourceRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MediaSourceAppServiceConnection: IMediaSourceAppServiceConnection} impl RtActivatable for MediaSourceAppServiceConnection {} impl MediaSourceAppServiceConnection { - #[cfg(feature="windows-applicationmodel")] #[inline] pub fn create(appServiceConnection: &super::super::applicationmodel::appservice::AppServiceConnection) -> Result> { unsafe { + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn create(appServiceConnection: &super::super::applicationmodel::appservice::AppServiceConnection) -> Result> { >::get_activation_factory().create(appServiceConnection) - }} + } } DEFINE_CLSID!(MediaSourceAppServiceConnection(&[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,65,112,112,83,101,114,118,105,99,101,67,111,110,110,101,99,116,105,111,110,0]) [CLSID_MediaSourceAppServiceConnection]); DEFINE_IID!(IID_IMediaSourceAppServiceConnectionFactory, 1706627819, 32953, 17657, 156, 30, 225, 32, 246, 217, 40, 56); @@ -9889,22 +9889,22 @@ RT_INTERFACE!{static interface IMediaSourceAppServiceConnectionFactory(IMediaSou #[cfg(feature="windows-applicationmodel")] fn Create(&self, appServiceConnection: *mut super::super::applicationmodel::appservice::AppServiceConnection, out: *mut *mut MediaSourceAppServiceConnection) -> HRESULT }} impl IMediaSourceAppServiceConnectionFactory { - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn create(&self, appServiceConnection: &super::super::applicationmodel::appservice::AppServiceConnection) -> Result> { + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn create(&self, appServiceConnection: &super::super::applicationmodel::appservice::AppServiceConnection) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, appServiceConnection as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut super::super::foundation::HResult) -> HRESULT + fn get_ExtendedError(&self, out: *mut foundation::HResult) -> HRESULT }} impl IMediaSourceError { - #[inline] pub unsafe fn get_extended_error(&self) -> Result { + #[inline] pub fn get_extended_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MediaSourceError: IMediaSourceError} DEFINE_IID!(IID_IMediaSourceOpenOperationCompletedEventArgs, 4234685675, 57985, 18300, 168, 224, 26, 205, 101, 65, 20, 200); @@ -9912,11 +9912,11 @@ RT_INTERFACE!{interface IMediaSourceOpenOperationCompletedEventArgs(IMediaSource fn get_Error(&self, out: *mut *mut MediaSourceError) -> HRESULT }} impl IMediaSourceOpenOperationCompletedEventArgs { - #[inline] pub unsafe fn get_error(&self) -> Result> { + #[inline] pub fn get_error(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Error)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaSourceOpenOperationCompletedEventArgs: IMediaSourceOpenOperationCompletedEventArgs} RT_ENUM! { enum MediaSourceState: i32 { @@ -9928,16 +9928,16 @@ RT_INTERFACE!{interface IMediaSourceStateChangedEventArgs(IMediaSourceStateChang fn get_NewState(&self, out: *mut MediaSourceState) -> HRESULT }} impl IMediaSourceStateChangedEventArgs { - #[inline] pub unsafe fn get_old_state(&self) -> Result { + #[inline] pub fn get_old_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OldState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_new_state(&self) -> Result { + }} + #[inline] pub fn get_new_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NewState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MediaSourceStateChangedEventArgs: IMediaSourceStateChangedEventArgs} DEFINE_IID!(IID_IMediaSourceStatics, 4152192932, 18002, 16654, 177, 216, 233, 165, 226, 69, 164, 92); @@ -9952,71 +9952,71 @@ RT_INTERFACE!{static interface IMediaSourceStatics(IMediaSourceStaticsVtbl): IIn #[cfg(feature="windows-storage")] fn CreateFromStream(&self, stream: *mut super::super::storage::streams::IRandomAccessStream, contentType: HSTRING, out: *mut *mut MediaSource) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy6(&self) -> (), #[cfg(feature="windows-storage")] fn CreateFromStreamReference(&self, stream: *mut super::super::storage::streams::IRandomAccessStreamReference, contentType: HSTRING, out: *mut *mut MediaSource) -> HRESULT, - fn CreateFromUri(&self, uri: *mut super::super::foundation::Uri, out: *mut *mut MediaSource) -> HRESULT + fn CreateFromUri(&self, uri: *mut foundation::Uri, out: *mut *mut MediaSource) -> HRESULT }} impl IMediaSourceStatics { - #[inline] pub unsafe fn create_from_adaptive_media_source(&self, mediaSource: &super::streaming::adaptive::AdaptiveMediaSource) -> Result> { + #[inline] pub fn create_from_adaptive_media_source(&self, mediaSource: &super::streaming::adaptive::AdaptiveMediaSource) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromAdaptiveMediaSource)(self as *const _ as *mut _, 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(&self, mediaSource: &MediaStreamSource) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_from_media_stream_source(&self, mediaSource: &MediaStreamSource) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromMediaStreamSource)(self as *const _ as *mut _, 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(&self, mediaSource: &MseStreamSource) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_from_mse_stream_source(&self, mediaSource: &MseStreamSource) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromMseStreamSource)(self as *const _ as *mut _, 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(&self, mediaSource: &IMediaSource) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_from_imedia_source(&self, mediaSource: &IMediaSource) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromIMediaSource)(self as *const _ as *mut _, 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(&self, file: &super::super::storage::IStorageFile) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_storage_file(&self, file: &super::super::storage::IStorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromStorageFile)(self 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 create_from_stream(&self, stream: &super::super::storage::streams::IRandomAccessStream, contentType: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_stream(&self, stream: &super::super::storage::streams::IRandomAccessStream, contentType: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromStream)(self as *const _ as *mut _, 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(&self, stream: &super::super::storage::streams::IRandomAccessStreamReference, contentType: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_stream_reference(&self, stream: &super::super::storage::streams::IRandomAccessStreamReference, contentType: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromStreamReference)(self as *const _ as *mut _, 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(&self, uri: &super::super::foundation::Uri) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_from_uri(&self, uri: &foundation::Uri) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromUri)(self as *const _ as *mut _, uri as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, binder: *mut MediaBinder, out: *mut *mut MediaSource) -> HRESULT }} impl IMediaSourceStatics2 { - #[inline] pub unsafe fn create_from_media_binder(&self, binder: &MediaBinder) -> Result> { + #[inline] pub fn create_from_media_binder(&self, binder: &MediaBinder) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromMediaBinder)(self as *const _ as *mut _, binder as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IMediaSourceStatics3, 1161441494, 11242, 16674, 159, 115, 234, 206, 4, 82, 110, 53); RT_INTERFACE!{static interface IMediaSourceStatics3(IMediaSourceStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaSourceStatics3] { fn CreateFromMediaFrameSource(&self, frameSource: *mut super::capture::frames::MediaFrameSource, out: *mut *mut MediaSource) -> HRESULT }} impl IMediaSourceStatics3 { - #[inline] pub unsafe fn create_from_media_frame_source(&self, frameSource: &super::capture::frames::MediaFrameSource) -> Result> { + #[inline] pub fn create_from_media_frame_source(&self, frameSource: &super::capture::frames::MediaFrameSource) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromMediaFrameSource)(self as *const _ as *mut _, frameSource as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum MediaSourceStatus: i32 { FullySupported (MediaSourceStatus_FullySupported) = 0, Unknown (MediaSourceStatus_Unknown) = 1, @@ -10030,29 +10030,29 @@ RT_INTERFACE!{interface IMediaStreamDescriptor(IMediaStreamDescriptorVtbl): IIns fn get_Language(&self, out: *mut HSTRING) -> HRESULT }} impl IMediaStreamDescriptor { - #[inline] pub unsafe fn get_is_selected(&self) -> Result { + #[inline] pub fn get_is_selected(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSelected)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Name)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_name(&self) -> Result { + }} + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_language(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_language(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Language)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_language(&self) -> Result { + }} + #[inline] pub fn get_language(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Language)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMediaStreamDescriptor2, 1349714191, 59570, 16497, 176, 11, 235, 243, 55, 167, 107, 88); RT_INTERFACE!{interface IMediaStreamDescriptor2(IMediaStreamDescriptor2Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaStreamDescriptor2] { @@ -10060,113 +10060,113 @@ RT_INTERFACE!{interface IMediaStreamDescriptor2(IMediaStreamDescriptor2Vtbl): II fn get_Label(&self, out: *mut HSTRING) -> HRESULT }} impl IMediaStreamDescriptor2 { - #[inline] pub unsafe fn set_label(&self, value: &HStringArg) -> Result<()> { + #[inline] pub fn set_label(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Label)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_label(&self) -> Result { + }} + #[inline] pub fn get_label(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Label)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Processed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Processed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Processed(&self, token: foundation::EventRegistrationToken) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy2(&self) -> (), #[cfg(feature="windows-storage")] fn get_Buffer(&self, out: *mut *mut super::super::storage::streams::Buffer) -> HRESULT, - fn get_Timestamp(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_Timestamp(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn get_ExtendedProperties(&self, out: *mut *mut MediaStreamSamplePropertySet) -> HRESULT, fn get_Protection(&self, out: *mut *mut MediaStreamSampleProtectionProperties) -> HRESULT, - fn put_DecodeTimestamp(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_DecodeTimestamp(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_Duration(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_Duration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_DecodeTimestamp(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_DecodeTimestamp(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_Duration(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_Duration(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn put_KeyFrame(&self, value: bool) -> HRESULT, fn get_KeyFrame(&self, out: *mut bool) -> HRESULT, fn put_Discontinuous(&self, value: bool) -> HRESULT, fn get_Discontinuous(&self, out: *mut bool) -> HRESULT }} impl IMediaStreamSample { - #[inline] pub unsafe fn add_processed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_processed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Processed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_processed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_processed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Processed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_buffer(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_buffer(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Buffer)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_properties(&self) -> Result> { + }} + #[inline] pub fn get_extended_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExtendedProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_protection(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_protection(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Protection)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_decode_timestamp(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_decode_timestamp(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DecodeTimestamp)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_decode_timestamp(&self) -> Result { + }} + #[inline] pub fn get_decode_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DecodeTimestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_duration(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_duration(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Duration)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_duration(&self) -> Result { + }} + #[inline] pub fn get_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Duration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_key_frame(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_key_frame(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_KeyFrame)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_key_frame(&self) -> Result { + }} + #[inline] pub fn get_key_frame(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_KeyFrame)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_discontinuous(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_discontinuous(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Discontinuous)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_discontinuous(&self) -> Result { + }} + #[inline] pub fn get_discontinuous(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Discontinuous)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MediaStreamSample: IMediaStreamSample} impl RtActivatable for MediaStreamSample {} impl MediaStreamSample { - #[cfg(feature="windows-storage")] #[inline] pub fn create_from_buffer(buffer: &super::super::storage::streams::IBuffer, timestamp: super::super::foundation::TimeSpan) -> Result> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_buffer(buffer: &super::super::storage::streams::IBuffer, timestamp: foundation::TimeSpan) -> Result>> { >::get_activation_factory().create_from_buffer(buffer, timestamp) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn create_from_stream_async(stream: &super::super::storage::streams::IInputStream, count: u32, timestamp: super::super::foundation::TimeSpan) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_stream_async(stream: &super::super::storage::streams::IInputStream, count: u32, timestamp: foundation::TimeSpan) -> Result>> { >::get_activation_factory().create_from_stream_async(stream, count, timestamp) - }} + } } DEFINE_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]) [CLSID_MediaStreamSample]); -RT_CLASS!{class MediaStreamSamplePropertySet: super::super::foundation::collections::IMap} +RT_CLASS!{class MediaStreamSamplePropertySet: foundation::collections::IMap} 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(&self, valueSize: u32, value: *mut u8) -> HRESULT, @@ -10177,75 +10177,75 @@ RT_INTERFACE!{interface IMediaStreamSampleProtectionProperties(IMediaStreamSampl fn GetSubSampleMapping(&self, valueSize: *mut u32, value: *mut *mut u8) -> HRESULT }} impl IMediaStreamSampleProtectionProperties { - #[inline] pub unsafe fn set_key_identifier(&self, value: &[u8]) -> Result<()> { + #[inline] pub fn set_key_identifier(&self, value: &[u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetKeyIdentifier)(self as *const _ as *mut _, value.len() as u32, value.as_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_key_identifier(&self) -> Result> { + }} + #[inline] pub fn get_key_identifier(&self) -> Result> { unsafe { let mut valueSize = 0; let mut value = null_mut(); let hr = ((*self.lpVtbl).GetKeyIdentifier)(self as *const _ as *mut _, &mut valueSize, &mut value); if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn set_initialization_vector(&self, value: &[u8]) -> Result<()> { + }} + #[inline] pub fn set_initialization_vector(&self, value: &[u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetInitializationVector)(self as *const _ as *mut _, value.len() as u32, value.as_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_initialization_vector(&self) -> Result> { + }} + #[inline] pub fn get_initialization_vector(&self) -> Result> { unsafe { let mut valueSize = 0; let mut value = null_mut(); let hr = ((*self.lpVtbl).GetInitializationVector)(self as *const _ as *mut _, &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(&self, value: &[u8]) -> Result<()> { + }} + #[inline] pub fn set_sub_sample_mapping(&self, value: &[u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetSubSampleMapping)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[inline] pub fn get_sub_sample_mapping(&self) -> Result> { unsafe { let mut valueSize = 0; let mut value = null_mut(); let hr = ((*self.lpVtbl).GetSubSampleMapping)(self as *const _ as *mut _, &mut valueSize, &mut value); if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } + }} } 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(&self, buffer: *mut super::super::storage::streams::IBuffer, timestamp: super::super::foundation::TimeSpan, out: *mut *mut MediaStreamSample) -> HRESULT, - #[cfg(feature="windows-storage")] fn CreateFromStreamAsync(&self, stream: *mut super::super::storage::streams::IInputStream, count: u32, timestamp: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn CreateFromBuffer(&self, buffer: *mut super::super::storage::streams::IBuffer, timestamp: foundation::TimeSpan, out: *mut *mut MediaStreamSample) -> HRESULT, + #[cfg(feature="windows-storage")] fn CreateFromStreamAsync(&self, stream: *mut super::super::storage::streams::IInputStream, count: u32, timestamp: foundation::TimeSpan, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IMediaStreamSampleStatics { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn create_from_buffer(&self, buffer: &super::super::storage::streams::IBuffer, timestamp: super::super::foundation::TimeSpan) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_buffer(&self, buffer: &super::super::storage::streams::IBuffer, timestamp: foundation::TimeSpan) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromBuffer)(self as *const _ as *mut _, 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(&self, stream: &super::super::storage::streams::IInputStream, count: u32, timestamp: super::super::foundation::TimeSpan) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_stream_async(&self, stream: &super::super::storage::streams::IInputStream, count: u32, timestamp: foundation::TimeSpan) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromStreamAsync)(self as *const _ as *mut _, stream as *const _ as *mut _, count, timestamp, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Closed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Starting(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Starting(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Paused(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Paused(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_SampleRequested(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SampleRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_SwitchStreamsRequested(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SwitchStreamsRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Closed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Closed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Starting(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Starting(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Paused(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Paused(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_SampleRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SampleRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_SwitchStreamsRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SwitchStreamsRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn NotifyError(&self, errorStatus: MediaStreamSourceErrorStatus) -> HRESULT, fn AddStreamDescriptor(&self, descriptor: *mut IMediaStreamDescriptor) -> HRESULT, fn put_MediaProtectionManager(&self, value: *mut super::protection::MediaProtectionManager) -> HRESULT, fn get_MediaProtectionManager(&self, out: *mut *mut super::protection::MediaProtectionManager) -> HRESULT, - fn put_Duration(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_Duration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_Duration(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_Duration(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn put_CanSeek(&self, value: bool) -> HRESULT, fn get_CanSeek(&self, out: *mut bool) -> HRESULT, - fn put_BufferTime(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_BufferTime(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn SetBufferedRange(&self, startOffset: super::super::foundation::TimeSpan, endOffset: super::super::foundation::TimeSpan) -> HRESULT, + fn put_BufferTime(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_BufferTime(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn SetBufferedRange(&self, startOffset: foundation::TimeSpan, endOffset: foundation::TimeSpan) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy21(&self) -> (), #[cfg(feature="windows-storage")] fn get_MusicProperties(&self, out: *mut *mut super::super::storage::fileproperties::MusicProperties) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy22(&self) -> (), @@ -10257,165 +10257,165 @@ RT_INTERFACE!{interface IMediaStreamSource(IMediaStreamSourceVtbl): IInspectable fn AddProtectionKey(&self, streamDescriptor: *mut IMediaStreamDescriptor, keyIdentifierSize: u32, keyIdentifier: *mut u8, licenseDataSize: u32, licenseData: *mut u8) -> HRESULT }} impl IMediaStreamSource { - #[inline] pub unsafe fn add_closed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_closed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Closed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_closed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_closed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Closed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_starting(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_starting(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Starting)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_starting(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_starting(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Starting)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_paused(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_paused(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Paused)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_paused(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_paused(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Paused)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_sample_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_sample_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SampleRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_sample_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_sample_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SampleRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_switch_streams_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_switch_streams_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SwitchStreamsRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_switch_streams_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_switch_streams_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SwitchStreamsRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn notify_error(&self, errorStatus: MediaStreamSourceErrorStatus) -> Result<()> { + }} + #[inline] pub fn notify_error(&self, errorStatus: MediaStreamSourceErrorStatus) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).NotifyError)(self as *const _ as *mut _, errorStatus); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_stream_descriptor(&self, descriptor: &IMediaStreamDescriptor) -> Result<()> { + }} + #[inline] pub fn add_stream_descriptor(&self, descriptor: &IMediaStreamDescriptor) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddStreamDescriptor)(self as *const _ as *mut _, descriptor as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_media_protection_manager(&self, value: &super::protection::MediaProtectionManager) -> Result<()> { + }} + #[inline] pub fn set_media_protection_manager(&self, value: &super::protection::MediaProtectionManager) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MediaProtectionManager)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_media_protection_manager(&self) -> Result> { + }} + #[inline] pub fn get_media_protection_manager(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MediaProtectionManager)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_duration(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_duration(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Duration)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_duration(&self) -> Result { + }} + #[inline] pub fn get_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Duration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_seek(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_seek(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanSeek)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_seek(&self) -> Result { + }} + #[inline] pub fn get_can_seek(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanSeek)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_buffer_time(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_buffer_time(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BufferTime)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_buffer_time(&self) -> Result { + }} + #[inline] pub fn get_buffer_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BufferTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_buffered_range(&self, startOffset: super::super::foundation::TimeSpan, endOffset: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_buffered_range(&self, startOffset: foundation::TimeSpan, endOffset: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetBufferedRange)(self as *const _ as *mut _, startOffset, endOffset); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_music_properties(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_music_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MusicProperties)(self 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_video_properties(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_video_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoProperties)(self 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_thumbnail(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_thumbnail(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Thumbnail)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_thumbnail(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_thumbnail(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Thumbnail)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_protection_key(&self, streamDescriptor: &IMediaStreamDescriptor, keyIdentifier: &[u8], licenseData: &[u8]) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_protection_key(&self, streamDescriptor: &IMediaStreamDescriptor, keyIdentifier: &[u8], licenseData: &[u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddProtectionKey)(self as *const _ as *mut _, 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} impl RtActivatable for MediaStreamSource {} impl MediaStreamSource { - #[inline] pub fn create_from_descriptor(descriptor: &IMediaStreamDescriptor) -> Result> { unsafe { + #[inline] pub fn create_from_descriptor(descriptor: &IMediaStreamDescriptor) -> Result> { >::get_activation_factory().create_from_descriptor(descriptor) - }} - #[inline] pub fn create_from_descriptors(descriptor: &IMediaStreamDescriptor, descriptor2: &IMediaStreamDescriptor) -> Result> { unsafe { + } + #[inline] pub fn create_from_descriptors(descriptor: &IMediaStreamDescriptor, descriptor2: &IMediaStreamDescriptor) -> Result> { >::get_activation_factory().create_from_descriptors(descriptor, descriptor2) - }} + } } DEFINE_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]) [CLSID_MediaStreamSource]); 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SampleRendered(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_SampleRendered(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SampleRendered(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IMediaStreamSource2 { - #[inline] pub unsafe fn add_sample_rendered(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_sample_rendered(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SampleRendered)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_sample_rendered(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_sample_rendered(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SampleRendered)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMediaStreamSource3, 1781147462, 15837, 19935, 161, 33, 148, 4, 94, 207, 148, 64); RT_INTERFACE!{interface IMediaStreamSource3(IMediaStreamSource3Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaStreamSource3] { - fn put_MaxSupportedPlaybackRate(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_MaxSupportedPlaybackRate(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn put_MaxSupportedPlaybackRate(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_MaxSupportedPlaybackRate(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IMediaStreamSource3 { - #[inline] pub unsafe fn set_max_supported_playback_rate(&self, value: &super::super::foundation::IReference) -> Result<()> { + #[inline] pub fn set_max_supported_playback_rate(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxSupportedPlaybackRate)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_supported_playback_rate(&self) -> Result>> { + }} + #[inline] pub fn get_max_supported_playback_rate(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxSupportedPlaybackRate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IMediaStreamSource4, 487390379, 33549, 16764, 163, 169, 36, 84, 253, 100, 21, 199); RT_INTERFACE!{interface IMediaStreamSource4(IMediaStreamSource4Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaStreamSource4] { @@ -10423,26 +10423,26 @@ RT_INTERFACE!{interface IMediaStreamSource4(IMediaStreamSource4Vtbl): IInspectab fn get_IsLive(&self, out: *mut bool) -> HRESULT }} impl IMediaStreamSource4 { - #[inline] pub unsafe fn set_is_live(&self, value: bool) -> Result<()> { + #[inline] pub fn set_is_live(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsLive)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_live(&self) -> Result { + }} + #[inline] pub fn get_is_live(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsLive)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut MediaStreamSourceClosedRequest) -> HRESULT }} impl IMediaStreamSourceClosedEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaStreamSourceClosedEventArgs: IMediaStreamSourceClosedEventArgs} RT_ENUM! { enum MediaStreamSourceClosedReason: i32 { @@ -10453,11 +10453,11 @@ RT_INTERFACE!{interface IMediaStreamSourceClosedRequest(IMediaStreamSourceClosed fn get_Reason(&self, out: *mut MediaStreamSourceClosedReason) -> HRESULT }} impl IMediaStreamSourceClosedRequest { - #[inline] pub unsafe fn get_reason(&self) -> Result { + #[inline] pub fn get_reason(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Reason)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MediaStreamSourceClosedRequest: IMediaStreamSourceClosedRequest} RT_ENUM! { enum MediaStreamSourceErrorStatus: i32 { @@ -10469,27 +10469,27 @@ RT_INTERFACE!{static interface IMediaStreamSourceFactory(IMediaStreamSourceFacto fn CreateFromDescriptors(&self, descriptor: *mut IMediaStreamDescriptor, descriptor2: *mut IMediaStreamDescriptor, out: *mut *mut MediaStreamSource) -> HRESULT }} impl IMediaStreamSourceFactory { - #[inline] pub unsafe fn create_from_descriptor(&self, descriptor: &IMediaStreamDescriptor) -> Result> { + #[inline] pub fn create_from_descriptor(&self, descriptor: &IMediaStreamDescriptor) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromDescriptor)(self as *const _ as *mut _, 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(&self, descriptor: &IMediaStreamDescriptor, descriptor2: &IMediaStreamDescriptor) -> Result> { + }} + #[inline] pub fn create_from_descriptors(&self, descriptor: &IMediaStreamDescriptor, descriptor2: &IMediaStreamDescriptor) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromDescriptors)(self as *const _ as *mut _, descriptor as *const _ as *mut _, descriptor2 as *const _ as *mut _, &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(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + fn get_SampleLag(&self, out: *mut foundation::TimeSpan) -> HRESULT }} impl IMediaStreamSourceSampleRenderedEventArgs { - #[inline] pub unsafe fn get_sample_lag(&self) -> Result { + #[inline] pub fn get_sample_lag(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SampleLag)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MediaStreamSourceSampleRenderedEventArgs: IMediaStreamSourceSampleRenderedEventArgs} DEFINE_IID!(IID_IMediaStreamSourceSampleRequest, 1303593385, 13569, 19867, 131, 249, 143, 35, 92, 130, 37, 50); @@ -10501,29 +10501,29 @@ RT_INTERFACE!{interface IMediaStreamSourceSampleRequest(IMediaStreamSourceSample fn ReportSampleProgress(&self, progress: u32) -> HRESULT }} impl IMediaStreamSourceSampleRequest { - #[inline] pub unsafe fn get_stream_descriptor(&self) -> Result> { + #[inline] pub fn get_stream_descriptor(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StreamDescriptor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_sample(&self, value: &MediaStreamSample) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_sample(&self, value: &MediaStreamSample) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Sample)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_sample(&self) -> Result> { + }} + #[inline] pub fn get_sample(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Sample)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_sample_progress(&self, progress: u32) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn report_sample_progress(&self, progress: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportSampleProgress)(self as *const _ as *mut _, progress); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MediaStreamSourceSampleRequest: IMediaStreamSourceSampleRequest} DEFINE_IID!(IID_IMediaStreamSourceSampleRequestDeferral, 2023083010, 63874, 17352, 157, 22, 198, 45, 153, 147, 25, 190); @@ -10531,10 +10531,10 @@ RT_INTERFACE!{interface IMediaStreamSourceSampleRequestDeferral(IMediaStreamSour fn Complete(&self) -> HRESULT }} impl IMediaStreamSourceSampleRequestDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MediaStreamSourceSampleRequestDeferral: IMediaStreamSourceSampleRequestDeferral} DEFINE_IID!(IID_IMediaStreamSourceSampleRequestedEventArgs, 284801950, 29125, 18735, 132, 127, 13, 161, 243, 94, 129, 248); @@ -10542,11 +10542,11 @@ RT_INTERFACE!{interface IMediaStreamSourceSampleRequestedEventArgs(IMediaStreamS fn get_Request(&self, out: *mut *mut MediaStreamSourceSampleRequest) -> HRESULT }} impl IMediaStreamSourceSampleRequestedEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaStreamSourceSampleRequestedEventArgs: IMediaStreamSourceSampleRequestedEventArgs} DEFINE_IID!(IID_IMediaStreamSourceStartingEventArgs, 4094978290, 49780, 18752, 165, 187, 40, 165, 114, 69, 47, 167); @@ -10554,34 +10554,34 @@ RT_INTERFACE!{interface IMediaStreamSourceStartingEventArgs(IMediaStreamSourceSt fn get_Request(&self, out: *mut *mut MediaStreamSourceStartingRequest) -> HRESULT }} impl IMediaStreamSourceStartingEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaStreamSourceStartingEventArgs: IMediaStreamSourceStartingEventArgs} 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(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_StartPosition(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn GetDeferral(&self, out: *mut *mut MediaStreamSourceStartingRequestDeferral) -> HRESULT, - fn SetActualStartPosition(&self, position: super::super::foundation::TimeSpan) -> HRESULT + fn SetActualStartPosition(&self, position: foundation::TimeSpan) -> HRESULT }} impl IMediaStreamSourceStartingRequest { - #[inline] pub unsafe fn get_start_position(&self) -> Result>> { + #[inline] pub fn get_start_position(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StartPosition)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_actual_start_position(&self, position: super::super::foundation::TimeSpan) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_actual_start_position(&self, position: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetActualStartPosition)(self as *const _ as *mut _, position); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MediaStreamSourceStartingRequest: IMediaStreamSourceStartingRequest} DEFINE_IID!(IID_IMediaStreamSourceStartingRequestDeferral, 1058231973, 25408, 19908, 153, 16, 6, 142, 217, 245, 152, 248); @@ -10589,10 +10589,10 @@ RT_INTERFACE!{interface IMediaStreamSourceStartingRequestDeferral(IMediaStreamSo fn Complete(&self) -> HRESULT }} impl IMediaStreamSourceStartingRequestDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MediaStreamSourceStartingRequestDeferral: IMediaStreamSourceStartingRequestDeferral} DEFINE_IID!(IID_IMediaStreamSourceSwitchStreamsRequest, 1102610574, 14505, 20163, 155, 160, 182, 155, 133, 80, 30, 144); @@ -10602,21 +10602,21 @@ RT_INTERFACE!{interface IMediaStreamSourceSwitchStreamsRequest(IMediaStreamSourc fn GetDeferral(&self, out: *mut *mut MediaStreamSourceSwitchStreamsRequestDeferral) -> HRESULT }} impl IMediaStreamSourceSwitchStreamsRequest { - #[inline] pub unsafe fn get_old_stream_descriptor(&self) -> Result> { + #[inline] pub fn get_old_stream_descriptor(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OldStreamDescriptor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_new_stream_descriptor(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_new_stream_descriptor(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NewStreamDescriptor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaStreamSourceSwitchStreamsRequest: IMediaStreamSourceSwitchStreamsRequest} DEFINE_IID!(IID_IMediaStreamSourceSwitchStreamsRequestDeferral, 3202603061, 42245, 20378, 185, 67, 43, 140, 177, 180, 187, 217); @@ -10624,10 +10624,10 @@ RT_INTERFACE!{interface IMediaStreamSourceSwitchStreamsRequestDeferral(IMediaStr fn Complete(&self) -> HRESULT }} impl IMediaStreamSourceSwitchStreamsRequestDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MediaStreamSourceSwitchStreamsRequestDeferral: IMediaStreamSourceSwitchStreamsRequestDeferral} DEFINE_IID!(IID_IMediaStreamSourceSwitchStreamsRequestedEventArgs, 1109404530, 28321, 18039, 152, 30, 53, 10, 13, 164, 18, 170); @@ -10635,11 +10635,11 @@ RT_INTERFACE!{interface IMediaStreamSourceSwitchStreamsRequestedEventArgs(IMedia fn get_Request(&self, out: *mut *mut MediaStreamSourceSwitchStreamsRequest) -> HRESULT }} impl IMediaStreamSourceSwitchStreamsRequestedEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaStreamSourceSwitchStreamsRequestedEventArgs: IMediaStreamSourceSwitchStreamsRequestedEventArgs} DEFINE_IID!(IID_IMediaTrack, 65141500, 51505, 18714, 180, 107, 193, 14, 232, 194, 86, 183); @@ -10651,30 +10651,30 @@ RT_INTERFACE!{interface IMediaTrack(IMediaTrackVtbl): IInspectable(IInspectableV fn get_Label(&self, out: *mut HSTRING) -> HRESULT }} impl IMediaTrack { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_language(&self) -> Result { + }} + #[inline] pub fn get_language(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Language)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_track_kind(&self) -> Result { + }} + #[inline] pub fn get_track_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TrackKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_label(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_label(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Label)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_label(&self) -> Result { + }} + #[inline] pub fn get_label(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Label)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum MediaTrackKind: i32 { Audio (MediaTrackKind_Audio) = 0, Video (MediaTrackKind_Video) = 1, TimedMetadata (MediaTrackKind_TimedMetadata) = 2, @@ -10690,26 +10690,26 @@ RT_ENUM! { enum MseReadyState: i32 { }} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_UpdateStarting(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Updated(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Updated(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_UpdateEnded(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_UpdateEnded(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ErrorOccurred(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ErrorOccurred(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Aborted(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Aborted(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_UpdateStarting(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_UpdateStarting(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Updated(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Updated(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_UpdateEnded(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_UpdateEnded(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ErrorOccurred(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ErrorOccurred(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Aborted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Aborted(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_Mode(&self, out: *mut MseAppendMode) -> HRESULT, fn put_Mode(&self, value: MseAppendMode) -> HRESULT, fn get_IsUpdating(&self, out: *mut bool) -> HRESULT, - fn get_Buffered(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_TimestampOffset(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_TimestampOffset(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_AppendWindowStart(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_AppendWindowStart(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_AppendWindowEnd(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_AppendWindowEnd(&self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_Buffered(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_TimestampOffset(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_TimestampOffset(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_AppendWindowStart(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_AppendWindowStart(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_AppendWindowEnd(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_AppendWindowEnd(&self, value: *mut foundation::IReference) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy20(&self) -> (), #[cfg(feature="windows-storage")] fn AppendBuffer(&self, buffer: *mut super::super::storage::streams::IBuffer) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy21(&self) -> (), @@ -10717,310 +10717,310 @@ RT_INTERFACE!{interface IMseSourceBuffer(IMseSourceBufferVtbl): IInspectable(IIn #[cfg(not(feature="windows-storage"))] fn __Dummy22(&self) -> (), #[cfg(feature="windows-storage")] fn AppendStreamMaxSize(&self, stream: *mut super::super::storage::streams::IInputStream, maxSize: u64) -> HRESULT, fn Abort(&self) -> HRESULT, - fn Remove(&self, start: super::super::foundation::TimeSpan, end: *mut super::super::foundation::IReference) -> HRESULT + fn Remove(&self, start: foundation::TimeSpan, end: *mut foundation::IReference) -> HRESULT }} impl IMseSourceBuffer { - #[inline] pub unsafe fn add_update_starting(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_update_starting(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_UpdateStarting)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_update_starting(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_update_starting(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_UpdateStarting)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_updated(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_updated(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Updated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_updated(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_updated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Updated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_update_ended(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_update_ended(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_UpdateEnded)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_update_ended(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_update_ended(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_UpdateEnded)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_error_occurred(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_error_occurred(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ErrorOccurred)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_error_occurred(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_error_occurred(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ErrorOccurred)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_aborted(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_aborted(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Aborted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_aborted(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_aborted(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Aborted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_mode(&self) -> Result { + }} + #[inline] pub fn get_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Mode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_mode(&self, value: MseAppendMode) -> Result<()> { + }} + #[inline] pub fn set_mode(&self, value: MseAppendMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Mode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_updating(&self) -> Result { + }} + #[inline] pub fn get_is_updating(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsUpdating)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_buffered(&self) -> Result>> { + }} + #[inline] pub fn get_buffered(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Buffered)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_timestamp_offset(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_timestamp_offset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TimestampOffset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_timestamp_offset(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_timestamp_offset(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TimestampOffset)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_append_window_start(&self) -> Result { + }} + #[inline] pub fn get_append_window_start(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AppendWindowStart)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_append_window_start(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_append_window_start(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AppendWindowStart)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_append_window_end(&self) -> Result>> { + }} + #[inline] pub fn get_append_window_end(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppendWindowEnd)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_append_window_end(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_append_window_end(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AppendWindowEnd)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn append_buffer(&self, buffer: &super::super::storage::streams::IBuffer) -> Result<()> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn append_buffer(&self, buffer: &super::super::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AppendBuffer)(self as *const _ as *mut _, buffer as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn append_stream(&self, stream: &super::super::storage::streams::IInputStream) -> Result<()> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn append_stream(&self, stream: &super::super::storage::streams::IInputStream) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AppendStream)(self as *const _ as *mut _, 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(&self, stream: &super::super::storage::streams::IInputStream, maxSize: u64) -> Result<()> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn append_stream_max_size(&self, stream: &super::super::storage::streams::IInputStream, maxSize: u64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AppendStreamMaxSize)(self as *const _ as *mut _, stream as *const _ as *mut _, maxSize); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn abort(&self) -> Result<()> { + }} + #[inline] pub fn abort(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Abort)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove(&self, start: super::super::foundation::TimeSpan, end: &super::super::foundation::IReference) -> Result<()> { + }} + #[inline] pub fn remove(&self, start: foundation::TimeSpan, end: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Remove)(self as *const _ as *mut _, start, end as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MseSourceBuffer: IMseSourceBuffer} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SourceBufferAdded(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_SourceBufferRemoved(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SourceBufferRemoved(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_Buffers(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn add_SourceBufferAdded(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceBufferAdded(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_SourceBufferRemoved(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceBufferRemoved(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn get_Buffers(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IMseSourceBufferList { - #[inline] pub unsafe fn add_source_buffer_added(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_source_buffer_added(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SourceBufferAdded)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_source_buffer_added(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_source_buffer_added(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SourceBufferAdded)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_source_buffer_removed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_source_buffer_removed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SourceBufferRemoved)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_source_buffer_removed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_source_buffer_removed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SourceBufferRemoved)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_buffers(&self) -> Result>> { + }} + #[inline] pub fn get_buffers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Buffers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MseSourceBufferList: IMseSourceBufferList} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Opened(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Ended(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Ended(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Closed(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Closed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Opened(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Opened(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Ended(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Ended(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Closed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Closed(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_SourceBuffers(&self, out: *mut *mut MseSourceBufferList) -> HRESULT, fn get_ActiveSourceBuffers(&self, out: *mut *mut MseSourceBufferList) -> HRESULT, fn get_ReadyState(&self, out: *mut MseReadyState) -> HRESULT, - fn get_Duration(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_Duration(&self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_Duration(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_Duration(&self, value: *mut foundation::IReference) -> HRESULT, fn AddSourceBuffer(&self, mimeType: HSTRING, out: *mut *mut MseSourceBuffer) -> HRESULT, fn RemoveSourceBuffer(&self, buffer: *mut MseSourceBuffer) -> HRESULT, fn EndOfStream(&self, status: MseEndOfStreamStatus) -> HRESULT }} impl IMseStreamSource { - #[inline] pub unsafe fn add_opened(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_opened(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Opened)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_opened(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_opened(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Opened)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_ended(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_ended(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Ended)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_ended(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_ended(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Ended)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_closed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_closed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Closed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_closed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_closed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Closed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_source_buffers(&self) -> Result> { + }} + #[inline] pub fn get_source_buffers(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SourceBuffers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_active_source_buffers(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_active_source_buffers(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ActiveSourceBuffers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ready_state(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_ready_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReadyState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_duration(&self) -> Result>> { + }} + #[inline] pub fn get_duration(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Duration)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_duration(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_duration(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Duration)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_source_buffer(&self, mimeType: &HStringArg) -> Result> { + }} + #[inline] pub fn add_source_buffer(&self, mimeType: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AddSourceBuffer)(self as *const _ as *mut _, mimeType.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn remove_source_buffer(&self, buffer: &MseSourceBuffer) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn remove_source_buffer(&self, buffer: &MseSourceBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveSourceBuffer)(self as *const _ as *mut _, buffer as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn end_of_stream(&self, status: MseEndOfStreamStatus) -> Result<()> { + }} + #[inline] pub fn end_of_stream(&self, status: MseEndOfStreamStatus) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).EndOfStream)(self as *const _ as *mut _, status); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MseStreamSource: IMseStreamSource} impl RtActivatable for MseStreamSource {} impl RtActivatable for MseStreamSource {} impl MseStreamSource { - #[inline] pub fn is_content_type_supported(contentType: &HStringArg) -> Result { unsafe { + #[inline] pub fn is_content_type_supported(contentType: &HStringArg) -> Result { >::get_activation_factory().is_content_type_supported(contentType) - }} + } } DEFINE_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]) [CLSID_MseStreamSource]); DEFINE_IID!(IID_IMseStreamSource2, 1727364407, 63975, 16778, 156, 222, 160, 32, 233, 86, 85, 43); RT_INTERFACE!{interface IMseStreamSource2(IMseStreamSource2Vtbl): IInspectable(IInspectableVtbl) [IID_IMseStreamSource2] { - fn get_LiveSeekableRange(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_LiveSeekableRange(&self, value: *mut super::super::foundation::IReference) -> HRESULT + fn get_LiveSeekableRange(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_LiveSeekableRange(&self, value: *mut foundation::IReference) -> HRESULT }} impl IMseStreamSource2 { - #[inline] pub unsafe fn get_live_seekable_range(&self) -> Result>> { + #[inline] pub fn get_live_seekable_range(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LiveSeekableRange)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_live_seekable_range(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_live_seekable_range(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LiveSeekableRange)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, contentType: HSTRING, out: *mut bool) -> HRESULT }} impl IMseStreamSourceStatics { - #[inline] pub unsafe fn is_content_type_supported(&self, contentType: &HStringArg) -> Result { + #[inline] pub fn is_content_type_supported(&self, contentType: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsContentTypeSupported)(self as *const _ as *mut _, contentType.get(), &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, + Start: foundation::TimeSpan, End: foundation::TimeSpan, }} 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(&self, out: *mut *mut HighDynamicRangeControl) -> HRESULT, - fn put_DesiredAnalysisInterval(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_DesiredAnalysisInterval(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn add_SceneAnalyzed(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SceneAnalyzed(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn put_DesiredAnalysisInterval(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_DesiredAnalysisInterval(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn add_SceneAnalyzed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SceneAnalyzed(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl ISceneAnalysisEffect { - #[inline] pub unsafe fn get_high_dynamic_range_analyzer(&self) -> Result> { + #[inline] pub fn get_high_dynamic_range_analyzer(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HighDynamicRangeAnalyzer)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_desired_analysis_interval(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_desired_analysis_interval(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DesiredAnalysisInterval)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_desired_analysis_interval(&self) -> Result { + }} + #[inline] pub fn get_desired_analysis_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DesiredAnalysisInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_scene_analyzed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_scene_analyzed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SceneAnalyzed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_scene_analyzed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_scene_analyzed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SceneAnalyzed)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SceneAnalysisEffect: ISceneAnalysisEffect} RT_CLASS!{class SceneAnalysisEffectDefinition: super::effects::IVideoEffectDefinition} @@ -11032,16 +11032,16 @@ RT_INTERFACE!{interface ISceneAnalysisEffectFrame(ISceneAnalysisEffectFrameVtbl) fn get_HighDynamicRange(&self, out: *mut *mut HighDynamicRangeOutput) -> HRESULT }} impl ISceneAnalysisEffectFrame { - #[inline] pub unsafe fn get_frame_control_values(&self) -> Result> { + #[inline] pub fn get_frame_control_values(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FrameControlValues)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_high_dynamic_range(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_high_dynamic_range(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HighDynamicRange)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SceneAnalysisEffectFrame: ISceneAnalysisEffectFrame} DEFINE_IID!(IID_ISceneAnalysisEffectFrame2, 760097214, 1567, 18350, 153, 21, 2, 82, 75, 95, 154, 95); @@ -11049,11 +11049,11 @@ RT_INTERFACE!{interface ISceneAnalysisEffectFrame2(ISceneAnalysisEffectFrame2Vtb fn get_AnalysisRecommendation(&self, out: *mut SceneAnalysisRecommendation) -> HRESULT }} impl ISceneAnalysisEffectFrame2 { - #[inline] pub unsafe fn get_analysis_recommendation(&self) -> Result { + #[inline] pub fn get_analysis_recommendation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AnalysisRecommendation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum SceneAnalysisRecommendation: i32 { Standard (SceneAnalysisRecommendation_Standard) = 0, Hdr (SceneAnalysisRecommendation_Hdr) = 1, LowLight (SceneAnalysisRecommendation_LowLight) = 2, @@ -11063,77 +11063,77 @@ RT_INTERFACE!{interface ISceneAnalyzedEventArgs(ISceneAnalyzedEventArgsVtbl): II fn get_ResultFrame(&self, out: *mut *mut SceneAnalysisEffectFrame) -> HRESULT }} impl ISceneAnalyzedEventArgs { - #[inline] pub unsafe fn get_result_frame(&self) -> Result> { + #[inline] pub fn get_result_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResultFrame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SceneAnalyzedEventArgs: ISceneAnalyzedEventArgs} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SelectedIndexChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_SelectedIndexChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SelectedIndexChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn put_SelectedIndex(&self, value: i32) -> HRESULT, fn get_SelectedIndex(&self, out: *mut i32) -> HRESULT }} impl ISingleSelectMediaTrackList { - #[inline] pub unsafe fn add_selected_index_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_selected_index_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SelectedIndexChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_selected_index_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_selected_index_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SelectedIndexChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_selected_index(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_selected_index(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SelectedIndex)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_selected_index(&self) -> Result { + }} + #[inline] pub fn get_selected_index(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SelectedIndex)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ISpeechCue, 2934068444, 5925, 19373, 128, 67, 169, 132, 153, 176, 23, 162); RT_INTERFACE!{interface ISpeechCue(ISpeechCueVtbl): IInspectable(IInspectableVtbl) [IID_ISpeechCue] { fn get_Text(&self, out: *mut HSTRING) -> HRESULT, fn put_Text(&self, value: HSTRING) -> HRESULT, - fn get_StartPositionInInput(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_StartPositionInInput(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_EndPositionInInput(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_EndPositionInInput(&self, value: *mut super::super::foundation::IReference) -> HRESULT + fn get_StartPositionInInput(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_StartPositionInInput(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_EndPositionInInput(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_EndPositionInInput(&self, value: *mut foundation::IReference) -> HRESULT }} impl ISpeechCue { - #[inline] pub unsafe fn get_text(&self) -> Result { + #[inline] pub fn get_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Text)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_text(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_text(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Text)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_start_position_in_input(&self) -> Result>> { + }} + #[inline] pub fn get_start_position_in_input(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StartPositionInInput)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_start_position_in_input(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_start_position_in_input(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StartPositionInInput)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_end_position_in_input(&self) -> Result>> { + }} + #[inline] pub fn get_end_position_in_input(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EndPositionInInput)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_end_position_in_input(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_end_position_in_input(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_EndPositionInInput)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SpeechCue: ISpeechCue} impl RtActivatable for SpeechCue {} @@ -11143,82 +11143,82 @@ RT_ENUM! { enum TimedMetadataKind: i32 { }} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CueEntered(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_CueExited(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CueExited(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_TrackFailed(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_TrackFailed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_Cues(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_ActiveCues(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn add_CueEntered(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CueEntered(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_CueExited(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CueExited(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_TrackFailed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_TrackFailed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn get_Cues(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_ActiveCues(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_TimedMetadataKind(&self, out: *mut TimedMetadataKind) -> HRESULT, fn get_DispatchType(&self, out: *mut HSTRING) -> HRESULT, fn AddCue(&self, cue: *mut IMediaCue) -> HRESULT, fn RemoveCue(&self, cue: *mut IMediaCue) -> HRESULT }} impl ITimedMetadataTrack { - #[inline] pub unsafe fn add_cue_entered(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_cue_entered(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CueEntered)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_cue_entered(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_cue_entered(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CueEntered)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_cue_exited(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_cue_exited(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CueExited)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_cue_exited(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_cue_exited(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CueExited)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_track_failed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_track_failed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_TrackFailed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_track_failed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_track_failed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_TrackFailed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_cues(&self) -> Result>> { + }} + #[inline] pub fn get_cues(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Cues)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_active_cues(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_active_cues(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ActiveCues)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_timed_metadata_kind(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_timed_metadata_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TimedMetadataKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_dispatch_type(&self) -> Result { + }} + #[inline] pub fn get_dispatch_type(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DispatchType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_cue(&self, cue: &IMediaCue) -> Result<()> { + }} + #[inline] pub fn add_cue(&self, cue: &IMediaCue) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddCue)(self as *const _ as *mut _, cue as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove_cue(&self, cue: &IMediaCue) -> Result<()> { + }} + #[inline] pub fn remove_cue(&self, cue: &IMediaCue) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveCue)(self as *const _ as *mut _, cue as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class TimedMetadataTrack: ITimedMetadataTrack} impl RtActivatable for TimedMetadataTrack {} impl TimedMetadataTrack { - #[inline] pub fn create(id: &HStringArg, language: &HStringArg, kind: TimedMetadataKind) -> Result> { unsafe { + #[inline] pub fn create(id: &HStringArg, language: &HStringArg, kind: TimedMetadataKind) -> Result> { >::get_activation_factory().create(id, language, kind) - }} + } } DEFINE_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]) [CLSID_TimedMetadataTrack]); DEFINE_IID!(IID_ITimedMetadataTrack2, 565491272, 40861, 16570, 168, 243, 26, 146, 117, 58, 239, 11); @@ -11227,33 +11227,33 @@ RT_INTERFACE!{interface ITimedMetadataTrack2(ITimedMetadataTrack2Vtbl): IInspect fn get_Name(&self, out: *mut HSTRING) -> HRESULT }} impl ITimedMetadataTrack2 { - #[inline] pub unsafe fn get_playback_item(&self) -> Result> { + #[inline] pub fn get_playback_item(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PlaybackItem)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &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(&self, out: *mut TimedMetadataTrackErrorCode) -> HRESULT, - fn get_ExtendedError(&self, out: *mut super::super::foundation::HResult) -> HRESULT + fn get_ExtendedError(&self, out: *mut foundation::HResult) -> HRESULT }} impl ITimedMetadataTrackError { - #[inline] pub unsafe fn get_error_code(&self) -> Result { + #[inline] pub fn get_error_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ErrorCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_error(&self) -> Result { + }} + #[inline] pub fn get_extended_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class TimedMetadataTrackError: ITimedMetadataTrackError} RT_ENUM! { enum TimedMetadataTrackErrorCode: i32 { @@ -11264,34 +11264,34 @@ RT_INTERFACE!{static interface ITimedMetadataTrackFactory(ITimedMetadataTrackFac fn Create(&self, id: HSTRING, language: HSTRING, kind: TimedMetadataKind, out: *mut *mut TimedMetadataTrack) -> HRESULT }} impl ITimedMetadataTrackFactory { - #[inline] pub unsafe fn create(&self, id: &HStringArg, language: &HStringArg, kind: TimedMetadataKind) -> Result> { + #[inline] pub fn create(&self, id: &HStringArg, language: &HStringArg, kind: TimedMetadataKind) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, id.get(), language.get(), kind, &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(&self, out: *mut *mut TimedMetadataTrackError) -> HRESULT }} impl ITimedMetadataTrackFailedEventArgs { - #[inline] pub unsafe fn get_error(&self) -> Result> { + #[inline] pub fn get_error(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Error)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class TimedMetadataTrackFailedEventArgs: ITimedMetadataTrackFailedEventArgs} DEFINE_IID!(IID_ITimedMetadataTrackProvider, 998187044, 63310, 19166, 147, 197, 33, 157, 160, 91, 104, 86); RT_INTERFACE!{interface ITimedMetadataTrackProvider(ITimedMetadataTrackProviderVtbl): IInspectable(IInspectableVtbl) [IID_ITimedMetadataTrackProvider] { - fn get_TimedMetadataTracks(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_TimedMetadataTracks(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl ITimedMetadataTrackProvider { - #[inline] pub unsafe fn get_timed_metadata_tracks(&self) -> Result>> { + #[inline] pub fn get_timed_metadata_tracks(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TimedMetadataTracks)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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] { @@ -11299,32 +11299,32 @@ RT_INTERFACE!{interface ITimedTextCue(ITimedTextCueVtbl): IInspectable(IInspecta fn put_CueRegion(&self, value: *mut TimedTextRegion) -> HRESULT, fn get_CueStyle(&self, out: *mut *mut TimedTextStyle) -> HRESULT, fn put_CueStyle(&self, value: *mut TimedTextStyle) -> HRESULT, - fn get_Lines(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_Lines(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl ITimedTextCue { - #[inline] pub unsafe fn get_cue_region(&self) -> Result> { + #[inline] pub fn get_cue_region(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CueRegion)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_cue_region(&self, value: &TimedTextRegion) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_cue_region(&self, value: &TimedTextRegion) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CueRegion)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_cue_style(&self) -> Result> { + }} + #[inline] pub fn get_cue_style(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CueStyle)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_cue_style(&self, value: &TimedTextStyle) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_cue_style(&self, value: &TimedTextStyle) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CueStyle)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_lines(&self) -> Result>> { + }} + #[inline] pub fn get_lines(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Lines)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class TimedTextCue: ITimedTextCue} impl RtActivatable for TimedTextCue {} @@ -11345,23 +11345,23 @@ DEFINE_IID!(IID_ITimedTextLine, 2542632162, 29448, 19558, 190, 80, 101, 119, 114 RT_INTERFACE!{interface ITimedTextLine(ITimedTextLineVtbl): IInspectable(IInspectableVtbl) [IID_ITimedTextLine] { fn get_Text(&self, out: *mut HSTRING) -> HRESULT, fn put_Text(&self, value: HSTRING) -> HRESULT, - fn get_Subformats(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_Subformats(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl ITimedTextLine { - #[inline] pub unsafe fn get_text(&self) -> Result { + #[inline] pub fn get_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Text)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_text(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_text(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Text)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_subformats(&self) -> Result>> { + }} + #[inline] pub fn get_subformats(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Subformats)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class TimedTextLine: ITimedTextLine} impl RtActivatable for TimedTextLine {} @@ -11405,114 +11405,114 @@ RT_INTERFACE!{interface ITimedTextRegion(ITimedTextRegionVtbl): IInspectable(IIn fn put_ScrollMode(&self, value: TimedTextScrollMode) -> HRESULT }} impl ITimedTextRegion { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Name)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_position(&self) -> Result { + }} + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_position(&self, value: TimedTextPoint) -> Result<()> { + }} + #[inline] pub fn set_position(&self, value: TimedTextPoint) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Position)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_extent(&self) -> Result { + }} + #[inline] pub fn get_extent(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Extent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_extent(&self, value: TimedTextSize) -> Result<()> { + }} + #[inline] pub fn set_extent(&self, value: TimedTextSize) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Extent)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_background(&self) -> Result { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_background(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Background)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn set_background(&self, value: super::super::ui::Color) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_background(&self, value: super::super::ui::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Background)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_writing_mode(&self) -> Result { + }} + #[inline] pub fn get_writing_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_WritingMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_writing_mode(&self, value: TimedTextWritingMode) -> Result<()> { + }} + #[inline] pub fn set_writing_mode(&self, value: TimedTextWritingMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_WritingMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_alignment(&self) -> Result { + }} + #[inline] pub fn get_display_alignment(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DisplayAlignment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_alignment(&self, value: TimedTextDisplayAlignment) -> Result<()> { + }} + #[inline] pub fn set_display_alignment(&self, value: TimedTextDisplayAlignment) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayAlignment)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_line_height(&self) -> Result { + }} + #[inline] pub fn get_line_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LineHeight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_line_height(&self, value: TimedTextDouble) -> Result<()> { + }} + #[inline] pub fn set_line_height(&self, value: TimedTextDouble) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LineHeight)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_overflow_clipped(&self) -> Result { + }} + #[inline] pub fn get_is_overflow_clipped(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsOverflowClipped)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_overflow_clipped(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_overflow_clipped(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsOverflowClipped)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_padding(&self) -> Result { + }} + #[inline] pub fn get_padding(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Padding)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_padding(&self, value: TimedTextPadding) -> Result<()> { + }} + #[inline] pub fn set_padding(&self, value: TimedTextPadding) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Padding)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_text_wrapping(&self) -> Result { + }} + #[inline] pub fn get_text_wrapping(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TextWrapping)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_text_wrapping(&self, value: TimedTextWrapping) -> Result<()> { + }} + #[inline] pub fn set_text_wrapping(&self, value: TimedTextWrapping) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TextWrapping)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_zindex(&self) -> Result { + }} + #[inline] pub fn get_zindex(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ZIndex)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_zindex(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_zindex(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ZIndex)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_scroll_mode(&self) -> Result { + }} + #[inline] pub fn get_scroll_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ScrollMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_scroll_mode(&self, value: TimedTextScrollMode) -> Result<()> { + }} + #[inline] pub fn set_scroll_mode(&self, value: TimedTextScrollMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ScrollMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class TimedTextRegion: ITimedTextRegion} impl RtActivatable for TimedTextRegion {} @@ -11525,129 +11525,129 @@ RT_STRUCT! { struct TimedTextSize { }} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Resolved(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_Resolved(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Resolved(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl ITimedTextSource { - #[inline] pub unsafe fn add_resolved(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_resolved(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Resolved)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_resolved(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_resolved(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Resolved)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class TimedTextSource: ITimedTextSource} impl RtActivatable for TimedTextSource {} impl RtActivatable for TimedTextSource {} impl TimedTextSource { - #[cfg(feature="windows-storage")] #[inline] pub fn create_from_stream(stream: &super::super::storage::streams::IRandomAccessStream) -> Result> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_stream(stream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { >::get_activation_factory().create_from_stream(stream) - }} - #[inline] pub fn create_from_uri(uri: &super::super::foundation::Uri) -> Result> { unsafe { + } + #[inline] pub fn create_from_uri(uri: &foundation::Uri) -> Result>> { >::get_activation_factory().create_from_uri(uri) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn create_from_stream_with_language(stream: &super::super::storage::streams::IRandomAccessStream, defaultLanguage: &HStringArg) -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_stream_with_language(stream: &super::super::storage::streams::IRandomAccessStream, defaultLanguage: &HStringArg) -> Result>> { >::get_activation_factory().create_from_stream_with_language(stream, defaultLanguage) - }} - #[inline] pub fn create_from_uri_with_language(uri: &super::super::foundation::Uri, defaultLanguage: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_from_uri_with_language(uri: &foundation::Uri, defaultLanguage: &HStringArg) -> Result>> { >::get_activation_factory().create_from_uri_with_language(uri, defaultLanguage) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn create_from_stream_with_index(stream: &super::super::storage::streams::IRandomAccessStream, indexStream: &super::super::storage::streams::IRandomAccessStream) -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_stream_with_index(stream: &super::super::storage::streams::IRandomAccessStream, indexStream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { >::get_activation_factory().create_from_stream_with_index(stream, indexStream) - }} - #[inline] pub fn create_from_uri_with_index(uri: &super::super::foundation::Uri, indexUri: &super::super::foundation::Uri) -> Result> { unsafe { + } + #[inline] pub fn create_from_uri_with_index(uri: &foundation::Uri, indexUri: &foundation::Uri) -> Result>> { >::get_activation_factory().create_from_uri_with_index(uri, indexUri) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn create_from_stream_with_index_and_language(stream: &super::super::storage::streams::IRandomAccessStream, indexStream: &super::super::storage::streams::IRandomAccessStream, defaultLanguage: &HStringArg) -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_stream_with_index_and_language(stream: &super::super::storage::streams::IRandomAccessStream, indexStream: &super::super::storage::streams::IRandomAccessStream, defaultLanguage: &HStringArg) -> Result>> { >::get_activation_factory().create_from_stream_with_index_and_language(stream, indexStream, defaultLanguage) - }} - #[inline] pub fn create_from_uri_with_index_and_language(uri: &super::super::foundation::Uri, indexUri: &super::super::foundation::Uri, defaultLanguage: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_from_uri_with_index_and_language(uri: &foundation::Uri, indexUri: &foundation::Uri, defaultLanguage: &HStringArg) -> Result>> { >::get_activation_factory().create_from_uri_with_index_and_language(uri, indexUri, defaultLanguage) - }} + } } DEFINE_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]) [CLSID_TimedTextSource]); 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(&self, out: *mut *mut TimedMetadataTrackError) -> HRESULT, - fn get_Tracks(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_Tracks(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl ITimedTextSourceResolveResultEventArgs { - #[inline] pub unsafe fn get_error(&self) -> Result> { + #[inline] pub fn get_error(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Error)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_tracks(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_tracks(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Tracks)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } 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(&self) -> (), #[cfg(feature="windows-storage")] fn CreateFromStream(&self, stream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut TimedTextSource) -> HRESULT, - fn CreateFromUri(&self, uri: *mut super::super::foundation::Uri, out: *mut *mut TimedTextSource) -> HRESULT, + fn CreateFromUri(&self, uri: *mut foundation::Uri, out: *mut *mut TimedTextSource) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy2(&self) -> (), #[cfg(feature="windows-storage")] fn CreateFromStreamWithLanguage(&self, stream: *mut super::super::storage::streams::IRandomAccessStream, defaultLanguage: HSTRING, out: *mut *mut TimedTextSource) -> HRESULT, - fn CreateFromUriWithLanguage(&self, uri: *mut super::super::foundation::Uri, defaultLanguage: HSTRING, out: *mut *mut TimedTextSource) -> HRESULT + fn CreateFromUriWithLanguage(&self, uri: *mut foundation::Uri, defaultLanguage: HSTRING, out: *mut *mut TimedTextSource) -> HRESULT }} impl ITimedTextSourceStatics { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn create_from_stream(&self, stream: &super::super::storage::streams::IRandomAccessStream) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_stream(&self, stream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromStream)(self 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 create_from_uri(&self, uri: &super::super::foundation::Uri) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_from_uri(&self, uri: &foundation::Uri) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromUri)(self as *const _ as *mut _, 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(&self, stream: &super::super::storage::streams::IRandomAccessStream, defaultLanguage: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_stream_with_language(&self, stream: &super::super::storage::streams::IRandomAccessStream, defaultLanguage: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromStreamWithLanguage)(self as *const _ as *mut _, 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(&self, uri: &super::super::foundation::Uri, defaultLanguage: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_from_uri_with_language(&self, uri: &foundation::Uri, defaultLanguage: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromUriWithLanguage)(self as *const _ as *mut _, uri as *const _ as *mut _, defaultLanguage.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_ITimedTextSourceStatics2, 3060495874, 37438, 17402, 150, 51, 88, 112, 117, 129, 45, 181); RT_INTERFACE!{static interface ITimedTextSourceStatics2(ITimedTextSourceStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_ITimedTextSourceStatics2] { #[cfg(not(feature="windows-storage"))] fn __Dummy0(&self) -> (), #[cfg(feature="windows-storage")] fn CreateFromStreamWithIndex(&self, stream: *mut super::super::storage::streams::IRandomAccessStream, indexStream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut TimedTextSource) -> HRESULT, - fn CreateFromUriWithIndex(&self, uri: *mut super::super::foundation::Uri, indexUri: *mut super::super::foundation::Uri, out: *mut *mut TimedTextSource) -> HRESULT, + fn CreateFromUriWithIndex(&self, uri: *mut foundation::Uri, indexUri: *mut foundation::Uri, out: *mut *mut TimedTextSource) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy2(&self) -> (), #[cfg(feature="windows-storage")] fn CreateFromStreamWithIndexAndLanguage(&self, stream: *mut super::super::storage::streams::IRandomAccessStream, indexStream: *mut super::super::storage::streams::IRandomAccessStream, defaultLanguage: HSTRING, out: *mut *mut TimedTextSource) -> HRESULT, - fn CreateFromUriWithIndexAndLanguage(&self, uri: *mut super::super::foundation::Uri, indexUri: *mut super::super::foundation::Uri, defaultLanguage: HSTRING, out: *mut *mut TimedTextSource) -> HRESULT + fn CreateFromUriWithIndexAndLanguage(&self, uri: *mut foundation::Uri, indexUri: *mut foundation::Uri, defaultLanguage: HSTRING, out: *mut *mut TimedTextSource) -> HRESULT }} impl ITimedTextSourceStatics2 { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn create_from_stream_with_index(&self, stream: &super::super::storage::streams::IRandomAccessStream, indexStream: &super::super::storage::streams::IRandomAccessStream) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_stream_with_index(&self, stream: &super::super::storage::streams::IRandomAccessStream, indexStream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromStreamWithIndex)(self as *const _ as *mut _, stream as *const _ as *mut _, indexStream as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_from_uri_with_index(&self, uri: &super::super::foundation::Uri, indexUri: &super::super::foundation::Uri) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_from_uri_with_index(&self, uri: &foundation::Uri, indexUri: &foundation::Uri) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromUriWithIndex)(self as *const _ as *mut _, uri as *const _ as *mut _, indexUri 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_index_and_language(&self, stream: &super::super::storage::streams::IRandomAccessStream, indexStream: &super::super::storage::streams::IRandomAccessStream, defaultLanguage: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_stream_with_index_and_language(&self, stream: &super::super::storage::streams::IRandomAccessStream, indexStream: &super::super::storage::streams::IRandomAccessStream, defaultLanguage: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromStreamWithIndexAndLanguage)(self as *const _ as *mut _, stream as *const _ as *mut _, indexStream 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_index_and_language(&self, uri: &super::super::foundation::Uri, indexUri: &super::super::foundation::Uri, defaultLanguage: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_from_uri_with_index_and_language(&self, uri: &foundation::Uri, indexUri: &foundation::Uri, defaultLanguage: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromUriWithIndexAndLanguage)(self as *const _ as *mut _, uri as *const _ as *mut _, indexUri as *const _ as *mut _, defaultLanguage.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } 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] { @@ -11683,114 +11683,114 @@ RT_INTERFACE!{interface ITimedTextStyle(ITimedTextStyleVtbl): IInspectable(IInsp fn put_OutlineRadius(&self, value: TimedTextDouble) -> HRESULT }} impl ITimedTextStyle { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Name)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_font_family(&self) -> Result { + }} + #[inline] pub fn get_font_family(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FontFamily)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_font_family(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_font_family(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FontFamily)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_font_size(&self) -> Result { + }} + #[inline] pub fn get_font_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FontSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_font_size(&self, value: TimedTextDouble) -> Result<()> { + }} + #[inline] pub fn set_font_size(&self, value: TimedTextDouble) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FontSize)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_font_weight(&self) -> Result { + }} + #[inline] pub fn get_font_weight(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FontWeight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_font_weight(&self, value: TimedTextWeight) -> Result<()> { + }} + #[inline] pub fn set_font_weight(&self, value: TimedTextWeight) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FontWeight)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_foreground(&self) -> Result { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_foreground(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Foreground)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn set_foreground(&self, value: super::super::ui::Color) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_foreground(&self, value: super::super::ui::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Foreground)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_background(&self) -> Result { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_background(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Background)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn set_background(&self, value: super::super::ui::Color) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_background(&self, value: super::super::ui::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Background)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_background_always_shown(&self) -> Result { + }} + #[inline] pub fn get_is_background_always_shown(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsBackgroundAlwaysShown)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_background_always_shown(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_background_always_shown(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsBackgroundAlwaysShown)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_flow_direction(&self) -> Result { + }} + #[inline] pub fn get_flow_direction(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FlowDirection)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_flow_direction(&self, value: TimedTextFlowDirection) -> Result<()> { + }} + #[inline] pub fn set_flow_direction(&self, value: TimedTextFlowDirection) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FlowDirection)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_line_alignment(&self) -> Result { + }} + #[inline] pub fn get_line_alignment(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LineAlignment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_line_alignment(&self, value: TimedTextLineAlignment) -> Result<()> { + }} + #[inline] pub fn set_line_alignment(&self, value: TimedTextLineAlignment) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LineAlignment)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_outline_color(&self) -> Result { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_outline_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OutlineColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn set_outline_color(&self, value: super::super::ui::Color) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_outline_color(&self, value: super::super::ui::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OutlineColor)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_outline_thickness(&self) -> Result { + }} + #[inline] pub fn get_outline_thickness(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OutlineThickness)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_outline_thickness(&self, value: TimedTextDouble) -> Result<()> { + }} + #[inline] pub fn set_outline_thickness(&self, value: TimedTextDouble) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OutlineThickness)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_outline_radius(&self) -> Result { + }} + #[inline] pub fn get_outline_radius(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OutlineRadius)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_outline_radius(&self, value: TimedTextDouble) -> Result<()> { + }} + #[inline] pub fn set_outline_radius(&self, value: TimedTextDouble) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OutlineRadius)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class TimedTextStyle: ITimedTextStyle} impl RtActivatable for TimedTextStyle {} @@ -11807,42 +11807,42 @@ RT_INTERFACE!{interface ITimedTextStyle2(ITimedTextStyle2Vtbl): IInspectable(IIn fn put_IsOverlineEnabled(&self, value: bool) -> HRESULT }} impl ITimedTextStyle2 { - #[inline] pub unsafe fn get_font_style(&self) -> Result { + #[inline] pub fn get_font_style(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FontStyle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_font_style(&self, value: TimedTextFontStyle) -> Result<()> { + }} + #[inline] pub fn set_font_style(&self, value: TimedTextFontStyle) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FontStyle)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_underline_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_underline_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsUnderlineEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_underline_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_underline_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsUnderlineEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_line_through_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_line_through_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsLineThroughEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_line_through_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_line_through_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsLineThroughEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_overline_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_overline_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsOverlineEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_overline_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_overline_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsOverlineEnabled)(self as *const _ as *mut _, 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] { @@ -11854,33 +11854,33 @@ RT_INTERFACE!{interface ITimedTextSubformat(ITimedTextSubformatVtbl): IInspectab fn put_SubformatStyle(&self, value: *mut TimedTextStyle) -> HRESULT }} impl ITimedTextSubformat { - #[inline] pub unsafe fn get_start_index(&self) -> Result { + #[inline] pub fn get_start_index(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StartIndex)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_start_index(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_start_index(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StartIndex)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_length(&self) -> Result { + }} + #[inline] pub fn get_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Length)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_length(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_length(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Length)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_subformat_style(&self) -> Result> { + }} + #[inline] pub fn get_subformat_style(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SubformatStyle)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_subformat_style(&self, value: &TimedTextStyle) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_subformat_style(&self, value: &TimedTextStyle) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SubformatStyle)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class TimedTextSubformat: ITimedTextSubformat} impl RtActivatable for TimedTextSubformat {} @@ -11901,34 +11901,34 @@ DEFINE_IID!(IID_IVideoStabilizationEffect, 134784592, 38552, 20055, 135, 123, 18 RT_INTERFACE!{interface IVideoStabilizationEffect(IVideoStabilizationEffectVtbl): IInspectable(IInspectableVtbl) [IID_IVideoStabilizationEffect] { fn put_Enabled(&self, value: bool) -> HRESULT, fn get_Enabled(&self, out: *mut bool) -> HRESULT, - fn add_EnabledChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_EnabledChanged(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_EnabledChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnabledChanged(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, fn GetRecommendedStreamConfiguration(&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(&self, value: bool) -> Result<()> { + #[inline] pub fn set_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Enabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_enabled(&self) -> Result { + }} + #[inline] pub fn get_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Enabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_enabled_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_enabled_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_EnabledChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_enabled_changed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_enabled_changed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_EnabledChanged)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_recommended_stream_configuration(&self, controller: &super::devices::VideoDeviceController, desiredProperties: &super::mediaproperties::VideoEncodingProperties) -> Result> { + }} + #[inline] pub fn get_recommended_stream_configuration(&self, controller: &super::devices::VideoDeviceController, desiredProperties: &super::mediaproperties::VideoEncodingProperties) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetRecommendedStreamConfiguration)(self as *const _ as *mut _, controller as *const _ as *mut _, desiredProperties as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class VideoStabilizationEffect: IVideoStabilizationEffect} RT_CLASS!{class VideoStabilizationEffectDefinition: super::effects::IVideoEffectDefinition} @@ -11939,11 +11939,11 @@ RT_INTERFACE!{interface IVideoStabilizationEffectEnabledChangedEventArgs(IVideoS fn get_Reason(&self, out: *mut VideoStabilizationEffectEnabledChangedReason) -> HRESULT }} impl IVideoStabilizationEffectEnabledChangedEventArgs { - #[inline] pub unsafe fn get_reason(&self) -> Result { + #[inline] pub fn get_reason(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Reason)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class VideoStabilizationEffectEnabledChangedEventArgs: IVideoStabilizationEffectEnabledChangedEventArgs} RT_ENUM! { enum VideoStabilizationEffectEnabledChangedReason: i32 { @@ -11954,18 +11954,18 @@ RT_INTERFACE!{interface IVideoStreamDescriptor(IVideoStreamDescriptorVtbl): IIns fn get_EncodingProperties(&self, out: *mut *mut super::mediaproperties::VideoEncodingProperties) -> HRESULT }} impl IVideoStreamDescriptor { - #[inline] pub unsafe fn get_encoding_properties(&self) -> Result> { + #[inline] pub fn get_encoding_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EncodingProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class VideoStreamDescriptor: IVideoStreamDescriptor} impl RtActivatable for VideoStreamDescriptor {} impl VideoStreamDescriptor { - #[inline] pub fn create(encodingProperties: &super::mediaproperties::VideoEncodingProperties) -> Result> { unsafe { + #[inline] pub fn create(encodingProperties: &super::mediaproperties::VideoEncodingProperties) -> Result> { >::get_activation_factory().create(encodingProperties) - }} + } } DEFINE_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]) [CLSID_VideoStreamDescriptor]); DEFINE_IID!(IID_IVideoStreamDescriptorFactory, 1229911761, 47989, 17362, 158, 94, 123, 121, 163, 175, 206, 212); @@ -11973,63 +11973,63 @@ RT_INTERFACE!{static interface IVideoStreamDescriptorFactory(IVideoStreamDescrip fn Create(&self, encodingProperties: *mut super::mediaproperties::VideoEncodingProperties, out: *mut *mut VideoStreamDescriptor) -> HRESULT }} impl IVideoStreamDescriptorFactory { - #[inline] pub unsafe fn create(&self, encodingProperties: &super::mediaproperties::VideoEncodingProperties) -> Result> { + #[inline] pub fn create(&self, encodingProperties: &super::mediaproperties::VideoEncodingProperties) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, encodingProperties as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_OpenFailed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_OpenFailed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_OpenFailed(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn GetEncodingProperties(&self, out: *mut *mut super::mediaproperties::VideoEncodingProperties) -> HRESULT, fn get_PlaybackItem(&self, out: *mut *mut super::playback::MediaPlaybackItem) -> HRESULT, fn get_Name(&self, out: *mut HSTRING) -> HRESULT, fn get_SupportInfo(&self, out: *mut *mut VideoTrackSupportInfo) -> HRESULT }} impl IVideoTrack { - #[inline] pub unsafe fn add_open_failed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_open_failed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_OpenFailed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_open_failed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_open_failed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_OpenFailed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_encoding_properties(&self) -> Result> { + }} + #[inline] pub fn get_encoding_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetEncodingProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_playback_item(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_playback_item(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PlaybackItem)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_support_info(&self) -> Result> { + }} + #[inline] pub fn get_support_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class VideoTrack: IMediaTrack} 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(&self, out: *mut super::super::foundation::HResult) -> HRESULT + fn get_ExtendedError(&self, out: *mut foundation::HResult) -> HRESULT }} impl IVideoTrackOpenFailedEventArgs { - #[inline] pub unsafe fn get_extended_error(&self) -> Result { + #[inline] pub fn get_extended_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class VideoTrackOpenFailedEventArgs: IVideoTrackOpenFailedEventArgs} DEFINE_IID!(IID_IVideoTrackSupportInfo, 1270166688, 64607, 17677, 143, 240, 119, 141, 89, 4, 134, 222); @@ -12038,16 +12038,16 @@ RT_INTERFACE!{interface IVideoTrackSupportInfo(IVideoTrackSupportInfoVtbl): IIns fn get_MediaSourceStatus(&self, out: *mut MediaSourceStatus) -> HRESULT }} impl IVideoTrackSupportInfo { - #[inline] pub unsafe fn get_decoder_status(&self) -> Result { + #[inline] pub fn get_decoder_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DecoderStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_media_source_status(&self) -> Result { + }} + #[inline] pub fn get_media_source_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MediaSourceStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class VideoTrackSupportInfo: IVideoTrackSupportInfo} pub mod preview { // Windows.Media.Core.Preview @@ -12055,38 +12055,38 @@ use ::prelude::*; RT_CLASS!{static class SoundLevelBroker} impl RtActivatable for SoundLevelBroker {} impl SoundLevelBroker { - #[inline] pub fn get_sound_level() -> Result { unsafe { + #[inline] pub fn get_sound_level() -> Result { >::get_activation_factory().get_sound_level() - }} - #[inline] pub fn add_sound_level_changed(handler: &::rt::gen::windows::foundation::EventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { unsafe { + } + #[inline] pub fn add_sound_level_changed(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_sound_level_changed(handler) - }} - #[inline] pub fn remove_sound_level_changed(token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_sound_level_changed(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_sound_level_changed(token) - }} + } } DEFINE_CLSID!(SoundLevelBroker(&[87,105,110,100,111,119,115,46,77,101,100,105,97,46,67,111,114,101,46,80,114,101,118,105,101,119,46,83,111,117,110,100,76,101,118,101,108,66,114,111,107,101,114,0]) [CLSID_SoundLevelBroker]); DEFINE_IID!(IID_ISoundLevelBrokerStatics, 1784887649, 56301, 17996, 160, 154, 51, 65, 47, 92, 170, 63); RT_INTERFACE!{static interface ISoundLevelBrokerStatics(ISoundLevelBrokerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISoundLevelBrokerStatics] { fn get_SoundLevel(&self, out: *mut super::super::SoundLevel) -> HRESULT, - fn add_SoundLevelChanged(&self, handler: *mut ::rt::gen::windows::foundation::EventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SoundLevelChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn add_SoundLevelChanged(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SoundLevelChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl ISoundLevelBrokerStatics { - #[inline] pub unsafe fn get_sound_level(&self) -> Result { + #[inline] pub fn get_sound_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SoundLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_sound_level_changed(&self, handler: &::rt::gen::windows::foundation::EventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_sound_level_changed(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SoundLevelChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_sound_level_changed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_sound_level_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SoundLevelChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } } // Windows.Media.Core.Preview } // Windows.Media.Core @@ -12098,15 +12098,15 @@ RT_INTERFACE!{interface IAdvancedPhotoCaptureSettings(IAdvancedPhotoCaptureSetti fn put_Mode(&self, value: AdvancedPhotoMode) -> HRESULT }} impl IAdvancedPhotoCaptureSettings { - #[inline] pub unsafe fn get_mode(&self) -> Result { + #[inline] pub fn get_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Mode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_mode(&self, value: AdvancedPhotoMode) -> Result<()> { + }} + #[inline] pub fn set_mode(&self, value: AdvancedPhotoMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Mode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AdvancedPhotoCaptureSettings: IAdvancedPhotoCaptureSettings} impl RtActivatable for AdvancedPhotoCaptureSettings {} @@ -12114,30 +12114,30 @@ DEFINE_CLSID!(AdvancedPhotoCaptureSettings(&[87,105,110,100,111,119,115,46,77,10 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(&self, out: *mut bool) -> HRESULT, - fn get_SupportedModes(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedModes(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_Mode(&self, out: *mut AdvancedPhotoMode) -> HRESULT, fn Configure(&self, settings: *mut AdvancedPhotoCaptureSettings) -> HRESULT }} impl IAdvancedPhotoControl { - #[inline] pub unsafe fn get_supported(&self) -> Result { + #[inline] pub fn get_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Supported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_modes(&self) -> Result>> { + }} + #[inline] pub fn get_supported_modes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedModes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mode(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Mode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn configure(&self, settings: &AdvancedPhotoCaptureSettings) -> Result<()> { + }} + #[inline] pub fn configure(&self, settings: &AdvancedPhotoCaptureSettings) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Configure)(self as *const _ as *mut _, settings as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AdvancedPhotoControl: IAdvancedPhotoControl} RT_ENUM! { enum AdvancedPhotoMode: i32 { @@ -12149,15 +12149,15 @@ RT_INTERFACE!{interface IAdvancedVideoCaptureDeviceController(IAdvancedVideoCapt fn GetDeviceProperty(&self, propertyId: HSTRING, out: *mut *mut IInspectable) -> HRESULT }} impl IAdvancedVideoCaptureDeviceController { - #[inline] pub unsafe fn set_device_property(&self, propertyId: &HStringArg, propertyValue: &IInspectable) -> Result<()> { + #[inline] pub fn set_device_property(&self, propertyId: &HStringArg, propertyValue: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetDeviceProperty)(self as *const _ as *mut _, propertyId.get(), propertyValue as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_property(&self, propertyId: &HStringArg) -> Result> { + }} + #[inline] pub fn get_device_property(&self, propertyId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceProperty)(self as *const _ as *mut _, propertyId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IAdvancedVideoCaptureDeviceController2, 2344177551, 61722, 17371, 180, 2, 17, 147, 11, 128, 174, 86); RT_INTERFACE!{interface IAdvancedVideoCaptureDeviceController2(IAdvancedVideoCaptureDeviceController2Vtbl): IInspectable(IInspectableVtbl) [IID_IAdvancedVideoCaptureDeviceController2] { @@ -12176,70 +12176,70 @@ RT_INTERFACE!{interface IAdvancedVideoCaptureDeviceController2(IAdvancedVideoCap fn put_PrimaryUse(&self, value: CaptureUse) -> HRESULT }} impl IAdvancedVideoCaptureDeviceController2 { - #[inline] pub unsafe fn get_low_lag_photo_sequence(&self) -> Result> { + #[inline] pub fn get_low_lag_photo_sequence(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LowLagPhotoSequence)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_low_lag_photo(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_low_lag_photo(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LowLagPhoto)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_scene_mode_control(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_scene_mode_control(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SceneModeControl)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_torch_control(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_torch_control(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TorchControl)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_flash_control(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_flash_control(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FlashControl)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_white_balance_control(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_white_balance_control(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WhiteBalanceControl)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_exposure_control(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_exposure_control(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExposureControl)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_focus_control(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_focus_control(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FocusControl)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_exposure_compensation_control(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_exposure_compensation_control(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExposureCompensationControl)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_iso_speed_control(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_iso_speed_control(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsoSpeedControl)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_regions_of_interest_control(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_regions_of_interest_control(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RegionsOfInterestControl)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_primary_use(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_primary_use(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PrimaryUse)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_primary_use(&self, value: CaptureUse) -> Result<()> { + }} + #[inline] pub fn set_primary_use(&self, value: CaptureUse) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PrimaryUse)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IAdvancedVideoCaptureDeviceController3, 2844495668, 60941, 18188, 185, 240, 66, 41, 196, 187, 208, 137); RT_INTERFACE!{interface IAdvancedVideoCaptureDeviceController3(IAdvancedVideoCaptureDeviceController3Vtbl): IInspectable(IInspectableVtbl) [IID_IAdvancedVideoCaptureDeviceController3] { @@ -12248,21 +12248,21 @@ RT_INTERFACE!{interface IAdvancedVideoCaptureDeviceController3(IAdvancedVideoCap fn get_ZoomControl(&self, out: *mut *mut ZoomControl) -> HRESULT }} impl IAdvancedVideoCaptureDeviceController3 { - #[inline] pub unsafe fn get_variable_photo_sequence_controller(&self) -> Result> { + #[inline] pub fn get_variable_photo_sequence_controller(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VariablePhotoSequenceController)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_photo_confirmation_control(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_photo_confirmation_control(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PhotoConfirmationControl)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_zoom_control(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_zoom_control(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ZoomControl)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IAdvancedVideoCaptureDeviceController4, 3936337839, 54129, 16835, 154, 23, 130, 74, 135, 235, 223, 210); RT_INTERFACE!{interface IAdvancedVideoCaptureDeviceController4(IAdvancedVideoCaptureDeviceController4Vtbl): IInspectable(IInspectableVtbl) [IID_IAdvancedVideoCaptureDeviceController4] { @@ -12274,70 +12274,70 @@ RT_INTERFACE!{interface IAdvancedVideoCaptureDeviceController4(IAdvancedVideoCap fn get_AdvancedPhotoControl(&self, out: *mut *mut AdvancedPhotoControl) -> HRESULT }} impl IAdvancedVideoCaptureDeviceController4 { - #[inline] pub unsafe fn get_exposure_priority_video_control(&self) -> Result> { + #[inline] pub fn get_exposure_priority_video_control(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExposurePriorityVideoControl)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_desired_optimization(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_desired_optimization(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DesiredOptimization)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_desired_optimization(&self, value: MediaCaptureOptimization) -> Result<()> { + }} + #[inline] pub fn set_desired_optimization(&self, value: MediaCaptureOptimization) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DesiredOptimization)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_hdr_video_control(&self) -> Result> { + }} + #[inline] pub fn get_hdr_video_control(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HdrVideoControl)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_optical_image_stabilization_control(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_optical_image_stabilization_control(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OpticalImageStabilizationControl)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_advanced_photo_control(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_advanced_photo_control(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AdvancedPhotoControl)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IAdvancedVideoCaptureDeviceController5, 860957463, 47563, 18979, 184, 117, 249, 234, 171, 83, 84, 146); RT_INTERFACE!{interface IAdvancedVideoCaptureDeviceController5(IAdvancedVideoCaptureDeviceController5Vtbl): IInspectable(IInspectableVtbl) [IID_IAdvancedVideoCaptureDeviceController5] { fn get_Id(&self, out: *mut HSTRING) -> HRESULT, - fn GetDevicePropertyById(&self, propertyId: HSTRING, maxPropertyValueSize: *mut super::super::foundation::IReference, out: *mut *mut VideoDeviceControllerGetDevicePropertyResult) -> HRESULT, + fn GetDevicePropertyById(&self, propertyId: HSTRING, maxPropertyValueSize: *mut foundation::IReference, out: *mut *mut VideoDeviceControllerGetDevicePropertyResult) -> HRESULT, fn SetDevicePropertyById(&self, propertyId: HSTRING, propertyValue: *mut IInspectable, out: *mut VideoDeviceControllerSetDevicePropertyStatus) -> HRESULT, - fn GetDevicePropertyByExtendedId(&self, extendedPropertyIdSize: u32, extendedPropertyId: *mut u8, maxPropertyValueSize: *mut super::super::foundation::IReference, out: *mut *mut VideoDeviceControllerGetDevicePropertyResult) -> HRESULT, + fn GetDevicePropertyByExtendedId(&self, extendedPropertyIdSize: u32, extendedPropertyId: *mut u8, maxPropertyValueSize: *mut foundation::IReference, out: *mut *mut VideoDeviceControllerGetDevicePropertyResult) -> HRESULT, fn SetDevicePropertyByExtendedId(&self, extendedPropertyIdSize: u32, extendedPropertyId: *mut u8, propertyValueSize: u32, propertyValue: *mut u8, out: *mut VideoDeviceControllerSetDevicePropertyStatus) -> HRESULT }} impl IAdvancedVideoCaptureDeviceController5 { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_property_by_id(&self, propertyId: &HStringArg, maxPropertyValueSize: &super::super::foundation::IReference) -> Result> { + }} + #[inline] pub fn get_device_property_by_id(&self, propertyId: &HStringArg, maxPropertyValueSize: &foundation::IReference) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDevicePropertyById)(self as *const _ as *mut _, propertyId.get(), maxPropertyValueSize as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_device_property_by_id(&self, propertyId: &HStringArg, propertyValue: &IInspectable) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_device_property_by_id(&self, propertyId: &HStringArg, propertyValue: &IInspectable) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).SetDevicePropertyById)(self as *const _ as *mut _, propertyId.get(), propertyValue as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_property_by_extended_id(&self, extendedPropertyId: &[u8], maxPropertyValueSize: &super::super::foundation::IReference) -> Result> { + }} + #[inline] pub fn get_device_property_by_extended_id(&self, extendedPropertyId: &[u8], maxPropertyValueSize: &foundation::IReference) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDevicePropertyByExtendedId)(self as *const _ as *mut _, extendedPropertyId.len() as u32, extendedPropertyId.as_ptr() as *mut _, maxPropertyValueSize as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_device_property_by_extended_id(&self, extendedPropertyId: &[u8], propertyValue: &[u8]) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_device_property_by_extended_id(&self, extendedPropertyId: &[u8], propertyValue: &[u8]) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).SetDevicePropertyByExtendedId)(self as *const _ as *mut _, extendedPropertyId.len() as u32, extendedPropertyId.as_ptr() as *mut _, propertyValue.len() as u32, propertyValue.as_ptr() as *mut _, &mut out); if hr == S_OK { Ok(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] { @@ -12347,24 +12347,24 @@ RT_INTERFACE!{interface IAudioDeviceController(IAudioDeviceControllerVtbl): IIns fn get_VolumePercent(&self, out: *mut f32) -> HRESULT }} impl IAudioDeviceController { - #[inline] pub unsafe fn set_muted(&self, value: bool) -> Result<()> { + #[inline] pub fn set_muted(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Muted)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_muted(&self) -> Result { + }} + #[inline] pub fn get_muted(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Muted)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_volume_percent(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_volume_percent(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_VolumePercent)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_volume_percent(&self) -> Result { + }} + #[inline] pub fn get_volume_percent(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VolumePercent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AudioDeviceController: IAudioDeviceController} DEFINE_IID!(IID_IAudioDeviceModule, 2261756982, 18369, 19251, 152, 82, 135, 115, 236, 75, 225, 35); @@ -12374,39 +12374,39 @@ RT_INTERFACE!{interface IAudioDeviceModule(IAudioDeviceModuleVtbl): IInspectable fn get_InstanceId(&self, out: *mut u32) -> HRESULT, fn get_MajorVersion(&self, out: *mut u32) -> HRESULT, fn get_MinorVersion(&self, out: *mut u32) -> HRESULT, - #[cfg(feature="windows-storage")] fn SendCommandAsync(&self, command: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn SendCommandAsync(&self, command: *mut super::super::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IAudioDeviceModule { - #[inline] pub unsafe fn get_class_id(&self) -> Result { + #[inline] pub fn get_class_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ClassId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_instance_id(&self) -> Result { + }} + #[inline] pub fn get_instance_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InstanceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_major_version(&self) -> Result { + }} + #[inline] pub fn get_major_version(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MajorVersion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_minor_version(&self) -> Result { + }} + #[inline] pub fn get_minor_version(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinorVersion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn send_command_async(&self, command: &super::super::storage::streams::IBuffer) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn send_command_async(&self, command: &super::super::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SendCommandAsync)(self as *const _ as *mut _, command as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class AudioDeviceModule: IAudioDeviceModule} DEFINE_IID!(IID_IAudioDeviceModuleNotificationEventArgs, 3823357103, 8780, 18622, 149, 107, 154, 19, 19, 78, 150, 232); @@ -12415,52 +12415,52 @@ RT_INTERFACE!{interface IAudioDeviceModuleNotificationEventArgs(IAudioDeviceModu #[cfg(feature="windows-storage")] fn get_NotificationData(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT }} impl IAudioDeviceModuleNotificationEventArgs { - #[inline] pub unsafe fn get_module(&self) -> Result> { + #[inline] pub fn get_module(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Module)(self 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_notification_data(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_notification_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NotificationData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AudioDeviceModuleNotificationEventArgs: IAudioDeviceModuleNotificationEventArgs} DEFINE_IID!(IID_IAudioDeviceModulesManager, 1789135949, 38410, 19740, 179, 24, 0, 34, 96, 69, 71, 237); RT_INTERFACE!{interface IAudioDeviceModulesManager(IAudioDeviceModulesManagerVtbl): IInspectable(IInspectableVtbl) [IID_IAudioDeviceModulesManager] { - fn add_ModuleNotificationReceived(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ModuleNotificationReceived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn FindAllById(&self, moduleId: HSTRING, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn FindAll(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn add_ModuleNotificationReceived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ModuleNotificationReceived(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn FindAllById(&self, moduleId: HSTRING, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn FindAll(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IAudioDeviceModulesManager { - #[inline] pub unsafe fn add_module_notification_received(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_module_notification_received(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ModuleNotificationReceived)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_module_notification_received(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_module_notification_received(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ModuleNotificationReceived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn find_all_by_id(&self, moduleId: &HStringArg) -> Result>> { + }} + #[inline] pub fn find_all_by_id(&self, moduleId: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllById)(self as *const _ as *mut _, moduleId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_all(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn find_all(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAll)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AudioDeviceModulesManager: IAudioDeviceModulesManager} impl RtActivatable for AudioDeviceModulesManager {} impl AudioDeviceModulesManager { - #[inline] pub fn create(deviceId: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(deviceId: &HStringArg) -> Result> { >::get_activation_factory().create(deviceId) - }} + } } DEFINE_CLSID!(AudioDeviceModulesManager(&[87,105,110,100,111,119,115,46,77,101,100,105,97,46,68,101,118,105,99,101,115,46,65,117,100,105,111,68,101,118,105,99,101,77,111,100,117,108,101,115,77,97,110,97,103,101,114,0]) [CLSID_AudioDeviceModulesManager]); DEFINE_IID!(IID_IAudioDeviceModulesManagerFactory, 2377135728, 58957, 18291, 150, 192, 188, 126, 191, 14, 6, 63); @@ -12468,11 +12468,11 @@ RT_INTERFACE!{static interface IAudioDeviceModulesManagerFactory(IAudioDeviceMod fn Create(&self, deviceId: HSTRING, out: *mut *mut AudioDeviceModulesManager) -> HRESULT }} impl IAudioDeviceModulesManagerFactory { - #[inline] pub unsafe fn create(&self, deviceId: &HStringArg) -> Result> { + #[inline] pub fn create(&self, deviceId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum AudioDeviceRole: i32 { Default (AudioDeviceRole_Default) = 0, Communications (AudioDeviceRole_Communications) = 1, @@ -12487,107 +12487,107 @@ RT_INTERFACE!{interface ICallControl(ICallControlVtbl): IInspectable(IInspectabl fn IndicateActiveCall(&self, callToken: u64) -> HRESULT, fn EndCall(&self, callToken: u64) -> HRESULT, fn get_HasRinger(&self, out: *mut bool) -> HRESULT, - fn add_AnswerRequested(&self, handler: *mut CallControlEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AnswerRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_HangUpRequested(&self, handler: *mut CallControlEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_HangUpRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_DialRequested(&self, handler: *mut DialRequestedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DialRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_RedialRequested(&self, handler: *mut RedialRequestedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RedialRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_KeypadPressed(&self, handler: *mut KeypadPressedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_KeypadPressed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_AudioTransferRequested(&self, handler: *mut CallControlEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AudioTransferRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_AnswerRequested(&self, handler: *mut CallControlEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AnswerRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_HangUpRequested(&self, handler: *mut CallControlEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_HangUpRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_DialRequested(&self, handler: *mut DialRequestedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DialRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_RedialRequested(&self, handler: *mut RedialRequestedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RedialRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_KeypadPressed(&self, handler: *mut KeypadPressedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_KeypadPressed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_AudioTransferRequested(&self, handler: *mut CallControlEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AudioTransferRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl ICallControl { - #[inline] pub unsafe fn indicate_new_incoming_call(&self, enableRinger: bool, callerId: &HStringArg) -> Result { + #[inline] pub fn indicate_new_incoming_call(&self, enableRinger: bool, callerId: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IndicateNewIncomingCall)(self as *const _ as *mut _, enableRinger, callerId.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn indicate_new_outgoing_call(&self) -> Result { + }} + #[inline] pub fn indicate_new_outgoing_call(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IndicateNewOutgoingCall)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn indicate_active_call(&self, callToken: u64) -> Result<()> { + }} + #[inline] pub fn indicate_active_call(&self, callToken: u64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).IndicateActiveCall)(self as *const _ as *mut _, callToken); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn end_call(&self, callToken: u64) -> Result<()> { + }} + #[inline] pub fn end_call(&self, callToken: u64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).EndCall)(self as *const _ as *mut _, callToken); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_ringer(&self) -> Result { + }} + #[inline] pub fn get_has_ringer(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasRinger)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_answer_requested(&self, handler: &CallControlEventHandler) -> Result { + }} + #[inline] pub fn add_answer_requested(&self, handler: &CallControlEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AnswerRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_answer_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_answer_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AnswerRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_hang_up_requested(&self, handler: &CallControlEventHandler) -> Result { + }} + #[inline] pub fn add_hang_up_requested(&self, handler: &CallControlEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_HangUpRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_hang_up_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_hang_up_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_HangUpRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_dial_requested(&self, handler: &DialRequestedEventHandler) -> Result { + }} + #[inline] pub fn add_dial_requested(&self, handler: &DialRequestedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DialRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_dial_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_dial_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DialRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_redial_requested(&self, handler: &RedialRequestedEventHandler) -> Result { + }} + #[inline] pub fn add_redial_requested(&self, handler: &RedialRequestedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RedialRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_redial_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_redial_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RedialRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_keypad_pressed(&self, handler: &KeypadPressedEventHandler) -> Result { + }} + #[inline] pub fn add_keypad_pressed(&self, handler: &KeypadPressedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_KeypadPressed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_keypad_pressed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_keypad_pressed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_KeypadPressed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_audio_transfer_requested(&self, handler: &CallControlEventHandler) -> Result { + }} + #[inline] pub fn add_audio_transfer_requested(&self, handler: &CallControlEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AudioTransferRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_audio_transfer_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_audio_transfer_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AudioTransferRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CallControl: ICallControl} impl RtActivatable for CallControl {} impl CallControl { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} - #[inline] pub fn from_id(deviceId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn from_id(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id(deviceId) - }} + } } DEFINE_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]) [CLSID_CallControl]); DEFINE_IID!(IID_CallControlEventHandler, 1500476831, 20703, 17492, 188, 99, 77, 61, 1, 182, 25, 88); @@ -12595,10 +12595,10 @@ RT_DELEGATE!{delegate CallControlEventHandler(CallControlEventHandlerVtbl, CallC fn Invoke(&self, sender: *mut CallControl) -> HRESULT }} impl CallControlEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &CallControl) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &CallControl) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _); 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] { @@ -12606,16 +12606,16 @@ RT_INTERFACE!{static interface ICallControlStatics(ICallControlStaticsVtbl): IIn fn FromId(&self, deviceId: HSTRING, out: *mut *mut CallControl) -> HRESULT }} impl ICallControlStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id(&self, deviceId: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn from_id(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromId)(self as *const _ as *mut _, deviceId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum CameraStreamState: i32 { NotStreaming (CameraStreamState_NotStreaming) = 0, Streaming (CameraStreamState_Streaming) = 1, BlockedForPrivacy (CameraStreamState_BlockedForPrivacy) = 2, Shutdown (CameraStreamState_Shutdown) = 3, @@ -12636,16 +12636,16 @@ RT_INTERFACE!{interface IDefaultAudioDeviceChangedEventArgs(IDefaultAudioDeviceC fn get_Role(&self, out: *mut AudioDeviceRole) -> HRESULT }} impl IDefaultAudioDeviceChangedEventArgs { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_role(&self) -> Result { + }} + #[inline] pub fn get_role(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Role)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class DefaultAudioRenderDeviceChangedEventArgs: IDefaultAudioDeviceChangedEventArgs} DEFINE_IID!(IID_IDialRequestedEventArgs, 58430110, 38204, 17030, 136, 102, 79, 15, 55, 108, 133, 90); @@ -12654,15 +12654,15 @@ RT_INTERFACE!{interface IDialRequestedEventArgs(IDialRequestedEventArgsVtbl): II fn get_Contact(&self, out: *mut *mut IInspectable) -> HRESULT }} impl IDialRequestedEventArgs { - #[inline] pub unsafe fn handled(&self) -> Result<()> { + #[inline] pub fn handled(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Handled)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_contact(&self) -> Result> { + }} + #[inline] pub fn get_contact(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Contact)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DialRequestedEventArgs: IDialRequestedEventArgs} DEFINE_IID!(IID_DialRequestedEventHandler, 1522270171, 49695, 19396, 137, 27, 37, 126, 40, 193, 177, 164); @@ -12670,10 +12670,10 @@ RT_DELEGATE!{delegate DialRequestedEventHandler(DialRequestedEventHandlerVtbl, D fn Invoke(&self, sender: *mut CallControl, e: *mut DialRequestedEventArgs) -> HRESULT }} impl DialRequestedEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &CallControl, e: &DialRequestedEventArgs) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &CallControl, e: &DialRequestedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, e as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IExposureCompensationControl, 2177427508, 56556, 16401, 166, 16, 31, 56, 71, 230, 74, 202); RT_INTERFACE!{interface IExposureCompensationControl(IExposureCompensationControlVtbl): IInspectable(IInspectableVtbl) [IID_IExposureCompensationControl] { @@ -12682,93 +12682,93 @@ RT_INTERFACE!{interface IExposureCompensationControl(IExposureCompensationContro fn get_Max(&self, out: *mut f32) -> HRESULT, fn get_Step(&self, out: *mut f32) -> HRESULT, fn get_Value(&self, out: *mut f32) -> HRESULT, - fn SetValueAsync(&self, value: f32, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn SetValueAsync(&self, value: f32, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IExposureCompensationControl { - #[inline] pub unsafe fn get_supported(&self) -> Result { + #[inline] pub fn get_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Supported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_min(&self) -> Result { + }} + #[inline] pub fn get_min(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Min)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max(&self) -> Result { + }} + #[inline] pub fn get_max(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Max)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_step(&self) -> Result { + }} + #[inline] pub fn get_step(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Step)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result { + }} + #[inline] pub fn get_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_value_async(&self, value: f32) -> Result> { + }} + #[inline] pub fn set_value_async(&self, value: f32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetValueAsync)(self as *const _ as *mut _, value, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ExposureCompensationControl: IExposureCompensationControl} 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(&self, out: *mut bool) -> HRESULT, fn get_Auto(&self, out: *mut bool) -> HRESULT, - fn SetAutoAsync(&self, value: bool, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn get_Min(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn get_Max(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn get_Step(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn get_Value(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn SetValueAsync(&self, shutterDuration: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn SetAutoAsync(&self, value: bool, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn get_Min(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_Max(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_Step(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_Value(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn SetValueAsync(&self, shutterDuration: foundation::TimeSpan, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IExposureControl { - #[inline] pub unsafe fn get_supported(&self) -> Result { + #[inline] pub fn get_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Supported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_auto(&self) -> Result { + }} + #[inline] pub fn get_auto(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Auto)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_auto_async(&self, value: bool) -> Result> { + }} + #[inline] pub fn set_auto_async(&self, value: bool) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetAutoAsync)(self as *const _ as *mut _, value, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_min(&self) -> Result { + }} + #[inline] pub fn get_min(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Min)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max(&self) -> Result { + }} + #[inline] pub fn get_max(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Max)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_step(&self) -> Result { + }} + #[inline] pub fn get_step(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Step)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result { + }} + #[inline] pub fn get_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_value_async(&self, shutterDuration: super::super::foundation::TimeSpan) -> Result> { + }} + #[inline] pub fn set_value_async(&self, shutterDuration: foundation::TimeSpan) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetValueAsync)(self as *const _ as *mut _, shutterDuration, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ExposureControl: IExposureControl} DEFINE_IID!(IID_IExposurePriorityVideoControl, 749879459, 20840, 17009, 158, 165, 71, 98, 26, 152, 163, 82); @@ -12778,20 +12778,20 @@ RT_INTERFACE!{interface IExposurePriorityVideoControl(IExposurePriorityVideoCont fn put_Enabled(&self, value: bool) -> HRESULT }} impl IExposurePriorityVideoControl { - #[inline] pub unsafe fn get_supported(&self) -> Result { + #[inline] pub fn get_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Supported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_enabled(&self) -> Result { + }} + #[inline] pub fn get_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Enabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Enabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ExposurePriorityVideoControl: IExposurePriorityVideoControl} DEFINE_IID!(IID_IFlashControl, 3740540350, 32104, 17891, 140, 15, 190, 123, 179, 40, 55, 208); @@ -12809,57 +12809,57 @@ RT_INTERFACE!{interface IFlashControl(IFlashControlVtbl): IInspectable(IInspecta fn put_PowerPercent(&self, value: f32) -> HRESULT }} impl IFlashControl { - #[inline] pub unsafe fn get_supported(&self) -> Result { + #[inline] pub fn get_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Supported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_power_supported(&self) -> Result { + }} + #[inline] pub fn get_power_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PowerSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_red_eye_reduction_supported(&self) -> Result { + }} + #[inline] pub fn get_red_eye_reduction_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RedEyeReductionSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_enabled(&self) -> Result { + }} + #[inline] pub fn get_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Enabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Enabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_auto(&self) -> Result { + }} + #[inline] pub fn get_auto(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Auto)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_auto(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_auto(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Auto)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_red_eye_reduction(&self) -> Result { + }} + #[inline] pub fn get_red_eye_reduction(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RedEyeReduction)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_red_eye_reduction(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_red_eye_reduction(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RedEyeReduction)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_power_percent(&self) -> Result { + }} + #[inline] pub fn get_power_percent(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PowerPercent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_power_percent(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_power_percent(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PowerPercent)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class FlashControl: IFlashControl} DEFINE_IID!(IID_IFlashControl2, 2099891358, 30177, 19191, 189, 125, 78, 56, 225, 192, 108, 214); @@ -12869,156 +12869,156 @@ RT_INTERFACE!{interface IFlashControl2(IFlashControl2Vtbl): IInspectable(IInspec fn put_AssistantLightEnabled(&self, value: bool) -> HRESULT }} impl IFlashControl2 { - #[inline] pub unsafe fn get_assistant_light_supported(&self) -> Result { + #[inline] pub fn get_assistant_light_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AssistantLightSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_assistant_light_enabled(&self) -> Result { + }} + #[inline] pub fn get_assistant_light_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AssistantLightEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_assistant_light_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_assistant_light_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AssistantLightEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut bool) -> HRESULT, - fn get_SupportedPresets(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedPresets(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_Preset(&self, out: *mut FocusPreset) -> HRESULT, - fn SetPresetAsync(&self, preset: FocusPreset, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn SetPresetWithCompletionOptionAsync(&self, preset: FocusPreset, completeBeforeFocus: bool, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn SetPresetAsync(&self, preset: FocusPreset, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn SetPresetWithCompletionOptionAsync(&self, preset: FocusPreset, completeBeforeFocus: bool, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn get_Min(&self, out: *mut u32) -> HRESULT, fn get_Max(&self, out: *mut u32) -> HRESULT, fn get_Step(&self, out: *mut u32) -> HRESULT, fn get_Value(&self, out: *mut u32) -> HRESULT, - fn SetValueAsync(&self, focus: u32, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn FocusAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn SetValueAsync(&self, focus: u32, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn FocusAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IFocusControl { - #[inline] pub unsafe fn get_supported(&self) -> Result { + #[inline] pub fn get_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Supported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_presets(&self) -> Result>> { + }} + #[inline] pub fn get_supported_presets(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedPresets)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_preset(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_preset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Preset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_preset_async(&self, preset: FocusPreset) -> Result> { + }} + #[inline] pub fn set_preset_async(&self, preset: FocusPreset) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetPresetAsync)(self as *const _ as *mut _, preset, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_preset_with_completion_option_async(&self, preset: FocusPreset, completeBeforeFocus: bool) -> Result> { + }} + #[inline] pub fn set_preset_with_completion_option_async(&self, preset: FocusPreset, completeBeforeFocus: bool) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetPresetWithCompletionOptionAsync)(self as *const _ as *mut _, preset, completeBeforeFocus, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_min(&self) -> Result { + }} + #[inline] pub fn get_min(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Min)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max(&self) -> Result { + }} + #[inline] pub fn get_max(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Max)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_step(&self) -> Result { + }} + #[inline] pub fn get_step(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Step)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result { + }} + #[inline] pub fn get_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_value_async(&self, focus: u32) -> Result> { + }} + #[inline] pub fn set_value_async(&self, focus: u32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetValueAsync)(self as *const _ as *mut _, focus, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn focus_async(&self) -> Result> { + }} + #[inline] pub fn focus_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FocusAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class FocusControl: IFocusControl} 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(&self, out: *mut bool) -> HRESULT, fn get_WaitForFocusSupported(&self, out: *mut bool) -> HRESULT, - fn get_SupportedFocusModes(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_SupportedFocusDistances(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_SupportedFocusRanges(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedFocusModes(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedFocusDistances(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedFocusRanges(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_Mode(&self, out: *mut FocusMode) -> HRESULT, fn get_FocusState(&self, out: *mut MediaCaptureFocusState) -> HRESULT, - fn UnlockAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn LockAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn UnlockAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn LockAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn Configure(&self, settings: *mut FocusSettings) -> HRESULT }} impl IFocusControl2 { - #[inline] pub unsafe fn get_focus_changed_supported(&self) -> Result { + #[inline] pub fn get_focus_changed_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FocusChangedSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_wait_for_focus_supported(&self) -> Result { + }} + #[inline] pub fn get_wait_for_focus_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_WaitForFocusSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_focus_modes(&self) -> Result>> { + }} + #[inline] pub fn get_supported_focus_modes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedFocusModes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_focus_distances(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_supported_focus_distances(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedFocusDistances)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_focus_ranges(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_supported_focus_ranges(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedFocusRanges)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mode(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Mode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_focus_state(&self) -> Result { + }} + #[inline] pub fn get_focus_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FocusState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn unlock_async(&self) -> Result> { + }} + #[inline] pub fn unlock_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UnlockAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn lock_async(&self) -> Result> { + }} + #[inline] pub fn lock_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LockAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn configure(&self, settings: &FocusSettings) -> Result<()> { + }} + #[inline] pub fn configure(&self, settings: &FocusSettings) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Configure)(self as *const _ as *mut _, settings as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum FocusMode: i32 { Auto (FocusMode_Auto) = 0, Single (FocusMode_Single) = 1, Continuous (FocusMode_Continuous) = 2, Manual (FocusMode_Manual) = 3, @@ -13032,70 +13032,70 @@ RT_INTERFACE!{interface IFocusSettings(IFocusSettingsVtbl): IInspectable(IInspec fn put_Mode(&self, value: FocusMode) -> HRESULT, fn get_AutoFocusRange(&self, out: *mut AutoFocusRange) -> HRESULT, fn put_AutoFocusRange(&self, value: AutoFocusRange) -> HRESULT, - fn get_Value(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_Value(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_Distance(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_Distance(&self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_Value(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_Value(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_Distance(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_Distance(&self, value: *mut foundation::IReference) -> HRESULT, fn get_WaitForFocus(&self, out: *mut bool) -> HRESULT, fn put_WaitForFocus(&self, value: bool) -> HRESULT, fn get_DisableDriverFallback(&self, out: *mut bool) -> HRESULT, fn put_DisableDriverFallback(&self, value: bool) -> HRESULT }} impl IFocusSettings { - #[inline] pub unsafe fn get_mode(&self) -> Result { + #[inline] pub fn get_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Mode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_mode(&self, value: FocusMode) -> Result<()> { + }} + #[inline] pub fn set_mode(&self, value: FocusMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Mode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_auto_focus_range(&self) -> Result { + }} + #[inline] pub fn get_auto_focus_range(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AutoFocusRange)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_auto_focus_range(&self, value: AutoFocusRange) -> Result<()> { + }} + #[inline] pub fn set_auto_focus_range(&self, value: AutoFocusRange) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AutoFocusRange)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result>> { + }} + #[inline] pub fn get_value(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_value(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_value(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Value)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_distance(&self) -> Result>> { + }} + #[inline] pub fn get_distance(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Distance)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_distance(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_distance(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Distance)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_wait_for_focus(&self) -> Result { + }} + #[inline] pub fn get_wait_for_focus(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_WaitForFocus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_wait_for_focus(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_wait_for_focus(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_WaitForFocus)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_disable_driver_fallback(&self) -> Result { + }} + #[inline] pub fn get_disable_driver_fallback(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DisableDriverFallback)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_disable_driver_fallback(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_disable_driver_fallback(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisableDriverFallback)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class FocusSettings: IFocusSettings} impl RtActivatable for FocusSettings {} @@ -13103,30 +13103,30 @@ DEFINE_CLSID!(FocusSettings(&[87,105,110,100,111,119,115,46,77,101,100,105,97,46 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(&self, out: *mut bool) -> HRESULT, - fn get_SupportedModes(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedModes(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_Mode(&self, out: *mut HdrVideoMode) -> HRESULT, fn put_Mode(&self, value: HdrVideoMode) -> HRESULT }} impl IHdrVideoControl { - #[inline] pub unsafe fn get_supported(&self) -> Result { + #[inline] pub fn get_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Supported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_modes(&self) -> Result>> { + }} + #[inline] pub fn get_supported_modes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedModes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mode(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Mode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_mode(&self, value: HdrVideoMode) -> Result<()> { + }} + #[inline] pub fn set_mode(&self, value: HdrVideoMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Mode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class HdrVideoControl: IHdrVideoControl} RT_ENUM! { enum HdrVideoMode: i32 { @@ -13135,31 +13135,31 @@ RT_ENUM! { enum HdrVideoMode: i32 { 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(&self, out: *mut bool) -> HRESULT, - fn get_SupportedPresets(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedPresets(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_Preset(&self, out: *mut IsoSpeedPreset) -> HRESULT, - fn SetPresetAsync(&self, preset: IsoSpeedPreset, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn SetPresetAsync(&self, preset: IsoSpeedPreset, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IIsoSpeedControl { - #[inline] pub unsafe fn get_supported(&self) -> Result { + #[inline] pub fn get_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Supported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_presets(&self) -> Result>> { + }} + #[inline] pub fn get_supported_presets(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedPresets)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_preset(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_preset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Preset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_preset_async(&self, preset: IsoSpeedPreset) -> Result> { + }} + #[inline] pub fn set_preset_async(&self, preset: IsoSpeedPreset) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetPresetAsync)(self as *const _ as *mut _, preset, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class IsoSpeedControl: IIsoSpeedControl} DEFINE_IID!(IID_IIsoSpeedControl2, 1863678194, 28023, 20362, 140, 47, 97, 48, 182, 57, 80, 83); @@ -13168,46 +13168,46 @@ RT_INTERFACE!{interface IIsoSpeedControl2(IIsoSpeedControl2Vtbl): IInspectable(I fn get_Max(&self, out: *mut u32) -> HRESULT, fn get_Step(&self, out: *mut u32) -> HRESULT, fn get_Value(&self, out: *mut u32) -> HRESULT, - fn SetValueAsync(&self, isoSpeed: u32, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn SetValueAsync(&self, isoSpeed: u32, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn get_Auto(&self, out: *mut bool) -> HRESULT, - fn SetAutoAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn SetAutoAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IIsoSpeedControl2 { - #[inline] pub unsafe fn get_min(&self) -> Result { + #[inline] pub fn get_min(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Min)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max(&self) -> Result { + }} + #[inline] pub fn get_max(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Max)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_step(&self) -> Result { + }} + #[inline] pub fn get_step(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Step)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result { + }} + #[inline] pub fn get_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_value_async(&self, isoSpeed: u32) -> Result> { + }} + #[inline] pub fn set_value_async(&self, isoSpeed: u32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetValueAsync)(self as *const _ as *mut _, isoSpeed, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_auto(&self) -> Result { + }} + #[inline] pub fn get_auto(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Auto)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_auto_async(&self) -> Result> { + }} + #[inline] pub fn set_auto_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetAutoAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -13217,11 +13217,11 @@ RT_INTERFACE!{interface IKeypadPressedEventArgs(IKeypadPressedEventArgsVtbl): II fn get_TelephonyKey(&self, out: *mut TelephonyKey) -> HRESULT }} impl IKeypadPressedEventArgs { - #[inline] pub unsafe fn get_telephony_key(&self) -> Result { + #[inline] pub fn get_telephony_key(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TelephonyKey)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class KeypadPressedEventArgs: IKeypadPressedEventArgs} DEFINE_IID!(IID_KeypadPressedEventHandler, 3862406228, 50471, 16940, 137, 38, 201, 175, 131, 181, 89, 160); @@ -13229,10 +13229,10 @@ RT_DELEGATE!{delegate KeypadPressedEventHandler(KeypadPressedEventHandlerVtbl, K fn Invoke(&self, sender: *mut CallControl, e: *mut KeypadPressedEventArgs) -> HRESULT }} impl KeypadPressedEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &CallControl, e: &KeypadPressedEventArgs) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &CallControl, e: &KeypadPressedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, e as *const _ as *mut _); if hr == S_OK { Ok(()) } 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] { @@ -13247,48 +13247,48 @@ RT_INTERFACE!{interface ILowLagPhotoControl(ILowLagPhotoControlVtbl): IInspectab fn get_HardwareAcceleratedThumbnailSupported(&self, out: *mut u32) -> HRESULT }} impl ILowLagPhotoControl { - #[inline] pub unsafe fn get_highest_concurrent_frame_rate(&self, captureProperties: &super::mediaproperties::IMediaEncodingProperties) -> Result> { + #[inline] pub fn get_highest_concurrent_frame_rate(&self, captureProperties: &super::mediaproperties::IMediaEncodingProperties) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetHighestConcurrentFrameRate)(self as *const _ as *mut _, 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(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_current_frame_rate(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentFrameRate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_thumbnail_enabled(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_thumbnail_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ThumbnailEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_thumbnail_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_thumbnail_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ThumbnailEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_thumbnail_format(&self) -> Result { + }} + #[inline] pub fn get_thumbnail_format(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ThumbnailFormat)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_thumbnail_format(&self, value: super::mediaproperties::MediaThumbnailFormat) -> Result<()> { + }} + #[inline] pub fn set_thumbnail_format(&self, value: super::mediaproperties::MediaThumbnailFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ThumbnailFormat)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_desired_thumbnail_size(&self) -> Result { + }} + #[inline] pub fn get_desired_thumbnail_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DesiredThumbnailSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_desired_thumbnail_size(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_desired_thumbnail_size(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DesiredThumbnailSize)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_hardware_accelerated_thumbnail_supported(&self) -> Result { + }} + #[inline] pub fn get_hardware_accelerated_thumbnail_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HardwareAcceleratedThumbnailSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class LowLagPhotoControl: ILowLagPhotoControl} DEFINE_IID!(IID_ILowLagPhotoSequenceControl, 1037013149, 27926, 16540, 186, 254, 185, 165, 148, 198, 253, 230); @@ -13311,81 +13311,81 @@ RT_INTERFACE!{interface ILowLagPhotoSequenceControl(ILowLagPhotoSequenceControlV fn get_HardwareAcceleratedThumbnailSupported(&self, out: *mut u32) -> HRESULT }} impl ILowLagPhotoSequenceControl { - #[inline] pub unsafe fn get_supported(&self) -> Result { + #[inline] pub fn get_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Supported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_past_photos(&self) -> Result { + }} + #[inline] pub fn get_max_past_photos(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxPastPhotos)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_photos_per_second(&self) -> Result { + }} + #[inline] pub fn get_max_photos_per_second(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxPhotosPerSecond)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_past_photo_limit(&self) -> Result { + }} + #[inline] pub fn get_past_photo_limit(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PastPhotoLimit)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_past_photo_limit(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_past_photo_limit(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PastPhotoLimit)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_photos_per_second_limit(&self) -> Result { + }} + #[inline] pub fn get_photos_per_second_limit(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PhotosPerSecondLimit)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_photos_per_second_limit(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_photos_per_second_limit(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PhotosPerSecondLimit)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_highest_concurrent_frame_rate(&self, captureProperties: &super::mediaproperties::IMediaEncodingProperties) -> Result> { + }} + #[inline] pub fn get_highest_concurrent_frame_rate(&self, captureProperties: &super::mediaproperties::IMediaEncodingProperties) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetHighestConcurrentFrameRate)(self as *const _ as *mut _, 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(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_current_frame_rate(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentFrameRate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_thumbnail_enabled(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_thumbnail_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ThumbnailEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_thumbnail_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_thumbnail_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ThumbnailEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_thumbnail_format(&self) -> Result { + }} + #[inline] pub fn get_thumbnail_format(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ThumbnailFormat)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_thumbnail_format(&self, value: super::mediaproperties::MediaThumbnailFormat) -> Result<()> { + }} + #[inline] pub fn set_thumbnail_format(&self, value: super::mediaproperties::MediaThumbnailFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ThumbnailFormat)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_desired_thumbnail_size(&self) -> Result { + }} + #[inline] pub fn get_desired_thumbnail_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DesiredThumbnailSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_desired_thumbnail_size(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_desired_thumbnail_size(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DesiredThumbnailSize)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_hardware_accelerated_thumbnail_supported(&self) -> Result { + }} + #[inline] pub fn get_hardware_accelerated_thumbnail_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HardwareAcceleratedThumbnailSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class LowLagPhotoSequenceControl: ILowLagPhotoSequenceControl} RT_ENUM! { enum ManualFocusDistance: i32 { @@ -13403,33 +13403,33 @@ RT_ENUM! { enum MediaCapturePauseBehavior: i32 { RT_CLASS!{static class MediaDevice} impl RtActivatable for MediaDevice {} impl MediaDevice { - #[inline] pub fn get_audio_capture_selector() -> Result { unsafe { + #[inline] pub fn get_audio_capture_selector() -> Result { >::get_activation_factory().get_audio_capture_selector() - }} - #[inline] pub fn get_audio_render_selector() -> Result { unsafe { + } + #[inline] pub fn get_audio_render_selector() -> Result { >::get_activation_factory().get_audio_render_selector() - }} - #[inline] pub fn get_video_capture_selector() -> Result { unsafe { + } + #[inline] pub fn get_video_capture_selector() -> Result { >::get_activation_factory().get_video_capture_selector() - }} - #[inline] pub fn get_default_audio_capture_id(role: AudioDeviceRole) -> Result { unsafe { + } + #[inline] pub fn get_default_audio_capture_id(role: AudioDeviceRole) -> Result { >::get_activation_factory().get_default_audio_capture_id(role) - }} - #[inline] pub fn get_default_audio_render_id(role: AudioDeviceRole) -> Result { unsafe { + } + #[inline] pub fn get_default_audio_render_id(role: AudioDeviceRole) -> Result { >::get_activation_factory().get_default_audio_render_id(role) - }} - #[inline] pub fn add_default_audio_capture_device_changed(handler: &super::super::foundation::TypedEventHandler) -> Result { unsafe { + } + #[inline] pub fn add_default_audio_capture_device_changed(handler: &foundation::TypedEventHandler) -> Result { >::get_activation_factory().add_default_audio_capture_device_changed(handler) - }} - #[inline] pub fn remove_default_audio_capture_device_changed(cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_default_audio_capture_device_changed(cookie: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_default_audio_capture_device_changed(cookie) - }} - #[inline] pub fn add_default_audio_render_device_changed(handler: &super::super::foundation::TypedEventHandler) -> Result { unsafe { + } + #[inline] pub fn add_default_audio_render_device_changed(handler: &foundation::TypedEventHandler) -> Result { >::get_activation_factory().add_default_audio_render_device_changed(handler) - }} - #[inline] pub fn remove_default_audio_render_device_changed(cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_default_audio_render_device_changed(cookie: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_default_audio_render_device_changed(cookie) - }} + } } DEFINE_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]) [CLSID_MediaDevice]); DEFINE_IID!(IID_IMediaDeviceControl, 4020821929, 28533, 18531, 186, 11, 88, 63, 48, 54, 180, 222); @@ -13441,31 +13441,31 @@ RT_INTERFACE!{interface IMediaDeviceControl(IMediaDeviceControlVtbl): IInspectab fn TrySetAuto(&self, value: bool, out: *mut bool) -> HRESULT }} impl IMediaDeviceControl { - #[inline] pub unsafe fn get_capabilities(&self) -> Result> { + #[inline] pub fn get_capabilities(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Capabilities)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_get_value(&self) -> Result<(f64, bool)> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn try_get_value(&self) -> Result<(f64, bool)> { unsafe { let mut value = zeroed(); let mut out = zeroed(); let hr = ((*self.lpVtbl).TryGetValue)(self as *const _ as *mut _, &mut value, &mut out); if hr == S_OK { Ok((value, out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_set_value(&self, value: f64) -> Result { + }} + #[inline] pub fn try_set_value(&self, value: f64) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TrySetValue)(self as *const _ as *mut _, value, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn try_get_auto(&self) -> Result<(bool, bool)> { + }} + #[inline] pub fn try_get_auto(&self) -> Result<(bool, bool)> { unsafe { let mut value = zeroed(); let mut out = zeroed(); let hr = ((*self.lpVtbl).TryGetAuto)(self as *const _ as *mut _, &mut value, &mut out); if hr == S_OK { Ok((value, out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_set_auto(&self, value: bool) -> Result { + }} + #[inline] pub fn try_set_auto(&self, value: bool) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TrySetAuto)(self as *const _ as *mut _, value, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MediaDeviceControl: IMediaDeviceControl} DEFINE_IID!(IID_IMediaDeviceControlCapabilities, 587225110, 60293, 17378, 185, 43, 130, 64, 213, 238, 112, 236); @@ -13478,60 +13478,60 @@ RT_INTERFACE!{interface IMediaDeviceControlCapabilities(IMediaDeviceControlCapab fn get_AutoModeSupported(&self, out: *mut bool) -> HRESULT }} impl IMediaDeviceControlCapabilities { - #[inline] pub unsafe fn get_supported(&self) -> Result { + #[inline] pub fn get_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Supported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_min(&self) -> Result { + }} + #[inline] pub fn get_min(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Min)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max(&self) -> Result { + }} + #[inline] pub fn get_max(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Max)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_step(&self) -> Result { + }} + #[inline] pub fn get_step(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Step)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_default(&self) -> Result { + }} + #[inline] pub fn get_default(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Default)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_auto_mode_supported(&self) -> Result { + }} + #[inline] pub fn get_auto_mode_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AutoModeSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MediaDeviceControlCapabilities: IMediaDeviceControlCapabilities} 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(&self, mediaStreamType: super::capture::MediaStreamType, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn GetAvailableMediaStreamProperties(&self, mediaStreamType: super::capture::MediaStreamType, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn GetMediaStreamProperties(&self, mediaStreamType: super::capture::MediaStreamType, out: *mut *mut super::mediaproperties::IMediaEncodingProperties) -> HRESULT, - fn SetMediaStreamPropertiesAsync(&self, mediaStreamType: super::capture::MediaStreamType, mediaEncodingProperties: *mut super::mediaproperties::IMediaEncodingProperties, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn SetMediaStreamPropertiesAsync(&self, mediaStreamType: super::capture::MediaStreamType, mediaEncodingProperties: *mut super::mediaproperties::IMediaEncodingProperties, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IMediaDeviceController { - #[inline] pub unsafe fn get_available_media_stream_properties(&self, mediaStreamType: super::capture::MediaStreamType) -> Result>> { + #[inline] pub fn get_available_media_stream_properties(&self, mediaStreamType: super::capture::MediaStreamType) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAvailableMediaStreamProperties)(self as *const _ as *mut _, mediaStreamType, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_media_stream_properties(&self, mediaStreamType: super::capture::MediaStreamType) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_media_stream_properties(&self, mediaStreamType: super::capture::MediaStreamType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetMediaStreamProperties)(self as *const _ as *mut _, mediaStreamType, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_media_stream_properties_async(&self, mediaStreamType: super::capture::MediaStreamType, mediaEncodingProperties: &super::mediaproperties::IMediaEncodingProperties) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_media_stream_properties_async(&self, mediaStreamType: super::capture::MediaStreamType, mediaEncodingProperties: &super::mediaproperties::IMediaEncodingProperties) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetMediaStreamPropertiesAsync)(self as *const _ as *mut _, mediaStreamType, mediaEncodingProperties as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(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] { @@ -13540,55 +13540,55 @@ RT_INTERFACE!{static interface IMediaDeviceStatics(IMediaDeviceStaticsVtbl): IIn fn GetVideoCaptureSelector(&self, out: *mut HSTRING) -> HRESULT, fn GetDefaultAudioCaptureId(&self, role: AudioDeviceRole, out: *mut HSTRING) -> HRESULT, fn GetDefaultAudioRenderId(&self, role: AudioDeviceRole, out: *mut HSTRING) -> HRESULT, - fn add_DefaultAudioCaptureDeviceChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DefaultAudioCaptureDeviceChanged(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_DefaultAudioRenderDeviceChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DefaultAudioRenderDeviceChanged(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_DefaultAudioCaptureDeviceChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DefaultAudioCaptureDeviceChanged(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_DefaultAudioRenderDeviceChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DefaultAudioRenderDeviceChanged(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl IMediaDeviceStatics { - #[inline] pub unsafe fn get_audio_capture_selector(&self) -> Result { + #[inline] pub fn get_audio_capture_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAudioCaptureSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_render_selector(&self) -> Result { + }} + #[inline] pub fn get_audio_render_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAudioRenderSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_capture_selector(&self) -> Result { + }} + #[inline] pub fn get_video_capture_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetVideoCaptureSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_audio_capture_id(&self, role: AudioDeviceRole) -> Result { + }} + #[inline] pub fn get_default_audio_capture_id(&self, role: AudioDeviceRole) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefaultAudioCaptureId)(self as *const _ as *mut _, role, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_audio_render_id(&self, role: AudioDeviceRole) -> Result { + }} + #[inline] pub fn get_default_audio_render_id(&self, role: AudioDeviceRole) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefaultAudioRenderId)(self as *const _ as *mut _, role, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_default_audio_capture_device_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_default_audio_capture_device_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DefaultAudioCaptureDeviceChanged)(self as *const _ as *mut _, 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(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_default_audio_capture_device_changed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DefaultAudioCaptureDeviceChanged)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_default_audio_render_device_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_default_audio_render_device_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DefaultAudioRenderDeviceChanged)(self as *const _ as *mut _, 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(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_default_audio_render_device_changed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DefaultAudioRenderDeviceChanged)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IModuleCommandResult, 1376591540, 4980, 19581, 177, 228, 57, 220, 223, 62, 174, 78); RT_INTERFACE!{interface IModuleCommandResult(IModuleCommandResultVtbl): IInspectable(IInspectableVtbl) [IID_IModuleCommandResult] { @@ -13596,45 +13596,45 @@ RT_INTERFACE!{interface IModuleCommandResult(IModuleCommandResultVtbl): IInspect #[cfg(feature="windows-storage")] fn get_Result(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT }} impl IModuleCommandResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_result(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_result(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Result)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ModuleCommandResult: IModuleCommandResult} 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(&self, out: *mut bool) -> HRESULT, - fn get_SupportedModes(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedModes(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_Mode(&self, out: *mut OpticalImageStabilizationMode) -> HRESULT, fn put_Mode(&self, value: OpticalImageStabilizationMode) -> HRESULT }} impl IOpticalImageStabilizationControl { - #[inline] pub unsafe fn get_supported(&self) -> Result { + #[inline] pub fn get_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Supported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_modes(&self) -> Result>> { + }} + #[inline] pub fn get_supported_modes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedModes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mode(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Mode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_mode(&self, value: OpticalImageStabilizationMode) -> Result<()> { + }} + #[inline] pub fn set_mode(&self, value: OpticalImageStabilizationMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Mode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class OpticalImageStabilizationControl: IOpticalImageStabilizationControl} RT_ENUM! { enum OpticalImageStabilizationMode: i32 { @@ -13649,29 +13649,29 @@ RT_INTERFACE!{interface IPhotoConfirmationControl(IPhotoConfirmationControlVtbl) fn put_PixelFormat(&self, format: super::mediaproperties::MediaPixelFormat) -> HRESULT }} impl IPhotoConfirmationControl { - #[inline] pub unsafe fn get_supported(&self) -> Result { + #[inline] pub fn get_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Supported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_enabled(&self) -> Result { + }} + #[inline] pub fn get_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Enabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Enabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_pixel_format(&self) -> Result { + }} + #[inline] pub fn get_pixel_format(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PixelFormat)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_pixel_format(&self, format: super::mediaproperties::MediaPixelFormat) -> Result<()> { + }} + #[inline] pub fn set_pixel_format(&self, format: super::mediaproperties::MediaPixelFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PixelFormat)(self as *const _ as *mut _, format); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PhotoConfirmationControl: IPhotoConfirmationControl} DEFINE_IID!(IID_IRedialRequestedEventArgs, 2125812233, 30379, 19505, 180, 14, 75, 88, 55, 157, 88, 12); @@ -13679,10 +13679,10 @@ RT_INTERFACE!{interface IRedialRequestedEventArgs(IRedialRequestedEventArgsVtbl) fn Handled(&self) -> HRESULT }} impl IRedialRequestedEventArgs { - #[inline] pub unsafe fn handled(&self) -> Result<()> { + #[inline] pub fn handled(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Handled)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class RedialRequestedEventArgs: IRedialRequestedEventArgs} DEFINE_IID!(IID_RedialRequestedEventHandler, 3136444369, 20157, 19332, 159, 71, 110, 196, 61, 117, 216, 177); @@ -13690,10 +13690,10 @@ RT_DELEGATE!{delegate RedialRequestedEventHandler(RedialRequestedEventHandlerVtb fn Invoke(&self, sender: *mut CallControl, e: *mut RedialRequestedEventArgs) -> HRESULT }} impl RedialRequestedEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &CallControl, e: &RedialRequestedEventArgs) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &CallControl, e: &RedialRequestedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, e as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IRegionOfInterest, 3857500212, 52838, 19973, 167, 143, 207, 57, 26, 94, 194, 209); RT_INTERFACE!{interface IRegionOfInterest(IRegionOfInterestVtbl): IInspectable(IInspectableVtbl) [IID_IRegionOfInterest] { @@ -13703,46 +13703,46 @@ RT_INTERFACE!{interface IRegionOfInterest(IRegionOfInterestVtbl): IInspectable(I fn put_AutoWhiteBalanceEnabled(&self, value: bool) -> HRESULT, fn get_AutoExposureEnabled(&self, out: *mut bool) -> HRESULT, fn put_AutoExposureEnabled(&self, value: bool) -> HRESULT, - fn get_Bounds(&self, out: *mut super::super::foundation::Rect) -> HRESULT, - fn put_Bounds(&self, value: super::super::foundation::Rect) -> HRESULT + fn get_Bounds(&self, out: *mut foundation::Rect) -> HRESULT, + fn put_Bounds(&self, value: foundation::Rect) -> HRESULT }} impl IRegionOfInterest { - #[inline] pub unsafe fn get_auto_focus_enabled(&self) -> Result { + #[inline] pub fn get_auto_focus_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AutoFocusEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_auto_focus_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_auto_focus_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AutoFocusEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_auto_white_balance_enabled(&self) -> Result { + }} + #[inline] pub fn get_auto_white_balance_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AutoWhiteBalanceEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_auto_white_balance_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_auto_white_balance_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AutoWhiteBalanceEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_auto_exposure_enabled(&self) -> Result { + }} + #[inline] pub fn get_auto_exposure_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AutoExposureEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_auto_exposure_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_auto_exposure_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AutoExposureEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_bounds(&self) -> Result { + }} + #[inline] pub fn get_bounds(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Bounds)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_bounds(&self, value: super::super::foundation::Rect) -> Result<()> { + }} + #[inline] pub fn set_bounds(&self, value: foundation::Rect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Bounds)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class RegionOfInterest: IRegionOfInterest} impl RtActivatable for RegionOfInterest {} @@ -13757,33 +13757,33 @@ RT_INTERFACE!{interface IRegionOfInterest2(IRegionOfInterest2Vtbl): IInspectable fn put_Weight(&self, value: u32) -> HRESULT }} impl IRegionOfInterest2 { - #[inline] pub unsafe fn get_type(&self) -> Result { + #[inline] pub fn get_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Type)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_type(&self, value: RegionOfInterestType) -> Result<()> { + }} + #[inline] pub fn set_type(&self, value: RegionOfInterestType) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Type)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_bounds_normalized(&self) -> Result { + }} + #[inline] pub fn get_bounds_normalized(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BoundsNormalized)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_bounds_normalized(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_bounds_normalized(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BoundsNormalized)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_weight(&self) -> Result { + }} + #[inline] pub fn get_weight(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Weight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_weight(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_weight(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Weight)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum RegionOfInterestType: i32 { Unknown (RegionOfInterestType_Unknown) = 0, Face (RegionOfInterestType_Face) = 1, @@ -13791,73 +13791,73 @@ RT_ENUM! { enum RegionOfInterestType: i32 { 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(&self, out: *mut u32) -> HRESULT, - fn SetRegionsAsync(&self, regions: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn SetRegionsWithLockAsync(&self, regions: *mut super::super::foundation::collections::IIterable, lockValues: bool, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn ClearRegionsAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn SetRegionsAsync(&self, regions: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn SetRegionsWithLockAsync(&self, regions: *mut foundation::collections::IIterable, lockValues: bool, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ClearRegionsAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn get_AutoFocusSupported(&self, out: *mut bool) -> HRESULT, fn get_AutoWhiteBalanceSupported(&self, out: *mut bool) -> HRESULT, fn get_AutoExposureSupported(&self, out: *mut bool) -> HRESULT }} impl IRegionsOfInterestControl { - #[inline] pub unsafe fn get_max_regions(&self) -> Result { + #[inline] pub fn get_max_regions(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxRegions)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_regions_async(&self, regions: &super::super::foundation::collections::IIterable) -> Result> { + }} + #[inline] pub fn set_regions_async(&self, regions: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetRegionsAsync)(self as *const _ as *mut _, 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(&self, regions: &super::super::foundation::collections::IIterable, lockValues: bool) -> Result> { + }} + #[inline] pub fn set_regions_with_lock_async(&self, regions: &foundation::collections::IIterable, lockValues: bool) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetRegionsWithLockAsync)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[inline] pub fn clear_regions_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ClearRegionsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_auto_focus_supported(&self) -> Result { + }} + #[inline] pub fn get_auto_focus_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AutoFocusSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_auto_white_balance_supported(&self) -> Result { + }} + #[inline] pub fn get_auto_white_balance_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AutoWhiteBalanceSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_auto_exposure_supported(&self) -> Result { + }} + #[inline] pub fn get_auto_exposure_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AutoExposureSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class RegionsOfInterestControl: IRegionsOfInterestControl} 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedModes(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_Value(&self, out: *mut CaptureSceneMode) -> HRESULT, - fn SetValueAsync(&self, sceneMode: CaptureSceneMode, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn SetValueAsync(&self, sceneMode: CaptureSceneMode, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl ISceneModeControl { - #[inline] pub unsafe fn get_supported_modes(&self) -> Result>> { + #[inline] pub fn get_supported_modes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedModes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_value_async(&self, sceneMode: CaptureSceneMode) -> Result> { + }} + #[inline] pub fn set_value_async(&self, sceneMode: CaptureSceneMode) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetValueAsync)(self as *const _ as *mut _, sceneMode, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class SceneModeControl: ISceneModeControl} RT_ENUM! { enum SendCommandStatus: i32 { @@ -13876,34 +13876,34 @@ RT_INTERFACE!{interface ITorchControl(ITorchControlVtbl): IInspectable(IInspecta fn put_PowerPercent(&self, value: f32) -> HRESULT }} impl ITorchControl { - #[inline] pub unsafe fn get_supported(&self) -> Result { + #[inline] pub fn get_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Supported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_power_supported(&self) -> Result { + }} + #[inline] pub fn get_power_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PowerSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_enabled(&self) -> Result { + }} + #[inline] pub fn get_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Enabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Enabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_power_percent(&self) -> Result { + }} + #[inline] pub fn get_power_percent(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PowerPercent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_power_percent(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_power_percent(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PowerPercent)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class TorchControl: ITorchControl} DEFINE_IID!(IID_IVideoDeviceController, 2572506485, 11822, 16568, 182, 199, 248, 45, 16, 1, 50, 16); @@ -13923,71 +13923,71 @@ RT_INTERFACE!{interface IVideoDeviceController(IVideoDeviceControllerVtbl): IIns fn TryGetPowerlineFrequency(&self, value: *mut super::capture::PowerlineFrequency, out: *mut bool) -> HRESULT }} impl IVideoDeviceController { - #[inline] pub unsafe fn get_brightness(&self) -> Result> { + #[inline] pub fn get_brightness(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Brightness)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_contrast(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_contrast(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Contrast)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_hue(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_hue(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Hue)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_white_balance(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_white_balance(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WhiteBalance)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_backlight_compensation(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_backlight_compensation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BacklightCompensation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pan(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_pan(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Pan)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_tilt(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_tilt(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Tilt)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_zoom(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_zoom(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Zoom)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_roll(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_roll(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Roll)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_exposure(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_exposure(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Exposure)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_focus(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_focus(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Focus)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_set_powerline_frequency(&self, value: super::capture::PowerlineFrequency) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn try_set_powerline_frequency(&self, value: super::capture::PowerlineFrequency) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TrySetPowerlineFrequency)(self as *const _ as *mut _, value, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn try_get_powerline_frequency(&self) -> Result<(super::capture::PowerlineFrequency, bool)> { + }} + #[inline] pub fn try_get_powerline_frequency(&self) -> Result<(super::capture::PowerlineFrequency, bool)> { unsafe { let mut value = zeroed(); let mut out = zeroed(); let hr = ((*self.lpVtbl).TryGetPowerlineFrequency)(self as *const _ as *mut _, &mut value, &mut out); if hr == S_OK { Ok((value, out)) } else { err(hr) } - } + }} } RT_CLASS!{class VideoDeviceController: IVideoDeviceController} DEFINE_IID!(IID_IVideoDeviceControllerGetDevicePropertyResult, 3319301013, 28373, 18320, 139, 93, 14, 241, 57, 53, 208, 248); @@ -13996,16 +13996,16 @@ RT_INTERFACE!{interface IVideoDeviceControllerGetDevicePropertyResult(IVideoDevi fn get_Value(&self, out: *mut *mut IInspectable) -> HRESULT }} impl IVideoDeviceControllerGetDevicePropertyResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result> { + }} + #[inline] pub fn get_value(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class VideoDeviceControllerGetDevicePropertyResult: IVideoDeviceControllerGetDevicePropertyResult} RT_ENUM! { enum VideoDeviceControllerGetDevicePropertyStatus: i32 { @@ -14018,54 +14018,54 @@ DEFINE_IID!(IID_IWhiteBalanceControl, 2015298686, 29026, 18888, 168, 249, 148, 1 RT_INTERFACE!{interface IWhiteBalanceControl(IWhiteBalanceControlVtbl): IInspectable(IInspectableVtbl) [IID_IWhiteBalanceControl] { fn get_Supported(&self, out: *mut bool) -> HRESULT, fn get_Preset(&self, out: *mut ColorTemperaturePreset) -> HRESULT, - fn SetPresetAsync(&self, preset: ColorTemperaturePreset, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn SetPresetAsync(&self, preset: ColorTemperaturePreset, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn get_Min(&self, out: *mut u32) -> HRESULT, fn get_Max(&self, out: *mut u32) -> HRESULT, fn get_Step(&self, out: *mut u32) -> HRESULT, fn get_Value(&self, out: *mut u32) -> HRESULT, - fn SetValueAsync(&self, temperature: u32, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn SetValueAsync(&self, temperature: u32, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IWhiteBalanceControl { - #[inline] pub unsafe fn get_supported(&self) -> Result { + #[inline] pub fn get_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Supported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_preset(&self) -> Result { + }} + #[inline] pub fn get_preset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Preset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_preset_async(&self, preset: ColorTemperaturePreset) -> Result> { + }} + #[inline] pub fn set_preset_async(&self, preset: ColorTemperaturePreset) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetPresetAsync)(self as *const _ as *mut _, preset, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_min(&self) -> Result { + }} + #[inline] pub fn get_min(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Min)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max(&self) -> Result { + }} + #[inline] pub fn get_max(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Max)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_step(&self) -> Result { + }} + #[inline] pub fn get_step(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Step)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result { + }} + #[inline] pub fn get_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_value_async(&self, temperature: u32) -> Result> { + }} + #[inline] pub fn set_value_async(&self, temperature: u32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetValueAsync)(self as *const _ as *mut _, temperature, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class WhiteBalanceControl: IWhiteBalanceControl} DEFINE_IID!(IID_IZoomControl, 975047442, 13018, 19479, 191, 215, 141, 12, 115, 200, 245, 165); @@ -14078,58 +14078,58 @@ RT_INTERFACE!{interface IZoomControl(IZoomControlVtbl): IInspectable(IInspectabl fn put_Value(&self, value: f32) -> HRESULT }} impl IZoomControl { - #[inline] pub unsafe fn get_supported(&self) -> Result { + #[inline] pub fn get_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Supported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_min(&self) -> Result { + }} + #[inline] pub fn get_min(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Min)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max(&self) -> Result { + }} + #[inline] pub fn get_max(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Max)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_step(&self) -> Result { + }} + #[inline] pub fn get_step(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Step)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result { + }} + #[inline] pub fn get_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_value(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_value(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Value)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ZoomControl: IZoomControl} 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedModes(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_Mode(&self, out: *mut ZoomTransitionMode) -> HRESULT, fn Configure(&self, settings: *mut ZoomSettings) -> HRESULT }} impl IZoomControl2 { - #[inline] pub unsafe fn get_supported_modes(&self) -> Result>> { + #[inline] pub fn get_supported_modes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedModes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mode(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Mode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn configure(&self, settings: &ZoomSettings) -> Result<()> { + }} + #[inline] pub fn configure(&self, settings: &ZoomSettings) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Configure)(self as *const _ as *mut _, settings as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IZoomSettings, 1792437028, 5300, 19453, 177, 143, 136, 254, 36, 70, 59, 82); RT_INTERFACE!{interface IZoomSettings(IZoomSettingsVtbl): IInspectable(IInspectableVtbl) [IID_IZoomSettings] { @@ -14139,24 +14139,24 @@ RT_INTERFACE!{interface IZoomSettings(IZoomSettingsVtbl): IInspectable(IInspecta fn put_Value(&self, value: f32) -> HRESULT }} impl IZoomSettings { - #[inline] pub unsafe fn get_mode(&self) -> Result { + #[inline] pub fn get_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Mode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_mode(&self, value: ZoomTransitionMode) -> Result<()> { + }} + #[inline] pub fn set_mode(&self, value: ZoomTransitionMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Mode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result { + }} + #[inline] pub fn get_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_value(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_value(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Value)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ZoomSettings: IZoomSettings} impl RtActivatable for ZoomSettings {} @@ -14168,138 +14168,138 @@ pub mod core { // Windows.Media.Devices.Core use ::prelude::*; 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(&self, out: *mut ::rt::gen::windows::foundation::numerics::Vector2) -> HRESULT, - fn get_PrincipalPoint(&self, out: *mut ::rt::gen::windows::foundation::numerics::Vector2) -> HRESULT, - fn get_RadialDistortion(&self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, - fn get_TangentialDistortion(&self, out: *mut ::rt::gen::windows::foundation::numerics::Vector2) -> HRESULT, + fn get_FocalLength(&self, out: *mut foundation::numerics::Vector2) -> HRESULT, + fn get_PrincipalPoint(&self, out: *mut foundation::numerics::Vector2) -> HRESULT, + fn get_RadialDistortion(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, + fn get_TangentialDistortion(&self, out: *mut foundation::numerics::Vector2) -> HRESULT, fn get_ImageWidth(&self, out: *mut u32) -> HRESULT, fn get_ImageHeight(&self, out: *mut u32) -> HRESULT, - fn ProjectOntoFrame(&self, coordinate: ::rt::gen::windows::foundation::numerics::Vector3, out: *mut ::rt::gen::windows::foundation::Point) -> HRESULT, - fn UnprojectAtUnitDepth(&self, pixelCoordinate: ::rt::gen::windows::foundation::Point, out: *mut ::rt::gen::windows::foundation::numerics::Vector2) -> HRESULT, - fn ProjectManyOntoFrame(&self, coordinatesSize: u32, coordinates: *mut ::rt::gen::windows::foundation::numerics::Vector3, resultsSize: u32, results: *mut ::rt::gen::windows::foundation::Point) -> HRESULT, - fn UnprojectPixelsAtUnitDepth(&self, pixelCoordinatesSize: u32, pixelCoordinates: *mut ::rt::gen::windows::foundation::Point, resultsSize: u32, results: *mut ::rt::gen::windows::foundation::numerics::Vector2) -> HRESULT + fn ProjectOntoFrame(&self, coordinate: foundation::numerics::Vector3, out: *mut foundation::Point) -> HRESULT, + fn UnprojectAtUnitDepth(&self, pixelCoordinate: foundation::Point, out: *mut foundation::numerics::Vector2) -> HRESULT, + fn ProjectManyOntoFrame(&self, coordinatesSize: u32, coordinates: *mut foundation::numerics::Vector3, resultsSize: u32, results: *mut foundation::Point) -> HRESULT, + fn UnprojectPixelsAtUnitDepth(&self, pixelCoordinatesSize: u32, pixelCoordinates: *mut foundation::Point, resultsSize: u32, results: *mut foundation::numerics::Vector2) -> HRESULT }} impl ICameraIntrinsics { - #[inline] pub unsafe fn get_focal_length(&self) -> Result<::rt::gen::windows::foundation::numerics::Vector2> { + #[inline] pub fn get_focal_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FocalLength)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_principal_point(&self) -> Result<::rt::gen::windows::foundation::numerics::Vector2> { + }} + #[inline] pub fn get_principal_point(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PrincipalPoint)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_radial_distortion(&self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + }} + #[inline] pub fn get_radial_distortion(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RadialDistortion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_tangential_distortion(&self) -> Result<::rt::gen::windows::foundation::numerics::Vector2> { + }} + #[inline] pub fn get_tangential_distortion(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TangentialDistortion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_image_width(&self) -> Result { + }} + #[inline] pub fn get_image_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ImageWidth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_image_height(&self) -> Result { + }} + #[inline] pub fn get_image_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ImageHeight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn project_onto_frame(&self, coordinate: ::rt::gen::windows::foundation::numerics::Vector3) -> Result<::rt::gen::windows::foundation::Point> { + }} + #[inline] pub fn project_onto_frame(&self, coordinate: foundation::numerics::Vector3) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ProjectOntoFrame)(self as *const _ as *mut _, coordinate, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn unproject_at_unit_depth(&self, pixelCoordinate: ::rt::gen::windows::foundation::Point) -> Result<::rt::gen::windows::foundation::numerics::Vector2> { + }} + #[inline] pub fn unproject_at_unit_depth(&self, pixelCoordinate: foundation::Point) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).UnprojectAtUnitDepth)(self as *const _ as *mut _, pixelCoordinate, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn project_many_onto_frame(&self, coordinates: &[::rt::gen::windows::foundation::numerics::Vector3], results: &mut [::rt::gen::windows::foundation::Point]) -> Result<()> { + }} + #[inline] pub fn project_many_onto_frame(&self, coordinates: &[foundation::numerics::Vector3], results: &mut [foundation::Point]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ProjectManyOntoFrame)(self as *const _ as *mut _, coordinates.len() as u32, coordinates.as_ptr() as *mut _, results.len() as u32, results.as_mut_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn unproject_pixels_at_unit_depth(&self, pixelCoordinates: &[::rt::gen::windows::foundation::Point], results: &mut [::rt::gen::windows::foundation::numerics::Vector2]) -> Result<()> { + }} + #[inline] pub fn unproject_pixels_at_unit_depth(&self, pixelCoordinates: &[foundation::Point], results: &mut [foundation::numerics::Vector2]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).UnprojectPixelsAtUnitDepth)(self as *const _ as *mut _, pixelCoordinates.len() as u32, pixelCoordinates.as_ptr() as *mut _, results.len() as u32, results.as_mut_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CameraIntrinsics: ICameraIntrinsics} 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(&self, out: *mut ::rt::gen::windows::foundation::numerics::Matrix4x4) -> HRESULT, - fn DistortPoint(&self, input: ::rt::gen::windows::foundation::Point, out: *mut ::rt::gen::windows::foundation::Point) -> HRESULT, - fn DistortPoints(&self, inputsSize: u32, inputs: *mut ::rt::gen::windows::foundation::Point, resultsSize: u32, results: *mut ::rt::gen::windows::foundation::Point) -> HRESULT, - fn UndistortPoint(&self, input: ::rt::gen::windows::foundation::Point, out: *mut ::rt::gen::windows::foundation::Point) -> HRESULT, - fn UndistortPoints(&self, inputsSize: u32, inputs: *mut ::rt::gen::windows::foundation::Point, resultsSize: u32, results: *mut ::rt::gen::windows::foundation::Point) -> HRESULT + fn get_UndistortedProjectionTransform(&self, out: *mut foundation::numerics::Matrix4x4) -> HRESULT, + fn DistortPoint(&self, input: foundation::Point, out: *mut foundation::Point) -> HRESULT, + fn DistortPoints(&self, inputsSize: u32, inputs: *mut foundation::Point, resultsSize: u32, results: *mut foundation::Point) -> HRESULT, + fn UndistortPoint(&self, input: foundation::Point, out: *mut foundation::Point) -> HRESULT, + fn UndistortPoints(&self, inputsSize: u32, inputs: *mut foundation::Point, resultsSize: u32, results: *mut foundation::Point) -> HRESULT }} impl ICameraIntrinsics2 { - #[inline] pub unsafe fn get_undistorted_projection_transform(&self) -> Result<::rt::gen::windows::foundation::numerics::Matrix4x4> { + #[inline] pub fn get_undistorted_projection_transform(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UndistortedProjectionTransform)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn distort_point(&self, input: ::rt::gen::windows::foundation::Point) -> Result<::rt::gen::windows::foundation::Point> { + }} + #[inline] pub fn distort_point(&self, input: foundation::Point) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).DistortPoint)(self as *const _ as *mut _, input, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn distort_points(&self, inputs: &[::rt::gen::windows::foundation::Point], results: &mut [::rt::gen::windows::foundation::Point]) -> Result<()> { + }} + #[inline] pub fn distort_points(&self, inputs: &[foundation::Point], results: &mut [foundation::Point]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).DistortPoints)(self as *const _ as *mut _, inputs.len() as u32, inputs.as_ptr() as *mut _, results.len() as u32, results.as_mut_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn undistort_point(&self, input: ::rt::gen::windows::foundation::Point) -> Result<::rt::gen::windows::foundation::Point> { + }} + #[inline] pub fn undistort_point(&self, input: foundation::Point) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).UndistortPoint)(self as *const _ as *mut _, input, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn undistort_points(&self, inputs: &[::rt::gen::windows::foundation::Point], results: &mut [::rt::gen::windows::foundation::Point]) -> Result<()> { + }} + #[inline] pub fn undistort_points(&self, inputs: &[foundation::Point], results: &mut [foundation::Point]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).UndistortPoints)(self as *const _ as *mut _, inputs.len() as u32, inputs.as_ptr() as *mut _, results.len() as u32, results.as_mut_ptr() as *mut _); if hr == S_OK { Ok(()) } 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(&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 + fn Create(&self, focalLength: foundation::numerics::Vector2, principalPoint: foundation::numerics::Vector2, radialDistortion: foundation::numerics::Vector3, tangentialDistortion: foundation::numerics::Vector2, imageWidth: u32, imageHeight: u32, out: *mut *mut CameraIntrinsics) -> HRESULT }} impl ICameraIntrinsicsFactory { - #[inline] pub unsafe fn create(&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> { + #[inline] pub fn create(&self, focalLength: foundation::numerics::Vector2, principalPoint: foundation::numerics::Vector2, radialDistortion: foundation::numerics::Vector3, tangentialDistortion: foundation::numerics::Vector2, imageWidth: u32, imageHeight: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, focalLength, principalPoint, radialDistortion, tangentialDistortion, imageWidth, imageHeight, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } 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(&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(&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(&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(&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 + #[cfg(feature="windows-perception")] fn UnprojectPoint(&self, sourcePoint: foundation::Point, targetCoordinateSystem: *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, out: *mut foundation::numerics::Vector3) -> HRESULT, + #[cfg(feature="windows-perception")] fn UnprojectPoints(&self, sourcePointsSize: u32, sourcePoints: *mut foundation::Point, targetCoordinateSystem: *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, resultsSize: u32, results: *mut foundation::numerics::Vector3) -> HRESULT, + #[cfg(feature="windows-perception")] fn MapPoint(&self, sourcePoint: foundation::Point, targetCoordinateSystem: *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, targetCameraIntrinsics: *mut CameraIntrinsics, out: *mut foundation::Point) -> HRESULT, + #[cfg(feature="windows-perception")] fn MapPoints(&self, sourcePointsSize: u32, sourcePoints: *mut foundation::Point, targetCoordinateSystem: *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, targetCameraIntrinsics: *mut CameraIntrinsics, resultsSize: u32, results: *mut foundation::Point) -> HRESULT }} impl IDepthCorrelatedCoordinateMapper { - #[cfg(feature="windows-perception")] #[inline] pub unsafe fn unproject_point(&self, sourcePoint: ::rt::gen::windows::foundation::Point, targetCoordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + #[cfg(feature="windows-perception")] #[inline] pub fn unproject_point(&self, sourcePoint: foundation::Point, targetCoordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).UnprojectPoint)(self as *const _ as *mut _, 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(&self, sourcePoints: &[::rt::gen::windows::foundation::Point], targetCoordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, results: &mut [::rt::gen::windows::foundation::numerics::Vector3]) -> Result<()> { + }} + #[cfg(feature="windows-perception")] #[inline] pub fn unproject_points(&self, sourcePoints: &[foundation::Point], targetCoordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, results: &mut [foundation::numerics::Vector3]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).UnprojectPoints)(self as *const _ as *mut _, sourcePoints.len() as u32, sourcePoints.as_ptr() as *mut _, targetCoordinateSystem as *const _ as *mut _, results.len() as u32, results.as_mut_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-perception")] #[inline] pub unsafe fn map_point(&self, sourcePoint: ::rt::gen::windows::foundation::Point, targetCoordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, targetCameraIntrinsics: &CameraIntrinsics) -> Result<::rt::gen::windows::foundation::Point> { + }} + #[cfg(feature="windows-perception")] #[inline] pub fn map_point(&self, sourcePoint: foundation::Point, targetCoordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, targetCameraIntrinsics: &CameraIntrinsics) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).MapPoint)(self as *const _ as *mut _, 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(&self, sourcePoints: &[::rt::gen::windows::foundation::Point], targetCoordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, targetCameraIntrinsics: &CameraIntrinsics, results: &mut [::rt::gen::windows::foundation::Point]) -> Result<()> { + }} + #[cfg(feature="windows-perception")] #[inline] pub fn map_points(&self, sourcePoints: &[foundation::Point], targetCoordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, targetCameraIntrinsics: &CameraIntrinsics, results: &mut [foundation::Point]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).MapPoints)(self as *const _ as *mut _, sourcePoints.len() as u32, sourcePoints.as_ptr() as *mut _, targetCoordinateSystem as *const _ as *mut _, targetCameraIntrinsics as *const _ as *mut _, results.len() as u32, results.as_mut_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DepthCorrelatedCoordinateMapper: IDepthCorrelatedCoordinateMapper} DEFINE_IID!(IID_IFrameControlCapabilities, 2835328608, 20126, 17271, 167, 137, 226, 76, 74, 231, 229, 68); @@ -14311,31 +14311,31 @@ RT_INTERFACE!{interface IFrameControlCapabilities(IFrameControlCapabilitiesVtbl) fn get_PhotoConfirmationSupported(&self, out: *mut bool) -> HRESULT }} impl IFrameControlCapabilities { - #[inline] pub unsafe fn get_exposure(&self) -> Result> { + #[inline] pub fn get_exposure(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Exposure)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_exposure_compensation(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_exposure_compensation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExposureCompensation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_iso_speed(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_iso_speed(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsoSpeed)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_focus(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_focus(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Focus)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_photo_confirmation_supported(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_photo_confirmation_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PhotoConfirmationSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class FrameControlCapabilities: IFrameControlCapabilities} DEFINE_IID!(IID_IFrameControlCapabilities2, 3466265700, 18224, 17423, 189, 62, 239, 232, 168, 242, 48, 168); @@ -14343,11 +14343,11 @@ RT_INTERFACE!{interface IFrameControlCapabilities2(IFrameControlCapabilities2Vtb fn get_Flash(&self, out: *mut *mut FrameFlashCapabilities) -> HRESULT }} impl IFrameControlCapabilities2 { - #[inline] pub unsafe fn get_flash(&self) -> Result> { + #[inline] pub fn get_flash(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Flash)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IFrameController, 3244579289, 47855, 16466, 145, 119, 72, 175, 242, 175, 117, 34); RT_INTERFACE!{interface IFrameController(IFrameControllerVtbl): IInspectable(IInspectableVtbl) [IID_IFrameController] { @@ -14355,39 +14355,39 @@ RT_INTERFACE!{interface IFrameController(IFrameControllerVtbl): IInspectable(IIn fn get_ExposureCompensationControl(&self, out: *mut *mut FrameExposureCompensationControl) -> HRESULT, fn get_IsoSpeedControl(&self, out: *mut *mut FrameIsoSpeedControl) -> HRESULT, fn get_FocusControl(&self, out: *mut *mut FrameFocusControl) -> HRESULT, - fn get_PhotoConfirmationEnabled(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn put_PhotoConfirmationEnabled(&self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT + fn get_PhotoConfirmationEnabled(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_PhotoConfirmationEnabled(&self, value: *mut foundation::IReference) -> HRESULT }} impl IFrameController { - #[inline] pub unsafe fn get_exposure_control(&self) -> Result> { + #[inline] pub fn get_exposure_control(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExposureControl)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_exposure_compensation_control(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_exposure_compensation_control(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExposureCompensationControl)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_iso_speed_control(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_iso_speed_control(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsoSpeedControl)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_focus_control(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_focus_control(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FocusControl)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_photo_confirmation_enabled(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_photo_confirmation_enabled(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PhotoConfirmationEnabled)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_photo_confirmation_enabled(&self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_photo_confirmation_enabled(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PhotoConfirmationEnabled)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class FrameController: IFrameController} impl RtActivatable for FrameController {} @@ -14397,40 +14397,40 @@ RT_INTERFACE!{interface IFrameController2(IFrameController2Vtbl): IInspectable(I fn get_FlashControl(&self, out: *mut *mut FrameFlashControl) -> HRESULT }} impl IFrameController2 { - #[inline] pub unsafe fn get_flash_control(&self) -> Result> { + #[inline] pub fn get_flash_control(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FlashControl)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut bool) -> HRESULT, - fn get_Min(&self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn get_Max(&self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn get_Step(&self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT + fn get_Min(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_Max(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_Step(&self, out: *mut foundation::TimeSpan) -> HRESULT }} impl IFrameExposureCapabilities { - #[inline] pub unsafe fn get_supported(&self) -> Result { + #[inline] pub fn get_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Supported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_min(&self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + }} + #[inline] pub fn get_min(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Min)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max(&self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + }} + #[inline] pub fn get_max(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Max)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_step(&self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + }} + #[inline] pub fn get_step(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Step)(self as *const _ as *mut _, &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); @@ -14441,71 +14441,71 @@ RT_INTERFACE!{interface IFrameExposureCompensationCapabilities(IFrameExposureCom fn get_Step(&self, out: *mut f32) -> HRESULT }} impl IFrameExposureCompensationCapabilities { - #[inline] pub unsafe fn get_supported(&self) -> Result { + #[inline] pub fn get_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Supported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_min(&self) -> Result { + }} + #[inline] pub fn get_min(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Min)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max(&self) -> Result { + }} + #[inline] pub fn get_max(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Max)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_step(&self) -> Result { + }} + #[inline] pub fn get_step(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Step)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class FrameExposureCompensationCapabilities: IFrameExposureCompensationCapabilities} 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(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn put_Value(&self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT + fn get_Value(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_Value(&self, value: *mut foundation::IReference) -> HRESULT }} impl IFrameExposureCompensationControl { - #[inline] pub unsafe fn get_value(&self) -> Result>> { + #[inline] pub fn get_value(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_value(&self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_value(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Value)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class FrameExposureCompensationControl: IFrameExposureCompensationControl} 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(&self, out: *mut bool) -> HRESULT, fn put_Auto(&self, value: bool) -> HRESULT, - fn get_Value(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::TimeSpan>) -> HRESULT, - fn put_Value(&self, value: *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::TimeSpan>) -> HRESULT + fn get_Value(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_Value(&self, value: *mut foundation::IReference) -> HRESULT }} impl IFrameExposureControl { - #[inline] pub unsafe fn get_auto(&self) -> Result { + #[inline] pub fn get_auto(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Auto)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_auto(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_auto(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Auto)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result>> { + }} + #[inline] pub fn get_value(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_value(&self, value: &::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::TimeSpan>) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_value(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Value)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class FrameExposureControl: IFrameExposureControl} DEFINE_IID!(IID_IFrameFlashCapabilities, 3146989986, 24254, 20322, 130, 35, 14, 43, 5, 191, 187, 208); @@ -14515,21 +14515,21 @@ RT_INTERFACE!{interface IFrameFlashCapabilities(IFrameFlashCapabilitiesVtbl): II fn get_PowerSupported(&self, out: *mut bool) -> HRESULT }} impl IFrameFlashCapabilities { - #[inline] pub unsafe fn get_supported(&self) -> Result { + #[inline] pub fn get_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Supported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_red_eye_reduction_supported(&self) -> Result { + }} + #[inline] pub fn get_red_eye_reduction_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RedEyeReductionSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_power_supported(&self) -> Result { + }} + #[inline] pub fn get_power_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PowerSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class FrameFlashCapabilities: IFrameFlashCapabilities} DEFINE_IID!(IID_IFrameFlashControl, 1976956615, 48453, 20395, 147, 117, 69, 172, 4, 179, 50, 194); @@ -14544,42 +14544,42 @@ RT_INTERFACE!{interface IFrameFlashControl(IFrameFlashControlVtbl): IInspectable fn put_PowerPercent(&self, value: f32) -> HRESULT }} impl IFrameFlashControl { - #[inline] pub unsafe fn get_mode(&self) -> Result { + #[inline] pub fn get_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Mode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_mode(&self, value: FrameFlashMode) -> Result<()> { + }} + #[inline] pub fn set_mode(&self, value: FrameFlashMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Mode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_auto(&self) -> Result { + }} + #[inline] pub fn get_auto(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Auto)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_auto(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_auto(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Auto)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_red_eye_reduction(&self) -> Result { + }} + #[inline] pub fn get_red_eye_reduction(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RedEyeReduction)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_red_eye_reduction(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_red_eye_reduction(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RedEyeReduction)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_power_percent(&self) -> Result { + }} + #[inline] pub fn get_power_percent(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PowerPercent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_power_percent(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_power_percent(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PowerPercent)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class FrameFlashControl: IFrameFlashControl} RT_ENUM! { enum FrameFlashMode: i32 { @@ -14593,43 +14593,43 @@ RT_INTERFACE!{interface IFrameFocusCapabilities(IFrameFocusCapabilitiesVtbl): II fn get_Step(&self, out: *mut u32) -> HRESULT }} impl IFrameFocusCapabilities { - #[inline] pub unsafe fn get_supported(&self) -> Result { + #[inline] pub fn get_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Supported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_min(&self) -> Result { + }} + #[inline] pub fn get_min(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Min)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max(&self) -> Result { + }} + #[inline] pub fn get_max(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Max)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_step(&self) -> Result { + }} + #[inline] pub fn get_step(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Step)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class FrameFocusCapabilities: IFrameFocusCapabilities} 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(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn put_Value(&self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT + fn get_Value(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_Value(&self, value: *mut foundation::IReference) -> HRESULT }} impl IFrameFocusControl { - #[inline] pub unsafe fn get_value(&self) -> Result>> { + #[inline] pub fn get_value(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_value(&self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_value(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Value)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class FrameFocusControl: IFrameFocusControl} DEFINE_IID!(IID_IFrameIsoSpeedCapabilities, 381550433, 28150, 19145, 185, 42, 159, 110, 205, 26, 210, 250); @@ -14640,54 +14640,54 @@ RT_INTERFACE!{interface IFrameIsoSpeedCapabilities(IFrameIsoSpeedCapabilitiesVtb fn get_Step(&self, out: *mut u32) -> HRESULT }} impl IFrameIsoSpeedCapabilities { - #[inline] pub unsafe fn get_supported(&self) -> Result { + #[inline] pub fn get_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Supported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_min(&self) -> Result { + }} + #[inline] pub fn get_min(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Min)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max(&self) -> Result { + }} + #[inline] pub fn get_max(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Max)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_step(&self) -> Result { + }} + #[inline] pub fn get_step(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Step)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class FrameIsoSpeedCapabilities: IFrameIsoSpeedCapabilities} 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(&self, out: *mut bool) -> HRESULT, fn put_Auto(&self, value: bool) -> HRESULT, - fn get_Value(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn put_Value(&self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT + fn get_Value(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_Value(&self, value: *mut foundation::IReference) -> HRESULT }} impl IFrameIsoSpeedControl { - #[inline] pub unsafe fn get_auto(&self) -> Result { + #[inline] pub fn get_auto(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Auto)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_auto(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_auto(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Auto)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result>> { + }} + #[inline] pub fn get_value(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_value(&self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_value(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Value)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class FrameIsoSpeedControl: IFrameIsoSpeedControl} DEFINE_IID!(IID_IVariablePhotoSequenceController, 2143287424, 60812, 17405, 167, 195, 179, 88, 9, 228, 34, 154); @@ -14699,48 +14699,48 @@ RT_INTERFACE!{interface IVariablePhotoSequenceController(IVariablePhotoSequenceC fn GetHighestConcurrentFrameRate(&self, captureProperties: *mut super::super::mediaproperties::IMediaEncodingProperties, out: *mut *mut super::super::mediaproperties::MediaRatio) -> HRESULT, fn GetCurrentFrameRate(&self, out: *mut *mut super::super::mediaproperties::MediaRatio) -> HRESULT, fn get_FrameCapabilities(&self, out: *mut *mut FrameControlCapabilities) -> HRESULT, - fn get_DesiredFrameControllers(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT + fn get_DesiredFrameControllers(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IVariablePhotoSequenceController { - #[inline] pub unsafe fn get_supported(&self) -> Result { + #[inline] pub fn get_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Supported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_photos_per_second(&self) -> Result { + }} + #[inline] pub fn get_max_photos_per_second(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxPhotosPerSecond)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_photos_per_second_limit(&self) -> Result { + }} + #[inline] pub fn get_photos_per_second_limit(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PhotosPerSecondLimit)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_photos_per_second_limit(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_photos_per_second_limit(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PhotosPerSecondLimit)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_highest_concurrent_frame_rate(&self, captureProperties: &super::super::mediaproperties::IMediaEncodingProperties) -> Result> { + }} + #[inline] pub fn get_highest_concurrent_frame_rate(&self, captureProperties: &super::super::mediaproperties::IMediaEncodingProperties) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetHighestConcurrentFrameRate)(self as *const _ as *mut _, 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(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_current_frame_rate(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentFrameRate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_frame_capabilities(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_frame_capabilities(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FrameCapabilities)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_desired_frame_controllers(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_desired_frame_controllers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DesiredFrameControllers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class VariablePhotoSequenceController: IVariablePhotoSequenceController} } // Windows.Media.Devices.Core @@ -14750,31 +14750,31 @@ use ::prelude::*; 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(&self, out: *mut HSTRING) -> HRESULT, - fn RequestLaunchAsync(&self, appArgument: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn StopAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetAppStateAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn RequestLaunchAsync(&self, appArgument: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn StopAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetAppStateAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IDialApp { - #[inline] pub unsafe fn get_app_name(&self) -> Result { + #[inline] pub fn get_app_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_launch_async(&self, appArgument: &HStringArg) -> Result>> { + }} + #[inline] pub fn request_launch_async(&self, appArgument: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestLaunchAsync)(self as *const _ as *mut _, appArgument.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn stop_async(&self) -> Result>> { + }} + #[inline] pub fn stop_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StopAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_state_async(&self) -> Result>> { + }} + #[inline] pub fn get_app_state_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAppStateAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class DialApp: IDialApp} RT_ENUM! { enum DialAppLaunchResult: i32 { @@ -14789,16 +14789,16 @@ RT_INTERFACE!{interface IDialAppStateDetails(IDialAppStateDetailsVtbl): IInspect fn get_FullXml(&self, out: *mut HSTRING) -> HRESULT }} impl IDialAppStateDetails { - #[inline] pub unsafe fn get_state(&self) -> Result { + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_full_xml(&self) -> Result { + }} + #[inline] pub fn get_full_xml(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FullXml)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class DialAppStateDetails: IDialAppStateDetails} RT_ENUM! { enum DialAppStopResult: i32 { @@ -14810,29 +14810,29 @@ RT_INTERFACE!{interface IDialDevice(IDialDeviceVtbl): IInspectable(IInspectableV fn GetDialApp(&self, appName: HSTRING, out: *mut *mut DialApp) -> HRESULT }} impl IDialDevice { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_dial_app(&self, appName: &HStringArg) -> Result> { + }} + #[inline] pub fn get_dial_app(&self, appName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDialApp)(self as *const _ as *mut _, appName.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DialDevice: IDialDevice} impl RtActivatable for DialDevice {} impl DialDevice { - #[inline] pub fn get_device_selector(appName: &HStringArg) -> Result { unsafe { + #[inline] pub fn get_device_selector(appName: &HStringArg) -> Result { >::get_activation_factory().get_device_selector(appName) - }} - #[inline] pub fn from_id_async(value: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn from_id_async(value: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(value) - }} - #[cfg(feature="windows-devices")] #[inline] pub fn device_info_supports_dial_async(device: &super::super::devices::enumeration::DeviceInformation) -> Result>> { unsafe { + } + #[cfg(feature="windows-devices")] #[inline] pub fn device_info_supports_dial_async(device: &super::super::devices::enumeration::DeviceInformation) -> Result>> { >::get_activation_factory().device_info_supports_dial_async(device) - }} + } } DEFINE_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]) [CLSID_DialDevice]); DEFINE_IID!(IID_IDialDevice2, 3132617685, 23547, 20154, 139, 50, 181, 124, 92, 94, 229, 201); @@ -14841,16 +14841,16 @@ RT_INTERFACE!{interface IDialDevice2(IDialDevice2Vtbl): IInspectable(IInspectabl #[cfg(feature="windows-storage")] fn get_Thumbnail(&self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT }} impl IDialDevice2 { - #[inline] pub unsafe fn get_friendly_name(&self) -> Result { + #[inline] pub fn get_friendly_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FriendlyName)(self 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 get_thumbnail(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_thumbnail(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Thumbnail)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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, @@ -14860,99 +14860,99 @@ RT_INTERFACE!{interface IDialDevicePicker(IDialDevicePickerVtbl): IInspectable(I fn get_Filter(&self, out: *mut *mut DialDevicePickerFilter) -> HRESULT, #[cfg(not(feature="windows-devices"))] fn __Dummy1(&self) -> (), #[cfg(feature="windows-devices")] fn get_Appearance(&self, out: *mut *mut super::super::devices::enumeration::DevicePickerAppearance) -> HRESULT, - fn add_DialDeviceSelected(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DialDeviceSelected(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_DisconnectButtonClicked(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DisconnectButtonClicked(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_DialDevicePickerDismissed(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DialDevicePickerDismissed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn Show(&self, selection: super::super::foundation::Rect) -> HRESULT, + fn add_DialDeviceSelected(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DialDeviceSelected(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_DisconnectButtonClicked(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DisconnectButtonClicked(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_DialDevicePickerDismissed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DialDevicePickerDismissed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn Show(&self, selection: foundation::Rect) -> HRESULT, #[cfg(not(feature="windows-ui"))] fn __Dummy9(&self) -> (), - #[cfg(feature="windows-ui")] fn ShowWithPlacement(&self, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> HRESULT, - fn PickSingleDialDeviceAsync(&self, selection: super::super::foundation::Rect, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-ui")] fn ShowWithPlacement(&self, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> HRESULT, + fn PickSingleDialDeviceAsync(&self, selection: foundation::Rect, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-ui"))] fn __Dummy11(&self) -> (), - #[cfg(feature="windows-ui")] fn PickSingleDialDeviceAsyncWithPlacement(&self, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-ui")] fn PickSingleDialDeviceAsyncWithPlacement(&self, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn Hide(&self) -> HRESULT, fn SetDisplayStatus(&self, device: *mut DialDevice, status: DialDeviceDisplayStatus) -> HRESULT }} impl IDialDevicePicker { - #[inline] pub unsafe fn get_filter(&self) -> Result> { + #[inline] pub fn get_filter(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Filter)(self 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_appearance(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_appearance(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Appearance)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_dial_device_selected(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_dial_device_selected(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DialDeviceSelected)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_dial_device_selected(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_dial_device_selected(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DialDeviceSelected)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_disconnect_button_clicked(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_disconnect_button_clicked(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DisconnectButtonClicked)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_disconnect_button_clicked(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_disconnect_button_clicked(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DisconnectButtonClicked)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_dial_device_picker_dismissed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_dial_device_picker_dismissed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DialDevicePickerDismissed)(self as *const _ as *mut _, 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(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_dial_device_picker_dismissed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DialDevicePickerDismissed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn show(&self, selection: super::super::foundation::Rect) -> Result<()> { + }} + #[inline] pub fn show(&self, selection: foundation::Rect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Show)(self as *const _ as *mut _, selection); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn show_with_placement(&self, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn show_with_placement(&self, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ShowWithPlacement)(self as *const _ as *mut _, selection, preferredPlacement); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn pick_single_dial_device_async(&self, selection: super::super::foundation::Rect) -> Result>> { + }} + #[inline] pub fn pick_single_dial_device_async(&self, selection: foundation::Rect) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PickSingleDialDeviceAsync)(self as *const _ as *mut _, 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(&self, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result>> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn pick_single_dial_device_async_with_placement(&self, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PickSingleDialDeviceAsyncWithPlacement)(self as *const _ as *mut _, selection, preferredPlacement, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn hide(&self) -> Result<()> { + }} + #[inline] pub fn hide(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Hide)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_status(&self, device: &DialDevice, status: DialDeviceDisplayStatus) -> Result<()> { + }} + #[inline] pub fn set_display_status(&self, device: &DialDevice, status: DialDeviceDisplayStatus) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetDisplayStatus)(self as *const _ as *mut _, device as *const _ as *mut _, status); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DialDevicePicker: IDialDevicePicker} impl RtActivatable for DialDevicePicker {} DEFINE_CLSID!(DialDevicePicker(&[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,80,105,99,107,101,114,0]) [CLSID_DialDevicePicker]); 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_SupportedAppNames(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IDialDevicePickerFilter { - #[inline] pub unsafe fn get_supported_app_names(&self) -> Result>> { + #[inline] pub fn get_supported_app_names(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedAppNames)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DialDevicePickerFilter: IDialDevicePickerFilter} DEFINE_IID!(IID_IDialDeviceSelectedEventArgs, 1208717997, 44150, 18411, 156, 6, 161, 147, 4, 218, 2, 71); @@ -14960,71 +14960,71 @@ RT_INTERFACE!{interface IDialDeviceSelectedEventArgs(IDialDeviceSelectedEventArg fn get_SelectedDialDevice(&self, out: *mut *mut DialDevice) -> HRESULT }} impl IDialDeviceSelectedEventArgs { - #[inline] pub unsafe fn get_selected_dial_device(&self) -> Result> { + #[inline] pub fn get_selected_dial_device(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SelectedDialDevice)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DialDeviceSelectedEventArgs: IDialDeviceSelectedEventArgs} 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(&self, appName: HSTRING, out: *mut HSTRING) -> HRESULT, - fn FromIdAsync(&self, value: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-devices")] fn DeviceInfoSupportsDialAsync(&self, device: *mut super::super::devices::enumeration::DeviceInformation, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FromIdAsync(&self, value: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-devices")] fn DeviceInfoSupportsDialAsync(&self, device: *mut super::super::devices::enumeration::DeviceInformation, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IDialDeviceStatics { - #[inline] pub unsafe fn get_device_selector(&self, appName: &HStringArg) -> Result { + #[inline] pub fn get_device_selector(&self, appName: &HStringArg) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, appName.get(), &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id_async(&self, value: &HStringArg) -> Result>> { + }} + #[inline] pub fn from_id_async(&self, value: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, 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(&self, device: &super::super::devices::enumeration::DeviceInformation) -> Result>> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn device_info_supports_dial_async(&self, device: &super::super::devices::enumeration::DeviceInformation) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeviceInfoSupportsDialAsync)(self as *const _ as *mut _, device as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut DialDevice) -> HRESULT }} impl IDialDisconnectButtonClickedEventArgs { - #[inline] pub unsafe fn get_device(&self) -> Result> { + #[inline] pub fn get_device(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Device)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DialDisconnectButtonClickedEventArgs: IDialDisconnectButtonClickedEventArgs} DEFINE_IID!(IID_IDialReceiverApp, 4248730711, 20549, 18190, 179, 4, 77, 217, 177, 62, 125, 17); RT_INTERFACE!{interface IDialReceiverApp(IDialReceiverAppVtbl): IInspectable(IInspectableVtbl) [IID_IDialReceiverApp] { - fn GetAdditionalDataAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn SetAdditionalDataAsync(&self, additionalData: *mut super::super::foundation::collections::IIterable>, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn GetAdditionalDataAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn SetAdditionalDataAsync(&self, additionalData: *mut foundation::collections::IIterable>, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IDialReceiverApp { - #[inline] pub unsafe fn get_additional_data_async(&self) -> Result>>> { + #[inline] pub fn get_additional_data_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAdditionalDataAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_additional_data_async(&self, additionalData: &super::super::foundation::collections::IIterable>) -> Result> { + }} + #[inline] pub fn set_additional_data_async(&self, additionalData: &foundation::collections::IIterable>) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetAdditionalDataAsync)(self as *const _ as *mut _, additionalData as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class DialReceiverApp: IDialReceiverApp} impl RtActivatable for DialReceiverApp {} impl DialReceiverApp { - #[inline] pub fn get_current() -> Result> { unsafe { + #[inline] pub fn get_current() -> Result>> { >::get_activation_factory().get_current() - }} + } } DEFINE_CLSID!(DialReceiverApp(&[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,82,101,99,101,105,118,101,114,65,112,112,0]) [CLSID_DialReceiverApp]); DEFINE_IID!(IID_IDialReceiverAppStatics, 1394096700, 19510, 19714, 178, 138, 242, 169, 218, 56, 236, 82); @@ -15032,36 +15032,36 @@ RT_INTERFACE!{static interface IDialReceiverAppStatics(IDialReceiverAppStaticsVt fn get_Current(&self, out: *mut *mut DialReceiverApp) -> HRESULT }} impl IDialReceiverAppStatics { - #[inline] pub unsafe fn get_current(&self) -> Result> { + #[inline] pub fn get_current(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Current)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } } // Windows.Media.DialProtocol pub mod effects { // Windows.Media.Effects use ::prelude::*; 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AudioCaptureEffectsChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn GetAudioCaptureEffects(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn add_AudioCaptureEffectsChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AudioCaptureEffectsChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn GetAudioCaptureEffects(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IAudioCaptureEffectsManager { - #[inline] pub unsafe fn add_audio_capture_effects_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_audio_capture_effects_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AudioCaptureEffectsChanged)(self as *const _ as *mut _, 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(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_audio_capture_effects_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AudioCaptureEffectsChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_capture_effects(&self) -> Result>> { + }} + #[inline] pub fn get_audio_capture_effects(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAudioCaptureEffects)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AudioCaptureEffectsManager: IAudioCaptureEffectsManager} DEFINE_IID!(IID_IAudioEffect, 883620433, 37383, 16469, 190, 147, 110, 87, 52, 168, 106, 228); @@ -15069,73 +15069,73 @@ RT_INTERFACE!{interface IAudioEffect(IAudioEffectVtbl): IInspectable(IInspectabl fn get_AudioEffectType(&self, out: *mut AudioEffectType) -> HRESULT }} impl IAudioEffect { - #[inline] pub unsafe fn get_audio_effect_type(&self) -> Result { + #[inline] pub fn get_audio_effect_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AudioEffectType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AudioEffect: IAudioEffect} 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(&self, out: *mut HSTRING) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::IPropertySet) -> HRESULT + fn get_Properties(&self, out: *mut *mut foundation::collections::IPropertySet) -> HRESULT }} impl IAudioEffectDefinition { - #[inline] pub unsafe fn get_activatable_class_id(&self) -> Result { + #[inline] pub fn get_activatable_class_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ActivatableClassId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result> { + }} + #[inline] pub fn get_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AudioEffectDefinition: IAudioEffectDefinition} impl RtActivatable for AudioEffectDefinition {} impl AudioEffectDefinition { - #[inline] pub fn create(activatableClassId: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(activatableClassId: &HStringArg) -> Result> { >::get_activation_factory().create(activatableClassId) - }} - #[inline] pub fn create_with_properties(activatableClassId: &HStringArg, props: &super::super::foundation::collections::IPropertySet) -> Result> { unsafe { + } + #[inline] pub fn create_with_properties(activatableClassId: &HStringArg, props: &foundation::collections::IPropertySet) -> Result> { >::get_activation_factory().create_with_properties(activatableClassId, props) - }} + } } DEFINE_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]) [CLSID_AudioEffectDefinition]); 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(&self, activatableClassId: HSTRING, out: *mut *mut AudioEffectDefinition) -> HRESULT, - fn CreateWithProperties(&self, activatableClassId: HSTRING, props: *mut super::super::foundation::collections::IPropertySet, out: *mut *mut AudioEffectDefinition) -> HRESULT + fn CreateWithProperties(&self, activatableClassId: HSTRING, props: *mut foundation::collections::IPropertySet, out: *mut *mut AudioEffectDefinition) -> HRESULT }} impl IAudioEffectDefinitionFactory { - #[inline] pub unsafe fn create(&self, activatableClassId: &HStringArg) -> Result> { + #[inline] pub fn create(&self, activatableClassId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, activatableClassId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_properties(&self, activatableClassId: &HStringArg, props: &super::super::foundation::collections::IPropertySet) -> Result> { + }} + #[inline] pub fn create_with_properties(&self, activatableClassId: &HStringArg, props: &foundation::collections::IPropertySet) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithProperties)(self as *const _ as *mut _, activatableClassId.get(), props as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class AudioEffectsManager} impl RtActivatable for AudioEffectsManager {} impl AudioEffectsManager { - #[inline] pub fn create_audio_render_effects_manager(deviceId: &HStringArg, category: super::render::AudioRenderCategory) -> Result> { unsafe { + #[inline] pub fn create_audio_render_effects_manager(deviceId: &HStringArg, category: super::render::AudioRenderCategory) -> Result>> { >::get_activation_factory().create_audio_render_effects_manager(deviceId, category) - }} - #[inline] pub fn create_audio_render_effects_manager_with_mode(deviceId: &HStringArg, category: super::render::AudioRenderCategory, mode: super::AudioProcessing) -> Result> { unsafe { + } + #[inline] pub fn create_audio_render_effects_manager_with_mode(deviceId: &HStringArg, category: super::render::AudioRenderCategory, mode: super::AudioProcessing) -> Result>> { >::get_activation_factory().create_audio_render_effects_manager_with_mode(deviceId, category, mode) - }} - #[inline] pub fn create_audio_capture_effects_manager(deviceId: &HStringArg, category: super::capture::MediaCategory) -> Result> { unsafe { + } + #[inline] pub fn create_audio_capture_effects_manager(deviceId: &HStringArg, category: super::capture::MediaCategory) -> Result>> { >::get_activation_factory().create_audio_capture_effects_manager(deviceId, category) - }} - #[inline] pub fn create_audio_capture_effects_manager_with_mode(deviceId: &HStringArg, category: super::capture::MediaCategory, mode: super::AudioProcessing) -> Result> { unsafe { + } + #[inline] pub fn create_audio_capture_effects_manager_with_mode(deviceId: &HStringArg, category: super::capture::MediaCategory, mode: super::AudioProcessing) -> Result>> { >::get_activation_factory().create_audio_capture_effects_manager_with_mode(deviceId, category, mode) - }} + } } DEFINE_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]) [CLSID_AudioEffectsManager]); DEFINE_IID!(IID_IAudioEffectsManagerStatics, 1715497988, 34554, 18380, 163, 21, 244, 137, 216, 195, 254, 16); @@ -15146,51 +15146,51 @@ RT_INTERFACE!{static interface IAudioEffectsManagerStatics(IAudioEffectsManagerS fn CreateAudioCaptureEffectsManagerWithMode(&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(&self, deviceId: &HStringArg, category: super::render::AudioRenderCategory) -> Result> { + #[inline] pub fn create_audio_render_effects_manager(&self, deviceId: &HStringArg, category: super::render::AudioRenderCategory) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAudioRenderEffectsManager)(self as *const _ as *mut _, 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(&self, deviceId: &HStringArg, category: super::render::AudioRenderCategory, mode: super::AudioProcessing) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_audio_render_effects_manager_with_mode(&self, deviceId: &HStringArg, category: super::render::AudioRenderCategory, mode: super::AudioProcessing) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAudioRenderEffectsManagerWithMode)(self as *const _ as *mut _, 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(&self, deviceId: &HStringArg, category: super::capture::MediaCategory) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_audio_capture_effects_manager(&self, deviceId: &HStringArg, category: super::capture::MediaCategory) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAudioCaptureEffectsManager)(self as *const _ as *mut _, 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(&self, deviceId: &HStringArg, category: super::capture::MediaCategory, mode: super::AudioProcessing) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_audio_capture_effects_manager_with_mode(&self, deviceId: &HStringArg, category: super::capture::MediaCategory, mode: super::AudioProcessing) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAudioCaptureEffectsManagerWithMode)(self as *const _ as *mut _, deviceId.get(), category, mode, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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_IAudioRenderEffectsManager, 1305053542, 34641, 17074, 191, 203, 57, 202, 120, 100, 189, 71); RT_INTERFACE!{interface IAudioRenderEffectsManager(IAudioRenderEffectsManagerVtbl): IInspectable(IInspectableVtbl) [IID_IAudioRenderEffectsManager] { - fn add_AudioRenderEffectsChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AudioRenderEffectsChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn GetAudioRenderEffects(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn add_AudioRenderEffectsChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AudioRenderEffectsChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn GetAudioRenderEffects(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IAudioRenderEffectsManager { - #[inline] pub unsafe fn add_audio_render_effects_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_audio_render_effects_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AudioRenderEffectsChanged)(self as *const _ as *mut _, 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(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_audio_render_effects_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AudioRenderEffectsChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_render_effects(&self) -> Result>> { + }} + #[inline] pub fn get_audio_render_effects(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAudioRenderEffects)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AudioRenderEffectsManager: IAudioRenderEffectsManager} DEFINE_IID!(IID_IAudioRenderEffectsManager2, 2823081225, 24268, 17587, 187, 78, 29, 176, 114, 135, 19, 156); @@ -15201,64 +15201,64 @@ RT_INTERFACE!{interface IAudioRenderEffectsManager2(IAudioRenderEffectsManager2V fn ShowSettingsUI(&self) -> HRESULT }} impl IAudioRenderEffectsManager2 { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_effects_provider_thumbnail(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_effects_provider_thumbnail(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EffectsProviderThumbnail)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_effects_provider_settings_label(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_effects_provider_settings_label(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EffectsProviderSettingsLabel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn show_settings_ui(&self) -> Result<()> { + }} + #[inline] pub fn show_settings_ui(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ShowSettingsUI)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } 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(&self, out: *mut bool) -> HRESULT, - fn get_SupportedEncodingProperties(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedEncodingProperties(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn SetEncodingProperties(&self, encodingProperties: *mut super::mediaproperties::AudioEncodingProperties) -> HRESULT, fn ProcessFrame(&self, context: *mut ProcessAudioFrameContext) -> HRESULT, fn Close(&self, reason: MediaEffectClosedReason) -> HRESULT, fn DiscardQueuedFrames(&self) -> HRESULT }} impl IBasicAudioEffect { - #[inline] pub unsafe fn get_use_input_frame_for_output(&self) -> Result { + #[inline] pub fn get_use_input_frame_for_output(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UseInputFrameForOutput)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_encoding_properties(&self) -> Result>> { + }} + #[inline] pub fn get_supported_encoding_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedEncodingProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_encoding_properties(&self, encodingProperties: &super::mediaproperties::AudioEncodingProperties) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_encoding_properties(&self, encodingProperties: &super::mediaproperties::AudioEncodingProperties) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetEncodingProperties)(self as *const _ as *mut _, encodingProperties as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn process_frame(&self, context: &ProcessAudioFrameContext) -> Result<()> { + }} + #[inline] pub fn process_frame(&self, context: &ProcessAudioFrameContext) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ProcessFrame)(self as *const _ as *mut _, context as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn close(&self, reason: MediaEffectClosedReason) -> Result<()> { + }} + #[inline] pub fn close(&self, reason: MediaEffectClosedReason) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Close)(self as *const _ as *mut _, reason); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn discard_queued_frames(&self) -> Result<()> { + }} + #[inline] pub fn discard_queued_frames(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).DiscardQueuedFrames)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } 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(&self, out: *mut bool) -> HRESULT, fn get_SupportedMemoryTypes(&self, out: *mut MediaMemoryTypes) -> HRESULT, fn get_TimeIndependent(&self, out: *mut bool) -> HRESULT, - fn get_SupportedEncodingProperties(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedEncodingProperties(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, #[cfg(not(feature="windows-graphics"))] fn __Dummy4(&self) -> (), #[cfg(feature="windows-graphics")] fn SetEncodingProperties(&self, encodingProperties: *mut super::mediaproperties::VideoEncodingProperties, device: *mut super::super::graphics::directx::direct3d11::IDirect3DDevice) -> HRESULT, fn ProcessFrame(&self, context: *mut ProcessVideoFrameContext) -> HRESULT, @@ -15266,71 +15266,71 @@ RT_INTERFACE!{interface IBasicVideoEffect(IBasicVideoEffectVtbl): IInspectable(I fn DiscardQueuedFrames(&self) -> HRESULT }} impl IBasicVideoEffect { - #[inline] pub unsafe fn get_is_read_only(&self) -> Result { + #[inline] pub fn get_is_read_only(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsReadOnly)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_memory_types(&self) -> Result { + }} + #[inline] pub fn get_supported_memory_types(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SupportedMemoryTypes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_time_independent(&self) -> Result { + }} + #[inline] pub fn get_time_independent(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TimeIndependent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_encoding_properties(&self) -> Result>> { + }} + #[inline] pub fn get_supported_encoding_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedEncodingProperties)(self 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_encoding_properties(&self, encodingProperties: &super::mediaproperties::VideoEncodingProperties, device: &super::super::graphics::directx::direct3d11::IDirect3DDevice) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn set_encoding_properties(&self, encodingProperties: &super::mediaproperties::VideoEncodingProperties, device: &super::super::graphics::directx::direct3d11::IDirect3DDevice) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetEncodingProperties)(self as *const _ as *mut _, encodingProperties as *const _ as *mut _, device as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn process_frame(&self, context: &ProcessVideoFrameContext) -> Result<()> { + }} + #[inline] pub fn process_frame(&self, context: &ProcessVideoFrameContext) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ProcessFrame)(self as *const _ as *mut _, context as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn close(&self, reason: MediaEffectClosedReason) -> Result<()> { + }} + #[inline] pub fn close(&self, reason: MediaEffectClosedReason) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Close)(self as *const _ as *mut _, reason); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn discard_queued_frames(&self) -> Result<()> { + }} + #[inline] pub fn discard_queued_frames(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).DiscardQueuedFrames)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + #[cfg(feature="windows-graphics")] fn get_SurfacesToOverlay(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_BackgroundFrame(&self, out: *mut *mut super::VideoFrame) -> HRESULT, fn get_OutputFrame(&self, out: *mut *mut super::VideoFrame) -> HRESULT, #[cfg(feature="windows-graphics")] fn GetOverlayForSurface(&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(&self) -> Result>> { + #[cfg(feature="windows-graphics")] #[inline] pub fn get_surfaces_to_overlay(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SurfacesToOverlay)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_background_frame(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_background_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BackgroundFrame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_output_frame(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_output_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OutputFrame)(self 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_overlay_for_surface(&self, surfaceToOverlay: &super::super::graphics::directx::direct3d11::IDirect3DSurface) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_overlay_for_surface(&self, surfaceToOverlay: &super::super::graphics::directx::direct3d11::IDirect3DSurface) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetOverlayForSurface)(self as *const _ as *mut _, surfaceToOverlay as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CompositeVideoFrameContext: ICompositeVideoFrameContext} RT_ENUM! { enum MediaEffectClosedReason: i32 { @@ -15345,16 +15345,16 @@ RT_INTERFACE!{interface IProcessAudioFrameContext(IProcessAudioFrameContextVtbl) fn get_OutputFrame(&self, out: *mut *mut super::AudioFrame) -> HRESULT }} impl IProcessAudioFrameContext { - #[inline] pub unsafe fn get_input_frame(&self) -> Result> { + #[inline] pub fn get_input_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InputFrame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_output_frame(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_output_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OutputFrame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ProcessAudioFrameContext: IProcessAudioFrameContext} DEFINE_IID!(IID_IProcessVideoFrameContext, 661589547, 25697, 16414, 186, 120, 15, 218, 214, 17, 78, 236); @@ -15363,16 +15363,16 @@ RT_INTERFACE!{interface IProcessVideoFrameContext(IProcessVideoFrameContextVtbl) fn get_OutputFrame(&self, out: *mut *mut super::VideoFrame) -> HRESULT }} impl IProcessVideoFrameContext { - #[inline] pub unsafe fn get_input_frame(&self) -> Result> { + #[inline] pub fn get_input_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InputFrame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_output_frame(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_output_frame(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OutputFrame)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ProcessVideoFrameContext: IProcessVideoFrameContext} DEFINE_IID!(IID_IVideoCompositor, 2232464446, 16908, 16911, 150, 199, 124, 152, 187, 161, 252, 85); @@ -15385,117 +15385,117 @@ RT_INTERFACE!{interface IVideoCompositor(IVideoCompositorVtbl): IInspectable(IIn fn DiscardQueuedFrames(&self) -> HRESULT }} impl IVideoCompositor { - #[inline] pub unsafe fn get_time_independent(&self) -> Result { + #[inline] pub fn get_time_independent(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TimeIndependent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn set_encoding_properties(&self, backgroundProperties: &super::mediaproperties::VideoEncodingProperties, device: &super::super::graphics::directx::direct3d11::IDirect3DDevice) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn set_encoding_properties(&self, backgroundProperties: &super::mediaproperties::VideoEncodingProperties, device: &super::super::graphics::directx::direct3d11::IDirect3DDevice) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetEncodingProperties)(self as *const _ as *mut _, backgroundProperties as *const _ as *mut _, device as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn composite_frame(&self, context: &CompositeVideoFrameContext) -> Result<()> { + }} + #[inline] pub fn composite_frame(&self, context: &CompositeVideoFrameContext) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).CompositeFrame)(self as *const _ as *mut _, context as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn close(&self, reason: MediaEffectClosedReason) -> Result<()> { + }} + #[inline] pub fn close(&self, reason: MediaEffectClosedReason) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Close)(self as *const _ as *mut _, reason); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn discard_queued_frames(&self) -> Result<()> { + }} + #[inline] pub fn discard_queued_frames(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).DiscardQueuedFrames)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut HSTRING) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::IPropertySet) -> HRESULT + fn get_Properties(&self, out: *mut *mut foundation::collections::IPropertySet) -> HRESULT }} impl IVideoCompositorDefinition { - #[inline] pub unsafe fn get_activatable_class_id(&self) -> Result { + #[inline] pub fn get_activatable_class_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ActivatableClassId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result> { + }} + #[inline] pub fn get_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class VideoCompositorDefinition: IVideoCompositorDefinition} impl RtActivatable for VideoCompositorDefinition {} impl VideoCompositorDefinition { - #[inline] pub fn create(activatableClassId: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(activatableClassId: &HStringArg) -> Result> { >::get_activation_factory().create(activatableClassId) - }} - #[inline] pub fn create_with_properties(activatableClassId: &HStringArg, props: &super::super::foundation::collections::IPropertySet) -> Result> { unsafe { + } + #[inline] pub fn create_with_properties(activatableClassId: &HStringArg, props: &foundation::collections::IPropertySet) -> Result> { >::get_activation_factory().create_with_properties(activatableClassId, props) - }} + } } DEFINE_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]) [CLSID_VideoCompositorDefinition]); 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(&self, activatableClassId: HSTRING, out: *mut *mut VideoCompositorDefinition) -> HRESULT, - fn CreateWithProperties(&self, activatableClassId: HSTRING, props: *mut super::super::foundation::collections::IPropertySet, out: *mut *mut VideoCompositorDefinition) -> HRESULT + fn CreateWithProperties(&self, activatableClassId: HSTRING, props: *mut foundation::collections::IPropertySet, out: *mut *mut VideoCompositorDefinition) -> HRESULT }} impl IVideoCompositorDefinitionFactory { - #[inline] pub unsafe fn create(&self, activatableClassId: &HStringArg) -> Result> { + #[inline] pub fn create(&self, activatableClassId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, activatableClassId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_properties(&self, activatableClassId: &HStringArg, props: &super::super::foundation::collections::IPropertySet) -> Result> { + }} + #[inline] pub fn create_with_properties(&self, activatableClassId: &HStringArg, props: &foundation::collections::IPropertySet) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithProperties)(self as *const _ as *mut _, activatableClassId.get(), props as *const _ as *mut _, &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(&self, out: *mut HSTRING) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::IPropertySet) -> HRESULT + fn get_Properties(&self, out: *mut *mut foundation::collections::IPropertySet) -> HRESULT }} impl IVideoEffectDefinition { - #[inline] pub unsafe fn get_activatable_class_id(&self) -> Result { + #[inline] pub fn get_activatable_class_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ActivatableClassId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result> { + }} + #[inline] pub fn get_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class VideoEffectDefinition: IVideoEffectDefinition} impl RtActivatable for VideoEffectDefinition {} impl VideoEffectDefinition { - #[inline] pub fn create(activatableClassId: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(activatableClassId: &HStringArg) -> Result> { >::get_activation_factory().create(activatableClassId) - }} - #[inline] pub fn create_with_properties(activatableClassId: &HStringArg, props: &super::super::foundation::collections::IPropertySet) -> Result> { unsafe { + } + #[inline] pub fn create_with_properties(activatableClassId: &HStringArg, props: &foundation::collections::IPropertySet) -> Result> { >::get_activation_factory().create_with_properties(activatableClassId, props) - }} + } } DEFINE_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]) [CLSID_VideoEffectDefinition]); 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(&self, activatableClassId: HSTRING, out: *mut *mut VideoEffectDefinition) -> HRESULT, - fn CreateWithProperties(&self, activatableClassId: HSTRING, props: *mut super::super::foundation::collections::IPropertySet, out: *mut *mut VideoEffectDefinition) -> HRESULT + fn CreateWithProperties(&self, activatableClassId: HSTRING, props: *mut foundation::collections::IPropertySet, out: *mut *mut VideoEffectDefinition) -> HRESULT }} impl IVideoEffectDefinitionFactory { - #[inline] pub unsafe fn create(&self, activatableClassId: &HStringArg) -> Result> { + #[inline] pub fn create(&self, activatableClassId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, activatableClassId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_properties(&self, activatableClassId: &HStringArg, props: &super::super::foundation::collections::IPropertySet) -> Result> { + }} + #[inline] pub fn create_with_properties(&self, activatableClassId: &HStringArg, props: &foundation::collections::IPropertySet) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithProperties)(self as *const _ as *mut _, activatableClassId.get(), props as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IVideoTransformEffectDefinition, 2523183978, 7846, 19110, 128, 116, 171, 232, 133, 30, 202, 226); RT_INTERFACE!{interface IVideoTransformEffectDefinition(IVideoTransformEffectDefinitionVtbl): IInspectable(IInspectableVtbl) [IID_IVideoTransformEffectDefinition] { @@ -15503,10 +15503,10 @@ RT_INTERFACE!{interface IVideoTransformEffectDefinition(IVideoTransformEffectDef #[cfg(feature="windows-ui")] fn get_PaddingColor(&self, out: *mut super::super::ui::Color) -> HRESULT, #[cfg(not(feature="windows-ui"))] fn __Dummy1(&self) -> (), #[cfg(feature="windows-ui")] fn put_PaddingColor(&self, value: super::super::ui::Color) -> HRESULT, - fn get_OutputSize(&self, out: *mut super::super::foundation::Size) -> HRESULT, - fn put_OutputSize(&self, value: super::super::foundation::Size) -> HRESULT, - fn get_CropRectangle(&self, out: *mut super::super::foundation::Rect) -> HRESULT, - fn put_CropRectangle(&self, value: super::super::foundation::Rect) -> HRESULT, + fn get_OutputSize(&self, out: *mut foundation::Size) -> HRESULT, + fn put_OutputSize(&self, value: foundation::Size) -> HRESULT, + fn get_CropRectangle(&self, out: *mut foundation::Rect) -> HRESULT, + fn put_CropRectangle(&self, value: foundation::Rect) -> HRESULT, fn get_Rotation(&self, out: *mut super::mediaproperties::MediaRotation) -> HRESULT, fn put_Rotation(&self, value: super::mediaproperties::MediaRotation) -> HRESULT, fn get_Mirror(&self, out: *mut super::mediaproperties::MediaMirroringOptions) -> HRESULT, @@ -15515,60 +15515,60 @@ RT_INTERFACE!{interface IVideoTransformEffectDefinition(IVideoTransformEffectDef fn get_ProcessingAlgorithm(&self, out: *mut super::transcoding::MediaVideoProcessingAlgorithm) -> HRESULT }} impl IVideoTransformEffectDefinition { - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_padding_color(&self) -> Result { + #[cfg(feature="windows-ui")] #[inline] pub fn get_padding_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PaddingColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn set_padding_color(&self, value: super::super::ui::Color) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_padding_color(&self, value: super::super::ui::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PaddingColor)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_output_size(&self) -> Result { + }} + #[inline] pub fn get_output_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OutputSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_output_size(&self, value: super::super::foundation::Size) -> Result<()> { + }} + #[inline] pub fn set_output_size(&self, value: foundation::Size) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OutputSize)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_crop_rectangle(&self) -> Result { + }} + #[inline] pub fn get_crop_rectangle(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CropRectangle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_crop_rectangle(&self, value: super::super::foundation::Rect) -> Result<()> { + }} + #[inline] pub fn set_crop_rectangle(&self, value: foundation::Rect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CropRectangle)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_rotation(&self) -> Result { + }} + #[inline] pub fn get_rotation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Rotation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_rotation(&self, value: super::mediaproperties::MediaRotation) -> Result<()> { + }} + #[inline] pub fn set_rotation(&self, value: super::mediaproperties::MediaRotation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Rotation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_mirror(&self) -> Result { + }} + #[inline] pub fn get_mirror(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Mirror)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_mirror(&self, value: super::mediaproperties::MediaMirroringOptions) -> Result<()> { + }} + #[inline] pub fn set_mirror(&self, value: super::mediaproperties::MediaMirroringOptions) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Mirror)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_processing_algorithm(&self, value: super::transcoding::MediaVideoProcessingAlgorithm) -> Result<()> { + }} + #[inline] pub fn set_processing_algorithm(&self, value: super::transcoding::MediaVideoProcessingAlgorithm) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ProcessingAlgorithm)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_processing_algorithm(&self) -> Result { + }} + #[inline] pub fn get_processing_algorithm(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProcessingAlgorithm)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class VideoTransformEffectDefinition: IVideoEffectDefinition} impl RtActivatable for VideoTransformEffectDefinition {} @@ -15578,429 +15578,429 @@ pub mod editing { // Windows.Media.Editing use ::prelude::*; 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(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_TrimTimeFromStart(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_TrimTimeFromEnd(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_TrimTimeFromEnd(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_OriginalDuration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn get_TrimmedDuration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn get_UserData(&self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, - fn put_Delay(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_Delay(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_TrimTimeFromStart(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_TrimTimeFromStart(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_TrimTimeFromEnd(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_TrimTimeFromEnd(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_OriginalDuration(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_TrimmedDuration(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_UserData(&self, out: *mut *mut foundation::collections::IMap) -> HRESULT, + fn put_Delay(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_Delay(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn put_Volume(&self, value: f64) -> HRESULT, fn get_Volume(&self, out: *mut f64) -> HRESULT, fn Clone(&self, out: *mut *mut BackgroundAudioTrack) -> HRESULT, fn GetAudioEncodingProperties(&self, out: *mut *mut super::mediaproperties::AudioEncodingProperties) -> HRESULT, - fn get_AudioEffectDefinitions(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_AudioEffectDefinitions(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IBackgroundAudioTrack { - #[inline] pub unsafe fn get_trim_time_from_start(&self) -> Result { + #[inline] pub fn get_trim_time_from_start(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TrimTimeFromStart)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_trim_time_from_start(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_trim_time_from_start(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TrimTimeFromStart)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_trim_time_from_end(&self) -> Result { + }} + #[inline] pub fn get_trim_time_from_end(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TrimTimeFromEnd)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_trim_time_from_end(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_trim_time_from_end(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TrimTimeFromEnd)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_original_duration(&self) -> Result { + }} + #[inline] pub fn get_original_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OriginalDuration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_trimmed_duration(&self) -> Result { + }} + #[inline] pub fn get_trimmed_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TrimmedDuration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_user_data(&self) -> Result>> { + }} + #[inline] pub fn get_user_data(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UserData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_delay(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_delay(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Delay)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_delay(&self) -> Result { + }} + #[inline] pub fn get_delay(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Delay)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_volume(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_volume(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Volume)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_volume(&self) -> Result { + }} + #[inline] pub fn get_volume(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Volume)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn clone(&self) -> Result> { + }} + #[inline] pub fn clone(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Clone)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_encoding_properties(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_audio_encoding_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAudioEncodingProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_effect_definitions(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_audio_effect_definitions(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioEffectDefinitions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class BackgroundAudioTrack: IBackgroundAudioTrack} impl RtActivatable for BackgroundAudioTrack {} impl BackgroundAudioTrack { - #[inline] pub fn create_from_embedded_audio_track(embeddedAudioTrack: &EmbeddedAudioTrack) -> Result> { unsafe { + #[inline] pub fn create_from_embedded_audio_track(embeddedAudioTrack: &EmbeddedAudioTrack) -> Result>> { >::get_activation_factory().create_from_embedded_audio_track(embeddedAudioTrack) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn create_from_file_async(file: &super::super::storage::IStorageFile) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_file_async(file: &super::super::storage::IStorageFile) -> Result>> { >::get_activation_factory().create_from_file_async(file) - }} + } } DEFINE_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]) [CLSID_BackgroundAudioTrack]); 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(&self, embeddedAudioTrack: *mut EmbeddedAudioTrack, out: *mut *mut BackgroundAudioTrack) -> HRESULT, - #[cfg(feature="windows-storage")] fn CreateFromFileAsync(&self, file: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn CreateFromFileAsync(&self, file: *mut super::super::storage::IStorageFile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IBackgroundAudioTrackStatics { - #[inline] pub unsafe fn create_from_embedded_audio_track(&self, embeddedAudioTrack: &EmbeddedAudioTrack) -> Result> { + #[inline] pub fn create_from_embedded_audio_track(&self, embeddedAudioTrack: &EmbeddedAudioTrack) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromEmbeddedAudioTrack)(self as *const _ as *mut _, 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(&self, file: &super::super::storage::IStorageFile) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_file_async(&self, file: &super::super::storage::IStorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromFileAsync)(self as *const _ as *mut _, 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(&self, out: *mut *mut super::mediaproperties::AudioEncodingProperties) -> HRESULT }} impl IEmbeddedAudioTrack { - #[inline] pub unsafe fn get_audio_encoding_properties(&self) -> Result> { + #[inline] pub fn get_audio_encoding_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAudioEncodingProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class EmbeddedAudioTrack: IEmbeddedAudioTrack} 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(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_TrimTimeFromStart(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_TrimTimeFromEnd(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_TrimTimeFromEnd(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_OriginalDuration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn get_TrimmedDuration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn get_UserData(&self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, + fn get_TrimTimeFromStart(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_TrimTimeFromStart(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_TrimTimeFromEnd(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_TrimTimeFromEnd(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_OriginalDuration(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_TrimmedDuration(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_UserData(&self, out: *mut *mut foundation::collections::IMap) -> HRESULT, fn Clone(&self, out: *mut *mut MediaClip) -> HRESULT, - fn get_StartTimeInComposition(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn get_EndTimeInComposition(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn get_EmbeddedAudioTracks(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_StartTimeInComposition(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_EndTimeInComposition(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_EmbeddedAudioTracks(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_SelectedEmbeddedAudioTrackIndex(&self, out: *mut u32) -> HRESULT, fn put_SelectedEmbeddedAudioTrackIndex(&self, value: u32) -> HRESULT, fn put_Volume(&self, value: f64) -> HRESULT, fn get_Volume(&self, out: *mut f64) -> HRESULT, fn GetVideoEncodingProperties(&self, out: *mut *mut super::mediaproperties::VideoEncodingProperties) -> HRESULT, - fn get_AudioEffectDefinitions(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_VideoEffectDefinitions(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_AudioEffectDefinitions(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_VideoEffectDefinitions(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IMediaClip { - #[inline] pub unsafe fn get_trim_time_from_start(&self) -> Result { + #[inline] pub fn get_trim_time_from_start(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TrimTimeFromStart)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_trim_time_from_start(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_trim_time_from_start(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TrimTimeFromStart)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_trim_time_from_end(&self) -> Result { + }} + #[inline] pub fn get_trim_time_from_end(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TrimTimeFromEnd)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_trim_time_from_end(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_trim_time_from_end(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TrimTimeFromEnd)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_original_duration(&self) -> Result { + }} + #[inline] pub fn get_original_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OriginalDuration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_trimmed_duration(&self) -> Result { + }} + #[inline] pub fn get_trimmed_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TrimmedDuration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_user_data(&self) -> Result>> { + }} + #[inline] pub fn get_user_data(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UserData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn clone(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn clone(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Clone)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_start_time_in_composition(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_start_time_in_composition(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StartTimeInComposition)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_end_time_in_composition(&self) -> Result { + }} + #[inline] pub fn get_end_time_in_composition(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EndTimeInComposition)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_embedded_audio_tracks(&self) -> Result>> { + }} + #[inline] pub fn get_embedded_audio_tracks(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EmbeddedAudioTracks)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_selected_embedded_audio_track_index(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_selected_embedded_audio_track_index(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SelectedEmbeddedAudioTrackIndex)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_selected_embedded_audio_track_index(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_selected_embedded_audio_track_index(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SelectedEmbeddedAudioTrackIndex)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_volume(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_volume(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Volume)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_volume(&self) -> Result { + }} + #[inline] pub fn get_volume(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Volume)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_encoding_properties(&self) -> Result> { + }} + #[inline] pub fn get_video_encoding_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetVideoEncodingProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_effect_definitions(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_audio_effect_definitions(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioEffectDefinitions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_effect_definitions(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_video_effect_definitions(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoEffectDefinitions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaClip: IMediaClip} impl RtActivatable for MediaClip {} impl RtActivatable for MediaClip {} impl MediaClip { - #[cfg(feature="windows-ui")] #[inline] pub fn create_from_color(color: super::super::ui::Color, originalDuration: super::super::foundation::TimeSpan) -> Result> { unsafe { + #[cfg(feature="windows-ui")] #[inline] pub fn create_from_color(color: super::super::ui::Color, originalDuration: foundation::TimeSpan) -> Result>> { >::get_activation_factory().create_from_color(color, originalDuration) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn create_from_file_async(file: &super::super::storage::IStorageFile) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_file_async(file: &super::super::storage::IStorageFile) -> Result>> { >::get_activation_factory().create_from_file_async(file) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn create_from_image_file_async(file: &super::super::storage::IStorageFile, originalDuration: super::super::foundation::TimeSpan) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_image_file_async(file: &super::super::storage::IStorageFile, originalDuration: foundation::TimeSpan) -> Result>> { >::get_activation_factory().create_from_image_file_async(file, originalDuration) - }} - #[cfg(feature="windows-graphics")] #[inline] pub fn create_from_surface(surface: &super::super::graphics::directx::direct3d11::IDirect3DSurface, originalDuration: super::super::foundation::TimeSpan) -> Result> { unsafe { + } + #[cfg(feature="windows-graphics")] #[inline] pub fn create_from_surface(surface: &super::super::graphics::directx::direct3d11::IDirect3DSurface, originalDuration: foundation::TimeSpan) -> Result>> { >::get_activation_factory().create_from_surface(surface, originalDuration) - }} + } } DEFINE_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]) [CLSID_MediaClip]); 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(&self) -> (), - #[cfg(feature="windows-ui")] fn CreateFromColor(&self, color: super::super::ui::Color, originalDuration: super::super::foundation::TimeSpan, out: *mut *mut MediaClip) -> HRESULT, - #[cfg(feature="windows-storage")] fn CreateFromFileAsync(&self, file: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn CreateFromImageFileAsync(&self, file: *mut super::super::storage::IStorageFile, originalDuration: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-ui")] fn CreateFromColor(&self, color: super::super::ui::Color, originalDuration: foundation::TimeSpan, out: *mut *mut MediaClip) -> HRESULT, + #[cfg(feature="windows-storage")] fn CreateFromFileAsync(&self, file: *mut super::super::storage::IStorageFile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn CreateFromImageFileAsync(&self, file: *mut super::super::storage::IStorageFile, originalDuration: foundation::TimeSpan, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IMediaClipStatics { - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn create_from_color(&self, color: super::super::ui::Color, originalDuration: super::super::foundation::TimeSpan) -> Result> { + #[cfg(feature="windows-ui")] #[inline] pub fn create_from_color(&self, color: super::super::ui::Color, originalDuration: foundation::TimeSpan) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromColor)(self as *const _ as *mut _, 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(&self, file: &super::super::storage::IStorageFile) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_file_async(&self, file: &super::super::storage::IStorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromFileAsync)(self 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 create_from_image_file_async(&self, file: &super::super::storage::IStorageFile, originalDuration: super::super::foundation::TimeSpan) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_image_file_async(&self, file: &super::super::storage::IStorageFile, originalDuration: foundation::TimeSpan) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromImageFileAsync)(self as *const _ as *mut _, 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(&self, surface: *mut super::super::graphics::directx::direct3d11::IDirect3DSurface, originalDuration: super::super::foundation::TimeSpan, out: *mut *mut MediaClip) -> HRESULT + #[cfg(feature="windows-graphics")] fn CreateFromSurface(&self, surface: *mut super::super::graphics::directx::direct3d11::IDirect3DSurface, originalDuration: foundation::TimeSpan, out: *mut *mut MediaClip) -> HRESULT }} impl IMediaClipStatics2 { - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn create_from_surface(&self, surface: &super::super::graphics::directx::direct3d11::IDirect3DSurface, originalDuration: super::super::foundation::TimeSpan) -> Result> { + #[cfg(feature="windows-graphics")] #[inline] pub fn create_from_surface(&self, surface: &super::super::graphics::directx::direct3d11::IDirect3DSurface, originalDuration: foundation::TimeSpan) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromSurface)(self as *const _ as *mut _, surface as *const _ as *mut _, originalDuration, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn get_Clips(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_BackgroundAudioTracks(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_UserData(&self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, + fn get_Duration(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_Clips(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_BackgroundAudioTracks(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_UserData(&self, out: *mut *mut foundation::collections::IMap) -> HRESULT, fn Clone(&self, out: *mut *mut MediaComposition) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy5(&self) -> (), - #[cfg(feature="windows-storage")] fn SaveAsync(&self, file: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + #[cfg(feature="windows-storage")] fn SaveAsync(&self, file: *mut super::super::storage::IStorageFile, out: *mut *mut foundation::IAsyncAction) -> HRESULT, #[cfg(not(feature="windows-graphics"))] fn __Dummy6(&self) -> (), - #[cfg(feature="windows-graphics")] fn GetThumbnailAsync(&self, timeFromStart: super::super::foundation::TimeSpan, scaledWidth: i32, scaledHeight: i32, framePrecision: VideoFramePrecision, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-graphics")] fn GetThumbnailAsync(&self, timeFromStart: foundation::TimeSpan, scaledWidth: i32, scaledHeight: i32, framePrecision: VideoFramePrecision, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-graphics"))] fn __Dummy7(&self) -> (), - #[cfg(feature="windows-graphics")] fn GetThumbnailsAsync(&self, timesFromStart: *mut super::super::foundation::collections::IIterable, scaledWidth: i32, scaledHeight: i32, framePrecision: VideoFramePrecision, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + #[cfg(feature="windows-graphics")] fn GetThumbnailsAsync(&self, timesFromStart: *mut foundation::collections::IIterable, scaledWidth: i32, scaledHeight: i32, framePrecision: VideoFramePrecision, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy8(&self) -> (), - #[cfg(feature="windows-storage")] fn RenderToFileAsync(&self, destination: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + #[cfg(feature="windows-storage")] fn RenderToFileAsync(&self, destination: *mut super::super::storage::IStorageFile, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy9(&self) -> (), - #[cfg(feature="windows-storage")] fn RenderToFileWithTrimmingPreferenceAsync(&self, destination: *mut super::super::storage::IStorageFile, trimmingPreference: MediaTrimmingPreference, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + #[cfg(feature="windows-storage")] fn RenderToFileWithTrimmingPreferenceAsync(&self, destination: *mut super::super::storage::IStorageFile, trimmingPreference: MediaTrimmingPreference, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy10(&self) -> (), - #[cfg(feature="windows-storage")] fn RenderToFileWithProfileAsync(&self, destination: *mut super::super::storage::IStorageFile, trimmingPreference: MediaTrimmingPreference, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + #[cfg(feature="windows-storage")] fn RenderToFileWithProfileAsync(&self, destination: *mut super::super::storage::IStorageFile, trimmingPreference: MediaTrimmingPreference, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, fn CreateDefaultEncodingProfile(&self, out: *mut *mut super::mediaproperties::MediaEncodingProfile) -> HRESULT, fn GenerateMediaStreamSource(&self, out: *mut *mut super::core::MediaStreamSource) -> HRESULT, fn GenerateMediaStreamSourceWithProfile(&self, encodingProfile: *mut super::mediaproperties::MediaEncodingProfile, out: *mut *mut super::core::MediaStreamSource) -> HRESULT, fn GeneratePreviewMediaStreamSource(&self, scaledWidth: i32, scaledHeight: i32, out: *mut *mut super::core::MediaStreamSource) -> HRESULT }} impl IMediaComposition { - #[inline] pub unsafe fn get_duration(&self) -> Result { + #[inline] pub fn get_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Duration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_clips(&self) -> Result>> { + }} + #[inline] pub fn get_clips(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Clips)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_background_audio_tracks(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_background_audio_tracks(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BackgroundAudioTracks)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_user_data(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_user_data(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UserData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn clone(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn clone(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Clone)(self 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(&self, file: &super::super::storage::IStorageFile) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn save_async(&self, file: &super::super::storage::IStorageFile) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveAsync)(self 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-graphics")] #[inline] pub unsafe fn get_thumbnail_async(&self, timeFromStart: super::super::foundation::TimeSpan, scaledWidth: i32, scaledHeight: i32, framePrecision: VideoFramePrecision) -> Result>> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_thumbnail_async(&self, timeFromStart: foundation::TimeSpan, scaledWidth: i32, scaledHeight: i32, framePrecision: VideoFramePrecision) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetThumbnailAsync)(self as *const _ as *mut _, 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(&self, timesFromStart: &super::super::foundation::collections::IIterable, scaledWidth: i32, scaledHeight: i32, framePrecision: VideoFramePrecision) -> Result>>> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_thumbnails_async(&self, timesFromStart: &foundation::collections::IIterable, scaledWidth: i32, scaledHeight: i32, framePrecision: VideoFramePrecision) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetThumbnailsAsync)(self as *const _ as *mut _, 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(&self, destination: &super::super::storage::IStorageFile) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn render_to_file_async(&self, destination: &super::super::storage::IStorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RenderToFileAsync)(self as *const _ as *mut _, 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(&self, destination: &super::super::storage::IStorageFile, trimmingPreference: MediaTrimmingPreference) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn render_to_file_with_trimming_preference_async(&self, destination: &super::super::storage::IStorageFile, trimmingPreference: MediaTrimmingPreference) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RenderToFileWithTrimmingPreferenceAsync)(self as *const _ as *mut _, 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(&self, destination: &super::super::storage::IStorageFile, trimmingPreference: MediaTrimmingPreference, encodingProfile: &super::mediaproperties::MediaEncodingProfile) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn render_to_file_with_profile_async(&self, destination: &super::super::storage::IStorageFile, trimmingPreference: MediaTrimmingPreference, encodingProfile: &super::mediaproperties::MediaEncodingProfile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RenderToFileWithProfileAsync)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[inline] pub fn create_default_encoding_profile(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDefaultEncodingProfile)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn generate_media_stream_source(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn generate_media_stream_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GenerateMediaStreamSource)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn generate_media_stream_source_with_profile(&self, encodingProfile: &super::mediaproperties::MediaEncodingProfile) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn generate_media_stream_source_with_profile(&self, encodingProfile: &super::mediaproperties::MediaEncodingProfile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GenerateMediaStreamSourceWithProfile)(self as *const _ as *mut _, 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(&self, scaledWidth: i32, scaledHeight: i32) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn generate_preview_media_stream_source(&self, scaledWidth: i32, scaledHeight: i32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GeneratePreviewMediaStreamSource)(self as *const _ as *mut _, scaledWidth, scaledHeight, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaComposition: IMediaComposition} impl RtActivatable for MediaComposition {} impl RtActivatable for MediaComposition {} impl MediaComposition { - #[cfg(feature="windows-storage")] #[inline] pub fn load_async(file: &super::super::storage::StorageFile) -> Result>> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn load_async(file: &super::super::storage::StorageFile) -> Result>> { >::get_activation_factory().load_async(file) - }} + } } DEFINE_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]) [CLSID_MediaComposition]); 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_OverlayLayers(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IMediaComposition2 { - #[inline] pub unsafe fn get_overlay_layers(&self) -> Result>> { + #[inline] pub fn get_overlay_layers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OverlayLayers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, file: *mut super::super::storage::StorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn LoadAsync(&self, file: *mut super::super::storage::StorageFile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IMediaCompositionStatics { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn load_async(&self, file: &super::super::storage::StorageFile) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn load_async(&self, file: &super::super::storage::StorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LoadAsync)(self as *const _ as *mut _, file as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut super::super::foundation::Rect) -> HRESULT, - fn put_Position(&self, value: super::super::foundation::Rect) -> HRESULT, - fn put_Delay(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_Delay(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_Position(&self, out: *mut foundation::Rect) -> HRESULT, + fn put_Position(&self, value: foundation::Rect) -> HRESULT, + fn put_Delay(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_Delay(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn get_Opacity(&self, out: *mut f64) -> HRESULT, fn put_Opacity(&self, value: f64) -> HRESULT, fn Clone(&self, out: *mut *mut MediaOverlay) -> HRESULT, @@ -16009,111 +16009,111 @@ RT_INTERFACE!{interface IMediaOverlay(IMediaOverlayVtbl): IInspectable(IInspecta fn put_AudioEnabled(&self, value: bool) -> HRESULT }} impl IMediaOverlay { - #[inline] pub unsafe fn get_position(&self) -> Result { + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_position(&self, value: super::super::foundation::Rect) -> Result<()> { + }} + #[inline] pub fn set_position(&self, value: foundation::Rect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Position)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_delay(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_delay(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Delay)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_delay(&self) -> Result { + }} + #[inline] pub fn get_delay(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Delay)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_opacity(&self) -> Result { + }} + #[inline] pub fn get_opacity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Opacity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_opacity(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_opacity(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Opacity)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn clone(&self) -> Result> { + }} + #[inline] pub fn clone(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Clone)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_clip(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_clip(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Clip)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_enabled(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_audio_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AudioEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_audio_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_audio_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AudioEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MediaOverlay: IMediaOverlay} impl RtActivatable for MediaOverlay {} impl MediaOverlay { - #[inline] pub fn create(clip: &MediaClip) -> Result> { unsafe { + #[inline] pub fn create(clip: &MediaClip) -> Result> { >::get_activation_factory().create(clip) - }} - #[inline] pub fn create_with_position_and_opacity(clip: &MediaClip, position: super::super::foundation::Rect, opacity: f64) -> Result> { unsafe { + } + #[inline] pub fn create_with_position_and_opacity(clip: &MediaClip, position: foundation::Rect, opacity: f64) -> Result> { >::get_activation_factory().create_with_position_and_opacity(clip, position, opacity) - }} + } } DEFINE_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]) [CLSID_MediaOverlay]); 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(&self, clip: *mut MediaClip, out: *mut *mut MediaOverlay) -> HRESULT, - fn CreateWithPositionAndOpacity(&self, clip: *mut MediaClip, position: super::super::foundation::Rect, opacity: f64, out: *mut *mut MediaOverlay) -> HRESULT + fn CreateWithPositionAndOpacity(&self, clip: *mut MediaClip, position: foundation::Rect, opacity: f64, out: *mut *mut MediaOverlay) -> HRESULT }} impl IMediaOverlayFactory { - #[inline] pub unsafe fn create(&self, clip: &MediaClip) -> Result> { + #[inline] pub fn create(&self, clip: &MediaClip) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, 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(&self, clip: &MediaClip, position: super::super::foundation::Rect, opacity: f64) -> Result> { + }} + #[inline] pub fn create_with_position_and_opacity(&self, clip: &MediaClip, position: foundation::Rect, opacity: f64) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithPositionAndOpacity)(self as *const _ as *mut _, clip as *const _ as *mut _, position, opacity, &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(&self, out: *mut *mut MediaOverlayLayer) -> HRESULT, - fn get_Overlays(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Overlays(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_CustomCompositorDefinition(&self, out: *mut *mut super::effects::IVideoCompositorDefinition) -> HRESULT }} impl IMediaOverlayLayer { - #[inline] pub unsafe fn clone(&self) -> Result> { + #[inline] pub fn clone(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Clone)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_overlays(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_overlays(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Overlays)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_custom_compositor_definition(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_custom_compositor_definition(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CustomCompositorDefinition)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaOverlayLayer: IMediaOverlayLayer} impl RtActivatable for MediaOverlayLayer {} impl RtActivatable for MediaOverlayLayer {} impl MediaOverlayLayer { - #[inline] pub fn create_with_compositor_definition(compositorDefinition: &super::effects::IVideoCompositorDefinition) -> Result> { unsafe { + #[inline] pub fn create_with_compositor_definition(compositorDefinition: &super::effects::IVideoCompositorDefinition) -> Result> { >::get_activation_factory().create_with_compositor_definition(compositorDefinition) - }} + } } DEFINE_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]) [CLSID_MediaOverlayLayer]); DEFINE_IID!(IID_IMediaOverlayLayerFactory, 2491200627, 41886, 17250, 171, 191, 159, 139, 80, 112, 160, 98); @@ -16121,11 +16121,11 @@ RT_INTERFACE!{static interface IMediaOverlayLayerFactory(IMediaOverlayLayerFacto fn CreateWithCompositorDefinition(&self, compositorDefinition: *mut super::effects::IVideoCompositorDefinition, out: *mut *mut MediaOverlayLayer) -> HRESULT }} impl IMediaOverlayLayerFactory { - #[inline] pub unsafe fn create_with_compositor_definition(&self, compositorDefinition: &super::effects::IVideoCompositorDefinition) -> Result> { + #[inline] pub fn create_with_compositor_definition(&self, compositorDefinition: &super::effects::IVideoCompositorDefinition) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithCompositorDefinition)(self as *const _ as *mut _, compositorDefinition as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum MediaTrimmingPreference: i32 { Fast (MediaTrimmingPreference_Fast) = 0, Precise (MediaTrimmingPreference_Precise) = 1, @@ -16147,180 +16147,180 @@ RT_INTERFACE!{interface IDetectedFace(IDetectedFaceVtbl): IInspectable(IInspecta #[cfg(feature="windows-graphics")] fn get_FaceBox(&self, out: *mut super::super::graphics::imaging::BitmapBounds) -> HRESULT }} impl IDetectedFace { - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn get_face_box(&self) -> Result { + #[cfg(feature="windows-graphics")] #[inline] pub fn get_face_box(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FaceBox)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class DetectedFace: IDetectedFace} 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(&self, image: *mut super::super::graphics::imaging::SoftwareBitmap, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - #[cfg(feature="windows-graphics")] fn DetectFacesWithSearchAreaAsync(&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 DetectFacesAsync(&self, image: *mut super::super::graphics::imaging::SoftwareBitmap, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + #[cfg(feature="windows-graphics")] fn DetectFacesWithSearchAreaAsync(&self, image: *mut super::super::graphics::imaging::SoftwareBitmap, searchArea: super::super::graphics::imaging::BitmapBounds, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, #[cfg(feature="windows-graphics")] fn get_MinDetectableFaceSize(&self, out: *mut super::super::graphics::imaging::BitmapSize) -> HRESULT, #[cfg(feature="windows-graphics")] fn put_MinDetectableFaceSize(&self, value: super::super::graphics::imaging::BitmapSize) -> HRESULT, #[cfg(feature="windows-graphics")] fn get_MaxDetectableFaceSize(&self, out: *mut super::super::graphics::imaging::BitmapSize) -> HRESULT, #[cfg(feature="windows-graphics")] fn put_MaxDetectableFaceSize(&self, value: super::super::graphics::imaging::BitmapSize) -> HRESULT }} impl IFaceDetector { - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn detect_faces_async(&self, image: &super::super::graphics::imaging::SoftwareBitmap) -> Result>>> { + #[cfg(feature="windows-graphics")] #[inline] pub fn detect_faces_async(&self, image: &super::super::graphics::imaging::SoftwareBitmap) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DetectFacesAsync)(self as *const _ as *mut _, 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(&self, image: &super::super::graphics::imaging::SoftwareBitmap, searchArea: super::super::graphics::imaging::BitmapBounds) -> Result>>> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn detect_faces_with_search_area_async(&self, image: &super::super::graphics::imaging::SoftwareBitmap, searchArea: super::super::graphics::imaging::BitmapBounds) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DetectFacesWithSearchAreaAsync)(self as *const _ as *mut _, 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(&self) -> Result { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_min_detectable_face_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinDetectableFaceSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn set_min_detectable_face_size(&self, value: super::super::graphics::imaging::BitmapSize) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn set_min_detectable_face_size(&self, value: super::super::graphics::imaging::BitmapSize) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MinDetectableFaceSize)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn get_max_detectable_face_size(&self) -> Result { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_max_detectable_face_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxDetectableFaceSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn set_max_detectable_face_size(&self, value: super::super::graphics::imaging::BitmapSize) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn set_max_detectable_face_size(&self, value: super::super::graphics::imaging::BitmapSize) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxDetectableFaceSize)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class FaceDetector: IFaceDetector} impl RtActivatable for FaceDetector {} impl FaceDetector { - #[inline] pub fn create_async() -> Result>> { unsafe { + #[inline] pub fn create_async() -> Result>> { >::get_activation_factory().create_async() - }} - #[cfg(feature="windows-graphics")] #[inline] pub fn get_supported_bitmap_pixel_formats() -> Result>> { unsafe { + } + #[cfg(feature="windows-graphics")] #[inline] pub fn get_supported_bitmap_pixel_formats() -> Result>>> { >::get_activation_factory().get_supported_bitmap_pixel_formats() - }} - #[cfg(feature="windows-graphics")] #[inline] pub fn is_bitmap_pixel_format_supported(bitmapPixelFormat: super::super::graphics::imaging::BitmapPixelFormat) -> Result { unsafe { + } + #[cfg(feature="windows-graphics")] #[inline] pub fn is_bitmap_pixel_format_supported(bitmapPixelFormat: super::super::graphics::imaging::BitmapPixelFormat) -> Result { >::get_activation_factory().is_bitmap_pixel_format_supported(bitmapPixelFormat) - }} - #[inline] pub fn get_is_supported() -> Result { unsafe { + } + #[inline] pub fn get_is_supported() -> Result { >::get_activation_factory().get_is_supported() - }} + } } DEFINE_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]) [CLSID_FaceDetector]); 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-graphics"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-graphics")] fn GetSupportedBitmapPixelFormats(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + #[cfg(feature="windows-graphics")] fn GetSupportedBitmapPixelFormats(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, #[cfg(not(feature="windows-graphics"))] fn __Dummy2(&self) -> (), #[cfg(feature="windows-graphics")] fn IsBitmapPixelFormatSupported(&self, bitmapPixelFormat: super::super::graphics::imaging::BitmapPixelFormat, out: *mut bool) -> HRESULT, fn get_IsSupported(&self, out: *mut bool) -> HRESULT }} impl IFaceDetectorStatics { - #[inline] pub unsafe fn create_async(&self) -> Result>> { + #[inline] pub fn create_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAsync)(self 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_supported_bitmap_pixel_formats(&self) -> Result>> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_supported_bitmap_pixel_formats(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSupportedBitmapPixelFormats)(self 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 is_bitmap_pixel_format_supported(&self, bitmapPixelFormat: super::super::graphics::imaging::BitmapPixelFormat) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn is_bitmap_pixel_format_supported(&self, bitmapPixelFormat: super::super::graphics::imaging::BitmapPixelFormat) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsBitmapPixelFormatSupported)(self as *const _ as *mut _, bitmapPixelFormat, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_supported(&self) -> Result { + }} + #[inline] pub fn get_is_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, videoFrame: *mut super::VideoFrame, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn ProcessNextFrameAsync(&self, videoFrame: *mut super::VideoFrame, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, #[cfg(feature="windows-graphics")] fn get_MinDetectableFaceSize(&self, out: *mut super::super::graphics::imaging::BitmapSize) -> HRESULT, #[cfg(feature="windows-graphics")] fn put_MinDetectableFaceSize(&self, value: super::super::graphics::imaging::BitmapSize) -> HRESULT, #[cfg(feature="windows-graphics")] fn get_MaxDetectableFaceSize(&self, out: *mut super::super::graphics::imaging::BitmapSize) -> HRESULT, #[cfg(feature="windows-graphics")] fn put_MaxDetectableFaceSize(&self, value: super::super::graphics::imaging::BitmapSize) -> HRESULT }} impl IFaceTracker { - #[inline] pub unsafe fn process_next_frame_async(&self, videoFrame: &super::VideoFrame) -> Result>>> { + #[inline] pub fn process_next_frame_async(&self, videoFrame: &super::VideoFrame) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ProcessNextFrameAsync)(self as *const _ as *mut _, 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(&self) -> Result { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_min_detectable_face_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinDetectableFaceSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn set_min_detectable_face_size(&self, value: super::super::graphics::imaging::BitmapSize) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn set_min_detectable_face_size(&self, value: super::super::graphics::imaging::BitmapSize) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MinDetectableFaceSize)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn get_max_detectable_face_size(&self) -> Result { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_max_detectable_face_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxDetectableFaceSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn set_max_detectable_face_size(&self, value: super::super::graphics::imaging::BitmapSize) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn set_max_detectable_face_size(&self, value: super::super::graphics::imaging::BitmapSize) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxDetectableFaceSize)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class FaceTracker: IFaceTracker} impl RtActivatable for FaceTracker {} impl FaceTracker { - #[inline] pub fn create_async() -> Result>> { unsafe { + #[inline] pub fn create_async() -> Result>> { >::get_activation_factory().create_async() - }} - #[cfg(feature="windows-graphics")] #[inline] pub fn get_supported_bitmap_pixel_formats() -> Result>> { unsafe { + } + #[cfg(feature="windows-graphics")] #[inline] pub fn get_supported_bitmap_pixel_formats() -> Result>>> { >::get_activation_factory().get_supported_bitmap_pixel_formats() - }} - #[cfg(feature="windows-graphics")] #[inline] pub fn is_bitmap_pixel_format_supported(bitmapPixelFormat: super::super::graphics::imaging::BitmapPixelFormat) -> Result { unsafe { + } + #[cfg(feature="windows-graphics")] #[inline] pub fn is_bitmap_pixel_format_supported(bitmapPixelFormat: super::super::graphics::imaging::BitmapPixelFormat) -> Result { >::get_activation_factory().is_bitmap_pixel_format_supported(bitmapPixelFormat) - }} - #[inline] pub fn get_is_supported() -> Result { unsafe { + } + #[inline] pub fn get_is_supported() -> Result { >::get_activation_factory().get_is_supported() - }} + } } DEFINE_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]) [CLSID_FaceTracker]); 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreateAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-graphics"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-graphics")] fn GetSupportedBitmapPixelFormats(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + #[cfg(feature="windows-graphics")] fn GetSupportedBitmapPixelFormats(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, #[cfg(not(feature="windows-graphics"))] fn __Dummy2(&self) -> (), #[cfg(feature="windows-graphics")] fn IsBitmapPixelFormatSupported(&self, bitmapPixelFormat: super::super::graphics::imaging::BitmapPixelFormat, out: *mut bool) -> HRESULT, fn get_IsSupported(&self, out: *mut bool) -> HRESULT }} impl IFaceTrackerStatics { - #[inline] pub unsafe fn create_async(&self) -> Result>> { + #[inline] pub fn create_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAsync)(self 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_supported_bitmap_pixel_formats(&self) -> Result>> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_supported_bitmap_pixel_formats(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSupportedBitmapPixelFormats)(self 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 is_bitmap_pixel_format_supported(&self, bitmapPixelFormat: super::super::graphics::imaging::BitmapPixelFormat) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn is_bitmap_pixel_format_supported(&self, bitmapPixelFormat: super::super::graphics::imaging::BitmapPixelFormat) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsBitmapPixelFormatSupported)(self as *const _ as *mut _, bitmapPixelFormat, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_supported(&self) -> Result { + }} + #[inline] pub fn get_is_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } } // Windows.Media.FaceAnalysis pub mod import { // Windows.Media.Import @@ -16341,7 +16341,7 @@ DEFINE_IID!(IID_IPhotoImportDeleteImportedItemsFromSourceResult, 4108391160, 338 RT_INTERFACE!{interface IPhotoImportDeleteImportedItemsFromSourceResult(IPhotoImportDeleteImportedItemsFromSourceResultVtbl): IInspectable(IInspectableVtbl) [IID_IPhotoImportDeleteImportedItemsFromSourceResult] { fn get_Session(&self, out: *mut *mut PhotoImportSession) -> HRESULT, fn get_HasSucceeded(&self, out: *mut bool) -> HRESULT, - fn get_DeletedItems(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_DeletedItems(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_PhotosCount(&self, out: *mut u32) -> HRESULT, fn get_PhotosSizeInBytes(&self, out: *mut u64) -> HRESULT, fn get_VideosCount(&self, out: *mut u32) -> HRESULT, @@ -16354,78 +16354,78 @@ RT_INTERFACE!{interface IPhotoImportDeleteImportedItemsFromSourceResult(IPhotoIm fn get_TotalSizeInBytes(&self, out: *mut u64) -> HRESULT }} impl IPhotoImportDeleteImportedItemsFromSourceResult { - #[inline] pub unsafe fn get_session(&self) -> Result> { + #[inline] pub fn get_session(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Session)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_succeeded(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_has_succeeded(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasSucceeded)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_deleted_items(&self) -> Result>> { + }} + #[inline] pub fn get_deleted_items(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeletedItems)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_photos_count(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_photos_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PhotosCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_photos_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_photos_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PhotosSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_videos_count(&self) -> Result { + }} + #[inline] pub fn get_videos_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VideosCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_videos_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_videos_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VideosSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sidecars_count(&self) -> Result { + }} + #[inline] pub fn get_sidecars_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SidecarsCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sidecars_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_sidecars_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SidecarsSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_siblings_count(&self) -> Result { + }} + #[inline] pub fn get_siblings_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SiblingsCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_siblings_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_siblings_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SiblingsSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_total_count(&self) -> Result { + }} + #[inline] pub fn get_total_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TotalCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_total_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_total_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TotalSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PhotoImportDeleteImportedItemsFromSourceResult: IPhotoImportDeleteImportedItemsFromSourceResult} 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(&self, out: *mut *mut PhotoImportSession) -> HRESULT, fn get_HasSucceeded(&self, out: *mut bool) -> HRESULT, - fn get_FoundItems(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_FoundItems(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_PhotosCount(&self, out: *mut u32) -> HRESULT, fn get_PhotosSizeInBytes(&self, out: *mut u64) -> HRESULT, fn get_VideosCount(&self, out: *mut u32) -> HRESULT, @@ -16438,7 +16438,7 @@ RT_INTERFACE!{interface IPhotoImportFindItemsResult(IPhotoImportFindItemsResultV fn get_TotalSizeInBytes(&self, out: *mut u64) -> HRESULT, fn SelectAll(&self) -> HRESULT, fn SelectNone(&self) -> HRESULT, - fn SelectNewAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn SelectNewAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn SetImportMode(&self, value: PhotoImportImportMode) -> HRESULT, fn get_ImportMode(&self, out: *mut PhotoImportImportMode) -> HRESULT, fn get_SelectedPhotosCount(&self, out: *mut u32) -> HRESULT, @@ -16451,190 +16451,190 @@ RT_INTERFACE!{interface IPhotoImportFindItemsResult(IPhotoImportFindItemsResultV fn get_SelectedSiblingsSizeInBytes(&self, out: *mut u64) -> HRESULT, fn get_SelectedTotalCount(&self, out: *mut u32) -> HRESULT, fn get_SelectedTotalSizeInBytes(&self, out: *mut u64) -> HRESULT, - fn add_SelectionChanged(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SelectionChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn ImportItemsAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, - fn add_ItemImported(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ItemImported(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_SelectionChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SelectionChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn ImportItemsAsync(&self, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + fn add_ItemImported(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ItemImported(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IPhotoImportFindItemsResult { - #[inline] pub unsafe fn get_session(&self) -> Result> { + #[inline] pub fn get_session(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Session)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_succeeded(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_has_succeeded(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasSucceeded)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_found_items(&self) -> Result>> { + }} + #[inline] pub fn get_found_items(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FoundItems)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_photos_count(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_photos_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PhotosCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_photos_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_photos_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PhotosSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_videos_count(&self) -> Result { + }} + #[inline] pub fn get_videos_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VideosCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_videos_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_videos_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VideosSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sidecars_count(&self) -> Result { + }} + #[inline] pub fn get_sidecars_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SidecarsCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sidecars_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_sidecars_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SidecarsSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_siblings_count(&self) -> Result { + }} + #[inline] pub fn get_siblings_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SiblingsCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_siblings_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_siblings_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SiblingsSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_total_count(&self) -> Result { + }} + #[inline] pub fn get_total_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TotalCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_total_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_total_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TotalSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn select_all(&self) -> Result<()> { + }} + #[inline] pub fn select_all(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SelectAll)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn select_none(&self) -> Result<()> { + }} + #[inline] pub fn select_none(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SelectNone)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn select_new_async(&self) -> Result> { + }} + #[inline] pub fn select_new_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SelectNewAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_import_mode(&self, value: PhotoImportImportMode) -> Result<()> { + }} + #[inline] pub fn set_import_mode(&self, value: PhotoImportImportMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetImportMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_import_mode(&self) -> Result { + }} + #[inline] pub fn get_import_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ImportMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_selected_photos_count(&self) -> Result { + }} + #[inline] pub fn get_selected_photos_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SelectedPhotosCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_selected_photos_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_selected_photos_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SelectedPhotosSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_selected_videos_count(&self) -> Result { + }} + #[inline] pub fn get_selected_videos_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SelectedVideosCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_selected_videos_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_selected_videos_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SelectedVideosSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_selected_sidecars_count(&self) -> Result { + }} + #[inline] pub fn get_selected_sidecars_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SelectedSidecarsCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_selected_sidecars_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_selected_sidecars_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SelectedSidecarsSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_selected_siblings_count(&self) -> Result { + }} + #[inline] pub fn get_selected_siblings_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SelectedSiblingsCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_selected_siblings_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_selected_siblings_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SelectedSiblingsSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_selected_total_count(&self) -> Result { + }} + #[inline] pub fn get_selected_total_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SelectedTotalCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_selected_total_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_selected_total_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SelectedTotalSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_selection_changed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_selection_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SelectionChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_selection_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_selection_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SelectionChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn import_items_async(&self) -> Result>> { + }} + #[inline] pub fn import_items_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ImportItemsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_item_imported(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_item_imported(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ItemImported)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_item_imported(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_item_imported(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ItemImported)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PhotoImportFindItemsResult: IPhotoImportFindItemsResult} 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(&self, rangeStart: super::super::foundation::DateTime, rangeLength: super::super::foundation::TimeSpan) -> HRESULT + fn AddItemsInDateRangeToSelection(&self, rangeStart: foundation::DateTime, rangeLength: foundation::TimeSpan) -> HRESULT }} impl IPhotoImportFindItemsResult2 { - #[inline] pub unsafe fn add_items_in_date_range_to_selection(&self, rangeStart: super::super::foundation::DateTime, rangeLength: super::super::foundation::TimeSpan) -> Result<()> { + #[inline] pub fn add_items_in_date_range_to_selection(&self, rangeStart: foundation::DateTime, rangeLength: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddItemsInDateRangeToSelection)(self as *const _ as *mut _, 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(&self, out: *mut *mut PhotoImportSession) -> HRESULT, fn get_HasSucceeded(&self, out: *mut bool) -> HRESULT, - fn get_ImportedItems(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_ImportedItems(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_PhotosCount(&self, out: *mut u32) -> HRESULT, fn get_PhotosSizeInBytes(&self, out: *mut u64) -> HRESULT, fn get_VideosCount(&self, out: *mut u32) -> HRESULT, @@ -16645,79 +16645,79 @@ RT_INTERFACE!{interface IPhotoImportImportItemsResult(IPhotoImportImportItemsRes fn get_SiblingsSizeInBytes(&self, out: *mut u64) -> HRESULT, fn get_TotalCount(&self, out: *mut u32) -> HRESULT, fn get_TotalSizeInBytes(&self, out: *mut u64) -> HRESULT, - fn DeleteImportedItemsFromSourceAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT + fn DeleteImportedItemsFromSourceAsync(&self, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT }} impl IPhotoImportImportItemsResult { - #[inline] pub unsafe fn get_session(&self) -> Result> { + #[inline] pub fn get_session(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Session)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_succeeded(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_has_succeeded(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasSucceeded)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_imported_items(&self) -> Result>> { + }} + #[inline] pub fn get_imported_items(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ImportedItems)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_photos_count(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_photos_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PhotosCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_photos_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_photos_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PhotosSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_videos_count(&self) -> Result { + }} + #[inline] pub fn get_videos_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VideosCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_videos_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_videos_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VideosSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sidecars_count(&self) -> Result { + }} + #[inline] pub fn get_sidecars_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SidecarsCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sidecars_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_sidecars_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SidecarsSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_siblings_count(&self) -> Result { + }} + #[inline] pub fn get_siblings_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SiblingsCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_siblings_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_siblings_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SiblingsSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_total_count(&self) -> Result { + }} + #[inline] pub fn get_total_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TotalCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_total_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_total_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TotalSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn delete_imported_items_from_source_async(&self) -> Result>> { + }} + #[inline] pub fn delete_imported_items_from_source_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteImportedItemsFromSourceAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PhotoImportImportItemsResult: IPhotoImportImportItemsResult} RT_ENUM! { enum PhotoImportImportMode: i32 { @@ -16729,82 +16729,82 @@ RT_INTERFACE!{interface IPhotoImportItem(IPhotoImportItemVtbl): IInspectable(IIn fn get_ItemKey(&self, out: *mut u64) -> HRESULT, fn get_ContentType(&self, out: *mut PhotoImportContentType) -> HRESULT, fn get_SizeInBytes(&self, out: *mut u64) -> HRESULT, - fn get_Date(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Date(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_Sibling(&self, out: *mut *mut PhotoImportSidecar) -> HRESULT, - fn get_Sidecars(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_VideoSegments(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Sidecars(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_VideoSegments(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_IsSelected(&self, out: *mut bool) -> HRESULT, fn put_IsSelected(&self, value: bool) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy10(&self) -> (), #[cfg(feature="windows-storage")] fn get_Thumbnail(&self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, - fn get_ImportedFileNames(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_DeletedFileNames(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_ImportedFileNames(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_DeletedFileNames(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IPhotoImportItem { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_item_key(&self) -> Result { + }} + #[inline] pub fn get_item_key(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ItemKey)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_content_type(&self) -> Result { + }} + #[inline] pub fn get_content_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ContentType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_date(&self) -> Result { + }} + #[inline] pub fn get_date(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Date)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sibling(&self) -> Result> { + }} + #[inline] pub fn get_sibling(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Sibling)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sidecars(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_sidecars(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Sidecars)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_segments(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_video_segments(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoSegments)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_selected(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_selected(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSelected)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_selected(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_selected(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsSelected)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_thumbnail(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_thumbnail(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Thumbnail)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_imported_file_names(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_imported_file_names(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ImportedFileNames)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deleted_file_names(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deleted_file_names(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeletedFileNames)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PhotoImportItem: IPhotoImportItem} DEFINE_IID!(IID_IPhotoImportItemImportedEventArgs, 1120612317, 32104, 18357, 188, 124, 206, 183, 62, 12, 119, 220); @@ -16812,11 +16812,11 @@ RT_INTERFACE!{interface IPhotoImportItemImportedEventArgs(IPhotoImportItemImport fn get_ImportedItem(&self, out: *mut *mut PhotoImportItem) -> HRESULT }} impl IPhotoImportItemImportedEventArgs { - #[inline] pub unsafe fn get_imported_item(&self) -> Result> { + #[inline] pub fn get_imported_item(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ImportedItem)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PhotoImportItemImportedEventArgs: IPhotoImportItemImportedEventArgs} RT_ENUM! { enum PhotoImportItemSelectionMode: i32 { @@ -16825,74 +16825,74 @@ RT_ENUM! { enum PhotoImportItemSelectionMode: i32 { RT_CLASS!{static class PhotoImportManager} impl RtActivatable for PhotoImportManager {} impl PhotoImportManager { - #[inline] pub fn is_supported_async() -> Result>> { unsafe { + #[inline] pub fn is_supported_async() -> Result>> { >::get_activation_factory().is_supported_async() - }} - #[inline] pub fn find_all_sources_async() -> Result>>> { unsafe { + } + #[inline] pub fn find_all_sources_async() -> Result>>> { >::get_activation_factory().find_all_sources_async() - }} - #[inline] pub fn get_pending_operations() -> Result>> { unsafe { + } + #[inline] pub fn get_pending_operations() -> Result>>> { >::get_activation_factory().get_pending_operations() - }} + } } DEFINE_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]) [CLSID_PhotoImportManager]); 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn FindAllSourcesAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetPendingOperations(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn IsSupportedAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn FindAllSourcesAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetPendingOperations(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IPhotoImportManagerStatics { - #[inline] pub unsafe fn is_supported_async(&self) -> Result>> { + #[inline] pub fn is_supported_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).IsSupportedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_all_sources_async(&self) -> Result>>> { + }} + #[inline] pub fn find_all_sources_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllSourcesAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pending_operations(&self) -> Result>> { + }} + #[inline] pub fn get_pending_operations(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPendingOperations)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut PhotoImportStage) -> HRESULT, fn get_Session(&self, out: *mut *mut PhotoImportSession) -> HRESULT, - fn get_ContinueFindingItemsAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, - fn get_ContinueImportingItemsAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, - fn get_ContinueDeletingImportedItemsFromSourceAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT + fn get_ContinueFindingItemsAsync(&self, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + fn get_ContinueImportingItemsAsync(&self, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + fn get_ContinueDeletingImportedItemsFromSourceAsync(&self, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT }} impl IPhotoImportOperation { - #[inline] pub unsafe fn get_stage(&self) -> Result { + #[inline] pub fn get_stage(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Stage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_session(&self) -> Result> { + }} + #[inline] pub fn get_session(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Session)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_continue_finding_items_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_continue_finding_items_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContinueFindingItemsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_continue_importing_items_async(&self) -> Result>> { + }} + #[inline] pub fn get_continue_importing_items_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContinueImportingItemsAsync)(self as *const _ as *mut _, &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(&self) -> Result>> { + }} + #[inline] pub fn get_continue_deleting_imported_items_from_source_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContinueDeletingImportedItemsFromSourceAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PhotoImportOperation: IPhotoImportOperation} RT_ENUM! { enum PhotoImportPowerSource: i32 { @@ -16906,11 +16906,11 @@ RT_INTERFACE!{interface IPhotoImportSelectionChangedEventArgs(IPhotoImportSelect fn get_IsSelectionEmpty(&self, out: *mut bool) -> HRESULT }} impl IPhotoImportSelectionChangedEventArgs { - #[inline] pub unsafe fn get_is_selection_empty(&self) -> Result { + #[inline] pub fn get_is_selection_empty(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSelectionEmpty)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PhotoImportSelectionChangedEventArgs: IPhotoImportSelectionChangedEventArgs} DEFINE_IID!(IID_IPhotoImportSession, 2858652014, 60635, 20222, 148, 198, 95, 92, 175, 227, 76, 251); @@ -16927,60 +16927,60 @@ RT_INTERFACE!{interface IPhotoImportSession(IPhotoImportSessionVtbl): IInspectab fn get_SubfolderCreationMode(&self, out: *mut PhotoImportSubfolderCreationMode) -> HRESULT, fn put_DestinationFileNamePrefix(&self, value: HSTRING) -> HRESULT, fn get_DestinationFileNamePrefix(&self, out: *mut HSTRING) -> HRESULT, - fn FindItemsAsync(&self, contentTypeFilter: PhotoImportContentTypeFilter, itemSelectionMode: PhotoImportItemSelectionMode, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT + fn FindItemsAsync(&self, contentTypeFilter: PhotoImportContentTypeFilter, itemSelectionMode: PhotoImportItemSelectionMode, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT }} impl IPhotoImportSession { - #[inline] pub unsafe fn get_source(&self) -> Result> { + #[inline] pub fn get_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Source)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_session_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_session_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SessionId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn set_destination_folder(&self, value: &super::super::storage::IStorageFolder) -> Result<()> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_destination_folder(&self, value: &super::super::storage::IStorageFolder) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DestinationFolder)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_destination_folder(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_destination_folder(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DestinationFolder)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_append_session_date_to_destination_folder(&self, value: bool) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_append_session_date_to_destination_folder(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AppendSessionDateToDestinationFolder)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_append_session_date_to_destination_folder(&self) -> Result { + }} + #[inline] pub fn get_append_session_date_to_destination_folder(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AppendSessionDateToDestinationFolder)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_subfolder_creation_mode(&self, value: PhotoImportSubfolderCreationMode) -> Result<()> { + }} + #[inline] pub fn set_subfolder_creation_mode(&self, value: PhotoImportSubfolderCreationMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SubfolderCreationMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_subfolder_creation_mode(&self) -> Result { + }} + #[inline] pub fn get_subfolder_creation_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SubfolderCreationMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_destination_file_name_prefix(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_destination_file_name_prefix(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DestinationFileNamePrefix)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_destination_file_name_prefix(&self) -> Result { + }} + #[inline] pub fn get_destination_file_name_prefix(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DestinationFileNamePrefix)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_items_async(&self, contentTypeFilter: PhotoImportContentTypeFilter, itemSelectionMode: PhotoImportItemSelectionMode) -> Result>> { + }} + #[inline] pub fn find_items_async(&self, contentTypeFilter: PhotoImportContentTypeFilter, itemSelectionMode: PhotoImportItemSelectionMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindItemsAsync)(self as *const _ as *mut _, contentTypeFilter, itemSelectionMode, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PhotoImportSession: IPhotoImportSession} DEFINE_IID!(IID_IPhotoImportSession2, 710043408, 16070, 18077, 163, 117, 43, 159, 71, 133, 57, 30); @@ -16991,47 +16991,47 @@ RT_INTERFACE!{interface IPhotoImportSession2(IPhotoImportSession2Vtbl): IInspect fn get_RememberDeselectedItems(&self, out: *mut bool) -> HRESULT }} impl IPhotoImportSession2 { - #[inline] pub unsafe fn set_subfolder_date_format(&self, value: PhotoImportSubfolderDateFormat) -> Result<()> { + #[inline] pub fn set_subfolder_date_format(&self, value: PhotoImportSubfolderDateFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SubfolderDateFormat)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_subfolder_date_format(&self) -> Result { + }} + #[inline] pub fn get_subfolder_date_format(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SubfolderDateFormat)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_remember_deselected_items(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_remember_deselected_items(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RememberDeselectedItems)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_remember_deselected_items(&self) -> Result { + }} + #[inline] pub fn get_remember_deselected_items(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RememberDeselectedItems)(self as *const _ as *mut _, &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(&self, out: *mut HSTRING) -> HRESULT, fn get_SizeInBytes(&self, out: *mut u64) -> HRESULT, - fn get_Date(&self, out: *mut super::super::foundation::DateTime) -> HRESULT + fn get_Date(&self, out: *mut foundation::DateTime) -> HRESULT }} impl IPhotoImportSidecar { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_date(&self) -> Result { + }} + #[inline] pub fn get_date(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Date)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PhotoImportSidecar: IPhotoImportSidecar} DEFINE_IID!(IID_IPhotoImportSource, 529441630, 5211, 19670, 135, 241, 84, 150, 90, 152, 47, 239); @@ -17046,129 +17046,129 @@ RT_INTERFACE!{interface IPhotoImportSource(IPhotoImportSourceVtbl): IInspectable fn get_ConnectionTransport(&self, out: *mut PhotoImportConnectionTransport) -> HRESULT, fn get_Type(&self, out: *mut PhotoImportSourceType) -> HRESULT, fn get_PowerSource(&self, out: *mut PhotoImportPowerSource) -> HRESULT, - fn get_BatteryLevelPercent(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_DateTime(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_StorageMedia(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_IsLocked(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_BatteryLevelPercent(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_DateTime(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_StorageMedia(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_IsLocked(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn get_IsMassStorage(&self, out: *mut bool) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy15(&self) -> (), #[cfg(feature="windows-storage")] fn get_Thumbnail(&self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, fn CreateImportSession(&self, out: *mut *mut PhotoImportSession) -> HRESULT }} impl IPhotoImportSource { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_description(&self) -> Result { + }} + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_manufacturer(&self) -> Result { + }} + #[inline] pub fn get_manufacturer(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Manufacturer)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_model(&self) -> Result { + }} + #[inline] pub fn get_model(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Model)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_serial_number(&self) -> Result { + }} + #[inline] pub fn get_serial_number(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SerialNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_connection_protocol(&self) -> Result { + }} + #[inline] pub fn get_connection_protocol(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ConnectionProtocol)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_connection_transport(&self) -> Result { + }} + #[inline] pub fn get_connection_transport(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ConnectionTransport)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_type(&self) -> Result { + }} + #[inline] pub fn get_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Type)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_power_source(&self) -> Result { + }} + #[inline] pub fn get_power_source(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PowerSource)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_battery_level_percent(&self) -> Result>> { + }} + #[inline] pub fn get_battery_level_percent(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BatteryLevelPercent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_date_time(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_date_time(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DateTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_storage_media(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_storage_media(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StorageMedia)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_locked(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_locked(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsLocked)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_mass_storage(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_mass_storage(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsMassStorage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_thumbnail(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_thumbnail(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Thumbnail)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_import_session(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_import_session(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateImportSession)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PhotoImportSource: IPhotoImportSource} impl RtActivatable for PhotoImportSource {} impl PhotoImportSource { - #[inline] pub fn from_id_async(sourceId: &HStringArg) -> Result>> { unsafe { + #[inline] pub fn from_id_async(sourceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id_async(sourceId) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn from_folder_async(sourceRootFolder: &super::super::storage::IStorageFolder) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn from_folder_async(sourceRootFolder: &super::super::storage::IStorageFolder) -> Result>> { >::get_activation_factory().from_folder_async(sourceRootFolder) - }} + } } DEFINE_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]) [CLSID_PhotoImportSource]); 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(&self, sourceId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn FromFolderAsync(&self, sourceRootFolder: *mut super::super::storage::IStorageFolder, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn FromIdAsync(&self, sourceId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn FromFolderAsync(&self, sourceRootFolder: *mut super::super::storage::IStorageFolder, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IPhotoImportSourceStatics { - #[inline] pub unsafe fn from_id_async(&self, sourceId: &HStringArg) -> Result>> { + #[inline] pub fn from_id_async(&self, sourceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromIdAsync)(self as *const _ as *mut _, 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(&self, sourceRootFolder: &super::super::storage::IStorageFolder) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn from_folder_async(&self, sourceRootFolder: &super::super::storage::IStorageFolder) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromFolderAsync)(self as *const _ as *mut _, sourceRootFolder as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -17188,45 +17188,45 @@ RT_INTERFACE!{interface IPhotoImportStorageMedium(IPhotoImportStorageMediumVtbl) fn Refresh(&self) -> HRESULT }} impl IPhotoImportStorageMedium { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_description(&self) -> Result { + }} + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_serial_number(&self) -> Result { + }} + #[inline] pub fn get_serial_number(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SerialNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_storage_medium_type(&self) -> Result { + }} + #[inline] pub fn get_storage_medium_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StorageMediumType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_access_mode(&self) -> Result { + }} + #[inline] pub fn get_supported_access_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SupportedAccessMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_capacity_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_capacity_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CapacityInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_available_space_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_available_space_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AvailableSpaceInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn refresh(&self) -> Result<()> { + }} + #[inline] pub fn refresh(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Refresh)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PhotoImportStorageMedium: IPhotoImportStorageMedium} RT_ENUM! { enum PhotoImportStorageMediumType: i32 { @@ -17242,36 +17242,36 @@ DEFINE_IID!(IID_IPhotoImportVideoSegment, 1648099977, 12826, 16856, 145, 102, 14 RT_INTERFACE!{interface IPhotoImportVideoSegment(IPhotoImportVideoSegmentVtbl): IInspectable(IInspectableVtbl) [IID_IPhotoImportVideoSegment] { fn get_Name(&self, out: *mut HSTRING) -> HRESULT, fn get_SizeInBytes(&self, out: *mut u64) -> HRESULT, - fn get_Date(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Date(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_Sibling(&self, out: *mut *mut PhotoImportSidecar) -> HRESULT, - fn get_Sidecars(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_Sidecars(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IPhotoImportVideoSegment { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_date(&self) -> Result { + }} + #[inline] pub fn get_date(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Date)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sibling(&self) -> Result> { + }} + #[inline] pub fn get_sibling(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Sibling)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sidecars(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_sidecars(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Sidecars)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PhotoImportVideoSegment: IPhotoImportVideoSegment} } // Windows.Media.Import @@ -17280,46 +17280,46 @@ use ::prelude::*; 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(&self) -> (), - #[cfg(feature="windows-graphics")] fn RecognizeAsync(&self, bitmap: *mut super::super::graphics::imaging::SoftwareBitmap, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-graphics")] fn RecognizeAsync(&self, bitmap: *mut super::super::graphics::imaging::SoftwareBitmap, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(feature="windows-globalization")] fn get_RecognizerLanguage(&self, out: *mut *mut super::super::globalization::Language) -> HRESULT }} impl IOcrEngine { - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn recognize_async(&self, bitmap: &super::super::graphics::imaging::SoftwareBitmap) -> Result>> { + #[cfg(feature="windows-graphics")] #[inline] pub fn recognize_async(&self, bitmap: &super::super::graphics::imaging::SoftwareBitmap) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RecognizeAsync)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[cfg(feature="windows-globalization")] #[inline] pub fn get_recognizer_language(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RecognizerLanguage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class OcrEngine: IOcrEngine} impl RtActivatable for OcrEngine {} impl OcrEngine { - #[inline] pub fn get_max_image_dimension() -> Result { unsafe { + #[inline] pub fn get_max_image_dimension() -> Result { >::get_activation_factory().get_max_image_dimension() - }} - #[cfg(feature="windows-globalization")] #[inline] pub fn get_available_recognizer_languages() -> Result>> { unsafe { + } + #[cfg(feature="windows-globalization")] #[inline] pub fn get_available_recognizer_languages() -> Result>>> { >::get_activation_factory().get_available_recognizer_languages() - }} - #[cfg(feature="windows-globalization")] #[inline] pub fn is_language_supported(language: &super::super::globalization::Language) -> Result { unsafe { + } + #[cfg(feature="windows-globalization")] #[inline] pub fn is_language_supported(language: &super::super::globalization::Language) -> Result { >::get_activation_factory().is_language_supported(language) - }} - #[cfg(feature="windows-globalization")] #[inline] pub fn try_create_from_language(language: &super::super::globalization::Language) -> Result> { unsafe { + } + #[cfg(feature="windows-globalization")] #[inline] pub fn try_create_from_language(language: &super::super::globalization::Language) -> Result>> { >::get_activation_factory().try_create_from_language(language) - }} - #[inline] pub fn try_create_from_user_profile_languages() -> Result> { unsafe { + } + #[inline] pub fn try_create_from_user_profile_languages() -> Result>> { >::get_activation_factory().try_create_from_user_profile_languages() - }} + } } DEFINE_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]) [CLSID_OcrEngine]); 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(&self, out: *mut u32) -> HRESULT, #[cfg(not(feature="windows-globalization"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-globalization")] fn get_AvailableRecognizerLanguages(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + #[cfg(feature="windows-globalization")] fn get_AvailableRecognizerLanguages(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, #[cfg(not(feature="windows-globalization"))] fn __Dummy2(&self) -> (), #[cfg(feature="windows-globalization")] fn IsLanguageSupported(&self, language: *mut super::super::globalization::Language, out: *mut bool) -> HRESULT, #[cfg(not(feature="windows-globalization"))] fn __Dummy3(&self) -> (), @@ -17327,90 +17327,90 @@ RT_INTERFACE!{static interface IOcrEngineStatics(IOcrEngineStaticsVtbl): IInspec fn TryCreateFromUserProfileLanguages(&self, out: *mut *mut OcrEngine) -> HRESULT }} impl IOcrEngineStatics { - #[inline] pub unsafe fn get_max_image_dimension(&self) -> Result { + #[inline] pub fn get_max_image_dimension(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxImageDimension)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-globalization")] #[inline] pub unsafe fn get_available_recognizer_languages(&self) -> Result>> { + }} + #[cfg(feature="windows-globalization")] #[inline] pub fn get_available_recognizer_languages(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AvailableRecognizerLanguages)(self 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 is_language_supported(&self, language: &super::super::globalization::Language) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-globalization")] #[inline] pub fn is_language_supported(&self, language: &super::super::globalization::Language) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsLanguageSupported)(self as *const _ as *mut _, 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(&self, language: &super::super::globalization::Language) -> Result> { + }} + #[cfg(feature="windows-globalization")] #[inline] pub fn try_create_from_language(&self, language: &super::super::globalization::Language) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryCreateFromLanguage)(self 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 try_create_from_user_profile_languages(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn try_create_from_user_profile_languages(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryCreateFromUserProfileLanguages)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Words(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_Text(&self, out: *mut HSTRING) -> HRESULT }} impl IOcrLine { - #[inline] pub unsafe fn get_words(&self) -> Result>> { + #[inline] pub fn get_words(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Words)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_text(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Text)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class OcrLine: IOcrLine} 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_TextAngle(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_Lines(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_TextAngle(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn get_Text(&self, out: *mut HSTRING) -> HRESULT }} impl IOcrResult { - #[inline] pub unsafe fn get_lines(&self) -> Result>> { + #[inline] pub fn get_lines(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Lines)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_text_angle(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_text_angle(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TextAngle)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_text(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Text)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class OcrResult: IOcrResult} 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(&self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn get_BoundingRect(&self, out: *mut foundation::Rect) -> HRESULT, fn get_Text(&self, out: *mut HSTRING) -> HRESULT }} impl IOcrWord { - #[inline] pub unsafe fn get_bounding_rect(&self) -> Result { + #[inline] pub fn get_bounding_rect(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BoundingRect)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_text(&self) -> Result { + }} + #[inline] pub fn get_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Text)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class OcrWord: IOcrWord} } // Windows.Media.Ocr @@ -17422,88 +17422,88 @@ RT_ENUM! { enum AutoLoadedDisplayPropertyKind: i32 { RT_CLASS!{static class BackgroundMediaPlayer} impl RtActivatable for BackgroundMediaPlayer {} impl BackgroundMediaPlayer { - #[inline] pub fn get_current() -> Result> { unsafe { + #[inline] pub fn get_current() -> Result>> { >::get_activation_factory().get_current() - }} - #[inline] pub fn add_message_received_from_background(value: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_message_received_from_background(value: &foundation::EventHandler) -> Result { >::get_activation_factory().add_message_received_from_background(value) - }} - #[inline] pub fn remove_message_received_from_background(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_message_received_from_background(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_message_received_from_background(token) - }} - #[inline] pub fn add_message_received_from_foreground(value: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_message_received_from_foreground(value: &foundation::EventHandler) -> Result { >::get_activation_factory().add_message_received_from_foreground(value) - }} - #[inline] pub fn remove_message_received_from_foreground(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_message_received_from_foreground(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_message_received_from_foreground(token) - }} - #[inline] pub fn send_message_to_background(value: &super::super::foundation::collections::ValueSet) -> Result<()> { unsafe { + } + #[inline] pub fn send_message_to_background(value: &foundation::collections::ValueSet) -> Result<()> { >::get_activation_factory().send_message_to_background(value) - }} - #[inline] pub fn send_message_to_foreground(value: &super::super::foundation::collections::ValueSet) -> Result<()> { unsafe { + } + #[inline] pub fn send_message_to_foreground(value: &foundation::collections::ValueSet) -> Result<()> { >::get_activation_factory().send_message_to_foreground(value) - }} - #[inline] pub fn is_media_playing() -> Result { unsafe { + } + #[inline] pub fn is_media_playing() -> Result { >::get_activation_factory().is_media_playing() - }} - #[inline] pub fn shutdown() -> Result<()> { unsafe { + } + #[inline] pub fn shutdown() -> Result<()> { >::get_activation_factory().shutdown() - }} + } } DEFINE_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]) [CLSID_BackgroundMediaPlayer]); 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(&self, out: *mut *mut MediaPlayer) -> HRESULT, - fn add_MessageReceivedFromBackground(&self, value: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_MessageReceivedFromBackground(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_MessageReceivedFromForeground(&self, value: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_MessageReceivedFromForeground(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn SendMessageToBackground(&self, value: *mut super::super::foundation::collections::ValueSet) -> HRESULT, - fn SendMessageToForeground(&self, value: *mut super::super::foundation::collections::ValueSet) -> HRESULT, + fn add_MessageReceivedFromBackground(&self, value: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_MessageReceivedFromBackground(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_MessageReceivedFromForeground(&self, value: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_MessageReceivedFromForeground(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn SendMessageToBackground(&self, value: *mut foundation::collections::ValueSet) -> HRESULT, + fn SendMessageToForeground(&self, value: *mut foundation::collections::ValueSet) -> HRESULT, fn IsMediaPlaying(&self, out: *mut bool) -> HRESULT, fn Shutdown(&self) -> HRESULT }} impl IBackgroundMediaPlayerStatics { - #[inline] pub unsafe fn get_current(&self) -> Result> { + #[inline] pub fn get_current(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Current)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_message_received_from_background(&self, value: &super::super::foundation::EventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_message_received_from_background(&self, value: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_MessageReceivedFromBackground)(self as *const _ as *mut _, 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(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_message_received_from_background(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_MessageReceivedFromBackground)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_message_received_from_foreground(&self, value: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_message_received_from_foreground(&self, value: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_MessageReceivedFromForeground)(self as *const _ as *mut _, 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(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_message_received_from_foreground(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_MessageReceivedFromForeground)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn send_message_to_background(&self, value: &super::super::foundation::collections::ValueSet) -> Result<()> { + }} + #[inline] pub fn send_message_to_background(&self, value: &foundation::collections::ValueSet) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SendMessageToBackground)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn send_message_to_foreground(&self, value: &super::super::foundation::collections::ValueSet) -> Result<()> { + }} + #[inline] pub fn send_message_to_foreground(&self, value: &foundation::collections::ValueSet) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SendMessageToForeground)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn is_media_playing(&self) -> Result { + }} + #[inline] pub fn is_media_playing(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsMediaPlaying)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn shutdown(&self) -> Result<()> { + }} + #[inline] pub fn shutdown(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Shutdown)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ICurrentMediaPlaybackItemChangedEventArgs, 390310034, 23619, 18965, 150, 122, 87, 45, 45, 15, 38, 198); RT_INTERFACE!{interface ICurrentMediaPlaybackItemChangedEventArgs(ICurrentMediaPlaybackItemChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICurrentMediaPlaybackItemChangedEventArgs] { @@ -17511,16 +17511,16 @@ RT_INTERFACE!{interface ICurrentMediaPlaybackItemChangedEventArgs(ICurrentMediaP fn get_OldItem(&self, out: *mut *mut MediaPlaybackItem) -> HRESULT }} impl ICurrentMediaPlaybackItemChangedEventArgs { - #[inline] pub unsafe fn get_new_item(&self) -> Result> { + #[inline] pub fn get_new_item(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NewItem)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_old_item(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_old_item(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OldItem)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CurrentMediaPlaybackItemChangedEventArgs: ICurrentMediaPlaybackItemChangedEventArgs} DEFINE_IID!(IID_ICurrentMediaPlaybackItemChangedEventArgs2, 494970142, 39278, 16553, 190, 72, 230, 110, 201, 11, 43, 125); @@ -17528,11 +17528,11 @@ RT_INTERFACE!{interface ICurrentMediaPlaybackItemChangedEventArgs2(ICurrentMedia fn get_Reason(&self, out: *mut MediaPlaybackItemChangedReason) -> HRESULT }} impl ICurrentMediaPlaybackItemChangedEventArgs2 { - #[inline] pub unsafe fn get_reason(&self) -> Result { + #[inline] pub fn get_reason(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Reason)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum FailedMediaStreamKind: i32 { Unknown (FailedMediaStreamKind_Unknown) = 0, Audio (FailedMediaStreamKind_Audio) = 1, Video (FailedMediaStreamKind_Video) = 2, @@ -17540,52 +17540,52 @@ RT_ENUM! { enum FailedMediaStreamKind: i32 { 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(&self, out: *mut *mut MediaPlaybackList) -> HRESULT, - fn get_PresentationPosition(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_PresentationPosition(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn get_InsertionMethod(&self, out: *mut MediaBreakInsertionMethod) -> HRESULT, - fn get_CustomProperties(&self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT, + fn get_CustomProperties(&self, out: *mut *mut foundation::collections::ValueSet) -> HRESULT, fn get_CanStart(&self, out: *mut bool) -> HRESULT, fn put_CanStart(&self, value: bool) -> HRESULT }} impl IMediaBreak { - #[inline] pub unsafe fn get_playback_list(&self) -> Result> { + #[inline] pub fn get_playback_list(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PlaybackList)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_presentation_position(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_presentation_position(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PresentationPosition)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_insertion_method(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_insertion_method(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InsertionMethod)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_custom_properties(&self) -> Result> { + }} + #[inline] pub fn get_custom_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CustomProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_start(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_can_start(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanStart)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_start(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_start(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanStart)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MediaBreak: IMediaBreak} impl RtActivatable for MediaBreak {} impl MediaBreak { - #[inline] pub fn create(insertionMethod: MediaBreakInsertionMethod) -> Result> { unsafe { + #[inline] pub fn create(insertionMethod: MediaBreakInsertionMethod) -> Result> { >::get_activation_factory().create(insertionMethod) - }} - #[inline] pub fn create_with_presentation_position(insertionMethod: MediaBreakInsertionMethod, presentationPosition: super::super::foundation::TimeSpan) -> Result> { unsafe { + } + #[inline] pub fn create_with_presentation_position(insertionMethod: MediaBreakInsertionMethod, presentationPosition: foundation::TimeSpan) -> Result> { >::get_activation_factory().create_with_presentation_position(insertionMethod, presentationPosition) - }} + } } DEFINE_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]) [CLSID_MediaBreak]); DEFINE_IID!(IID_IMediaBreakEndedEventArgs, 850997878, 7261, 20462, 135, 50, 35, 109, 195, 168, 133, 128); @@ -17593,112 +17593,112 @@ RT_INTERFACE!{interface IMediaBreakEndedEventArgs(IMediaBreakEndedEventArgsVtbl) fn get_MediaBreak(&self, out: *mut *mut MediaBreak) -> HRESULT }} impl IMediaBreakEndedEventArgs { - #[inline] pub unsafe fn get_media_break(&self) -> Result> { + #[inline] pub fn get_media_break(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MediaBreak)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaBreakEndedEventArgs: IMediaBreakEndedEventArgs} 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(&self, insertionMethod: MediaBreakInsertionMethod, out: *mut *mut MediaBreak) -> HRESULT, - fn CreateWithPresentationPosition(&self, insertionMethod: MediaBreakInsertionMethod, presentationPosition: super::super::foundation::TimeSpan, out: *mut *mut MediaBreak) -> HRESULT + fn CreateWithPresentationPosition(&self, insertionMethod: MediaBreakInsertionMethod, presentationPosition: foundation::TimeSpan, out: *mut *mut MediaBreak) -> HRESULT }} impl IMediaBreakFactory { - #[inline] pub unsafe fn create(&self, insertionMethod: MediaBreakInsertionMethod) -> Result> { + #[inline] pub fn create(&self, insertionMethod: MediaBreakInsertionMethod) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, insertionMethod, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_presentation_position(&self, insertionMethod: MediaBreakInsertionMethod, presentationPosition: super::super::foundation::TimeSpan) -> Result> { + }} + #[inline] pub fn create_with_presentation_position(&self, insertionMethod: MediaBreakInsertionMethod, presentationPosition: foundation::TimeSpan) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithPresentationPosition)(self as *const _ as *mut _, insertionMethod, presentationPosition, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum MediaBreakInsertionMethod: i32 { Interrupt (MediaBreakInsertionMethod_Interrupt) = 0, Replace (MediaBreakInsertionMethod_Replace) = 1, }} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_BreaksSeekedOver(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_BreakStarted(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_BreakStarted(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_BreakEnded(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_BreakEnded(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_BreakSkipped(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_BreakSkipped(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_BreaksSeekedOver(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_BreaksSeekedOver(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_BreakStarted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_BreakStarted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_BreakEnded(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_BreakEnded(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_BreakSkipped(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_BreakSkipped(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_CurrentBreak(&self, out: *mut *mut MediaBreak) -> HRESULT, fn get_PlaybackSession(&self, out: *mut *mut MediaPlaybackSession) -> HRESULT, fn PlayBreak(&self, value: *mut MediaBreak) -> HRESULT, fn SkipCurrentBreak(&self) -> HRESULT }} impl IMediaBreakManager { - #[inline] pub unsafe fn add_breaks_seeked_over(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_breaks_seeked_over(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_BreaksSeekedOver)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_breaks_seeked_over(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_breaks_seeked_over(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_BreaksSeekedOver)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_break_started(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_break_started(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_BreakStarted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_break_started(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_break_started(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_BreakStarted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_break_ended(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_break_ended(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_BreakEnded)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_break_ended(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_break_ended(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_BreakEnded)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_break_skipped(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_break_skipped(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_BreakSkipped)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_break_skipped(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_break_skipped(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_BreakSkipped)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_break(&self) -> Result> { + }} + #[inline] pub fn get_current_break(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CurrentBreak)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_playback_session(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_playback_session(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PlaybackSession)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn play_break(&self, value: &MediaBreak) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn play_break(&self, value: &MediaBreak) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).PlayBreak)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn skip_current_break(&self) -> Result<()> { + }} + #[inline] pub fn skip_current_break(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SkipCurrentBreak)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MediaBreakManager: IMediaBreakManager} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ScheduleChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ScheduleChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ScheduleChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn InsertMidrollBreak(&self, mediaBreak: *mut MediaBreak) -> HRESULT, fn RemoveMidrollBreak(&self, mediaBreak: *mut MediaBreak) -> HRESULT, - fn get_MidrollBreaks(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_MidrollBreaks(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn put_PrerollBreak(&self, value: *mut MediaBreak) -> HRESULT, fn get_PrerollBreak(&self, out: *mut *mut MediaBreak) -> HRESULT, fn put_PostrollBreak(&self, value: *mut MediaBreak) -> HRESULT, @@ -17706,75 +17706,75 @@ RT_INTERFACE!{interface IMediaBreakSchedule(IMediaBreakScheduleVtbl): IInspectab fn get_PlaybackItem(&self, out: *mut *mut MediaPlaybackItem) -> HRESULT }} impl IMediaBreakSchedule { - #[inline] pub unsafe fn add_schedule_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_schedule_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ScheduleChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_schedule_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_schedule_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ScheduleChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn insert_midroll_break(&self, mediaBreak: &MediaBreak) -> Result<()> { + }} + #[inline] pub fn insert_midroll_break(&self, mediaBreak: &MediaBreak) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InsertMidrollBreak)(self as *const _ as *mut _, mediaBreak as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove_midroll_break(&self, mediaBreak: &MediaBreak) -> Result<()> { + }} + #[inline] pub fn remove_midroll_break(&self, mediaBreak: &MediaBreak) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveMidrollBreak)(self as *const _ as *mut _, mediaBreak as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_midroll_breaks(&self) -> Result>> { + }} + #[inline] pub fn get_midroll_breaks(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MidrollBreaks)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_preroll_break(&self, value: &MediaBreak) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_preroll_break(&self, value: &MediaBreak) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PrerollBreak)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_preroll_break(&self) -> Result> { + }} + #[inline] pub fn get_preroll_break(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PrerollBreak)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_postroll_break(&self, value: &MediaBreak) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_postroll_break(&self, value: &MediaBreak) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PostrollBreak)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_postroll_break(&self) -> Result> { + }} + #[inline] pub fn get_postroll_break(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PostrollBreak)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_playback_item(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_playback_item(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PlaybackItem)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaBreakSchedule: IMediaBreakSchedule} 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_OldPosition(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn get_NewPosition(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + fn get_SeekedOverBreaks(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_OldPosition(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_NewPosition(&self, out: *mut foundation::TimeSpan) -> HRESULT }} impl IMediaBreakSeekedOverEventArgs { - #[inline] pub unsafe fn get_seeked_over_breaks(&self) -> Result>> { + #[inline] pub fn get_seeked_over_breaks(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SeekedOverBreaks)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_old_position(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_old_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OldPosition)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_new_position(&self) -> Result { + }} + #[inline] pub fn get_new_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NewPosition)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MediaBreakSeekedOverEventArgs: IMediaBreakSeekedOverEventArgs} DEFINE_IID!(IID_IMediaBreakSkippedEventArgs, 1860783109, 12116, 19006, 163, 171, 36, 195, 178, 112, 180, 163); @@ -17782,11 +17782,11 @@ RT_INTERFACE!{interface IMediaBreakSkippedEventArgs(IMediaBreakSkippedEventArgsV fn get_MediaBreak(&self, out: *mut *mut MediaBreak) -> HRESULT }} impl IMediaBreakSkippedEventArgs { - #[inline] pub unsafe fn get_media_break(&self) -> Result> { + #[inline] pub fn get_media_break(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MediaBreak)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaBreakSkippedEventArgs: IMediaBreakSkippedEventArgs} DEFINE_IID!(IID_IMediaBreakStartedEventArgs, 2826894961, 57300, 17738, 149, 110, 10, 74, 100, 131, 149, 248); @@ -17794,11 +17794,11 @@ RT_INTERFACE!{interface IMediaBreakStartedEventArgs(IMediaBreakStartedEventArgsV fn get_MediaBreak(&self, out: *mut *mut MediaBreak) -> HRESULT }} impl IMediaBreakStartedEventArgs { - #[inline] pub unsafe fn get_media_break(&self) -> Result> { + #[inline] pub fn get_media_break(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MediaBreak)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaBreakStartedEventArgs: IMediaBreakStartedEventArgs} RT_ENUM! { enum MediaCommandEnablingRule: i32 { @@ -17810,15 +17810,15 @@ RT_INTERFACE!{interface IMediaEnginePlaybackSource(IMediaEnginePlaybackSourceVtb fn SetPlaybackSource(&self, source: *mut IMediaPlaybackSource) -> HRESULT }} impl IMediaEnginePlaybackSource { - #[inline] pub unsafe fn get_current_item(&self) -> Result> { + #[inline] pub fn get_current_item(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CurrentItem)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_playback_source(&self, source: &IMediaPlaybackSource) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_playback_source(&self, source: &IMediaPlaybackSource) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetPlaybackSource)(self as *const _ as *mut _, source as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMediaItemDisplayProperties, 507255624, 28823, 17284, 162, 23, 193, 41, 29, 250, 140, 22); RT_INTERFACE!{interface IMediaItemDisplayProperties(IMediaItemDisplayPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IMediaItemDisplayProperties] { @@ -17833,41 +17833,41 @@ RT_INTERFACE!{interface IMediaItemDisplayProperties(IMediaItemDisplayPropertiesV fn ClearAll(&self) -> HRESULT }} impl IMediaItemDisplayProperties { - #[inline] pub unsafe fn get_type(&self) -> Result { + #[inline] pub fn get_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Type)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_type(&self, value: super::MediaPlaybackType) -> Result<()> { + }} + #[inline] pub fn set_type(&self, value: super::MediaPlaybackType) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Type)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_music_properties(&self) -> Result> { + }} + #[inline] pub fn get_music_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MusicProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_properties(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_video_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoProperties)(self 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_thumbnail(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_thumbnail(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Thumbnail)(self 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_thumbnail(&self, value: &super::super::storage::streams::RandomAccessStreamReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_thumbnail(&self, value: &super::super::storage::streams::RandomAccessStreamReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Thumbnail)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn clear_all(&self) -> Result<()> { + }} + #[inline] pub fn clear_all(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ClearAll)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MediaItemDisplayProperties: IMediaItemDisplayProperties} -RT_CLASS!{class MediaPlaybackAudioTrackList: super::super::foundation::collections::IVectorView} +RT_CLASS!{class MediaPlaybackAudioTrackList: foundation::collections::IVectorView} 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(&self, out: *mut bool) -> HRESULT, @@ -17883,182 +17883,182 @@ RT_INTERFACE!{interface IMediaPlaybackCommandManager(IMediaPlaybackCommandManage fn get_AutoRepeatModeBehavior(&self, out: *mut *mut MediaPlaybackCommandManagerCommandBehavior) -> HRESULT, fn get_PositionBehavior(&self, out: *mut *mut MediaPlaybackCommandManagerCommandBehavior) -> HRESULT, fn get_RateBehavior(&self, out: *mut *mut MediaPlaybackCommandManagerCommandBehavior) -> HRESULT, - fn add_PlayReceived(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PlayReceived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PauseReceived(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PauseReceived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_NextReceived(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_NextReceived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PreviousReceived(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PreviousReceived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_FastForwardReceived(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_FastForwardReceived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_RewindReceived(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RewindReceived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ShuffleReceived(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ShuffleReceived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_AutoRepeatModeReceived(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AutoRepeatModeReceived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PositionReceived(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PositionReceived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_RateReceived(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RateReceived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_PlayReceived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PlayReceived(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PauseReceived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PauseReceived(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_NextReceived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_NextReceived(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PreviousReceived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PreviousReceived(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_FastForwardReceived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_FastForwardReceived(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_RewindReceived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RewindReceived(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ShuffleReceived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ShuffleReceived(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_AutoRepeatModeReceived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AutoRepeatModeReceived(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PositionReceived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PositionReceived(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_RateReceived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RateReceived(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IMediaPlaybackCommandManager { - #[inline] pub unsafe fn get_is_enabled(&self) -> Result { + #[inline] pub fn get_is_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_media_player(&self) -> Result> { + }} + #[inline] pub fn get_media_player(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MediaPlayer)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_play_behavior(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_play_behavior(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PlayBehavior)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pause_behavior(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_pause_behavior(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PauseBehavior)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_next_behavior(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_next_behavior(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NextBehavior)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_previous_behavior(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_previous_behavior(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PreviousBehavior)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_fast_forward_behavior(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_fast_forward_behavior(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FastForwardBehavior)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rewind_behavior(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_rewind_behavior(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RewindBehavior)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_shuffle_behavior(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_shuffle_behavior(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ShuffleBehavior)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_auto_repeat_mode_behavior(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_auto_repeat_mode_behavior(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AutoRepeatModeBehavior)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_position_behavior(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_position_behavior(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PositionBehavior)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rate_behavior(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_rate_behavior(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RateBehavior)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_play_received(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_play_received(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PlayReceived)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_play_received(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_play_received(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PlayReceived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pause_received(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_pause_received(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PauseReceived)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pause_received(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pause_received(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PauseReceived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_next_received(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_next_received(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_NextReceived)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_next_received(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_next_received(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_NextReceived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_previous_received(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_previous_received(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PreviousReceived)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_previous_received(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_previous_received(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PreviousReceived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_fast_forward_received(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_fast_forward_received(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_FastForwardReceived)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_fast_forward_received(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_fast_forward_received(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_FastForwardReceived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_rewind_received(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_rewind_received(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RewindReceived)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_rewind_received(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_rewind_received(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RewindReceived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_shuffle_received(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_shuffle_received(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ShuffleReceived)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_shuffle_received(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_shuffle_received(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ShuffleReceived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_auto_repeat_mode_received(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_auto_repeat_mode_received(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AutoRepeatModeReceived)(self as *const _ as *mut _, 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(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_auto_repeat_mode_received(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AutoRepeatModeReceived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_position_received(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_position_received(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PositionReceived)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_position_received(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_position_received(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PositionReceived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_rate_received(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_rate_received(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RateReceived)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_rate_received(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_rate_received(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RateReceived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MediaPlaybackCommandManager: IMediaPlaybackCommandManager} DEFINE_IID!(IID_IMediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs, 1030704931, 21040, 17425, 160, 233, 186, 217, 76, 42, 4, 92); @@ -18066,28 +18066,28 @@ RT_INTERFACE!{interface IMediaPlaybackCommandManagerAutoRepeatModeReceivedEventA fn get_Handled(&self, out: *mut bool) -> HRESULT, fn put_Handled(&self, value: bool) -> HRESULT, fn get_AutoRepeatMode(&self, out: *mut super::MediaPlaybackAutoRepeatMode) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IMediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs { - #[inline] pub unsafe fn get_handled(&self) -> Result { + #[inline] pub fn get_handled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Handled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_handled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_handled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Handled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_auto_repeat_mode(&self) -> Result { + }} + #[inline] pub fn get_auto_repeat_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AutoRepeatMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs: IMediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs} DEFINE_IID!(IID_IMediaPlaybackCommandManagerCommandBehavior, 2020351608, 52856, 18960, 175, 214, 132, 63, 203, 185, 12, 46); @@ -18096,182 +18096,182 @@ RT_INTERFACE!{interface IMediaPlaybackCommandManagerCommandBehavior(IMediaPlayba fn get_IsEnabled(&self, out: *mut bool) -> HRESULT, fn get_EnablingRule(&self, out: *mut MediaCommandEnablingRule) -> HRESULT, fn put_EnablingRule(&self, value: MediaCommandEnablingRule) -> HRESULT, - fn add_IsEnabledChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_IsEnabledChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_IsEnabledChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_IsEnabledChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IMediaPlaybackCommandManagerCommandBehavior { - #[inline] pub unsafe fn get_command_manager(&self) -> Result> { + #[inline] pub fn get_command_manager(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CommandManager)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_enabled(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_enabling_rule(&self) -> Result { + }} + #[inline] pub fn get_enabling_rule(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EnablingRule)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_enabling_rule(&self, value: MediaCommandEnablingRule) -> Result<()> { + }} + #[inline] pub fn set_enabling_rule(&self, value: MediaCommandEnablingRule) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_EnablingRule)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_is_enabled_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_is_enabled_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_IsEnabledChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_is_enabled_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_is_enabled_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_IsEnabledChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MediaPlaybackCommandManagerCommandBehavior: IMediaPlaybackCommandManagerCommandBehavior} 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(&self, out: *mut bool) -> HRESULT, fn put_Handled(&self, value: bool) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IMediaPlaybackCommandManagerFastForwardReceivedEventArgs { - #[inline] pub unsafe fn get_handled(&self) -> Result { + #[inline] pub fn get_handled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Handled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_handled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_handled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Handled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaPlaybackCommandManagerFastForwardReceivedEventArgs: IMediaPlaybackCommandManagerFastForwardReceivedEventArgs} 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(&self, out: *mut bool) -> HRESULT, fn put_Handled(&self, value: bool) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IMediaPlaybackCommandManagerNextReceivedEventArgs { - #[inline] pub unsafe fn get_handled(&self) -> Result { + #[inline] pub fn get_handled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Handled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_handled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_handled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Handled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaPlaybackCommandManagerNextReceivedEventArgs: IMediaPlaybackCommandManagerNextReceivedEventArgs} 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(&self, out: *mut bool) -> HRESULT, fn put_Handled(&self, value: bool) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IMediaPlaybackCommandManagerPauseReceivedEventArgs { - #[inline] pub unsafe fn get_handled(&self) -> Result { + #[inline] pub fn get_handled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Handled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_handled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_handled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Handled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaPlaybackCommandManagerPauseReceivedEventArgs: IMediaPlaybackCommandManagerPauseReceivedEventArgs} 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(&self, out: *mut bool) -> HRESULT, fn put_Handled(&self, value: bool) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IMediaPlaybackCommandManagerPlayReceivedEventArgs { - #[inline] pub unsafe fn get_handled(&self) -> Result { + #[inline] pub fn get_handled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Handled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_handled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_handled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Handled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaPlaybackCommandManagerPlayReceivedEventArgs: IMediaPlaybackCommandManagerPlayReceivedEventArgs} 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(&self, out: *mut bool) -> HRESULT, fn put_Handled(&self, value: bool) -> HRESULT, - fn get_Position(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + fn get_Position(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IMediaPlaybackCommandManagerPositionReceivedEventArgs { - #[inline] pub unsafe fn get_handled(&self) -> Result { + #[inline] pub fn get_handled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Handled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_handled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_handled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Handled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_position(&self) -> Result { + }} + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaPlaybackCommandManagerPositionReceivedEventArgs: IMediaPlaybackCommandManagerPositionReceivedEventArgs} 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(&self, out: *mut bool) -> HRESULT, fn put_Handled(&self, value: bool) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IMediaPlaybackCommandManagerPreviousReceivedEventArgs { - #[inline] pub unsafe fn get_handled(&self) -> Result { + #[inline] pub fn get_handled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Handled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_handled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_handled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Handled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaPlaybackCommandManagerPreviousReceivedEventArgs: IMediaPlaybackCommandManagerPreviousReceivedEventArgs} DEFINE_IID!(IID_IMediaPlaybackCommandManagerRateReceivedEventArgs, 418003257, 18966, 16745, 139, 5, 62, 185, 245, 255, 120, 235); @@ -18279,51 +18279,51 @@ RT_INTERFACE!{interface IMediaPlaybackCommandManagerRateReceivedEventArgs(IMedia fn get_Handled(&self, out: *mut bool) -> HRESULT, fn put_Handled(&self, value: bool) -> HRESULT, fn get_PlaybackRate(&self, out: *mut f64) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IMediaPlaybackCommandManagerRateReceivedEventArgs { - #[inline] pub unsafe fn get_handled(&self) -> Result { + #[inline] pub fn get_handled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Handled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_handled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_handled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Handled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_playback_rate(&self) -> Result { + }} + #[inline] pub fn get_playback_rate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PlaybackRate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaPlaybackCommandManagerRateReceivedEventArgs: IMediaPlaybackCommandManagerRateReceivedEventArgs} 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(&self, out: *mut bool) -> HRESULT, fn put_Handled(&self, value: bool) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IMediaPlaybackCommandManagerRewindReceivedEventArgs { - #[inline] pub unsafe fn get_handled(&self) -> Result { + #[inline] pub fn get_handled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Handled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_handled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_handled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Handled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaPlaybackCommandManagerRewindReceivedEventArgs: IMediaPlaybackCommandManagerRewindReceivedEventArgs} DEFINE_IID!(IID_IMediaPlaybackCommandManagerShuffleReceivedEventArgs, 1352686831, 25582, 19094, 183, 181, 254, 224, 139, 159, 249, 12); @@ -18331,155 +18331,155 @@ RT_INTERFACE!{interface IMediaPlaybackCommandManagerShuffleReceivedEventArgs(IMe fn get_Handled(&self, out: *mut bool) -> HRESULT, fn put_Handled(&self, value: bool) -> HRESULT, fn get_IsShuffleRequested(&self, out: *mut bool) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IMediaPlaybackCommandManagerShuffleReceivedEventArgs { - #[inline] pub unsafe fn get_handled(&self) -> Result { + #[inline] pub fn get_handled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Handled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_handled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_handled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Handled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_shuffle_requested(&self) -> Result { + }} + #[inline] pub fn get_is_shuffle_requested(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsShuffleRequested)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaPlaybackCommandManagerShuffleReceivedEventArgs: IMediaPlaybackCommandManagerShuffleReceivedEventArgs} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AudioTracksChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_VideoTracksChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_VideoTracksChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_TimedMetadataTracksChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_TimedMetadataTracksChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_AudioTracksChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AudioTracksChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_VideoTracksChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_VideoTracksChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_TimedMetadataTracksChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_TimedMetadataTracksChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_Source(&self, out: *mut *mut super::core::MediaSource) -> HRESULT, fn get_AudioTracks(&self, out: *mut *mut MediaPlaybackAudioTrackList) -> HRESULT, fn get_VideoTracks(&self, out: *mut *mut MediaPlaybackVideoTrackList) -> HRESULT, fn get_TimedMetadataTracks(&self, out: *mut *mut MediaPlaybackTimedMetadataTrackList) -> HRESULT }} impl IMediaPlaybackItem { - #[inline] pub unsafe fn add_audio_tracks_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_audio_tracks_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AudioTracksChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_audio_tracks_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_audio_tracks_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AudioTracksChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_video_tracks_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_video_tracks_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_VideoTracksChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_video_tracks_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_video_tracks_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_VideoTracksChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_timed_metadata_tracks_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_timed_metadata_tracks_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_TimedMetadataTracksChanged)(self as *const _ as *mut _, 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(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_timed_metadata_tracks_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_TimedMetadataTracksChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_source(&self) -> Result> { + }} + #[inline] pub fn get_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Source)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_tracks(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_audio_tracks(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioTracks)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_tracks(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_video_tracks(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoTracks)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_timed_metadata_tracks(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_timed_metadata_tracks(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TimedMetadataTracks)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaPlaybackItem: IMediaPlaybackItem} impl RtActivatable for MediaPlaybackItem {} impl RtActivatable for MediaPlaybackItem {} impl RtActivatable for MediaPlaybackItem {} impl MediaPlaybackItem { - #[inline] pub fn create(source: &super::core::MediaSource) -> Result> { unsafe { + #[inline] pub fn create(source: &super::core::MediaSource) -> Result> { >::get_activation_factory().create(source) - }} - #[inline] pub fn create_with_start_time(source: &super::core::MediaSource, startTime: super::super::foundation::TimeSpan) -> Result> { unsafe { + } + #[inline] pub fn create_with_start_time(source: &super::core::MediaSource, startTime: foundation::TimeSpan) -> Result> { >::get_activation_factory().create_with_start_time(source, startTime) - }} - #[inline] pub fn create_with_start_time_and_duration_limit(source: &super::core::MediaSource, startTime: super::super::foundation::TimeSpan, durationLimit: super::super::foundation::TimeSpan) -> Result> { unsafe { + } + #[inline] pub fn create_with_start_time_and_duration_limit(source: &super::core::MediaSource, startTime: foundation::TimeSpan, durationLimit: foundation::TimeSpan) -> Result> { >::get_activation_factory().create_with_start_time_and_duration_limit(source, startTime, durationLimit) - }} - #[inline] pub fn find_from_media_source(source: &super::core::MediaSource) -> Result> { unsafe { + } + #[inline] pub fn find_from_media_source(source: &super::core::MediaSource) -> Result>> { >::get_activation_factory().find_from_media_source(source) - }} + } } DEFINE_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]) [CLSID_MediaPlaybackItem]); 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(&self, out: *mut *mut MediaBreakSchedule) -> HRESULT, - fn get_StartTime(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn get_DurationLimit(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_StartTime(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_DurationLimit(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn get_CanSkip(&self, out: *mut bool) -> HRESULT, fn put_CanSkip(&self, value: bool) -> HRESULT, fn GetDisplayProperties(&self, out: *mut *mut MediaItemDisplayProperties) -> HRESULT, fn ApplyDisplayProperties(&self, value: *mut MediaItemDisplayProperties) -> HRESULT }} impl IMediaPlaybackItem2 { - #[inline] pub unsafe fn get_break_schedule(&self) -> Result> { + #[inline] pub fn get_break_schedule(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BreakSchedule)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_start_time(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_start_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StartTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_duration_limit(&self) -> Result>> { + }} + #[inline] pub fn get_duration_limit(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DurationLimit)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_skip(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_can_skip(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanSkip)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_skip(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_skip(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanSkip)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_properties(&self) -> Result> { + }} + #[inline] pub fn get_display_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDisplayProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn apply_display_properties(&self, value: &MediaItemDisplayProperties) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn apply_display_properties(&self, value: &MediaItemDisplayProperties) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ApplyDisplayProperties)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMediaPlaybackItem3, 221413920, 47114, 19721, 159, 248, 248, 112, 148, 161, 200, 49); RT_INTERFACE!{interface IMediaPlaybackItem3(IMediaPlaybackItem3Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlaybackItem3] { @@ -18490,29 +18490,29 @@ RT_INTERFACE!{interface IMediaPlaybackItem3(IMediaPlaybackItem3Vtbl): IInspectab fn put_AutoLoadedDisplayProperties(&self, value: AutoLoadedDisplayPropertyKind) -> HRESULT }} impl IMediaPlaybackItem3 { - #[inline] pub unsafe fn get_is_disabled_in_playback_list(&self) -> Result { + #[inline] pub fn get_is_disabled_in_playback_list(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDisabledInPlaybackList)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_disabled_in_playback_list(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_disabled_in_playback_list(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsDisabledInPlaybackList)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_total_download_progress(&self) -> Result { + }} + #[inline] pub fn get_total_download_progress(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TotalDownloadProgress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_auto_loaded_display_properties(&self) -> Result { + }} + #[inline] pub fn get_auto_loaded_display_properties(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AutoLoadedDisplayProperties)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_auto_loaded_display_properties(&self, value: AutoLoadedDisplayPropertyKind) -> Result<()> { + }} + #[inline] pub fn set_auto_loaded_display_properties(&self, value: AutoLoadedDisplayPropertyKind) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AutoLoadedDisplayProperties)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum MediaPlaybackItemChangedReason: i32 { InitialItem (MediaPlaybackItemChangedReason_InitialItem) = 0, EndOfStream (MediaPlaybackItemChangedReason_EndOfStream) = 1, Error (MediaPlaybackItemChangedReason_Error) = 2, AppRequested (MediaPlaybackItemChangedReason_AppRequested) = 3, @@ -18520,19 +18520,19 @@ RT_ENUM! { enum MediaPlaybackItemChangedReason: i32 { 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(&self, out: *mut MediaPlaybackItemErrorCode) -> HRESULT, - fn get_ExtendedError(&self, out: *mut super::super::foundation::HResult) -> HRESULT + fn get_ExtendedError(&self, out: *mut foundation::HResult) -> HRESULT }} impl IMediaPlaybackItemError { - #[inline] pub unsafe fn get_error_code(&self) -> Result { + #[inline] pub fn get_error_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ErrorCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_error(&self) -> Result { + }} + #[inline] pub fn get_extended_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MediaPlaybackItemError: IMediaPlaybackItemError} RT_ENUM! { enum MediaPlaybackItemErrorCode: i32 { @@ -18543,28 +18543,28 @@ RT_INTERFACE!{static interface IMediaPlaybackItemFactory(IMediaPlaybackItemFacto fn Create(&self, source: *mut super::core::MediaSource, out: *mut *mut MediaPlaybackItem) -> HRESULT }} impl IMediaPlaybackItemFactory { - #[inline] pub unsafe fn create(&self, source: &super::core::MediaSource) -> Result> { + #[inline] pub fn create(&self, source: &super::core::MediaSource) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, 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(&self, source: *mut super::core::MediaSource, startTime: super::super::foundation::TimeSpan, out: *mut *mut MediaPlaybackItem) -> HRESULT, - fn CreateWithStartTimeAndDurationLimit(&self, source: *mut super::core::MediaSource, startTime: super::super::foundation::TimeSpan, durationLimit: super::super::foundation::TimeSpan, out: *mut *mut MediaPlaybackItem) -> HRESULT + fn CreateWithStartTime(&self, source: *mut super::core::MediaSource, startTime: foundation::TimeSpan, out: *mut *mut MediaPlaybackItem) -> HRESULT, + fn CreateWithStartTimeAndDurationLimit(&self, source: *mut super::core::MediaSource, startTime: foundation::TimeSpan, durationLimit: foundation::TimeSpan, out: *mut *mut MediaPlaybackItem) -> HRESULT }} impl IMediaPlaybackItemFactory2 { - #[inline] pub unsafe fn create_with_start_time(&self, source: &super::core::MediaSource, startTime: super::super::foundation::TimeSpan) -> Result> { + #[inline] pub fn create_with_start_time(&self, source: &super::core::MediaSource, startTime: foundation::TimeSpan) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithStartTime)(self as *const _ as *mut _, 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(&self, source: &super::core::MediaSource, startTime: super::super::foundation::TimeSpan, durationLimit: super::super::foundation::TimeSpan) -> Result> { + }} + #[inline] pub fn create_with_start_time_and_duration_limit(&self, source: &super::core::MediaSource, startTime: foundation::TimeSpan, durationLimit: foundation::TimeSpan) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithStartTimeAndDurationLimit)(self as *const _ as *mut _, source as *const _ as *mut _, startTime, durationLimit, &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] { @@ -18572,16 +18572,16 @@ RT_INTERFACE!{interface IMediaPlaybackItemFailedEventArgs(IMediaPlaybackItemFail fn get_Error(&self, out: *mut *mut MediaPlaybackItemError) -> HRESULT }} impl IMediaPlaybackItemFailedEventArgs { - #[inline] pub unsafe fn get_item(&self) -> Result> { + #[inline] pub fn get_item(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Item)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_error(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_error(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Error)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaPlaybackItemFailedEventArgs: IMediaPlaybackItemFailedEventArgs} DEFINE_IID!(IID_IMediaPlaybackItemOpenedEventArgs, 3420044674, 12343, 20414, 174, 143, 57, 252, 57, 237, 244, 239); @@ -18589,11 +18589,11 @@ RT_INTERFACE!{interface IMediaPlaybackItemOpenedEventArgs(IMediaPlaybackItemOpen fn get_Item(&self, out: *mut *mut MediaPlaybackItem) -> HRESULT }} impl IMediaPlaybackItemOpenedEventArgs { - #[inline] pub unsafe fn get_item(&self) -> Result> { + #[inline] pub fn get_item(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Item)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaPlaybackItemOpenedEventArgs: IMediaPlaybackItemOpenedEventArgs} DEFINE_IID!(IID_IMediaPlaybackItemStatics, 1260120052, 17221, 16444, 138, 103, 245, 222, 145, 223, 76, 134); @@ -18601,21 +18601,21 @@ RT_INTERFACE!{static interface IMediaPlaybackItemStatics(IMediaPlaybackItemStati fn FindFromMediaSource(&self, source: *mut super::core::MediaSource, out: *mut *mut MediaPlaybackItem) -> HRESULT }} impl IMediaPlaybackItemStatics { - #[inline] pub unsafe fn find_from_media_source(&self, source: &super::core::MediaSource) -> Result> { + #[inline] pub fn find_from_media_source(&self, source: &super::core::MediaSource) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindFromMediaSource)(self as *const _ as *mut _, source as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ItemFailed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_CurrentItemChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CurrentItemChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ItemOpened(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ItemOpened(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_Items(&self, out: *mut *mut super::super::foundation::collections::IObservableVector) -> HRESULT, + fn add_ItemFailed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ItemFailed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_CurrentItemChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CurrentItemChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ItemOpened(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ItemOpened(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn get_Items(&self, out: *mut *mut foundation::collections::IObservableVector) -> HRESULT, fn get_AutoRepeatEnabled(&self, out: *mut bool) -> HRESULT, fn put_AutoRepeatEnabled(&self, value: bool) -> HRESULT, fn get_ShuffleEnabled(&self, out: *mut bool) -> HRESULT, @@ -18627,165 +18627,165 @@ RT_INTERFACE!{interface IMediaPlaybackList(IMediaPlaybackListVtbl): IInspectable fn MoveTo(&self, itemIndex: u32, out: *mut *mut MediaPlaybackItem) -> HRESULT }} impl IMediaPlaybackList { - #[inline] pub unsafe fn add_item_failed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_item_failed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ItemFailed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_item_failed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_item_failed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ItemFailed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_current_item_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_current_item_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CurrentItemChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_current_item_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_current_item_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CurrentItemChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_item_opened(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_item_opened(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ItemOpened)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_item_opened(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_item_opened(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ItemOpened)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_items(&self) -> Result>> { + }} + #[inline] pub fn get_items(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Items)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_auto_repeat_enabled(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_auto_repeat_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AutoRepeatEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_auto_repeat_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_auto_repeat_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AutoRepeatEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_shuffle_enabled(&self) -> Result { + }} + #[inline] pub fn get_shuffle_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ShuffleEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_shuffle_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_shuffle_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ShuffleEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_item(&self) -> Result> { + }} + #[inline] pub fn get_current_item(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CurrentItem)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_item_index(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_current_item_index(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CurrentItemIndex)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn move_next(&self) -> Result> { + }} + #[inline] pub fn move_next(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MoveNext)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn move_previous(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn move_previous(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MovePrevious)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn move_to(&self, itemIndex: u32) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn move_to(&self, itemIndex: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MoveTo)(self as *const _ as *mut _, itemIndex, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaPlaybackList: IMediaPlaybackList} impl RtActivatable for MediaPlaybackList {} DEFINE_CLSID!(MediaPlaybackList(&[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,76,105,115,116,0]) [CLSID_MediaPlaybackList]); 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(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_MaxPrefetchTime(&self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_MaxPrefetchTime(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_MaxPrefetchTime(&self, value: *mut foundation::IReference) -> HRESULT, fn get_StartingItem(&self, out: *mut *mut MediaPlaybackItem) -> HRESULT, fn put_StartingItem(&self, value: *mut MediaPlaybackItem) -> HRESULT, - fn get_ShuffledItems(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn SetShuffledItems(&self, value: *mut super::super::foundation::collections::IIterable) -> HRESULT + fn get_ShuffledItems(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn SetShuffledItems(&self, value: *mut foundation::collections::IIterable) -> HRESULT }} impl IMediaPlaybackList2 { - #[inline] pub unsafe fn get_max_prefetch_time(&self) -> Result>> { + #[inline] pub fn get_max_prefetch_time(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxPrefetchTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_prefetch_time(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_max_prefetch_time(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxPrefetchTime)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_starting_item(&self) -> Result> { + }} + #[inline] pub fn get_starting_item(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StartingItem)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_starting_item(&self, value: &MediaPlaybackItem) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_starting_item(&self, value: &MediaPlaybackItem) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StartingItem)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_shuffled_items(&self) -> Result>> { + }} + #[inline] pub fn get_shuffled_items(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ShuffledItems)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_shuffled_items(&self, value: &super::super::foundation::collections::IIterable) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_shuffled_items(&self, value: &foundation::collections::IIterable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetShuffledItems)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMediaPlaybackList3, 3710172073, 48199, 17507, 170, 144, 193, 139, 126, 95, 253, 225); RT_INTERFACE!{interface IMediaPlaybackList3(IMediaPlaybackList3Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlaybackList3] { - fn get_MaxPlayedItemsToKeepOpen(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_MaxPlayedItemsToKeepOpen(&self, value: *mut super::super::foundation::IReference) -> HRESULT + fn get_MaxPlayedItemsToKeepOpen(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_MaxPlayedItemsToKeepOpen(&self, value: *mut foundation::IReference) -> HRESULT }} impl IMediaPlaybackList3 { - #[inline] pub unsafe fn get_max_played_items_to_keep_open(&self) -> Result>> { + #[inline] pub fn get_max_played_items_to_keep_open(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxPlayedItemsToKeepOpen)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_played_items_to_keep_open(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_max_played_items_to_keep_open(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxPlayedItemsToKeepOpen)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PlaybackStateChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PlaybackRateChanged(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PlaybackRateChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_SeekCompleted(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SeekCompleted(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_BufferingStarted(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_BufferingStarted(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_BufferingEnded(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_BufferingEnded(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_BufferingProgressChanged(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_BufferingProgressChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_DownloadProgressChanged(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DownloadProgressChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_NaturalDurationChanged(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_NaturalDurationChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PositionChanged(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PositionChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_NaturalVideoSizeChanged(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_NaturalVideoSizeChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PlaybackStateChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PlaybackStateChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PlaybackRateChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PlaybackRateChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_SeekCompleted(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SeekCompleted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_BufferingStarted(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_BufferingStarted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_BufferingEnded(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_BufferingEnded(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_BufferingProgressChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_BufferingProgressChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_DownloadProgressChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DownloadProgressChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_NaturalDurationChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_NaturalDurationChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PositionChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PositionChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_NaturalVideoSizeChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_NaturalVideoSizeChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_MediaPlayer(&self, out: *mut *mut MediaPlayer) -> HRESULT, - fn get_NaturalDuration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn get_Position(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_Position(&self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_NaturalDuration(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_Position(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_Position(&self, value: foundation::TimeSpan) -> HRESULT, fn get_PlaybackState(&self, out: *mut MediaPlaybackState) -> HRESULT, fn get_CanSeek(&self, out: *mut bool) -> HRESULT, fn get_CanPause(&self, out: *mut bool) -> HRESULT, @@ -18796,290 +18796,290 @@ RT_INTERFACE!{interface IMediaPlaybackSession(IMediaPlaybackSessionVtbl): IInspe fn get_DownloadProgress(&self, out: *mut f64) -> HRESULT, fn get_NaturalVideoHeight(&self, out: *mut u32) -> HRESULT, fn get_NaturalVideoWidth(&self, out: *mut u32) -> HRESULT, - fn get_NormalizedSourceRect(&self, out: *mut super::super::foundation::Rect) -> HRESULT, - fn put_NormalizedSourceRect(&self, value: super::super::foundation::Rect) -> HRESULT, + fn get_NormalizedSourceRect(&self, out: *mut foundation::Rect) -> HRESULT, + fn put_NormalizedSourceRect(&self, value: foundation::Rect) -> HRESULT, fn get_StereoscopicVideoPackingMode(&self, out: *mut super::mediaproperties::StereoscopicVideoPackingMode) -> HRESULT, fn put_StereoscopicVideoPackingMode(&self, value: super::mediaproperties::StereoscopicVideoPackingMode) -> HRESULT }} impl IMediaPlaybackSession { - #[inline] pub unsafe fn add_playback_state_changed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_playback_state_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PlaybackStateChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_playback_state_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_playback_state_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PlaybackStateChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_playback_rate_changed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_playback_rate_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PlaybackRateChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_playback_rate_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_playback_rate_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PlaybackRateChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_seek_completed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_seek_completed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SeekCompleted)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_seek_completed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_seek_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SeekCompleted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_buffering_started(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_buffering_started(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_BufferingStarted)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_buffering_started(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_buffering_started(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_BufferingStarted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_buffering_ended(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_buffering_ended(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_BufferingEnded)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_buffering_ended(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_buffering_ended(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_BufferingEnded)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_buffering_progress_changed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_buffering_progress_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_BufferingProgressChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_buffering_progress_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_buffering_progress_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_BufferingProgressChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_download_progress_changed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_download_progress_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DownloadProgressChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_download_progress_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_download_progress_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DownloadProgressChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_natural_duration_changed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_natural_duration_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_NaturalDurationChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_natural_duration_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_natural_duration_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_NaturalDurationChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_position_changed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_position_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PositionChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_position_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_position_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PositionChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_natural_video_size_changed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_natural_video_size_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_NaturalVideoSizeChanged)(self as *const _ as *mut _, 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(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_natural_video_size_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_NaturalVideoSizeChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_media_player(&self) -> Result> { + }} + #[inline] pub fn get_media_player(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MediaPlayer)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_natural_duration(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_natural_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NaturalDuration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_position(&self) -> Result { + }} + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_position(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_position(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Position)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_playback_state(&self) -> Result { + }} + #[inline] pub fn get_playback_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PlaybackState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_seek(&self) -> Result { + }} + #[inline] pub fn get_can_seek(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanSeek)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_pause(&self) -> Result { + }} + #[inline] pub fn get_can_pause(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanPause)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_protected(&self) -> Result { + }} + #[inline] pub fn get_is_protected(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsProtected)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_playback_rate(&self) -> Result { + }} + #[inline] pub fn get_playback_rate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PlaybackRate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_playback_rate(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_playback_rate(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PlaybackRate)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_buffering_progress(&self) -> Result { + }} + #[inline] pub fn get_buffering_progress(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BufferingProgress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_download_progress(&self) -> Result { + }} + #[inline] pub fn get_download_progress(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DownloadProgress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_natural_video_height(&self) -> Result { + }} + #[inline] pub fn get_natural_video_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NaturalVideoHeight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_natural_video_width(&self) -> Result { + }} + #[inline] pub fn get_natural_video_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NaturalVideoWidth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_normalized_source_rect(&self) -> Result { + }} + #[inline] pub fn get_normalized_source_rect(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NormalizedSourceRect)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_normalized_source_rect(&self, value: super::super::foundation::Rect) -> Result<()> { + }} + #[inline] pub fn set_normalized_source_rect(&self, value: foundation::Rect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_NormalizedSourceRect)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_stereoscopic_video_packing_mode(&self) -> Result { + }} + #[inline] pub fn get_stereoscopic_video_packing_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StereoscopicVideoPackingMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_stereoscopic_video_packing_mode(&self, value: super::mediaproperties::StereoscopicVideoPackingMode) -> Result<()> { + }} + #[inline] pub fn set_stereoscopic_video_packing_mode(&self, value: super::mediaproperties::StereoscopicVideoPackingMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StereoscopicVideoPackingMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MediaPlaybackSession: IMediaPlaybackSession} DEFINE_IID!(IID_IMediaPlaybackSession2, 4172971129, 8136, 16535, 173, 112, 192, 250, 24, 204, 0, 80); RT_INTERFACE!{interface IMediaPlaybackSession2(IMediaPlaybackSession2Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlaybackSession2] { - fn add_BufferedRangesChanged(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_BufferedRangesChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PlayedRangesChanged(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PlayedRangesChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_SeekableRangesChanged(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SeekableRangesChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_SupportedPlaybackRatesChanged(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SupportedPlaybackRatesChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_BufferedRangesChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_BufferedRangesChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PlayedRangesChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PlayedRangesChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_SeekableRangesChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SeekableRangesChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_SupportedPlaybackRatesChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SupportedPlaybackRatesChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_SphericalVideoProjection(&self, out: *mut *mut MediaPlaybackSphericalVideoProjection) -> HRESULT, fn get_IsMirroring(&self, out: *mut bool) -> HRESULT, fn put_IsMirroring(&self, value: bool) -> HRESULT, - fn GetBufferedRanges(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn GetPlayedRanges(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn GetSeekableRanges(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn GetBufferedRanges(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn GetPlayedRanges(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn GetSeekableRanges(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn IsSupportedPlaybackRateRange(&self, rate1: f64, rate2: f64, out: *mut bool) -> HRESULT }} impl IMediaPlaybackSession2 { - #[inline] pub unsafe fn add_buffered_ranges_changed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_buffered_ranges_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_BufferedRangesChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_buffered_ranges_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_buffered_ranges_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_BufferedRangesChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_played_ranges_changed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_played_ranges_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PlayedRangesChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_played_ranges_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_played_ranges_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PlayedRangesChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_seekable_ranges_changed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_seekable_ranges_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SeekableRangesChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_seekable_ranges_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_seekable_ranges_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SeekableRangesChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_supported_playback_rates_changed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_supported_playback_rates_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SupportedPlaybackRatesChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_supported_playback_rates_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_supported_playback_rates_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SupportedPlaybackRatesChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_spherical_video_projection(&self) -> Result> { + }} + #[inline] pub fn get_spherical_video_projection(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SphericalVideoProjection)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_mirroring(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_mirroring(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsMirroring)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_mirroring(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_mirroring(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsMirroring)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_buffered_ranges(&self) -> Result>> { + }} + #[inline] pub fn get_buffered_ranges(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetBufferedRanges)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_played_ranges(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_played_ranges(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPlayedRanges)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_seekable_ranges(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_seekable_ranges(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSeekableRanges)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn is_supported_playback_rate_range(&self, rate1: f64, rate2: f64) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn is_supported_playback_rate_range(&self, rate1: f64, rate2: f64) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsSupportedPlaybackRateRange)(self as *const _ as *mut _, rate1, rate2, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMediaPlaybackSessionBufferingStartedEventArgs, 3446321133, 29922, 17333, 177, 21, 118, 35, 108, 51, 121, 26); RT_INTERFACE!{interface IMediaPlaybackSessionBufferingStartedEventArgs(IMediaPlaybackSessionBufferingStartedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlaybackSessionBufferingStartedEventArgs] { fn get_IsPlaybackInterruption(&self, out: *mut bool) -> HRESULT }} impl IMediaPlaybackSessionBufferingStartedEventArgs { - #[inline] pub unsafe fn get_is_playback_interruption(&self) -> Result { + #[inline] pub fn get_is_playback_interruption(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPlaybackInterruption)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MediaPlaybackSessionBufferingStartedEventArgs: IMediaPlaybackSessionBufferingStartedEventArgs} DEFINE_IID!(IID_IMediaPlaybackSource, 4020093628, 37655, 18070, 176, 81, 43, 173, 100, 49, 119, 181); @@ -19094,57 +19094,57 @@ RT_INTERFACE!{interface IMediaPlaybackSphericalVideoProjection(IMediaPlaybackSph fn put_FrameFormat(&self, value: super::mediaproperties::SphericalVideoFrameFormat) -> HRESULT, fn get_HorizontalFieldOfViewInDegrees(&self, out: *mut f64) -> HRESULT, fn put_HorizontalFieldOfViewInDegrees(&self, value: f64) -> HRESULT, - fn get_ViewOrientation(&self, out: *mut super::super::foundation::numerics::Quaternion) -> HRESULT, - fn put_ViewOrientation(&self, value: super::super::foundation::numerics::Quaternion) -> HRESULT, + fn get_ViewOrientation(&self, out: *mut foundation::numerics::Quaternion) -> HRESULT, + fn put_ViewOrientation(&self, value: foundation::numerics::Quaternion) -> HRESULT, fn get_ProjectionMode(&self, out: *mut SphericalVideoProjectionMode) -> HRESULT, fn put_ProjectionMode(&self, value: SphericalVideoProjectionMode) -> HRESULT }} impl IMediaPlaybackSphericalVideoProjection { - #[inline] pub unsafe fn get_is_enabled(&self) -> Result { + #[inline] pub fn get_is_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_frame_format(&self) -> Result { + }} + #[inline] pub fn get_frame_format(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FrameFormat)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_frame_format(&self, value: super::mediaproperties::SphericalVideoFrameFormat) -> Result<()> { + }} + #[inline] pub fn set_frame_format(&self, value: super::mediaproperties::SphericalVideoFrameFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FrameFormat)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_horizontal_field_of_view_in_degrees(&self) -> Result { + }} + #[inline] pub fn get_horizontal_field_of_view_in_degrees(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HorizontalFieldOfViewInDegrees)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_horizontal_field_of_view_in_degrees(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_horizontal_field_of_view_in_degrees(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_HorizontalFieldOfViewInDegrees)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_view_orientation(&self) -> Result { + }} + #[inline] pub fn get_view_orientation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ViewOrientation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_view_orientation(&self, value: super::super::foundation::numerics::Quaternion) -> Result<()> { + }} + #[inline] pub fn set_view_orientation(&self, value: foundation::numerics::Quaternion) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ViewOrientation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_projection_mode(&self) -> Result { + }} + #[inline] pub fn get_projection_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProjectionMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_projection_mode(&self, value: SphericalVideoProjectionMode) -> Result<()> { + }} + #[inline] pub fn set_projection_mode(&self, value: SphericalVideoProjectionMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ProjectionMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MediaPlaybackSphericalVideoProjection: IMediaPlaybackSphericalVideoProjection} RT_ENUM! { enum MediaPlaybackState: i32 { @@ -19152,40 +19152,40 @@ RT_ENUM! { enum MediaPlaybackState: i32 { }} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PresentationModeChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PresentationModeChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PresentationModeChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn GetPresentationMode(&self, index: u32, out: *mut TimedMetadataTrackPresentationMode) -> HRESULT, fn SetPresentationMode(&self, index: u32, value: TimedMetadataTrackPresentationMode) -> HRESULT }} impl IMediaPlaybackTimedMetadataTrackList { - #[inline] pub unsafe fn add_presentation_mode_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_presentation_mode_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PresentationModeChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_presentation_mode_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_presentation_mode_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PresentationModeChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_presentation_mode(&self, index: u32) -> Result { + }} + #[inline] pub fn get_presentation_mode(&self, index: u32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetPresentationMode)(self as *const _ as *mut _, index, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_presentation_mode(&self, index: u32, value: TimedMetadataTrackPresentationMode) -> Result<()> { + }} + #[inline] pub fn set_presentation_mode(&self, index: u32, value: TimedMetadataTrackPresentationMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetPresentationMode)(self as *const _ as *mut _, index, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } -RT_CLASS!{class MediaPlaybackTimedMetadataTrackList: super::super::foundation::collections::IVectorView} -RT_CLASS!{class MediaPlaybackVideoTrackList: super::super::foundation::collections::IVectorView} +RT_CLASS!{class MediaPlaybackTimedMetadataTrackList: foundation::collections::IVectorView} +RT_CLASS!{class MediaPlaybackVideoTrackList: foundation::collections::IVectorView} 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(&self, out: *mut bool) -> HRESULT, fn put_AutoPlay(&self, value: bool) -> HRESULT, - fn get_NaturalDuration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn get_Position(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_Position(&self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_NaturalDuration(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_Position(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_Position(&self, value: foundation::TimeSpan) -> HRESULT, fn get_BufferingProgress(&self, out: *mut f64) -> HRESULT, fn get_CurrentState(&self, out: *mut MediaPlayerState) -> HRESULT, fn get_CanSeek(&self, out: *mut bool) -> HRESULT, @@ -19200,222 +19200,222 @@ RT_INTERFACE!{interface IMediaPlayer(IMediaPlayerVtbl): IInspectable(IInspectabl fn get_Volume(&self, out: *mut f64) -> HRESULT, fn put_Volume(&self, value: f64) -> HRESULT, fn get_PlaybackMediaMarkers(&self, out: *mut *mut PlaybackMediaMarkerSequence) -> HRESULT, - fn add_MediaOpened(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_MediaOpened(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_MediaEnded(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_MediaEnded(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_MediaFailed(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_MediaFailed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_CurrentStateChanged(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CurrentStateChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PlaybackMediaMarkerReached(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PlaybackMediaMarkerReached(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_MediaPlayerRateChanged(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_MediaPlayerRateChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_VolumeChanged(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_VolumeChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_SeekCompleted(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SeekCompleted(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_BufferingStarted(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_BufferingStarted(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_BufferingEnded(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_BufferingEnded(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_MediaOpened(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_MediaOpened(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_MediaEnded(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_MediaEnded(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_MediaFailed(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_MediaFailed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_CurrentStateChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CurrentStateChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PlaybackMediaMarkerReached(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PlaybackMediaMarkerReached(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_MediaPlayerRateChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_MediaPlayerRateChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_VolumeChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_VolumeChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_SeekCompleted(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SeekCompleted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_BufferingStarted(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_BufferingStarted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_BufferingEnded(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_BufferingEnded(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn Play(&self) -> HRESULT, fn Pause(&self) -> HRESULT, - fn SetUriSource(&self, value: *mut super::super::foundation::Uri) -> HRESULT + fn SetUriSource(&self, value: *mut foundation::Uri) -> HRESULT }} impl IMediaPlayer { - #[inline] pub unsafe fn get_auto_play(&self) -> Result { + #[inline] pub fn get_auto_play(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AutoPlay)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_auto_play(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_auto_play(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AutoPlay)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_natural_duration(&self) -> Result { + }} + #[inline] pub fn get_natural_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NaturalDuration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_position(&self) -> Result { + }} + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_position(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_position(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Position)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_buffering_progress(&self) -> Result { + }} + #[inline] pub fn get_buffering_progress(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BufferingProgress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_state(&self) -> Result { + }} + #[inline] pub fn get_current_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CurrentState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_seek(&self) -> Result { + }} + #[inline] pub fn get_can_seek(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanSeek)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_pause(&self) -> Result { + }} + #[inline] pub fn get_can_pause(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanPause)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_looping_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_looping_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsLoopingEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_looping_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_looping_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsLoopingEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_protected(&self) -> Result { + }} + #[inline] pub fn get_is_protected(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsProtected)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_muted(&self) -> Result { + }} + #[inline] pub fn get_is_muted(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsMuted)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_muted(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_muted(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsMuted)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_playback_rate(&self) -> Result { + }} + #[inline] pub fn get_playback_rate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PlaybackRate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_playback_rate(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_playback_rate(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PlaybackRate)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_volume(&self) -> Result { + }} + #[inline] pub fn get_volume(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Volume)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_volume(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_volume(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Volume)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_playback_media_markers(&self) -> Result> { + }} + #[inline] pub fn get_playback_media_markers(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PlaybackMediaMarkers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_media_opened(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_media_opened(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_MediaOpened)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_media_opened(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_media_opened(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_MediaOpened)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_media_ended(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_media_ended(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_MediaEnded)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_media_ended(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_media_ended(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_MediaEnded)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_media_failed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_media_failed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_MediaFailed)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_media_failed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_media_failed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_MediaFailed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_current_state_changed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_current_state_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CurrentStateChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_current_state_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_current_state_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CurrentStateChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_playback_media_marker_reached(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_playback_media_marker_reached(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PlaybackMediaMarkerReached)(self as *const _ as *mut _, 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(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_playback_media_marker_reached(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PlaybackMediaMarkerReached)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_media_player_rate_changed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_media_player_rate_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_MediaPlayerRateChanged)(self as *const _ as *mut _, 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(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_media_player_rate_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_MediaPlayerRateChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_volume_changed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_volume_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_VolumeChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_volume_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_volume_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_VolumeChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_seek_completed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_seek_completed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SeekCompleted)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_seek_completed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_seek_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SeekCompleted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_buffering_started(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_buffering_started(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_BufferingStarted)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_buffering_started(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_buffering_started(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_BufferingStarted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_buffering_ended(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_buffering_ended(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_BufferingEnded)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_buffering_ended(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_buffering_ended(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_BufferingEnded)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn play(&self) -> Result<()> { + }} + #[inline] pub fn play(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Play)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn pause(&self) -> Result<()> { + }} + #[inline] pub fn pause(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Pause)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_uri_source(&self, value: &super::super::foundation::Uri) -> Result<()> { + }} + #[inline] pub fn set_uri_source(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetUriSource)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MediaPlayer: IMediaPlayer} impl RtActivatable for MediaPlayer {} @@ -19429,36 +19429,36 @@ RT_INTERFACE!{interface IMediaPlayer2(IMediaPlayer2Vtbl): IInspectable(IInspecta fn put_AudioDeviceType(&self, value: MediaPlayerAudioDeviceType) -> HRESULT }} impl IMediaPlayer2 { - #[inline] pub unsafe fn get_system_media_transport_controls(&self) -> Result> { + #[inline] pub fn get_system_media_transport_controls(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SystemMediaTransportControls)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_category(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_audio_category(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AudioCategory)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_audio_category(&self, value: MediaPlayerAudioCategory) -> Result<()> { + }} + #[inline] pub fn set_audio_category(&self, value: MediaPlayerAudioCategory) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AudioCategory)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_device_type(&self) -> Result { + }} + #[inline] pub fn get_audio_device_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AudioDeviceType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_audio_device_type(&self, value: MediaPlayerAudioDeviceType) -> Result<()> { + }} + #[inline] pub fn set_audio_device_type(&self, value: MediaPlayerAudioDeviceType) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AudioDeviceType)(self as *const _ as *mut _, 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(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_IsMutedChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_SourceChanged(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SourceChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_IsMutedChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_IsMutedChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_SourceChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_AudioBalance(&self, out: *mut f64) -> HRESULT, fn put_AudioBalance(&self, value: f64) -> HRESULT, fn get_RealTimePlayback(&self, out: *mut bool) -> HRESULT, @@ -19473,200 +19473,200 @@ RT_INTERFACE!{interface IMediaPlayer3(IMediaPlayer3Vtbl): IInspectable(IInspecta #[cfg(feature="windows-devices")] fn put_AudioDevice(&self, value: *mut super::super::devices::enumeration::DeviceInformation) -> HRESULT, fn get_TimelineController(&self, out: *mut *mut super::MediaTimelineController) -> HRESULT, fn put_TimelineController(&self, value: *mut super::MediaTimelineController) -> HRESULT, - fn get_TimelineControllerPositionOffset(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_TimelineControllerPositionOffset(&self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_TimelineControllerPositionOffset(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_TimelineControllerPositionOffset(&self, value: foundation::TimeSpan) -> HRESULT, fn get_PlaybackSession(&self, out: *mut *mut MediaPlaybackSession) -> HRESULT, fn StepForwardOneFrame(&self) -> HRESULT, fn StepBackwardOneFrame(&self) -> HRESULT, fn GetAsCastingSource(&self, out: *mut *mut super::casting::CastingSource) -> HRESULT }} impl IMediaPlayer3 { - #[inline] pub unsafe fn add_is_muted_changed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_is_muted_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_IsMutedChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_is_muted_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_is_muted_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_IsMutedChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_source_changed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_source_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SourceChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_source_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_source_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SourceChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_balance(&self) -> Result { + }} + #[inline] pub fn get_audio_balance(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AudioBalance)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_audio_balance(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_audio_balance(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AudioBalance)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_real_time_playback(&self) -> Result { + }} + #[inline] pub fn get_real_time_playback(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RealTimePlayback)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_real_time_playback(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_real_time_playback(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RealTimePlayback)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_stereoscopic_video_render_mode(&self) -> Result { + }} + #[inline] pub fn get_stereoscopic_video_render_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StereoscopicVideoRenderMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_stereoscopic_video_render_mode(&self, value: StereoscopicVideoRenderMode) -> Result<()> { + }} + #[inline] pub fn set_stereoscopic_video_render_mode(&self, value: StereoscopicVideoRenderMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StereoscopicVideoRenderMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_break_manager(&self) -> Result> { + }} + #[inline] pub fn get_break_manager(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BreakManager)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_command_manager(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_command_manager(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CommandManager)(self 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_audio_device(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_audio_device(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioDevice)(self 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_audio_device(&self, value: &super::super::devices::enumeration::DeviceInformation) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-devices")] #[inline] pub fn set_audio_device(&self, value: &super::super::devices::enumeration::DeviceInformation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AudioDevice)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_timeline_controller(&self) -> Result> { + }} + #[inline] pub fn get_timeline_controller(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TimelineController)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_timeline_controller(&self, value: &super::MediaTimelineController) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_timeline_controller(&self, value: &super::MediaTimelineController) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TimelineController)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_timeline_controller_position_offset(&self) -> Result { + }} + #[inline] pub fn get_timeline_controller_position_offset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TimelineControllerPositionOffset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_timeline_controller_position_offset(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_timeline_controller_position_offset(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TimelineControllerPositionOffset)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_playback_session(&self) -> Result> { + }} + #[inline] pub fn get_playback_session(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PlaybackSession)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn step_forward_one_frame(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn step_forward_one_frame(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StepForwardOneFrame)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn step_backward_one_frame(&self) -> Result<()> { + }} + #[inline] pub fn step_backward_one_frame(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StepBackwardOneFrame)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_as_casting_source(&self) -> Result> { + }} + #[inline] pub fn get_as_casting_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAsCastingSource)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, size: super::super::foundation::Size) -> HRESULT, + fn SetSurfaceSize(&self, size: foundation::Size) -> HRESULT, #[cfg(feature="windows-ui")] fn GetSurface(&self, compositor: *mut super::super::ui::composition::Compositor, out: *mut *mut MediaPlayerSurface) -> HRESULT }} impl IMediaPlayer4 { - #[inline] pub unsafe fn set_surface_size(&self, size: super::super::foundation::Size) -> Result<()> { + #[inline] pub fn set_surface_size(&self, size: foundation::Size) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetSurfaceSize)(self as *const _ as *mut _, size); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_surface(&self, compositor: &super::super::ui::composition::Compositor) -> Result> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_surface(&self, compositor: &super::super::ui::composition::Compositor) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSurface)(self as *const _ as *mut _, compositor as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IMediaPlayer5, 3487905789, 63594, 17478, 191, 77, 200, 231, 146, 183, 180, 179); RT_INTERFACE!{interface IMediaPlayer5(IMediaPlayer5Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlayer5] { - fn add_VideoFrameAvailable(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_VideoFrameAvailable(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_VideoFrameAvailable(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_VideoFrameAvailable(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_IsVideoFrameServerEnabled(&self, out: *mut bool) -> HRESULT, fn put_IsVideoFrameServerEnabled(&self, value: bool) -> HRESULT, #[cfg(feature="windows-graphics")] fn CopyFrameToVideoSurface(&self, destination: *mut super::super::graphics::directx::direct3d11::IDirect3DSurface) -> HRESULT, - #[cfg(feature="windows-graphics")] fn CopyFrameToVideoSurfaceWithTargetRectangle(&self, destination: *mut super::super::graphics::directx::direct3d11::IDirect3DSurface, targetRectangle: super::super::foundation::Rect) -> HRESULT, + #[cfg(feature="windows-graphics")] fn CopyFrameToVideoSurfaceWithTargetRectangle(&self, destination: *mut super::super::graphics::directx::direct3d11::IDirect3DSurface, targetRectangle: foundation::Rect) -> HRESULT, #[cfg(feature="windows-graphics")] fn CopyFrameToStereoscopicVideoSurfaces(&self, destinationLeftEye: *mut super::super::graphics::directx::direct3d11::IDirect3DSurface, destinationRightEye: *mut super::super::graphics::directx::direct3d11::IDirect3DSurface) -> HRESULT }} impl IMediaPlayer5 { - #[inline] pub unsafe fn add_video_frame_available(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_video_frame_available(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_VideoFrameAvailable)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_video_frame_available(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_video_frame_available(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_VideoFrameAvailable)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_video_frame_server_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_video_frame_server_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsVideoFrameServerEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_video_frame_server_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_video_frame_server_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsVideoFrameServerEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn copy_frame_to_video_surface(&self, destination: &super::super::graphics::directx::direct3d11::IDirect3DSurface) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn copy_frame_to_video_surface(&self, destination: &super::super::graphics::directx::direct3d11::IDirect3DSurface) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).CopyFrameToVideoSurface)(self as *const _ as *mut _, destination as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn copy_frame_to_video_surface_with_target_rectangle(&self, destination: &super::super::graphics::directx::direct3d11::IDirect3DSurface, targetRectangle: super::super::foundation::Rect) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn copy_frame_to_video_surface_with_target_rectangle(&self, destination: &super::super::graphics::directx::direct3d11::IDirect3DSurface, targetRectangle: foundation::Rect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).CopyFrameToVideoSurfaceWithTargetRectangle)(self as *const _ as *mut _, destination as *const _ as *mut _, targetRectangle); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn copy_frame_to_stereoscopic_video_surfaces(&self, destinationLeftEye: &super::super::graphics::directx::direct3d11::IDirect3DSurface, destinationRightEye: &super::super::graphics::directx::direct3d11::IDirect3DSurface) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn copy_frame_to_stereoscopic_video_surfaces(&self, destinationLeftEye: &super::super::graphics::directx::direct3d11::IDirect3DSurface, destinationRightEye: &super::super::graphics::directx::direct3d11::IDirect3DSurface) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).CopyFrameToStereoscopicVideoSurfaces)(self as *const _ as *mut _, destinationLeftEye as *const _ as *mut _, destinationRightEye as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMediaPlayer6, 3771375750, 44645, 16716, 176, 16, 139, 197, 95, 0, 230, 146); RT_INTERFACE!{interface IMediaPlayer6(IMediaPlayer6Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaPlayer6] { - fn add_SubtitleFrameChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SubtitleFrameChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_SubtitleFrameChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SubtitleFrameChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, #[cfg(feature="windows-graphics")] fn RenderSubtitlesToSurface(&self, destination: *mut super::super::graphics::directx::direct3d11::IDirect3DSurface, out: *mut bool) -> HRESULT, - #[cfg(feature="windows-graphics")] fn RenderSubtitlesToSurfaceWithTargetRectangle(&self, destination: *mut super::super::graphics::directx::direct3d11::IDirect3DSurface, targetRectangle: super::super::foundation::Rect, out: *mut bool) -> HRESULT + #[cfg(feature="windows-graphics")] fn RenderSubtitlesToSurfaceWithTargetRectangle(&self, destination: *mut super::super::graphics::directx::direct3d11::IDirect3DSurface, targetRectangle: foundation::Rect, out: *mut bool) -> HRESULT }} impl IMediaPlayer6 { - #[inline] pub unsafe fn add_subtitle_frame_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_subtitle_frame_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SubtitleFrameChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_subtitle_frame_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_subtitle_frame_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SubtitleFrameChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn render_subtitles_to_surface(&self, destination: &super::super::graphics::directx::direct3d11::IDirect3DSurface) -> Result { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn render_subtitles_to_surface(&self, destination: &super::super::graphics::directx::direct3d11::IDirect3DSurface) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).RenderSubtitlesToSurface)(self as *const _ as *mut _, destination as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn render_subtitles_to_surface_with_target_rectangle(&self, destination: &super::super::graphics::directx::direct3d11::IDirect3DSurface, targetRectangle: super::super::foundation::Rect) -> Result { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn render_subtitles_to_surface_with_target_rectangle(&self, destination: &super::super::graphics::directx::direct3d11::IDirect3DSurface, targetRectangle: foundation::Rect) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).RenderSubtitlesToSurfaceWithTargetRectangle)(self as *const _ as *mut _, destination as *const _ as *mut _, targetRectangle, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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, @@ -19676,40 +19676,40 @@ RT_ENUM! { enum MediaPlayerAudioDeviceType: i32 { }} 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(&self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT + fn get_Data(&self, out: *mut *mut foundation::collections::ValueSet) -> HRESULT }} impl IMediaPlayerDataReceivedEventArgs { - #[inline] pub unsafe fn get_data(&self) -> Result> { + #[inline] pub fn get_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Data)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaPlayerDataReceivedEventArgs: IMediaPlayerDataReceivedEventArgs} 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(&self, activatableClassId: HSTRING, effectOptional: bool, configuration: *mut super::super::foundation::collections::IPropertySet) -> HRESULT, + fn AddAudioEffect(&self, activatableClassId: HSTRING, effectOptional: bool, configuration: *mut foundation::collections::IPropertySet) -> HRESULT, fn RemoveAllEffects(&self) -> HRESULT }} impl IMediaPlayerEffects { - #[inline] pub unsafe fn add_audio_effect(&self, activatableClassId: &HStringArg, effectOptional: bool, configuration: &super::super::foundation::collections::IPropertySet) -> Result<()> { + #[inline] pub fn add_audio_effect(&self, activatableClassId: &HStringArg, effectOptional: bool, configuration: &foundation::collections::IPropertySet) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddAudioEffect)(self as *const _ as *mut _, activatableClassId.get(), effectOptional, configuration as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove_all_effects(&self) -> Result<()> { + }} + #[inline] pub fn remove_all_effects(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveAllEffects)(self as *const _ as *mut _); 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(&self, activatableClassId: HSTRING, effectOptional: bool, effectConfiguration: *mut super::super::foundation::collections::IPropertySet) -> HRESULT + fn AddVideoEffect(&self, activatableClassId: HSTRING, effectOptional: bool, effectConfiguration: *mut foundation::collections::IPropertySet) -> HRESULT }} impl IMediaPlayerEffects2 { - #[inline] pub unsafe fn add_video_effect(&self, activatableClassId: &HStringArg, effectOptional: bool, effectConfiguration: &super::super::foundation::collections::IPropertySet) -> Result<()> { + #[inline] pub fn add_video_effect(&self, activatableClassId: &HStringArg, effectOptional: bool, effectConfiguration: &foundation::collections::IPropertySet) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddVideoEffect)(self as *const _ as *mut _, activatableClassId.get(), effectOptional, effectConfiguration as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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, @@ -19717,25 +19717,25 @@ RT_ENUM! { enum MediaPlayerError: i32 { 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(&self, out: *mut MediaPlayerError) -> HRESULT, - fn get_ExtendedErrorCode(&self, out: *mut super::super::foundation::HResult) -> HRESULT, + fn get_ExtendedErrorCode(&self, out: *mut foundation::HResult) -> HRESULT, fn get_ErrorMessage(&self, out: *mut HSTRING) -> HRESULT }} impl IMediaPlayerFailedEventArgs { - #[inline] pub unsafe fn get_error(&self) -> Result { + #[inline] pub fn get_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Error)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_error_code(&self) -> Result { + }} + #[inline] pub fn get_extended_error_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedErrorCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_error_message(&self) -> Result { + }} + #[inline] pub fn get_error_message(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ErrorMessage)(self as *const _ as *mut _, &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); @@ -19743,11 +19743,11 @@ RT_INTERFACE!{interface IMediaPlayerRateChangedEventArgs(IMediaPlayerRateChanged fn get_NewRate(&self, out: *mut f64) -> HRESULT }} impl IMediaPlayerRateChangedEventArgs { - #[inline] pub unsafe fn get_new_rate(&self) -> Result { + #[inline] pub fn get_new_rate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NewRate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MediaPlayerRateChangedEventArgs: IMediaPlayerRateChangedEventArgs} DEFINE_IID!(IID_IMediaPlayerSource, 3176106135, 5155, 19518, 130, 197, 15, 177, 175, 148, 247, 21); @@ -19761,27 +19761,27 @@ RT_INTERFACE!{interface IMediaPlayerSource(IMediaPlayerSourceVtbl): IInspectable fn SetMediaSource(&self, source: *mut super::core::IMediaSource) -> HRESULT }} impl IMediaPlayerSource { - #[inline] pub unsafe fn get_protection_manager(&self) -> Result> { + #[inline] pub fn get_protection_manager(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProtectionManager)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_protection_manager(&self, value: &super::protection::MediaProtectionManager) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_protection_manager(&self, value: &super::protection::MediaProtectionManager) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ProtectionManager)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn set_file_source(&self, file: &super::super::storage::IStorageFile) -> Result<()> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_file_source(&self, file: &super::super::storage::IStorageFile) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetFileSource)(self as *const _ as *mut _, file as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn set_stream_source(&self, stream: &super::super::storage::streams::IRandomAccessStream) -> Result<()> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_stream_source(&self, stream: &super::super::storage::streams::IRandomAccessStream) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetStreamSource)(self as *const _ as *mut _, stream as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_media_source(&self, source: &super::core::IMediaSource) -> Result<()> { + }} + #[inline] pub fn set_media_source(&self, source: &super::core::IMediaSource) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetMediaSource)(self as *const _ as *mut _, 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] { @@ -19789,15 +19789,15 @@ RT_INTERFACE!{interface IMediaPlayerSource2(IMediaPlayerSource2Vtbl): IInspectab fn put_Source(&self, value: *mut IMediaPlaybackSource) -> HRESULT }} impl IMediaPlayerSource2 { - #[inline] pub unsafe fn get_source(&self) -> Result> { + #[inline] pub fn get_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Source)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_source(&self, value: &IMediaPlaybackSource) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_source(&self, value: &IMediaPlaybackSource) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Source)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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, @@ -19811,84 +19811,84 @@ RT_INTERFACE!{interface IMediaPlayerSurface(IMediaPlayerSurfaceVtbl): IInspectab fn get_MediaPlayer(&self, out: *mut *mut MediaPlayer) -> HRESULT }} impl IMediaPlayerSurface { - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_composition_surface(&self) -> Result> { + #[cfg(feature="windows-ui")] #[inline] pub fn get_composition_surface(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CompositionSurface)(self 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_compositor(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_compositor(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Compositor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_media_player(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_media_player(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MediaPlayer)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaPlayerSurface: IMediaPlayerSurface} 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(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_Time(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn get_MediaMarkerType(&self, out: *mut HSTRING) -> HRESULT, fn get_Text(&self, out: *mut HSTRING) -> HRESULT }} impl IPlaybackMediaMarker { - #[inline] pub unsafe fn get_time(&self) -> Result { + #[inline] pub fn get_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Time)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_media_marker_type(&self) -> Result { + }} + #[inline] pub fn get_media_marker_type(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MediaMarkerType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_text(&self) -> Result { + }} + #[inline] pub fn get_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Text)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PlaybackMediaMarker: IPlaybackMediaMarker} impl RtActivatable for PlaybackMediaMarker {} impl PlaybackMediaMarker { - #[inline] pub fn create_from_time(value: super::super::foundation::TimeSpan) -> Result> { unsafe { + #[inline] pub fn create_from_time(value: foundation::TimeSpan) -> Result> { >::get_activation_factory().create_from_time(value) - }} - #[inline] pub fn create(value: super::super::foundation::TimeSpan, mediaMarketType: &HStringArg, text: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create(value: foundation::TimeSpan, mediaMarketType: &HStringArg, text: &HStringArg) -> Result> { >::get_activation_factory().create(value, mediaMarketType, text) - }} + } } DEFINE_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]) [CLSID_PlaybackMediaMarker]); 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(&self, value: super::super::foundation::TimeSpan, out: *mut *mut PlaybackMediaMarker) -> HRESULT, - fn Create(&self, value: super::super::foundation::TimeSpan, mediaMarketType: HSTRING, text: HSTRING, out: *mut *mut PlaybackMediaMarker) -> HRESULT + fn CreateFromTime(&self, value: foundation::TimeSpan, out: *mut *mut PlaybackMediaMarker) -> HRESULT, + fn Create(&self, value: foundation::TimeSpan, mediaMarketType: HSTRING, text: HSTRING, out: *mut *mut PlaybackMediaMarker) -> HRESULT }} impl IPlaybackMediaMarkerFactory { - #[inline] pub unsafe fn create_from_time(&self, value: super::super::foundation::TimeSpan) -> Result> { + #[inline] pub fn create_from_time(&self, value: foundation::TimeSpan) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromTime)(self as *const _ as *mut _, value, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create(&self, value: super::super::foundation::TimeSpan, mediaMarketType: &HStringArg, text: &HStringArg) -> Result> { + }} + #[inline] pub fn create(&self, value: foundation::TimeSpan, mediaMarketType: &HStringArg, text: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, value, mediaMarketType.get(), text.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut PlaybackMediaMarker) -> HRESULT }} impl IPlaybackMediaMarkerReachedEventArgs { - #[inline] pub unsafe fn get_playback_media_marker(&self) -> Result> { + #[inline] pub fn get_playback_media_marker(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PlaybackMediaMarker)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PlaybackMediaMarkerReachedEventArgs: IPlaybackMediaMarkerReachedEventArgs} DEFINE_IID!(IID_IPlaybackMediaMarkerSequence, 4068543726, 25483, 18127, 136, 23, 29, 17, 31, 233, 216, 196); @@ -19898,19 +19898,19 @@ RT_INTERFACE!{interface IPlaybackMediaMarkerSequence(IPlaybackMediaMarkerSequenc fn Clear(&self) -> HRESULT }} impl IPlaybackMediaMarkerSequence { - #[inline] pub unsafe fn get_size(&self) -> Result { + #[inline] pub fn get_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Size)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn insert(&self, value: &PlaybackMediaMarker) -> Result<()> { + }} + #[inline] pub fn insert(&self, value: &PlaybackMediaMarker) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Insert)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn clear(&self) -> Result<()> { + }} + #[inline] pub fn clear(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Clear)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PlaybackMediaMarkerSequence: IPlaybackMediaMarkerSequence} RT_ENUM! { enum SphericalVideoProjectionMode: i32 { @@ -19926,21 +19926,21 @@ RT_INTERFACE!{interface ITimedMetadataPresentationModeChangedEventArgs(ITimedMet fn get_NewPresentationMode(&self, out: *mut TimedMetadataTrackPresentationMode) -> HRESULT }} impl ITimedMetadataPresentationModeChangedEventArgs { - #[inline] pub unsafe fn get_track(&self) -> Result> { + #[inline] pub fn get_track(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Track)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_old_presentation_mode(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_old_presentation_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OldPresentationMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_new_presentation_mode(&self) -> Result { + }} + #[inline] pub fn get_new_presentation_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NewPresentationMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class TimedMetadataPresentationModeChangedEventArgs: ITimedMetadataPresentationModeChangedEventArgs} RT_ENUM! { enum TimedMetadataTrackPresentationMode: i32 { @@ -19951,14 +19951,14 @@ pub mod playto { // Windows.Media.PlayTo use ::prelude::*; 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(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + fn get_Time(&self, out: *mut foundation::TimeSpan) -> HRESULT }} impl ICurrentTimeChangeRequestedEventArgs { - #[inline] pub unsafe fn get_time(&self) -> Result { + #[inline] pub fn get_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Time)(self as *const _ as *mut _, &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); @@ -19966,11 +19966,11 @@ RT_INTERFACE!{interface IMuteChangeRequestedEventArgs(IMuteChangeRequestedEventA fn get_Mute(&self, out: *mut bool) -> HRESULT }} impl IMuteChangeRequestedEventArgs { - #[inline] pub unsafe fn get_mute(&self) -> Result { + #[inline] pub fn get_mute(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Mute)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MuteChangeRequestedEventArgs: IMuteChangeRequestedEventArgs} DEFINE_IID!(IID_IPlaybackRateChangeRequestedEventArgs, 257319342, 11400, 19658, 133, 64, 213, 134, 9, 93, 19, 165); @@ -19978,56 +19978,56 @@ RT_INTERFACE!{interface IPlaybackRateChangeRequestedEventArgs(IPlaybackRateChang fn get_Rate(&self, out: *mut f64) -> HRESULT }} impl IPlaybackRateChangeRequestedEventArgs { - #[inline] pub unsafe fn get_rate(&self) -> Result { + #[inline] pub fn get_rate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Rate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PlaybackRateChangeRequestedEventArgs: IPlaybackRateChangeRequestedEventArgs} 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(&self, out: *mut PlayToConnectionState) -> HRESULT, - fn add_StateChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StateChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Transferred(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Transferred(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Error(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Error(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_StateChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StateChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Transferred(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Transferred(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Error(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Error(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IPlayToConnection { - #[inline] pub unsafe fn get_state(&self) -> Result { + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_state_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_state_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StateChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_state_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_state_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StateChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_transferred(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_transferred(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Transferred)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_transferred(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_transferred(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Transferred)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_error(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_error(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Error)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_error(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_error(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Error)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PlayToConnection: IPlayToConnection} RT_ENUM! { enum PlayToConnectionError: i32 { @@ -20039,16 +20039,16 @@ RT_INTERFACE!{interface IPlayToConnectionErrorEventArgs(IPlayToConnectionErrorEv fn get_Message(&self, out: *mut HSTRING) -> HRESULT }} impl IPlayToConnectionErrorEventArgs { - #[inline] pub unsafe fn get_code(&self) -> Result { + #[inline] pub fn get_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Code)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_message(&self) -> Result { + }} + #[inline] pub fn get_message(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Message)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PlayToConnectionErrorEventArgs: IPlayToConnectionErrorEventArgs} RT_ENUM! { enum PlayToConnectionState: i32 { @@ -20060,16 +20060,16 @@ RT_INTERFACE!{interface IPlayToConnectionStateChangedEventArgs(IPlayToConnection fn get_CurrentState(&self, out: *mut PlayToConnectionState) -> HRESULT }} impl IPlayToConnectionStateChangedEventArgs { - #[inline] pub unsafe fn get_previous_state(&self) -> Result { + #[inline] pub fn get_previous_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PreviousState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_state(&self) -> Result { + }} + #[inline] pub fn get_current_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CurrentState)(self as *const _ as *mut _, &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); @@ -20078,65 +20078,65 @@ RT_INTERFACE!{interface IPlayToConnectionTransferredEventArgs(IPlayToConnectionT fn get_CurrentSource(&self, out: *mut *mut PlayToSource) -> HRESULT }} impl IPlayToConnectionTransferredEventArgs { - #[inline] pub unsafe fn get_previous_source(&self) -> Result> { + #[inline] pub fn get_previous_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PreviousSource)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_source(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_current_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CurrentSource)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PlayToConnectionTransferredEventArgs: IPlayToConnectionTransferredEventArgs} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SourceRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_SourceSelected(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SourceSelected(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_SourceRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_SourceSelected(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceSelected(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn put_DefaultSourceSelection(&self, value: bool) -> HRESULT, fn get_DefaultSourceSelection(&self, out: *mut bool) -> HRESULT }} impl IPlayToManager { - #[inline] pub unsafe fn add_source_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_source_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SourceRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_source_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_source_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SourceRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_source_selected(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_source_selected(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SourceSelected)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_source_selected(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_source_selected(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SourceSelected)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_default_source_selection(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_default_source_selection(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DefaultSourceSelection)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_source_selection(&self) -> Result { + }} + #[inline] pub fn get_default_source_selection(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DefaultSourceSelection)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PlayToManager: IPlayToManager} impl RtActivatable for PlayToManager {} impl PlayToManager { - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} - #[inline] pub fn show_play_to_ui() -> Result<()> { unsafe { + } + #[inline] pub fn show_play_to_ui() -> Result<()> { >::get_activation_factory().show_play_to_ui() - }} + } } DEFINE_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]) [CLSID_PlayToManager]); DEFINE_IID!(IID_IPlayToManagerStatics, 1692838023, 14722, 20283, 186, 32, 97, 85, 228, 53, 50, 91); @@ -20145,41 +20145,41 @@ RT_INTERFACE!{static interface IPlayToManagerStatics(IPlayToManagerStaticsVtbl): fn ShowPlayToUI(&self) -> HRESULT }} impl IPlayToManagerStatics { - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn show_play_to_ui(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn show_play_to_ui(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ShowPlayToUI)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PlayRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PauseRequested(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PauseRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_SourceChangeRequested(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SourceChangeRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PlaybackRateChangeRequested(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PlaybackRateChangeRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_CurrentTimeChangeRequested(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CurrentTimeChangeRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_MuteChangeRequested(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_MuteChangeRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_VolumeChangeRequested(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_VolumeChangeRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_TimeUpdateRequested(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_TimeUpdateRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_StopRequested(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StopRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PlayRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PlayRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PauseRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PauseRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_SourceChangeRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceChangeRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PlaybackRateChangeRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PlaybackRateChangeRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_CurrentTimeChangeRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CurrentTimeChangeRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_MuteChangeRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_MuteChangeRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_VolumeChangeRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_VolumeChangeRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_TimeUpdateRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_TimeUpdateRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_StopRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StopRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn NotifyVolumeChange(&self, volume: f64, mute: bool) -> HRESULT, fn NotifyRateChange(&self, rate: f64) -> HRESULT, fn NotifyLoadedMetadata(&self) -> HRESULT, - fn NotifyTimeUpdate(&self, currentTime: super::super::foundation::TimeSpan) -> HRESULT, - fn NotifyDurationChange(&self, duration: super::super::foundation::TimeSpan) -> HRESULT, + fn NotifyTimeUpdate(&self, currentTime: foundation::TimeSpan) -> HRESULT, + fn NotifyDurationChange(&self, duration: foundation::TimeSpan) -> HRESULT, fn NotifySeeking(&self) -> HRESULT, fn NotifySeeked(&self) -> HRESULT, fn NotifyPaused(&self) -> HRESULT, @@ -20195,191 +20195,191 @@ RT_INTERFACE!{interface IPlayToReceiver(IPlayToReceiverVtbl): IInspectable(IInsp fn get_SupportsAudio(&self, out: *mut bool) -> HRESULT, fn put_SupportsVideo(&self, value: bool) -> HRESULT, fn get_SupportsVideo(&self, out: *mut bool) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::IPropertySet) -> HRESULT, - fn StartAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn StopAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn get_Properties(&self, out: *mut *mut foundation::collections::IPropertySet) -> HRESULT, + fn StartAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn StopAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IPlayToReceiver { - #[inline] pub unsafe fn add_play_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_play_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PlayRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_play_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_play_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PlayRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pause_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_pause_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PauseRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pause_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pause_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PauseRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_source_change_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_source_change_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SourceChangeRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_source_change_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_source_change_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SourceChangeRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_playback_rate_change_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_playback_rate_change_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PlaybackRateChangeRequested)(self as *const _ as *mut _, 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(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_playback_rate_change_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PlaybackRateChangeRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_current_time_change_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_current_time_change_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CurrentTimeChangeRequested)(self as *const _ as *mut _, 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(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_current_time_change_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CurrentTimeChangeRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_mute_change_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_mute_change_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_MuteChangeRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_mute_change_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_mute_change_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_MuteChangeRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_volume_change_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_volume_change_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_VolumeChangeRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_volume_change_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_volume_change_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_VolumeChangeRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_time_update_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_time_update_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_TimeUpdateRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_time_update_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_time_update_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_TimeUpdateRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_stop_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_stop_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StopRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_stop_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_stop_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StopRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn notify_volume_change(&self, volume: f64, mute: bool) -> Result<()> { + }} + #[inline] pub fn notify_volume_change(&self, volume: f64, mute: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).NotifyVolumeChange)(self as *const _ as *mut _, volume, mute); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn notify_rate_change(&self, rate: f64) -> Result<()> { + }} + #[inline] pub fn notify_rate_change(&self, rate: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).NotifyRateChange)(self as *const _ as *mut _, rate); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn notify_loaded_metadata(&self) -> Result<()> { + }} + #[inline] pub fn notify_loaded_metadata(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).NotifyLoadedMetadata)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn notify_time_update(&self, currentTime: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn notify_time_update(&self, currentTime: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).NotifyTimeUpdate)(self as *const _ as *mut _, currentTime); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn notify_duration_change(&self, duration: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn notify_duration_change(&self, duration: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).NotifyDurationChange)(self as *const _ as *mut _, duration); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn notify_seeking(&self) -> Result<()> { + }} + #[inline] pub fn notify_seeking(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).NotifySeeking)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn notify_seeked(&self) -> Result<()> { + }} + #[inline] pub fn notify_seeked(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).NotifySeeked)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn notify_paused(&self) -> Result<()> { + }} + #[inline] pub fn notify_paused(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).NotifyPaused)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn notify_playing(&self) -> Result<()> { + }} + #[inline] pub fn notify_playing(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).NotifyPlaying)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn notify_ended(&self) -> Result<()> { + }} + #[inline] pub fn notify_ended(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).NotifyEnded)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn notify_error(&self) -> Result<()> { + }} + #[inline] pub fn notify_error(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).NotifyError)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn notify_stopped(&self) -> Result<()> { + }} + #[inline] pub fn notify_stopped(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).NotifyStopped)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_friendly_name(&self) -> Result { + }} + #[inline] pub fn get_friendly_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FriendlyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_friendly_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_friendly_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FriendlyName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_supports_image(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_supports_image(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SupportsImage)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_supports_image(&self) -> Result { + }} + #[inline] pub fn get_supports_image(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SupportsImage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_supports_audio(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_supports_audio(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SupportsAudio)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_supports_audio(&self) -> Result { + }} + #[inline] pub fn get_supports_audio(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SupportsAudio)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_supports_video(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_supports_video(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SupportsVideo)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_supports_video(&self) -> Result { + }} + #[inline] pub fn get_supports_video(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SupportsVideo)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result> { + }} + #[inline] pub fn get_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn start_async(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn start_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn stop_async(&self) -> Result> { + }} + #[inline] pub fn stop_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StopAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PlayToReceiver: IPlayToReceiver} impl RtActivatable for PlayToReceiver {} @@ -20392,24 +20392,24 @@ RT_INTERFACE!{interface IPlayToSource(IPlayToSourceVtbl): IInspectable(IInspecta fn PlayNext(&self) -> HRESULT }} impl IPlayToSource { - #[inline] pub unsafe fn get_connection(&self) -> Result> { + #[inline] pub fn get_connection(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Connection)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_next(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_next(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Next)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_next(&self, value: &PlayToSource) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_next(&self, value: &PlayToSource) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Next)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn play_next(&self) -> Result<()> { + }} + #[inline] pub fn play_next(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).PlayNext)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PlayToSource: IPlayToSource} DEFINE_IID!(IID_IPlayToSourceDeferral, 1090554141, 10126, 20265, 133, 155, 169, 229, 1, 5, 62, 125); @@ -20417,38 +20417,38 @@ RT_INTERFACE!{interface IPlayToSourceDeferral(IPlayToSourceDeferralVtbl): IInspe fn Complete(&self) -> HRESULT }} impl IPlayToSourceDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); 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(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Deadline(&self, out: *mut foundation::DateTime) -> HRESULT, fn DisplayErrorString(&self, errorString: HSTRING) -> HRESULT, fn GetDeferral(&self, out: *mut *mut PlayToSourceDeferral) -> HRESULT, fn SetSource(&self, value: *mut PlayToSource) -> HRESULT }} impl IPlayToSourceRequest { - #[inline] pub unsafe fn get_deadline(&self) -> Result { + #[inline] pub fn get_deadline(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Deadline)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn display_error_string(&self, errorString: &HStringArg) -> Result<()> { + }} + #[inline] pub fn display_error_string(&self, errorString: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).DisplayErrorString)(self as *const _ as *mut _, errorString.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_source(&self, value: &PlayToSource) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_source(&self, value: &PlayToSource) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetSource)(self as *const _ as *mut _, 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); @@ -20456,11 +20456,11 @@ RT_INTERFACE!{interface IPlayToSourceRequestedEventArgs(IPlayToSourceRequestedEv fn get_SourceRequest(&self, out: *mut *mut PlayToSourceRequest) -> HRESULT }} impl IPlayToSourceRequestedEventArgs { - #[inline] pub unsafe fn get_source_request(&self) -> Result> { + #[inline] pub fn get_source_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SourceRequest)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PlayToSourceRequestedEventArgs: IPlayToSourceRequestedEventArgs} DEFINE_IID!(IID_IPlayToSourceSelectedEventArgs, 211649809, 20994, 19915, 140, 103, 171, 218, 18, 187, 60, 18); @@ -20473,48 +20473,48 @@ RT_INTERFACE!{interface IPlayToSourceSelectedEventArgs(IPlayToSourceSelectedEven fn get_SupportsVideo(&self, out: *mut bool) -> HRESULT }} impl IPlayToSourceSelectedEventArgs { - #[inline] pub unsafe fn get_friendly_name(&self) -> Result { + #[inline] pub fn get_friendly_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FriendlyName)(self 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 get_icon(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_icon(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Icon)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supports_image(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_supports_image(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SupportsImage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_supports_audio(&self) -> Result { + }} + #[inline] pub fn get_supports_audio(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SupportsAudio)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_supports_video(&self) -> Result { + }} + #[inline] pub fn get_supports_video(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SupportsVideo)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PlayToSourceSelectedEventArgs: IPlayToSourceSelectedEventArgs} 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(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_PreferredSourceUri(&self, value: *mut super::super::foundation::Uri) -> HRESULT + fn get_PreferredSourceUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_PreferredSourceUri(&self, value: *mut foundation::Uri) -> HRESULT }} impl IPlayToSourceWithPreferredSourceUri { - #[inline] pub unsafe fn get_preferred_source_uri(&self) -> Result> { + #[inline] pub fn get_preferred_source_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PreferredSourceUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_preferred_source_uri(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_preferred_source_uri(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PreferredSourceUri)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ISourceChangeRequestedEventArgs, 4215224982, 31398, 19083, 134, 231, 84, 246, 198, 211, 79, 100); RT_INTERFACE!{interface ISourceChangeRequestedEventArgs(ISourceChangeRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISourceChangeRequestedEventArgs] { @@ -20525,63 +20525,63 @@ RT_INTERFACE!{interface ISourceChangeRequestedEventArgs(ISourceChangeRequestedEv fn get_Album(&self, out: *mut HSTRING) -> HRESULT, fn get_Genre(&self, out: *mut HSTRING) -> HRESULT, fn get_Description(&self, out: *mut HSTRING) -> HRESULT, - fn get_Date(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_Date(&self, out: *mut *mut foundation::IReference) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy7(&self) -> (), #[cfg(feature="windows-storage")] fn get_Thumbnail(&self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, - fn get_Rating(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT + fn get_Rating(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_Properties(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT }} impl ISourceChangeRequestedEventArgs { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_stream(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_stream(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Stream)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_title(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_author(&self) -> Result { + }} + #[inline] pub fn get_author(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Author)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_album(&self) -> Result { + }} + #[inline] pub fn get_album(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Album)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_genre(&self) -> Result { + }} + #[inline] pub fn get_genre(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Genre)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_description(&self) -> Result { + }} + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_date(&self) -> Result>> { + }} + #[inline] pub fn get_date(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Date)(self 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_thumbnail(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_thumbnail(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Thumbnail)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rating(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_rating(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Rating)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SourceChangeRequestedEventArgs: ISourceChangeRequestedEventArgs} DEFINE_IID!(IID_IVolumeChangeRequestedEventArgs, 1862430044, 53109, 19499, 145, 62, 109, 124, 108, 50, 145, 121); @@ -20589,11 +20589,11 @@ RT_INTERFACE!{interface IVolumeChangeRequestedEventArgs(IVolumeChangeRequestedEv fn get_Volume(&self, out: *mut f64) -> HRESULT }} impl IVolumeChangeRequestedEventArgs { - #[inline] pub unsafe fn get_volume(&self) -> Result { + #[inline] pub fn get_volume(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Volume)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class VolumeChangeRequestedEventArgs: IVolumeChangeRequestedEventArgs} } // Windows.Media.PlayTo @@ -20605,16 +20605,16 @@ RT_INTERFACE!{interface IComponentLoadFailedEventArgs(IComponentLoadFailedEventA fn get_Completion(&self, out: *mut *mut MediaProtectionServiceCompletion) -> HRESULT }} impl IComponentLoadFailedEventArgs { - #[inline] pub unsafe fn get_information(&self) -> Result> { + #[inline] pub fn get_information(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Information)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_completion(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_completion(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Completion)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ComponentLoadFailedEventArgs: IComponentLoadFailedEventArgs} DEFINE_IID!(IID_ComponentLoadFailedEventHandler, 2514117692, 28089, 16971, 134, 202, 9, 26, 244, 50, 8, 28); @@ -20622,29 +20622,29 @@ RT_DELEGATE!{delegate ComponentLoadFailedEventHandler(ComponentLoadFailedEventHa fn Invoke(&self, sender: *mut MediaProtectionManager, e: *mut ComponentLoadFailedEventArgs) -> HRESULT }} impl ComponentLoadFailedEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &MediaProtectionManager, e: &ComponentLoadFailedEventArgs) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &MediaProtectionManager, e: &ComponentLoadFailedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, e as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{static class ComponentRenewal} impl RtActivatable for ComponentRenewal {} impl ComponentRenewal { - #[inline] pub fn renew_system_components_async(information: &RevocationAndRenewalInformation) -> Result>> { unsafe { + #[inline] pub fn renew_system_components_async(information: &RevocationAndRenewalInformation) -> Result>> { >::get_activation_factory().renew_system_components_async(information) - }} + } } DEFINE_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]) [CLSID_ComponentRenewal]); 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(&self, information: *mut RevocationAndRenewalInformation, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT + fn RenewSystemComponentsAsync(&self, information: *mut RevocationAndRenewalInformation, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT }} impl IComponentRenewalStatics { - #[inline] pub unsafe fn renew_system_components_async(&self, information: &RevocationAndRenewalInformation) -> Result>> { + #[inline] pub fn renew_system_components_async(&self, information: &RevocationAndRenewalInformation) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RenewSystemComponentsAsync)(self as *const _ as *mut _, information as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::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, @@ -20655,36 +20655,36 @@ RT_ENUM! { enum HdcpProtection: i32 { 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(&self, protection: HdcpProtection, out: *mut bool) -> HRESULT, - fn GetEffectiveProtection(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn SetDesiredMinProtectionAsync(&self, protection: HdcpProtection, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_ProtectionChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ProtectionChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn GetEffectiveProtection(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn SetDesiredMinProtectionAsync(&self, protection: HdcpProtection, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_ProtectionChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ProtectionChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IHdcpSession { - #[inline] pub unsafe fn is_effective_protection_at_least(&self, protection: HdcpProtection) -> Result { + #[inline] pub fn is_effective_protection_at_least(&self, protection: HdcpProtection) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsEffectiveProtectionAtLeast)(self as *const _ as *mut _, protection, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_effective_protection(&self) -> Result>> { + }} + #[inline] pub fn get_effective_protection(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetEffectiveProtection)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_desired_min_protection_async(&self, protection: HdcpProtection) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_desired_min_protection_async(&self, protection: HdcpProtection) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetDesiredMinProtectionAsync)(self as *const _ as *mut _, protection, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_protection_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_protection_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ProtectionChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_protection_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_protection_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ProtectionChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class HdcpSession: IHdcpSession} impl RtActivatable for HdcpSession {} @@ -20694,90 +20694,90 @@ RT_ENUM! { enum HdcpSetProtectionResult: i32 { }} 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(&self, handler: *mut ServiceRequestedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ServiceRequested(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_RebootNeeded(&self, handler: *mut RebootNeededEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RebootNeeded(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ComponentLoadFailed(&self, handler: *mut ComponentLoadFailedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ComponentLoadFailed(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::IPropertySet) -> HRESULT + fn add_ServiceRequested(&self, handler: *mut ServiceRequestedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ServiceRequested(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_RebootNeeded(&self, handler: *mut RebootNeededEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RebootNeeded(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_ComponentLoadFailed(&self, handler: *mut ComponentLoadFailedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ComponentLoadFailed(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn get_Properties(&self, out: *mut *mut foundation::collections::IPropertySet) -> HRESULT }} impl IMediaProtectionManager { - #[inline] pub unsafe fn add_service_requested(&self, handler: &ServiceRequestedEventHandler) -> Result { + #[inline] pub fn add_service_requested(&self, handler: &ServiceRequestedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ServiceRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_service_requested(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_service_requested(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ServiceRequested)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_reboot_needed(&self, handler: &RebootNeededEventHandler) -> Result { + }} + #[inline] pub fn add_reboot_needed(&self, handler: &RebootNeededEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RebootNeeded)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_reboot_needed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_reboot_needed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RebootNeeded)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_component_load_failed(&self, handler: &ComponentLoadFailedEventHandler) -> Result { + }} + #[inline] pub fn add_component_load_failed(&self, handler: &ComponentLoadFailedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ComponentLoadFailed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_component_load_failed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_component_load_failed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ComponentLoadFailed)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result> { + }} + #[inline] pub fn get_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaProtectionManager: IMediaProtectionManager} impl RtActivatable for MediaProtectionManager {} DEFINE_CLSID!(MediaProtectionManager(&[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,77,97,110,97,103,101,114,0]) [CLSID_MediaProtectionManager]); 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(&self, out: *mut *mut super::super::foundation::collections::IPropertySet) -> HRESULT + fn get_Properties(&self, out: *mut *mut foundation::collections::IPropertySet) -> HRESULT }} impl IMediaProtectionPMPServer { - #[inline] pub unsafe fn get_properties(&self) -> Result> { + #[inline] pub fn get_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaProtectionPMPServer: IMediaProtectionPMPServer} impl RtActivatable for MediaProtectionPMPServer {} impl MediaProtectionPMPServer { - #[inline] pub fn create_pmpserver(pProperties: &super::super::foundation::collections::IPropertySet) -> Result> { unsafe { + #[inline] pub fn create_pmpserver(pProperties: &foundation::collections::IPropertySet) -> Result> { >::get_activation_factory().create_pmpserver(pProperties) - }} + } } DEFINE_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]) [CLSID_MediaProtectionPMPServer]); 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(&self, pProperties: *mut super::super::foundation::collections::IPropertySet, out: *mut *mut MediaProtectionPMPServer) -> HRESULT + fn CreatePMPServer(&self, pProperties: *mut foundation::collections::IPropertySet, out: *mut *mut MediaProtectionPMPServer) -> HRESULT }} impl IMediaProtectionPMPServerFactory { - #[inline] pub unsafe fn create_pmpserver(&self, pProperties: &super::super::foundation::collections::IPropertySet) -> Result> { + #[inline] pub fn create_pmpserver(&self, pProperties: &foundation::collections::IPropertySet) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreatePMPServer)(self as *const _ as *mut _, pProperties as *const _ as *mut _, &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(&self, success: bool) -> HRESULT }} impl IMediaProtectionServiceCompletion { - #[inline] pub unsafe fn complete(&self, success: bool) -> Result<()> { + #[inline] pub fn complete(&self, success: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _, success); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MediaProtectionServiceCompletion: IMediaProtectionServiceCompletion} DEFINE_IID!(IID_IMediaProtectionServiceRequest, 2984119974, 8340, 18317, 135, 164, 139, 149, 32, 15, 133, 198); @@ -20786,27 +20786,27 @@ RT_INTERFACE!{interface IMediaProtectionServiceRequest(IMediaProtectionServiceRe fn get_Type(&self, out: *mut Guid) -> HRESULT }} impl IMediaProtectionServiceRequest { - #[inline] pub unsafe fn get_protection_system(&self) -> Result { + #[inline] pub fn get_protection_system(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProtectionSystem)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_type(&self) -> Result { + }} + #[inline] pub fn get_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Type)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, type_: HSTRING, keySystem: HSTRING, out: *mut ProtectionCapabilityResult) -> HRESULT }} impl IProtectionCapabilities { - #[inline] pub unsafe fn is_type_supported(&self, type_: &HStringArg, keySystem: &HStringArg) -> Result { + #[inline] pub fn is_type_supported(&self, type_: &HStringArg, keySystem: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsTypeSupported)(self as *const _ as *mut _, type_.get(), keySystem.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ProtectionCapabilities: IProtectionCapabilities} impl RtActivatable for ProtectionCapabilities {} @@ -20819,24 +20819,24 @@ RT_DELEGATE!{delegate RebootNeededEventHandler(RebootNeededEventHandlerVtbl, Reb fn Invoke(&self, sender: *mut MediaProtectionManager) -> HRESULT }} impl RebootNeededEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &MediaProtectionManager) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &MediaProtectionManager) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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_IRevocationAndRenewalInformation, 4087452539, 9473, 17310, 166, 231, 111, 201, 94, 23, 95, 207); RT_INTERFACE!{interface IRevocationAndRenewalInformation(IRevocationAndRenewalInformationVtbl): IInspectable(IInspectableVtbl) [IID_IRevocationAndRenewalInformation] { - fn get_Items(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_Items(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IRevocationAndRenewalInformation { - #[inline] pub unsafe fn get_items(&self) -> Result>> { + #[inline] pub fn get_items(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Items)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RevocationAndRenewalInformation: IRevocationAndRenewalInformation} DEFINE_IID!(IID_IRevocationAndRenewalItem, 815383052, 15600, 18922, 144, 45, 202, 243, 45, 45, 222, 44); @@ -20848,31 +20848,31 @@ RT_INTERFACE!{interface IRevocationAndRenewalItem(IRevocationAndRenewalItemVtbl) fn get_RenewalId(&self, out: *mut HSTRING) -> HRESULT }} impl IRevocationAndRenewalItem { - #[inline] pub unsafe fn get_reasons(&self) -> Result { + #[inline] pub fn get_reasons(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Reasons)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_header_hash(&self) -> Result { + }} + #[inline] pub fn get_header_hash(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HeaderHash)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_public_key_hash(&self) -> Result { + }} + #[inline] pub fn get_public_key_hash(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PublicKeyHash)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_name(&self) -> Result { + }} + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_renewal_id(&self) -> Result { + }} + #[inline] pub fn get_renewal_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RenewalId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class RevocationAndRenewalItem: IRevocationAndRenewalItem} RT_ENUM! { enum RevocationAndRenewalReasons: u32 { @@ -20884,16 +20884,16 @@ RT_INTERFACE!{interface IServiceRequestedEventArgs(IServiceRequestedEventArgsVtb fn get_Completion(&self, out: *mut *mut MediaProtectionServiceCompletion) -> HRESULT }} impl IServiceRequestedEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_completion(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_completion(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Completion)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ServiceRequestedEventArgs: IServiceRequestedEventArgs} DEFINE_IID!(IID_IServiceRequestedEventArgs2, 1430022614, 64254, 16680, 141, 250, 19, 14, 57, 138, 19, 167); @@ -20901,21 +20901,21 @@ RT_INTERFACE!{interface IServiceRequestedEventArgs2(IServiceRequestedEventArgs2V fn get_MediaPlaybackItem(&self, out: *mut *mut super::playback::MediaPlaybackItem) -> HRESULT }} impl IServiceRequestedEventArgs2 { - #[inline] pub unsafe fn get_media_playback_item(&self) -> Result> { + #[inline] pub fn get_media_playback_item(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MediaPlaybackItem)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, sender: *mut MediaProtectionManager, e: *mut ServiceRequestedEventArgs) -> HRESULT }} impl ServiceRequestedEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &MediaProtectionManager, e: &ServiceRequestedEventArgs) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &MediaProtectionManager, e: &ServiceRequestedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, e as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } pub mod playready { // Windows.Media.Protection.PlayReady use ::prelude::*; @@ -20930,93 +20930,93 @@ RT_ENUM! { enum NDCertificateType: i32 { }} 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(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RegistrationCompleted(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_ProximityDetectionCompleted(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ProximityDetectionCompleted(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_LicenseFetchCompleted(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_LicenseFetchCompleted(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_ReRegistrationNeeded(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ReRegistrationNeeded(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_ClosedCaptionDataReceived(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ClosedCaptionDataReceived(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn StartAsync(&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(&self, licenseFetchDescriptor: *mut INDLicenseFetchDescriptor, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn ReRegistrationAsync(&self, registrationCustomData: *mut INDCustomData, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn add_RegistrationCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RegistrationCompleted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ProximityDetectionCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ProximityDetectionCompleted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_LicenseFetchCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_LicenseFetchCompleted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ReRegistrationNeeded(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ReRegistrationNeeded(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ClosedCaptionDataReceived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ClosedCaptionDataReceived(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn StartAsync(&self, contentUrl: *mut foundation::Uri, startAsyncOptions: u32, registrationCustomData: *mut INDCustomData, licenseFetchDescriptor: *mut INDLicenseFetchDescriptor, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn LicenseFetchAsync(&self, licenseFetchDescriptor: *mut INDLicenseFetchDescriptor, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ReRegistrationAsync(&self, registrationCustomData: *mut INDCustomData, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn Close(&self) -> HRESULT }} impl INDClient { - #[inline] pub unsafe fn add_registration_completed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub fn add_registration_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RegistrationCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_registration_completed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_registration_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RegistrationCompleted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_proximity_detection_completed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_proximity_detection_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ProximityDetectionCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_proximity_detection_completed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_proximity_detection_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ProximityDetectionCompleted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_license_fetch_completed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_license_fetch_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_LicenseFetchCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_license_fetch_completed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_license_fetch_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_LicenseFetchCompleted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_re_registration_needed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_re_registration_needed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ReRegistrationNeeded)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_re_registration_needed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_re_registration_needed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ReRegistrationNeeded)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_closed_caption_data_received(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_closed_caption_data_received(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ClosedCaptionDataReceived)(self as *const _ as *mut _, 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(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_closed_caption_data_received(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ClosedCaptionDataReceived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start_async(&self, contentUrl: &::rt::gen::windows::foundation::Uri, startAsyncOptions: u32, registrationCustomData: &INDCustomData, licenseFetchDescriptor: &INDLicenseFetchDescriptor) -> Result>> { + }} + #[inline] pub fn start_async(&self, contentUrl: &foundation::Uri, startAsyncOptions: u32, registrationCustomData: &INDCustomData, licenseFetchDescriptor: &INDLicenseFetchDescriptor) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartAsync)(self as *const _ as *mut _, 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(&self, licenseFetchDescriptor: &INDLicenseFetchDescriptor) -> Result>> { + }} + #[inline] pub fn license_fetch_async(&self, licenseFetchDescriptor: &INDLicenseFetchDescriptor) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LicenseFetchAsync)(self 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 re_registration_async(&self, registrationCustomData: &INDCustomData) -> Result> { + }} + #[inline] pub fn re_registration_async(&self, registrationCustomData: &INDCustomData) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReRegistrationAsync)(self as *const _ as *mut _, registrationCustomData as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn close(&self) -> Result<()> { + }} + #[inline] pub fn close(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Close)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class NDClient: INDClient} impl RtActivatable for NDClient {} impl NDClient { - #[inline] pub fn create_instance(downloadEngine: &INDDownloadEngine, streamParser: &INDStreamParser, pMessenger: &INDMessenger) -> Result> { unsafe { + #[inline] pub fn create_instance(downloadEngine: &INDDownloadEngine, streamParser: &INDStreamParser, pMessenger: &INDMessenger) -> Result> { >::get_activation_factory().create_instance(downloadEngine, streamParser, pMessenger) - }} + } } DEFINE_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]) [CLSID_NDClient]); DEFINE_IID!(IID_INDClientFactory, 1045683554, 65256, 17695, 176, 212, 247, 6, 204, 163, 224, 55); @@ -21024,11 +21024,11 @@ RT_INTERFACE!{static interface INDClientFactory(INDClientFactoryVtbl): IInspecta fn CreateInstance(&self, downloadEngine: *mut INDDownloadEngine, streamParser: *mut INDStreamParser, pMessenger: *mut INDMessenger, out: *mut *mut NDClient) -> HRESULT }} impl INDClientFactory { - #[inline] pub unsafe fn create_instance(&self, downloadEngine: &INDDownloadEngine, streamParser: &INDStreamParser, pMessenger: &INDMessenger) -> Result> { + #[inline] pub fn create_instance(&self, downloadEngine: &INDDownloadEngine, streamParser: &INDStreamParser, pMessenger: &INDMessenger) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self as *const _ as *mut _, 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_INDClosedCaptionDataReceivedEventArgs, 1194906271, 49989, 17993, 132, 104, 184, 197, 252, 53, 113, 144); RT_INTERFACE!{interface INDClosedCaptionDataReceivedEventArgs(INDClosedCaptionDataReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_INDClosedCaptionDataReceivedEventArgs] { @@ -21037,21 +21037,21 @@ RT_INTERFACE!{interface INDClosedCaptionDataReceivedEventArgs(INDClosedCaptionDa fn get_ClosedCaptionData(&self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT }} impl INDClosedCaptionDataReceivedEventArgs { - #[inline] pub unsafe fn get_closed_caption_data_format(&self) -> Result { + #[inline] pub fn get_closed_caption_data_format(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ClosedCaptionDataFormat)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_presentation_timestamp(&self) -> Result { + }} + #[inline] pub fn get_presentation_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PresentationTimestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_closed_caption_data(&self) -> Result> { + }} + #[inline] pub fn get_closed_caption_data(&self) -> Result> { unsafe { let mut outSize = 0; let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ClosedCaptionData)(self as *const _ as *mut _, &mut outSize, &mut out); if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } - } + }} } RT_ENUM! { enum NDClosedCaptionFormat: i32 { ATSC (NDClosedCaptionFormat_ATSC) = 0, SCTE20 (NDClosedCaptionFormat_SCTE20) = 1, Unknown (NDClosedCaptionFormat_Unknown) = 2, @@ -21065,23 +21065,23 @@ RT_INTERFACE!{interface INDCustomData(INDCustomDataVtbl): IInspectable(IInspecta fn get_CustomData(&self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT }} impl INDCustomData { - #[inline] pub unsafe fn get_custom_data_type_id(&self) -> Result> { + #[inline] pub fn get_custom_data_type_id(&self) -> Result> { unsafe { let mut outSize = 0; let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CustomDataTypeID)(self as *const _ as *mut _, &mut outSize, &mut out); if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_custom_data(&self) -> Result> { + }} + #[inline] pub fn get_custom_data(&self) -> Result> { unsafe { let mut outSize = 0; let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CustomData)(self as *const _ as *mut _, &mut outSize, &mut out); if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } - } + }} } RT_CLASS!{class NDCustomData: INDCustomData} impl RtActivatable for NDCustomData {} impl NDCustomData { - #[inline] pub fn create_instance(customDataTypeIDBytes: &[u8], customDataBytes: &[u8]) -> Result> { unsafe { + #[inline] pub fn create_instance(customDataTypeIDBytes: &[u8], customDataBytes: &[u8]) -> Result> { >::get_activation_factory().create_instance(customDataTypeIDBytes, customDataBytes) - }} + } } DEFINE_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]) [CLSID_NDCustomData]); DEFINE_IID!(IID_INDCustomDataFactory, 3595830699, 13348, 18483, 140, 154, 175, 95, 222, 178, 40, 114); @@ -21089,65 +21089,65 @@ RT_INTERFACE!{static interface INDCustomDataFactory(INDCustomDataFactoryVtbl): I fn CreateInstance(&self, customDataTypeIDBytesSize: u32, customDataTypeIDBytes: *mut u8, customDataBytesSize: u32, customDataBytes: *mut u8, out: *mut *mut NDCustomData) -> HRESULT }} impl INDCustomDataFactory { - #[inline] pub unsafe fn create_instance(&self, customDataTypeIDBytes: &[u8], customDataBytes: &[u8]) -> Result> { + #[inline] pub fn create_instance(&self, customDataTypeIDBytes: &[u8], customDataBytes: &[u8]) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self as *const _ as *mut _, 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) } - } + }} } 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(&self, uri: *mut ::rt::gen::windows::foundation::Uri, sessionIDBytesSize: u32, sessionIDBytes: *mut u8) -> HRESULT, + fn Open(&self, uri: *mut foundation::Uri, sessionIDBytesSize: u32, sessionIDBytes: *mut u8) -> HRESULT, fn Pause(&self) -> HRESULT, fn Resume(&self) -> HRESULT, fn Close(&self) -> HRESULT, - fn Seek(&self, startPosition: ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn Seek(&self, startPosition: foundation::TimeSpan) -> HRESULT, fn get_CanSeek(&self, out: *mut bool) -> HRESULT, fn get_BufferFullMinThresholdInSamples(&self, out: *mut u32) -> HRESULT, fn get_BufferFullMaxThresholdInSamples(&self, out: *mut u32) -> HRESULT, fn get_Notifier(&self, out: *mut *mut NDDownloadEngineNotifier) -> HRESULT }} impl INDDownloadEngine { - #[inline] pub unsafe fn open(&self, uri: &::rt::gen::windows::foundation::Uri, sessionIDBytes: &[u8]) -> Result<()> { + #[inline] pub fn open(&self, uri: &foundation::Uri, sessionIDBytes: &[u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Open)(self as *const _ as *mut _, 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(&self) -> Result<()> { + }} + #[inline] pub fn pause(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Pause)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn resume(&self) -> Result<()> { + }} + #[inline] pub fn resume(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Resume)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn close(&self) -> Result<()> { + }} + #[inline] pub fn close(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Close)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn seek(&self, startPosition: ::rt::gen::windows::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn seek(&self, startPosition: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Seek)(self as *const _ as *mut _, startPosition); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_seek(&self) -> Result { + }} + #[inline] pub fn get_can_seek(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanSeek)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_buffer_full_min_threshold_in_samples(&self) -> Result { + }} + #[inline] pub fn get_buffer_full_min_threshold_in_samples(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BufferFullMinThresholdInSamples)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_buffer_full_max_threshold_in_samples(&self) -> Result { + }} + #[inline] pub fn get_buffer_full_max_threshold_in_samples(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BufferFullMaxThresholdInSamples)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_notifier(&self) -> Result> { + }} + #[inline] pub fn get_notifier(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Notifier)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_INDDownloadEngineNotifier, 3609244884, 62648, 17712, 168, 9, 145, 147, 165, 113, 231, 252); RT_INTERFACE!{interface INDDownloadEngineNotifier(INDDownloadEngineNotifierVtbl): IInspectable(IInspectableVtbl) [IID_INDDownloadEngineNotifier] { @@ -21159,30 +21159,30 @@ RT_INTERFACE!{interface INDDownloadEngineNotifier(INDDownloadEngineNotifierVtbl) fn OnNetworkError(&self) -> HRESULT }} impl INDDownloadEngineNotifier { - #[inline] pub unsafe fn on_stream_opened(&self) -> Result<()> { + #[inline] pub fn on_stream_opened(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnStreamOpened)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn on_play_ready_object_received(&self, dataBytes: &[u8]) -> Result<()> { + }} + #[inline] pub fn on_play_ready_object_received(&self, dataBytes: &[u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnPlayReadyObjectReceived)(self as *const _ as *mut _, dataBytes.len() as u32, dataBytes.as_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn on_content_idreceived(&self, licenseFetchDescriptor: &INDLicenseFetchDescriptor) -> Result<()> { + }} + #[inline] pub fn on_content_idreceived(&self, licenseFetchDescriptor: &INDLicenseFetchDescriptor) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnContentIDReceived)(self as *const _ as *mut _, licenseFetchDescriptor as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn on_data_received(&self, dataBytes: &[u8], bytesReceived: u32) -> Result<()> { + }} + #[inline] pub fn on_data_received(&self, dataBytes: &[u8], bytesReceived: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnDataReceived)(self as *const _ as *mut _, 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(&self) -> Result<()> { + }} + #[inline] pub fn on_end_of_stream(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnEndOfStream)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn on_network_error(&self) -> Result<()> { + }} + #[inline] pub fn on_network_error(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnNetworkError)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class NDDownloadEngineNotifier: INDDownloadEngineNotifier} impl RtActivatable for NDDownloadEngineNotifier {} @@ -21192,11 +21192,11 @@ RT_INTERFACE!{interface INDLicenseFetchCompletedEventArgs(INDLicenseFetchComplet fn get_ResponseCustomData(&self, out: *mut *mut INDCustomData) -> HRESULT }} impl INDLicenseFetchCompletedEventArgs { - #[inline] pub unsafe fn get_response_custom_data(&self) -> Result> { + #[inline] pub fn get_response_custom_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResponseCustomData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } 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] { @@ -21206,32 +21206,32 @@ RT_INTERFACE!{interface INDLicenseFetchDescriptor(INDLicenseFetchDescriptorVtbl) fn put_LicenseFetchChallengeCustomData(&self, licenseFetchChallengeCustomData: *mut INDCustomData) -> HRESULT }} impl INDLicenseFetchDescriptor { - #[inline] pub unsafe fn get_content_idtype(&self) -> Result { + #[inline] pub fn get_content_idtype(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ContentIDType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_content_id(&self) -> Result> { + }} + #[inline] pub fn get_content_id(&self) -> Result> { unsafe { let mut outSize = 0; let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContentID)(self as *const _ as *mut _, &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(&self) -> Result> { + }} + #[inline] pub fn get_license_fetch_challenge_custom_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LicenseFetchChallengeCustomData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_license_fetch_challenge_custom_data(&self, licenseFetchChallengeCustomData: &INDCustomData) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_license_fetch_challenge_custom_data(&self, licenseFetchChallengeCustomData: &INDCustomData) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LicenseFetchChallengeCustomData)(self as *const _ as *mut _, licenseFetchChallengeCustomData as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class NDLicenseFetchDescriptor: INDLicenseFetchDescriptor} impl RtActivatable for NDLicenseFetchDescriptor {} impl NDLicenseFetchDescriptor { - #[inline] pub fn create_instance(contentIDType: NDContentIDType, contentIDBytes: &[u8], licenseFetchChallengeCustomData: &INDCustomData) -> Result> { unsafe { + #[inline] pub fn create_instance(contentIDType: NDContentIDType, contentIDBytes: &[u8], licenseFetchChallengeCustomData: &INDCustomData) -> Result> { >::get_activation_factory().create_instance(contentIDType, contentIDBytes, licenseFetchChallengeCustomData) - }} + } } DEFINE_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]) [CLSID_NDLicenseFetchDescriptor]); DEFINE_IID!(IID_INDLicenseFetchDescriptorFactory, 3489862146, 53164, 20224, 174, 106, 151, 175, 128, 184, 72, 242); @@ -21239,65 +21239,65 @@ RT_INTERFACE!{static interface INDLicenseFetchDescriptorFactory(INDLicenseFetchD fn CreateInstance(&self, contentIDType: NDContentIDType, contentIDBytesSize: u32, contentIDBytes: *mut u8, licenseFetchChallengeCustomData: *mut INDCustomData, out: *mut *mut NDLicenseFetchDescriptor) -> HRESULT }} impl INDLicenseFetchDescriptorFactory { - #[inline] pub unsafe fn create_instance(&self, contentIDType: NDContentIDType, contentIDBytes: &[u8], licenseFetchChallengeCustomData: &INDCustomData) -> Result> { + #[inline] pub fn create_instance(&self, contentIDType: NDContentIDType, contentIDBytes: &[u8], licenseFetchChallengeCustomData: &INDCustomData) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self as *const _ as *mut _, 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) } - } + }} } 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(&self, out: *mut *mut INDCustomData) -> HRESULT }} impl INDLicenseFetchResult { - #[inline] pub unsafe fn get_response_custom_data(&self) -> Result> { + #[inline] pub fn get_response_custom_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResponseCustomData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum NDMediaStreamType: i32 { Audio (NDMediaStreamType_Audio) = 1, Video (NDMediaStreamType_Video) = 2, }} 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(&self, sessionIDBytesSize: u32, sessionIDBytes: *mut u8, challengeDataBytesSize: u32, challengeDataBytes: *mut u8, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn SendProximityDetectionStartAsync(&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(&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(&self, sessionIDBytesSize: u32, sessionIDBytes: *mut u8, challengeDataBytesSize: u32, challengeDataBytes: *mut u8, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn SendRegistrationRequestAsync(&self, sessionIDBytesSize: u32, sessionIDBytes: *mut u8, challengeDataBytesSize: u32, challengeDataBytes: *mut u8, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn SendProximityDetectionStartAsync(&self, pdType: NDProximityDetectionType, transmitterChannelBytesSize: u32, transmitterChannelBytes: *mut u8, sessionIDBytesSize: u32, sessionIDBytes: *mut u8, challengeDataBytesSize: u32, challengeDataBytes: *mut u8, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn SendProximityDetectionResponseAsync(&self, pdType: NDProximityDetectionType, transmitterChannelBytesSize: u32, transmitterChannelBytes: *mut u8, sessionIDBytesSize: u32, sessionIDBytes: *mut u8, responseDataBytesSize: u32, responseDataBytes: *mut u8, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn SendLicenseFetchRequestAsync(&self, sessionIDBytesSize: u32, sessionIDBytes: *mut u8, challengeDataBytesSize: u32, challengeDataBytes: *mut u8, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl INDMessenger { - #[inline] pub unsafe fn send_registration_request_async(&self, sessionIDBytes: &[u8], challengeDataBytes: &[u8]) -> Result>> { + #[inline] pub fn send_registration_request_async(&self, sessionIDBytes: &[u8], challengeDataBytes: &[u8]) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SendRegistrationRequestAsync)(self as *const _ 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_start_async(&self, pdType: NDProximityDetectionType, transmitterChannelBytes: &[u8], sessionIDBytes: &[u8], challengeDataBytes: &[u8]) -> Result>> { + }} + #[inline] pub fn send_proximity_detection_start_async(&self, pdType: NDProximityDetectionType, transmitterChannelBytes: &[u8], sessionIDBytes: &[u8], challengeDataBytes: &[u8]) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SendProximityDetectionStartAsync)(self as *const _ as *mut _, 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(&self, pdType: NDProximityDetectionType, transmitterChannelBytes: &[u8], sessionIDBytes: &[u8], responseDataBytes: &[u8]) -> Result>> { + }} + #[inline] pub fn send_proximity_detection_response_async(&self, pdType: NDProximityDetectionType, transmitterChannelBytes: &[u8], sessionIDBytes: &[u8], responseDataBytes: &[u8]) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SendProximityDetectionResponseAsync)(self as *const _ as *mut _, 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(&self, sessionIDBytes: &[u8], challengeDataBytes: &[u8]) -> Result>> { + }} + #[inline] pub fn send_license_fetch_request_async(&self, sessionIDBytes: &[u8], challengeDataBytes: &[u8]) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SendLicenseFetchRequestAsync)(self as *const _ 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) } - } + }} } 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(&self, out: *mut u32) -> HRESULT }} impl INDProximityDetectionCompletedEventArgs { - #[inline] pub unsafe fn get_proximity_detection_retry_count(&self) -> Result { + #[inline] pub fn get_proximity_detection_retry_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProximityDetectionRetryCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum NDProximityDetectionType: i32 { UDP (NDProximityDetectionType_UDP) = 1, TCP (NDProximityDetectionType_TCP) = 2, TransportAgnostic (NDProximityDetectionType_TransportAgnostic) = 4, @@ -21310,36 +21310,36 @@ RT_INTERFACE!{interface INDRegistrationCompletedEventArgs(INDRegistrationComplet fn put_TransmitterCertificateAccepted(&self, accept: bool) -> HRESULT }} impl INDRegistrationCompletedEventArgs { - #[inline] pub unsafe fn get_response_custom_data(&self) -> Result> { + #[inline] pub fn get_response_custom_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResponseCustomData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_transmitter_properties(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_transmitter_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TransmitterProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_transmitter_certificate_accepted(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_transmitter_certificate_accepted(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TransmitterCertificateAccepted)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_transmitter_certificate_accepted(&self, accept: bool) -> Result<()> { + }} + #[inline] pub fn set_transmitter_certificate_accepted(&self, accept: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TransmitterCertificateAccepted)(self as *const _ as *mut _, accept); 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(&self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT }} impl INDSendResult { - #[inline] pub unsafe fn get_response(&self) -> Result> { + #[inline] pub fn get_response(&self) -> Result> { unsafe { let mut outSize = 0; let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Response)(self as *const _ as *mut _, &mut outSize, &mut out); if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } - } + }} } RT_ENUM! { enum NDStartAsyncOptions: i32 { MutualAuthentication (NDStartAsyncOptions_MutualAuthentication) = 1, WaitForLicenseDescriptor (NDStartAsyncOptions_WaitForLicenseDescriptor) = 2, @@ -21349,22 +21349,22 @@ RT_INTERFACE!{interface INDStartResult(INDStartResultVtbl): IInspectable(IInspec fn get_MediaStreamSource(&self, out: *mut *mut super::super::core::MediaStreamSource) -> HRESULT }} impl INDStartResult { - #[inline] pub unsafe fn get_media_stream_source(&self) -> Result> { + #[inline] pub fn get_media_stream_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MediaStreamSource)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, file: *mut ::rt::gen::windows::storage::IStorageFile, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT + #[cfg(feature="windows-storage")] fn GetFileURLs(&self, file: *mut ::rt::gen::windows::storage::IStorageFile, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl INDStorageFileHelper { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_file_urls(&self, file: &::rt::gen::windows::storage::IStorageFile) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_file_urls(&self, file: &::rt::gen::windows::storage::IStorageFile) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFileURLs)(self as *const _ as *mut _, file as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class NDStorageFileHelper: INDStorageFileHelper} impl RtActivatable for NDStorageFileHelper {} @@ -21378,53 +21378,53 @@ RT_INTERFACE!{interface INDStreamParser(INDStreamParserVtbl): IInspectable(IInsp fn get_Notifier(&self, out: *mut *mut NDStreamParserNotifier) -> HRESULT }} impl INDStreamParser { - #[inline] pub unsafe fn parse_data(&self, dataBytes: &[u8]) -> Result<()> { + #[inline] pub fn parse_data(&self, dataBytes: &[u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ParseData)(self as *const _ as *mut _, dataBytes.len() as u32, dataBytes.as_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_stream_information(&self, descriptor: &super::super::core::IMediaStreamDescriptor) -> Result<(NDMediaStreamType, u32)> { + }} + #[inline] pub fn get_stream_information(&self, descriptor: &super::super::core::IMediaStreamDescriptor) -> Result<(NDMediaStreamType, u32)> { unsafe { let mut streamType = zeroed(); let mut out = zeroed(); let hr = ((*self.lpVtbl).GetStreamInformation)(self as *const _ as *mut _, 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(&self) -> Result<()> { + }} + #[inline] pub fn begin_of_stream(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).BeginOfStream)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn end_of_stream(&self) -> Result<()> { + }} + #[inline] pub fn end_of_stream(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).EndOfStream)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_notifier(&self) -> Result> { + }} + #[inline] pub fn get_notifier(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Notifier)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, licenseFetchDescriptor: *mut INDLicenseFetchDescriptor) -> HRESULT, - fn OnMediaStreamDescriptorCreated(&self, audioStreamDescriptors: *mut ::rt::gen::windows::foundation::collections::IVector, videoStreamDescriptors: *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, + fn OnMediaStreamDescriptorCreated(&self, audioStreamDescriptors: *mut foundation::collections::IVector, videoStreamDescriptors: *mut foundation::collections::IVector) -> HRESULT, fn OnSampleParsed(&self, streamID: u32, streamType: NDMediaStreamType, streamSample: *mut super::super::core::MediaStreamSample, pts: i64, ccFormat: NDClosedCaptionFormat, ccDataBytesSize: u32, ccDataBytes: *mut u8) -> HRESULT, fn OnBeginSetupDecryptor(&self, descriptor: *mut super::super::core::IMediaStreamDescriptor, keyID: Guid, proBytesSize: u32, proBytes: *mut u8) -> HRESULT }} impl INDStreamParserNotifier { - #[inline] pub unsafe fn on_content_idreceived(&self, licenseFetchDescriptor: &INDLicenseFetchDescriptor) -> Result<()> { + #[inline] pub fn on_content_idreceived(&self, licenseFetchDescriptor: &INDLicenseFetchDescriptor) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnContentIDReceived)(self as *const _ as *mut _, licenseFetchDescriptor as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn on_media_stream_descriptor_created(&self, audioStreamDescriptors: &::rt::gen::windows::foundation::collections::IVector, videoStreamDescriptors: &::rt::gen::windows::foundation::collections::IVector) -> Result<()> { + }} + #[inline] pub fn on_media_stream_descriptor_created(&self, audioStreamDescriptors: &foundation::collections::IVector, videoStreamDescriptors: &foundation::collections::IVector) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnMediaStreamDescriptorCreated)(self as *const _ as *mut _, 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(&self, streamID: u32, streamType: NDMediaStreamType, streamSample: &super::super::core::MediaStreamSample, pts: i64, ccFormat: NDClosedCaptionFormat, ccDataBytes: &[u8]) -> Result<()> { + }} + #[inline] pub fn on_sample_parsed(&self, streamID: u32, streamType: NDMediaStreamType, streamSample: &super::super::core::MediaStreamSample, pts: i64, ccFormat: NDClosedCaptionFormat, ccDataBytes: &[u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnSampleParsed)(self as *const _ as *mut _, 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(&self, descriptor: &super::super::core::IMediaStreamDescriptor, keyID: Guid, proBytes: &[u8]) -> Result<()> { + }} + #[inline] pub fn on_begin_setup_decryptor(&self, descriptor: &super::super::core::IMediaStreamDescriptor, keyID: Guid, proBytes: &[u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnBeginSetupDecryptor)(self as *const _ as *mut _, descriptor as *const _ as *mut _, keyID, proBytes.len() as u32, proBytes.as_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class NDStreamParserNotifier: INDStreamParserNotifier} impl RtActivatable for NDStreamParserNotifier {} @@ -21432,9 +21432,9 @@ DEFINE_CLSID!(NDStreamParserNotifier(&[87,105,110,100,111,119,115,46,77,101,100, RT_CLASS!{class NDTCPMessenger: INDMessenger} impl RtActivatable for NDTCPMessenger {} impl NDTCPMessenger { - #[inline] pub fn create_instance(remoteHostName: &HStringArg, remoteHostPort: u32) -> Result> { unsafe { + #[inline] pub fn create_instance(remoteHostName: &HStringArg, remoteHostPort: u32) -> Result> { >::get_activation_factory().create_instance(remoteHostName, remoteHostPort) - }} + } } DEFINE_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]) [CLSID_NDTCPMessenger]); DEFINE_IID!(IID_INDTCPMessengerFactory, 2111331582, 7065, 20328, 143, 130, 129, 119, 247, 206, 223, 43); @@ -21442,11 +21442,11 @@ RT_INTERFACE!{static interface INDTCPMessengerFactory(INDTCPMessengerFactoryVtbl fn CreateInstance(&self, remoteHostName: HSTRING, remoteHostPort: u32, out: *mut *mut NDTCPMessenger) -> HRESULT }} impl INDTCPMessengerFactory { - #[inline] pub unsafe fn create_instance(&self, remoteHostName: &HStringArg, remoteHostPort: u32) -> Result> { + #[inline] pub fn create_instance(&self, remoteHostName: &HStringArg, remoteHostPort: u32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self as *const _ as *mut _, remoteHostName.get(), remoteHostPort, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_INDTransmitterProperties, 3845566243, 44111, 19164, 140, 102, 79, 247, 194, 112, 45, 214); RT_INTERFACE!{interface INDTransmitterProperties(INDTransmitterPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_INDTransmitterProperties] { @@ -21455,7 +21455,7 @@ RT_INTERFACE!{interface INDTransmitterProperties(INDTransmitterPropertiesVtbl): fn get_SupportedFeatures(&self, outSize: *mut u32, out: *mut *mut NDCertificateFeature) -> HRESULT, fn get_SecurityLevel(&self, out: *mut u32) -> HRESULT, fn get_SecurityVersion(&self, out: *mut u32) -> HRESULT, - fn get_ExpirationDate(&self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, + fn get_ExpirationDate(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_ClientID(&self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT, fn get_ModelDigest(&self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT, fn get_ModelManufacturerName(&self, out: *mut HSTRING) -> HRESULT, @@ -21463,68 +21463,68 @@ RT_INTERFACE!{interface INDTransmitterProperties(INDTransmitterPropertiesVtbl): fn get_ModelNumber(&self, out: *mut HSTRING) -> HRESULT }} impl INDTransmitterProperties { - #[inline] pub unsafe fn get_certificate_type(&self) -> Result { + #[inline] pub fn get_certificate_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CertificateType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_platform_identifier(&self) -> Result { + }} + #[inline] pub fn get_platform_identifier(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PlatformIdentifier)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_features(&self) -> Result> { + }} + #[inline] pub fn get_supported_features(&self) -> Result> { unsafe { let mut outSize = 0; let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedFeatures)(self as *const _ as *mut _, &mut outSize, &mut out); if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_security_level(&self) -> Result { + }} + #[inline] pub fn get_security_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SecurityLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_security_version(&self) -> Result { + }} + #[inline] pub fn get_security_version(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SecurityVersion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_expiration_date(&self) -> Result<::rt::gen::windows::foundation::DateTime> { + }} + #[inline] pub fn get_expiration_date(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExpirationDate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_client_id(&self) -> Result> { + }} + #[inline] pub fn get_client_id(&self) -> Result> { unsafe { let mut outSize = 0; let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ClientID)(self as *const _ as *mut _, &mut outSize, &mut out); if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_model_digest(&self) -> Result> { + }} + #[inline] pub fn get_model_digest(&self) -> Result> { unsafe { let mut outSize = 0; let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ModelDigest)(self as *const _ as *mut _, &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(&self) -> Result { + }} + #[inline] pub fn get_model_manufacturer_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ModelManufacturerName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_model_name(&self) -> Result { + }} + #[inline] pub fn get_model_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ModelName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_model_number(&self) -> Result { + }} + #[inline] pub fn get_model_number(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ModelNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut Guid) -> HRESULT, fn get_KeyIdString(&self, out: *mut HSTRING) -> HRESULT, - fn get_LicenseAcquisitionUrl(&self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, - fn get_LicenseAcquisitionUserInterfaceUrl(&self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn get_LicenseAcquisitionUrl(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn get_LicenseAcquisitionUserInterfaceUrl(&self, out: *mut *mut foundation::Uri) -> HRESULT, fn get_DomainServiceId(&self, out: *mut Guid) -> HRESULT, fn get_EncryptionType(&self, out: *mut PlayReadyEncryptionAlgorithm) -> HRESULT, fn get_CustomAttributes(&self, out: *mut HSTRING) -> HRESULT, @@ -21533,73 +21533,73 @@ RT_INTERFACE!{interface IPlayReadyContentHeader(IPlayReadyContentHeaderVtbl): II fn get_HeaderWithEmbeddedUpdates(&self, out: *mut *mut PlayReadyContentHeader) -> HRESULT }} impl IPlayReadyContentHeader { - #[inline] pub unsafe fn get_key_id(&self) -> Result { + #[inline] pub fn get_key_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_KeyId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_key_id_string(&self) -> Result { + }} + #[inline] pub fn get_key_id_string(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_KeyIdString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_license_acquisition_url(&self) -> Result> { + }} + #[inline] pub fn get_license_acquisition_url(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LicenseAcquisitionUrl)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_license_acquisition_user_interface_url(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_license_acquisition_user_interface_url(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LicenseAcquisitionUserInterfaceUrl)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_domain_service_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_domain_service_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DomainServiceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_encryption_type(&self) -> Result { + }} + #[inline] pub fn get_encryption_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EncryptionType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_custom_attributes(&self) -> Result { + }} + #[inline] pub fn get_custom_attributes(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CustomAttributes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_decryptor_setup(&self) -> Result { + }} + #[inline] pub fn get_decryptor_setup(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DecryptorSetup)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_serialized_header(&self) -> Result> { + }} + #[inline] pub fn get_serialized_header(&self) -> Result> { unsafe { let mut outSize = 0; let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSerializedHeader)(self as *const _ as *mut _, &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(&self) -> Result> { + }} + #[inline] pub fn get_header_with_embedded_updates(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HeaderWithEmbeddedUpdates)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PlayReadyContentHeader: IPlayReadyContentHeader} impl RtActivatable for PlayReadyContentHeader {} impl RtActivatable for PlayReadyContentHeader {} impl PlayReadyContentHeader { - #[inline] pub fn create_instance_from_windows_media_drm_header(headerBytes: &[u8], licenseAcquisitionUrl: &::rt::gen::windows::foundation::Uri, licenseAcquisitionUserInterfaceUrl: &::rt::gen::windows::foundation::Uri, customAttributes: &HStringArg, domainServiceId: Guid) -> Result> { unsafe { + #[inline] pub fn create_instance_from_windows_media_drm_header(headerBytes: &[u8], licenseAcquisitionUrl: &foundation::Uri, licenseAcquisitionUserInterfaceUrl: &foundation::Uri, customAttributes: &HStringArg, domainServiceId: Guid) -> Result> { >::get_activation_factory().create_instance_from_windows_media_drm_header(headerBytes, licenseAcquisitionUrl, licenseAcquisitionUserInterfaceUrl, customAttributes, domainServiceId) - }} - #[inline] pub fn create_instance_from_components(contentKeyId: Guid, contentKeyIdString: &HStringArg, contentEncryptionAlgorithm: PlayReadyEncryptionAlgorithm, licenseAcquisitionUrl: &::rt::gen::windows::foundation::Uri, licenseAcquisitionUserInterfaceUrl: &::rt::gen::windows::foundation::Uri, customAttributes: &HStringArg, domainServiceId: Guid) -> Result> { unsafe { + } + #[inline] pub fn create_instance_from_components(contentKeyId: Guid, contentKeyIdString: &HStringArg, contentEncryptionAlgorithm: PlayReadyEncryptionAlgorithm, licenseAcquisitionUrl: &foundation::Uri, licenseAcquisitionUserInterfaceUrl: &foundation::Uri, customAttributes: &HStringArg, domainServiceId: Guid) -> Result> { >::get_activation_factory().create_instance_from_components(contentKeyId, contentKeyIdString, contentEncryptionAlgorithm, licenseAcquisitionUrl, licenseAcquisitionUserInterfaceUrl, customAttributes, domainServiceId) - }} - #[inline] pub fn create_instance_from_play_ready_header(headerBytes: &[u8]) -> Result> { unsafe { + } + #[inline] pub fn create_instance_from_play_ready_header(headerBytes: &[u8]) -> Result> { >::get_activation_factory().create_instance_from_play_ready_header(headerBytes) - }} - #[inline] pub fn create_instance_from_components2(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> { unsafe { + } + #[inline] pub fn create_instance_from_components2(dwFlags: u32, contentKeyIds: &[Guid], contentKeyIdStrings: &[&HStringArg], contentEncryptionAlgorithm: PlayReadyEncryptionAlgorithm, licenseAcquisitionUrl: &foundation::Uri, licenseAcquisitionUserInterfaceUrl: &foundation::Uri, customAttributes: &HStringArg, domainServiceId: Guid) -> Result> { >::get_activation_factory().create_instance_from_components2(dwFlags, contentKeyIds, contentKeyIdStrings, contentEncryptionAlgorithm, licenseAcquisitionUrl, licenseAcquisitionUserInterfaceUrl, customAttributes, domainServiceId) - }} + } } DEFINE_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]) [CLSID_PlayReadyContentHeader]); DEFINE_IID!(IID_IPlayReadyContentHeader2, 899447284, 8576, 18828, 150, 91, 231, 84, 216, 117, 234, 178); @@ -21608,68 +21608,68 @@ RT_INTERFACE!{interface IPlayReadyContentHeader2(IPlayReadyContentHeader2Vtbl): fn get_KeyIdStrings(&self, outSize: *mut u32, out: *mut *mut HSTRING) -> HRESULT }} impl IPlayReadyContentHeader2 { - #[inline] pub unsafe fn get_key_ids(&self) -> Result> { + #[inline] pub fn get_key_ids(&self) -> Result> { unsafe { let mut outSize = 0; let mut out = null_mut(); let hr = ((*self.lpVtbl).get_KeyIds)(self as *const _ as *mut _, &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(&self) -> Result> { + }} + #[inline] pub fn get_key_id_strings(&self) -> Result> { unsafe { let mut outSize = 0; let mut out = null_mut(); let hr = ((*self.lpVtbl).get_KeyIdStrings)(self as *const _ as *mut _, &mut outSize, &mut out); if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } - } + }} } 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(&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(&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 CreateInstanceFromWindowsMediaDrmHeader(&self, headerBytesSize: u32, headerBytes: *mut u8, licenseAcquisitionUrl: *mut foundation::Uri, licenseAcquisitionUserInterfaceUrl: *mut foundation::Uri, customAttributes: HSTRING, domainServiceId: Guid, out: *mut *mut PlayReadyContentHeader) -> HRESULT, + fn CreateInstanceFromComponents(&self, contentKeyId: Guid, contentKeyIdString: HSTRING, contentEncryptionAlgorithm: PlayReadyEncryptionAlgorithm, licenseAcquisitionUrl: *mut foundation::Uri, licenseAcquisitionUserInterfaceUrl: *mut foundation::Uri, customAttributes: HSTRING, domainServiceId: Guid, out: *mut *mut PlayReadyContentHeader) -> HRESULT, fn CreateInstanceFromPlayReadyHeader(&self, headerBytesSize: u32, headerBytes: *mut u8, out: *mut *mut PlayReadyContentHeader) -> HRESULT }} impl IPlayReadyContentHeaderFactory { - #[inline] pub unsafe fn create_instance_from_windows_media_drm_header(&self, headerBytes: &[u8], licenseAcquisitionUrl: &::rt::gen::windows::foundation::Uri, licenseAcquisitionUserInterfaceUrl: &::rt::gen::windows::foundation::Uri, customAttributes: &HStringArg, domainServiceId: Guid) -> Result> { + #[inline] pub fn create_instance_from_windows_media_drm_header(&self, headerBytes: &[u8], licenseAcquisitionUrl: &foundation::Uri, licenseAcquisitionUserInterfaceUrl: &foundation::Uri, customAttributes: &HStringArg, domainServiceId: Guid) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstanceFromWindowsMediaDrmHeader)(self as *const _ as *mut _, 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(&self, contentKeyId: Guid, contentKeyIdString: &HStringArg, contentEncryptionAlgorithm: PlayReadyEncryptionAlgorithm, licenseAcquisitionUrl: &::rt::gen::windows::foundation::Uri, licenseAcquisitionUserInterfaceUrl: &::rt::gen::windows::foundation::Uri, customAttributes: &HStringArg, domainServiceId: Guid) -> Result> { + }} + #[inline] pub fn create_instance_from_components(&self, contentKeyId: Guid, contentKeyIdString: &HStringArg, contentEncryptionAlgorithm: PlayReadyEncryptionAlgorithm, licenseAcquisitionUrl: &foundation::Uri, licenseAcquisitionUserInterfaceUrl: &foundation::Uri, customAttributes: &HStringArg, domainServiceId: Guid) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstanceFromComponents)(self as *const _ as *mut _, 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(&self, headerBytes: &[u8]) -> Result> { + }} + #[inline] pub fn create_instance_from_play_ready_header(&self, headerBytes: &[u8]) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstanceFromPlayReadyHeader)(self as *const _ as *mut _, 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_IPlayReadyContentHeaderFactory2, 3508772085, 44653, 18296, 151, 253, 110, 58, 46, 234, 219, 235); RT_INTERFACE!{static interface IPlayReadyContentHeaderFactory2(IPlayReadyContentHeaderFactory2Vtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadyContentHeaderFactory2] { - fn CreateInstanceFromComponents2(&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 + fn CreateInstanceFromComponents2(&self, dwFlags: u32, contentKeyIdsSize: u32, contentKeyIds: *mut Guid, contentKeyIdStringsSize: u32, contentKeyIdStrings: *mut HSTRING, contentEncryptionAlgorithm: PlayReadyEncryptionAlgorithm, licenseAcquisitionUrl: *mut foundation::Uri, licenseAcquisitionUserInterfaceUrl: *mut foundation::Uri, customAttributes: HSTRING, domainServiceId: Guid, out: *mut *mut PlayReadyContentHeader) -> HRESULT }} impl IPlayReadyContentHeaderFactory2 { - #[inline] pub unsafe fn create_instance_from_components2(&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> { + #[inline] pub fn create_instance_from_components2(&self, dwFlags: u32, contentKeyIds: &[Guid], contentKeyIdStrings: &[&HStringArg], contentEncryptionAlgorithm: PlayReadyEncryptionAlgorithm, licenseAcquisitionUrl: &foundation::Uri, licenseAcquisitionUserInterfaceUrl: &foundation::Uri, customAttributes: &HStringArg, domainServiceId: Guid) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstanceFromComponents2)(self as *const _ as *mut _, 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) } - } + }} } 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(&self, contentHeader: *mut PlayReadyContentHeader, out: *mut *mut IPlayReadyServiceRequest) -> HRESULT }} impl IPlayReadyContentResolver { - #[inline] pub unsafe fn service_request(&self, contentHeader: &PlayReadyContentHeader) -> Result> { + #[inline] pub fn service_request(&self, contentHeader: &PlayReadyContentHeader) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ServiceRequest)(self as *const _ as *mut _, contentHeader as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{static class PlayReadyContentResolver} impl RtActivatable for PlayReadyContentResolver {} impl PlayReadyContentResolver { - #[inline] pub fn service_request(contentHeader: &PlayReadyContentHeader) -> Result> { unsafe { + #[inline] pub fn service_request(contentHeader: &PlayReadyContentHeader) -> Result>> { >::get_activation_factory().service_request(contentHeader) - }} + } } DEFINE_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]) [CLSID_PlayReadyContentResolver]); RT_ENUM! { enum PlayReadyDecryptorSetup: i32 { @@ -21681,42 +21681,42 @@ RT_INTERFACE!{interface IPlayReadyDomain(IPlayReadyDomainVtbl): IInspectable(IIn fn get_ServiceId(&self, out: *mut Guid) -> HRESULT, fn get_Revision(&self, out: *mut u32) -> HRESULT, fn get_FriendlyName(&self, out: *mut HSTRING) -> HRESULT, - fn get_DomainJoinUrl(&self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT + fn get_DomainJoinUrl(&self, out: *mut *mut foundation::Uri) -> HRESULT }} impl IPlayReadyDomain { - #[inline] pub unsafe fn get_account_id(&self) -> Result { + #[inline] pub fn get_account_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AccountId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_id(&self) -> Result { + }} + #[inline] pub fn get_service_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ServiceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_revision(&self) -> Result { + }} + #[inline] pub fn get_revision(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Revision)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_friendly_name(&self) -> Result { + }} + #[inline] pub fn get_friendly_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FriendlyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_domain_join_url(&self) -> Result> { + }} + #[inline] pub fn get_domain_join_url(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DomainJoinUrl)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PlayReadyDomain: IPlayReadyDomain} -RT_CLASS!{class PlayReadyDomainIterable: ::rt::gen::windows::foundation::collections::IIterable} +RT_CLASS!{class PlayReadyDomainIterable: foundation::collections::IIterable} impl RtActivatable for PlayReadyDomainIterable {} impl PlayReadyDomainIterable { - #[inline] pub fn create_instance(domainAccountId: Guid) -> Result> { unsafe { + #[inline] pub fn create_instance(domainAccountId: Guid) -> Result> { >::get_activation_factory().create_instance(domainAccountId) - }} + } } DEFINE_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]) [CLSID_PlayReadyDomainIterable]); DEFINE_IID!(IID_IPlayReadyDomainIterableFactory, 1307804910, 12577, 19955, 165, 232, 208, 194, 76, 5, 0, 252); @@ -21724,13 +21724,13 @@ RT_INTERFACE!{static interface IPlayReadyDomainIterableFactory(IPlayReadyDomainI fn CreateInstance(&self, domainAccountId: Guid, out: *mut *mut PlayReadyDomainIterable) -> HRESULT }} impl IPlayReadyDomainIterableFactory { - #[inline] pub unsafe fn create_instance(&self, domainAccountId: Guid) -> Result> { + #[inline] pub fn create_instance(&self, domainAccountId: Guid) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self as *const _ as *mut _, domainAccountId, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } -RT_CLASS!{class PlayReadyDomainIterator: ::rt::gen::windows::foundation::collections::IIterator} +RT_CLASS!{class PlayReadyDomainIterator: foundation::collections::IIterator} 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(&self, out: *mut Guid) -> HRESULT, @@ -21741,33 +21741,33 @@ RT_INTERFACE!{interface IPlayReadyDomainJoinServiceRequest(IPlayReadyDomainJoinS fn put_DomainServiceId(&self, value: Guid) -> HRESULT }} impl IPlayReadyDomainJoinServiceRequest { - #[inline] pub unsafe fn get_domain_account_id(&self) -> Result { + #[inline] pub fn get_domain_account_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DomainAccountId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_domain_account_id(&self, value: Guid) -> Result<()> { + }} + #[inline] pub fn set_domain_account_id(&self, value: Guid) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DomainAccountId)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_domain_friendly_name(&self) -> Result { + }} + #[inline] pub fn get_domain_friendly_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DomainFriendlyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_domain_friendly_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_domain_friendly_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DomainFriendlyName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_domain_service_id(&self) -> Result { + }} + #[inline] pub fn get_domain_service_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DomainServiceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_domain_service_id(&self, value: Guid) -> Result<()> { + }} + #[inline] pub fn set_domain_service_id(&self, value: Guid) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DomainServiceId)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PlayReadyDomainJoinServiceRequest: IPlayReadyDomainJoinServiceRequest} impl RtActivatable for PlayReadyDomainJoinServiceRequest {} @@ -21780,24 +21780,24 @@ RT_INTERFACE!{interface IPlayReadyDomainLeaveServiceRequest(IPlayReadyDomainLeav fn put_DomainServiceId(&self, value: Guid) -> HRESULT }} impl IPlayReadyDomainLeaveServiceRequest { - #[inline] pub unsafe fn get_domain_account_id(&self) -> Result { + #[inline] pub fn get_domain_account_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DomainAccountId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_domain_account_id(&self, value: Guid) -> Result<()> { + }} + #[inline] pub fn set_domain_account_id(&self, value: Guid) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DomainAccountId)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_domain_service_id(&self) -> Result { + }} + #[inline] pub fn get_domain_service_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DomainServiceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_domain_service_id(&self, value: Guid) -> Result<()> { + }} + #[inline] pub fn set_domain_service_id(&self, value: Guid) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DomainServiceId)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PlayReadyDomainLeaveServiceRequest: IPlayReadyDomainLeaveServiceRequest} impl RtActivatable for PlayReadyDomainLeaveServiceRequest {} @@ -21820,14 +21820,14 @@ RT_ENUM! { enum PlayReadyITADataFormat: i32 { }} 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(&self, guidCPSystemId: Guid, countOfStreams: u32, configuration: *mut ::rt::gen::windows::foundation::collections::IPropertySet, format: PlayReadyITADataFormat, outSize: *mut u32, out: *mut *mut u8) -> HRESULT + fn GenerateData(&self, guidCPSystemId: Guid, countOfStreams: u32, configuration: *mut foundation::collections::IPropertySet, format: PlayReadyITADataFormat, outSize: *mut u32, out: *mut *mut u8) -> HRESULT }} impl IPlayReadyITADataGenerator { - #[inline] pub unsafe fn generate_data(&self, guidCPSystemId: Guid, countOfStreams: u32, configuration: &::rt::gen::windows::foundation::collections::IPropertySet, format: PlayReadyITADataFormat) -> Result> { + #[inline] pub fn generate_data(&self, guidCPSystemId: Guid, countOfStreams: u32, configuration: &foundation::collections::IPropertySet, format: PlayReadyITADataFormat) -> Result> { unsafe { let mut outSize = 0; let mut out = null_mut(); let hr = ((*self.lpVtbl).GenerateData)(self as *const _ as *mut _, 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} impl RtActivatable for PlayReadyITADataGenerator {} @@ -21836,48 +21836,48 @@ DEFINE_IID!(IID_IPlayReadyLicense, 3997649998, 64060, 16717, 169, 242, 63, 252, RT_INTERFACE!{interface IPlayReadyLicense(IPlayReadyLicenseVtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadyLicense] { fn get_FullyEvaluated(&self, out: *mut bool) -> HRESULT, fn get_UsableForPlay(&self, out: *mut bool) -> HRESULT, - fn get_ExpirationDate(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::DateTime>) -> HRESULT, + fn get_ExpirationDate(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn get_ExpireAfterFirstPlay(&self, out: *mut u32) -> HRESULT, fn get_DomainAccountID(&self, out: *mut Guid) -> HRESULT, fn get_ChainDepth(&self, out: *mut u32) -> HRESULT, fn GetKIDAtChainDepth(&self, chainDepth: u32, out: *mut Guid) -> HRESULT }} impl IPlayReadyLicense { - #[inline] pub unsafe fn get_fully_evaluated(&self) -> Result { + #[inline] pub fn get_fully_evaluated(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FullyEvaluated)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_usable_for_play(&self) -> Result { + }} + #[inline] pub fn get_usable_for_play(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UsableForPlay)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_expiration_date(&self) -> Result>> { + }} + #[inline] pub fn get_expiration_date(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExpirationDate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_expire_after_first_play(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_expire_after_first_play(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExpireAfterFirstPlay)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_domain_account_id(&self) -> Result { + }} + #[inline] pub fn get_domain_account_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DomainAccountID)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_chain_depth(&self) -> Result { + }} + #[inline] pub fn get_chain_depth(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ChainDepth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_kidat_chain_depth(&self, chainDepth: u32) -> Result { + }} + #[inline] pub fn get_kidat_chain_depth(&self, chainDepth: u32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetKIDAtChainDepth)(self as *const _ as *mut _, chainDepth, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PlayReadyLicense: IPlayReadyLicense} DEFINE_IID!(IID_IPlayReadyLicense2, 821356455, 55523, 18592, 188, 218, 255, 159, 64, 83, 4, 54); @@ -21888,26 +21888,26 @@ RT_INTERFACE!{interface IPlayReadyLicense2(IPlayReadyLicense2Vtbl): IInspectable fn get_ExpiresInRealTime(&self, out: *mut bool) -> HRESULT }} impl IPlayReadyLicense2 { - #[inline] pub unsafe fn get_secure_stop_id(&self) -> Result { + #[inline] pub fn get_secure_stop_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SecureStopId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_security_level(&self) -> Result { + }} + #[inline] pub fn get_security_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SecurityLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_in_memory_only(&self) -> Result { + }} + #[inline] pub fn get_in_memory_only(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InMemoryOnly)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_expires_in_real_time(&self) -> Result { + }} + #[inline] pub fn get_expires_in_real_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExpiresInRealTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } 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] { @@ -21917,24 +21917,24 @@ RT_INTERFACE!{interface IPlayReadyLicenseAcquisitionServiceRequest(IPlayReadyLic fn put_DomainServiceId(&self, value: Guid) -> HRESULT }} impl IPlayReadyLicenseAcquisitionServiceRequest { - #[inline] pub unsafe fn get_content_header(&self) -> Result> { + #[inline] pub fn get_content_header(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContentHeader)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_content_header(&self, value: &PlayReadyContentHeader) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_content_header(&self, value: &PlayReadyContentHeader) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ContentHeader)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_domain_service_id(&self) -> Result { + }} + #[inline] pub fn get_domain_service_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DomainServiceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_domain_service_id(&self, value: Guid) -> Result<()> { + }} + #[inline] pub fn set_domain_service_id(&self, value: Guid) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DomainServiceId)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PlayReadyLicenseAcquisitionServiceRequest: IPlayReadyLicenseAcquisitionServiceRequest} impl RtActivatable for PlayReadyLicenseAcquisitionServiceRequest {} @@ -21944,30 +21944,30 @@ RT_INTERFACE!{interface IPlayReadyLicenseAcquisitionServiceRequest2(IPlayReadyLi fn get_SessionId(&self, out: *mut Guid) -> HRESULT }} impl IPlayReadyLicenseAcquisitionServiceRequest2 { - #[inline] pub unsafe fn get_session_id(&self) -> Result { + #[inline] pub fn get_session_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SessionId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IPlayReadyLicenseAcquisitionServiceRequest3, 961437517, 32629, 17165, 178, 231, 127, 117, 243, 75, 45, 117); RT_INTERFACE!{interface IPlayReadyLicenseAcquisitionServiceRequest3(IPlayReadyLicenseAcquisitionServiceRequest3Vtbl): IInspectable(IInspectableVtbl) [IID_IPlayReadyLicenseAcquisitionServiceRequest3] { fn CreateLicenseIterable(&self, contentHeader: *mut PlayReadyContentHeader, fullyEvaluated: bool, out: *mut *mut PlayReadyLicenseIterable) -> HRESULT }} impl IPlayReadyLicenseAcquisitionServiceRequest3 { - #[inline] pub unsafe fn create_license_iterable(&self, contentHeader: &PlayReadyContentHeader, fullyEvaluated: bool) -> Result> { + #[inline] pub fn create_license_iterable(&self, contentHeader: &PlayReadyContentHeader, fullyEvaluated: bool) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateLicenseIterable)(self as *const _ as *mut _, contentHeader as *const _ as *mut _, fullyEvaluated, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } -RT_CLASS!{class PlayReadyLicenseIterable: ::rt::gen::windows::foundation::collections::IIterable} +RT_CLASS!{class PlayReadyLicenseIterable: foundation::collections::IIterable} impl RtActivatable for PlayReadyLicenseIterable {} impl RtActivatable for PlayReadyLicenseIterable {} impl PlayReadyLicenseIterable { - #[inline] pub fn create_instance(contentHeader: &PlayReadyContentHeader, fullyEvaluated: bool) -> Result> { unsafe { + #[inline] pub fn create_instance(contentHeader: &PlayReadyContentHeader, fullyEvaluated: bool) -> Result> { >::get_activation_factory().create_instance(contentHeader, fullyEvaluated) - }} + } } DEFINE_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]) [CLSID_PlayReadyLicenseIterable]); DEFINE_IID!(IID_IPlayReadyLicenseIterableFactory, 3558317832, 2103, 18808, 142, 104, 190, 66, 147, 200, 215, 166); @@ -21975,30 +21975,30 @@ RT_INTERFACE!{static interface IPlayReadyLicenseIterableFactory(IPlayReadyLicens fn CreateInstance(&self, contentHeader: *mut PlayReadyContentHeader, fullyEvaluated: bool, out: *mut *mut PlayReadyLicenseIterable) -> HRESULT }} impl IPlayReadyLicenseIterableFactory { - #[inline] pub unsafe fn create_instance(&self, contentHeader: &PlayReadyContentHeader, fullyEvaluated: bool) -> Result> { + #[inline] pub fn create_instance(&self, contentHeader: &PlayReadyContentHeader, fullyEvaluated: bool) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self as *const _ as *mut _, contentHeader as *const _ as *mut _, fullyEvaluated, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } -RT_CLASS!{class PlayReadyLicenseIterator: ::rt::gen::windows::foundation::collections::IIterator} +RT_CLASS!{class PlayReadyLicenseIterator: foundation::collections::IIterator} 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(&self, contentHeader: *mut PlayReadyContentHeader, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn DeleteLicenses(&self, contentHeader: *mut PlayReadyContentHeader, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IPlayReadyLicenseManagement { - #[inline] pub unsafe fn delete_licenses(&self, contentHeader: &PlayReadyContentHeader) -> Result> { + #[inline] pub fn delete_licenses(&self, contentHeader: &PlayReadyContentHeader) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteLicenses)(self as *const _ as *mut _, contentHeader as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class PlayReadyLicenseManagement} impl RtActivatable for PlayReadyLicenseManagement {} impl PlayReadyLicenseManagement { - #[inline] pub fn delete_licenses(contentHeader: &PlayReadyContentHeader) -> Result> { unsafe { + #[inline] pub fn delete_licenses(contentHeader: &PlayReadyContentHeader) -> Result> { >::get_activation_factory().delete_licenses(contentHeader) - }} + } } DEFINE_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]) [CLSID_PlayReadyLicenseManagement]); DEFINE_IID!(IID_IPlayReadyLicenseSession, 2708617785, 34810, 20445, 171, 187, 169, 114, 14, 132, 82, 89); @@ -22007,22 +22007,22 @@ RT_INTERFACE!{interface IPlayReadyLicenseSession(IPlayReadyLicenseSessionVtbl): fn ConfigureMediaProtectionManager(&self, mpm: *mut super::MediaProtectionManager) -> HRESULT }} impl IPlayReadyLicenseSession { - #[inline] pub unsafe fn create_laservice_request(&self) -> Result> { + #[inline] pub fn create_laservice_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateLAServiceRequest)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn configure_media_protection_manager(&self, mpm: &super::MediaProtectionManager) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn configure_media_protection_manager(&self, mpm: &super::MediaProtectionManager) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ConfigureMediaProtectionManager)(self as *const _ as *mut _, mpm as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PlayReadyLicenseSession: IPlayReadyLicenseSession} impl RtActivatable for PlayReadyLicenseSession {} impl PlayReadyLicenseSession { - #[inline] pub fn create_instance(configuration: &::rt::gen::windows::foundation::collections::IPropertySet) -> Result> { unsafe { + #[inline] pub fn create_instance(configuration: &foundation::collections::IPropertySet) -> Result> { >::get_activation_factory().create_instance(configuration) - }} + } } DEFINE_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]) [CLSID_PlayReadyLicenseSession]); DEFINE_IID!(IID_IPlayReadyLicenseSession2, 1225375290, 15085, 18006, 138, 215, 238, 15, 215, 121, 149, 16); @@ -22030,22 +22030,22 @@ RT_INTERFACE!{interface IPlayReadyLicenseSession2(IPlayReadyLicenseSession2Vtbl) fn CreateLicenseIterable(&self, contentHeader: *mut PlayReadyContentHeader, fullyEvaluated: bool, out: *mut *mut PlayReadyLicenseIterable) -> HRESULT }} impl IPlayReadyLicenseSession2 { - #[inline] pub unsafe fn create_license_iterable(&self, contentHeader: &PlayReadyContentHeader, fullyEvaluated: bool) -> Result> { + #[inline] pub fn create_license_iterable(&self, contentHeader: &PlayReadyContentHeader, fullyEvaluated: bool) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateLicenseIterable)(self as *const _ as *mut _, contentHeader as *const _ as *mut _, fullyEvaluated, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } 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(&self, configuration: *mut ::rt::gen::windows::foundation::collections::IPropertySet, out: *mut *mut PlayReadyLicenseSession) -> HRESULT + fn CreateInstance(&self, configuration: *mut foundation::collections::IPropertySet, out: *mut *mut PlayReadyLicenseSession) -> HRESULT }} impl IPlayReadyLicenseSessionFactory { - #[inline] pub unsafe fn create_instance(&self, configuration: &::rt::gen::windows::foundation::collections::IPropertySet) -> Result> { + #[inline] pub fn create_instance(&self, configuration: &foundation::collections::IPropertySet) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self as *const _ as *mut _, configuration as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(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] { @@ -22053,15 +22053,15 @@ RT_INTERFACE!{interface IPlayReadyMeteringReportServiceRequest(IPlayReadyMeterin fn put_MeteringCertificate(&self, meteringCertBytesSize: u32, meteringCertBytes: *mut u8) -> HRESULT }} impl IPlayReadyMeteringReportServiceRequest { - #[inline] pub unsafe fn get_metering_certificate(&self) -> Result> { + #[inline] pub fn get_metering_certificate(&self) -> Result> { unsafe { let mut outSize = 0; let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MeteringCertificate)(self as *const _ as *mut _, &mut outSize, &mut out); if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_metering_certificate(&self, meteringCertBytes: &[u8]) -> Result<()> { + }} + #[inline] pub fn set_metering_certificate(&self, meteringCertBytes: &[u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MeteringCertificate)(self as *const _ as *mut _, meteringCertBytes.len() as u32, meteringCertBytes.as_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PlayReadyMeteringReportServiceRequest: IPlayReadyMeteringReportServiceRequest} impl RtActivatable for PlayReadyMeteringReportServiceRequest {} @@ -22073,12 +22073,12 @@ RT_INTERFACE!{interface IPlayReadyRevocationServiceRequest(IPlayReadyRevocationS RT_CLASS!{class PlayReadyRevocationServiceRequest: IPlayReadyRevocationServiceRequest} impl RtActivatable for PlayReadyRevocationServiceRequest {} DEFINE_CLSID!(PlayReadyRevocationServiceRequest(&[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,82,101,118,111,99,97,116,105,111,110,83,101,114,118,105,99,101,82,101,113,117,101,115,116,0]) [CLSID_PlayReadyRevocationServiceRequest]); -RT_CLASS!{class PlayReadySecureStopIterable: ::rt::gen::windows::foundation::collections::IIterable} +RT_CLASS!{class PlayReadySecureStopIterable: foundation::collections::IIterable} impl RtActivatable for PlayReadySecureStopIterable {} impl PlayReadySecureStopIterable { - #[inline] pub fn create_instance(publisherCertBytes: &[u8]) -> Result> { unsafe { + #[inline] pub fn create_instance(publisherCertBytes: &[u8]) -> Result> { >::get_activation_factory().create_instance(publisherCertBytes) - }} + } } DEFINE_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]) [CLSID_PlayReadySecureStopIterable]); DEFINE_IID!(IID_IPlayReadySecureStopIterableFactory, 1595867493, 16916, 19870, 129, 235, 232, 159, 157, 41, 74, 238); @@ -22086,57 +22086,57 @@ RT_INTERFACE!{static interface IPlayReadySecureStopIterableFactory(IPlayReadySec fn CreateInstance(&self, publisherCertBytesSize: u32, publisherCertBytes: *mut u8, out: *mut *mut PlayReadySecureStopIterable) -> HRESULT }} impl IPlayReadySecureStopIterableFactory { - #[inline] pub unsafe fn create_instance(&self, publisherCertBytes: &[u8]) -> Result> { + #[inline] pub fn create_instance(&self, publisherCertBytes: &[u8]) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self as *const _ as *mut _, 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 PlayReadySecureStopIterator: ::rt::gen::windows::foundation::collections::IIterator} +RT_CLASS!{class PlayReadySecureStopIterator: foundation::collections::IIterator} 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(&self, out: *mut Guid) -> HRESULT, - fn get_StartTime(&self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, - fn get_UpdateTime(&self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, + fn get_StartTime(&self, out: *mut foundation::DateTime) -> HRESULT, + fn get_UpdateTime(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_Stopped(&self, out: *mut bool) -> HRESULT, fn get_PublisherCertificate(&self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT }} impl IPlayReadySecureStopServiceRequest { - #[inline] pub unsafe fn get_session_id(&self) -> Result { + #[inline] pub fn get_session_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SessionID)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_start_time(&self) -> Result<::rt::gen::windows::foundation::DateTime> { + }} + #[inline] pub fn get_start_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StartTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_update_time(&self) -> Result<::rt::gen::windows::foundation::DateTime> { + }} + #[inline] pub fn get_update_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UpdateTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_stopped(&self) -> Result { + }} + #[inline] pub fn get_stopped(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Stopped)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_publisher_certificate(&self) -> Result> { + }} + #[inline] pub fn get_publisher_certificate(&self) -> Result> { unsafe { let mut outSize = 0; let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PublisherCertificate)(self as *const _ as *mut _, &mut outSize, &mut out); if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } - } + }} } RT_CLASS!{class PlayReadySecureStopServiceRequest: IPlayReadySecureStopServiceRequest} impl RtActivatable for PlayReadySecureStopServiceRequest {} impl PlayReadySecureStopServiceRequest { - #[inline] pub fn create_instance(publisherCertBytes: &[u8]) -> Result> { unsafe { + #[inline] pub fn create_instance(publisherCertBytes: &[u8]) -> Result> { >::get_activation_factory().create_instance(publisherCertBytes) - }} - #[inline] pub fn create_instance_from_session_id(sessionID: Guid, publisherCertBytes: &[u8]) -> Result> { unsafe { + } + #[inline] pub fn create_instance_from_session_id(sessionID: Guid, publisherCertBytes: &[u8]) -> Result> { >::get_activation_factory().create_instance_from_session_id(sessionID, publisherCertBytes) - }} + } } DEFINE_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]) [CLSID_PlayReadySecureStopServiceRequest]); DEFINE_IID!(IID_IPlayReadySecureStopServiceRequestFactory, 239373001, 59006, 18766, 159, 73, 98, 133, 67, 140, 118, 207); @@ -22145,96 +22145,96 @@ RT_INTERFACE!{static interface IPlayReadySecureStopServiceRequestFactory(IPlayRe fn CreateInstanceFromSessionID(&self, sessionID: Guid, publisherCertBytesSize: u32, publisherCertBytes: *mut u8, out: *mut *mut PlayReadySecureStopServiceRequest) -> HRESULT }} impl IPlayReadySecureStopServiceRequestFactory { - #[inline] pub unsafe fn create_instance(&self, publisherCertBytes: &[u8]) -> Result> { + #[inline] pub fn create_instance(&self, publisherCertBytes: &[u8]) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self as *const _ as *mut _, 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(&self, sessionID: Guid, publisherCertBytes: &[u8]) -> Result> { + }} + #[inline] pub fn create_instance_from_session_id(&self, sessionID: Guid, publisherCertBytes: &[u8]) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstanceFromSessionID)(self as *const _ as *mut _, sessionID, publisherCertBytes.len() as u32, publisherCertBytes.as_ptr() as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, - fn put_Uri(&self, value: *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn get_Uri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_Uri(&self, value: *mut foundation::Uri) -> HRESULT, fn get_ResponseCustomData(&self, out: *mut HSTRING) -> HRESULT, fn get_ChallengeCustomData(&self, out: *mut HSTRING) -> HRESULT, fn put_ChallengeCustomData(&self, value: HSTRING) -> HRESULT, - fn BeginServiceRequest(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn BeginServiceRequest(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn NextServiceRequest(&self, out: *mut *mut IPlayReadyServiceRequest) -> HRESULT, fn GenerateManualEnablingChallenge(&self, out: *mut *mut PlayReadySoapMessage) -> HRESULT, - fn ProcessManualEnablingResponse(&self, responseBytesSize: u32, responseBytes: *mut u8, out: *mut ::rt::gen::windows::foundation::HResult) -> HRESULT + fn ProcessManualEnablingResponse(&self, responseBytesSize: u32, responseBytes: *mut u8, out: *mut foundation::HResult) -> HRESULT }} impl IPlayReadyServiceRequest { - #[inline] pub unsafe fn get_uri(&self) -> Result> { + #[inline] pub fn get_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Uri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_uri(&self, value: &::rt::gen::windows::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_uri(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Uri)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_response_custom_data(&self) -> Result { + }} + #[inline] pub fn get_response_custom_data(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResponseCustomData)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_challenge_custom_data(&self) -> Result { + }} + #[inline] pub fn get_challenge_custom_data(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ChallengeCustomData)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_challenge_custom_data(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_challenge_custom_data(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ChallengeCustomData)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn begin_service_request(&self) -> Result> { + }} + #[inline] pub fn begin_service_request(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).BeginServiceRequest)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn next_service_request(&self) -> Result> { + }} + #[inline] pub fn next_service_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).NextServiceRequest)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn generate_manual_enabling_challenge(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn generate_manual_enabling_challenge(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GenerateManualEnablingChallenge)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn process_manual_enabling_response(&self, responseBytes: &[u8]) -> Result<::rt::gen::windows::foundation::HResult> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn process_manual_enabling_response(&self, responseBytes: &[u8]) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ProcessManualEnablingResponse)(self as *const _ as *mut _, responseBytes.len() as u32, responseBytes.as_ptr() as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT, - fn get_MessageHeaders(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IPropertySet) -> HRESULT, - fn get_Uri(&self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT + fn get_MessageHeaders(&self, out: *mut *mut foundation::collections::IPropertySet) -> HRESULT, + fn get_Uri(&self, out: *mut *mut foundation::Uri) -> HRESULT }} impl IPlayReadySoapMessage { - #[inline] pub unsafe fn get_message_body(&self) -> Result> { + #[inline] pub fn get_message_body(&self) -> Result> { unsafe { let mut outSize = 0; let mut out = null_mut(); let hr = ((*self.lpVtbl).GetMessageBody)(self as *const _ as *mut _, &mut outSize, &mut out); if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_message_headers(&self) -> Result> { + }} + #[inline] pub fn get_message_headers(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MessageHeaders)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_uri(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Uri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PlayReadySoapMessage: IPlayReadySoapMessage} DEFINE_IID!(IID_IPlayReadyStatics, 1583988749, 9340, 18074, 143, 49, 92, 26, 21, 113, 217, 198); @@ -22249,46 +22249,46 @@ RT_INTERFACE!{static interface IPlayReadyStatics(IPlayReadyStaticsVtbl): IInspec fn get_PlayReadySecurityVersion(&self, out: *mut u32) -> HRESULT }} impl IPlayReadyStatics { - #[inline] pub unsafe fn get_domain_join_service_request_type(&self) -> Result { + #[inline] pub fn get_domain_join_service_request_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DomainJoinServiceRequestType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_domain_leave_service_request_type(&self) -> Result { + }} + #[inline] pub fn get_domain_leave_service_request_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DomainLeaveServiceRequestType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_individualization_service_request_type(&self) -> Result { + }} + #[inline] pub fn get_individualization_service_request_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IndividualizationServiceRequestType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_license_acquirer_service_request_type(&self) -> Result { + }} + #[inline] pub fn get_license_acquirer_service_request_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LicenseAcquirerServiceRequestType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_metering_report_service_request_type(&self) -> Result { + }} + #[inline] pub fn get_metering_report_service_request_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MeteringReportServiceRequestType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_revocation_service_request_type(&self) -> Result { + }} + #[inline] pub fn get_revocation_service_request_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RevocationServiceRequestType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_media_protection_system_id(&self) -> Result { + }} + #[inline] pub fn get_media_protection_system_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MediaProtectionSystemId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_play_ready_security_version(&self) -> Result { + }} + #[inline] pub fn get_play_ready_security_version(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PlayReadySecurityVersion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{static class PlayReadyStatics} impl RtActivatable for PlayReadyStatics {} @@ -22296,45 +22296,45 @@ impl RtActivatable for PlayReadyStatics {} impl RtActivatable for PlayReadyStatics {} impl RtActivatable for PlayReadyStatics {} impl PlayReadyStatics { - #[inline] pub fn get_domain_join_service_request_type() -> Result { unsafe { + #[inline] pub fn get_domain_join_service_request_type() -> Result { >::get_activation_factory().get_domain_join_service_request_type() - }} - #[inline] pub fn get_domain_leave_service_request_type() -> Result { unsafe { + } + #[inline] pub fn get_domain_leave_service_request_type() -> Result { >::get_activation_factory().get_domain_leave_service_request_type() - }} - #[inline] pub fn get_individualization_service_request_type() -> Result { unsafe { + } + #[inline] pub fn get_individualization_service_request_type() -> Result { >::get_activation_factory().get_individualization_service_request_type() - }} - #[inline] pub fn get_license_acquirer_service_request_type() -> Result { unsafe { + } + #[inline] pub fn get_license_acquirer_service_request_type() -> Result { >::get_activation_factory().get_license_acquirer_service_request_type() - }} - #[inline] pub fn get_metering_report_service_request_type() -> Result { unsafe { + } + #[inline] pub fn get_metering_report_service_request_type() -> Result { >::get_activation_factory().get_metering_report_service_request_type() - }} - #[inline] pub fn get_revocation_service_request_type() -> Result { unsafe { + } + #[inline] pub fn get_revocation_service_request_type() -> Result { >::get_activation_factory().get_revocation_service_request_type() - }} - #[inline] pub fn get_media_protection_system_id() -> Result { unsafe { + } + #[inline] pub fn get_media_protection_system_id() -> Result { >::get_activation_factory().get_media_protection_system_id() - }} - #[inline] pub fn get_play_ready_security_version() -> Result { unsafe { + } + #[inline] pub fn get_play_ready_security_version() -> Result { >::get_activation_factory().get_play_ready_security_version() - }} - #[inline] pub fn get_play_ready_certificate_security_level() -> Result { unsafe { + } + #[inline] pub fn get_play_ready_certificate_security_level() -> Result { >::get_activation_factory().get_play_ready_certificate_security_level() - }} - #[inline] pub fn get_secure_stop_service_request_type() -> Result { unsafe { + } + #[inline] pub fn get_secure_stop_service_request_type() -> Result { >::get_activation_factory().get_secure_stop_service_request_type() - }} - #[inline] pub fn check_supported_hardware(hwdrmFeature: PlayReadyHardwareDRMFeatures) -> Result { unsafe { + } + #[inline] pub fn check_supported_hardware(hwdrmFeature: PlayReadyHardwareDRMFeatures) -> Result { >::get_activation_factory().check_supported_hardware(hwdrmFeature) - }} - #[inline] pub fn get_input_trust_authority_to_create() -> Result { unsafe { + } + #[inline] pub fn get_input_trust_authority_to_create() -> Result { >::get_activation_factory().get_input_trust_authority_to_create() - }} - #[inline] pub fn get_protection_system_id() -> Result { unsafe { + } + #[inline] pub fn get_protection_system_id() -> Result { >::get_activation_factory().get_protection_system_id() - }} + } } DEFINE_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]) [CLSID_PlayReadyStatics]); DEFINE_IID!(IID_IPlayReadyStatics2, 529361554, 24474, 16958, 148, 102, 179, 57, 105, 175, 122, 61); @@ -22342,11 +22342,11 @@ RT_INTERFACE!{static interface IPlayReadyStatics2(IPlayReadyStatics2Vtbl): IInsp fn get_PlayReadyCertificateSecurityLevel(&self, out: *mut u32) -> HRESULT }} impl IPlayReadyStatics2 { - #[inline] pub unsafe fn get_play_ready_certificate_security_level(&self) -> Result { + #[inline] pub fn get_play_ready_certificate_security_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PlayReadyCertificateSecurityLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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] { @@ -22354,16 +22354,16 @@ RT_INTERFACE!{static interface IPlayReadyStatics3(IPlayReadyStatics3Vtbl): IInsp fn CheckSupportedHardware(&self, hwdrmFeature: PlayReadyHardwareDRMFeatures, out: *mut bool) -> HRESULT }} impl IPlayReadyStatics3 { - #[inline] pub unsafe fn get_secure_stop_service_request_type(&self) -> Result { + #[inline] pub fn get_secure_stop_service_request_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SecureStopServiceRequestType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn check_supported_hardware(&self, hwdrmFeature: PlayReadyHardwareDRMFeatures) -> Result { + }} + #[inline] pub fn check_supported_hardware(&self, hwdrmFeature: PlayReadyHardwareDRMFeatures) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).CheckSupportedHardware)(self as *const _ as *mut _, 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] { @@ -22371,16 +22371,16 @@ RT_INTERFACE!{static interface IPlayReadyStatics4(IPlayReadyStatics4Vtbl): IInsp fn get_ProtectionSystemId(&self, out: *mut Guid) -> HRESULT }} impl IPlayReadyStatics4 { - #[inline] pub unsafe fn get_input_trust_authority_to_create(&self) -> Result { + #[inline] pub fn get_input_trust_authority_to_create(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InputTrustAuthorityToCreate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_protection_system_id(&self) -> Result { + }} + #[inline] pub fn get_protection_system_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProtectionSystemId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } } // Windows.Media.Protection.PlayReady } // Windows.Media.Protection @@ -22391,11 +22391,11 @@ RT_INTERFACE!{interface ISpeechContinuousRecognitionCompletedEventArgs(ISpeechCo fn get_Status(&self, out: *mut SpeechRecognitionResultStatus) -> HRESULT }} impl ISpeechContinuousRecognitionCompletedEventArgs { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SpeechContinuousRecognitionCompletedEventArgs: ISpeechContinuousRecognitionCompletedEventArgs} RT_ENUM! { enum SpeechContinuousRecognitionMode: i32 { @@ -22406,85 +22406,85 @@ RT_INTERFACE!{interface ISpeechContinuousRecognitionResultGeneratedEventArgs(ISp fn get_Result(&self, out: *mut *mut SpeechRecognitionResult) -> HRESULT }} impl ISpeechContinuousRecognitionResultGeneratedEventArgs { - #[inline] pub unsafe fn get_result(&self) -> Result> { + #[inline] pub fn get_result(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Result)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SpeechContinuousRecognitionResultGeneratedEventArgs: ISpeechContinuousRecognitionResultGeneratedEventArgs} 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(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_AutoStopSilenceTimeout(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn StartAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn StartWithModeAsync(&self, mode: SpeechContinuousRecognitionMode, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn StopAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn CancelAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn PauseAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn get_AutoStopSilenceTimeout(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_AutoStopSilenceTimeout(&self, value: foundation::TimeSpan) -> HRESULT, + fn StartAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn StartWithModeAsync(&self, mode: SpeechContinuousRecognitionMode, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn StopAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn CancelAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn PauseAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn Resume(&self) -> HRESULT, - fn add_Completed(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Completed(&self, value: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ResultGenerated(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ResultGenerated(&self, value: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_Completed(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Completed(&self, value: foundation::EventRegistrationToken) -> HRESULT, + fn add_ResultGenerated(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ResultGenerated(&self, value: foundation::EventRegistrationToken) -> HRESULT }} impl ISpeechContinuousRecognitionSession { - #[inline] pub unsafe fn get_auto_stop_silence_timeout(&self) -> Result { + #[inline] pub fn get_auto_stop_silence_timeout(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AutoStopSilenceTimeout)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_auto_stop_silence_timeout(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_auto_stop_silence_timeout(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AutoStopSilenceTimeout)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start_async(&self) -> Result> { + }} + #[inline] pub fn start_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn start_with_mode_async(&self, mode: SpeechContinuousRecognitionMode) -> Result> { + }} + #[inline] pub fn start_with_mode_async(&self, mode: SpeechContinuousRecognitionMode) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartWithModeAsync)(self as *const _ as *mut _, mode, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn stop_async(&self) -> Result> { + }} + #[inline] pub fn stop_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StopAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn cancel_async(&self) -> Result> { + }} + #[inline] pub fn cancel_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CancelAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn pause_async(&self) -> Result> { + }} + #[inline] pub fn pause_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PauseAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn resume(&self) -> Result<()> { + }} + #[inline] pub fn resume(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Resume)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_completed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_completed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Completed)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_completed(&self, value: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_completed(&self, value: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Completed)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_result_generated(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_result_generated(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ResultGenerated)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_result_generated(&self, value: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_result_generated(&self, value: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ResultGenerated)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SpeechContinuousRecognitionSession: ISpeechContinuousRecognitionSession} RT_ENUM! { enum SpeechRecognitionAudioProblem: i32 { @@ -22495,11 +22495,11 @@ RT_INTERFACE!{interface ISpeechRecognitionCompilationResult(ISpeechRecognitionCo fn get_Status(&self, out: *mut SpeechRecognitionResultStatus) -> HRESULT }} impl ISpeechRecognitionCompilationResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SpeechRecognitionCompilationResult: ISpeechRecognitionCompilationResult} RT_ENUM! { enum SpeechRecognitionConfidence: i32 { @@ -22516,38 +22516,38 @@ RT_INTERFACE!{interface ISpeechRecognitionConstraint(ISpeechRecognitionConstrain fn put_Probability(&self, value: SpeechRecognitionConstraintProbability) -> HRESULT }} impl ISpeechRecognitionConstraint { - #[inline] pub unsafe fn get_is_enabled(&self) -> Result { + #[inline] pub fn get_is_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_tag(&self) -> Result { + }} + #[inline] pub fn get_tag(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Tag)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_tag(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_tag(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Tag)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_type(&self) -> Result { + }} + #[inline] pub fn get_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Type)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_probability(&self) -> Result { + }} + #[inline] pub fn get_probability(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Probability)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_probability(&self, value: SpeechRecognitionConstraintProbability) -> Result<()> { + }} + #[inline] pub fn set_probability(&self, value: SpeechRecognitionConstraintProbability) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Probability)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum SpeechRecognitionConstraintProbability: i32 { Default (SpeechRecognitionConstraintProbability_Default) = 0, Min (SpeechRecognitionConstraintProbability_Min) = 1, Max (SpeechRecognitionConstraintProbability_Max) = 2, @@ -22560,21 +22560,21 @@ RT_INTERFACE!{interface ISpeechRecognitionGrammarFileConstraint(ISpeechRecogniti #[cfg(feature="windows-storage")] fn get_GrammarFile(&self, out: *mut *mut super::super::storage::StorageFile) -> HRESULT }} impl ISpeechRecognitionGrammarFileConstraint { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_grammar_file(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_grammar_file(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_GrammarFile)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SpeechRecognitionGrammarFileConstraint: ISpeechRecognitionGrammarFileConstraint} impl RtActivatable for SpeechRecognitionGrammarFileConstraint {} impl SpeechRecognitionGrammarFileConstraint { - #[cfg(feature="windows-storage")] #[inline] pub fn create(file: &super::super::storage::StorageFile) -> Result> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn create(file: &super::super::storage::StorageFile) -> Result> { >::get_activation_factory().create(file) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn create_with_tag(file: &super::super::storage::StorageFile, tag: &HStringArg) -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn create_with_tag(file: &super::super::storage::StorageFile, tag: &HStringArg) -> Result> { >::get_activation_factory().create_with_tag(file, tag) - }} + } } DEFINE_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]) [CLSID_SpeechRecognitionGrammarFileConstraint]); DEFINE_IID!(IID_ISpeechRecognitionGrammarFileConstraintFactory, 1034383595, 50297, 19495, 159, 25, 137, 151, 78, 243, 146, 209); @@ -22583,27 +22583,27 @@ RT_INTERFACE!{static interface ISpeechRecognitionGrammarFileConstraintFactory(IS #[cfg(feature="windows-storage")] fn CreateWithTag(&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(&self, file: &super::super::storage::StorageFile) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn create(&self, file: &super::super::storage::StorageFile) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self 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 create_with_tag(&self, file: &super::super::storage::StorageFile, tag: &HStringArg) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_with_tag(&self, file: &super::super::storage::StorageFile, tag: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithTag)(self as *const _ as *mut _, file as *const _ as *mut _, tag.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut HSTRING) -> HRESULT }} impl ISpeechRecognitionHypothesis { - #[inline] pub unsafe fn get_text(&self) -> Result { + #[inline] pub fn get_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Text)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class SpeechRecognitionHypothesis: ISpeechRecognitionHypothesis} DEFINE_IID!(IID_ISpeechRecognitionHypothesisGeneratedEventArgs, 1427511930, 32803, 22630, 65, 29, 18, 19, 187, 39, 20, 118); @@ -22611,62 +22611,62 @@ RT_INTERFACE!{interface ISpeechRecognitionHypothesisGeneratedEventArgs(ISpeechRe fn get_Hypothesis(&self, out: *mut *mut SpeechRecognitionHypothesis) -> HRESULT }} impl ISpeechRecognitionHypothesisGeneratedEventArgs { - #[inline] pub unsafe fn get_hypothesis(&self) -> Result> { + #[inline] pub fn get_hypothesis(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Hypothesis)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SpeechRecognitionHypothesisGeneratedEventArgs: ISpeechRecognitionHypothesisGeneratedEventArgs} 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_Commands(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl ISpeechRecognitionListConstraint { - #[inline] pub unsafe fn get_commands(&self) -> Result>> { + #[inline] pub fn get_commands(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Commands)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SpeechRecognitionListConstraint: ISpeechRecognitionListConstraint} impl RtActivatable for SpeechRecognitionListConstraint {} impl SpeechRecognitionListConstraint { - #[inline] pub fn create(commands: &super::super::foundation::collections::IIterable) -> Result> { unsafe { + #[inline] pub fn create(commands: &foundation::collections::IIterable) -> Result> { >::get_activation_factory().create(commands) - }} - #[inline] pub fn create_with_tag(commands: &super::super::foundation::collections::IIterable, tag: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_with_tag(commands: &foundation::collections::IIterable, tag: &HStringArg) -> Result> { >::get_activation_factory().create_with_tag(commands, tag) - }} + } } DEFINE_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]) [CLSID_SpeechRecognitionListConstraint]); 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(&self, commands: *mut super::super::foundation::collections::IIterable, out: *mut *mut SpeechRecognitionListConstraint) -> HRESULT, - fn CreateWithTag(&self, commands: *mut super::super::foundation::collections::IIterable, tag: HSTRING, out: *mut *mut SpeechRecognitionListConstraint) -> HRESULT + fn Create(&self, commands: *mut foundation::collections::IIterable, out: *mut *mut SpeechRecognitionListConstraint) -> HRESULT, + fn CreateWithTag(&self, commands: *mut foundation::collections::IIterable, tag: HSTRING, out: *mut *mut SpeechRecognitionListConstraint) -> HRESULT }} impl ISpeechRecognitionListConstraintFactory { - #[inline] pub unsafe fn create(&self, commands: &super::super::foundation::collections::IIterable) -> Result> { + #[inline] pub fn create(&self, commands: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, 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(&self, commands: &super::super::foundation::collections::IIterable, tag: &HStringArg) -> Result> { + }} + #[inline] pub fn create_with_tag(&self, commands: &foundation::collections::IIterable, tag: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithTag)(self as *const _ as *mut _, commands as *const _ as *mut _, tag.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut SpeechRecognitionAudioProblem) -> HRESULT }} impl ISpeechRecognitionQualityDegradingEventArgs { - #[inline] pub unsafe fn get_problem(&self) -> Result { + #[inline] pub fn get_problem(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Problem)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SpeechRecognitionQualityDegradingEventArgs: ISpeechRecognitionQualityDegradingEventArgs} DEFINE_IID!(IID_ISpeechRecognitionResult, 1311781207, 846, 18002, 133, 126, 208, 69, 76, 196, 190, 236); @@ -22675,70 +22675,70 @@ RT_INTERFACE!{interface ISpeechRecognitionResult(ISpeechRecognitionResultVtbl): fn get_Text(&self, out: *mut HSTRING) -> HRESULT, fn get_Confidence(&self, out: *mut SpeechRecognitionConfidence) -> HRESULT, fn get_SemanticInterpretation(&self, out: *mut *mut SpeechRecognitionSemanticInterpretation) -> HRESULT, - fn GetAlternates(&self, maxAlternates: u32, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn GetAlternates(&self, maxAlternates: u32, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_Constraint(&self, out: *mut *mut ISpeechRecognitionConstraint) -> HRESULT, - fn get_RulePath(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_RulePath(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_RawConfidence(&self, out: *mut f64) -> HRESULT }} impl ISpeechRecognitionResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_text(&self) -> Result { + }} + #[inline] pub fn get_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Text)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_confidence(&self) -> Result { + }} + #[inline] pub fn get_confidence(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Confidence)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_semantic_interpretation(&self) -> Result> { + }} + #[inline] pub fn get_semantic_interpretation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SemanticInterpretation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_alternates(&self, maxAlternates: u32) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_alternates(&self, maxAlternates: u32) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAlternates)(self as *const _ as *mut _, maxAlternates, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_constraint(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_constraint(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Constraint)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rule_path(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_rule_path(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RulePath)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_raw_confidence(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_raw_confidence(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RawConfidence)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SpeechRecognitionResult: ISpeechRecognitionResult} 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(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_PhraseDuration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + fn get_PhraseStartTime(&self, out: *mut foundation::DateTime) -> HRESULT, + fn get_PhraseDuration(&self, out: *mut foundation::TimeSpan) -> HRESULT }} impl ISpeechRecognitionResult2 { - #[inline] pub unsafe fn get_phrase_start_time(&self) -> Result { + #[inline] pub fn get_phrase_start_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PhraseStartTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_phrase_duration(&self) -> Result { + }} + #[inline] pub fn get_phrase_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PhraseDuration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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, @@ -22748,14 +22748,14 @@ RT_ENUM! { enum SpeechRecognitionScenario: i32 { }} 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(&self, out: *mut *mut super::super::foundation::collections::IMapView>) -> HRESULT + fn get_Properties(&self, out: *mut *mut foundation::collections::IMapView>) -> HRESULT }} impl ISpeechRecognitionSemanticInterpretation { - #[inline] pub unsafe fn get_properties(&self) -> Result>>> { + #[inline] pub fn get_properties(&self) -> Result>>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SpeechRecognitionSemanticInterpretation: ISpeechRecognitionSemanticInterpretation} DEFINE_IID!(IID_ISpeechRecognitionTopicConstraint, 3211779865, 33373, 20073, 166, 129, 54, 228, 140, 241, 201, 62); @@ -22764,26 +22764,26 @@ RT_INTERFACE!{interface ISpeechRecognitionTopicConstraint(ISpeechRecognitionTopi fn get_TopicHint(&self, out: *mut HSTRING) -> HRESULT }} impl ISpeechRecognitionTopicConstraint { - #[inline] pub unsafe fn get_scenario(&self) -> Result { + #[inline] pub fn get_scenario(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Scenario)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_topic_hint(&self) -> Result { + }} + #[inline] pub fn get_topic_hint(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TopicHint)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class SpeechRecognitionTopicConstraint: ISpeechRecognitionTopicConstraint} impl RtActivatable for SpeechRecognitionTopicConstraint {} impl SpeechRecognitionTopicConstraint { - #[inline] pub fn create(scenario: SpeechRecognitionScenario, topicHint: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(scenario: SpeechRecognitionScenario, topicHint: &HStringArg) -> Result> { >::get_activation_factory().create(scenario, topicHint) - }} - #[inline] pub fn create_with_tag(scenario: SpeechRecognitionScenario, topicHint: &HStringArg, tag: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_with_tag(scenario: SpeechRecognitionScenario, topicHint: &HStringArg, tag: &HStringArg) -> Result> { >::get_activation_factory().create_with_tag(scenario, topicHint, tag) - }} + } } DEFINE_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]) [CLSID_SpeechRecognitionTopicConstraint]); DEFINE_IID!(IID_ISpeechRecognitionTopicConstraintFactory, 1852335071, 60421, 18391, 165, 223, 86, 163, 67, 30, 88, 210); @@ -22792,16 +22792,16 @@ RT_INTERFACE!{static interface ISpeechRecognitionTopicConstraintFactory(ISpeechR fn CreateWithTag(&self, scenario: SpeechRecognitionScenario, topicHint: HSTRING, tag: HSTRING, out: *mut *mut SpeechRecognitionTopicConstraint) -> HRESULT }} impl ISpeechRecognitionTopicConstraintFactory { - #[inline] pub unsafe fn create(&self, scenario: SpeechRecognitionScenario, topicHint: &HStringArg) -> Result> { + #[inline] pub fn create(&self, scenario: SpeechRecognitionScenario, topicHint: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, scenario, topicHint.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_tag(&self, scenario: SpeechRecognitionScenario, topicHint: &HStringArg, tag: &HStringArg) -> Result> { + }} + #[inline] pub fn create_with_tag(&self, scenario: SpeechRecognitionScenario, topicHint: &HStringArg, tag: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithTag)(self as *const _ as *mut _, scenario, topicHint.get(), tag.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ISpeechRecognitionVoiceCommandDefinitionConstraint, 4068023339, 7924, 19175, 157, 119, 182, 255, 16, 184, 163, 194); RT_INTERFACE!{interface ISpeechRecognitionVoiceCommandDefinitionConstraint(ISpeechRecognitionVoiceCommandDefinitionConstraintVtbl): IInspectable(IInspectableVtbl) [IID_ISpeechRecognitionVoiceCommandDefinitionConstraint] { @@ -22812,71 +22812,71 @@ DEFINE_IID!(IID_ISpeechRecognizer, 197380555, 49770, 16626, 174, 181, 128, 150, RT_INTERFACE!{interface ISpeechRecognizer(ISpeechRecognizerVtbl): IInspectable(IInspectableVtbl) [IID_ISpeechRecognizer] { #[cfg(not(feature="windows-globalization"))] fn __Dummy0(&self) -> (), #[cfg(feature="windows-globalization")] fn get_CurrentLanguage(&self, out: *mut *mut super::super::globalization::Language) -> HRESULT, - fn get_Constraints(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Constraints(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_Timeouts(&self, out: *mut *mut SpeechRecognizerTimeouts) -> HRESULT, fn get_UIOptions(&self, out: *mut *mut SpeechRecognizerUIOptions) -> HRESULT, - fn CompileConstraintsAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RecognizeAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RecognizeWithUIAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_RecognitionQualityDegrading(&self, speechRecognitionQualityDegradingHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RecognitionQualityDegrading(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_StateChanged(&self, stateChangedHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StateChanged(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn CompileConstraintsAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RecognizeAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RecognizeWithUIAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_RecognitionQualityDegrading(&self, speechRecognitionQualityDegradingHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RecognitionQualityDegrading(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_StateChanged(&self, stateChangedHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StateChanged(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl ISpeechRecognizer { - #[cfg(feature="windows-globalization")] #[inline] pub unsafe fn get_current_language(&self) -> Result> { + #[cfg(feature="windows-globalization")] #[inline] pub fn get_current_language(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CurrentLanguage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_constraints(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_constraints(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Constraints)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_timeouts(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_timeouts(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Timeouts)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_uioptions(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_uioptions(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UIOptions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn compile_constraints_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn compile_constraints_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CompileConstraintsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn recognize_async(&self) -> Result>> { + }} + #[inline] pub fn recognize_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RecognizeAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn recognize_with_uiasync(&self) -> Result>> { + }} + #[inline] pub fn recognize_with_uiasync(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RecognizeWithUIAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_recognition_quality_degrading(&self, speechRecognitionQualityDegradingHandler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_recognition_quality_degrading(&self, speechRecognitionQualityDegradingHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RecognitionQualityDegrading)(self as *const _ as *mut _, speechRecognitionQualityDegradingHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_recognition_quality_degrading(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_recognition_quality_degrading(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RecognitionQualityDegrading)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_state_changed(&self, stateChangedHandler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_state_changed(&self, stateChangedHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StateChanged)(self as *const _ as *mut _, stateChangedHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_state_changed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_state_changed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StateChanged)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SpeechRecognizer: ISpeechRecognizer} impl RtActivatable for SpeechRecognizer {} @@ -22884,67 +22884,67 @@ impl RtActivatable for SpeechRecognizer {} impl RtActivatable for SpeechRecognizer {} impl RtActivatable for SpeechRecognizer {} impl SpeechRecognizer { - #[cfg(feature="windows-globalization")] #[inline] pub fn create(language: &super::super::globalization::Language) -> Result> { unsafe { + #[cfg(feature="windows-globalization")] #[inline] pub fn create(language: &super::super::globalization::Language) -> Result> { >::get_activation_factory().create(language) - }} - #[cfg(feature="windows-globalization")] #[inline] pub fn get_system_speech_language() -> Result> { unsafe { + } + #[cfg(feature="windows-globalization")] #[inline] pub fn get_system_speech_language() -> Result>> { >::get_activation_factory().get_system_speech_language() - }} - #[cfg(feature="windows-globalization")] #[inline] pub fn get_supported_topic_languages() -> Result>> { unsafe { + } + #[cfg(feature="windows-globalization")] #[inline] pub fn get_supported_topic_languages() -> Result>>> { >::get_activation_factory().get_supported_topic_languages() - }} - #[cfg(feature="windows-globalization")] #[inline] pub fn get_supported_grammar_languages() -> Result>> { unsafe { + } + #[cfg(feature="windows-globalization")] #[inline] pub fn get_supported_grammar_languages() -> Result>>> { >::get_activation_factory().get_supported_grammar_languages() - }} - #[cfg(feature="windows-globalization")] #[inline] pub fn try_set_system_speech_language_async(speechLanguage: &super::super::globalization::Language) -> Result>> { unsafe { + } + #[cfg(feature="windows-globalization")] #[inline] pub fn try_set_system_speech_language_async(speechLanguage: &super::super::globalization::Language) -> Result>> { >::get_activation_factory().try_set_system_speech_language_async(speechLanguage) - }} + } } DEFINE_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]) [CLSID_SpeechRecognizer]); 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(&self, out: *mut *mut SpeechContinuousRecognitionSession) -> HRESULT, fn get_State(&self, out: *mut SpeechRecognizerState) -> HRESULT, - fn StopRecognitionAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn add_HypothesisGenerated(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_HypothesisGenerated(&self, value: super::super::foundation::EventRegistrationToken) -> HRESULT + fn StopRecognitionAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn add_HypothesisGenerated(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_HypothesisGenerated(&self, value: foundation::EventRegistrationToken) -> HRESULT }} impl ISpeechRecognizer2 { - #[inline] pub unsafe fn get_continuous_recognition_session(&self) -> Result> { + #[inline] pub fn get_continuous_recognition_session(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContinuousRecognitionSession)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_state(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn stop_recognition_async(&self) -> Result> { + }} + #[inline] pub fn stop_recognition_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StopRecognitionAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_hypothesis_generated(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_hypothesis_generated(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_HypothesisGenerated)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_hypothesis_generated(&self, value: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_hypothesis_generated(&self, value: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_HypothesisGenerated)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, language: *mut super::super::globalization::Language, out: *mut *mut SpeechRecognizer) -> HRESULT }} impl ISpeechRecognizerFactory { - #[cfg(feature="windows-globalization")] #[inline] pub unsafe fn create(&self, language: &super::super::globalization::Language) -> Result> { + #[cfg(feature="windows-globalization")] #[inline] pub fn create(&self, language: &super::super::globalization::Language) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, language as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -22954,84 +22954,84 @@ RT_INTERFACE!{interface ISpeechRecognizerStateChangedEventArgs(ISpeechRecognizer fn get_State(&self, out: *mut SpeechRecognizerState) -> HRESULT }} impl ISpeechRecognizerStateChangedEventArgs { - #[inline] pub unsafe fn get_state(&self) -> Result { + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SpeechRecognizerStateChangedEventArgs: ISpeechRecognizerStateChangedEventArgs} 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(&self, out: *mut *mut super::super::globalization::Language) -> HRESULT, - #[cfg(feature="windows-globalization")] fn get_SupportedTopicLanguages(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - #[cfg(feature="windows-globalization")] fn get_SupportedGrammarLanguages(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + #[cfg(feature="windows-globalization")] fn get_SupportedTopicLanguages(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + #[cfg(feature="windows-globalization")] fn get_SupportedGrammarLanguages(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl ISpeechRecognizerStatics { - #[cfg(feature="windows-globalization")] #[inline] pub unsafe fn get_system_speech_language(&self) -> Result> { + #[cfg(feature="windows-globalization")] #[inline] pub fn get_system_speech_language(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SystemSpeechLanguage)(self 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_supported_topic_languages(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-globalization")] #[inline] pub fn get_supported_topic_languages(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedTopicLanguages)(self 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_supported_grammar_languages(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-globalization")] #[inline] pub fn get_supported_grammar_languages(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedGrammarLanguages)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_ISpeechRecognizerStatics2, 488312213, 30053, 20217, 162, 243, 186, 21, 22, 42, 150, 207); RT_INTERFACE!{static interface ISpeechRecognizerStatics2(ISpeechRecognizerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_ISpeechRecognizerStatics2] { - #[cfg(feature="windows-globalization")] fn TrySetSystemSpeechLanguageAsync(&self, speechLanguage: *mut super::super::globalization::Language, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-globalization")] fn TrySetSystemSpeechLanguageAsync(&self, speechLanguage: *mut super::super::globalization::Language, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ISpeechRecognizerStatics2 { - #[cfg(feature="windows-globalization")] #[inline] pub unsafe fn try_set_system_speech_language_async(&self, speechLanguage: &super::super::globalization::Language) -> Result>> { + #[cfg(feature="windows-globalization")] #[inline] pub fn try_set_system_speech_language_async(&self, speechLanguage: &super::super::globalization::Language) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TrySetSystemSpeechLanguageAsync)(self as *const _ as *mut _, speechLanguage as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(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(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_InitialSilenceTimeout(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_EndSilenceTimeout(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_EndSilenceTimeout(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_BabbleTimeout(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_BabbleTimeout(&self, value: super::super::foundation::TimeSpan) -> HRESULT + fn get_InitialSilenceTimeout(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_InitialSilenceTimeout(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_EndSilenceTimeout(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_EndSilenceTimeout(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_BabbleTimeout(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_BabbleTimeout(&self, value: foundation::TimeSpan) -> HRESULT }} impl ISpeechRecognizerTimeouts { - #[inline] pub unsafe fn get_initial_silence_timeout(&self) -> Result { + #[inline] pub fn get_initial_silence_timeout(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InitialSilenceTimeout)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_initial_silence_timeout(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_initial_silence_timeout(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InitialSilenceTimeout)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_end_silence_timeout(&self) -> Result { + }} + #[inline] pub fn get_end_silence_timeout(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EndSilenceTimeout)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_end_silence_timeout(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_end_silence_timeout(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_EndSilenceTimeout)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_babble_timeout(&self) -> Result { + }} + #[inline] pub fn get_babble_timeout(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BabbleTimeout)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_babble_timeout(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_babble_timeout(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BabbleTimeout)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SpeechRecognizerTimeouts: ISpeechRecognizerTimeouts} DEFINE_IID!(IID_ISpeechRecognizerUIOptions, 2022233665, 47403, 17594, 162, 95, 209, 134, 70, 48, 100, 31); @@ -23046,42 +23046,42 @@ RT_INTERFACE!{interface ISpeechRecognizerUIOptions(ISpeechRecognizerUIOptionsVtb fn put_ShowConfirmation(&self, value: bool) -> HRESULT }} impl ISpeechRecognizerUIOptions { - #[inline] pub unsafe fn get_example_text(&self) -> Result { + #[inline] pub fn get_example_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExampleText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_example_text(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_example_text(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ExampleText)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_audible_prompt(&self) -> Result { + }} + #[inline] pub fn get_audible_prompt(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudiblePrompt)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_audible_prompt(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_audible_prompt(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AudiblePrompt)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_read_back_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_read_back_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsReadBackEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_read_back_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_read_back_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsReadBackEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_show_confirmation(&self) -> Result { + }} + #[inline] pub fn get_show_confirmation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ShowConfirmation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_show_confirmation(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_show_confirmation(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ShowConfirmation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SpeechRecognizerUIOptions: ISpeechRecognizerUIOptions} } // Windows.Media.SpeechRecognition @@ -23089,86 +23089,86 @@ pub mod speechsynthesis { // Windows.Media.SpeechSynthesis use ::prelude::*; 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_AllVoices(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_DefaultVoice(&self, out: *mut *mut VoiceInformation) -> HRESULT }} impl IInstalledVoicesStatic { - #[inline] pub unsafe fn get_all_voices(&self) -> Result>> { + #[inline] pub fn get_all_voices(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AllVoices)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_voice(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_default_voice(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DefaultVoice)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IInstalledVoicesStatic2, 1680170798, 13709, 16472, 190, 154, 253, 63, 203, 66, 53, 48); RT_INTERFACE!{static interface IInstalledVoicesStatic2(IInstalledVoicesStatic2Vtbl): IInspectable(IInspectableVtbl) [IID_IInstalledVoicesStatic2] { - fn TrySetDefaultVoiceAsync(&self, voice: *mut VoiceInformation, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn TrySetDefaultVoiceAsync(&self, voice: *mut VoiceInformation, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IInstalledVoicesStatic2 { - #[inline] pub unsafe fn try_set_default_voice_async(&self, voice: &VoiceInformation) -> Result>> { + #[inline] pub fn try_set_default_voice_async(&self, voice: &VoiceInformation) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TrySetDefaultVoiceAsync)(self as *const _ as *mut _, voice as *const _ as *mut _, &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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_Markers(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl ISpeechSynthesisStream { - #[inline] pub unsafe fn get_markers(&self) -> Result>> { + #[inline] pub fn get_markers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Markers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, text: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn SynthesizeSsmlToStreamAsync(&self, ssml: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn SynthesizeTextToStreamAsync(&self, text: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn SynthesizeSsmlToStreamAsync(&self, ssml: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn put_Voice(&self, value: *mut VoiceInformation) -> HRESULT, fn get_Voice(&self, out: *mut *mut VoiceInformation) -> HRESULT }} impl ISpeechSynthesizer { - #[inline] pub unsafe fn synthesize_text_to_stream_async(&self, text: &HStringArg) -> Result>> { + #[inline] pub fn synthesize_text_to_stream_async(&self, text: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SynthesizeTextToStreamAsync)(self as *const _ as *mut _, text.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn synthesize_ssml_to_stream_async(&self, ssml: &HStringArg) -> Result>> { + }} + #[inline] pub fn synthesize_ssml_to_stream_async(&self, ssml: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SynthesizeSsmlToStreamAsync)(self as *const _ as *mut _, ssml.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_voice(&self, value: &VoiceInformation) -> Result<()> { + }} + #[inline] pub fn set_voice(&self, value: &VoiceInformation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Voice)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_voice(&self) -> Result> { + }} + #[inline] pub fn get_voice(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Voice)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SpeechSynthesizer: ISpeechSynthesizer} impl RtActivatable for SpeechSynthesizer {} impl RtActivatable for SpeechSynthesizer {} impl RtActivatable for SpeechSynthesizer {} impl SpeechSynthesizer { - #[inline] pub fn get_all_voices() -> Result>> { unsafe { + #[inline] pub fn get_all_voices() -> Result>>> { >::get_activation_factory().get_all_voices() - }} - #[inline] pub fn get_default_voice() -> Result> { unsafe { + } + #[inline] pub fn get_default_voice() -> Result>> { >::get_activation_factory().get_default_voice() - }} - #[inline] pub fn try_set_default_voice_async(voice: &VoiceInformation) -> Result>> { unsafe { + } + #[inline] pub fn try_set_default_voice_async(voice: &VoiceInformation) -> Result>> { >::get_activation_factory().try_set_default_voice_async(voice) - }} + } } DEFINE_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]) [CLSID_SpeechSynthesizer]); DEFINE_IID!(IID_ISpeechSynthesizer2, 2814766258, 17209, 19818, 187, 248, 199, 164, 241, 84, 76, 46); @@ -23176,11 +23176,11 @@ RT_INTERFACE!{interface ISpeechSynthesizer2(ISpeechSynthesizer2Vtbl): IInspectab fn get_Options(&self, out: *mut *mut SpeechSynthesizerOptions) -> HRESULT }} impl ISpeechSynthesizer2 { - #[inline] pub unsafe fn get_options(&self) -> Result> { + #[inline] pub fn get_options(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Options)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_ISpeechSynthesizerOptions, 2699180145, 52285, 17353, 145, 177, 238, 24, 83, 36, 216, 61); RT_INTERFACE!{interface ISpeechSynthesizerOptions(ISpeechSynthesizerOptionsVtbl): IInspectable(IInspectableVtbl) [IID_ISpeechSynthesizerOptions] { @@ -23190,24 +23190,24 @@ RT_INTERFACE!{interface ISpeechSynthesizerOptions(ISpeechSynthesizerOptionsVtbl) fn put_IncludeSentenceBoundaryMetadata(&self, value: bool) -> HRESULT }} impl ISpeechSynthesizerOptions { - #[inline] pub unsafe fn get_include_word_boundary_metadata(&self) -> Result { + #[inline] pub fn get_include_word_boundary_metadata(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IncludeWordBoundaryMetadata)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_include_word_boundary_metadata(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_include_word_boundary_metadata(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IncludeWordBoundaryMetadata)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_include_sentence_boundary_metadata(&self) -> Result { + }} + #[inline] pub fn get_include_sentence_boundary_metadata(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IncludeSentenceBoundaryMetadata)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_include_sentence_boundary_metadata(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_include_sentence_boundary_metadata(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IncludeSentenceBoundaryMetadata)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SpeechSynthesizerOptions: ISpeechSynthesizerOptions} DEFINE_IID!(IID_ISpeechSynthesizerOptions2, 482276878, 4508, 19437, 177, 24, 210, 80, 195, 162, 87, 147); @@ -23220,33 +23220,33 @@ RT_INTERFACE!{interface ISpeechSynthesizerOptions2(ISpeechSynthesizerOptions2Vtb fn put_AudioPitch(&self, value: f64) -> HRESULT }} impl ISpeechSynthesizerOptions2 { - #[inline] pub unsafe fn get_audio_volume(&self) -> Result { + #[inline] pub fn get_audio_volume(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AudioVolume)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_audio_volume(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_audio_volume(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AudioVolume)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_speaking_rate(&self) -> Result { + }} + #[inline] pub fn get_speaking_rate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SpeakingRate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_speaking_rate(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_speaking_rate(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SpeakingRate)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_pitch(&self) -> Result { + }} + #[inline] pub fn get_audio_pitch(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AudioPitch)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_audio_pitch(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_audio_pitch(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AudioPitch)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum VoiceGender: i32 { Male (VoiceGender_Male) = 0, Female (VoiceGender_Female) = 1, @@ -23260,31 +23260,31 @@ RT_INTERFACE!{interface IVoiceInformation(IVoiceInformationVtbl): IInspectable(I fn get_Gender(&self, out: *mut VoiceGender) -> HRESULT }} impl IVoiceInformation { - #[inline] pub unsafe fn get_display_name(&self) -> Result { + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&self) -> Result { + }} + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_language(&self) -> Result { + }} + #[inline] pub fn get_language(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Language)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_description(&self) -> Result { + }} + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_gender(&self) -> Result { + }} + #[inline] pub fn get_gender(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Gender)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class VoiceInformation: IVoiceInformation} } // Windows.Media.SpeechSynthesis @@ -23292,89 +23292,89 @@ pub mod transcoding { // Windows.Media.Transcoding use ::prelude::*; 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(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_TrimStartTime(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_TrimStopTime(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_TrimStopTime(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn put_TrimStartTime(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_TrimStartTime(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_TrimStopTime(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_TrimStopTime(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn put_AlwaysReencode(&self, value: bool) -> HRESULT, fn get_AlwaysReencode(&self, out: *mut bool) -> HRESULT, fn put_HardwareAccelerationEnabled(&self, value: bool) -> HRESULT, fn get_HardwareAccelerationEnabled(&self, out: *mut bool) -> HRESULT, fn AddAudioEffect(&self, activatableClassId: HSTRING) -> HRESULT, - fn AddAudioEffectWithSettings(&self, activatableClassId: HSTRING, effectRequired: bool, configuration: *mut super::super::foundation::collections::IPropertySet) -> HRESULT, + fn AddAudioEffectWithSettings(&self, activatableClassId: HSTRING, effectRequired: bool, configuration: *mut foundation::collections::IPropertySet) -> HRESULT, fn AddVideoEffect(&self, activatableClassId: HSTRING) -> HRESULT, - fn AddVideoEffectWithSettings(&self, activatableClassId: HSTRING, effectRequired: bool, configuration: *mut super::super::foundation::collections::IPropertySet) -> HRESULT, + fn AddVideoEffectWithSettings(&self, activatableClassId: HSTRING, effectRequired: bool, configuration: *mut foundation::collections::IPropertySet) -> HRESULT, fn ClearEffects(&self) -> HRESULT, - #[cfg(feature="windows-storage")] fn PrepareFileTranscodeAsync(&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(&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 + #[cfg(feature="windows-storage")] fn PrepareFileTranscodeAsync(&self, source: *mut super::super::storage::IStorageFile, destination: *mut super::super::storage::IStorageFile, profile: *mut super::mediaproperties::MediaEncodingProfile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn PrepareStreamTranscodeAsync(&self, source: *mut super::super::storage::streams::IRandomAccessStream, destination: *mut super::super::storage::streams::IRandomAccessStream, profile: *mut super::mediaproperties::MediaEncodingProfile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IMediaTranscoder { - #[inline] pub unsafe fn set_trim_start_time(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + #[inline] pub fn set_trim_start_time(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TrimStartTime)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_trim_start_time(&self) -> Result { + }} + #[inline] pub fn get_trim_start_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TrimStartTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_trim_stop_time(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_trim_stop_time(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TrimStopTime)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_trim_stop_time(&self) -> Result { + }} + #[inline] pub fn get_trim_stop_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TrimStopTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_always_reencode(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_always_reencode(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AlwaysReencode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_always_reencode(&self) -> Result { + }} + #[inline] pub fn get_always_reencode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AlwaysReencode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_hardware_acceleration_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_hardware_acceleration_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_HardwareAccelerationEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_hardware_acceleration_enabled(&self) -> Result { + }} + #[inline] pub fn get_hardware_acceleration_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HardwareAccelerationEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_audio_effect(&self, activatableClassId: &HStringArg) -> Result<()> { + }} + #[inline] pub fn add_audio_effect(&self, activatableClassId: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddAudioEffect)(self as *const _ as *mut _, activatableClassId.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_audio_effect_with_settings(&self, activatableClassId: &HStringArg, effectRequired: bool, configuration: &super::super::foundation::collections::IPropertySet) -> Result<()> { + }} + #[inline] pub fn add_audio_effect_with_settings(&self, activatableClassId: &HStringArg, effectRequired: bool, configuration: &foundation::collections::IPropertySet) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddAudioEffectWithSettings)(self as *const _ as *mut _, activatableClassId.get(), effectRequired, configuration as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_video_effect(&self, activatableClassId: &HStringArg) -> Result<()> { + }} + #[inline] pub fn add_video_effect(&self, activatableClassId: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddVideoEffect)(self as *const _ as *mut _, activatableClassId.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_video_effect_with_settings(&self, activatableClassId: &HStringArg, effectRequired: bool, configuration: &super::super::foundation::collections::IPropertySet) -> Result<()> { + }} + #[inline] pub fn add_video_effect_with_settings(&self, activatableClassId: &HStringArg, effectRequired: bool, configuration: &foundation::collections::IPropertySet) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddVideoEffectWithSettings)(self as *const _ as *mut _, activatableClassId.get(), effectRequired, configuration as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn clear_effects(&self) -> Result<()> { + }} + #[inline] pub fn clear_effects(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ClearEffects)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn prepare_file_transcode_async(&self, source: &super::super::storage::IStorageFile, destination: &super::super::storage::IStorageFile, profile: &super::mediaproperties::MediaEncodingProfile) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn prepare_file_transcode_async(&self, source: &super::super::storage::IStorageFile, destination: &super::super::storage::IStorageFile, profile: &super::mediaproperties::MediaEncodingProfile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PrepareFileTranscodeAsync)(self as *const _ as *mut _, 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(&self, source: &super::super::storage::streams::IRandomAccessStream, destination: &super::super::storage::streams::IRandomAccessStream, profile: &super::mediaproperties::MediaEncodingProfile) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn prepare_stream_transcode_async(&self, source: &super::super::storage::streams::IRandomAccessStream, destination: &super::super::storage::streams::IRandomAccessStream, profile: &super::mediaproperties::MediaEncodingProfile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PrepareStreamTranscodeAsync)(self as *const _ as *mut _, 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) } - } + }} } RT_CLASS!{class MediaTranscoder: IMediaTranscoder} impl RtActivatable for MediaTranscoder {} @@ -23382,25 +23382,25 @@ DEFINE_CLSID!(MediaTranscoder(&[87,105,110,100,111,119,115,46,77,101,100,105,97, 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(&self) -> (), - #[cfg(feature="windows-storage")] fn PrepareMediaStreamSourceTranscodeAsync(&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, + #[cfg(feature="windows-storage")] fn PrepareMediaStreamSourceTranscodeAsync(&self, source: *mut super::core::IMediaSource, destination: *mut super::super::storage::streams::IRandomAccessStream, profile: *mut super::mediaproperties::MediaEncodingProfile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn put_VideoProcessingAlgorithm(&self, value: MediaVideoProcessingAlgorithm) -> HRESULT, fn get_VideoProcessingAlgorithm(&self, out: *mut MediaVideoProcessingAlgorithm) -> HRESULT }} impl IMediaTranscoder2 { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn prepare_media_stream_source_transcode_async(&self, source: &super::core::IMediaSource, destination: &super::super::storage::streams::IRandomAccessStream, profile: &super::mediaproperties::MediaEncodingProfile) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn prepare_media_stream_source_transcode_async(&self, source: &super::core::IMediaSource, destination: &super::super::storage::streams::IRandomAccessStream, profile: &super::mediaproperties::MediaEncodingProfile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PrepareMediaStreamSourceTranscodeAsync)(self as *const _ as *mut _, 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(&self, value: MediaVideoProcessingAlgorithm) -> Result<()> { + }} + #[inline] pub fn set_video_processing_algorithm(&self, value: MediaVideoProcessingAlgorithm) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_VideoProcessingAlgorithm)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_processing_algorithm(&self) -> Result { + }} + #[inline] pub fn get_video_processing_algorithm(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VideoProcessingAlgorithm)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum MediaVideoProcessingAlgorithm: i32 { Default (MediaVideoProcessingAlgorithm_Default) = 0, MrfCrf444 (MediaVideoProcessingAlgorithm_MrfCrf444) = 1, @@ -23409,24 +23409,24 @@ DEFINE_IID!(IID_IPrepareTranscodeResult, 99769806, 39247, 18996, 157, 104, 151, RT_INTERFACE!{interface IPrepareTranscodeResult(IPrepareTranscodeResultVtbl): IInspectable(IInspectableVtbl) [IID_IPrepareTranscodeResult] { fn get_CanTranscode(&self, out: *mut bool) -> HRESULT, fn get_FailureReason(&self, out: *mut TranscodeFailureReason) -> HRESULT, - fn TranscodeAsync(&self, out: *mut *mut super::super::foundation::IAsyncActionWithProgress) -> HRESULT + fn TranscodeAsync(&self, out: *mut *mut foundation::IAsyncActionWithProgress) -> HRESULT }} impl IPrepareTranscodeResult { - #[inline] pub unsafe fn get_can_transcode(&self) -> Result { + #[inline] pub fn get_can_transcode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanTranscode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_failure_reason(&self) -> Result { + }} + #[inline] pub fn get_failure_reason(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FailureReason)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn transcode_async(&self) -> Result>> { + }} + #[inline] pub fn transcode_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TranscodeAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PrepareTranscodeResult: IPrepareTranscodeResult} RT_ENUM! { enum TranscodeFailureReason: i32 { @@ -23447,69 +23447,69 @@ RT_INTERFACE!{interface IAudioEncodingProperties(IAudioEncodingPropertiesVtbl): fn get_BitsPerSample(&self, out: *mut u32) -> HRESULT }} impl IAudioEncodingProperties { - #[inline] pub unsafe fn set_bitrate(&self, value: u32) -> Result<()> { + #[inline] pub fn set_bitrate(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Bitrate)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_bitrate(&self) -> Result { + }} + #[inline] pub fn get_bitrate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Bitrate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_channel_count(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_channel_count(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ChannelCount)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_channel_count(&self) -> Result { + }} + #[inline] pub fn get_channel_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ChannelCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_sample_rate(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_sample_rate(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SampleRate)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_sample_rate(&self) -> Result { + }} + #[inline] pub fn get_sample_rate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SampleRate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_bits_per_sample(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_bits_per_sample(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BitsPerSample)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_bits_per_sample(&self) -> Result { + }} + #[inline] pub fn get_bits_per_sample(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BitsPerSample)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AudioEncodingProperties: IAudioEncodingProperties} impl RtActivatable for AudioEncodingProperties {} impl RtActivatable for AudioEncodingProperties {} impl RtActivatable for AudioEncodingProperties {} impl AudioEncodingProperties { - #[inline] pub fn create_aac(sampleRate: u32, channelCount: u32, bitrate: u32) -> Result> { unsafe { + #[inline] pub fn create_aac(sampleRate: u32, channelCount: u32, bitrate: u32) -> Result>> { >::get_activation_factory().create_aac(sampleRate, channelCount, bitrate) - }} - #[inline] pub fn create_aac_adts(sampleRate: u32, channelCount: u32, bitrate: u32) -> Result> { unsafe { + } + #[inline] pub fn create_aac_adts(sampleRate: u32, channelCount: u32, bitrate: u32) -> Result>> { >::get_activation_factory().create_aac_adts(sampleRate, channelCount, bitrate) - }} - #[inline] pub fn create_mp3(sampleRate: u32, channelCount: u32, bitrate: u32) -> Result> { unsafe { + } + #[inline] pub fn create_mp3(sampleRate: u32, channelCount: u32, bitrate: u32) -> Result>> { >::get_activation_factory().create_mp3(sampleRate, channelCount, bitrate) - }} - #[inline] pub fn create_pcm(sampleRate: u32, channelCount: u32, bitsPerSample: u32) -> Result> { unsafe { + } + #[inline] pub fn create_pcm(sampleRate: u32, channelCount: u32, bitsPerSample: u32) -> Result>> { >::get_activation_factory().create_pcm(sampleRate, channelCount, bitsPerSample) - }} - #[inline] pub fn create_wma(sampleRate: u32, channelCount: u32, bitrate: u32) -> Result> { unsafe { + } + #[inline] pub fn create_wma(sampleRate: u32, channelCount: u32, bitrate: u32) -> Result>> { >::get_activation_factory().create_wma(sampleRate, channelCount, bitrate) - }} - #[inline] pub fn create_alac(sampleRate: u32, channelCount: u32, bitsPerSample: u32) -> Result> { unsafe { + } + #[inline] pub fn create_alac(sampleRate: u32, channelCount: u32, bitsPerSample: u32) -> Result>> { >::get_activation_factory().create_alac(sampleRate, channelCount, bitsPerSample) - }} - #[inline] pub fn create_flac(sampleRate: u32, channelCount: u32, bitsPerSample: u32) -> Result> { unsafe { + } + #[inline] pub fn create_flac(sampleRate: u32, channelCount: u32, bitsPerSample: u32) -> Result>> { >::get_activation_factory().create_flac(sampleRate, channelCount, bitsPerSample) - }} + } } DEFINE_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]) [CLSID_AudioEncodingProperties]); DEFINE_IID!(IID_IAudioEncodingProperties2, 3294450906, 32957, 19491, 128, 213, 114, 212, 161, 129, 232, 148); @@ -23517,11 +23517,11 @@ RT_INTERFACE!{interface IAudioEncodingProperties2(IAudioEncodingProperties2Vtbl) fn get_IsSpatial(&self, out: *mut bool) -> HRESULT }} impl IAudioEncodingProperties2 { - #[inline] pub unsafe fn get_is_spatial(&self) -> Result { + #[inline] pub fn get_is_spatial(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSpatial)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } 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] { @@ -23532,31 +23532,31 @@ RT_INTERFACE!{static interface IAudioEncodingPropertiesStatics(IAudioEncodingPro fn CreateWma(&self, sampleRate: u32, channelCount: u32, bitrate: u32, out: *mut *mut AudioEncodingProperties) -> HRESULT }} impl IAudioEncodingPropertiesStatics { - #[inline] pub unsafe fn create_aac(&self, sampleRate: u32, channelCount: u32, bitrate: u32) -> Result> { + #[inline] pub fn create_aac(&self, sampleRate: u32, channelCount: u32, bitrate: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAac)(self as *const _ as *mut _, sampleRate, channelCount, bitrate, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_aac_adts(&self, sampleRate: u32, channelCount: u32, bitrate: u32) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_aac_adts(&self, sampleRate: u32, channelCount: u32, bitrate: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAacAdts)(self as *const _ as *mut _, sampleRate, channelCount, bitrate, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_mp3(&self, sampleRate: u32, channelCount: u32, bitrate: u32) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_mp3(&self, sampleRate: u32, channelCount: u32, bitrate: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateMp3)(self as *const _ as *mut _, sampleRate, channelCount, bitrate, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_pcm(&self, sampleRate: u32, channelCount: u32, bitsPerSample: u32) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_pcm(&self, sampleRate: u32, channelCount: u32, bitsPerSample: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreatePcm)(self as *const _ as *mut _, sampleRate, channelCount, bitsPerSample, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_wma(&self, sampleRate: u32, channelCount: u32, bitrate: u32) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_wma(&self, sampleRate: u32, channelCount: u32, bitrate: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWma)(self as *const _ as *mut _, sampleRate, channelCount, bitrate, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IAudioEncodingPropertiesStatics2, 1955148143, 30624, 17213, 142, 213, 64, 64, 40, 14, 134, 101); RT_INTERFACE!{static interface IAudioEncodingPropertiesStatics2(IAudioEncodingPropertiesStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IAudioEncodingPropertiesStatics2] { @@ -23564,16 +23564,16 @@ RT_INTERFACE!{static interface IAudioEncodingPropertiesStatics2(IAudioEncodingPr fn CreateFlac(&self, sampleRate: u32, channelCount: u32, bitsPerSample: u32, out: *mut *mut AudioEncodingProperties) -> HRESULT }} impl IAudioEncodingPropertiesStatics2 { - #[inline] pub unsafe fn create_alac(&self, sampleRate: u32, channelCount: u32, bitsPerSample: u32) -> Result> { + #[inline] pub fn create_alac(&self, sampleRate: u32, channelCount: u32, bitsPerSample: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAlac)(self as *const _ as *mut _, sampleRate, channelCount, bitsPerSample, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_flac(&self, sampleRate: u32, channelCount: u32, bitsPerSample: u32) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_flac(&self, sampleRate: u32, channelCount: u32, bitsPerSample: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFlac)(self as *const _ as *mut _, sampleRate, channelCount, bitsPerSample, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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] { @@ -23581,15 +23581,15 @@ RT_INTERFACE!{interface IAudioEncodingPropertiesWithFormatUserData(IAudioEncodin fn GetFormatUserData(&self, valueSize: *mut u32, value: *mut *mut u8) -> HRESULT }} impl IAudioEncodingPropertiesWithFormatUserData { - #[inline] pub unsafe fn set_format_user_data(&self, value: &[u8]) -> Result<()> { + #[inline] pub fn set_format_user_data(&self, value: &[u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetFormatUserData)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[inline] pub fn get_format_user_data(&self) -> Result> { unsafe { let mut valueSize = 0; let mut value = null_mut(); let hr = ((*self.lpVtbl).GetFormatUserData)(self as *const _ as *mut _, &mut valueSize, &mut value); if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } + }} } RT_ENUM! { enum AudioEncodingQuality: i32 { Auto (AudioEncodingQuality_Auto) = 0, High (AudioEncodingQuality_High) = 1, Medium (AudioEncodingQuality_Medium) = 2, Low (AudioEncodingQuality_Low) = 3, @@ -23604,36 +23604,36 @@ DEFINE_CLSID!(ContainerEncodingProperties(&[87,105,110,100,111,119,115,46,77,101 RT_CLASS!{static class H264ProfileIds} impl RtActivatable for H264ProfileIds {} impl H264ProfileIds { - #[inline] pub fn get_constrained_baseline() -> Result { unsafe { + #[inline] pub fn get_constrained_baseline() -> Result { >::get_activation_factory().get_constrained_baseline() - }} - #[inline] pub fn get_baseline() -> Result { unsafe { + } + #[inline] pub fn get_baseline() -> Result { >::get_activation_factory().get_baseline() - }} - #[inline] pub fn get_extended() -> Result { unsafe { + } + #[inline] pub fn get_extended() -> Result { >::get_activation_factory().get_extended() - }} - #[inline] pub fn get_main() -> Result { unsafe { + } + #[inline] pub fn get_main() -> Result { >::get_activation_factory().get_main() - }} - #[inline] pub fn get_high() -> Result { unsafe { + } + #[inline] pub fn get_high() -> Result { >::get_activation_factory().get_high() - }} - #[inline] pub fn get_high10() -> Result { unsafe { + } + #[inline] pub fn get_high10() -> Result { >::get_activation_factory().get_high10() - }} - #[inline] pub fn get_high422() -> Result { unsafe { + } + #[inline] pub fn get_high422() -> Result { >::get_activation_factory().get_high422() - }} - #[inline] pub fn get_high444() -> Result { unsafe { + } + #[inline] pub fn get_high444() -> Result { >::get_activation_factory().get_high444() - }} - #[inline] pub fn get_stereo_high() -> Result { unsafe { + } + #[inline] pub fn get_stereo_high() -> Result { >::get_activation_factory().get_stereo_high() - }} - #[inline] pub fn get_multiview_high() -> Result { unsafe { + } + #[inline] pub fn get_multiview_high() -> Result { >::get_activation_factory().get_multiview_high() - }} + } } DEFINE_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]) [CLSID_H264ProfileIds]); DEFINE_IID!(IID_IH264ProfileIdsStatics, 946162855, 33898, 20375, 162, 229, 195, 161, 91, 191, 112, 253); @@ -23650,56 +23650,56 @@ RT_INTERFACE!{static interface IH264ProfileIdsStatics(IH264ProfileIdsStaticsVtbl fn get_MultiviewHigh(&self, out: *mut i32) -> HRESULT }} impl IH264ProfileIdsStatics { - #[inline] pub unsafe fn get_constrained_baseline(&self) -> Result { + #[inline] pub fn get_constrained_baseline(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ConstrainedBaseline)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_baseline(&self) -> Result { + }} + #[inline] pub fn get_baseline(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Baseline)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended(&self) -> Result { + }} + #[inline] pub fn get_extended(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Extended)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_main(&self) -> Result { + }} + #[inline] pub fn get_main(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Main)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_high(&self) -> Result { + }} + #[inline] pub fn get_high(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_High)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_high10(&self) -> Result { + }} + #[inline] pub fn get_high10(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_High10)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_high422(&self) -> Result { + }} + #[inline] pub fn get_high422(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_High422)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_high444(&self) -> Result { + }} + #[inline] pub fn get_high444(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_High444)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_stereo_high(&self) -> Result { + }} + #[inline] pub fn get_stereo_high(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StereoHigh)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_multiview_high(&self) -> Result { + }} + #[inline] pub fn get_multiview_high(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MultiviewHigh)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IImageEncodingProperties, 2019710517, 62257, 16777, 177, 195, 180, 141, 90, 224, 52, 241); RT_INTERFACE!{interface IImageEncodingProperties(IImageEncodingPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IImageEncodingProperties] { @@ -23709,45 +23709,45 @@ RT_INTERFACE!{interface IImageEncodingProperties(IImageEncodingPropertiesVtbl): fn get_Height(&self, out: *mut u32) -> HRESULT }} impl IImageEncodingProperties { - #[inline] pub unsafe fn set_width(&self, value: u32) -> Result<()> { + #[inline] pub fn set_width(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Width)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_width(&self) -> Result { + }} + #[inline] pub fn get_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Width)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_height(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_height(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Height)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_height(&self) -> Result { + }} + #[inline] pub fn get_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Height)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ImageEncodingProperties: IImageEncodingProperties} impl RtActivatable for ImageEncodingProperties {} impl RtActivatable for ImageEncodingProperties {} impl RtActivatable for ImageEncodingProperties {} impl ImageEncodingProperties { - #[inline] pub fn create_jpeg() -> Result> { unsafe { + #[inline] pub fn create_jpeg() -> Result>> { >::get_activation_factory().create_jpeg() - }} - #[inline] pub fn create_png() -> Result> { unsafe { + } + #[inline] pub fn create_png() -> Result>> { >::get_activation_factory().create_png() - }} - #[inline] pub fn create_jpeg_xr() -> Result> { unsafe { + } + #[inline] pub fn create_jpeg_xr() -> Result>> { >::get_activation_factory().create_jpeg_xr() - }} - #[inline] pub fn create_uncompressed(format: MediaPixelFormat) -> Result> { unsafe { + } + #[inline] pub fn create_uncompressed(format: MediaPixelFormat) -> Result>> { >::get_activation_factory().create_uncompressed(format) - }} - #[inline] pub fn create_bmp() -> Result> { unsafe { + } + #[inline] pub fn create_bmp() -> Result>> { >::get_activation_factory().create_bmp() - }} + } } DEFINE_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]) [CLSID_ImageEncodingProperties]); DEFINE_IID!(IID_IImageEncodingPropertiesStatics, 628910300, 35737, 17310, 170, 89, 145, 58, 54, 22, 18, 151); @@ -23757,21 +23757,21 @@ RT_INTERFACE!{static interface IImageEncodingPropertiesStatics(IImageEncodingPro fn CreateJpegXR(&self, out: *mut *mut ImageEncodingProperties) -> HRESULT }} impl IImageEncodingPropertiesStatics { - #[inline] pub unsafe fn create_jpeg(&self) -> Result> { + #[inline] pub fn create_jpeg(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateJpeg)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_png(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_png(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreatePng)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_jpeg_xr(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_jpeg_xr(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateJpegXR)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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] { @@ -23779,16 +23779,16 @@ RT_INTERFACE!{static interface IImageEncodingPropertiesStatics2(IImageEncodingPr fn CreateBmp(&self, out: *mut *mut ImageEncodingProperties) -> HRESULT }} impl IImageEncodingPropertiesStatics2 { - #[inline] pub unsafe fn create_uncompressed(&self, format: MediaPixelFormat) -> Result> { + #[inline] pub fn create_uncompressed(&self, format: MediaPixelFormat) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateUncompressed)(self as *const _ as *mut _, format, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_bmp(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_bmp(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateBmp)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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] { @@ -23800,33 +23800,33 @@ RT_INTERFACE!{interface IMediaEncodingProfile(IMediaEncodingProfileVtbl): IInspe fn get_Container(&self, out: *mut *mut ContainerEncodingProperties) -> HRESULT }} impl IMediaEncodingProfile { - #[inline] pub unsafe fn set_audio(&self, value: &AudioEncodingProperties) -> Result<()> { + #[inline] pub fn set_audio(&self, value: &AudioEncodingProperties) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Audio)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio(&self) -> Result> { + }} + #[inline] pub fn get_audio(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Audio)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_video(&self, value: &VideoEncodingProperties) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_video(&self, value: &VideoEncodingProperties) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Video)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_video(&self) -> Result> { + }} + #[inline] pub fn get_video(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Video)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_container(&self, value: &ContainerEncodingProperties) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_container(&self, value: &ContainerEncodingProperties) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Container)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_container(&self) -> Result> { + }} + #[inline] pub fn get_container(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Container)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MediaEncodingProfile: IMediaEncodingProfile} impl RtActivatable for MediaEncodingProfile {} @@ -23834,70 +23834,70 @@ impl RtActivatable for MediaEncodingProfile {} impl RtActivatable for MediaEncodingProfile {} impl RtActivatable for MediaEncodingProfile {} impl MediaEncodingProfile { - #[inline] pub fn create_m4a(quality: AudioEncodingQuality) -> Result> { unsafe { + #[inline] pub fn create_m4a(quality: AudioEncodingQuality) -> Result>> { >::get_activation_factory().create_m4a(quality) - }} - #[inline] pub fn create_mp3(quality: AudioEncodingQuality) -> Result> { unsafe { + } + #[inline] pub fn create_mp3(quality: AudioEncodingQuality) -> Result>> { >::get_activation_factory().create_mp3(quality) - }} - #[inline] pub fn create_wma(quality: AudioEncodingQuality) -> Result> { unsafe { + } + #[inline] pub fn create_wma(quality: AudioEncodingQuality) -> Result>> { >::get_activation_factory().create_wma(quality) - }} - #[inline] pub fn create_mp4(quality: VideoEncodingQuality) -> Result> { unsafe { + } + #[inline] pub fn create_mp4(quality: VideoEncodingQuality) -> Result>> { >::get_activation_factory().create_mp4(quality) - }} - #[inline] pub fn create_wmv(quality: VideoEncodingQuality) -> Result> { unsafe { + } + #[inline] pub fn create_wmv(quality: VideoEncodingQuality) -> Result>> { >::get_activation_factory().create_wmv(quality) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn create_from_file_async(file: &super::super::storage::IStorageFile) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_file_async(file: &super::super::storage::IStorageFile) -> Result>> { >::get_activation_factory().create_from_file_async(file) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn create_from_stream_async(stream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_stream_async(stream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { >::get_activation_factory().create_from_stream_async(stream) - }} - #[inline] pub fn create_wav(quality: AudioEncodingQuality) -> Result> { unsafe { + } + #[inline] pub fn create_wav(quality: AudioEncodingQuality) -> Result>> { >::get_activation_factory().create_wav(quality) - }} - #[inline] pub fn create_avi(quality: VideoEncodingQuality) -> Result> { unsafe { + } + #[inline] pub fn create_avi(quality: VideoEncodingQuality) -> Result>> { >::get_activation_factory().create_avi(quality) - }} - #[inline] pub fn create_alac(quality: AudioEncodingQuality) -> Result> { unsafe { + } + #[inline] pub fn create_alac(quality: AudioEncodingQuality) -> Result>> { >::get_activation_factory().create_alac(quality) - }} - #[inline] pub fn create_flac(quality: AudioEncodingQuality) -> Result> { unsafe { + } + #[inline] pub fn create_flac(quality: AudioEncodingQuality) -> Result>> { >::get_activation_factory().create_flac(quality) - }} - #[inline] pub fn create_hevc(quality: VideoEncodingQuality) -> Result> { unsafe { + } + #[inline] pub fn create_hevc(quality: VideoEncodingQuality) -> Result>> { >::get_activation_factory().create_hevc(quality) - }} + } } DEFINE_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]) [CLSID_MediaEncodingProfile]); DEFINE_IID!(IID_IMediaEncodingProfile2, 882589194, 16437, 18574, 152, 119, 133, 99, 40, 101, 237, 16); RT_INTERFACE!{interface IMediaEncodingProfile2(IMediaEncodingProfile2Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaEncodingProfile2] { - fn SetAudioTracks(&self, value: *mut super::super::foundation::collections::IIterable) -> HRESULT, - fn GetAudioTracks(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn SetVideoTracks(&self, value: *mut super::super::foundation::collections::IIterable) -> HRESULT, - fn GetVideoTracks(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn SetAudioTracks(&self, value: *mut foundation::collections::IIterable) -> HRESULT, + fn GetAudioTracks(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn SetVideoTracks(&self, value: *mut foundation::collections::IIterable) -> HRESULT, + fn GetVideoTracks(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IMediaEncodingProfile2 { - #[inline] pub unsafe fn set_audio_tracks(&self, value: &super::super::foundation::collections::IIterable) -> Result<()> { + #[inline] pub fn set_audio_tracks(&self, value: &foundation::collections::IIterable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetAudioTracks)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_tracks(&self) -> Result>> { + }} + #[inline] pub fn get_audio_tracks(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAudioTracks)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_video_tracks(&self, value: &super::super::foundation::collections::IIterable) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_video_tracks(&self, value: &foundation::collections::IIterable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetVideoTracks)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_tracks(&self) -> Result>> { + }} + #[inline] pub fn get_video_tracks(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetVideoTracks)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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] { @@ -23906,45 +23906,45 @@ RT_INTERFACE!{static interface IMediaEncodingProfileStatics(IMediaEncodingProfil fn CreateWma(&self, quality: AudioEncodingQuality, out: *mut *mut MediaEncodingProfile) -> HRESULT, fn CreateMp4(&self, quality: VideoEncodingQuality, out: *mut *mut MediaEncodingProfile) -> HRESULT, fn CreateWmv(&self, quality: VideoEncodingQuality, out: *mut *mut MediaEncodingProfile) -> HRESULT, - #[cfg(feature="windows-storage")] fn CreateFromFileAsync(&self, file: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn CreateFromStreamAsync(&self, stream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn CreateFromFileAsync(&self, file: *mut super::super::storage::IStorageFile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn CreateFromStreamAsync(&self, stream: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IMediaEncodingProfileStatics { - #[inline] pub unsafe fn create_m4a(&self, quality: AudioEncodingQuality) -> Result> { + #[inline] pub fn create_m4a(&self, quality: AudioEncodingQuality) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateM4a)(self as *const _ as *mut _, quality, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_mp3(&self, quality: AudioEncodingQuality) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_mp3(&self, quality: AudioEncodingQuality) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateMp3)(self as *const _ as *mut _, quality, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_wma(&self, quality: AudioEncodingQuality) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_wma(&self, quality: AudioEncodingQuality) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWma)(self as *const _ as *mut _, quality, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_mp4(&self, quality: VideoEncodingQuality) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_mp4(&self, quality: VideoEncodingQuality) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateMp4)(self as *const _ as *mut _, quality, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_wmv(&self, quality: VideoEncodingQuality) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_wmv(&self, quality: VideoEncodingQuality) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWmv)(self as *const _ as *mut _, 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(&self, file: &super::super::storage::IStorageFile) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_file_async(&self, file: &super::super::storage::IStorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromFileAsync)(self 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 create_from_stream_async(&self, stream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_stream_async(&self, stream: &super::super::storage::streams::IRandomAccessStream) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromStreamAsync)(self as *const _ as *mut _, stream as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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] { @@ -23952,16 +23952,16 @@ RT_INTERFACE!{static interface IMediaEncodingProfileStatics2(IMediaEncodingProfi fn CreateAvi(&self, quality: VideoEncodingQuality, out: *mut *mut MediaEncodingProfile) -> HRESULT }} impl IMediaEncodingProfileStatics2 { - #[inline] pub unsafe fn create_wav(&self, quality: AudioEncodingQuality) -> Result> { + #[inline] pub fn create_wav(&self, quality: AudioEncodingQuality) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWav)(self as *const _ as *mut _, quality, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_avi(&self, quality: VideoEncodingQuality) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_avi(&self, quality: VideoEncodingQuality) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAvi)(self as *const _ as *mut _, quality, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IMediaEncodingProfileStatics3, 2430256554, 53110, 17044, 169, 237, 26, 20, 32, 245, 31, 107); RT_INTERFACE!{static interface IMediaEncodingProfileStatics3(IMediaEncodingProfileStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaEncodingProfileStatics3] { @@ -23970,21 +23970,21 @@ RT_INTERFACE!{static interface IMediaEncodingProfileStatics3(IMediaEncodingProfi fn CreateHevc(&self, quality: VideoEncodingQuality, out: *mut *mut MediaEncodingProfile) -> HRESULT }} impl IMediaEncodingProfileStatics3 { - #[inline] pub unsafe fn create_alac(&self, quality: AudioEncodingQuality) -> Result> { + #[inline] pub fn create_alac(&self, quality: AudioEncodingQuality) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAlac)(self as *const _ as *mut _, quality, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_flac(&self, quality: AudioEncodingQuality) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_flac(&self, quality: AudioEncodingQuality) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFlac)(self as *const _ as *mut _, quality, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_hevc(&self, quality: VideoEncodingQuality) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_hevc(&self, quality: VideoEncodingQuality) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateHevc)(self as *const _ as *mut _, quality, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IMediaEncodingProperties, 3019909878, 44244, 20058, 162, 75, 93, 116, 152, 168, 184, 196); RT_INTERFACE!{interface IMediaEncodingProperties(IMediaEncodingPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IMediaEncodingProperties] { @@ -23994,169 +23994,169 @@ RT_INTERFACE!{interface IMediaEncodingProperties(IMediaEncodingPropertiesVtbl): fn get_Subtype(&self, out: *mut HSTRING) -> HRESULT }} impl IMediaEncodingProperties { - #[inline] pub unsafe fn get_properties(&self) -> Result> { + #[inline] pub fn get_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_type(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_type(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Type)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_subtype(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_subtype(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Subtype)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_subtype(&self) -> Result { + }} + #[inline] pub fn get_subtype(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Subtype)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class MediaEncodingSubtypes} impl RtActivatable for MediaEncodingSubtypes {} impl RtActivatable for MediaEncodingSubtypes {} impl RtActivatable for MediaEncodingSubtypes {} impl MediaEncodingSubtypes { - #[inline] pub fn get_aac() -> Result { unsafe { + #[inline] pub fn get_aac() -> Result { >::get_activation_factory().get_aac() - }} - #[inline] pub fn get_aac_adts() -> Result { unsafe { + } + #[inline] pub fn get_aac_adts() -> Result { >::get_activation_factory().get_aac_adts() - }} - #[inline] pub fn get_ac3() -> Result { unsafe { + } + #[inline] pub fn get_ac3() -> Result { >::get_activation_factory().get_ac3() - }} - #[inline] pub fn get_amr_nb() -> Result { unsafe { + } + #[inline] pub fn get_amr_nb() -> Result { >::get_activation_factory().get_amr_nb() - }} - #[inline] pub fn get_amr_wb() -> Result { unsafe { + } + #[inline] pub fn get_amr_wb() -> Result { >::get_activation_factory().get_amr_wb() - }} - #[inline] pub fn get_argb32() -> Result { unsafe { + } + #[inline] pub fn get_argb32() -> Result { >::get_activation_factory().get_argb32() - }} - #[inline] pub fn get_asf() -> Result { unsafe { + } + #[inline] pub fn get_asf() -> Result { >::get_activation_factory().get_asf() - }} - #[inline] pub fn get_avi() -> Result { unsafe { + } + #[inline] pub fn get_avi() -> Result { >::get_activation_factory().get_avi() - }} - #[inline] pub fn get_bgra8() -> Result { unsafe { + } + #[inline] pub fn get_bgra8() -> Result { >::get_activation_factory().get_bgra8() - }} - #[inline] pub fn get_bmp() -> Result { unsafe { + } + #[inline] pub fn get_bmp() -> Result { >::get_activation_factory().get_bmp() - }} - #[inline] pub fn get_eac3() -> Result { unsafe { + } + #[inline] pub fn get_eac3() -> Result { >::get_activation_factory().get_eac3() - }} - #[inline] pub fn get_float() -> Result { unsafe { + } + #[inline] pub fn get_float() -> Result { >::get_activation_factory().get_float() - }} - #[inline] pub fn get_gif() -> Result { unsafe { + } + #[inline] pub fn get_gif() -> Result { >::get_activation_factory().get_gif() - }} - #[inline] pub fn get_h263() -> Result { unsafe { + } + #[inline] pub fn get_h263() -> Result { >::get_activation_factory().get_h263() - }} - #[inline] pub fn get_h264() -> Result { unsafe { + } + #[inline] pub fn get_h264() -> Result { >::get_activation_factory().get_h264() - }} - #[inline] pub fn get_h264_es() -> Result { unsafe { + } + #[inline] pub fn get_h264_es() -> Result { >::get_activation_factory().get_h264_es() - }} - #[inline] pub fn get_hevc() -> Result { unsafe { + } + #[inline] pub fn get_hevc() -> Result { >::get_activation_factory().get_hevc() - }} - #[inline] pub fn get_hevc_es() -> Result { unsafe { + } + #[inline] pub fn get_hevc_es() -> Result { >::get_activation_factory().get_hevc_es() - }} - #[inline] pub fn get_iyuv() -> Result { unsafe { + } + #[inline] pub fn get_iyuv() -> Result { >::get_activation_factory().get_iyuv() - }} - #[inline] pub fn get_jpeg() -> Result { unsafe { + } + #[inline] pub fn get_jpeg() -> Result { >::get_activation_factory().get_jpeg() - }} - #[inline] pub fn get_jpeg_xr() -> Result { unsafe { + } + #[inline] pub fn get_jpeg_xr() -> Result { >::get_activation_factory().get_jpeg_xr() - }} - #[inline] pub fn get_mjpg() -> Result { unsafe { + } + #[inline] pub fn get_mjpg() -> Result { >::get_activation_factory().get_mjpg() - }} - #[inline] pub fn get_mpeg() -> Result { unsafe { + } + #[inline] pub fn get_mpeg() -> Result { >::get_activation_factory().get_mpeg() - }} - #[inline] pub fn get_mpeg1() -> Result { unsafe { + } + #[inline] pub fn get_mpeg1() -> Result { >::get_activation_factory().get_mpeg1() - }} - #[inline] pub fn get_mpeg2() -> Result { unsafe { + } + #[inline] pub fn get_mpeg2() -> Result { >::get_activation_factory().get_mpeg2() - }} - #[inline] pub fn get_mp3() -> Result { unsafe { + } + #[inline] pub fn get_mp3() -> Result { >::get_activation_factory().get_mp3() - }} - #[inline] pub fn get_mpeg4() -> Result { unsafe { + } + #[inline] pub fn get_mpeg4() -> Result { >::get_activation_factory().get_mpeg4() - }} - #[inline] pub fn get_nv12() -> Result { unsafe { + } + #[inline] pub fn get_nv12() -> Result { >::get_activation_factory().get_nv12() - }} - #[inline] pub fn get_pcm() -> Result { unsafe { + } + #[inline] pub fn get_pcm() -> Result { >::get_activation_factory().get_pcm() - }} - #[inline] pub fn get_png() -> Result { unsafe { + } + #[inline] pub fn get_png() -> Result { >::get_activation_factory().get_png() - }} - #[inline] pub fn get_rgb24() -> Result { unsafe { + } + #[inline] pub fn get_rgb24() -> Result { >::get_activation_factory().get_rgb24() - }} - #[inline] pub fn get_rgb32() -> Result { unsafe { + } + #[inline] pub fn get_rgb32() -> Result { >::get_activation_factory().get_rgb32() - }} - #[inline] pub fn get_tiff() -> Result { unsafe { + } + #[inline] pub fn get_tiff() -> Result { >::get_activation_factory().get_tiff() - }} - #[inline] pub fn get_wave() -> Result { unsafe { + } + #[inline] pub fn get_wave() -> Result { >::get_activation_factory().get_wave() - }} - #[inline] pub fn get_wma8() -> Result { unsafe { + } + #[inline] pub fn get_wma8() -> Result { >::get_activation_factory().get_wma8() - }} - #[inline] pub fn get_wma9() -> Result { unsafe { + } + #[inline] pub fn get_wma9() -> Result { >::get_activation_factory().get_wma9() - }} - #[inline] pub fn get_wmv3() -> Result { unsafe { + } + #[inline] pub fn get_wmv3() -> Result { >::get_activation_factory().get_wmv3() - }} - #[inline] pub fn get_wvc1() -> Result { unsafe { + } + #[inline] pub fn get_wvc1() -> Result { >::get_activation_factory().get_wvc1() - }} - #[inline] pub fn get_yuy2() -> Result { unsafe { + } + #[inline] pub fn get_yuy2() -> Result { >::get_activation_factory().get_yuy2() - }} - #[inline] pub fn get_yv12() -> Result { unsafe { + } + #[inline] pub fn get_yv12() -> Result { >::get_activation_factory().get_yv12() - }} - #[inline] pub fn get_vp9() -> Result { unsafe { + } + #[inline] pub fn get_vp9() -> Result { >::get_activation_factory().get_vp9() - }} - #[inline] pub fn get_l8() -> Result { unsafe { + } + #[inline] pub fn get_l8() -> Result { >::get_activation_factory().get_l8() - }} - #[inline] pub fn get_l16() -> Result { unsafe { + } + #[inline] pub fn get_l16() -> Result { >::get_activation_factory().get_l16() - }} - #[inline] pub fn get_d16() -> Result { unsafe { + } + #[inline] pub fn get_d16() -> Result { >::get_activation_factory().get_d16() - }} - #[inline] pub fn get_alac() -> Result { unsafe { + } + #[inline] pub fn get_alac() -> Result { >::get_activation_factory().get_alac() - }} - #[inline] pub fn get_flac() -> Result { unsafe { + } + #[inline] pub fn get_flac() -> Result { >::get_activation_factory().get_flac() - }} + } } DEFINE_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]) [CLSID_MediaEncodingSubtypes]); DEFINE_IID!(IID_IMediaEncodingSubtypesStatics, 934696974, 41329, 17508, 186, 90, 83, 24, 158, 72, 193, 200); @@ -24203,206 +24203,206 @@ RT_INTERFACE!{static interface IMediaEncodingSubtypesStatics(IMediaEncodingSubty fn get_Yv12(&self, out: *mut HSTRING) -> HRESULT }} impl IMediaEncodingSubtypesStatics { - #[inline] pub unsafe fn get_aac(&self) -> Result { + #[inline] pub fn get_aac(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Aac)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_aac_adts(&self) -> Result { + }} + #[inline] pub fn get_aac_adts(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AacAdts)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ac3(&self) -> Result { + }} + #[inline] pub fn get_ac3(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Ac3)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_amr_nb(&self) -> Result { + }} + #[inline] pub fn get_amr_nb(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AmrNb)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_amr_wb(&self) -> Result { + }} + #[inline] pub fn get_amr_wb(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AmrWb)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_argb32(&self) -> Result { + }} + #[inline] pub fn get_argb32(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Argb32)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_asf(&self) -> Result { + }} + #[inline] pub fn get_asf(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Asf)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_avi(&self) -> Result { + }} + #[inline] pub fn get_avi(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Avi)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_bgra8(&self) -> Result { + }} + #[inline] pub fn get_bgra8(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Bgra8)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_bmp(&self) -> Result { + }} + #[inline] pub fn get_bmp(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Bmp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_eac3(&self) -> Result { + }} + #[inline] pub fn get_eac3(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Eac3)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_float(&self) -> Result { + }} + #[inline] pub fn get_float(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Float)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_gif(&self) -> Result { + }} + #[inline] pub fn get_gif(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Gif)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_h263(&self) -> Result { + }} + #[inline] pub fn get_h263(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_H263)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_h264(&self) -> Result { + }} + #[inline] pub fn get_h264(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_H264)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_h264_es(&self) -> Result { + }} + #[inline] pub fn get_h264_es(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_H264Es)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_hevc(&self) -> Result { + }} + #[inline] pub fn get_hevc(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Hevc)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_hevc_es(&self) -> Result { + }} + #[inline] pub fn get_hevc_es(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HevcEs)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_iyuv(&self) -> Result { + }} + #[inline] pub fn get_iyuv(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Iyuv)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_jpeg(&self) -> Result { + }} + #[inline] pub fn get_jpeg(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Jpeg)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_jpeg_xr(&self) -> Result { + }} + #[inline] pub fn get_jpeg_xr(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_JpegXr)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mjpg(&self) -> Result { + }} + #[inline] pub fn get_mjpg(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Mjpg)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mpeg(&self) -> Result { + }} + #[inline] pub fn get_mpeg(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Mpeg)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mpeg1(&self) -> Result { + }} + #[inline] pub fn get_mpeg1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Mpeg1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mpeg2(&self) -> Result { + }} + #[inline] pub fn get_mpeg2(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Mpeg2)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mp3(&self) -> Result { + }} + #[inline] pub fn get_mp3(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Mp3)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mpeg4(&self) -> Result { + }} + #[inline] pub fn get_mpeg4(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Mpeg4)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_nv12(&self) -> Result { + }} + #[inline] pub fn get_nv12(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Nv12)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pcm(&self) -> Result { + }} + #[inline] pub fn get_pcm(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Pcm)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_png(&self) -> Result { + }} + #[inline] pub fn get_png(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Png)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rgb24(&self) -> Result { + }} + #[inline] pub fn get_rgb24(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Rgb24)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rgb32(&self) -> Result { + }} + #[inline] pub fn get_rgb32(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Rgb32)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_tiff(&self) -> Result { + }} + #[inline] pub fn get_tiff(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Tiff)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_wave(&self) -> Result { + }} + #[inline] pub fn get_wave(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Wave)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_wma8(&self) -> Result { + }} + #[inline] pub fn get_wma8(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Wma8)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_wma9(&self) -> Result { + }} + #[inline] pub fn get_wma9(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Wma9)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_wmv3(&self) -> Result { + }} + #[inline] pub fn get_wmv3(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Wmv3)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_wvc1(&self) -> Result { + }} + #[inline] pub fn get_wvc1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Wvc1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_yuy2(&self) -> Result { + }} + #[inline] pub fn get_yuy2(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Yuy2)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_yv12(&self) -> Result { + }} + #[inline] pub fn get_yv12(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Yv12)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMediaEncodingSubtypesStatics2, 1266471485, 17151, 19763, 133, 49, 6, 38, 190, 228, 181, 45); RT_INTERFACE!{static interface IMediaEncodingSubtypesStatics2(IMediaEncodingSubtypesStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaEncodingSubtypesStatics2] { @@ -24412,26 +24412,26 @@ RT_INTERFACE!{static interface IMediaEncodingSubtypesStatics2(IMediaEncodingSubt fn get_D16(&self, out: *mut HSTRING) -> HRESULT }} impl IMediaEncodingSubtypesStatics2 { - #[inline] pub unsafe fn get_vp9(&self) -> Result { + #[inline] pub fn get_vp9(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Vp9)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_l8(&self) -> Result { + }} + #[inline] pub fn get_l8(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_L8)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_l16(&self) -> Result { + }} + #[inline] pub fn get_l16(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_L16)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_d16(&self) -> Result { + }} + #[inline] pub fn get_d16(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_D16)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMediaEncodingSubtypesStatics3, 3122926820, 34877, 17998, 164, 79, 9, 125, 160, 142, 247, 255); RT_INTERFACE!{static interface IMediaEncodingSubtypesStatics3(IMediaEncodingSubtypesStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IMediaEncodingSubtypesStatics3] { @@ -24439,16 +24439,16 @@ RT_INTERFACE!{static interface IMediaEncodingSubtypesStatics3(IMediaEncodingSubt fn get_Flac(&self, out: *mut HSTRING) -> HRESULT }} impl IMediaEncodingSubtypesStatics3 { - #[inline] pub unsafe fn get_alac(&self) -> Result { + #[inline] pub fn get_alac(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Alac)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_flac(&self) -> Result { + }} + #[inline] pub fn get_flac(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Flac)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum MediaMirroringOptions: u32 { None (MediaMirroringOptions_None) = 0, Horizontal (MediaMirroringOptions_Horizontal) = 1, Vertical (MediaMirroringOptions_Vertical) = 2, @@ -24456,7 +24456,7 @@ RT_ENUM! { enum MediaMirroringOptions: u32 { RT_ENUM! { enum MediaPixelFormat: i32 { Nv12 (MediaPixelFormat_Nv12) = 0, Bgra8 (MediaPixelFormat_Bgra8) = 1, }} -RT_CLASS!{class MediaPropertySet: super::super::foundation::collections::IMap} +RT_CLASS!{class MediaPropertySet: foundation::collections::IMap} impl RtActivatable for MediaPropertySet {} DEFINE_CLSID!(MediaPropertySet(&[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,80,114,111,112,101,114,116,121,83,101,116,0]) [CLSID_MediaPropertySet]); DEFINE_IID!(IID_IMediaRatio, 3536912101, 35113, 16413, 172, 120, 125, 53, 126, 55, 129, 99); @@ -24467,24 +24467,24 @@ RT_INTERFACE!{interface IMediaRatio(IMediaRatioVtbl): IInspectable(IInspectableV fn get_Denominator(&self, out: *mut u32) -> HRESULT }} impl IMediaRatio { - #[inline] pub unsafe fn set_numerator(&self, value: u32) -> Result<()> { + #[inline] pub fn set_numerator(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Numerator)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_numerator(&self) -> Result { + }} + #[inline] pub fn get_numerator(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Numerator)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_denominator(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_denominator(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Denominator)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_denominator(&self) -> Result { + }} + #[inline] pub fn get_denominator(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Denominator)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MediaRatio: IMediaRatio} RT_ENUM! { enum MediaRotation: i32 { @@ -24496,21 +24496,21 @@ RT_ENUM! { enum MediaThumbnailFormat: i32 { RT_CLASS!{static class Mpeg2ProfileIds} impl RtActivatable for Mpeg2ProfileIds {} impl Mpeg2ProfileIds { - #[inline] pub fn get_simple() -> Result { unsafe { + #[inline] pub fn get_simple() -> Result { >::get_activation_factory().get_simple() - }} - #[inline] pub fn get_main() -> Result { unsafe { + } + #[inline] pub fn get_main() -> Result { >::get_activation_factory().get_main() - }} - #[inline] pub fn get_signal_noise_ratio_scalable() -> Result { unsafe { + } + #[inline] pub fn get_signal_noise_ratio_scalable() -> Result { >::get_activation_factory().get_signal_noise_ratio_scalable() - }} - #[inline] pub fn get_spatially_scalable() -> Result { unsafe { + } + #[inline] pub fn get_spatially_scalable() -> Result { >::get_activation_factory().get_spatially_scalable() - }} - #[inline] pub fn get_high() -> Result { unsafe { + } + #[inline] pub fn get_high() -> Result { >::get_activation_factory().get_high() - }} + } } DEFINE_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]) [CLSID_Mpeg2ProfileIds]); DEFINE_IID!(IID_IMpeg2ProfileIdsStatics, 2757885829, 58746, 16680, 155, 33, 213, 51, 27, 4, 35, 92); @@ -24522,31 +24522,31 @@ RT_INTERFACE!{static interface IMpeg2ProfileIdsStatics(IMpeg2ProfileIdsStaticsVt fn get_High(&self, out: *mut i32) -> HRESULT }} impl IMpeg2ProfileIdsStatics { - #[inline] pub unsafe fn get_simple(&self) -> Result { + #[inline] pub fn get_simple(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Simple)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_main(&self) -> Result { + }} + #[inline] pub fn get_main(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Main)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_signal_noise_ratio_scalable(&self) -> Result { + }} + #[inline] pub fn get_signal_noise_ratio_scalable(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SignalNoiseRatioScalable)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_spatially_scalable(&self) -> Result { + }} + #[inline] pub fn get_spatially_scalable(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SpatiallyScalable)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_high(&self) -> Result { + }} + #[inline] pub fn get_high(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_High)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum SphericalVideoFrameFormat: i32 { None (SphericalVideoFrameFormat_None) = 0, Unsupported (SphericalVideoFrameFormat_Unsupported) = 1, Equirectangular (SphericalVideoFrameFormat_Equirectangular) = 2, @@ -24566,61 +24566,61 @@ RT_INTERFACE!{interface IVideoEncodingProperties(IVideoEncodingPropertiesVtbl): fn get_PixelAspectRatio(&self, out: *mut *mut MediaRatio) -> HRESULT }} impl IVideoEncodingProperties { - #[inline] pub unsafe fn set_bitrate(&self, value: u32) -> Result<()> { + #[inline] pub fn set_bitrate(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Bitrate)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_bitrate(&self) -> Result { + }} + #[inline] pub fn get_bitrate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Bitrate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_width(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_width(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Width)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_width(&self) -> Result { + }} + #[inline] pub fn get_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Width)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_height(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_height(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Height)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_height(&self) -> Result { + }} + #[inline] pub fn get_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Height)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_frame_rate(&self) -> Result> { + }} + #[inline] pub fn get_frame_rate(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FrameRate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pixel_aspect_ratio(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_pixel_aspect_ratio(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PixelAspectRatio)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class VideoEncodingProperties: IVideoEncodingProperties} impl RtActivatable for VideoEncodingProperties {} impl RtActivatable for VideoEncodingProperties {} impl RtActivatable for VideoEncodingProperties {} impl VideoEncodingProperties { - #[inline] pub fn create_h264() -> Result> { unsafe { + #[inline] pub fn create_h264() -> Result>> { >::get_activation_factory().create_h264() - }} - #[inline] pub fn create_mpeg2() -> Result> { unsafe { + } + #[inline] pub fn create_mpeg2() -> Result>> { >::get_activation_factory().create_mpeg2() - }} - #[inline] pub fn create_uncompressed(subtype: &HStringArg, width: u32, height: u32) -> Result> { unsafe { + } + #[inline] pub fn create_uncompressed(subtype: &HStringArg, width: u32, height: u32) -> Result>> { >::get_activation_factory().create_uncompressed(subtype, width, height) - }} - #[inline] pub fn create_hevc() -> Result> { unsafe { + } + #[inline] pub fn create_hevc() -> Result>> { >::get_activation_factory().create_hevc() - }} + } } DEFINE_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]) [CLSID_VideoEncodingProperties]); DEFINE_IID!(IID_IVideoEncodingProperties2, 4148404719, 54373, 17040, 169, 75, 239, 15, 21, 40, 248, 227); @@ -24631,46 +24631,46 @@ RT_INTERFACE!{interface IVideoEncodingProperties2(IVideoEncodingProperties2Vtbl) fn get_ProfileId(&self, out: *mut i32) -> HRESULT }} impl IVideoEncodingProperties2 { - #[inline] pub unsafe fn set_format_user_data(&self, value: &[u8]) -> Result<()> { + #[inline] pub fn set_format_user_data(&self, value: &[u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetFormatUserData)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[inline] pub fn get_format_user_data(&self) -> Result> { unsafe { let mut valueSize = 0; let mut value = null_mut(); let hr = ((*self.lpVtbl).GetFormatUserData)(self as *const _ as *mut _, &mut valueSize, &mut value); if hr == S_OK { Ok(ComArray::from_raw(valueSize, value)) } else { err(hr) } - } - #[inline] pub unsafe fn set_profile_id(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_profile_id(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ProfileId)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_profile_id(&self) -> Result { + }} + #[inline] pub fn get_profile_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProfileId)(self as *const _ as *mut _, &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(&self, out: *mut StereoscopicVideoPackingMode) -> HRESULT }} impl IVideoEncodingProperties3 { - #[inline] pub unsafe fn get_stereoscopic_video_packing_mode(&self) -> Result { + #[inline] pub fn get_stereoscopic_video_packing_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StereoscopicVideoPackingMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IVideoEncodingProperties4, 1917775892, 49420, 16626, 157, 114, 62, 225, 59, 69, 250, 142); RT_INTERFACE!{interface IVideoEncodingProperties4(IVideoEncodingProperties4Vtbl): IInspectable(IInspectableVtbl) [IID_IVideoEncodingProperties4] { fn get_SphericalVideoFrameFormat(&self, out: *mut SphericalVideoFrameFormat) -> HRESULT }} impl IVideoEncodingProperties4 { - #[inline] pub unsafe fn get_spherical_video_frame_format(&self) -> Result { + #[inline] pub fn get_spherical_video_frame_format(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SphericalVideoFrameFormat)(self as *const _ as *mut _, &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] { @@ -24679,32 +24679,32 @@ RT_INTERFACE!{static interface IVideoEncodingPropertiesStatics(IVideoEncodingPro fn CreateUncompressed(&self, subtype: HSTRING, width: u32, height: u32, out: *mut *mut VideoEncodingProperties) -> HRESULT }} impl IVideoEncodingPropertiesStatics { - #[inline] pub unsafe fn create_h264(&self) -> Result> { + #[inline] pub fn create_h264(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateH264)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_mpeg2(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_mpeg2(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateMpeg2)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_uncompressed(&self, subtype: &HStringArg, width: u32, height: u32) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_uncompressed(&self, subtype: &HStringArg, width: u32, height: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateUncompressed)(self as *const _ as *mut _, subtype.get(), width, height, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IVideoEncodingPropertiesStatics2, 3474898269, 18942, 19712, 181, 154, 207, 164, 223, 197, 25, 68); RT_INTERFACE!{static interface IVideoEncodingPropertiesStatics2(IVideoEncodingPropertiesStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IVideoEncodingPropertiesStatics2] { fn CreateHevc(&self, out: *mut *mut VideoEncodingProperties) -> HRESULT }} impl IVideoEncodingPropertiesStatics2 { - #[inline] pub unsafe fn create_hevc(&self) -> Result> { + #[inline] pub fn create_hevc(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateHevc)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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, Uhd2160p (VideoEncodingQuality_Uhd2160p) = 8, Uhd4320p (VideoEncodingQuality_Uhd4320p) = 9, @@ -24724,42 +24724,42 @@ RT_ENUM! { enum ClosedCaptionOpacity: i32 { RT_CLASS!{static class ClosedCaptionProperties} impl RtActivatable for ClosedCaptionProperties {} impl ClosedCaptionProperties { - #[inline] pub fn get_font_color() -> Result { unsafe { + #[inline] pub fn get_font_color() -> Result { >::get_activation_factory().get_font_color() - }} - #[cfg(feature="windows-ui")] #[inline] pub fn get_computed_font_color() -> Result { unsafe { + } + #[cfg(feature="windows-ui")] #[inline] pub fn get_computed_font_color() -> Result { >::get_activation_factory().get_computed_font_color() - }} - #[inline] pub fn get_font_opacity() -> Result { unsafe { + } + #[inline] pub fn get_font_opacity() -> Result { >::get_activation_factory().get_font_opacity() - }} - #[inline] pub fn get_font_size() -> Result { unsafe { + } + #[inline] pub fn get_font_size() -> Result { >::get_activation_factory().get_font_size() - }} - #[inline] pub fn get_font_style() -> Result { unsafe { + } + #[inline] pub fn get_font_style() -> Result { >::get_activation_factory().get_font_style() - }} - #[inline] pub fn get_font_effect() -> Result { unsafe { + } + #[inline] pub fn get_font_effect() -> Result { >::get_activation_factory().get_font_effect() - }} - #[inline] pub fn get_background_color() -> Result { unsafe { + } + #[inline] pub fn get_background_color() -> Result { >::get_activation_factory().get_background_color() - }} - #[cfg(feature="windows-ui")] #[inline] pub fn get_computed_background_color() -> Result { unsafe { + } + #[cfg(feature="windows-ui")] #[inline] pub fn get_computed_background_color() -> Result { >::get_activation_factory().get_computed_background_color() - }} - #[inline] pub fn get_background_opacity() -> Result { unsafe { + } + #[inline] pub fn get_background_opacity() -> Result { >::get_activation_factory().get_background_opacity() - }} - #[inline] pub fn get_region_color() -> Result { unsafe { + } + #[inline] pub fn get_region_color() -> Result { >::get_activation_factory().get_region_color() - }} - #[cfg(feature="windows-ui")] #[inline] pub fn get_computed_region_color() -> Result { unsafe { + } + #[cfg(feature="windows-ui")] #[inline] pub fn get_computed_region_color() -> Result { >::get_activation_factory().get_computed_region_color() - }} - #[inline] pub fn get_region_opacity() -> Result { unsafe { + } + #[inline] pub fn get_region_opacity() -> Result { >::get_activation_factory().get_region_opacity() - }} + } } DEFINE_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]) [CLSID_ClosedCaptionProperties]); DEFINE_IID!(IID_IClosedCaptionPropertiesStatics, 279584644, 52272, 16705, 181, 3, 82, 114, 40, 158, 12, 32); @@ -24781,66 +24781,66 @@ RT_INTERFACE!{static interface IClosedCaptionPropertiesStatics(IClosedCaptionPro fn get_RegionOpacity(&self, out: *mut ClosedCaptionOpacity) -> HRESULT }} impl IClosedCaptionPropertiesStatics { - #[inline] pub unsafe fn get_font_color(&self) -> Result { + #[inline] pub fn get_font_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FontColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_computed_font_color(&self) -> Result { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_computed_font_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ComputedFontColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_font_opacity(&self) -> Result { + }} + #[inline] pub fn get_font_opacity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FontOpacity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_font_size(&self) -> Result { + }} + #[inline] pub fn get_font_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FontSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_font_style(&self) -> Result { + }} + #[inline] pub fn get_font_style(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FontStyle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_font_effect(&self) -> Result { + }} + #[inline] pub fn get_font_effect(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FontEffect)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_background_color(&self) -> Result { + }} + #[inline] pub fn get_background_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BackgroundColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_computed_background_color(&self) -> Result { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_computed_background_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ComputedBackgroundColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_background_opacity(&self) -> Result { + }} + #[inline] pub fn get_background_opacity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BackgroundOpacity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_region_color(&self) -> Result { + }} + #[inline] pub fn get_region_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RegionColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_computed_region_color(&self) -> Result { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_computed_region_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ComputedRegionColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_region_opacity(&self) -> Result { + }} + #[inline] pub fn get_region_opacity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RegionOpacity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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, @@ -24855,172 +24855,172 @@ use ::prelude::*; 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(&self, out: *mut bool) -> HRESULT, - fn get_DesiredLiveOffset(&self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn put_DesiredLiveOffset(&self, value: ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_DesiredLiveOffset(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_DesiredLiveOffset(&self, value: foundation::TimeSpan) -> HRESULT, fn get_InitialBitrate(&self, out: *mut u32) -> HRESULT, fn put_InitialBitrate(&self, value: u32) -> HRESULT, fn get_CurrentDownloadBitrate(&self, out: *mut u32) -> HRESULT, fn get_CurrentPlaybackBitrate(&self, out: *mut u32) -> HRESULT, - fn get_AvailableBitrates(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn get_DesiredMinBitrate(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn put_DesiredMinBitrate(&self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn get_DesiredMaxBitrate(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn put_DesiredMaxBitrate(&self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_AvailableBitrates(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_DesiredMinBitrate(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_DesiredMinBitrate(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_DesiredMaxBitrate(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_DesiredMaxBitrate(&self, value: *mut foundation::IReference) -> HRESULT, fn get_AudioOnlyPlayback(&self, out: *mut bool) -> HRESULT, fn get_InboundBitsPerSecond(&self, out: *mut u64) -> HRESULT, - fn get_InboundBitsPerSecondWindow(&self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn put_InboundBitsPerSecondWindow(&self, value: ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn add_DownloadBitrateChanged(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DownloadBitrateChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_PlaybackBitrateChanged(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PlaybackBitrateChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_DownloadRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DownloadRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_DownloadCompleted(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DownloadCompleted(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_DownloadFailed(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DownloadFailed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn get_InboundBitsPerSecondWindow(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_InboundBitsPerSecondWindow(&self, value: foundation::TimeSpan) -> HRESULT, + fn add_DownloadBitrateChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DownloadBitrateChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PlaybackBitrateChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PlaybackBitrateChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_DownloadRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DownloadRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_DownloadCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DownloadCompleted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_DownloadFailed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DownloadFailed(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IAdaptiveMediaSource { - #[inline] pub unsafe fn get_is_live(&self) -> Result { + #[inline] pub fn get_is_live(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsLive)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_desired_live_offset(&self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + }} + #[inline] pub fn get_desired_live_offset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DesiredLiveOffset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_desired_live_offset(&self, value: ::rt::gen::windows::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_desired_live_offset(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DesiredLiveOffset)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_initial_bitrate(&self) -> Result { + }} + #[inline] pub fn get_initial_bitrate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InitialBitrate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_initial_bitrate(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_initial_bitrate(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InitialBitrate)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_download_bitrate(&self) -> Result { + }} + #[inline] pub fn get_current_download_bitrate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CurrentDownloadBitrate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_playback_bitrate(&self) -> Result { + }} + #[inline] pub fn get_current_playback_bitrate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CurrentPlaybackBitrate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_available_bitrates(&self) -> Result>> { + }} + #[inline] pub fn get_available_bitrates(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AvailableBitrates)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_desired_min_bitrate(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_desired_min_bitrate(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DesiredMinBitrate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_desired_min_bitrate(&self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_desired_min_bitrate(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DesiredMinBitrate)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_desired_max_bitrate(&self) -> Result>> { + }} + #[inline] pub fn get_desired_max_bitrate(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DesiredMaxBitrate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_desired_max_bitrate(&self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_desired_max_bitrate(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DesiredMaxBitrate)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_only_playback(&self) -> Result { + }} + #[inline] pub fn get_audio_only_playback(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AudioOnlyPlayback)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_inbound_bits_per_second(&self) -> Result { + }} + #[inline] pub fn get_inbound_bits_per_second(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InboundBitsPerSecond)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_inbound_bits_per_second_window(&self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + }} + #[inline] pub fn get_inbound_bits_per_second_window(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InboundBitsPerSecondWindow)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_inbound_bits_per_second_window(&self, value: ::rt::gen::windows::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_inbound_bits_per_second_window(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InboundBitsPerSecondWindow)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_download_bitrate_changed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_download_bitrate_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DownloadBitrateChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_download_bitrate_changed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_download_bitrate_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DownloadBitrateChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_playback_bitrate_changed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_playback_bitrate_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PlaybackBitrateChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_playback_bitrate_changed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_playback_bitrate_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PlaybackBitrateChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_download_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_download_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DownloadRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_download_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_download_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DownloadRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_download_completed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_download_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DownloadCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_download_completed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_download_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DownloadCompleted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_download_failed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_download_failed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DownloadFailed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_download_failed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_download_failed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DownloadFailed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AdaptiveMediaSource: IAdaptiveMediaSource} impl RtActivatable for AdaptiveMediaSource {} impl AdaptiveMediaSource { - #[inline] pub fn is_content_type_supported(contentType: &HStringArg) -> Result { unsafe { + #[inline] pub fn is_content_type_supported(contentType: &HStringArg) -> Result { >::get_activation_factory().is_content_type_supported(contentType) - }} - #[inline] pub fn create_from_uri_async(uri: &::rt::gen::windows::foundation::Uri) -> Result>> { unsafe { + } + #[inline] pub fn create_from_uri_async(uri: &foundation::Uri) -> Result>> { >::get_activation_factory().create_from_uri_async(uri) - }} - #[cfg(feature="windows-web")] #[inline] pub fn create_from_uri_with_downloader_async(uri: &::rt::gen::windows::foundation::Uri, httpClient: &::rt::gen::windows::web::http::HttpClient) -> Result>> { unsafe { + } + #[cfg(feature="windows-web")] #[inline] pub fn create_from_uri_with_downloader_async(uri: &foundation::Uri, httpClient: &::rt::gen::windows::web::http::HttpClient) -> Result>> { >::get_activation_factory().create_from_uri_with_downloader_async(uri, httpClient) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn create_from_stream_async(stream: &::rt::gen::windows::storage::streams::IInputStream, uri: &::rt::gen::windows::foundation::Uri, contentType: &HStringArg) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_stream_async(stream: &::rt::gen::windows::storage::streams::IInputStream, uri: &foundation::Uri, contentType: &HStringArg) -> Result>> { >::get_activation_factory().create_from_stream_async(stream, uri, contentType) - }} - #[cfg(all(feature="windows-storage",feature="windows-web"))] #[inline] pub fn create_from_stream_with_downloader_async(stream: &::rt::gen::windows::storage::streams::IInputStream, uri: &::rt::gen::windows::foundation::Uri, contentType: &HStringArg, httpClient: &::rt::gen::windows::web::http::HttpClient) -> Result>> { unsafe { + } + #[cfg(all(feature="windows-storage",feature="windows-web"))] #[inline] pub fn create_from_stream_with_downloader_async(stream: &::rt::gen::windows::storage::streams::IInputStream, uri: &foundation::Uri, contentType: &HStringArg, httpClient: &::rt::gen::windows::web::http::HttpClient) -> Result>> { >::get_activation_factory().create_from_stream_with_downloader_async(stream, uri, contentType, httpClient) - }} + } } DEFINE_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]) [CLSID_AdaptiveMediaSource]); DEFINE_IID!(IID_IAdaptiveMediaSource2, 394855234, 26464, 19385, 165, 138, 247, 170, 152, 176, 140, 14); @@ -25028,113 +25028,113 @@ RT_INTERFACE!{interface IAdaptiveMediaSource2(IAdaptiveMediaSource2Vtbl): IInspe fn get_AdvancedSettings(&self, out: *mut *mut AdaptiveMediaSourceAdvancedSettings) -> HRESULT }} impl IAdaptiveMediaSource2 { - #[inline] pub unsafe fn get_advanced_settings(&self) -> Result> { + #[inline] pub fn get_advanced_settings(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AdvancedSettings)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IAdaptiveMediaSource3, 3127911421, 49972, 17947, 163, 110, 201, 159, 84, 247, 23, 74); RT_INTERFACE!{interface IAdaptiveMediaSource3(IAdaptiveMediaSource3Vtbl): IInspectable(IInspectableVtbl) [IID_IAdaptiveMediaSource3] { - fn get_MinLiveOffset(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::TimeSpan>) -> HRESULT, - fn get_MaxSeekableWindowSize(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::TimeSpan>) -> HRESULT, - fn get_DesiredSeekableWindowSize(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::TimeSpan>) -> HRESULT, - fn put_DesiredSeekableWindowSize(&self, value: *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::TimeSpan>) -> HRESULT, + fn get_MinLiveOffset(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_MaxSeekableWindowSize(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_DesiredSeekableWindowSize(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_DesiredSeekableWindowSize(&self, value: *mut foundation::IReference) -> HRESULT, fn get_Diagnostics(&self, out: *mut *mut AdaptiveMediaSourceDiagnostics) -> HRESULT, fn GetCorrelatedTimes(&self, out: *mut *mut AdaptiveMediaSourceCorrelatedTimes) -> HRESULT }} impl IAdaptiveMediaSource3 { - #[inline] pub unsafe fn get_min_live_offset(&self) -> Result>> { + #[inline] pub fn get_min_live_offset(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MinLiveOffset)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_seekable_window_size(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_max_seekable_window_size(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxSeekableWindowSize)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_desired_seekable_window_size(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_desired_seekable_window_size(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DesiredSeekableWindowSize)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_desired_seekable_window_size(&self, value: &::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::TimeSpan>) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_desired_seekable_window_size(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DesiredSeekableWindowSize)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_diagnostics(&self) -> Result> { + }} + #[inline] pub fn get_diagnostics(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Diagnostics)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_correlated_times(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_correlated_times(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCorrelatedTimes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut bool) -> HRESULT, fn put_AllSegmentsIndependent(&self, value: bool) -> HRESULT, - fn get_DesiredBitrateHeadroomRatio(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn put_DesiredBitrateHeadroomRatio(&self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn get_BitrateDowngradeTriggerRatio(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn put_BitrateDowngradeTriggerRatio(&self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT + fn get_DesiredBitrateHeadroomRatio(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_DesiredBitrateHeadroomRatio(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_BitrateDowngradeTriggerRatio(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_BitrateDowngradeTriggerRatio(&self, value: *mut foundation::IReference) -> HRESULT }} impl IAdaptiveMediaSourceAdvancedSettings { - #[inline] pub unsafe fn get_all_segments_independent(&self) -> Result { + #[inline] pub fn get_all_segments_independent(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AllSegmentsIndependent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_all_segments_independent(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_all_segments_independent(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AllSegmentsIndependent)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_desired_bitrate_headroom_ratio(&self) -> Result>> { + }} + #[inline] pub fn get_desired_bitrate_headroom_ratio(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DesiredBitrateHeadroomRatio)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_desired_bitrate_headroom_ratio(&self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_desired_bitrate_headroom_ratio(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DesiredBitrateHeadroomRatio)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_bitrate_downgrade_trigger_ratio(&self) -> Result>> { + }} + #[inline] pub fn get_bitrate_downgrade_trigger_ratio(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BitrateDowngradeTriggerRatio)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_bitrate_downgrade_trigger_ratio(&self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_bitrate_downgrade_trigger_ratio(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BitrateDowngradeTriggerRatio)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AdaptiveMediaSourceAdvancedSettings: IAdaptiveMediaSourceAdvancedSettings} DEFINE_IID!(IID_IAdaptiveMediaSourceCorrelatedTimes, 84969351, 57394, 18657, 171, 141, 0, 43, 11, 48, 81, 223); RT_INTERFACE!{interface IAdaptiveMediaSourceCorrelatedTimes(IAdaptiveMediaSourceCorrelatedTimesVtbl): IInspectable(IInspectableVtbl) [IID_IAdaptiveMediaSourceCorrelatedTimes] { - fn get_Position(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::TimeSpan>) -> HRESULT, - fn get_PresentationTimeStamp(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::TimeSpan>) -> HRESULT, - fn get_ProgramDateTime(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::DateTime>) -> HRESULT + fn get_Position(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_PresentationTimeStamp(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_ProgramDateTime(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IAdaptiveMediaSourceCorrelatedTimes { - #[inline] pub unsafe fn get_position(&self) -> Result>> { + #[inline] pub fn get_position(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_presentation_time_stamp(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_presentation_time_stamp(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PresentationTimeStamp)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_program_date_time(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_program_date_time(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProgramDateTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AdaptiveMediaSourceCorrelatedTimes: IAdaptiveMediaSourceCorrelatedTimes} DEFINE_IID!(IID_IAdaptiveMediaSourceCreationResult, 1183233714, 32783, 20017, 144, 147, 118, 212, 120, 32, 19, 231); @@ -25144,33 +25144,33 @@ RT_INTERFACE!{interface IAdaptiveMediaSourceCreationResult(IAdaptiveMediaSourceC #[cfg(feature="windows-web")] fn get_HttpResponseMessage(&self, out: *mut *mut ::rt::gen::windows::web::http::HttpResponseMessage) -> HRESULT }} impl IAdaptiveMediaSourceCreationResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_media_source(&self) -> Result> { + }} + #[inline] pub fn get_media_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MediaSource)(self 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 get_http_response_message(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-web")] #[inline] pub fn get_http_response_message(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HttpResponseMessage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AdaptiveMediaSourceCreationResult: IAdaptiveMediaSourceCreationResult} DEFINE_IID!(IID_IAdaptiveMediaSourceCreationResult2, 473056191, 7236, 16459, 162, 1, 223, 69, 172, 120, 152, 232); RT_INTERFACE!{interface IAdaptiveMediaSourceCreationResult2(IAdaptiveMediaSourceCreationResult2Vtbl): IInspectable(IInspectableVtbl) [IID_IAdaptiveMediaSourceCreationResult2] { - fn get_ExtendedError(&self, out: *mut ::rt::gen::windows::foundation::HResult) -> HRESULT + fn get_ExtendedError(&self, out: *mut foundation::HResult) -> HRESULT }} impl IAdaptiveMediaSourceCreationResult2 { - #[inline] pub unsafe fn get_extended_error(&self) -> Result<::rt::gen::windows::foundation::HResult> { + #[inline] pub fn get_extended_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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, @@ -25178,89 +25178,89 @@ RT_ENUM! { enum AdaptiveMediaSourceCreationStatus: i32 { DEFINE_IID!(IID_IAdaptiveMediaSourceDiagnosticAvailableEventArgs, 989220614, 28060, 18762, 183, 169, 179, 165, 222, 230, 173, 104); RT_INTERFACE!{interface IAdaptiveMediaSourceDiagnosticAvailableEventArgs(IAdaptiveMediaSourceDiagnosticAvailableEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAdaptiveMediaSourceDiagnosticAvailableEventArgs] { fn get_DiagnosticType(&self, out: *mut AdaptiveMediaSourceDiagnosticType) -> HRESULT, - fn get_RequestId(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn get_Position(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::TimeSpan>) -> HRESULT, - fn get_SegmentId(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn get_ResourceType(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn get_ResourceUri(&self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, - fn get_ResourceByteRangeOffset(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn get_ResourceByteRangeLength(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn get_Bitrate(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT + fn get_RequestId(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_Position(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_SegmentId(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_ResourceType(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_ResourceUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn get_ResourceByteRangeOffset(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_ResourceByteRangeLength(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_Bitrate(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IAdaptiveMediaSourceDiagnosticAvailableEventArgs { - #[inline] pub unsafe fn get_diagnostic_type(&self) -> Result { + #[inline] pub fn get_diagnostic_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DiagnosticType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_request_id(&self) -> Result>> { + }} + #[inline] pub fn get_request_id(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RequestId)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_position(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_position(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_segment_id(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_segment_id(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SegmentId)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_resource_type(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_resource_type(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResourceType)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_resource_uri(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_resource_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResourceUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_resource_byte_range_offset(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_resource_byte_range_offset(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResourceByteRangeOffset)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_resource_byte_range_length(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_resource_byte_range_length(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResourceByteRangeLength)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_bitrate(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_bitrate(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Bitrate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AdaptiveMediaSourceDiagnosticAvailableEventArgs: IAdaptiveMediaSourceDiagnosticAvailableEventArgs} DEFINE_IID!(IID_IAdaptiveMediaSourceDiagnosticAvailableEventArgs2, 2356009047, 5797, 19871, 129, 14, 0, 189, 144, 27, 62, 249); RT_INTERFACE!{interface IAdaptiveMediaSourceDiagnosticAvailableEventArgs2(IAdaptiveMediaSourceDiagnosticAvailableEventArgs2Vtbl): IInspectable(IInspectableVtbl) [IID_IAdaptiveMediaSourceDiagnosticAvailableEventArgs2] { - fn get_ExtendedError(&self, out: *mut ::rt::gen::windows::foundation::HResult) -> HRESULT + fn get_ExtendedError(&self, out: *mut foundation::HResult) -> HRESULT }} impl IAdaptiveMediaSourceDiagnosticAvailableEventArgs2 { - #[inline] pub unsafe fn get_extended_error(&self) -> Result<::rt::gen::windows::foundation::HResult> { + #[inline] pub fn get_extended_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IAdaptiveMediaSourceDiagnostics, 2602888808, 38446, 17548, 174, 191, 178, 155, 86, 9, 142, 35); RT_INTERFACE!{interface IAdaptiveMediaSourceDiagnostics(IAdaptiveMediaSourceDiagnosticsVtbl): IInspectable(IInspectableVtbl) [IID_IAdaptiveMediaSourceDiagnostics] { - fn add_DiagnosticAvailable(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DiagnosticAvailable(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn add_DiagnosticAvailable(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DiagnosticAvailable(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IAdaptiveMediaSourceDiagnostics { - #[inline] pub unsafe fn add_diagnostic_available(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub fn add_diagnostic_available(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DiagnosticAvailable)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_diagnostic_available(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_diagnostic_available(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DiagnosticAvailable)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AdaptiveMediaSourceDiagnostics: IAdaptiveMediaSourceDiagnostics} RT_ENUM! { enum AdaptiveMediaSourceDiagnosticType: i32 { @@ -25272,16 +25272,16 @@ RT_INTERFACE!{interface IAdaptiveMediaSourceDownloadBitrateChangedEventArgs(IAda fn get_NewValue(&self, out: *mut u32) -> HRESULT }} impl IAdaptiveMediaSourceDownloadBitrateChangedEventArgs { - #[inline] pub unsafe fn get_old_value(&self) -> Result { + #[inline] pub fn get_old_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OldValue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_new_value(&self) -> Result { + }} + #[inline] pub fn get_new_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NewValue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AdaptiveMediaSourceDownloadBitrateChangedEventArgs: IAdaptiveMediaSourceDownloadBitrateChangedEventArgs} DEFINE_IID!(IID_IAdaptiveMediaSourceDownloadBitrateChangedEventArgs2, 4092720196, 38574, 19936, 181, 64, 43, 50, 70, 230, 150, 140); @@ -25289,11 +25289,11 @@ RT_INTERFACE!{interface IAdaptiveMediaSourceDownloadBitrateChangedEventArgs2(IAd fn get_Reason(&self, out: *mut AdaptiveMediaSourceDownloadBitrateChangedReason) -> HRESULT }} impl IAdaptiveMediaSourceDownloadBitrateChangedEventArgs2 { - #[inline] pub unsafe fn get_reason(&self) -> Result { + #[inline] pub fn get_reason(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Reason)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum AdaptiveMediaSourceDownloadBitrateChangedReason: i32 { SufficientInboundBitsPerSecond (AdaptiveMediaSourceDownloadBitrateChangedReason_SufficientInboundBitsPerSecond) = 0, InsufficientInboundBitsPerSecond (AdaptiveMediaSourceDownloadBitrateChangedReason_InsufficientInboundBitsPerSecond) = 1, LowBufferLevel (AdaptiveMediaSourceDownloadBitrateChangedReason_LowBufferLevel) = 2, PositionChanged (AdaptiveMediaSourceDownloadBitrateChangedReason_PositionChanged) = 3, TrackSelectionChanged (AdaptiveMediaSourceDownloadBitrateChangedReason_TrackSelectionChanged) = 4, DesiredBitratesChanged (AdaptiveMediaSourceDownloadBitrateChangedReason_DesiredBitratesChanged) = 5, ErrorInPreviousBitrate (AdaptiveMediaSourceDownloadBitrateChangedReason_ErrorInPreviousBitrate) = 6, @@ -25301,201 +25301,201 @@ RT_ENUM! { enum AdaptiveMediaSourceDownloadBitrateChangedReason: i32 { 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(&self, out: *mut AdaptiveMediaSourceResourceType) -> HRESULT, - fn get_ResourceUri(&self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, - fn get_ResourceByteRangeOffset(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn get_ResourceByteRangeLength(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_ResourceUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn get_ResourceByteRangeOffset(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_ResourceByteRangeLength(&self, out: *mut *mut foundation::IReference) -> HRESULT, #[cfg(feature="windows-web")] fn get_HttpResponseMessage(&self, out: *mut *mut ::rt::gen::windows::web::http::HttpResponseMessage) -> HRESULT }} impl IAdaptiveMediaSourceDownloadCompletedEventArgs { - #[inline] pub unsafe fn get_resource_type(&self) -> Result { + #[inline] pub fn get_resource_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ResourceType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_resource_uri(&self) -> Result> { + }} + #[inline] pub fn get_resource_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResourceUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_resource_byte_range_offset(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_resource_byte_range_offset(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResourceByteRangeOffset)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_resource_byte_range_length(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_resource_byte_range_length(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResourceByteRangeLength)(self 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 get_http_response_message(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-web")] #[inline] pub fn get_http_response_message(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HttpResponseMessage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AdaptiveMediaSourceDownloadCompletedEventArgs: IAdaptiveMediaSourceDownloadCompletedEventArgs} DEFINE_IID!(IID_IAdaptiveMediaSourceDownloadCompletedEventArgs2, 1883718852, 38474, 16612, 175, 149, 145, 119, 221, 109, 250, 0); RT_INTERFACE!{interface IAdaptiveMediaSourceDownloadCompletedEventArgs2(IAdaptiveMediaSourceDownloadCompletedEventArgs2Vtbl): IInspectable(IInspectableVtbl) [IID_IAdaptiveMediaSourceDownloadCompletedEventArgs2] { fn get_RequestId(&self, out: *mut i32) -> HRESULT, fn get_Statistics(&self, out: *mut *mut AdaptiveMediaSourceDownloadStatistics) -> HRESULT, - fn get_Position(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::TimeSpan>) -> HRESULT + fn get_Position(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IAdaptiveMediaSourceDownloadCompletedEventArgs2 { - #[inline] pub unsafe fn get_request_id(&self) -> Result { + #[inline] pub fn get_request_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RequestId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_statistics(&self) -> Result> { + }} + #[inline] pub fn get_statistics(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Statistics)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_position(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_position(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut AdaptiveMediaSourceResourceType) -> HRESULT, - fn get_ResourceUri(&self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, - fn get_ResourceByteRangeOffset(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn get_ResourceByteRangeLength(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_ResourceUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn get_ResourceByteRangeOffset(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_ResourceByteRangeLength(&self, out: *mut *mut foundation::IReference) -> HRESULT, #[cfg(feature="windows-web")] fn get_HttpResponseMessage(&self, out: *mut *mut ::rt::gen::windows::web::http::HttpResponseMessage) -> HRESULT }} impl IAdaptiveMediaSourceDownloadFailedEventArgs { - #[inline] pub unsafe fn get_resource_type(&self) -> Result { + #[inline] pub fn get_resource_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ResourceType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_resource_uri(&self) -> Result> { + }} + #[inline] pub fn get_resource_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResourceUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_resource_byte_range_offset(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_resource_byte_range_offset(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResourceByteRangeOffset)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_resource_byte_range_length(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_resource_byte_range_length(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResourceByteRangeLength)(self 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 get_http_response_message(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-web")] #[inline] pub fn get_http_response_message(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HttpResponseMessage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AdaptiveMediaSourceDownloadFailedEventArgs: IAdaptiveMediaSourceDownloadFailedEventArgs} DEFINE_IID!(IID_IAdaptiveMediaSourceDownloadFailedEventArgs2, 1888589160, 38524, 18822, 144, 197, 198, 252, 75, 49, 226, 216); RT_INTERFACE!{interface IAdaptiveMediaSourceDownloadFailedEventArgs2(IAdaptiveMediaSourceDownloadFailedEventArgs2Vtbl): IInspectable(IInspectableVtbl) [IID_IAdaptiveMediaSourceDownloadFailedEventArgs2] { fn get_RequestId(&self, out: *mut i32) -> HRESULT, - fn get_ExtendedError(&self, out: *mut ::rt::gen::windows::foundation::HResult) -> HRESULT, + fn get_ExtendedError(&self, out: *mut foundation::HResult) -> HRESULT, fn get_Statistics(&self, out: *mut *mut AdaptiveMediaSourceDownloadStatistics) -> HRESULT, - fn get_Position(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::TimeSpan>) -> HRESULT + fn get_Position(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IAdaptiveMediaSourceDownloadFailedEventArgs2 { - #[inline] pub unsafe fn get_request_id(&self) -> Result { + #[inline] pub fn get_request_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RequestId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_error(&self) -> Result<::rt::gen::windows::foundation::HResult> { + }} + #[inline] pub fn get_extended_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_statistics(&self) -> Result> { + }} + #[inline] pub fn get_statistics(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Statistics)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_position(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_position(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } 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(&self) -> HRESULT }} impl IAdaptiveMediaSourceDownloadRequestedDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AdaptiveMediaSourceDownloadRequestedDeferral: IAdaptiveMediaSourceDownloadRequestedDeferral} 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(&self, out: *mut AdaptiveMediaSourceResourceType) -> HRESULT, - fn get_ResourceUri(&self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, - fn get_ResourceByteRangeOffset(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn get_ResourceByteRangeLength(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_ResourceUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn get_ResourceByteRangeOffset(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_ResourceByteRangeLength(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn get_Result(&self, out: *mut *mut AdaptiveMediaSourceDownloadResult) -> HRESULT, fn GetDeferral(&self, out: *mut *mut AdaptiveMediaSourceDownloadRequestedDeferral) -> HRESULT }} impl IAdaptiveMediaSourceDownloadRequestedEventArgs { - #[inline] pub unsafe fn get_resource_type(&self) -> Result { + #[inline] pub fn get_resource_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ResourceType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_resource_uri(&self) -> Result> { + }} + #[inline] pub fn get_resource_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResourceUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_resource_byte_range_offset(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_resource_byte_range_offset(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResourceByteRangeOffset)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_resource_byte_range_length(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_resource_byte_range_length(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResourceByteRangeLength)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_result(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_result(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Result)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AdaptiveMediaSourceDownloadRequestedEventArgs: IAdaptiveMediaSourceDownloadRequestedEventArgs} DEFINE_IID!(IID_IAdaptiveMediaSourceDownloadRequestedEventArgs2, 3011349502, 43588, 19842, 130, 91, 97, 29, 227, 188, 254, 203); RT_INTERFACE!{interface IAdaptiveMediaSourceDownloadRequestedEventArgs2(IAdaptiveMediaSourceDownloadRequestedEventArgs2Vtbl): IInspectable(IInspectableVtbl) [IID_IAdaptiveMediaSourceDownloadRequestedEventArgs2] { fn get_RequestId(&self, out: *mut i32) -> HRESULT, - fn get_Position(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::TimeSpan>) -> HRESULT + fn get_Position(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IAdaptiveMediaSourceDownloadRequestedEventArgs2 { - #[inline] pub unsafe fn get_request_id(&self) -> Result { + #[inline] pub fn get_request_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RequestId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_position(&self) -> Result>> { + }} + #[inline] pub fn get_position(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, - fn put_ResourceUri(&self, value: *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn get_ResourceUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_ResourceUri(&self, value: *mut foundation::Uri) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy2(&self) -> (), #[cfg(feature="windows-storage")] fn get_InputStream(&self, out: *mut *mut ::rt::gen::windows::storage::streams::IInputStream) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy3(&self) -> (), @@ -25510,108 +25510,108 @@ RT_INTERFACE!{interface IAdaptiveMediaSourceDownloadResult(IAdaptiveMediaSourceD fn put_ExtendedStatus(&self, value: u32) -> HRESULT }} impl IAdaptiveMediaSourceDownloadResult { - #[inline] pub unsafe fn get_resource_uri(&self) -> Result> { + #[inline] pub fn get_resource_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResourceUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_resource_uri(&self, value: &::rt::gen::windows::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_resource_uri(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ResourceUri)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_input_stream(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_input_stream(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InputStream)(self 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_input_stream(&self, value: &::rt::gen::windows::storage::streams::IInputStream) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_input_stream(&self, value: &::rt::gen::windows::storage::streams::IInputStream) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InputStream)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_buffer(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_buffer(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Buffer)(self 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_buffer(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_buffer(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Buffer)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_content_type(&self) -> Result { + }} + #[inline] pub fn get_content_type(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContentType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_content_type(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_content_type(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ContentType)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_status(&self) -> Result { + }} + #[inline] pub fn get_extended_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_extended_status(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_extended_status(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ExtendedStatus)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AdaptiveMediaSourceDownloadResult: IAdaptiveMediaSourceDownloadResult} 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(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn put_ResourceByteRangeOffset(&self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn get_ResourceByteRangeLength(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn put_ResourceByteRangeLength(&self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT + fn get_ResourceByteRangeOffset(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_ResourceByteRangeOffset(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_ResourceByteRangeLength(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_ResourceByteRangeLength(&self, value: *mut foundation::IReference) -> HRESULT }} impl IAdaptiveMediaSourceDownloadResult2 { - #[inline] pub unsafe fn get_resource_byte_range_offset(&self) -> Result>> { + #[inline] pub fn get_resource_byte_range_offset(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResourceByteRangeOffset)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_resource_byte_range_offset(&self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_resource_byte_range_offset(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ResourceByteRangeOffset)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_resource_byte_range_length(&self) -> Result>> { + }} + #[inline] pub fn get_resource_byte_range_length(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResourceByteRangeLength)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_resource_byte_range_length(&self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_resource_byte_range_length(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ResourceByteRangeLength)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IAdaptiveMediaSourceDownloadStatistics, 2735132411, 59754, 19967, 169, 184, 26, 224, 140, 1, 174, 152); RT_INTERFACE!{interface IAdaptiveMediaSourceDownloadStatistics(IAdaptiveMediaSourceDownloadStatisticsVtbl): IInspectable(IInspectableVtbl) [IID_IAdaptiveMediaSourceDownloadStatistics] { fn get_ContentBytesReceivedCount(&self, out: *mut u64) -> HRESULT, - fn get_TimeToHeadersReceived(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::TimeSpan>) -> HRESULT, - fn get_TimeToFirstByteReceived(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::TimeSpan>) -> HRESULT, - fn get_TimeToLastByteReceived(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::TimeSpan>) -> HRESULT + fn get_TimeToHeadersReceived(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_TimeToFirstByteReceived(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_TimeToLastByteReceived(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IAdaptiveMediaSourceDownloadStatistics { - #[inline] pub unsafe fn get_content_bytes_received_count(&self) -> Result { + #[inline] pub fn get_content_bytes_received_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ContentBytesReceivedCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_time_to_headers_received(&self) -> Result>> { + }} + #[inline] pub fn get_time_to_headers_received(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TimeToHeadersReceived)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_time_to_first_byte_received(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_time_to_first_byte_received(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TimeToFirstByteReceived)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_time_to_last_byte_received(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_time_to_last_byte_received(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TimeToLastByteReceived)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AdaptiveMediaSourceDownloadStatistics: IAdaptiveMediaSourceDownloadStatistics} DEFINE_IID!(IID_IAdaptiveMediaSourcePlaybackBitrateChangedEventArgs, 597860205, 32218, 19025, 135, 169, 111, 168, 197, 178, 146, 190); @@ -25621,21 +25621,21 @@ RT_INTERFACE!{interface IAdaptiveMediaSourcePlaybackBitrateChangedEventArgs(IAda fn get_AudioOnly(&self, out: *mut bool) -> HRESULT }} impl IAdaptiveMediaSourcePlaybackBitrateChangedEventArgs { - #[inline] pub unsafe fn get_old_value(&self) -> Result { + #[inline] pub fn get_old_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OldValue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_new_value(&self) -> Result { + }} + #[inline] pub fn get_new_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NewValue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_only(&self) -> Result { + }} + #[inline] pub fn get_audio_only(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AudioOnly)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AdaptiveMediaSourcePlaybackBitrateChangedEventArgs: IAdaptiveMediaSourcePlaybackBitrateChangedEventArgs} RT_ENUM! { enum AdaptiveMediaSourceResourceType: i32 { @@ -25644,39 +25644,39 @@ RT_ENUM! { enum AdaptiveMediaSourceResourceType: i32 { 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(&self, contentType: HSTRING, out: *mut bool) -> HRESULT, - fn CreateFromUriAsync(&self, uri: *mut ::rt::gen::windows::foundation::Uri, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn CreateFromUriAsync(&self, uri: *mut foundation::Uri, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-web"))] fn __Dummy2(&self) -> (), - #[cfg(feature="windows-web")] fn CreateFromUriWithDownloaderAsync(&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(feature="windows-web")] fn CreateFromUriWithDownloaderAsync(&self, uri: *mut foundation::Uri, httpClient: *mut ::rt::gen::windows::web::http::HttpClient, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy3(&self) -> (), - #[cfg(feature="windows-storage")] fn CreateFromStreamAsync(&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(&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 + #[cfg(feature="windows-storage")] fn CreateFromStreamAsync(&self, stream: *mut ::rt::gen::windows::storage::streams::IInputStream, uri: *mut foundation::Uri, contentType: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(all(feature="windows-storage",feature="windows-web"))] fn CreateFromStreamWithDownloaderAsync(&self, stream: *mut ::rt::gen::windows::storage::streams::IInputStream, uri: *mut foundation::Uri, contentType: HSTRING, httpClient: *mut ::rt::gen::windows::web::http::HttpClient, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IAdaptiveMediaSourceStatics { - #[inline] pub unsafe fn is_content_type_supported(&self, contentType: &HStringArg) -> Result { + #[inline] pub fn is_content_type_supported(&self, contentType: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsContentTypeSupported)(self as *const _ as *mut _, contentType.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn create_from_uri_async(&self, uri: &::rt::gen::windows::foundation::Uri) -> Result>> { + }} + #[inline] pub fn create_from_uri_async(&self, uri: &foundation::Uri) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromUriAsync)(self as *const _ as *mut _, 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(&self, uri: &::rt::gen::windows::foundation::Uri, httpClient: &::rt::gen::windows::web::http::HttpClient) -> Result>> { + }} + #[cfg(feature="windows-web")] #[inline] pub fn create_from_uri_with_downloader_async(&self, uri: &foundation::Uri, httpClient: &::rt::gen::windows::web::http::HttpClient) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromUriWithDownloaderAsync)(self as *const _ as *mut _, 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(&self, stream: &::rt::gen::windows::storage::streams::IInputStream, uri: &::rt::gen::windows::foundation::Uri, contentType: &HStringArg) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_stream_async(&self, stream: &::rt::gen::windows::storage::streams::IInputStream, uri: &foundation::Uri, contentType: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromStreamAsync)(self as *const _ as *mut _, 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(&self, stream: &::rt::gen::windows::storage::streams::IInputStream, uri: &::rt::gen::windows::foundation::Uri, contentType: &HStringArg, httpClient: &::rt::gen::windows::web::http::HttpClient) -> Result>> { + }} + #[cfg(all(feature="windows-storage",feature="windows-web"))] #[inline] pub fn create_from_stream_with_downloader_async(&self, stream: &::rt::gen::windows::storage::streams::IInputStream, uri: &foundation::Uri, contentType: &HStringArg, httpClient: &::rt::gen::windows::web::http::HttpClient) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromStreamWithDownloaderAsync)(self as *const _ as *mut _, 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) } - } + }} } } // Windows.Media.Streaming.Adaptive } // Windows.Media.Streaming @@ -25688,25 +25688,25 @@ RT_ENUM! { enum ContentAccessRestrictionLevel: i32 { 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(&self, out: *mut HSTRING) -> HRESULT, - fn get_MaxBrowsableAgeRating(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_PreferredAgeRating(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn get_MaxBrowsableAgeRating(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_PreferredAgeRating(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IContentRestrictionsBrowsePolicy { - #[inline] pub unsafe fn get_geographic_region(&self) -> Result { + #[inline] pub fn get_geographic_region(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_GeographicRegion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_browsable_age_rating(&self) -> Result>> { + }} + #[inline] pub fn get_max_browsable_age_rating(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxBrowsableAgeRating)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_preferred_age_rating(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_preferred_age_rating(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PreferredAgeRating)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ContentRestrictionsBrowsePolicy: IContentRestrictionsBrowsePolicy} RT_ENUM! { enum RatedContentCategory: i32 { @@ -25724,62 +25724,62 @@ RT_INTERFACE!{interface IRatedContentDescription(IRatedContentDescriptionVtbl): #[cfg(feature="windows-storage")] fn put_Image(&self, value: *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, fn get_Category(&self, out: *mut RatedContentCategory) -> HRESULT, fn put_Category(&self, value: RatedContentCategory) -> HRESULT, - fn get_Ratings(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn put_Ratings(&self, value: *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_Ratings(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn put_Ratings(&self, value: *mut foundation::collections::IVector) -> HRESULT }} impl IRatedContentDescription { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Id)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_title(&self) -> Result { + }} + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_title(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_title(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Title)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_image(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_image(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Image)(self 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(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_image(&self, value: &super::super::storage::streams::IRandomAccessStreamReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Image)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_category(&self) -> Result { + }} + #[inline] pub fn get_category(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Category)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_category(&self, value: RatedContentCategory) -> Result<()> { + }} + #[inline] pub fn set_category(&self, value: RatedContentCategory) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Category)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_ratings(&self) -> Result>> { + }} + #[inline] pub fn get_ratings(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Ratings)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_ratings(&self, value: &super::super::foundation::collections::IVector) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_ratings(&self, value: &foundation::collections::IVector) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Ratings)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class RatedContentDescription: IRatedContentDescription} impl RtActivatable for RatedContentDescription {} impl RatedContentDescription { - #[inline] pub fn create(id: &HStringArg, title: &HStringArg, category: RatedContentCategory) -> Result> { unsafe { + #[inline] pub fn create(id: &HStringArg, title: &HStringArg, category: RatedContentCategory) -> Result> { >::get_activation_factory().create(id, title, category) - }} + } } DEFINE_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]) [CLSID_RatedContentDescription]); DEFINE_IID!(IID_IRatedContentDescriptionFactory, 775479138, 39824, 20390, 137, 193, 75, 141, 47, 251, 53, 115); @@ -25787,53 +25787,53 @@ RT_INTERFACE!{static interface IRatedContentDescriptionFactory(IRatedContentDesc fn Create(&self, id: HSTRING, title: HSTRING, category: RatedContentCategory, out: *mut *mut RatedContentDescription) -> HRESULT }} impl IRatedContentDescriptionFactory { - #[inline] pub unsafe fn create(&self, id: &HStringArg, title: &HStringArg, category: RatedContentCategory) -> Result> { + #[inline] pub fn create(&self, id: &HStringArg, title: &HStringArg, category: RatedContentCategory) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, id.get(), title.get(), category, &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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetRestrictionLevelAsync(&self, ratedContentDescription: *mut RatedContentDescription, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestContentAccessAsync(&self, ratedContentDescription: *mut RatedContentDescription, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_RestrictionsChanged(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RestrictionsChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn GetBrowsePolicyAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetRestrictionLevelAsync(&self, ratedContentDescription: *mut RatedContentDescription, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestContentAccessAsync(&self, ratedContentDescription: *mut RatedContentDescription, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_RestrictionsChanged(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RestrictionsChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IRatedContentRestrictions { - #[inline] pub unsafe fn get_browse_policy_async(&self) -> Result>> { + #[inline] pub fn get_browse_policy_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetBrowsePolicyAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_restriction_level_async(&self, ratedContentDescription: &RatedContentDescription) -> Result>> { + }} + #[inline] pub fn get_restriction_level_async(&self, ratedContentDescription: &RatedContentDescription) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetRestrictionLevelAsync)(self as *const _ as *mut _, 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(&self, ratedContentDescription: &RatedContentDescription) -> Result>> { + }} + #[inline] pub fn request_content_access_async(&self, ratedContentDescription: &RatedContentDescription) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestContentAccessAsync)(self as *const _ as *mut _, 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(&self, handler: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_restrictions_changed(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RestrictionsChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_restrictions_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_restrictions_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RestrictionsChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class RatedContentRestrictions: IRatedContentRestrictions} impl RtActivatable for RatedContentRestrictions {} impl RtActivatable for RatedContentRestrictions {} impl RatedContentRestrictions { - #[inline] pub fn create_with_max_age_rating(maxAgeRating: u32) -> Result> { unsafe { + #[inline] pub fn create_with_max_age_rating(maxAgeRating: u32) -> Result> { >::get_activation_factory().create_with_max_age_rating(maxAgeRating) - }} + } } DEFINE_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]) [CLSID_RatedContentRestrictions]); DEFINE_IID!(IID_IRatedContentRestrictionsFactory, 4216007062, 50109, 18704, 150, 25, 151, 207, 208, 105, 77, 86); @@ -25841,51 +25841,51 @@ RT_INTERFACE!{static interface IRatedContentRestrictionsFactory(IRatedContentRes fn CreateWithMaxAgeRating(&self, maxAgeRating: u32, out: *mut *mut RatedContentRestrictions) -> HRESULT }} impl IRatedContentRestrictionsFactory { - #[inline] pub unsafe fn create_with_max_age_rating(&self, maxAgeRating: u32) -> Result> { + #[inline] pub fn create_with_max_age_rating(&self, maxAgeRating: u32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithMaxAgeRating)(self as *const _ as *mut _, maxAgeRating, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } } // Windows.Media.ContentRestrictions pub mod playlists { // Windows.Media.Playlists use ::prelude::*; 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn SaveAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - #[cfg(feature="windows-storage")] fn SaveAsAsync(&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(&self, saveLocation: *mut super::super::storage::IStorageFolder, desiredName: HSTRING, option: super::super::storage::NameCollisionOption, playlistFormat: PlaylistFormat, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn get_Files(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn SaveAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + #[cfg(feature="windows-storage")] fn SaveAsAsync(&self, saveLocation: *mut super::super::storage::IStorageFolder, desiredName: HSTRING, option: super::super::storage::NameCollisionOption, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn SaveAsWithFormatAsync(&self, saveLocation: *mut super::super::storage::IStorageFolder, desiredName: HSTRING, option: super::super::storage::NameCollisionOption, playlistFormat: PlaylistFormat, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IPlaylist { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_files(&self) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_files(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Files)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn save_async(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn save_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveAsync)(self 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_as_async(&self, saveLocation: &super::super::storage::IStorageFolder, desiredName: &HStringArg, option: super::super::storage::NameCollisionOption) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn save_as_async(&self, saveLocation: &super::super::storage::IStorageFolder, desiredName: &HStringArg, option: super::super::storage::NameCollisionOption) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveAsAsync)(self as *const _ as *mut _, 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(&self, saveLocation: &super::super::storage::IStorageFolder, desiredName: &HStringArg, option: super::super::storage::NameCollisionOption, playlistFormat: PlaylistFormat) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn save_as_with_format_async(&self, saveLocation: &super::super::storage::IStorageFolder, desiredName: &HStringArg, option: super::super::storage::NameCollisionOption, playlistFormat: PlaylistFormat) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveAsWithFormatAsync)(self as *const _ as *mut _, saveLocation as *const _ as *mut _, desiredName.get(), option, playlistFormat, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class Playlist: IPlaylist} impl RtActivatable for Playlist {} impl RtActivatable for Playlist {} impl Playlist { - #[cfg(feature="windows-storage")] #[inline] pub fn load_async(file: &super::super::storage::IStorageFile) -> Result>> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn load_async(file: &super::super::storage::IStorageFile) -> Result>> { >::get_activation_factory().load_async(file) - }} + } } DEFINE_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]) [CLSID_Playlist]); RT_ENUM! { enum PlaylistFormat: i32 { @@ -25893,13 +25893,13 @@ RT_ENUM! { enum PlaylistFormat: i32 { }} 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(&self, file: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn LoadAsync(&self, file: *mut super::super::storage::IStorageFile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IPlaylistStatics { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn load_async(&self, file: &super::super::storage::IStorageFile) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn load_async(&self, file: &super::super::storage::IStorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LoadAsync)(self as *const _ as *mut _, file as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } } // Windows.Media.Playlists diff --git a/src/rt/gen/windows/networking.rs b/src/rt/gen/windows/networking.rs index ee2086f..42332a2 100644 --- a/src/rt/gen/windows/networking.rs +++ b/src/rt/gen/windows/networking.rs @@ -14,49 +14,49 @@ RT_INTERFACE!{interface IEndpointPair(IEndpointPairVtbl): IInspectable(IInspecta fn put_RemoteServiceName(&self, value: HSTRING) -> HRESULT }} impl IEndpointPair { - #[inline] pub unsafe fn get_local_host_name(&self) -> Result> { + #[inline] pub fn get_local_host_name(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LocalHostName)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_local_host_name(&self, value: &HostName) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_local_host_name(&self, value: &HostName) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LocalHostName)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_local_service_name(&self) -> Result { + }} + #[inline] pub fn get_local_service_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LocalServiceName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_local_service_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_local_service_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LocalServiceName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_host_name(&self) -> Result> { + }} + #[inline] pub fn get_remote_host_name(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteHostName)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_remote_host_name(&self, value: &HostName) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_remote_host_name(&self, value: &HostName) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RemoteHostName)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_service_name(&self) -> Result { + }} + #[inline] pub fn get_remote_service_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteServiceName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_remote_service_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_remote_service_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RemoteServiceName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class EndpointPair: IEndpointPair} impl RtActivatable for EndpointPair {} impl EndpointPair { - #[inline] pub fn create_endpoint_pair(localHostName: &HostName, localServiceName: &HStringArg, remoteHostName: &HostName, remoteServiceName: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_endpoint_pair(localHostName: &HostName, localServiceName: &HStringArg, remoteHostName: &HostName, remoteServiceName: &HStringArg) -> Result> { >::get_activation_factory().create_endpoint_pair(localHostName, localServiceName, remoteHostName, remoteServiceName) - }} + } } DEFINE_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]) [CLSID_EndpointPair]); DEFINE_IID!(IID_IEndpointPairFactory, 3054098801, 25824, 17451, 170, 111, 204, 140, 143, 24, 31, 120); @@ -64,11 +64,11 @@ RT_INTERFACE!{static interface IEndpointPairFactory(IEndpointPairFactoryVtbl): I fn CreateEndpointPair(&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(&self, localHostName: &HostName, localServiceName: &HStringArg, remoteHostName: &HostName, remoteServiceName: &HStringArg) -> Result> { + #[inline] pub fn create_endpoint_pair(&self, localHostName: &HostName, localServiceName: &HStringArg, remoteHostName: &HostName, remoteServiceName: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateEndpointPair)(self as *const _ as *mut _, 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) } - } + }} } DEFINE_IID!(IID_IHostName, 3213806253, 60822, 18855, 144, 132, 212, 22, 202, 232, 141, 203); RT_INTERFACE!{interface IHostName(IHostNameVtbl): IInspectable(IInspectableVtbl) [IID_IHostName] { @@ -80,47 +80,47 @@ RT_INTERFACE!{interface IHostName(IHostNameVtbl): IInspectable(IInspectableVtbl) fn IsEqual(&self, hostName: *mut HostName, out: *mut bool) -> HRESULT }} impl IHostName { - #[inline] pub unsafe fn get_ipinformation(&self) -> Result> { + #[inline] pub fn get_ipinformation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IPInformation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_raw_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_raw_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RawName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_canonical_name(&self) -> Result { + }} + #[inline] pub fn get_canonical_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CanonicalName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_type(&self) -> Result { + }} + #[inline] pub fn get_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Type)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_equal(&self, hostName: &HostName) -> Result { + }} + #[inline] pub fn is_equal(&self, hostName: &HostName) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsEqual)(self as *const _ as *mut _, hostName as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class HostName: IHostName} impl RtActivatable for HostName {} impl RtActivatable for HostName {} impl HostName { - #[inline] pub fn create_host_name(hostName: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_host_name(hostName: &HStringArg) -> Result> { >::get_activation_factory().create_host_name(hostName) - }} - #[inline] pub fn compare(value1: &HStringArg, value2: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn compare(value1: &HStringArg, value2: &HStringArg) -> Result { >::get_activation_factory().compare(value1, value2) - }} + } } DEFINE_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]) [CLSID_HostName]); DEFINE_IID!(IID_IHostNameFactory, 1166812141, 28975, 17782, 173, 241, 194, 11, 44, 100, 53, 88); @@ -128,11 +128,11 @@ RT_INTERFACE!{static interface IHostNameFactory(IHostNameFactoryVtbl): IInspecta fn CreateHostName(&self, hostName: HSTRING, out: *mut *mut HostName) -> HRESULT }} impl IHostNameFactory { - #[inline] pub unsafe fn create_host_name(&self, hostName: &HStringArg) -> Result> { + #[inline] pub fn create_host_name(&self, hostName: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateHostName)(self as *const _ as *mut _, hostName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum HostNameSortOptions: u32 { None (HostNameSortOptions_None) = 0, OptimizeForLongConnections (HostNameSortOptions_OptimizeForLongConnections) = 2, @@ -142,11 +142,11 @@ RT_INTERFACE!{static interface IHostNameStatics(IHostNameStaticsVtbl): IInspecta fn Compare(&self, value1: HSTRING, value2: HSTRING, out: *mut i32) -> HRESULT }} impl IHostNameStatics { - #[inline] pub unsafe fn compare(&self, value1: &HStringArg, value2: &HStringArg) -> Result { + #[inline] pub fn compare(&self, value1: &HStringArg, value2: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).Compare)(self as *const _ as *mut _, value1.get(), value2.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum HostNameType: i32 { DomainName (HostNameType_DomainName) = 0, Ipv4 (HostNameType_Ipv4) = 1, Ipv6 (HostNameType_Ipv6) = 2, Bluetooth (HostNameType_Bluetooth) = 3, @@ -160,98 +160,98 @@ DEFINE_IID!(IID_IHotspotAuthenticationContext, 3881224081, 4099, 19941, 131, 199 RT_INTERFACE!{interface IHotspotAuthenticationContext(IHotspotAuthenticationContextVtbl): IInspectable(IInspectableVtbl) [IID_IHotspotAuthenticationContext] { fn get_WirelessNetworkId(&self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT, fn get_NetworkAdapter(&self, out: *mut *mut super::connectivity::NetworkAdapter) -> HRESULT, - fn get_RedirectMessageUrl(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn get_RedirectMessageUrl(&self, out: *mut *mut foundation::Uri) -> HRESULT, #[cfg(not(feature="windows-data"))] fn __Dummy3(&self) -> (), #[cfg(feature="windows-data")] fn get_RedirectMessageXml(&self, out: *mut *mut super::super::data::xml::dom::XmlDocument) -> HRESULT, - fn get_AuthenticationUrl(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn get_AuthenticationUrl(&self, out: *mut *mut foundation::Uri) -> HRESULT, fn IssueCredentials(&self, userName: HSTRING, password: HSTRING, extraParameters: HSTRING, markAsManualConnectOnFailure: bool) -> HRESULT, fn AbortAuthentication(&self, markAsManual: bool) -> HRESULT, fn SkipAuthentication(&self) -> HRESULT, fn TriggerAttentionRequired(&self, packageRelativeApplicationId: HSTRING, applicationParameters: HSTRING) -> HRESULT }} impl IHotspotAuthenticationContext { - #[inline] pub unsafe fn get_wireless_network_id(&self) -> Result> { + #[inline] pub fn get_wireless_network_id(&self) -> Result> { unsafe { let mut outSize = 0; let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WirelessNetworkId)(self as *const _ as *mut _, &mut outSize, &mut out); if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_network_adapter(&self) -> Result> { + }} + #[inline] pub fn get_network_adapter(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NetworkAdapter)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_redirect_message_url(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_redirect_message_url(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RedirectMessageUrl)(self as *const _ as *mut _, &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(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-data")] #[inline] pub fn get_redirect_message_xml(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RedirectMessageXml)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_authentication_url(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_authentication_url(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AuthenticationUrl)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn issue_credentials(&self, userName: &HStringArg, password: &HStringArg, extraParameters: &HStringArg, markAsManualConnectOnFailure: bool) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn issue_credentials(&self, userName: &HStringArg, password: &HStringArg, extraParameters: &HStringArg, markAsManualConnectOnFailure: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).IssueCredentials)(self as *const _ as *mut _, userName.get(), password.get(), extraParameters.get(), markAsManualConnectOnFailure); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn abort_authentication(&self, markAsManual: bool) -> Result<()> { + }} + #[inline] pub fn abort_authentication(&self, markAsManual: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AbortAuthentication)(self as *const _ as *mut _, markAsManual); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn skip_authentication(&self) -> Result<()> { + }} + #[inline] pub fn skip_authentication(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SkipAuthentication)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn trigger_attention_required(&self, packageRelativeApplicationId: &HStringArg, applicationParameters: &HStringArg) -> Result<()> { + }} + #[inline] pub fn trigger_attention_required(&self, packageRelativeApplicationId: &HStringArg, applicationParameters: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).TriggerAttentionRequired)(self as *const _ as *mut _, packageRelativeApplicationId.get(), applicationParameters.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class HotspotAuthenticationContext: IHotspotAuthenticationContext} impl RtActivatable for HotspotAuthenticationContext {} impl HotspotAuthenticationContext { - #[inline] pub fn try_get_authentication_context(evenToken: &HStringArg) -> Result<(ComPtr, bool)> { unsafe { + #[inline] pub fn try_get_authentication_context(evenToken: &HStringArg) -> Result<(Option>, bool)> { >::get_activation_factory().try_get_authentication_context(evenToken) - }} + } } DEFINE_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]) [CLSID_HotspotAuthenticationContext]); 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(&self, userName: HSTRING, password: HSTRING, extraParameters: HSTRING, markAsManualConnectOnFailure: bool, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn IssueCredentialsAsync(&self, userName: HSTRING, password: HSTRING, extraParameters: HSTRING, markAsManualConnectOnFailure: bool, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IHotspotAuthenticationContext2 { - #[inline] pub unsafe fn issue_credentials_async(&self, userName: &HStringArg, password: &HStringArg, extraParameters: &HStringArg, markAsManualConnectOnFailure: bool) -> Result>> { + #[inline] pub fn issue_credentials_async(&self, userName: &HStringArg, password: &HStringArg, extraParameters: &HStringArg, markAsManualConnectOnFailure: bool) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).IssueCredentialsAsync)(self as *const _ as *mut _, userName.get(), password.get(), extraParameters.get(), markAsManualConnectOnFailure, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, evenToken: HSTRING, context: *mut *mut HotspotAuthenticationContext, out: *mut bool) -> HRESULT }} impl IHotspotAuthenticationContextStatics { - #[inline] pub unsafe fn try_get_authentication_context(&self, evenToken: &HStringArg) -> Result<(ComPtr, bool)> { + #[inline] pub fn try_get_authentication_context(&self, evenToken: &HStringArg) -> Result<(Option>, bool)> { unsafe { let mut context = null_mut(); let mut out = zeroed(); let hr = ((*self.lpVtbl).TryGetAuthenticationContext)(self as *const _ as *mut _, evenToken.get(), &mut context, &mut out); - if hr == S_OK { Ok((ComPtr::wrap(context), out)) } else { err(hr) } - } + if hr == S_OK { Ok((ComPtr::wrap_optional(context), out)) } else { err(hr) } + }} } 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(&self, out: *mut HSTRING) -> HRESULT }} impl IHotspotAuthenticationEventDetails { - #[inline] pub unsafe fn get_event_token(&self) -> Result { + #[inline] pub fn get_event_token(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EventToken)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class HotspotAuthenticationEventDetails: IHotspotAuthenticationEventDetails} RT_ENUM! { enum HotspotAuthenticationResponseCode: i32 { @@ -261,206 +261,206 @@ DEFINE_IID!(IID_IHotspotCredentialsAuthenticationResult, 3881224081, 4101, 19941 RT_INTERFACE!{interface IHotspotCredentialsAuthenticationResult(IHotspotCredentialsAuthenticationResultVtbl): IInspectable(IInspectableVtbl) [IID_IHotspotCredentialsAuthenticationResult] { fn get_HasNetworkErrorOccurred(&self, out: *mut bool) -> HRESULT, fn get_ResponseCode(&self, out: *mut HotspotAuthenticationResponseCode) -> HRESULT, - fn get_LogoffUrl(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn get_LogoffUrl(&self, out: *mut *mut foundation::Uri) -> HRESULT, #[cfg(feature="windows-data")] fn get_AuthenticationReplyXml(&self, out: *mut *mut super::super::data::xml::dom::XmlDocument) -> HRESULT }} impl IHotspotCredentialsAuthenticationResult { - #[inline] pub unsafe fn get_has_network_error_occurred(&self) -> Result { + #[inline] pub fn get_has_network_error_occurred(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasNetworkErrorOccurred)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_response_code(&self) -> Result { + }} + #[inline] pub fn get_response_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ResponseCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_logoff_url(&self) -> Result> { + }} + #[inline] pub fn get_logoff_url(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LogoffUrl)(self as *const _ as *mut _, &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(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-data")] #[inline] pub fn get_authentication_reply_xml(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AuthenticationReplyXml)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class HotspotCredentialsAuthenticationResult: IHotspotCredentialsAuthenticationResult} RT_CLASS!{static class KnownCSimFilePaths} impl RtActivatable for KnownCSimFilePaths {} impl KnownCSimFilePaths { - #[inline] pub fn get_efspn() -> Result>> { unsafe { + #[inline] pub fn get_efspn() -> Result>>> { >::get_activation_factory().get_efspn() - }} - #[inline] pub fn get_gid1() -> Result>> { unsafe { + } + #[inline] pub fn get_gid1() -> Result>>> { >::get_activation_factory().get_gid1() - }} - #[inline] pub fn get_gid2() -> Result>> { unsafe { + } + #[inline] pub fn get_gid2() -> Result>>> { >::get_activation_factory().get_gid2() - }} + } } DEFINE_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]) [CLSID_KnownCSimFilePaths]); 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_Gid1(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_Gid2(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_EFSpn(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_Gid1(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_Gid2(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IKnownCSimFilePathsStatics { - #[inline] pub unsafe fn get_efspn(&self) -> Result>> { + #[inline] pub fn get_efspn(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EFSpn)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_gid1(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_gid1(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Gid1)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_gid2(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_gid2(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Gid2)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{static class KnownRuimFilePaths} impl RtActivatable for KnownRuimFilePaths {} impl KnownRuimFilePaths { - #[inline] pub fn get_efspn() -> Result>> { unsafe { + #[inline] pub fn get_efspn() -> Result>>> { >::get_activation_factory().get_efspn() - }} - #[inline] pub fn get_gid1() -> Result>> { unsafe { + } + #[inline] pub fn get_gid1() -> Result>>> { >::get_activation_factory().get_gid1() - }} - #[inline] pub fn get_gid2() -> Result>> { unsafe { + } + #[inline] pub fn get_gid2() -> Result>>> { >::get_activation_factory().get_gid2() - }} + } } DEFINE_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]) [CLSID_KnownRuimFilePaths]); 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_Gid1(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_Gid2(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_EFSpn(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_Gid1(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_Gid2(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IKnownRuimFilePathsStatics { - #[inline] pub unsafe fn get_efspn(&self) -> Result>> { + #[inline] pub fn get_efspn(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EFSpn)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_gid1(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_gid1(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Gid1)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_gid2(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_gid2(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Gid2)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{static class KnownSimFilePaths} impl RtActivatable for KnownSimFilePaths {} impl KnownSimFilePaths { - #[inline] pub fn get_efons() -> Result>> { unsafe { + #[inline] pub fn get_efons() -> Result>>> { >::get_activation_factory().get_efons() - }} - #[inline] pub fn get_efspn() -> Result>> { unsafe { + } + #[inline] pub fn get_efspn() -> Result>>> { >::get_activation_factory().get_efspn() - }} - #[inline] pub fn get_gid1() -> Result>> { unsafe { + } + #[inline] pub fn get_gid1() -> Result>>> { >::get_activation_factory().get_gid1() - }} - #[inline] pub fn get_gid2() -> Result>> { unsafe { + } + #[inline] pub fn get_gid2() -> Result>>> { >::get_activation_factory().get_gid2() - }} + } } DEFINE_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]) [CLSID_KnownSimFilePaths]); 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_EFSpn(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_Gid1(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_Gid2(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_EFOns(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_EFSpn(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_Gid1(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_Gid2(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IKnownSimFilePathsStatics { - #[inline] pub unsafe fn get_efons(&self) -> Result>> { + #[inline] pub fn get_efons(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EFOns)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_efspn(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_efspn(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EFSpn)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_gid1(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_gid1(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Gid1)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_gid2(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_gid2(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Gid2)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{static class KnownUSimFilePaths} impl RtActivatable for KnownUSimFilePaths {} impl KnownUSimFilePaths { - #[inline] pub fn get_efspn() -> Result>> { unsafe { + #[inline] pub fn get_efspn() -> Result>>> { >::get_activation_factory().get_efspn() - }} - #[inline] pub fn get_efopl() -> Result>> { unsafe { + } + #[inline] pub fn get_efopl() -> Result>>> { >::get_activation_factory().get_efopl() - }} - #[inline] pub fn get_efpnn() -> Result>> { unsafe { + } + #[inline] pub fn get_efpnn() -> Result>>> { >::get_activation_factory().get_efpnn() - }} - #[inline] pub fn get_gid1() -> Result>> { unsafe { + } + #[inline] pub fn get_gid1() -> Result>>> { >::get_activation_factory().get_gid1() - }} - #[inline] pub fn get_gid2() -> Result>> { unsafe { + } + #[inline] pub fn get_gid2() -> Result>>> { >::get_activation_factory().get_gid2() - }} + } } DEFINE_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]) [CLSID_KnownUSimFilePaths]); 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_EFOpl(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_EFPnn(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_Gid1(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_Gid2(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_EFSpn(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_EFOpl(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_EFPnn(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_Gid1(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_Gid2(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IKnownUSimFilePathsStatics { - #[inline] pub unsafe fn get_efspn(&self) -> Result>> { + #[inline] pub fn get_efspn(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EFSpn)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_efopl(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_efopl(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EFOpl)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_efpnn(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_efpnn(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EFPnn)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_gid1(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_gid1(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Gid1)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_gid2(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_gid2(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Gid2)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IMobileBroadbandAccount, 918703309, 52962, 17376, 166, 3, 238, 134, 163, 109, 101, 112); RT_INTERFACE!{interface IMobileBroadbandAccount(IMobileBroadbandAccountVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandAccount] { @@ -471,93 +471,93 @@ RT_INTERFACE!{interface IMobileBroadbandAccount(IMobileBroadbandAccountVtbl): II fn get_CurrentDeviceInformation(&self, out: *mut *mut MobileBroadbandDeviceInformation) -> HRESULT }} impl IMobileBroadbandAccount { - #[inline] pub unsafe fn get_network_account_id(&self) -> Result { + #[inline] pub fn get_network_account_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NetworkAccountId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_provider_guid(&self) -> Result { + }} + #[inline] pub fn get_service_provider_guid(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ServiceProviderGuid)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_provider_name(&self) -> Result { + }} + #[inline] pub fn get_service_provider_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServiceProviderName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_network(&self) -> Result> { + }} + #[inline] pub fn get_current_network(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CurrentNetwork)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_device_information(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_current_device_information(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CurrentDeviceInformation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MobileBroadbandAccount: IMobileBroadbandAccount} impl RtActivatable for MobileBroadbandAccount {} impl MobileBroadbandAccount { - #[inline] pub fn get_available_network_account_ids() -> Result>> { unsafe { + #[inline] pub fn get_available_network_account_ids() -> Result>>> { >::get_activation_factory().get_available_network_account_ids() - }} - #[inline] pub fn create_from_network_account_id(networkAccountId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_from_network_account_id(networkAccountId: &HStringArg) -> Result>> { >::get_activation_factory().create_from_network_account_id(networkAccountId) - }} + } } DEFINE_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]) [CLSID_MobileBroadbandAccount]); 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn GetConnectionProfiles(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IMobileBroadbandAccount2 { - #[inline] pub unsafe fn get_connection_profiles(&self) -> Result>> { + #[inline] pub fn get_connection_profiles(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetConnectionProfiles)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IMobileBroadbandAccount3, 153755169, 37753, 19355, 173, 49, 213, 254, 226, 247, 72, 198); RT_INTERFACE!{interface IMobileBroadbandAccount3(IMobileBroadbandAccount3Vtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandAccount3] { - fn get_AccountExperienceUrl(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT + fn get_AccountExperienceUrl(&self, out: *mut *mut foundation::Uri) -> HRESULT }} impl IMobileBroadbandAccount3 { - #[inline] pub unsafe fn get_account_experience_url(&self) -> Result> { + #[inline] pub fn get_account_experience_url(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AccountExperienceUrl)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut HSTRING) -> HRESULT }} impl IMobileBroadbandAccountEventArgs { - #[inline] pub unsafe fn get_network_account_id(&self) -> Result { + #[inline] pub fn get_network_account_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NetworkAccountId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class MobileBroadbandAccountEventArgs: IMobileBroadbandAccountEventArgs} 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_AvailableNetworkAccountIds(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn CreateFromNetworkAccountId(&self, networkAccountId: HSTRING, out: *mut *mut MobileBroadbandAccount) -> HRESULT }} impl IMobileBroadbandAccountStatics { - #[inline] pub unsafe fn get_available_network_account_ids(&self) -> Result>> { + #[inline] pub fn get_available_network_account_ids(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AvailableNetworkAccountIds)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_from_network_account_id(&self, networkAccountId: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_from_network_account_id(&self, networkAccountId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromNetworkAccountId)(self as *const _ as *mut _, networkAccountId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IMobileBroadbandAccountUpdatedEventArgs, 2076384648, 42685, 18913, 128, 171, 107, 145, 53, 74, 87, 212); RT_INTERFACE!{interface IMobileBroadbandAccountUpdatedEventArgs(IMobileBroadbandAccountUpdatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandAccountUpdatedEventArgs] { @@ -566,98 +566,98 @@ RT_INTERFACE!{interface IMobileBroadbandAccountUpdatedEventArgs(IMobileBroadband fn get_HasNetworkChanged(&self, out: *mut bool) -> HRESULT }} impl IMobileBroadbandAccountUpdatedEventArgs { - #[inline] pub unsafe fn get_network_account_id(&self) -> Result { + #[inline] pub fn get_network_account_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NetworkAccountId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_device_information_changed(&self) -> Result { + }} + #[inline] pub fn get_has_device_information_changed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasDeviceInformationChanged)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_network_changed(&self) -> Result { + }} + #[inline] pub fn get_has_network_changed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasNetworkChanged)(self as *const _ as *mut _, &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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AccountAdded(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_AccountUpdated(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AccountUpdated(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_AccountRemoved(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AccountRemoved(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_EnumerationCompleted(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_EnumerationCompleted(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Stopped(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Stopped(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_AccountAdded(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AccountAdded(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_AccountUpdated(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AccountUpdated(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_AccountRemoved(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AccountRemoved(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_EnumerationCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnumerationCompleted(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_Stopped(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Stopped(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, fn get_Status(&self, out: *mut MobileBroadbandAccountWatcherStatus) -> HRESULT, fn Start(&self) -> HRESULT, fn Stop(&self) -> HRESULT }} impl IMobileBroadbandAccountWatcher { - #[inline] pub unsafe fn add_account_added(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_account_added(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AccountAdded)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_account_added(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_account_added(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AccountAdded)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_account_updated(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_account_updated(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AccountUpdated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_account_updated(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_account_updated(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AccountUpdated)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_account_removed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_account_removed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AccountRemoved)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_account_removed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_account_removed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AccountRemoved)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_enumeration_completed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_enumeration_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_EnumerationCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_enumeration_completed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_enumeration_completed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_EnumerationCompleted)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_stopped(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_stopped(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Stopped)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_stopped(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_stopped(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Stopped)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MobileBroadbandAccountWatcher: IMobileBroadbandAccountWatcher} impl RtActivatable for MobileBroadbandAccountWatcher {} @@ -671,346 +671,346 @@ RT_INTERFACE!{interface IMobileBroadbandAntennaSar(IMobileBroadbandAntennaSarVtb fn get_SarBackoffIndex(&self, out: *mut i32) -> HRESULT }} impl IMobileBroadbandAntennaSar { - #[inline] pub unsafe fn get_antenna_index(&self) -> Result { + #[inline] pub fn get_antenna_index(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AntennaIndex)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sar_backoff_index(&self) -> Result { + }} + #[inline] pub fn get_sar_backoff_index(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SarBackoffIndex)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MobileBroadbandAntennaSar: IMobileBroadbandAntennaSar} DEFINE_IID!(IID_IMobileBroadbandCellCdma, 100774836, 16666, 20270, 130, 135, 118, 245, 101, 12, 96, 205); RT_INTERFACE!{interface IMobileBroadbandCellCdma(IMobileBroadbandCellCdmaVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandCellCdma] { - fn get_BaseStationId(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_BaseStationPNCode(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_BaseStationLatitude(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_BaseStationLongitude(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_BaseStationLastBroadcastGpsTime(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_NetworkId(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_PilotSignalStrengthInDB(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_SystemId(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn get_BaseStationId(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_BaseStationPNCode(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_BaseStationLatitude(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_BaseStationLongitude(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_BaseStationLastBroadcastGpsTime(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_NetworkId(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_PilotSignalStrengthInDB(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_SystemId(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IMobileBroadbandCellCdma { - #[inline] pub unsafe fn get_base_station_id(&self) -> Result>> { + #[inline] pub fn get_base_station_id(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BaseStationId)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_base_station_pncode(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_base_station_pncode(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BaseStationPNCode)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_base_station_latitude(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_base_station_latitude(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BaseStationLatitude)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_base_station_longitude(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_base_station_longitude(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BaseStationLongitude)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_base_station_last_broadcast_gps_time(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_base_station_last_broadcast_gps_time(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BaseStationLastBroadcastGpsTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_network_id(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_network_id(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NetworkId)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pilot_signal_strength_in_db(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_pilot_signal_strength_in_db(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PilotSignalStrengthInDB)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_system_id(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_system_id(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SystemId)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MobileBroadbandCellCdma: IMobileBroadbandCellCdma} DEFINE_IID!(IID_IMobileBroadbandCellGsm, 3432087302, 32480, 18360, 158, 31, 195, 180, 141, 249, 223, 91); RT_INTERFACE!{interface IMobileBroadbandCellGsm(IMobileBroadbandCellGsmVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandCellGsm] { - fn get_BaseStationId(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_CellId(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_ChannelNumber(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_LocationAreaCode(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_BaseStationId(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_CellId(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_ChannelNumber(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_LocationAreaCode(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn get_ProviderId(&self, out: *mut HSTRING) -> HRESULT, - fn get_ReceivedSignalStrengthInDBm(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_TimingAdvanceInBitPeriods(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn get_ReceivedSignalStrengthInDBm(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_TimingAdvanceInBitPeriods(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IMobileBroadbandCellGsm { - #[inline] pub unsafe fn get_base_station_id(&self) -> Result>> { + #[inline] pub fn get_base_station_id(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BaseStationId)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_cell_id(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_cell_id(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CellId)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_channel_number(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_channel_number(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ChannelNumber)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_location_area_code(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_location_area_code(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LocationAreaCode)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_provider_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_provider_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProviderId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_received_signal_strength_in_dbm(&self) -> Result>> { + }} + #[inline] pub fn get_received_signal_strength_in_dbm(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ReceivedSignalStrengthInDBm)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_timing_advance_in_bit_periods(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_timing_advance_in_bit_periods(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TimingAdvanceInBitPeriods)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MobileBroadbandCellGsm: IMobileBroadbandCellGsm} DEFINE_IID!(IID_IMobileBroadbandCellLte, 2442643579, 11128, 17773, 139, 83, 170, 162, 93, 10, 247, 65); RT_INTERFACE!{interface IMobileBroadbandCellLte(IMobileBroadbandCellLteVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandCellLte] { - fn get_CellId(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_ChannelNumber(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_PhysicalCellId(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_CellId(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_ChannelNumber(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_PhysicalCellId(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn get_ProviderId(&self, out: *mut HSTRING) -> HRESULT, - fn get_ReferenceSignalReceivedPowerInDBm(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_ReferenceSignalReceivedQualityInDBm(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_TimingAdvanceInBitPeriods(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_TrackingAreaCode(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn get_ReferenceSignalReceivedPowerInDBm(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_ReferenceSignalReceivedQualityInDBm(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_TimingAdvanceInBitPeriods(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_TrackingAreaCode(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IMobileBroadbandCellLte { - #[inline] pub unsafe fn get_cell_id(&self) -> Result>> { + #[inline] pub fn get_cell_id(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CellId)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_channel_number(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_channel_number(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ChannelNumber)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_physical_cell_id(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_physical_cell_id(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PhysicalCellId)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_provider_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_provider_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProviderId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_reference_signal_received_power_in_dbm(&self) -> Result>> { + }} + #[inline] pub fn get_reference_signal_received_power_in_dbm(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ReferenceSignalReceivedPowerInDBm)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_reference_signal_received_quality_in_dbm(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_reference_signal_received_quality_in_dbm(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ReferenceSignalReceivedQualityInDBm)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_timing_advance_in_bit_periods(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_timing_advance_in_bit_periods(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TimingAdvanceInBitPeriods)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_tracking_area_code(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_tracking_area_code(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TrackingAreaCode)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MobileBroadbandCellLte: IMobileBroadbandCellLte} DEFINE_IID!(IID_IMobileBroadbandCellsInfo, 2309576234, 58482, 19877, 146, 156, 222, 97, 113, 29, 210, 97); RT_INTERFACE!{interface IMobileBroadbandCellsInfo(IMobileBroadbandCellsInfoVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandCellsInfo] { - fn get_NeighboringCellsCdma(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_NeighboringCellsGsm(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_NeighboringCellsLte(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_NeighboringCellsTdscdma(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_NeighboringCellsUmts(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_ServingCellsCdma(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_ServingCellsGsm(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_ServingCellsLte(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_ServingCellsTdscdma(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_ServingCellsUmts(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_NeighboringCellsCdma(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_NeighboringCellsGsm(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_NeighboringCellsLte(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_NeighboringCellsTdscdma(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_NeighboringCellsUmts(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_ServingCellsCdma(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_ServingCellsGsm(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_ServingCellsLte(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_ServingCellsTdscdma(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_ServingCellsUmts(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IMobileBroadbandCellsInfo { - #[inline] pub unsafe fn get_neighboring_cells_cdma(&self) -> Result>> { + #[inline] pub fn get_neighboring_cells_cdma(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NeighboringCellsCdma)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_neighboring_cells_gsm(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_neighboring_cells_gsm(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NeighboringCellsGsm)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_neighboring_cells_lte(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_neighboring_cells_lte(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NeighboringCellsLte)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_neighboring_cells_tdscdma(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_neighboring_cells_tdscdma(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NeighboringCellsTdscdma)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_neighboring_cells_umts(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_neighboring_cells_umts(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NeighboringCellsUmts)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_serving_cells_cdma(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_serving_cells_cdma(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServingCellsCdma)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_serving_cells_gsm(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_serving_cells_gsm(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServingCellsGsm)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_serving_cells_lte(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_serving_cells_lte(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServingCellsLte)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_serving_cells_tdscdma(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_serving_cells_tdscdma(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServingCellsTdscdma)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_serving_cells_umts(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_serving_cells_umts(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServingCellsUmts)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MobileBroadbandCellsInfo: IMobileBroadbandCellsInfo} DEFINE_IID!(IID_IMobileBroadbandCellTdscdma, 249173589, 56078, 16770, 140, 218, 204, 65, 154, 123, 222, 8); RT_INTERFACE!{interface IMobileBroadbandCellTdscdma(IMobileBroadbandCellTdscdmaVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandCellTdscdma] { - fn get_CellId(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_CellParameterId(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_ChannelNumber(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_LocationAreaCode(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_PathLossInDB(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_CellId(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_CellParameterId(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_ChannelNumber(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_LocationAreaCode(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_PathLossInDB(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn get_ProviderId(&self, out: *mut HSTRING) -> HRESULT, - fn get_ReceivedSignalCodePowerInDBm(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_TimingAdvanceInBitPeriods(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn get_ReceivedSignalCodePowerInDBm(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_TimingAdvanceInBitPeriods(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IMobileBroadbandCellTdscdma { - #[inline] pub unsafe fn get_cell_id(&self) -> Result>> { + #[inline] pub fn get_cell_id(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CellId)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_cell_parameter_id(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_cell_parameter_id(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CellParameterId)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_channel_number(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_channel_number(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ChannelNumber)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_location_area_code(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_location_area_code(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LocationAreaCode)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_path_loss_in_db(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_path_loss_in_db(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PathLossInDB)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_provider_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_provider_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProviderId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_received_signal_code_power_in_dbm(&self) -> Result>> { + }} + #[inline] pub fn get_received_signal_code_power_in_dbm(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ReceivedSignalCodePowerInDBm)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_timing_advance_in_bit_periods(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_timing_advance_in_bit_periods(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TimingAdvanceInBitPeriods)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MobileBroadbandCellTdscdma: IMobileBroadbandCellTdscdma} DEFINE_IID!(IID_IMobileBroadbandCellUmts, 2008331694, 18888, 20245, 178, 133, 76, 38, 167, 246, 114, 21); RT_INTERFACE!{interface IMobileBroadbandCellUmts(IMobileBroadbandCellUmtsVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandCellUmts] { - fn get_CellId(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_ChannelNumber(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_LocationAreaCode(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_PathLossInDB(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_PrimaryScramblingCode(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_CellId(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_ChannelNumber(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_LocationAreaCode(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_PathLossInDB(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_PrimaryScramblingCode(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn get_ProviderId(&self, out: *mut HSTRING) -> HRESULT, - fn get_ReceivedSignalCodePowerInDBm(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_SignalToNoiseRatioInDB(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn get_ReceivedSignalCodePowerInDBm(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_SignalToNoiseRatioInDB(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IMobileBroadbandCellUmts { - #[inline] pub unsafe fn get_cell_id(&self) -> Result>> { + #[inline] pub fn get_cell_id(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CellId)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_channel_number(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_channel_number(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ChannelNumber)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_location_area_code(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_location_area_code(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LocationAreaCode)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_path_loss_in_db(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_path_loss_in_db(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PathLossInDB)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_primary_scrambling_code(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_primary_scrambling_code(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PrimaryScramblingCode)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_provider_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_provider_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProviderId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_received_signal_code_power_in_dbm(&self) -> Result>> { + }} + #[inline] pub fn get_received_signal_code_power_in_dbm(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ReceivedSignalCodePowerInDBm)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_signal_to_noise_ratio_in_db(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_signal_to_noise_ratio_in_db(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SignalToNoiseRatioInDB)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MobileBroadbandCellUmts: IMobileBroadbandCellUmts} DEFINE_IID!(IID_IMobileBroadbandDeviceInformation, 3872424296, 58241, 19566, 155, 232, 254, 21, 105, 105, 164, 70); @@ -1024,7 +1024,7 @@ RT_INTERFACE!{interface IMobileBroadbandDeviceInformation(IMobileBroadbandDevice fn get_DataClasses(&self, out: *mut DataClasses) -> HRESULT, fn get_CustomDataClass(&self, out: *mut HSTRING) -> HRESULT, fn get_MobileEquipmentId(&self, out: *mut HSTRING) -> HRESULT, - fn get_TelephoneNumbers(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_TelephoneNumbers(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_SubscriberId(&self, out: *mut HSTRING) -> HRESULT, fn get_SimIccId(&self, out: *mut HSTRING) -> HRESULT, fn get_DeviceType(&self, out: *mut MobileBroadbandDeviceType) -> HRESULT, @@ -1032,76 +1032,76 @@ RT_INTERFACE!{interface IMobileBroadbandDeviceInformation(IMobileBroadbandDevice fn get_CurrentRadioState(&self, out: *mut MobileBroadbandRadioState) -> HRESULT }} impl IMobileBroadbandDeviceInformation { - #[inline] pub unsafe fn get_network_device_status(&self) -> Result { + #[inline] pub fn get_network_device_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NetworkDeviceStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_manufacturer(&self) -> Result { + }} + #[inline] pub fn get_manufacturer(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Manufacturer)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_model(&self) -> Result { + }} + #[inline] pub fn get_model(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Model)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_firmware_information(&self) -> Result { + }} + #[inline] pub fn get_firmware_information(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FirmwareInformation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_cellular_class(&self) -> Result { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_cellular_class(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CellularClass)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_data_classes(&self) -> Result { + }} + #[inline] pub fn get_data_classes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DataClasses)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_custom_data_class(&self) -> Result { + }} + #[inline] pub fn get_custom_data_class(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CustomDataClass)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mobile_equipment_id(&self) -> Result { + }} + #[inline] pub fn get_mobile_equipment_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MobileEquipmentId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_telephone_numbers(&self) -> Result>> { + }} + #[inline] pub fn get_telephone_numbers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TelephoneNumbers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_subscriber_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_subscriber_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SubscriberId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sim_icc_id(&self) -> Result { + }} + #[inline] pub fn get_sim_icc_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SimIccId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_type(&self) -> Result { + }} + #[inline] pub fn get_device_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DeviceType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_id(&self) -> Result { + }} + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_radio_state(&self) -> Result { + }} + #[inline] pub fn get_current_radio_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CurrentRadioState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MobileBroadbandDeviceInformation: IMobileBroadbandDeviceInformation} DEFINE_IID!(IID_IMobileBroadbandDeviceInformation2, 776370929, 63794, 18231, 167, 34, 3, 186, 114, 55, 12, 184); @@ -1111,21 +1111,21 @@ RT_INTERFACE!{interface IMobileBroadbandDeviceInformation2(IMobileBroadbandDevic fn get_SerialNumber(&self, out: *mut HSTRING) -> HRESULT }} impl IMobileBroadbandDeviceInformation2 { - #[inline] pub unsafe fn get_pin_manager(&self) -> Result> { + #[inline] pub fn get_pin_manager(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PinManager)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_revision(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_revision(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Revision)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_serial_number(&self) -> Result { + }} + #[inline] pub fn get_serial_number(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SerialNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMobileBroadbandDeviceInformation3, 3767252157, 23856, 19290, 146, 204, 213, 77, 248, 129, 212, 158); RT_INTERFACE!{interface IMobileBroadbandDeviceInformation3(IMobileBroadbandDeviceInformation3Vtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandDeviceInformation3] { @@ -1134,50 +1134,50 @@ RT_INTERFACE!{interface IMobileBroadbandDeviceInformation3(IMobileBroadbandDevic fn get_SimGid1(&self, out: *mut HSTRING) -> HRESULT }} impl IMobileBroadbandDeviceInformation3 { - #[inline] pub unsafe fn get_sim_spn(&self) -> Result { + #[inline] pub fn get_sim_spn(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SimSpn)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sim_pnn(&self) -> Result { + }} + #[inline] pub fn get_sim_pnn(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SimPnn)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sim_gid1(&self) -> Result { + }} + #[inline] pub fn get_sim_gid1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SimGid1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(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(&self, out: *mut Guid) -> HRESULT, - fn get_SupportedCommands(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedCommands(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn OpenDataSession(&self, out: *mut *mut MobileBroadbandDeviceServiceDataSession) -> HRESULT, fn OpenCommandSession(&self, out: *mut *mut MobileBroadbandDeviceServiceCommandSession) -> HRESULT }} impl IMobileBroadbandDeviceService { - #[inline] pub unsafe fn get_device_service_id(&self) -> Result { + #[inline] pub fn get_device_service_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DeviceServiceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_commands(&self) -> Result>> { + }} + #[inline] pub fn get_supported_commands(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedCommands)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn open_data_session(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn open_data_session(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenDataSession)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn open_command_session(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn open_command_session(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenCommandSession)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MobileBroadbandDeviceService: IMobileBroadbandDeviceService} DEFINE_IID!(IID_IMobileBroadbandDeviceServiceCommandResult, 2968808123, 38102, 17593, 165, 56, 240, 129, 11, 100, 83, 137); @@ -1186,41 +1186,41 @@ RT_INTERFACE!{interface IMobileBroadbandDeviceServiceCommandResult(IMobileBroadb #[cfg(feature="windows-storage")] fn get_ResponseData(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT }} impl IMobileBroadbandDeviceServiceCommandResult { - #[inline] pub unsafe fn get_status_code(&self) -> Result { + #[inline] pub fn get_status_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StatusCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_response_data(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_response_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResponseData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self) -> (), - #[cfg(feature="windows-storage")] fn SendQueryCommandAsync(&self, commandId: u32, data: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn SendQueryCommandAsync(&self, commandId: u32, data: *mut super::super::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-storage")] fn SendSetCommandAsync(&self, commandId: u32, data: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn SendSetCommandAsync(&self, commandId: u32, data: *mut super::super::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn CloseSession(&self) -> HRESULT }} impl IMobileBroadbandDeviceServiceCommandSession { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn send_query_command_async(&self, commandId: u32, data: &super::super::storage::streams::IBuffer) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn send_query_command_async(&self, commandId: u32, data: &super::super::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SendQueryCommandAsync)(self as *const _ as *mut _, 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(&self, commandId: u32, data: &super::super::storage::streams::IBuffer) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn send_set_command_async(&self, commandId: u32, data: &super::super::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SendSetCommandAsync)(self as *const _ as *mut _, 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(&self) -> Result<()> { + }} + #[inline] pub fn close_session(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).CloseSession)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MobileBroadbandDeviceServiceCommandSession: IMobileBroadbandDeviceServiceCommandSession} DEFINE_IID!(IID_IMobileBroadbandDeviceServiceDataReceivedEventArgs, 3064599518, 4992, 16611, 134, 24, 115, 203, 202, 72, 19, 140); @@ -1228,40 +1228,40 @@ RT_INTERFACE!{interface IMobileBroadbandDeviceServiceDataReceivedEventArgs(IMobi #[cfg(feature="windows-storage")] fn get_ReceivedData(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT }} impl IMobileBroadbandDeviceServiceDataReceivedEventArgs { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_received_data(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_received_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ReceivedData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self) -> (), - #[cfg(feature="windows-storage")] fn WriteDataAsync(&self, value: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + #[cfg(feature="windows-storage")] fn WriteDataAsync(&self, value: *mut super::super::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn CloseSession(&self) -> HRESULT, - fn add_DataReceived(&self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DataReceived(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_DataReceived(&self, eventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DataReceived(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT }} impl IMobileBroadbandDeviceServiceDataSession { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn write_data_async(&self, value: &super::super::storage::streams::IBuffer) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn write_data_async(&self, value: &super::super::storage::streams::IBuffer) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).WriteDataAsync)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn close_session(&self) -> Result<()> { + }} + #[inline] pub fn close_session(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).CloseSession)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_data_received(&self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_data_received(&self, eventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DataReceived)(self as *const _ as *mut _, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_data_received(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_data_received(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DataReceived)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MobileBroadbandDeviceServiceDataSession: IMobileBroadbandDeviceServiceDataSession} DEFINE_IID!(IID_IMobileBroadbandDeviceServiceInformation, 1406573403, 50413, 17904, 128, 58, 217, 65, 122, 109, 152, 70); @@ -1271,21 +1271,21 @@ RT_INTERFACE!{interface IMobileBroadbandDeviceServiceInformation(IMobileBroadban fn get_IsDataWriteSupported(&self, out: *mut bool) -> HRESULT }} impl IMobileBroadbandDeviceServiceInformation { - #[inline] pub unsafe fn get_device_service_id(&self) -> Result { + #[inline] pub fn get_device_service_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DeviceServiceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_data_read_supported(&self) -> Result { + }} + #[inline] pub fn get_is_data_read_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDataReadSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_data_write_supported(&self) -> Result { + }} + #[inline] pub fn get_is_data_write_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDataWriteSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MobileBroadbandDeviceServiceInformation: IMobileBroadbandDeviceServiceInformation} DEFINE_IID!(IID_IMobileBroadbandDeviceServiceTriggerDetails, 1241865072, 47534, 17496, 146, 65, 166, 165, 251, 241, 138, 12); @@ -1295,21 +1295,21 @@ RT_INTERFACE!{interface IMobileBroadbandDeviceServiceTriggerDetails(IMobileBroad #[cfg(feature="windows-storage")] fn get_ReceivedData(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT }} impl IMobileBroadbandDeviceServiceTriggerDetails { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_service_id(&self) -> Result { + }} + #[inline] pub fn get_device_service_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DeviceServiceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_received_data(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_received_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ReceivedData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MobileBroadbandDeviceServiceTriggerDetails: IMobileBroadbandDeviceServiceTriggerDetails} RT_ENUM! { enum MobileBroadbandDeviceType: i32 { @@ -1321,95 +1321,95 @@ RT_INTERFACE!{interface IMobileBroadbandModem(IMobileBroadbandModemVtbl): IInspe fn get_DeviceInformation(&self, out: *mut *mut MobileBroadbandDeviceInformation) -> HRESULT, fn get_MaxDeviceServiceCommandSizeInBytes(&self, out: *mut u32) -> HRESULT, fn get_MaxDeviceServiceDataSizeInBytes(&self, out: *mut u32) -> HRESULT, - fn get_DeviceServices(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_DeviceServices(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn GetDeviceService(&self, deviceServiceId: Guid, out: *mut *mut MobileBroadbandDeviceService) -> HRESULT, fn get_IsResetSupported(&self, out: *mut bool) -> HRESULT, - fn ResetAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn GetCurrentConfigurationAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ResetAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn GetCurrentConfigurationAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn get_CurrentNetwork(&self, out: *mut *mut MobileBroadbandNetwork) -> HRESULT }} impl IMobileBroadbandModem { - #[inline] pub unsafe fn get_current_account(&self) -> Result> { + #[inline] pub fn get_current_account(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CurrentAccount)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_information(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_device_information(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceInformation)(self as *const _ as *mut _, &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(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_max_device_service_command_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxDeviceServiceCommandSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_device_service_data_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_max_device_service_data_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxDeviceServiceDataSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_services(&self) -> Result>> { + }} + #[inline] pub fn get_device_services(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceServices)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_service(&self, deviceServiceId: Guid) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_device_service(&self, deviceServiceId: Guid) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceService)(self as *const _ as *mut _, deviceServiceId, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_reset_supported(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_reset_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsResetSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn reset_async(&self) -> Result> { + }} + #[inline] pub fn reset_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ResetAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_configuration_async(&self) -> Result>> { + }} + #[inline] pub fn get_current_configuration_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentConfigurationAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_network(&self) -> Result> { + }} + #[inline] pub fn get_current_network(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CurrentNetwork)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MobileBroadbandModem: IMobileBroadbandModem} impl RtActivatable for MobileBroadbandModem {} impl MobileBroadbandModem { - #[inline] pub fn get_device_selector() -> Result { unsafe { + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} - #[inline] pub fn from_id(deviceId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn from_id(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id(deviceId) - }} - #[inline] pub fn get_default() -> Result> { unsafe { + } + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} + } } DEFINE_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]) [CLSID_MobileBroadbandModem]); DEFINE_IID!(IID_IMobileBroadbandModem2, 310782760, 47595, 20194, 187, 227, 113, 31, 83, 238, 163, 115); RT_INTERFACE!{interface IMobileBroadbandModem2(IMobileBroadbandModem2Vtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandModem2] { - fn GetIsPassthroughEnabledAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn SetIsPassthroughEnabledAsync(&self, value: bool, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetIsPassthroughEnabledAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn SetIsPassthroughEnabledAsync(&self, value: bool, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IMobileBroadbandModem2 { - #[inline] pub unsafe fn get_is_passthrough_enabled_async(&self) -> Result>> { + #[inline] pub fn get_is_passthrough_enabled_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetIsPassthroughEnabledAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_passthrough_enabled_async(&self, value: bool) -> Result>> { + }} + #[inline] pub fn set_is_passthrough_enabled_async(&self, value: bool) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetIsPassthroughEnabledAsync)(self as *const _ as *mut _, value, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMobileBroadbandModemConfiguration, 4242552227, 54989, 17184, 185, 130, 190, 157, 62, 199, 137, 15); RT_INTERFACE!{interface IMobileBroadbandModemConfiguration(IMobileBroadbandModemConfigurationVtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandModemConfiguration] { @@ -1418,21 +1418,21 @@ RT_INTERFACE!{interface IMobileBroadbandModemConfiguration(IMobileBroadbandModem fn get_HomeProviderName(&self, out: *mut HSTRING) -> HRESULT }} impl IMobileBroadbandModemConfiguration { - #[inline] pub unsafe fn get_uicc(&self) -> Result> { + #[inline] pub fn get_uicc(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Uicc)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_home_provider_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_home_provider_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HomeProviderId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_home_provider_name(&self) -> Result { + }} + #[inline] pub fn get_home_provider_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HomeProviderName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class MobileBroadbandModemConfiguration: IMobileBroadbandModemConfiguration} DEFINE_IID!(IID_IMobileBroadbandModemConfiguration2, 839906757, 58464, 17070, 170, 81, 105, 98, 30, 122, 68, 119); @@ -1440,11 +1440,11 @@ RT_INTERFACE!{interface IMobileBroadbandModemConfiguration2(IMobileBroadbandMode fn get_SarManager(&self, out: *mut *mut MobileBroadbandSarManager) -> HRESULT }} impl IMobileBroadbandModemConfiguration2 { - #[inline] pub unsafe fn get_sar_manager(&self) -> Result> { + #[inline] pub fn get_sar_manager(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SarManager)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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] { @@ -1453,21 +1453,21 @@ RT_INTERFACE!{static interface IMobileBroadbandModemStatics(IMobileBroadbandMode fn GetDefault(&self, out: *mut *mut MobileBroadbandModem) -> HRESULT }} impl IMobileBroadbandModemStatics { - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id(&self, deviceId: &HStringArg) -> Result> { + }} + #[inline] pub fn from_id(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromId)(self as *const _ as *mut _, deviceId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_default(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum MobileBroadbandModemStatus: i32 { Success (MobileBroadbandModemStatus_Success) = 0, OtherFailure (MobileBroadbandModemStatus_OtherFailure) = 1, Busy (MobileBroadbandModemStatus_Busy) = 2, NoDeviceSupport (MobileBroadbandModemStatus_NoDeviceSupport) = 3, @@ -1486,84 +1486,84 @@ RT_INTERFACE!{interface IMobileBroadbandNetwork(IMobileBroadbandNetworkVtbl): II fn ShowConnectionUI(&self) -> HRESULT }} impl IMobileBroadbandNetwork { - #[inline] pub unsafe fn get_network_adapter(&self) -> Result> { + #[inline] pub fn get_network_adapter(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NetworkAdapter)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_network_registration_state(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_network_registration_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NetworkRegistrationState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_registration_network_error(&self) -> Result { + }} + #[inline] pub fn get_registration_network_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RegistrationNetworkError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_packet_attach_network_error(&self) -> Result { + }} + #[inline] pub fn get_packet_attach_network_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PacketAttachNetworkError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_activation_network_error(&self) -> Result { + }} + #[inline] pub fn get_activation_network_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ActivationNetworkError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_access_point_name(&self) -> Result { + }} + #[inline] pub fn get_access_point_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AccessPointName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_registered_data_class(&self) -> Result { + }} + #[inline] pub fn get_registered_data_class(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RegisteredDataClass)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_registered_provider_id(&self) -> Result { + }} + #[inline] pub fn get_registered_provider_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RegisteredProviderId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_registered_provider_name(&self) -> Result { + }} + #[inline] pub fn get_registered_provider_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RegisteredProviderName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn show_connection_ui(&self) -> Result<()> { + }} + #[inline] pub fn show_connection_ui(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ShowConnectionUI)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MobileBroadbandNetwork: IMobileBroadbandNetwork} 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn get_RegistrationUiccApps(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn GetVoiceCallSupportAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn get_RegistrationUiccApps(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IMobileBroadbandNetwork2 { - #[inline] pub unsafe fn get_voice_call_support_async(&self) -> Result>> { + #[inline] pub fn get_voice_call_support_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetVoiceCallSupportAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_registration_uicc_apps(&self) -> Result>> { + }} + #[inline] pub fn get_registration_uicc_apps(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RegistrationUiccApps)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IMobileBroadbandNetwork3, 862390922, 51183, 17484, 171, 108, 223, 126, 247, 163, 144, 254); RT_INTERFACE!{interface IMobileBroadbandNetwork3(IMobileBroadbandNetwork3Vtbl): IInspectable(IInspectableVtbl) [IID_IMobileBroadbandNetwork3] { - fn GetCellsInfoAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetCellsInfoAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IMobileBroadbandNetwork3 { - #[inline] pub unsafe fn get_cells_info_async(&self) -> Result>> { + #[inline] pub fn get_cells_info_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCellsInfoAsync)(self as *const _ as *mut _, &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] { @@ -1571,28 +1571,28 @@ RT_INTERFACE!{interface IMobileBroadbandNetworkRegistrationStateChange(IMobileBr fn get_Network(&self, out: *mut *mut MobileBroadbandNetwork) -> HRESULT }} impl IMobileBroadbandNetworkRegistrationStateChange { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_network(&self) -> Result> { + }} + #[inline] pub fn get_network(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Network)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_NetworkRegistrationStateChanges(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IMobileBroadbandNetworkRegistrationStateChangeTriggerDetails { - #[inline] pub unsafe fn get_network_registration_state_changes(&self) -> Result>> { + #[inline] pub fn get_network_registration_state_changes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NetworkRegistrationStateChanges)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MobileBroadbandNetworkRegistrationStateChangeTriggerDetails: IMobileBroadbandNetworkRegistrationStateChangeTriggerDetails} DEFINE_IID!(IID_IMobileBroadbandPin, 3865171721, 59257, 17855, 130, 129, 117, 50, 61, 249, 227, 33); @@ -1604,73 +1604,73 @@ RT_INTERFACE!{interface IMobileBroadbandPin(IMobileBroadbandPinVtbl): IInspectab fn get_MaxLength(&self, out: *mut u32) -> HRESULT, fn get_MinLength(&self, out: *mut u32) -> HRESULT, fn get_AttemptsRemaining(&self, out: *mut u32) -> HRESULT, - fn EnableAsync(&self, currentPin: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn DisableAsync(&self, currentPin: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn EnterAsync(&self, currentPin: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn ChangeAsync(&self, currentPin: HSTRING, newPin: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn UnblockAsync(&self, pinUnblockKey: HSTRING, newPin: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn EnableAsync(&self, currentPin: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn DisableAsync(&self, currentPin: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn EnterAsync(&self, currentPin: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ChangeAsync(&self, currentPin: HSTRING, newPin: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn UnblockAsync(&self, pinUnblockKey: HSTRING, newPin: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IMobileBroadbandPin { - #[inline] pub unsafe fn get_type(&self) -> Result { + #[inline] pub fn get_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Type)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_lock_state(&self) -> Result { + }} + #[inline] pub fn get_lock_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LockState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_format(&self) -> Result { + }} + #[inline] pub fn get_format(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Format)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_enabled(&self) -> Result { + }} + #[inline] pub fn get_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Enabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_length(&self) -> Result { + }} + #[inline] pub fn get_max_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxLength)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_length(&self) -> Result { + }} + #[inline] pub fn get_min_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinLength)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_attempts_remaining(&self) -> Result { + }} + #[inline] pub fn get_attempts_remaining(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AttemptsRemaining)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn enable_async(&self, currentPin: &HStringArg) -> Result>> { + }} + #[inline] pub fn enable_async(&self, currentPin: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).EnableAsync)(self as *const _ as *mut _, currentPin.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn disable_async(&self, currentPin: &HStringArg) -> Result>> { + }} + #[inline] pub fn disable_async(&self, currentPin: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DisableAsync)(self as *const _ as *mut _, currentPin.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn enter_async(&self, currentPin: &HStringArg) -> Result>> { + }} + #[inline] pub fn enter_async(&self, currentPin: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).EnterAsync)(self as *const _ as *mut _, currentPin.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn change_async(&self, currentPin: &HStringArg, newPin: &HStringArg) -> Result>> { + }} + #[inline] pub fn change_async(&self, currentPin: &HStringArg, newPin: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ChangeAsync)(self as *const _ as *mut _, currentPin.get(), newPin.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn unblock_async(&self, pinUnblockKey: &HStringArg, newPin: &HStringArg) -> Result>> { + }} + #[inline] pub fn unblock_async(&self, pinUnblockKey: &HStringArg, newPin: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UnblockAsync)(self as *const _ as *mut _, pinUnblockKey.get(), newPin.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class MobileBroadbandPin: IMobileBroadbandPin} RT_ENUM! { enum MobileBroadbandPinFormat: i32 { @@ -1686,51 +1686,51 @@ RT_INTERFACE!{interface IMobileBroadbandPinLockStateChange(IMobileBroadbandPinLo fn get_PinLockState(&self, out: *mut MobileBroadbandPinLockState) -> HRESULT }} impl IMobileBroadbandPinLockStateChange { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pin_type(&self) -> Result { + }} + #[inline] pub fn get_pin_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PinType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pin_lock_state(&self) -> Result { + }} + #[inline] pub fn get_pin_lock_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PinLockState)(self as *const _ as *mut _, &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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_PinLockStateChanges(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IMobileBroadbandPinLockStateChangeTriggerDetails { - #[inline] pub unsafe fn get_pin_lock_state_changes(&self) -> Result>> { + #[inline] pub fn get_pin_lock_state_changes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PinLockStateChanges)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MobileBroadbandPinLockStateChangeTriggerDetails: IMobileBroadbandPinLockStateChangeTriggerDetails} 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedPins(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn GetPin(&self, pinType: MobileBroadbandPinType, out: *mut *mut MobileBroadbandPin) -> HRESULT }} impl IMobileBroadbandPinManager { - #[inline] pub unsafe fn get_supported_pins(&self) -> Result>> { + #[inline] pub fn get_supported_pins(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedPins)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pin(&self, pinType: MobileBroadbandPinType) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_pin(&self, pinType: MobileBroadbandPinType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPin)(self as *const _ as *mut _, pinType, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MobileBroadbandPinManager: IMobileBroadbandPinManager} DEFINE_IID!(IID_IMobileBroadbandPinOperationResult, 299752498, 12775, 18933, 182, 99, 18, 61, 59, 239, 3, 98); @@ -1739,16 +1739,16 @@ RT_INTERFACE!{interface IMobileBroadbandPinOperationResult(IMobileBroadbandPinOp fn get_AttemptsRemaining(&self, out: *mut u32) -> HRESULT }} impl IMobileBroadbandPinOperationResult { - #[inline] pub unsafe fn get_is_successful(&self) -> Result { + #[inline] pub fn get_is_successful(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSuccessful)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_attempts_remaining(&self) -> Result { + }} + #[inline] pub fn get_attempts_remaining(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AttemptsRemaining)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MobileBroadbandPinOperationResult: IMobileBroadbandPinOperationResult} RT_ENUM! { enum MobileBroadbandPinType: i32 { @@ -1763,28 +1763,28 @@ RT_INTERFACE!{interface IMobileBroadbandRadioStateChange(IMobileBroadbandRadioSt fn get_RadioState(&self, out: *mut MobileBroadbandRadioState) -> HRESULT }} impl IMobileBroadbandRadioStateChange { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_radio_state(&self) -> Result { + }} + #[inline] pub fn get_radio_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RadioState)(self as *const _ as *mut _, &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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_RadioStateChanges(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IMobileBroadbandRadioStateChangeTriggerDetails { - #[inline] pub unsafe fn get_radio_state_changes(&self) -> Result>> { + #[inline] pub fn get_radio_state_changes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RadioStateChanges)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MobileBroadbandRadioStateChangeTriggerDetails: IMobileBroadbandRadioStateChangeTriggerDetails} DEFINE_IID!(IID_IMobileBroadbandSarManager, 3853674547, 38526, 16585, 164, 133, 25, 192, 221, 32, 158, 34); @@ -1792,92 +1792,92 @@ RT_INTERFACE!{interface IMobileBroadbandSarManager(IMobileBroadbandSarManagerVtb fn get_IsBackoffEnabled(&self, out: *mut bool) -> HRESULT, fn get_IsWiFiHardwareIntegrated(&self, out: *mut bool) -> HRESULT, fn get_IsSarControlledByHardware(&self, out: *mut bool) -> HRESULT, - fn get_Antennas(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_HysteresisTimerPeriod(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn add_TransmissionStateChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_TransmissionStateChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn EnableBackoffAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn DisableBackoffAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn SetConfigurationAsync(&self, antennas: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn RevertSarToHardwareControlAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn SetTransmissionStateChangedHysteresisAsync(&self, timerPeriod: super::super::foundation::TimeSpan, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn GetIsTransmittingAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn get_Antennas(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_HysteresisTimerPeriod(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn add_TransmissionStateChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_TransmissionStateChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn EnableBackoffAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn DisableBackoffAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn SetConfigurationAsync(&self, antennas: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn RevertSarToHardwareControlAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn SetTransmissionStateChangedHysteresisAsync(&self, timerPeriod: foundation::TimeSpan, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn GetIsTransmittingAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn StartTransmissionStateMonitoring(&self) -> HRESULT, fn StopTransmissionStateMonitoring(&self) -> HRESULT }} impl IMobileBroadbandSarManager { - #[inline] pub unsafe fn get_is_backoff_enabled(&self) -> Result { + #[inline] pub fn get_is_backoff_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsBackoffEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_wi_fi_hardware_integrated(&self) -> Result { + }} + #[inline] pub fn get_is_wi_fi_hardware_integrated(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsWiFiHardwareIntegrated)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_sar_controlled_by_hardware(&self) -> Result { + }} + #[inline] pub fn get_is_sar_controlled_by_hardware(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSarControlledByHardware)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_antennas(&self) -> Result>> { + }} + #[inline] pub fn get_antennas(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Antennas)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_hysteresis_timer_period(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_hysteresis_timer_period(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HysteresisTimerPeriod)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_transmission_state_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_transmission_state_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_TransmissionStateChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_transmission_state_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_transmission_state_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_TransmissionStateChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn enable_backoff_async(&self) -> Result> { + }} + #[inline] pub fn enable_backoff_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).EnableBackoffAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn disable_backoff_async(&self) -> Result> { + }} + #[inline] pub fn disable_backoff_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DisableBackoffAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_configuration_async(&self, antennas: &super::super::foundation::collections::IIterable) -> Result> { + }} + #[inline] pub fn set_configuration_async(&self, antennas: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetConfigurationAsync)(self as *const _ as *mut _, antennas as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn revert_sar_to_hardware_control_async(&self) -> Result> { + }} + #[inline] pub fn revert_sar_to_hardware_control_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RevertSarToHardwareControlAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_transmission_state_changed_hysteresis_async(&self, timerPeriod: super::super::foundation::TimeSpan) -> Result> { + }} + #[inline] pub fn set_transmission_state_changed_hysteresis_async(&self, timerPeriod: foundation::TimeSpan) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetTransmissionStateChangedHysteresisAsync)(self as *const _ as *mut _, timerPeriod, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_transmitting_async(&self) -> Result>> { + }} + #[inline] pub fn get_is_transmitting_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetIsTransmittingAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn start_transmission_state_monitoring(&self) -> Result<()> { + }} + #[inline] pub fn start_transmission_state_monitoring(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StartTransmissionStateMonitoring)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop_transmission_state_monitoring(&self) -> Result<()> { + }} + #[inline] pub fn stop_transmission_state_monitoring(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StopTransmissionStateMonitoring)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MobileBroadbandSarManager: IMobileBroadbandSarManager} DEFINE_IID!(IID_IMobileBroadbandTransmissionStateChangedEventArgs, 1630419061, 1034, 20377, 164, 249, 97, 215, 195, 45, 161, 41); @@ -1885,29 +1885,29 @@ RT_INTERFACE!{interface IMobileBroadbandTransmissionStateChangedEventArgs(IMobil fn get_IsTransmitting(&self, out: *mut bool) -> HRESULT }} impl IMobileBroadbandTransmissionStateChangedEventArgs { - #[inline] pub unsafe fn get_is_transmitting(&self) -> Result { + #[inline] pub fn get_is_transmitting(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsTransmitting)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MobileBroadbandTransmissionStateChangedEventArgs: IMobileBroadbandTransmissionStateChangedEventArgs} 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(&self, out: *mut HSTRING) -> HRESULT, - fn GetUiccAppsAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetUiccAppsAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IMobileBroadbandUicc { - #[inline] pub unsafe fn get_sim_icc_id(&self) -> Result { + #[inline] pub fn get_sim_icc_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SimIccId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_uicc_apps_async(&self) -> Result>> { + }} + #[inline] pub fn get_uicc_apps_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetUiccAppsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class MobileBroadbandUicc: IMobileBroadbandUicc} DEFINE_IID!(IID_IMobileBroadbandUiccApp, 1293354326, 39073, 17373, 178, 236, 80, 201, 12, 242, 72, 223); @@ -1915,30 +1915,30 @@ RT_INTERFACE!{interface IMobileBroadbandUiccApp(IMobileBroadbandUiccAppVtbl): II #[cfg(not(feature="windows-storage"))] fn __Dummy0(&self) -> (), #[cfg(feature="windows-storage")] fn get_Id(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, fn get_Kind(&self, out: *mut UiccAppKind) -> HRESULT, - fn GetRecordDetailsAsync(&self, uiccFilePath: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn ReadRecordAsync(&self, uiccFilePath: *mut super::super::foundation::collections::IIterable, recordIndex: i32, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetRecordDetailsAsync(&self, uiccFilePath: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ReadRecordAsync(&self, uiccFilePath: *mut foundation::collections::IIterable, recordIndex: i32, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IMobileBroadbandUiccApp { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_id(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_id(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_kind(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_record_details_async(&self, uiccFilePath: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn get_record_details_async(&self, uiccFilePath: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetRecordDetailsAsync)(self as *const _ as *mut _, 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(&self, uiccFilePath: &super::super::foundation::collections::IIterable, recordIndex: i32) -> Result>> { + }} + #[inline] pub fn read_record_async(&self, uiccFilePath: &foundation::collections::IIterable, recordIndex: i32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadRecordAsync)(self as *const _ as *mut _, uiccFilePath as *const _ as *mut _, recordIndex, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class MobileBroadbandUiccApp: IMobileBroadbandUiccApp} RT_ENUM! { enum MobileBroadbandUiccAppOperationStatus: i32 { @@ -1950,16 +1950,16 @@ RT_INTERFACE!{interface IMobileBroadbandUiccAppReadRecordResult(IMobileBroadband #[cfg(feature="windows-storage")] fn get_Data(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT }} impl IMobileBroadbandUiccAppReadRecordResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_data(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Data)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MobileBroadbandUiccAppReadRecordResult: IMobileBroadbandUiccAppReadRecordResult} DEFINE_IID!(IID_IMobileBroadbandUiccAppRecordDetailsResult, 3642320943, 48660, 18740, 152, 29, 47, 87, 185, 237, 131, 230); @@ -1972,54 +1972,54 @@ RT_INTERFACE!{interface IMobileBroadbandUiccAppRecordDetailsResult(IMobileBroadb fn get_WriteAccessCondition(&self, out: *mut UiccAccessCondition) -> HRESULT }} impl IMobileBroadbandUiccAppRecordDetailsResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_kind(&self) -> Result { + }} + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_record_count(&self) -> Result { + }} + #[inline] pub fn get_record_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RecordCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_record_size(&self) -> Result { + }} + #[inline] pub fn get_record_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RecordSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_read_access_condition(&self) -> Result { + }} + #[inline] pub fn get_read_access_condition(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReadAccessCondition)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_write_access_condition(&self) -> Result { + }} + #[inline] pub fn get_write_access_condition(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_WriteAccessCondition)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MobileBroadbandUiccAppRecordDetailsResult: IMobileBroadbandUiccAppRecordDetailsResult} 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(&self, out: *mut MobileBroadbandUiccAppOperationStatus) -> HRESULT, - fn get_UiccApps(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_UiccApps(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IMobileBroadbandUiccAppsResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_uicc_apps(&self) -> Result>> { + }} + #[inline] pub fn get_uicc_apps(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UiccApps)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MobileBroadbandUiccAppsResult: IMobileBroadbandUiccAppsResult} RT_ENUM! { enum NetworkDeviceStatus: i32 { @@ -2038,36 +2038,36 @@ RT_INTERFACE!{interface INetworkOperatorNotificationEventDetails(INetworkOperato #[cfg(feature="windows-devices")] fn get_SmsMessage(&self, out: *mut *mut super::super::devices::sms::ISmsMessage) -> HRESULT }} impl INetworkOperatorNotificationEventDetails { - #[inline] pub unsafe fn get_notification_type(&self) -> Result { + #[inline] pub fn get_notification_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NotificationType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_network_account_id(&self) -> Result { + }} + #[inline] pub fn get_network_account_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NetworkAccountId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_encoding_type(&self) -> Result { + }} + #[inline] pub fn get_encoding_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EncodingType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_message(&self) -> Result { + }} + #[inline] pub fn get_message(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Message)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rule_id(&self) -> Result { + }} + #[inline] pub fn get_rule_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RuleId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_sms_message(&self) -> Result> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_sms_message(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SmsMessage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class NetworkOperatorNotificationEventDetails: INetworkOperatorNotificationEventDetails} DEFINE_IID!(IID_INetworkOperatorTetheringAccessPointConfiguration, 197919364, 16686, 16445, 172, 198, 183, 87, 227, 71, 116, 164); @@ -2078,24 +2078,24 @@ RT_INTERFACE!{interface INetworkOperatorTetheringAccessPointConfiguration(INetwo fn put_Passphrase(&self, value: HSTRING) -> HRESULT }} impl INetworkOperatorTetheringAccessPointConfiguration { - #[inline] pub unsafe fn get_ssid(&self) -> Result { + #[inline] pub fn get_ssid(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Ssid)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_ssid(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_ssid(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Ssid)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_passphrase(&self) -> Result { + }} + #[inline] pub fn get_passphrase(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Passphrase)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_passphrase(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_passphrase(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Passphrase)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class NetworkOperatorTetheringAccessPointConfiguration: INetworkOperatorTetheringAccessPointConfiguration} impl RtActivatable for NetworkOperatorTetheringAccessPointConfiguration {} @@ -2103,41 +2103,41 @@ DEFINE_CLSID!(NetworkOperatorTetheringAccessPointConfiguration(&[87,105,110,100, 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(&self, out: *mut HSTRING) -> HRESULT, - fn get_HostNames(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_HostNames(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl INetworkOperatorTetheringClient { - #[inline] pub unsafe fn get_mac_address(&self) -> Result { + #[inline] pub fn get_mac_address(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MacAddress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_host_names(&self) -> Result>> { + }} + #[inline] pub fn get_host_names(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HostNames)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn GetTetheringClients(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl INetworkOperatorTetheringClientManager { - #[inline] pub unsafe fn get_tethering_clients(&self) -> Result>> { + #[inline] pub fn get_tethering_clients(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetTetheringClients)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, allow: bool, entitlementFailureReason: HSTRING) -> HRESULT }} impl INetworkOperatorTetheringEntitlementCheck { - #[inline] pub unsafe fn authorize_tethering(&self, allow: bool, entitlementFailureReason: &HStringArg) -> Result<()> { + #[inline] pub fn authorize_tethering(&self, allow: bool, entitlementFailureReason: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AuthorizeTethering)(self as *const _ as *mut _, allow, entitlementFailureReason.get()); if hr == S_OK { Ok(()) } 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] { @@ -2145,67 +2145,67 @@ RT_INTERFACE!{interface INetworkOperatorTetheringManager(INetworkOperatorTetheri fn get_ClientCount(&self, out: *mut u32) -> HRESULT, fn get_TetheringOperationalState(&self, out: *mut TetheringOperationalState) -> HRESULT, fn GetCurrentAccessPointConfiguration(&self, out: *mut *mut NetworkOperatorTetheringAccessPointConfiguration) -> HRESULT, - fn ConfigureAccessPointAsync(&self, configuration: *mut NetworkOperatorTetheringAccessPointConfiguration, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn StartTetheringAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn StopTetheringAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn ConfigureAccessPointAsync(&self, configuration: *mut NetworkOperatorTetheringAccessPointConfiguration, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn StartTetheringAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn StopTetheringAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl INetworkOperatorTetheringManager { - #[inline] pub unsafe fn get_max_client_count(&self) -> Result { + #[inline] pub fn get_max_client_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxClientCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_client_count(&self) -> Result { + }} + #[inline] pub fn get_client_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ClientCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_tethering_operational_state(&self) -> Result { + }} + #[inline] pub fn get_tethering_operational_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TetheringOperationalState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_access_point_configuration(&self) -> Result> { + }} + #[inline] pub fn get_current_access_point_configuration(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentAccessPointConfiguration)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn configure_access_point_async(&self, configuration: &NetworkOperatorTetheringAccessPointConfiguration) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn configure_access_point_async(&self, configuration: &NetworkOperatorTetheringAccessPointConfiguration) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConfigureAccessPointAsync)(self as *const _ as *mut _, 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(&self) -> Result>> { + }} + #[inline] pub fn start_tethering_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartTetheringAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn stop_tethering_async(&self) -> Result>> { + }} + #[inline] pub fn stop_tethering_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StopTetheringAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class NetworkOperatorTetheringManager: INetworkOperatorTetheringManager} impl RtActivatable for NetworkOperatorTetheringManager {} impl RtActivatable for NetworkOperatorTetheringManager {} impl RtActivatable for NetworkOperatorTetheringManager {} impl NetworkOperatorTetheringManager { - #[inline] pub fn get_tethering_capability(networkAccountId: &HStringArg) -> Result { unsafe { + #[inline] pub fn get_tethering_capability(networkAccountId: &HStringArg) -> Result { >::get_activation_factory().get_tethering_capability(networkAccountId) - }} - #[inline] pub fn create_from_network_account_id(networkAccountId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_from_network_account_id(networkAccountId: &HStringArg) -> Result>> { >::get_activation_factory().create_from_network_account_id(networkAccountId) - }} - #[inline] pub fn get_tethering_capability_from_connection_profile(profile: &super::connectivity::ConnectionProfile) -> Result { unsafe { + } + #[inline] pub fn get_tethering_capability_from_connection_profile(profile: &super::connectivity::ConnectionProfile) -> Result { >::get_activation_factory().get_tethering_capability_from_connection_profile(profile) - }} - #[inline] pub fn create_from_connection_profile(profile: &super::connectivity::ConnectionProfile) -> Result> { unsafe { + } + #[inline] pub fn create_from_connection_profile(profile: &super::connectivity::ConnectionProfile) -> Result>> { >::get_activation_factory().create_from_connection_profile(profile) - }} - #[inline] pub fn create_from_connection_profile_with_target_adapter(profile: &super::connectivity::ConnectionProfile, adapter: &super::connectivity::NetworkAdapter) -> Result> { unsafe { + } + #[inline] pub fn create_from_connection_profile_with_target_adapter(profile: &super::connectivity::ConnectionProfile, adapter: &super::connectivity::NetworkAdapter) -> Result>> { >::get_activation_factory().create_from_connection_profile_with_target_adapter(profile, adapter) - }} + } } DEFINE_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]) [CLSID_NetworkOperatorTetheringManager]); DEFINE_IID!(IID_INetworkOperatorTetheringManagerStatics, 1052555980, 63683, 16476, 153, 100, 112, 161, 238, 171, 225, 148); @@ -2214,16 +2214,16 @@ RT_INTERFACE!{static interface INetworkOperatorTetheringManagerStatics(INetworkO fn CreateFromNetworkAccountId(&self, networkAccountId: HSTRING, out: *mut *mut NetworkOperatorTetheringManager) -> HRESULT }} impl INetworkOperatorTetheringManagerStatics { - #[inline] pub unsafe fn get_tethering_capability(&self, networkAccountId: &HStringArg) -> Result { + #[inline] pub fn get_tethering_capability(&self, networkAccountId: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetTetheringCapability)(self as *const _ as *mut _, networkAccountId.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn create_from_network_account_id(&self, networkAccountId: &HStringArg) -> Result> { + }} + #[inline] pub fn create_from_network_account_id(&self, networkAccountId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromNetworkAccountId)(self as *const _ as *mut _, networkAccountId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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] { @@ -2231,27 +2231,27 @@ RT_INTERFACE!{static interface INetworkOperatorTetheringManagerStatics2(INetwork fn CreateFromConnectionProfile(&self, profile: *mut super::connectivity::ConnectionProfile, out: *mut *mut NetworkOperatorTetheringManager) -> HRESULT }} impl INetworkOperatorTetheringManagerStatics2 { - #[inline] pub unsafe fn get_tethering_capability_from_connection_profile(&self, profile: &super::connectivity::ConnectionProfile) -> Result { + #[inline] pub fn get_tethering_capability_from_connection_profile(&self, profile: &super::connectivity::ConnectionProfile) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetTetheringCapabilityFromConnectionProfile)(self as *const _ as *mut _, profile as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn create_from_connection_profile(&self, profile: &super::connectivity::ConnectionProfile) -> Result> { + }} + #[inline] pub fn create_from_connection_profile(&self, profile: &super::connectivity::ConnectionProfile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromConnectionProfile)(self as *const _ as *mut _, profile as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&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(&self, profile: &super::connectivity::ConnectionProfile, adapter: &super::connectivity::NetworkAdapter) -> Result> { + #[inline] pub fn create_from_connection_profile_with_target_adapter(&self, profile: &super::connectivity::ConnectionProfile, adapter: &super::connectivity::NetworkAdapter) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromConnectionProfileWithTargetAdapter)(self as *const _ as *mut _, profile as *const _ as *mut _, adapter as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_INetworkOperatorTetheringOperationResult, 3956409249, 442, 18285, 180, 179, 191, 61, 18, 200, 248, 12); RT_INTERFACE!{interface INetworkOperatorTetheringOperationResult(INetworkOperatorTetheringOperationResultVtbl): IInspectable(IInspectableVtbl) [IID_INetworkOperatorTetheringOperationResult] { @@ -2259,16 +2259,16 @@ RT_INTERFACE!{interface INetworkOperatorTetheringOperationResult(INetworkOperato fn get_AdditionalErrorMessage(&self, out: *mut HSTRING) -> HRESULT }} impl INetworkOperatorTetheringOperationResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_additional_error_message(&self) -> Result { + }} + #[inline] pub fn get_additional_error_message(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AdditionalErrorMessage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class NetworkOperatorTetheringOperationResult: INetworkOperatorTetheringOperationResult} RT_ENUM! { enum NetworkRegistrationState: i32 { @@ -2278,7 +2278,7 @@ RT_ENUM! { enum ProfileMediaType: i32 { Wlan (ProfileMediaType_Wlan) = 0, Wwan (ProfileMediaType_Wwan) = 1, }} RT_STRUCT! { struct ProfileUsage { - UsageInMegabytes: u32, LastSyncTime: super::super::foundation::DateTime, + UsageInMegabytes: u32, LastSyncTime: 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] { @@ -2286,14 +2286,14 @@ RT_INTERFACE!{interface IProvisionedProfile(IProvisionedProfileVtbl): IInspectab fn UpdateUsage(&self, value: ProfileUsage) -> HRESULT }} impl IProvisionedProfile { - #[inline] pub unsafe fn update_cost(&self, value: super::connectivity::NetworkCostType) -> Result<()> { + #[inline] pub fn update_cost(&self, value: super::connectivity::NetworkCostType) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).UpdateCost)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn update_usage(&self, value: ProfileUsage) -> Result<()> { + }} + #[inline] pub fn update_usage(&self, value: ProfileUsage) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).UpdateUsage)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ProvisionedProfile: IProvisionedProfile} DEFINE_IID!(IID_IProvisionFromXmlDocumentResults, 561447136, 33283, 4575, 173, 185, 244, 206, 70, 45, 145, 55); @@ -2302,42 +2302,42 @@ RT_INTERFACE!{interface IProvisionFromXmlDocumentResults(IProvisionFromXmlDocume fn get_ProvisionResultsXml(&self, out: *mut HSTRING) -> HRESULT }} impl IProvisionFromXmlDocumentResults { - #[inline] pub unsafe fn get_all_elements_provisioned(&self) -> Result { + #[inline] pub fn get_all_elements_provisioned(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AllElementsProvisioned)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_provision_results_xml(&self) -> Result { + }} + #[inline] pub fn get_provision_results_xml(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProvisionResultsXml)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ProvisionFromXmlDocumentResults: IProvisionFromXmlDocumentResults} 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(&self, provisioningXmlDocument: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ProvisionFromXmlDocumentAsync(&self, provisioningXmlDocument: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetProvisionedProfile(&self, mediaType: ProfileMediaType, profileName: HSTRING, out: *mut *mut ProvisionedProfile) -> HRESULT }} impl IProvisioningAgent { - #[inline] pub unsafe fn provision_from_xml_document_async(&self, provisioningXmlDocument: &HStringArg) -> Result>> { + #[inline] pub fn provision_from_xml_document_async(&self, provisioningXmlDocument: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ProvisionFromXmlDocumentAsync)(self as *const _ as *mut _, provisioningXmlDocument.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_provisioned_profile(&self, mediaType: ProfileMediaType, profileName: &HStringArg) -> Result> { + }} + #[inline] pub fn get_provisioned_profile(&self, mediaType: ProfileMediaType, profileName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetProvisionedProfile)(self as *const _ as *mut _, mediaType, profileName.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ProvisioningAgent: IProvisioningAgent} impl RtActivatable for ProvisioningAgent {} impl RtActivatable for ProvisioningAgent {} impl ProvisioningAgent { - #[inline] pub fn create_from_network_account_id(networkAccountId: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_from_network_account_id(networkAccountId: &HStringArg) -> Result>> { >::get_activation_factory().create_from_network_account_id(networkAccountId) - }} + } } DEFINE_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]) [CLSID_ProvisioningAgent]); DEFINE_IID!(IID_IProvisioningAgentStaticMethods, 561447136, 33025, 4575, 173, 185, 244, 206, 70, 45, 145, 55); @@ -2345,11 +2345,11 @@ RT_INTERFACE!{static interface IProvisioningAgentStaticMethods(IProvisioningAgen fn CreateFromNetworkAccountId(&self, networkAccountId: HSTRING, out: *mut *mut ProvisioningAgent) -> HRESULT }} impl IProvisioningAgentStaticMethods { - #[inline] pub unsafe fn create_from_network_account_id(&self, networkAccountId: &HStringArg) -> Result> { + #[inline] pub fn create_from_network_account_id(&self, networkAccountId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromNetworkAccountId)(self as *const _ as *mut _, networkAccountId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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, @@ -2379,40 +2379,40 @@ RT_INTERFACE!{interface IUssdMessage(IUssdMessageVtbl): IInspectable(IInspectabl fn put_PayloadAsText(&self, value: HSTRING) -> HRESULT }} impl IUssdMessage { - #[inline] pub unsafe fn get_data_coding_scheme(&self) -> Result { + #[inline] pub fn get_data_coding_scheme(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DataCodingScheme)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_data_coding_scheme(&self, value: u8) -> Result<()> { + }} + #[inline] pub fn set_data_coding_scheme(&self, value: u8) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DataCodingScheme)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_payload(&self) -> Result> { + }} + #[inline] pub fn get_payload(&self) -> Result> { unsafe { let mut outSize = 0; let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPayload)(self as *const _ as *mut _, &mut outSize, &mut out); if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_payload(&self, value: &[u8]) -> Result<()> { + }} + #[inline] pub fn set_payload(&self, value: &[u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetPayload)(self as *const _ as *mut _, 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(&self) -> Result { + }} + #[inline] pub fn get_payload_as_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PayloadAsText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_payload_as_text(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_payload_as_text(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PayloadAsText)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class UssdMessage: IUssdMessage} impl RtActivatable for UssdMessage {} impl UssdMessage { - #[inline] pub fn create_message(messageText: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_message(messageText: &HStringArg) -> Result> { >::get_activation_factory().create_message(messageText) - }} + } } DEFINE_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]) [CLSID_UssdMessage]); DEFINE_IID!(IID_IUssdMessageFactory, 798674818, 4099, 19805, 191, 129, 42, 186, 27, 75, 228, 168); @@ -2420,11 +2420,11 @@ RT_INTERFACE!{static interface IUssdMessageFactory(IUssdMessageFactoryVtbl): IIn fn CreateMessage(&self, messageText: HSTRING, out: *mut *mut UssdMessage) -> HRESULT }} impl IUssdMessageFactory { - #[inline] pub unsafe fn create_message(&self, messageText: &HStringArg) -> Result> { + #[inline] pub fn create_message(&self, messageText: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateMessage)(self as *const _ as *mut _, messageText.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IUssdReply, 798674818, 8197, 19805, 191, 129, 42, 186, 27, 75, 228, 168); RT_INTERFACE!{interface IUssdReply(IUssdReplyVtbl): IInspectable(IInspectableVtbl) [IID_IUssdReply] { @@ -2432,16 +2432,16 @@ RT_INTERFACE!{interface IUssdReply(IUssdReplyVtbl): IInspectable(IInspectableVtb fn get_Message(&self, out: *mut *mut UssdMessage) -> HRESULT }} impl IUssdReply { - #[inline] pub unsafe fn get_result_code(&self) -> Result { + #[inline] pub fn get_result_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ResultCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_message(&self) -> Result> { + }} + #[inline] pub fn get_message(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Message)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class UssdReply: IUssdReply} RT_ENUM! { enum UssdResultCode: i32 { @@ -2449,29 +2449,29 @@ RT_ENUM! { enum UssdResultCode: i32 { }} 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(&self, message: *mut UssdMessage, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn SendMessageAndGetReplyAsync(&self, message: *mut UssdMessage, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn Close(&self) -> HRESULT }} impl IUssdSession { - #[inline] pub unsafe fn send_message_and_get_reply_async(&self, message: &UssdMessage) -> Result>> { + #[inline] pub fn send_message_and_get_reply_async(&self, message: &UssdMessage) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SendMessageAndGetReplyAsync)(self as *const _ as *mut _, message as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn close(&self) -> Result<()> { + }} + #[inline] pub fn close(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Close)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class UssdSession: IUssdSession} impl RtActivatable for UssdSession {} impl UssdSession { - #[inline] pub fn create_from_network_account_id(networkAccountId: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_from_network_account_id(networkAccountId: &HStringArg) -> Result>> { >::get_activation_factory().create_from_network_account_id(networkAccountId) - }} - #[inline] pub fn create_from_network_interface_id(networkInterfaceId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_from_network_interface_id(networkInterfaceId: &HStringArg) -> Result>> { >::get_activation_factory().create_from_network_interface_id(networkInterfaceId) - }} + } } DEFINE_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]) [CLSID_UssdSession]); DEFINE_IID!(IID_IUssdSessionStatics, 798674818, 4097, 19805, 191, 129, 42, 186, 27, 75, 228, 168); @@ -2480,16 +2480,16 @@ RT_INTERFACE!{static interface IUssdSessionStatics(IUssdSessionStaticsVtbl): IIn fn CreateFromNetworkInterfaceId(&self, networkInterfaceId: HSTRING, out: *mut *mut UssdSession) -> HRESULT }} impl IUssdSessionStatics { - #[inline] pub unsafe fn create_from_network_account_id(&self, networkAccountId: &HStringArg) -> Result> { + #[inline] pub fn create_from_network_account_id(&self, networkAccountId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromNetworkAccountId)(self as *const _ as *mut _, networkAccountId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_from_network_interface_id(&self, networkInterfaceId: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_from_network_interface_id(&self, networkInterfaceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromNetworkInterfaceId)(self as *const _ as *mut _, networkInterfaceId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } } // Windows.Networking.NetworkOperators pub mod connectivity { // Windows.Networking.Connectivity @@ -2503,31 +2503,31 @@ RT_INTERFACE!{interface IAttributedNetworkUsage(IAttributedNetworkUsageVtbl): II #[cfg(feature="windows-storage")] fn get_AttributionThumbnail(&self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT }} impl IAttributedNetworkUsage { - #[inline] pub unsafe fn get_bytes_sent(&self) -> Result { + #[inline] pub fn get_bytes_sent(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BytesSent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_bytes_received(&self) -> Result { + }} + #[inline] pub fn get_bytes_received(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BytesReceived)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_attribution_id(&self) -> Result { + }} + #[inline] pub fn get_attribution_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AttributionId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_attribution_name(&self) -> Result { + }} + #[inline] pub fn get_attribution_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AttributionName)(self 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 get_attribution_thumbnail(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_attribution_thumbnail(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AttributionThumbnail)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AttributedNetworkUsage: IAttributedNetworkUsage} RT_ENUM! { enum CellularApnAuthenticationType: i32 { @@ -2549,60 +2549,60 @@ RT_INTERFACE!{interface ICellularApnContext(ICellularApnContextVtbl): IInspectab fn put_AuthenticationType(&self, value: CellularApnAuthenticationType) -> HRESULT }} impl ICellularApnContext { - #[inline] pub unsafe fn get_provider_id(&self) -> Result { + #[inline] pub fn get_provider_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProviderId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_provider_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_provider_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ProviderId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_access_point_name(&self) -> Result { + }} + #[inline] pub fn get_access_point_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AccessPointName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_access_point_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_access_point_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AccessPointName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_user_name(&self) -> Result { + }} + #[inline] pub fn get_user_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UserName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_user_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_user_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_UserName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_password(&self) -> Result { + }} + #[inline] pub fn get_password(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Password)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_password(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_password(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Password)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_compression_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_compression_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCompressionEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_compression_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_compression_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsCompressionEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_authentication_type(&self) -> Result { + }} + #[inline] pub fn get_authentication_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AuthenticationType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_authentication_type(&self, value: CellularApnAuthenticationType) -> Result<()> { + }} + #[inline] pub fn set_authentication_type(&self, value: CellularApnAuthenticationType) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AuthenticationType)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CellularApnContext: ICellularApnContext} impl RtActivatable for CellularApnContext {} @@ -2615,26 +2615,26 @@ RT_INTERFACE!{interface IConnectionCost(IConnectionCostVtbl): IInspectable(IInsp fn get_ApproachingDataLimit(&self, out: *mut bool) -> HRESULT }} impl IConnectionCost { - #[inline] pub unsafe fn get_network_cost_type(&self) -> Result { + #[inline] pub fn get_network_cost_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NetworkCostType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_roaming(&self) -> Result { + }} + #[inline] pub fn get_roaming(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Roaming)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_over_data_limit(&self) -> Result { + }} + #[inline] pub fn get_over_data_limit(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OverDataLimit)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_approaching_data_limit(&self) -> Result { + }} + #[inline] pub fn get_approaching_data_limit(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ApproachingDataLimit)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ConnectionCost: IConnectionCost} DEFINE_IID!(IID_IConnectionCost2, 2383493637, 57865, 17737, 187, 37, 94, 13, 182, 145, 203, 5); @@ -2642,70 +2642,70 @@ RT_INTERFACE!{interface IConnectionCost2(IConnectionCost2Vtbl): IInspectable(IIn fn get_BackgroundDataUsageRestricted(&self, out: *mut bool) -> HRESULT }} impl IConnectionCost2 { - #[inline] pub unsafe fn get_background_data_usage_restricted(&self) -> Result { + #[inline] pub fn get_background_data_usage_restricted(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BackgroundDataUsageRestricted)(self as *const _ as *mut _, &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(&self, out: *mut HSTRING) -> HRESULT, fn GetNetworkConnectivityLevel(&self, out: *mut NetworkConnectivityLevel) -> HRESULT, - fn GetNetworkNames(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn GetNetworkNames(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn GetConnectionCost(&self, out: *mut *mut ConnectionCost) -> HRESULT, fn GetDataPlanStatus(&self, out: *mut *mut DataPlanStatus) -> HRESULT, fn get_NetworkAdapter(&self, out: *mut *mut NetworkAdapter) -> HRESULT, - fn GetLocalUsage(&self, startTime: super::super::foundation::DateTime, endTime: super::super::foundation::DateTime, out: *mut *mut DataUsage) -> HRESULT, - fn GetLocalUsagePerRoamingStates(&self, startTime: super::super::foundation::DateTime, endTime: super::super::foundation::DateTime, states: RoamingStates, out: *mut *mut DataUsage) -> HRESULT, + fn GetLocalUsage(&self, startTime: foundation::DateTime, endTime: foundation::DateTime, out: *mut *mut DataUsage) -> HRESULT, + fn GetLocalUsagePerRoamingStates(&self, startTime: foundation::DateTime, endTime: foundation::DateTime, states: RoamingStates, out: *mut *mut DataUsage) -> HRESULT, fn get_NetworkSecuritySettings(&self, out: *mut *mut NetworkSecuritySettings) -> HRESULT }} impl IConnectionProfile { - #[inline] pub unsafe fn get_profile_name(&self) -> Result { + #[inline] pub fn get_profile_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProfileName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_network_connectivity_level(&self) -> Result { + }} + #[inline] pub fn get_network_connectivity_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetNetworkConnectivityLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_network_names(&self) -> Result>> { + }} + #[inline] pub fn get_network_names(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetNetworkNames)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_connection_cost(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_connection_cost(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetConnectionCost)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_data_plan_status(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_data_plan_status(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDataPlanStatus)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_network_adapter(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_network_adapter(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NetworkAdapter)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_local_usage(&self, startTime: super::super::foundation::DateTime, endTime: super::super::foundation::DateTime) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_local_usage(&self, startTime: foundation::DateTime, endTime: foundation::DateTime) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetLocalUsage)(self as *const _ as *mut _, 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(&self, startTime: super::super::foundation::DateTime, endTime: super::super::foundation::DateTime, states: RoamingStates) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_local_usage_per_roaming_states(&self, startTime: foundation::DateTime, endTime: foundation::DateTime, states: RoamingStates) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetLocalUsagePerRoamingStates)(self as *const _ as *mut _, startTime, endTime, states, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_network_security_settings(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_network_security_settings(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NetworkSecuritySettings)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ConnectionProfile: IConnectionProfile} DEFINE_IID!(IID_IConnectionProfile2, 3791933765, 19615, 16396, 145, 80, 126, 199, 214, 226, 136, 138); @@ -2714,80 +2714,80 @@ RT_INTERFACE!{interface IConnectionProfile2(IConnectionProfile2Vtbl): IInspectab fn get_IsWlanConnectionProfile(&self, out: *mut bool) -> HRESULT, fn get_WwanConnectionProfileDetails(&self, out: *mut *mut WwanConnectionProfileDetails) -> HRESULT, fn get_WlanConnectionProfileDetails(&self, out: *mut *mut WlanConnectionProfileDetails) -> HRESULT, - fn get_ServiceProviderGuid(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn GetSignalBars(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_ServiceProviderGuid(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn GetSignalBars(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn GetDomainConnectivityLevel(&self, out: *mut DomainConnectivityLevel) -> HRESULT, - fn GetNetworkUsageAsync(&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(&self, startTime: super::super::foundation::DateTime, endTime: super::super::foundation::DateTime, states: NetworkUsageStates, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn GetNetworkUsageAsync(&self, startTime: foundation::DateTime, endTime: foundation::DateTime, granularity: DataUsageGranularity, states: NetworkUsageStates, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetConnectivityIntervalsAsync(&self, startTime: foundation::DateTime, endTime: foundation::DateTime, states: NetworkUsageStates, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IConnectionProfile2 { - #[inline] pub unsafe fn get_is_wwan_connection_profile(&self) -> Result { + #[inline] pub fn get_is_wwan_connection_profile(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsWwanConnectionProfile)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_wlan_connection_profile(&self) -> Result { + }} + #[inline] pub fn get_is_wlan_connection_profile(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsWlanConnectionProfile)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_wwan_connection_profile_details(&self) -> Result> { + }} + #[inline] pub fn get_wwan_connection_profile_details(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WwanConnectionProfileDetails)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_wlan_connection_profile_details(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_wlan_connection_profile_details(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WlanConnectionProfileDetails)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_provider_guid(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_service_provider_guid(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServiceProviderGuid)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_signal_bars(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_signal_bars(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSignalBars)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_domain_connectivity_level(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_domain_connectivity_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetDomainConnectivityLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_network_usage_async(&self, startTime: super::super::foundation::DateTime, endTime: super::super::foundation::DateTime, granularity: DataUsageGranularity, states: NetworkUsageStates) -> Result>>> { + }} + #[inline] pub fn get_network_usage_async(&self, startTime: foundation::DateTime, endTime: foundation::DateTime, granularity: DataUsageGranularity, states: NetworkUsageStates) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetNetworkUsageAsync)(self as *const _ as *mut _, 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(&self, startTime: super::super::foundation::DateTime, endTime: super::super::foundation::DateTime, states: NetworkUsageStates) -> Result>>> { + }} + #[inline] pub fn get_connectivity_intervals_async(&self, startTime: foundation::DateTime, endTime: foundation::DateTime, states: NetworkUsageStates) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetConnectivityIntervalsAsync)(self as *const _ as *mut _, startTime, endTime, states, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, startTime: super::super::foundation::DateTime, endTime: super::super::foundation::DateTime, states: NetworkUsageStates, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn GetAttributedNetworkUsageAsync(&self, startTime: foundation::DateTime, endTime: foundation::DateTime, states: NetworkUsageStates, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IConnectionProfile3 { - #[inline] pub unsafe fn get_attributed_network_usage_async(&self, startTime: super::super::foundation::DateTime, endTime: super::super::foundation::DateTime, states: NetworkUsageStates) -> Result>>> { + #[inline] pub fn get_attributed_network_usage_async(&self, startTime: foundation::DateTime, endTime: foundation::DateTime, states: NetworkUsageStates) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAttributedNetworkUsageAsync)(self as *const _ as *mut _, startTime, endTime, states, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IConnectionProfile4, 2049786573, 33248, 19174, 171, 237, 171, 156, 161, 62, 183, 20); RT_INTERFACE!{interface IConnectionProfile4(IConnectionProfile4Vtbl): IInspectable(IInspectableVtbl) [IID_IConnectionProfile4] { - fn GetProviderNetworkUsageAsync(&self, startTime: super::super::foundation::DateTime, endTime: super::super::foundation::DateTime, states: NetworkUsageStates, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn GetProviderNetworkUsageAsync(&self, startTime: foundation::DateTime, endTime: foundation::DateTime, states: NetworkUsageStates, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IConnectionProfile4 { - #[inline] pub unsafe fn get_provider_network_usage_async(&self, startTime: super::super::foundation::DateTime, endTime: super::super::foundation::DateTime, states: NetworkUsageStates) -> Result>>> { + #[inline] pub fn get_provider_network_usage_async(&self, startTime: foundation::DateTime, endTime: foundation::DateTime, states: NetworkUsageStates) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetProviderNetworkUsageAsync)(self as *const _ as *mut _, startTime, endTime, states, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IConnectionProfileFilter, 541883592, 48429, 20109, 164, 179, 69, 94, 195, 55, 56, 138); RT_INTERFACE!{interface IConnectionProfileFilter(IConnectionProfileFilterVtbl): IInspectable(IInspectableVtbl) [IID_IConnectionProfileFilter] { @@ -2799,226 +2799,226 @@ RT_INTERFACE!{interface IConnectionProfileFilter(IConnectionProfileFilterVtbl): fn get_IsWlanConnectionProfile(&self, out: *mut bool) -> HRESULT, fn put_NetworkCostType(&self, value: NetworkCostType) -> HRESULT, fn get_NetworkCostType(&self, out: *mut NetworkCostType) -> HRESULT, - fn put_ServiceProviderGuid(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_ServiceProviderGuid(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn put_ServiceProviderGuid(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_ServiceProviderGuid(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IConnectionProfileFilter { - #[inline] pub unsafe fn set_is_connected(&self, value: bool) -> Result<()> { + #[inline] pub fn set_is_connected(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsConnected)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_connected(&self) -> Result { + }} + #[inline] pub fn get_is_connected(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsConnected)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_wwan_connection_profile(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_wwan_connection_profile(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsWwanConnectionProfile)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_wwan_connection_profile(&self) -> Result { + }} + #[inline] pub fn get_is_wwan_connection_profile(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsWwanConnectionProfile)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_wlan_connection_profile(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_wlan_connection_profile(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsWlanConnectionProfile)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_wlan_connection_profile(&self) -> Result { + }} + #[inline] pub fn get_is_wlan_connection_profile(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsWlanConnectionProfile)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_network_cost_type(&self, value: NetworkCostType) -> Result<()> { + }} + #[inline] pub fn set_network_cost_type(&self, value: NetworkCostType) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_NetworkCostType)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_network_cost_type(&self) -> Result { + }} + #[inline] pub fn get_network_cost_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NetworkCostType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_service_provider_guid(&self, value: &super::super::foundation::IReference) -> Result<()> { + }} + #[inline] pub fn set_service_provider_guid(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ServiceProviderGuid)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_provider_guid(&self) -> Result>> { + }} + #[inline] pub fn get_service_provider_guid(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServiceProviderGuid)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ConnectionProfileFilter: IConnectionProfileFilter} impl RtActivatable for ConnectionProfileFilter {} DEFINE_CLSID!(ConnectionProfileFilter(&[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,111,110,80,114,111,102,105,108,101,70,105,108,116,101,114,0]) [CLSID_ConnectionProfileFilter]); 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(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_IsRoaming(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_IsOverDataLimit(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_IsOverDataLimit(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_IsBackgroundDataUsageRestricted(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_IsBackgroundDataUsageRestricted(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_IsRoaming(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_IsRoaming(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_IsOverDataLimit(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_IsOverDataLimit(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_IsBackgroundDataUsageRestricted(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_IsBackgroundDataUsageRestricted(&self, out: *mut *mut foundation::IReference) -> HRESULT, #[cfg(feature="windows-storage")] fn get_RawData(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT }} impl IConnectionProfileFilter2 { - #[inline] pub unsafe fn set_is_roaming(&self, value: &super::super::foundation::IReference) -> Result<()> { + #[inline] pub fn set_is_roaming(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsRoaming)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_roaming(&self) -> Result>> { + }} + #[inline] pub fn get_is_roaming(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsRoaming)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_over_data_limit(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_is_over_data_limit(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsOverDataLimit)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_over_data_limit(&self) -> Result>> { + }} + #[inline] pub fn get_is_over_data_limit(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsOverDataLimit)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_background_data_usage_restricted(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_is_background_data_usage_restricted(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsBackgroundDataUsageRestricted)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_background_data_usage_restricted(&self) -> Result>> { + }} + #[inline] pub fn get_is_background_data_usage_restricted(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsBackgroundDataUsageRestricted)(self 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_raw_data(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_raw_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RawData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut ConnectionProfile) -> HRESULT }} impl IConnectionSession { - #[inline] pub unsafe fn get_connection_profile(&self) -> Result> { + #[inline] pub fn get_connection_profile(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ConnectionProfile)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ConnectionSession: IConnectionSession} 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(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_ConnectionDuration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + fn get_StartTime(&self, out: *mut foundation::DateTime) -> HRESULT, + fn get_ConnectionDuration(&self, out: *mut foundation::TimeSpan) -> HRESULT }} impl IConnectivityInterval { - #[inline] pub unsafe fn get_start_time(&self) -> Result { + #[inline] pub fn get_start_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StartTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_connection_duration(&self) -> Result { + }} + #[inline] pub fn get_connection_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ConnectionDuration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ConnectivityInterval: IConnectivityInterval} RT_CLASS!{static class ConnectivityManager} impl RtActivatable for ConnectivityManager {} impl ConnectivityManager { - #[inline] pub fn acquire_connection_async(cellularApnContext: &CellularApnContext) -> Result>> { unsafe { + #[inline] pub fn acquire_connection_async(cellularApnContext: &CellularApnContext) -> Result>> { >::get_activation_factory().acquire_connection_async(cellularApnContext) - }} - #[inline] pub fn add_http_route_policy(routePolicy: &RoutePolicy) -> Result<()> { unsafe { + } + #[inline] pub fn add_http_route_policy(routePolicy: &RoutePolicy) -> Result<()> { >::get_activation_factory().add_http_route_policy(routePolicy) - }} - #[inline] pub fn remove_http_route_policy(routePolicy: &RoutePolicy) -> Result<()> { unsafe { + } + #[inline] pub fn remove_http_route_policy(routePolicy: &RoutePolicy) -> Result<()> { >::get_activation_factory().remove_http_route_policy(routePolicy) - }} + } } DEFINE_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]) [CLSID_ConnectivityManager]); 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(&self, cellularApnContext: *mut CellularApnContext, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn AcquireConnectionAsync(&self, cellularApnContext: *mut CellularApnContext, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn AddHttpRoutePolicy(&self, routePolicy: *mut RoutePolicy) -> HRESULT, fn RemoveHttpRoutePolicy(&self, routePolicy: *mut RoutePolicy) -> HRESULT }} impl IConnectivityManagerStatics { - #[inline] pub unsafe fn acquire_connection_async(&self, cellularApnContext: &CellularApnContext) -> Result>> { + #[inline] pub fn acquire_connection_async(&self, cellularApnContext: &CellularApnContext) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AcquireConnectionAsync)(self as *const _ as *mut _, 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(&self, routePolicy: &RoutePolicy) -> Result<()> { + }} + #[inline] pub fn add_http_route_policy(&self, routePolicy: &RoutePolicy) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddHttpRoutePolicy)(self as *const _ as *mut _, routePolicy as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove_http_route_policy(&self, routePolicy: &RoutePolicy) -> Result<()> { + }} + #[inline] pub fn remove_http_route_policy(&self, routePolicy: &RoutePolicy) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveHttpRoutePolicy)(self as *const _ as *mut _, routePolicy as *const _ as *mut _); if hr == S_OK { Ok(()) } 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(&self, out: *mut *mut DataPlanUsage) -> HRESULT, - fn get_DataLimitInMegabytes(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_InboundBitsPerSecond(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_OutboundBitsPerSecond(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_NextBillingCycle(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_MaxTransferSizeInMegabytes(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn get_DataLimitInMegabytes(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_InboundBitsPerSecond(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_OutboundBitsPerSecond(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_NextBillingCycle(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_MaxTransferSizeInMegabytes(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IDataPlanStatus { - #[inline] pub unsafe fn get_data_plan_usage(&self) -> Result> { + #[inline] pub fn get_data_plan_usage(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DataPlanUsage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_data_limit_in_megabytes(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_data_limit_in_megabytes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DataLimitInMegabytes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_inbound_bits_per_second(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_inbound_bits_per_second(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InboundBitsPerSecond)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_outbound_bits_per_second(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_outbound_bits_per_second(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OutboundBitsPerSecond)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_next_billing_cycle(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_next_billing_cycle(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NextBillingCycle)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_transfer_size_in_megabytes(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_max_transfer_size_in_megabytes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxTransferSizeInMegabytes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DataPlanStatus: IDataPlanStatus} 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(&self, out: *mut u32) -> HRESULT, - fn get_LastSyncTime(&self, out: *mut super::super::foundation::DateTime) -> HRESULT + fn get_LastSyncTime(&self, out: *mut foundation::DateTime) -> HRESULT }} impl IDataPlanUsage { - #[inline] pub unsafe fn get_megabytes_used(&self) -> Result { + #[inline] pub fn get_megabytes_used(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MegabytesUsed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_last_sync_time(&self) -> Result { + }} + #[inline] pub fn get_last_sync_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LastSyncTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class DataPlanUsage: IDataPlanUsage} DEFINE_IID!(IID_IDataUsage, 3242401235, 45382, 19769, 185, 89, 12, 105, 176, 150, 197, 18); @@ -3027,16 +3027,16 @@ RT_INTERFACE!{interface IDataUsage(IDataUsageVtbl): IInspectable(IInspectableVtb fn get_BytesReceived(&self, out: *mut u64) -> HRESULT }} impl IDataUsage { - #[inline] pub unsafe fn get_bytes_sent(&self) -> Result { + #[inline] pub fn get_bytes_sent(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BytesSent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_bytes_received(&self) -> Result { + }} + #[inline] pub fn get_bytes_received(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BytesReceived)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class DataUsage: IDataUsage} RT_ENUM! { enum DataUsageGranularity: i32 { @@ -3048,19 +3048,19 @@ RT_ENUM! { enum DomainConnectivityLevel: i32 { 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(&self, out: *mut *mut NetworkAdapter) -> HRESULT, - fn get_PrefixLength(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn get_PrefixLength(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IIPInformation { - #[inline] pub unsafe fn get_network_adapter(&self) -> Result> { + #[inline] pub fn get_network_adapter(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NetworkAdapter)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_prefix_length(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_prefix_length(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PrefixLength)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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] { @@ -3069,39 +3069,39 @@ RT_INTERFACE!{interface ILanIdentifier(ILanIdentifierVtbl): IInspectable(IInspec fn get_NetworkAdapterId(&self, out: *mut Guid) -> HRESULT }} impl ILanIdentifier { - #[inline] pub unsafe fn get_infrastructure_id(&self) -> Result> { + #[inline] pub fn get_infrastructure_id(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InfrastructureId)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_port_id(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_port_id(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PortId)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_network_adapter_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_network_adapter_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NetworkAdapterId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class LanIdentifier: ILanIdentifier} 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(&self, out: *mut u32) -> HRESULT, - fn get_Value(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_Value(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl ILanIdentifierData { - #[inline] pub unsafe fn get_type(&self) -> Result { + #[inline] pub fn get_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Type)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result>> { + }} + #[inline] pub fn get_value(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class LanIdentifierData: ILanIdentifierData} DEFINE_IID!(IID_INetworkAdapter, 995372547, 21384, 18796, 168, 163, 175, 253, 57, 174, 194, 230); @@ -3111,39 +3111,39 @@ RT_INTERFACE!{interface INetworkAdapter(INetworkAdapterVtbl): IInspectable(IInsp fn get_IanaInterfaceType(&self, out: *mut u32) -> HRESULT, fn get_NetworkItem(&self, out: *mut *mut NetworkItem) -> HRESULT, fn get_NetworkAdapterId(&self, out: *mut Guid) -> HRESULT, - fn GetConnectedProfileAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetConnectedProfileAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl INetworkAdapter { - #[inline] pub unsafe fn get_outbound_max_bits_per_second(&self) -> Result { + #[inline] pub fn get_outbound_max_bits_per_second(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OutboundMaxBitsPerSecond)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_inbound_max_bits_per_second(&self) -> Result { + }} + #[inline] pub fn get_inbound_max_bits_per_second(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InboundMaxBitsPerSecond)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_iana_interface_type(&self) -> Result { + }} + #[inline] pub fn get_iana_interface_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IanaInterfaceType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_network_item(&self) -> Result> { + }} + #[inline] pub fn get_network_item(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NetworkItem)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_network_adapter_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_network_adapter_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NetworkAdapterId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_connected_profile_async(&self) -> Result>> { + }} + #[inline] pub fn get_connected_profile_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetConnectedProfileAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class NetworkAdapter: INetworkAdapter} RT_ENUM! { enum NetworkAuthenticationType: i32 { @@ -3162,97 +3162,97 @@ RT_CLASS!{static class NetworkInformation} impl RtActivatable for NetworkInformation {} impl RtActivatable for NetworkInformation {} impl NetworkInformation { - #[inline] pub fn get_connection_profiles() -> Result>> { unsafe { + #[inline] pub fn get_connection_profiles() -> Result>>> { >::get_activation_factory().get_connection_profiles() - }} - #[inline] pub fn get_internet_connection_profile() -> Result> { unsafe { + } + #[inline] pub fn get_internet_connection_profile() -> Result>> { >::get_activation_factory().get_internet_connection_profile() - }} - #[inline] pub fn get_lan_identifiers() -> Result>> { unsafe { + } + #[inline] pub fn get_lan_identifiers() -> Result>>> { >::get_activation_factory().get_lan_identifiers() - }} - #[inline] pub fn get_host_names() -> Result>> { unsafe { + } + #[inline] pub fn get_host_names() -> Result>>> { >::get_activation_factory().get_host_names() - }} - #[inline] pub fn get_proxy_configuration_async(uri: &super::super::foundation::Uri) -> Result>> { unsafe { + } + #[inline] pub fn get_proxy_configuration_async(uri: &foundation::Uri) -> Result>> { >::get_activation_factory().get_proxy_configuration_async(uri) - }} - #[inline] pub fn get_sorted_endpoint_pairs(destinationList: &super::super::foundation::collections::IIterable, sortOptions: super::HostNameSortOptions) -> Result>> { unsafe { + } + #[inline] pub fn get_sorted_endpoint_pairs(destinationList: &foundation::collections::IIterable, sortOptions: super::HostNameSortOptions) -> Result>>> { >::get_activation_factory().get_sorted_endpoint_pairs(destinationList, sortOptions) - }} - #[inline] pub fn add_network_status_changed(networkStatusHandler: &NetworkStatusChangedEventHandler) -> Result { unsafe { + } + #[inline] pub fn add_network_status_changed(networkStatusHandler: &NetworkStatusChangedEventHandler) -> Result { >::get_activation_factory().add_network_status_changed(networkStatusHandler) - }} - #[inline] pub fn remove_network_status_changed(eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_network_status_changed(eventCookie: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_network_status_changed(eventCookie) - }} - #[inline] pub fn find_connection_profiles_async(pProfileFilter: &ConnectionProfileFilter) -> Result>>> { unsafe { + } + #[inline] pub fn find_connection_profiles_async(pProfileFilter: &ConnectionProfileFilter) -> Result>>> { >::get_activation_factory().find_connection_profiles_async(pProfileFilter) - }} + } } DEFINE_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]) [CLSID_NetworkInformation]); 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn GetConnectionProfiles(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn GetInternetConnectionProfile(&self, out: *mut *mut ConnectionProfile) -> HRESULT, - fn GetLanIdentifiers(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn GetHostNames(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn GetProxyConfigurationAsync(&self, uri: *mut super::super::foundation::Uri, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetSortedEndpointPairs(&self, destinationList: *mut super::super::foundation::collections::IIterable, sortOptions: super::HostNameSortOptions, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn add_NetworkStatusChanged(&self, networkStatusHandler: *mut NetworkStatusChangedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_NetworkStatusChanged(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn GetLanIdentifiers(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn GetHostNames(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn GetProxyConfigurationAsync(&self, uri: *mut foundation::Uri, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetSortedEndpointPairs(&self, destinationList: *mut foundation::collections::IIterable, sortOptions: super::HostNameSortOptions, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn add_NetworkStatusChanged(&self, networkStatusHandler: *mut NetworkStatusChangedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_NetworkStatusChanged(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT }} impl INetworkInformationStatics { - #[inline] pub unsafe fn get_connection_profiles(&self) -> Result>> { + #[inline] pub fn get_connection_profiles(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetConnectionProfiles)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_internet_connection_profile(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_internet_connection_profile(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetInternetConnectionProfile)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_lan_identifiers(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_lan_identifiers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetLanIdentifiers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_host_names(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_host_names(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetHostNames)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_proxy_configuration_async(&self, uri: &super::super::foundation::Uri) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_proxy_configuration_async(&self, uri: &foundation::Uri) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetProxyConfigurationAsync)(self 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 get_sorted_endpoint_pairs(&self, destinationList: &super::super::foundation::collections::IIterable, sortOptions: super::HostNameSortOptions) -> Result>> { + }} + #[inline] pub fn get_sorted_endpoint_pairs(&self, destinationList: &foundation::collections::IIterable, sortOptions: super::HostNameSortOptions) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSortedEndpointPairs)(self as *const _ as *mut _, 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(&self, networkStatusHandler: &NetworkStatusChangedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_network_status_changed(&self, networkStatusHandler: &NetworkStatusChangedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_NetworkStatusChanged)(self as *const _ as *mut _, networkStatusHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_network_status_changed(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_network_status_changed(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_NetworkStatusChanged)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } 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(&self, pProfileFilter: *mut ConnectionProfileFilter, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn FindConnectionProfilesAsync(&self, pProfileFilter: *mut ConnectionProfileFilter, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl INetworkInformationStatics2 { - #[inline] pub unsafe fn find_connection_profiles_async(&self, pProfileFilter: &ConnectionProfileFilter) -> Result>>> { + #[inline] pub fn find_connection_profiles_async(&self, pProfileFilter: &ConnectionProfileFilter) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindConnectionProfilesAsync)(self as *const _ as *mut _, pProfileFilter as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_INetworkItem, 29117753, 62944, 17767, 162, 140, 66, 8, 12, 131, 27, 43); RT_INTERFACE!{interface INetworkItem(INetworkItemVtbl): IInspectable(IInspectableVtbl) [IID_INetworkItem] { @@ -3260,16 +3260,16 @@ RT_INTERFACE!{interface INetworkItem(INetworkItemVtbl): IInspectable(IInspectabl fn GetNetworkTypes(&self, out: *mut NetworkTypes) -> HRESULT }} impl INetworkItem { - #[inline] pub unsafe fn get_network_id(&self) -> Result { + #[inline] pub fn get_network_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NetworkId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_network_types(&self) -> Result { + }} + #[inline] pub fn get_network_types(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetNetworkTypes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class NetworkItem: INetworkItem} DEFINE_IID!(IID_INetworkSecuritySettings, 2090892941, 37243, 19295, 184, 77, 40, 247, 165, 172, 84, 2); @@ -3278,16 +3278,16 @@ RT_INTERFACE!{interface INetworkSecuritySettings(INetworkSecuritySettingsVtbl): fn get_NetworkEncryptionType(&self, out: *mut NetworkEncryptionType) -> HRESULT }} impl INetworkSecuritySettings { - #[inline] pub unsafe fn get_network_authentication_type(&self) -> Result { + #[inline] pub fn get_network_authentication_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NetworkAuthenticationType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_network_encryption_type(&self) -> Result { + }} + #[inline] pub fn get_network_encryption_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NetworkEncryptionType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class NetworkSecuritySettings: INetworkSecuritySettings} DEFINE_IID!(IID_INetworkStateChangeEventDetails, 520942387, 55206, 17629, 164, 233, 104, 124, 71, 107, 144, 61); @@ -3300,36 +3300,36 @@ RT_INTERFACE!{interface INetworkStateChangeEventDetails(INetworkStateChangeEvent fn get_HasNewWwanRegistrationState(&self, out: *mut bool) -> HRESULT }} impl INetworkStateChangeEventDetails { - #[inline] pub unsafe fn get_has_new_internet_connection_profile(&self) -> Result { + #[inline] pub fn get_has_new_internet_connection_profile(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasNewInternetConnectionProfile)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_new_connection_cost(&self) -> Result { + }} + #[inline] pub fn get_has_new_connection_cost(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasNewConnectionCost)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_new_network_connectivity_level(&self) -> Result { + }} + #[inline] pub fn get_has_new_network_connectivity_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasNewNetworkConnectivityLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_new_domain_connectivity_level(&self) -> Result { + }} + #[inline] pub fn get_has_new_domain_connectivity_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasNewDomainConnectivityLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_new_host_name_list(&self) -> Result { + }} + #[inline] pub fn get_has_new_host_name_list(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasNewHostNameList)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_new_wwan_registration_state(&self) -> Result { + }} + #[inline] pub fn get_has_new_wwan_registration_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasNewWwanRegistrationState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class NetworkStateChangeEventDetails: INetworkStateChangeEventDetails} DEFINE_IID!(IID_INetworkStateChangeEventDetails2, 3594764520, 12499, 20330, 173, 71, 106, 24, 115, 206, 179, 193); @@ -3338,26 +3338,26 @@ RT_INTERFACE!{interface INetworkStateChangeEventDetails2(INetworkStateChangeEven fn get_HasNewTetheringClientCount(&self, out: *mut bool) -> HRESULT }} impl INetworkStateChangeEventDetails2 { - #[inline] pub unsafe fn get_has_new_tethering_operational_state(&self) -> Result { + #[inline] pub fn get_has_new_tethering_operational_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasNewTetheringOperationalState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_new_tethering_client_count(&self) -> Result { + }} + #[inline] pub fn get_has_new_tethering_client_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasNewTetheringClientCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, sender: *mut IInspectable) -> HRESULT }} impl NetworkStatusChangedEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &IInspectable) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum NetworkTypes: u32 { None (NetworkTypes_None) = 0, Internet (NetworkTypes_Internet) = 1, PrivateNetwork (NetworkTypes_PrivateNetwork) = 2, @@ -3366,24 +3366,24 @@ DEFINE_IID!(IID_INetworkUsage, 1239060430, 39301, 18727, 191, 91, 7, 43, 92, 101 RT_INTERFACE!{interface INetworkUsage(INetworkUsageVtbl): IInspectable(IInspectableVtbl) [IID_INetworkUsage] { fn get_BytesSent(&self, out: *mut u64) -> HRESULT, fn get_BytesReceived(&self, out: *mut u64) -> HRESULT, - fn get_ConnectionDuration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + fn get_ConnectionDuration(&self, out: *mut foundation::TimeSpan) -> HRESULT }} impl INetworkUsage { - #[inline] pub unsafe fn get_bytes_sent(&self) -> Result { + #[inline] pub fn get_bytes_sent(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BytesSent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_bytes_received(&self) -> Result { + }} + #[inline] pub fn get_bytes_received(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BytesReceived)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_connection_duration(&self) -> Result { + }} + #[inline] pub fn get_connection_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ConnectionDuration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class NetworkUsage: INetworkUsage} RT_STRUCT! { struct NetworkUsageStates { @@ -3397,39 +3397,39 @@ RT_INTERFACE!{interface IProviderNetworkUsage(IProviderNetworkUsageVtbl): IInspe fn get_ProviderId(&self, out: *mut HSTRING) -> HRESULT }} impl IProviderNetworkUsage { - #[inline] pub unsafe fn get_bytes_sent(&self) -> Result { + #[inline] pub fn get_bytes_sent(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BytesSent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_bytes_received(&self) -> Result { + }} + #[inline] pub fn get_bytes_received(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BytesReceived)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_provider_id(&self) -> Result { + }} + #[inline] pub fn get_provider_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProviderId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ProviderNetworkUsage: IProviderNetworkUsage} 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_ProxyUris(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_CanConnectDirectly(&self, out: *mut bool) -> HRESULT }} impl IProxyConfiguration { - #[inline] pub unsafe fn get_proxy_uris(&self) -> Result>> { + #[inline] pub fn get_proxy_uris(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProxyUris)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_connect_directly(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_can_connect_directly(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanConnectDirectly)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ProxyConfiguration: IProxyConfiguration} RT_ENUM! { enum RoamingStates: u32 { @@ -3442,28 +3442,28 @@ RT_INTERFACE!{interface IRoutePolicy(IRoutePolicyVtbl): IInspectable(IInspectabl fn get_HostNameType(&self, out: *mut super::DomainNameType) -> HRESULT }} impl IRoutePolicy { - #[inline] pub unsafe fn get_connection_profile(&self) -> Result> { + #[inline] pub fn get_connection_profile(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ConnectionProfile)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_host_name(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_host_name(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HostName)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_host_name_type(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_host_name_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HostNameType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class RoutePolicy: IRoutePolicy} impl RtActivatable for RoutePolicy {} impl RoutePolicy { - #[inline] pub fn create_route_policy(connectionProfile: &ConnectionProfile, hostName: &super::HostName, type_: super::DomainNameType) -> Result> { unsafe { + #[inline] pub fn create_route_policy(connectionProfile: &ConnectionProfile, hostName: &super::HostName, type_: super::DomainNameType) -> Result> { >::get_activation_factory().create_route_policy(connectionProfile, hostName, type_) - }} + } } DEFINE_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]) [CLSID_RoutePolicy]); DEFINE_IID!(IID_IRoutePolicyFactory, 906131763, 41358, 19893, 166, 151, 245, 143, 167, 54, 78, 68); @@ -3471,11 +3471,11 @@ RT_INTERFACE!{static interface IRoutePolicyFactory(IRoutePolicyFactoryVtbl): IIn fn CreateRoutePolicy(&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(&self, connectionProfile: &ConnectionProfile, hostName: &super::HostName, type_: super::DomainNameType) -> Result> { + #[inline] pub fn create_route_policy(&self, connectionProfile: &ConnectionProfile, hostName: &super::HostName, type_: super::DomainNameType) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateRoutePolicy)(self as *const _ as *mut _, 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_ENUM! { enum TriStates: i32 { DoNotCare (TriStates_DoNotCare) = 0, No (TriStates_No) = 1, Yes (TriStates_Yes) = 2, @@ -3485,11 +3485,11 @@ RT_INTERFACE!{interface IWlanConnectionProfileDetails(IWlanConnectionProfileDeta fn GetConnectedSsid(&self, out: *mut HSTRING) -> HRESULT }} impl IWlanConnectionProfileDetails { - #[inline] pub unsafe fn get_connected_ssid(&self) -> Result { + #[inline] pub fn get_connected_ssid(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetConnectedSsid)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class WlanConnectionProfileDetails: IWlanConnectionProfileDetails} DEFINE_IID!(IID_IWwanConnectionProfileDetails, 239970558, 33631, 19955, 130, 253, 223, 85, 110, 188, 9, 239); @@ -3500,26 +3500,26 @@ RT_INTERFACE!{interface IWwanConnectionProfileDetails(IWwanConnectionProfileDeta fn GetCurrentDataClass(&self, out: *mut WwanDataClass) -> HRESULT }} impl IWwanConnectionProfileDetails { - #[inline] pub unsafe fn get_home_provider_id(&self) -> Result { + #[inline] pub fn get_home_provider_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HomeProviderId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_access_point_name(&self) -> Result { + }} + #[inline] pub fn get_access_point_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AccessPointName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_network_registration_state(&self) -> Result { + }} + #[inline] pub fn get_network_registration_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetNetworkRegistrationState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_data_class(&self) -> Result { + }} + #[inline] pub fn get_current_data_class(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetCurrentDataClass)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class WwanConnectionProfileDetails: IWwanConnectionProfileDetails} RT_ENUM! { enum WwanDataClass: u32 { @@ -3533,26 +3533,26 @@ pub mod backgroundtransfer { // Windows.Networking.BackgroundTransfer use ::prelude::*; 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(&self, uri: *mut super::super::foundation::Uri, resultFile: *mut super::super::storage::IStorageFile, out: *mut *mut DownloadOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn CreateDownloadFromFile(&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(&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 + #[cfg(feature="windows-storage")] fn CreateDownload(&self, uri: *mut foundation::Uri, resultFile: *mut super::super::storage::IStorageFile, out: *mut *mut DownloadOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn CreateDownloadFromFile(&self, uri: *mut 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(&self, uri: *mut foundation::Uri, resultFile: *mut super::super::storage::IStorageFile, requestBodyStream: *mut super::super::storage::streams::IInputStream, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IBackgroundDownloader { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn create_download(&self, uri: &super::super::foundation::Uri, resultFile: &super::super::storage::IStorageFile) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn create_download(&self, uri: &foundation::Uri, resultFile: &super::super::storage::IStorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDownload)(self as *const _ as *mut _, 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(&self, uri: &super::super::foundation::Uri, resultFile: &super::super::storage::IStorageFile, requestBodyFile: &super::super::storage::IStorageFile) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_download_from_file(&self, uri: &foundation::Uri, resultFile: &super::super::storage::IStorageFile, requestBodyFile: &super::super::storage::IStorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDownloadFromFile)(self as *const _ as *mut _, 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(&self, uri: &super::super::foundation::Uri, resultFile: &super::super::storage::IStorageFile, requestBodyStream: &super::super::storage::streams::IInputStream) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_download_async(&self, uri: &foundation::Uri, resultFile: &super::super::storage::IStorageFile, requestBodyStream: &super::super::storage::streams::IInputStream) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDownloadAsync)(self as *const _ as *mut _, 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) } - } + }} } RT_CLASS!{class BackgroundDownloader: IBackgroundDownloader} impl RtActivatable for BackgroundDownloader {} @@ -3561,21 +3561,21 @@ impl RtActivatable for BackgroundDownloader impl RtActivatable for BackgroundDownloader {} impl RtActivatable for BackgroundDownloader {} impl BackgroundDownloader { - #[inline] pub fn create_with_completion_group(completionGroup: &BackgroundTransferCompletionGroup) -> Result> { unsafe { + #[inline] pub fn create_with_completion_group(completionGroup: &BackgroundTransferCompletionGroup) -> Result> { >::get_activation_factory().create_with_completion_group(completionGroup) - }} - #[inline] pub fn get_current_downloads_async() -> Result>>> { unsafe { + } + #[inline] pub fn get_current_downloads_async() -> Result>>> { >::get_activation_factory().get_current_downloads_async() - }} - #[inline] pub fn get_current_downloads_for_group_async(group: &HStringArg) -> Result>>> { unsafe { + } + #[inline] pub fn get_current_downloads_for_group_async(group: &HStringArg) -> Result>>> { >::get_activation_factory().get_current_downloads_for_group_async(group) - }} - #[inline] pub fn get_current_downloads_for_transfer_group_async(group: &BackgroundTransferGroup) -> Result>>> { unsafe { + } + #[inline] pub fn get_current_downloads_for_transfer_group_async(group: &BackgroundTransferGroup) -> Result>>> { >::get_activation_factory().get_current_downloads_for_transfer_group_async(group) - }} - #[inline] pub fn request_unconstrained_downloads_async(operations: &super::super::foundation::collections::IIterable) -> Result>> { unsafe { + } + #[inline] pub fn request_unconstrained_downloads_async(operations: &foundation::collections::IIterable) -> Result>> { >::get_activation_factory().request_unconstrained_downloads_async(operations) - }} + } } DEFINE_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]) [CLSID_BackgroundDownloader]); DEFINE_IID!(IID_IBackgroundDownloader2, 2840221767, 13453, 18997, 137, 14, 138, 30, 243, 121, 132, 121); @@ -3592,112 +3592,112 @@ RT_INTERFACE!{interface IBackgroundDownloader2(IBackgroundDownloader2Vtbl): IIns #[cfg(feature="windows-ui")] fn put_FailureTileNotification(&self, value: *mut super::super::ui::notifications::TileNotification) -> HRESULT }} impl IBackgroundDownloader2 { - #[inline] pub unsafe fn get_transfer_group(&self) -> Result> { + #[inline] pub fn get_transfer_group(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TransferGroup)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_transfer_group(&self, value: &BackgroundTransferGroup) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_transfer_group(&self, value: &BackgroundTransferGroup) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TransferGroup)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_success_toast_notification(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SuccessToastNotification)(self 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 set_success_toast_notification(&self, value: &super::super::ui::notifications::ToastNotification) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_success_toast_notification(&self, value: &super::super::ui::notifications::ToastNotification) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SuccessToastNotification)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_failure_toast_notification(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FailureToastNotification)(self 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 set_failure_toast_notification(&self, value: &super::super::ui::notifications::ToastNotification) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_failure_toast_notification(&self, value: &super::super::ui::notifications::ToastNotification) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FailureToastNotification)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_success_tile_notification(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SuccessTileNotification)(self 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 set_success_tile_notification(&self, value: &super::super::ui::notifications::TileNotification) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_success_tile_notification(&self, value: &super::super::ui::notifications::TileNotification) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SuccessTileNotification)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_failure_tile_notification(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FailureTileNotification)(self 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 set_failure_tile_notification(&self, value: &super::super::ui::notifications::TileNotification) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_failure_tile_notification(&self, value: &super::super::ui::notifications::TileNotification) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FailureTileNotification)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut BackgroundTransferCompletionGroup) -> HRESULT }} impl IBackgroundDownloader3 { - #[inline] pub unsafe fn get_completion_group(&self) -> Result> { + #[inline] pub fn get_completion_group(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CompletionGroup)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, completionGroup: *mut BackgroundTransferCompletionGroup, out: *mut *mut BackgroundDownloader) -> HRESULT }} impl IBackgroundDownloaderFactory { - #[inline] pub unsafe fn create_with_completion_group(&self, completionGroup: &BackgroundTransferCompletionGroup) -> Result> { + #[inline] pub fn create_with_completion_group(&self, completionGroup: &BackgroundTransferCompletionGroup) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithCompletionGroup)(self as *const _ as *mut _, completionGroup as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetCurrentDownloadsForGroupAsync(&self, group: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn GetCurrentDownloadsAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetCurrentDownloadsForGroupAsync(&self, group: HSTRING, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IBackgroundDownloaderStaticMethods { - #[inline] pub unsafe fn get_current_downloads_async(&self) -> Result>>> { + #[inline] pub fn get_current_downloads_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentDownloadsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_downloads_for_group_async(&self, group: &HStringArg) -> Result>>> { + }} + #[inline] pub fn get_current_downloads_for_group_async(&self, group: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentDownloadsForGroupAsync)(self as *const _ as *mut _, 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(&self, group: *mut BackgroundTransferGroup, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn GetCurrentDownloadsForTransferGroupAsync(&self, group: *mut BackgroundTransferGroup, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IBackgroundDownloaderStaticMethods2 { - #[inline] pub unsafe fn get_current_downloads_for_transfer_group_async(&self, group: &BackgroundTransferGroup) -> Result>>> { + #[inline] pub fn get_current_downloads_for_transfer_group_async(&self, group: &BackgroundTransferGroup) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentDownloadsForTransferGroupAsync)(self as *const _ as *mut _, group as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(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(&self, operations: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn RequestUnconstrainedDownloadsAsync(&self, operations: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IBackgroundDownloaderUserConsent { - #[inline] pub unsafe fn request_unconstrained_downloads_async(&self, operations: &super::super::foundation::collections::IIterable) -> Result>> { + #[inline] pub fn request_unconstrained_downloads_async(&self, operations: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestUnconstrainedDownloadsAsync)(self as *const _ as *mut _, operations as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_STRUCT! { struct BackgroundDownloadProgress { BytesReceived: u64, TotalBytesToReceive: u64, Status: BackgroundTransferStatus, HasResponseChanged: bool, HasRestarted: bool, @@ -3721,55 +3721,55 @@ RT_INTERFACE!{interface IBackgroundTransferBase(IBackgroundTransferBaseVtbl): II fn put_CostPolicy(&self, value: BackgroundTransferCostPolicy) -> HRESULT }} impl IBackgroundTransferBase { - #[inline] pub unsafe fn set_request_header(&self, headerName: &HStringArg, headerValue: &HStringArg) -> Result<()> { + #[inline] pub fn set_request_header(&self, headerName: &HStringArg, headerValue: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetRequestHeader)(self as *const _ as *mut _, headerName.get(), headerValue.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-security")] #[inline] pub unsafe fn get_server_credential(&self) -> Result> { + }} + #[cfg(feature="windows-security")] #[inline] pub fn get_server_credential(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServerCredential)(self 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 set_server_credential(&self, credential: &super::super::security::credentials::PasswordCredential) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-security")] #[inline] pub fn set_server_credential(&self, credential: &super::super::security::credentials::PasswordCredential) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ServerCredential)(self as *const _ as *mut _, credential as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-security")] #[inline] pub unsafe fn get_proxy_credential(&self) -> Result> { + }} + #[cfg(feature="windows-security")] #[inline] pub fn get_proxy_credential(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProxyCredential)(self 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 set_proxy_credential(&self, credential: &super::super::security::credentials::PasswordCredential) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-security")] #[inline] pub fn set_proxy_credential(&self, credential: &super::super::security::credentials::PasswordCredential) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ProxyCredential)(self as *const _ as *mut _, credential as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_method(&self) -> Result { + }} + #[inline] pub fn get_method(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Method)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_method(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_method(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Method)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_group(&self) -> Result { + }} + #[inline] pub fn get_group(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Group)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_group(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_group(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Group)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_cost_policy(&self) -> Result { + }} + #[inline] pub fn get_cost_policy(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CostPolicy)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_cost_policy(&self, value: BackgroundTransferCostPolicy) -> Result<()> { + }} + #[inline] pub fn set_cost_policy(&self, value: BackgroundTransferCostPolicy) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CostPolicy)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum BackgroundTransferBehavior: i32 { Parallel (BackgroundTransferBehavior_Parallel) = 0, Serialized (BackgroundTransferBehavior_Serialized) = 1, @@ -3782,40 +3782,40 @@ RT_INTERFACE!{interface IBackgroundTransferCompletionGroup(IBackgroundTransferCo fn Enable(&self) -> HRESULT }} impl IBackgroundTransferCompletionGroup { - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn get_trigger(&self) -> Result> { + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn get_trigger(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Trigger)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_enabled(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn enable(&self) -> Result<()> { + }} + #[inline] pub fn enable(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Enable)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class BackgroundTransferCompletionGroup: IBackgroundTransferCompletionGroup} impl RtActivatable for BackgroundTransferCompletionGroup {} DEFINE_CLSID!(BackgroundTransferCompletionGroup(&[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,109,112,108,101,116,105,111,110,71,114,111,117,112,0]) [CLSID_BackgroundTransferCompletionGroup]); 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_Uploads(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_Downloads(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_Uploads(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IBackgroundTransferCompletionGroupTriggerDetails { - #[inline] pub unsafe fn get_downloads(&self) -> Result>> { + #[inline] pub fn get_downloads(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Downloads)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_uploads(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_uploads(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Uploads)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class BackgroundTransferCompletionGroupTriggerDetails: IBackgroundTransferCompletionGroupTriggerDetails} DEFINE_IID!(IID_IBackgroundTransferContentPart, 3907081815, 55249, 20184, 131, 142, 103, 74, 194, 23, 172, 230); @@ -3825,29 +3825,29 @@ RT_INTERFACE!{interface IBackgroundTransferContentPart(IBackgroundTransferConten #[cfg(feature="windows-storage")] fn SetFile(&self, value: *mut super::super::storage::IStorageFile) -> HRESULT }} impl IBackgroundTransferContentPart { - #[inline] pub unsafe fn set_header(&self, headerName: &HStringArg, headerValue: &HStringArg) -> Result<()> { + #[inline] pub fn set_header(&self, headerName: &HStringArg, headerValue: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetHeader)(self as *const _ as *mut _, headerName.get(), headerValue.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_text(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_text(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetText)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn set_file(&self, value: &super::super::storage::IStorageFile) -> Result<()> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_file(&self, value: &super::super::storage::IStorageFile) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetFile)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class BackgroundTransferContentPart: IBackgroundTransferContentPart} impl RtActivatable for BackgroundTransferContentPart {} impl RtActivatable for BackgroundTransferContentPart {} impl BackgroundTransferContentPart { - #[inline] pub fn create_with_name(name: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_with_name(name: &HStringArg) -> Result> { >::get_activation_factory().create_with_name(name) - }} - #[inline] pub fn create_with_name_and_file_name(name: &HStringArg, fileName: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_with_name_and_file_name(name: &HStringArg, fileName: &HStringArg) -> Result> { >::get_activation_factory().create_with_name_and_file_name(name, fileName) - }} + } } DEFINE_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]) [CLSID_BackgroundTransferContentPart]); DEFINE_IID!(IID_IBackgroundTransferContentPartFactory, 2431621289, 31233, 18955, 159, 128, 160, 176, 187, 55, 15, 141); @@ -3856,16 +3856,16 @@ RT_INTERFACE!{static interface IBackgroundTransferContentPartFactory(IBackground fn CreateWithNameAndFileName(&self, name: HSTRING, fileName: HSTRING, out: *mut *mut BackgroundTransferContentPart) -> HRESULT }} impl IBackgroundTransferContentPartFactory { - #[inline] pub unsafe fn create_with_name(&self, name: &HStringArg) -> Result> { + #[inline] pub fn create_with_name(&self, name: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithName)(self as *const _ as *mut _, 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(&self, name: &HStringArg, fileName: &HStringArg) -> Result> { + }} + #[inline] pub fn create_with_name_and_file_name(&self, name: &HStringArg, fileName: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithNameAndFileName)(self as *const _ as *mut _, name.get(), fileName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum BackgroundTransferCostPolicy: i32 { Default (BackgroundTransferCostPolicy_Default) = 0, UnrestrictedOnly (BackgroundTransferCostPolicy_UnrestrictedOnly) = 1, Always (BackgroundTransferCostPolicy_Always) = 2, @@ -3873,9 +3873,9 @@ RT_ENUM! { enum BackgroundTransferCostPolicy: i32 { RT_CLASS!{static class BackgroundTransferError} impl RtActivatable for BackgroundTransferError {} impl BackgroundTransferError { - #[cfg(feature="windows-web")] #[inline] pub fn get_status(hresult: i32) -> Result { unsafe { + #[cfg(feature="windows-web")] #[inline] pub fn get_status(hresult: i32) -> Result { >::get_activation_factory().get_status(hresult) - }} + } } DEFINE_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]) [CLSID_BackgroundTransferError]); DEFINE_IID!(IID_IBackgroundTransferErrorStaticMethods, 2865969924, 4498, 19444, 139, 104, 57, 197, 173, 210, 68, 226); @@ -3883,11 +3883,11 @@ RT_INTERFACE!{static interface IBackgroundTransferErrorStaticMethods(IBackground #[cfg(feature="windows-web")] fn GetStatus(&self, hresult: i32, out: *mut super::super::web::WebErrorStatus) -> HRESULT }} impl IBackgroundTransferErrorStaticMethods { - #[cfg(feature="windows-web")] #[inline] pub unsafe fn get_status(&self, hresult: i32) -> Result { + #[cfg(feature="windows-web")] #[inline] pub fn get_status(&self, hresult: i32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetStatus)(self as *const _ as *mut _, hresult, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_STRUCT! { struct BackgroundTransferFileRange { Offset: u64, Length: u64, @@ -3899,27 +3899,27 @@ RT_INTERFACE!{interface IBackgroundTransferGroup(IBackgroundTransferGroupVtbl): fn put_TransferBehavior(&self, value: BackgroundTransferBehavior) -> HRESULT }} impl IBackgroundTransferGroup { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_transfer_behavior(&self) -> Result { + }} + #[inline] pub fn get_transfer_behavior(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TransferBehavior)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_transfer_behavior(&self, value: BackgroundTransferBehavior) -> Result<()> { + }} + #[inline] pub fn set_transfer_behavior(&self, value: BackgroundTransferBehavior) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TransferBehavior)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class BackgroundTransferGroup: IBackgroundTransferGroup} impl RtActivatable for BackgroundTransferGroup {} impl BackgroundTransferGroup { - #[inline] pub fn create_group(name: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_group(name: &HStringArg) -> Result>> { >::get_activation_factory().create_group(name) - }} + } } DEFINE_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]) [CLSID_BackgroundTransferGroup]); DEFINE_IID!(IID_IBackgroundTransferGroupStatics, 49041586, 32024, 18779, 170, 34, 50, 169, 125, 69, 211, 226); @@ -3927,16 +3927,16 @@ RT_INTERFACE!{static interface IBackgroundTransferGroupStatics(IBackgroundTransf fn CreateGroup(&self, name: HSTRING, out: *mut *mut BackgroundTransferGroup) -> HRESULT }} impl IBackgroundTransferGroupStatics { - #[inline] pub unsafe fn create_group(&self, name: &HStringArg) -> Result> { + #[inline] pub fn create_group(&self, name: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateGroup)(self as *const _ as *mut _, name.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut Guid) -> HRESULT, - fn get_RequestedUri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn get_RequestedUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, fn get_Method(&self, out: *mut HSTRING) -> HRESULT, fn get_Group(&self, out: *mut HSTRING) -> HRESULT, fn get_CostPolicy(&self, out: *mut BackgroundTransferCostPolicy) -> HRESULT, @@ -3946,45 +3946,45 @@ RT_INTERFACE!{interface IBackgroundTransferOperation(IBackgroundTransferOperatio fn GetResponseInformation(&self, out: *mut *mut ResponseInformation) -> HRESULT }} impl IBackgroundTransferOperation { - #[inline] pub unsafe fn get_guid(&self) -> Result { + #[inline] pub fn get_guid(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Guid)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_requested_uri(&self) -> Result> { + }} + #[inline] pub fn get_requested_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RequestedUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_method(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_method(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Method)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_group(&self) -> Result { + }} + #[inline] pub fn get_group(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Group)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_cost_policy(&self) -> Result { + }} + #[inline] pub fn get_cost_policy(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CostPolicy)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_cost_policy(&self, value: BackgroundTransferCostPolicy) -> Result<()> { + }} + #[inline] pub fn set_cost_policy(&self, value: BackgroundTransferCostPolicy) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CostPolicy)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_result_stream_at(&self, position: u64) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_result_stream_at(&self, position: u64) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetResultStreamAt)(self as *const _ as *mut _, position, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_response_information(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_response_information(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetResponseInformation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IBackgroundTransferOperationPriority, 75842343, 21076, 19258, 145, 94, 10, 164, 146, 117, 192, 249); RT_INTERFACE!{interface IBackgroundTransferOperationPriority(IBackgroundTransferOperationPriorityVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundTransferOperationPriority] { @@ -3992,15 +3992,15 @@ RT_INTERFACE!{interface IBackgroundTransferOperationPriority(IBackgroundTransfer fn put_Priority(&self, value: BackgroundTransferPriority) -> HRESULT }} impl IBackgroundTransferOperationPriority { - #[inline] pub unsafe fn get_priority(&self) -> Result { + #[inline] pub fn get_priority(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Priority)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_priority(&self, value: BackgroundTransferPriority) -> Result<()> { + }} + #[inline] pub fn set_priority(&self, value: BackgroundTransferPriority) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Priority)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum BackgroundTransferPriority: i32 { Default (BackgroundTransferPriority_Default) = 0, High (BackgroundTransferPriority_High) = 1, @@ -4008,25 +4008,25 @@ RT_ENUM! { enum BackgroundTransferPriority: i32 { DEFINE_IID!(IID_IBackgroundTransferRangesDownloadedEventArgs, 1052537939, 48968, 19080, 146, 72, 176, 193, 101, 24, 79, 92); RT_INTERFACE!{interface IBackgroundTransferRangesDownloadedEventArgs(IBackgroundTransferRangesDownloadedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IBackgroundTransferRangesDownloadedEventArgs] { fn get_WasDownloadRestarted(&self, out: *mut bool) -> HRESULT, - fn get_AddedRanges(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + fn get_AddedRanges(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IBackgroundTransferRangesDownloadedEventArgs { - #[inline] pub unsafe fn get_was_download_restarted(&self) -> Result { + #[inline] pub fn get_was_download_restarted(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_WasDownloadRestarted)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_added_ranges(&self) -> Result>> { + }} + #[inline] pub fn get_added_ranges(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AddedRanges)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class BackgroundTransferRangesDownloadedEventArgs: IBackgroundTransferRangesDownloadedEventArgs} RT_ENUM! { enum BackgroundTransferStatus: i32 { @@ -4035,39 +4035,39 @@ RT_ENUM! { enum BackgroundTransferStatus: i32 { 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(&self) -> (), - #[cfg(feature="windows-storage")] fn CreateUpload(&self, uri: *mut super::super::foundation::Uri, sourceFile: *mut super::super::storage::IStorageFile, out: *mut *mut UploadOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn CreateUpload(&self, uri: *mut foundation::Uri, sourceFile: *mut super::super::storage::IStorageFile, out: *mut *mut UploadOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-storage")] fn CreateUploadFromStreamAsync(&self, uri: *mut super::super::foundation::Uri, sourceStream: *mut super::super::storage::streams::IInputStream, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CreateUploadWithFormDataAndAutoBoundaryAsync(&self, uri: *mut super::super::foundation::Uri, parts: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CreateUploadWithSubTypeAsync(&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(&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 + #[cfg(feature="windows-storage")] fn CreateUploadFromStreamAsync(&self, uri: *mut foundation::Uri, sourceStream: *mut super::super::storage::streams::IInputStream, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreateUploadWithFormDataAndAutoBoundaryAsync(&self, uri: *mut foundation::Uri, parts: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreateUploadWithSubTypeAsync(&self, uri: *mut foundation::Uri, parts: *mut foundation::collections::IIterable, subType: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreateUploadWithSubTypeAndBoundaryAsync(&self, uri: *mut foundation::Uri, parts: *mut foundation::collections::IIterable, subType: HSTRING, boundary: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IBackgroundUploader { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn create_upload(&self, uri: &super::super::foundation::Uri, sourceFile: &super::super::storage::IStorageFile) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn create_upload(&self, uri: &foundation::Uri, sourceFile: &super::super::storage::IStorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateUpload)(self as *const _ as *mut _, 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(&self, uri: &super::super::foundation::Uri, sourceStream: &super::super::storage::streams::IInputStream) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_upload_from_stream_async(&self, uri: &foundation::Uri, sourceStream: &super::super::storage::streams::IInputStream) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateUploadFromStreamAsync)(self as *const _ as *mut _, 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(&self, uri: &super::super::foundation::Uri, parts: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn create_upload_with_form_data_and_auto_boundary_async(&self, uri: &foundation::Uri, parts: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateUploadWithFormDataAndAutoBoundaryAsync)(self as *const _ as *mut _, 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(&self, uri: &super::super::foundation::Uri, parts: &super::super::foundation::collections::IIterable, subType: &HStringArg) -> Result>> { + }} + #[inline] pub fn create_upload_with_sub_type_async(&self, uri: &foundation::Uri, parts: &foundation::collections::IIterable, subType: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateUploadWithSubTypeAsync)(self as *const _ as *mut _, 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(&self, uri: &super::super::foundation::Uri, parts: &super::super::foundation::collections::IIterable, subType: &HStringArg, boundary: &HStringArg) -> Result>> { + }} + #[inline] pub fn create_upload_with_sub_type_and_boundary_async(&self, uri: &foundation::Uri, parts: &foundation::collections::IIterable, subType: &HStringArg, boundary: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateUploadWithSubTypeAndBoundaryAsync)(self as *const _ as *mut _, 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 BackgroundUploader: IBackgroundUploader} impl RtActivatable for BackgroundUploader {} @@ -4076,21 +4076,21 @@ impl RtActivatable for BackgroundUploader {} impl RtActivatable for BackgroundUploader {} impl RtActivatable for BackgroundUploader {} impl BackgroundUploader { - #[inline] pub fn create_with_completion_group(completionGroup: &BackgroundTransferCompletionGroup) -> Result> { unsafe { + #[inline] pub fn create_with_completion_group(completionGroup: &BackgroundTransferCompletionGroup) -> Result> { >::get_activation_factory().create_with_completion_group(completionGroup) - }} - #[inline] pub fn get_current_uploads_async() -> Result>>> { unsafe { + } + #[inline] pub fn get_current_uploads_async() -> Result>>> { >::get_activation_factory().get_current_uploads_async() - }} - #[inline] pub fn get_current_uploads_for_group_async(group: &HStringArg) -> Result>>> { unsafe { + } + #[inline] pub fn get_current_uploads_for_group_async(group: &HStringArg) -> Result>>> { >::get_activation_factory().get_current_uploads_for_group_async(group) - }} - #[inline] pub fn get_current_uploads_for_transfer_group_async(group: &BackgroundTransferGroup) -> Result>>> { unsafe { + } + #[inline] pub fn get_current_uploads_for_transfer_group_async(group: &BackgroundTransferGroup) -> Result>>> { >::get_activation_factory().get_current_uploads_for_transfer_group_async(group) - }} - #[inline] pub fn request_unconstrained_uploads_async(operations: &super::super::foundation::collections::IIterable) -> Result>> { unsafe { + } + #[inline] pub fn request_unconstrained_uploads_async(operations: &foundation::collections::IIterable) -> Result>> { >::get_activation_factory().request_unconstrained_uploads_async(operations) - }} + } } DEFINE_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]) [CLSID_BackgroundUploader]); DEFINE_IID!(IID_IBackgroundUploader2, 2382762702, 3124, 17507, 128, 127, 25, 138, 27, 139, 212, 173); @@ -4107,206 +4107,206 @@ RT_INTERFACE!{interface IBackgroundUploader2(IBackgroundUploader2Vtbl): IInspect #[cfg(feature="windows-ui")] fn put_FailureTileNotification(&self, value: *mut super::super::ui::notifications::TileNotification) -> HRESULT }} impl IBackgroundUploader2 { - #[inline] pub unsafe fn get_transfer_group(&self) -> Result> { + #[inline] pub fn get_transfer_group(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TransferGroup)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_transfer_group(&self, value: &BackgroundTransferGroup) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_transfer_group(&self, value: &BackgroundTransferGroup) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TransferGroup)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_success_toast_notification(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SuccessToastNotification)(self 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 set_success_toast_notification(&self, value: &super::super::ui::notifications::ToastNotification) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_success_toast_notification(&self, value: &super::super::ui::notifications::ToastNotification) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SuccessToastNotification)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_failure_toast_notification(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FailureToastNotification)(self 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 set_failure_toast_notification(&self, value: &super::super::ui::notifications::ToastNotification) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_failure_toast_notification(&self, value: &super::super::ui::notifications::ToastNotification) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FailureToastNotification)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_success_tile_notification(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SuccessTileNotification)(self 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 set_success_tile_notification(&self, value: &super::super::ui::notifications::TileNotification) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_success_tile_notification(&self, value: &super::super::ui::notifications::TileNotification) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SuccessTileNotification)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_failure_tile_notification(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FailureTileNotification)(self 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 set_failure_tile_notification(&self, value: &super::super::ui::notifications::TileNotification) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_failure_tile_notification(&self, value: &super::super::ui::notifications::TileNotification) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FailureTileNotification)(self as *const _ as *mut _, 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(&self, out: *mut *mut BackgroundTransferCompletionGroup) -> HRESULT }} impl IBackgroundUploader3 { - #[inline] pub unsafe fn get_completion_group(&self) -> Result> { + #[inline] pub fn get_completion_group(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CompletionGroup)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, completionGroup: *mut BackgroundTransferCompletionGroup, out: *mut *mut BackgroundUploader) -> HRESULT }} impl IBackgroundUploaderFactory { - #[inline] pub unsafe fn create_with_completion_group(&self, completionGroup: &BackgroundTransferCompletionGroup) -> Result> { + #[inline] pub fn create_with_completion_group(&self, completionGroup: &BackgroundTransferCompletionGroup) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithCompletionGroup)(self as *const _ as *mut _, completionGroup as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetCurrentUploadsForGroupAsync(&self, group: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn GetCurrentUploadsAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetCurrentUploadsForGroupAsync(&self, group: HSTRING, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IBackgroundUploaderStaticMethods { - #[inline] pub unsafe fn get_current_uploads_async(&self) -> Result>>> { + #[inline] pub fn get_current_uploads_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentUploadsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_uploads_for_group_async(&self, group: &HStringArg) -> Result>>> { + }} + #[inline] pub fn get_current_uploads_for_group_async(&self, group: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentUploadsForGroupAsync)(self as *const _ as *mut _, 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(&self, group: *mut BackgroundTransferGroup, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn GetCurrentUploadsForTransferGroupAsync(&self, group: *mut BackgroundTransferGroup, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IBackgroundUploaderStaticMethods2 { - #[inline] pub unsafe fn get_current_uploads_for_transfer_group_async(&self, group: &BackgroundTransferGroup) -> Result>>> { + #[inline] pub fn get_current_uploads_for_transfer_group_async(&self, group: &BackgroundTransferGroup) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentUploadsForTransferGroupAsync)(self as *const _ as *mut _, group as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, operations: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn RequestUnconstrainedUploadsAsync(&self, operations: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IBackgroundUploaderUserConsent { - #[inline] pub unsafe fn request_unconstrained_uploads_async(&self, operations: &super::super::foundation::collections::IIterable) -> Result>> { + #[inline] pub fn request_unconstrained_uploads_async(&self, operations: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestUnconstrainedUploadsAsync)(self as *const _ as *mut _, operations as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_STRUCT! { struct BackgroundUploadProgress { BytesReceived: u64, BytesSent: u64, TotalBytesToReceive: u64, TotalBytesToSend: u64, Status: BackgroundTransferStatus, HasResponseChanged: bool, HasRestarted: bool, }} 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn put_IndirectContentUri(&self, value: *mut super::super::foundation::Uri) -> HRESULT, - fn get_IndirectContentUri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT + fn get_ContentUris(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn put_IndirectContentUri(&self, value: *mut foundation::Uri) -> HRESULT, + fn get_IndirectContentUri(&self, out: *mut *mut foundation::Uri) -> HRESULT }} impl IContentPrefetcher { - #[inline] pub unsafe fn get_content_uris(&self) -> Result>> { + #[inline] pub fn get_content_uris(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContentUris)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_indirect_content_uri(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_indirect_content_uri(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IndirectContentUri)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_indirect_content_uri(&self) -> Result> { + }} + #[inline] pub fn get_indirect_content_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IndirectContentUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{static class ContentPrefetcher} impl RtActivatable for ContentPrefetcher {} impl RtActivatable for ContentPrefetcher {} impl ContentPrefetcher { - #[inline] pub fn get_content_uris() -> Result>> { unsafe { + #[inline] pub fn get_content_uris() -> Result>>> { >::get_activation_factory().get_content_uris() - }} - #[inline] pub fn set_indirect_content_uri(value: &super::super::foundation::Uri) -> Result<()> { unsafe { + } + #[inline] pub fn set_indirect_content_uri(value: &foundation::Uri) -> Result<()> { >::get_activation_factory().set_indirect_content_uri(value) - }} - #[inline] pub fn get_indirect_content_uri() -> Result> { unsafe { + } + #[inline] pub fn get_indirect_content_uri() -> Result>> { >::get_activation_factory().get_indirect_content_uri() - }} - #[inline] pub fn get_last_successful_prefetch_time() -> Result>> { unsafe { + } + #[inline] pub fn get_last_successful_prefetch_time() -> Result>>> { >::get_activation_factory().get_last_successful_prefetch_time() - }} + } } DEFINE_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]) [CLSID_ContentPrefetcher]); 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(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn get_LastSuccessfulPrefetchTime(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IContentPrefetcherTime { - #[inline] pub unsafe fn get_last_successful_prefetch_time(&self) -> Result>> { + #[inline] pub fn get_last_successful_prefetch_time(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LastSuccessfulPrefetchTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } 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(&self) -> (), #[cfg(feature="windows-storage")] fn get_ResultFile(&self, out: *mut *mut super::super::storage::IStorageFile) -> HRESULT, fn get_Progress(&self, out: *mut BackgroundDownloadProgress) -> HRESULT, - fn StartAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, - fn AttachAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, + fn StartAsync(&self, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + fn AttachAsync(&self, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, fn Pause(&self) -> HRESULT, fn Resume(&self) -> HRESULT }} impl IDownloadOperation { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_result_file(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_result_file(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResultFile)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_progress(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_progress(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Progress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn start_async(&self) -> Result>> { + }} + #[inline] pub fn start_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn attach_async(&self) -> Result>> { + }} + #[inline] pub fn attach_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AttachAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn pause(&self) -> Result<()> { + }} + #[inline] pub fn pause(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Pause)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn resume(&self) -> Result<()> { + }} + #[inline] pub fn resume(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Resume)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DownloadOperation: IDownloadOperation} DEFINE_IID!(IID_IDownloadOperation2, 2748116288, 36764, 17235, 156, 212, 41, 13, 238, 56, 124, 56); @@ -4314,11 +4314,11 @@ RT_INTERFACE!{interface IDownloadOperation2(IDownloadOperation2Vtbl): IInspectab fn get_TransferGroup(&self, out: *mut *mut BackgroundTransferGroup) -> HRESULT }} impl IDownloadOperation2 { - #[inline] pub unsafe fn get_transfer_group(&self) -> Result> { + #[inline] pub fn get_transfer_group(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TransferGroup)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IDownloadOperation3, 1344746780, 32094, 19164, 184, 211, 223, 92, 96, 49, 185, 204); RT_INTERFACE!{interface IDownloadOperation3(IDownloadOperation3Vtbl): IInspectable(IInspectableVtbl) [IID_IDownloadOperation3] { @@ -4326,85 +4326,85 @@ RT_INTERFACE!{interface IDownloadOperation3(IDownloadOperation3Vtbl): IInspectab fn put_IsRandomAccessRequired(&self, value: bool) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy2(&self) -> (), #[cfg(feature="windows-storage")] fn GetResultRandomAccessStreamReference(&self, out: *mut *mut super::super::storage::streams::IRandomAccessStreamReference) -> HRESULT, - fn GetDownloadedRanges(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn add_RangesDownloaded(&self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RangesDownloaded(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn put_RequestedUri(&self, value: *mut super::super::foundation::Uri) -> HRESULT, - #[cfg(feature="windows-web")] fn get_RecoverableWebErrorStatuses(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - #[cfg(feature="windows-web")] fn get_CurrentWebErrorStatus(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn GetDownloadedRanges(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn add_RangesDownloaded(&self, eventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RangesDownloaded(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT, + fn put_RequestedUri(&self, value: *mut foundation::Uri) -> HRESULT, + #[cfg(feature="windows-web")] fn get_RecoverableWebErrorStatuses(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + #[cfg(feature="windows-web")] fn get_CurrentWebErrorStatus(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IDownloadOperation3 { - #[inline] pub unsafe fn get_is_random_access_required(&self) -> Result { + #[inline] pub fn get_is_random_access_required(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsRandomAccessRequired)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_random_access_required(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_random_access_required(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsRandomAccessRequired)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_result_random_access_stream_reference(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_result_random_access_stream_reference(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetResultRandomAccessStreamReference)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_downloaded_ranges(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_downloaded_ranges(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDownloadedRanges)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_ranges_downloaded(&self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_ranges_downloaded(&self, eventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RangesDownloaded)(self as *const _ as *mut _, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_ranges_downloaded(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_ranges_downloaded(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RangesDownloaded)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_requested_uri(&self, value: &super::super::foundation::Uri) -> Result<()> { + }} + #[inline] pub fn set_requested_uri(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RequestedUri)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-web")] #[inline] pub unsafe fn get_recoverable_web_error_statuses(&self) -> Result>> { + }} + #[cfg(feature="windows-web")] #[inline] pub fn get_recoverable_web_error_statuses(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RecoverableWebErrorStatuses)(self 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 get_current_web_error_status(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-web")] #[inline] pub fn get_current_web_error_status(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CurrentWebErrorStatus)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut bool) -> HRESULT, - fn get_ActualUri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn get_ActualUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, fn get_StatusCode(&self, out: *mut u32) -> HRESULT, - fn get_Headers(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT + fn get_Headers(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT }} impl IResponseInformation { - #[inline] pub unsafe fn get_is_resumable(&self) -> Result { + #[inline] pub fn get_is_resumable(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsResumable)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_actual_uri(&self) -> Result> { + }} + #[inline] pub fn get_actual_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ActualUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_status_code(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_status_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StatusCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_headers(&self) -> Result>> { + }} + #[inline] pub fn get_headers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Headers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ResponseInformation: IResponseInformation} DEFINE_IID!(IID_IUnconstrainedTransferRequestResult, 1277474847, 55620, 16658, 169, 142, 106, 105, 82, 43, 126, 187); @@ -4412,11 +4412,11 @@ RT_INTERFACE!{interface IUnconstrainedTransferRequestResult(IUnconstrainedTransf fn get_IsUnconstrained(&self, out: *mut bool) -> HRESULT }} impl IUnconstrainedTransferRequestResult { - #[inline] pub unsafe fn get_is_unconstrained(&self) -> Result { + #[inline] pub fn get_is_unconstrained(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsUnconstrained)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class UnconstrainedTransferRequestResult: IUnconstrainedTransferRequestResult} DEFINE_IID!(IID_IUploadOperation, 1045832928, 29577, 17228, 139, 53, 66, 127, 211, 107, 189, 174); @@ -4424,30 +4424,30 @@ RT_INTERFACE!{interface IUploadOperation(IUploadOperationVtbl): IInspectable(IIn #[cfg(not(feature="windows-storage"))] fn __Dummy0(&self) -> (), #[cfg(feature="windows-storage")] fn get_SourceFile(&self, out: *mut *mut super::super::storage::IStorageFile) -> HRESULT, fn get_Progress(&self, out: *mut BackgroundUploadProgress) -> HRESULT, - fn StartAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, - fn AttachAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT + fn StartAsync(&self, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + fn AttachAsync(&self, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT }} impl IUploadOperation { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_source_file(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_source_file(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SourceFile)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_progress(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_progress(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Progress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn start_async(&self) -> Result>> { + }} + #[inline] pub fn start_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn attach_async(&self) -> Result>> { + }} + #[inline] pub fn attach_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AttachAsync)(self 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_IUploadOperation2, 1432455666, 10100, 19958, 159, 165, 32, 159, 43, 251, 18, 247); @@ -4455,11 +4455,11 @@ RT_INTERFACE!{interface IUploadOperation2(IUploadOperation2Vtbl): IInspectable(I fn get_TransferGroup(&self, out: *mut *mut BackgroundTransferGroup) -> HRESULT }} impl IUploadOperation2 { - #[inline] pub unsafe fn get_transfer_group(&self) -> Result> { + #[inline] pub fn get_transfer_group(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TransferGroup)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } } // Windows.Networking.BackgroundTransfer pub mod proximity { // Windows.Networking.Proximity @@ -4469,11 +4469,11 @@ RT_INTERFACE!{interface IConnectionRequestedEventArgs(IConnectionRequestedEventA fn get_PeerInformation(&self, out: *mut *mut PeerInformation) -> HRESULT }} impl IConnectionRequestedEventArgs { - #[inline] pub unsafe fn get_peer_information(&self) -> Result> { + #[inline] pub fn get_peer_information(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PeerInformation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ConnectionRequestedEventArgs: IConnectionRequestedEventArgs} DEFINE_IID!(IID_DeviceArrivedEventHandler, 4020886121, 63201, 18889, 164, 158, 142, 15, 197, 143, 185, 17); @@ -4481,40 +4481,40 @@ RT_DELEGATE!{delegate DeviceArrivedEventHandler(DeviceArrivedEventHandlerVtbl, D fn Invoke(&self, sender: *mut ProximityDevice) -> HRESULT }} impl DeviceArrivedEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &ProximityDevice) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &ProximityDevice) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, 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(&self, sender: *mut ProximityDevice) -> HRESULT }} impl DeviceDepartedEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &ProximityDevice) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &ProximityDevice) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, sender: *mut ProximityDevice, message: *mut ProximityMessage) -> HRESULT }} impl MessageReceivedHandler { - #[inline] pub unsafe fn invoke(&self, sender: &ProximityDevice, message: &ProximityMessage) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &ProximityDevice, message: &ProximityMessage) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, message as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, sender: *mut ProximityDevice, messageId: i64) -> HRESULT }} impl MessageTransmittedHandler { - #[inline] pub unsafe fn invoke(&self, sender: &ProximityDevice, messageId: i64) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &ProximityDevice, messageId: i64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, messageId); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum PeerDiscoveryTypes: u32 { None (PeerDiscoveryTypes_None) = 0, Browse (PeerDiscoveryTypes_Browse) = 1, Triggered (PeerDiscoveryTypes_Triggered) = 2, @@ -4523,78 +4523,78 @@ RT_CLASS!{static class PeerFinder} impl RtActivatable for PeerFinder {} impl RtActivatable for PeerFinder {} impl PeerFinder { - #[inline] pub fn get_allow_bluetooth() -> Result { unsafe { + #[inline] pub fn get_allow_bluetooth() -> Result { >::get_activation_factory().get_allow_bluetooth() - }} - #[inline] pub fn set_allow_bluetooth(value: bool) -> Result<()> { unsafe { + } + #[inline] pub fn set_allow_bluetooth(value: bool) -> Result<()> { >::get_activation_factory().set_allow_bluetooth(value) - }} - #[inline] pub fn get_allow_infrastructure() -> Result { unsafe { + } + #[inline] pub fn get_allow_infrastructure() -> Result { >::get_activation_factory().get_allow_infrastructure() - }} - #[inline] pub fn set_allow_infrastructure(value: bool) -> Result<()> { unsafe { + } + #[inline] pub fn set_allow_infrastructure(value: bool) -> Result<()> { >::get_activation_factory().set_allow_infrastructure(value) - }} - #[inline] pub fn get_allow_wi_fi_direct() -> Result { unsafe { + } + #[inline] pub fn get_allow_wi_fi_direct() -> Result { >::get_activation_factory().get_allow_wi_fi_direct() - }} - #[inline] pub fn set_allow_wi_fi_direct(value: bool) -> Result<()> { unsafe { + } + #[inline] pub fn set_allow_wi_fi_direct(value: bool) -> Result<()> { >::get_activation_factory().set_allow_wi_fi_direct(value) - }} - #[inline] pub fn get_display_name() -> Result { unsafe { + } + #[inline] pub fn get_display_name() -> Result { >::get_activation_factory().get_display_name() - }} - #[inline] pub fn set_display_name(value: &HStringArg) -> Result<()> { unsafe { + } + #[inline] pub fn set_display_name(value: &HStringArg) -> Result<()> { >::get_activation_factory().set_display_name(value) - }} - #[inline] pub fn get_supported_discovery_types() -> Result { unsafe { + } + #[inline] pub fn get_supported_discovery_types() -> Result { >::get_activation_factory().get_supported_discovery_types() - }} - #[inline] pub fn get_alternate_identities() -> Result>> { unsafe { + } + #[inline] pub fn get_alternate_identities() -> Result>>> { >::get_activation_factory().get_alternate_identities() - }} - #[inline] pub fn start() -> Result<()> { unsafe { + } + #[inline] pub fn start() -> Result<()> { >::get_activation_factory().start() - }} - #[inline] pub fn start_with_message(peerMessage: &HStringArg) -> Result<()> { unsafe { + } + #[inline] pub fn start_with_message(peerMessage: &HStringArg) -> Result<()> { >::get_activation_factory().start_with_message(peerMessage) - }} - #[inline] pub fn stop() -> Result<()> { unsafe { + } + #[inline] pub fn stop() -> Result<()> { >::get_activation_factory().stop() - }} - #[inline] pub fn add_triggered_connection_state_changed(handler: &super::super::foundation::TypedEventHandler) -> Result { unsafe { + } + #[inline] pub fn add_triggered_connection_state_changed(handler: &foundation::TypedEventHandler) -> Result { >::get_activation_factory().add_triggered_connection_state_changed(handler) - }} - #[inline] pub fn remove_triggered_connection_state_changed(cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_triggered_connection_state_changed(cookie: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_triggered_connection_state_changed(cookie) - }} - #[inline] pub fn add_connection_requested(handler: &super::super::foundation::TypedEventHandler) -> Result { unsafe { + } + #[inline] pub fn add_connection_requested(handler: &foundation::TypedEventHandler) -> Result { >::get_activation_factory().add_connection_requested(handler) - }} - #[inline] pub fn remove_connection_requested(cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_connection_requested(cookie: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_connection_requested(cookie) - }} - #[inline] pub fn find_all_peers_async() -> Result>>> { unsafe { + } + #[inline] pub fn find_all_peers_async() -> Result>>> { >::get_activation_factory().find_all_peers_async() - }} - #[inline] pub fn connect_async(peerInformation: &PeerInformation) -> Result>> { unsafe { + } + #[inline] pub fn connect_async(peerInformation: &PeerInformation) -> Result>> { >::get_activation_factory().connect_async(peerInformation) - }} - #[inline] pub fn get_role() -> Result { unsafe { + } + #[inline] pub fn get_role() -> Result { >::get_activation_factory().get_role() - }} - #[inline] pub fn set_role(value: PeerRole) -> Result<()> { unsafe { + } + #[inline] pub fn set_role(value: PeerRole) -> Result<()> { >::get_activation_factory().set_role(value) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn get_discovery_data() -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn get_discovery_data() -> Result>> { >::get_activation_factory().get_discovery_data() - }} - #[cfg(feature="windows-storage")] #[inline] pub fn set_discovery_data(value: &super::super::storage::streams::IBuffer) -> Result<()> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn set_discovery_data(value: &super::super::storage::streams::IBuffer) -> Result<()> { >::get_activation_factory().set_discovery_data(value) - }} - #[inline] pub fn create_watcher() -> Result> { unsafe { + } + #[inline] pub fn create_watcher() -> Result>> { >::get_activation_factory().create_watcher() - }} + } } DEFINE_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]) [CLSID_PeerFinder]); DEFINE_IID!(IID_IPeerFinderStatics, 2437626721, 63201, 18372, 161, 76, 20, 138, 25, 3, 208, 198); @@ -4608,104 +4608,104 @@ RT_INTERFACE!{static interface IPeerFinderStatics(IPeerFinderStaticsVtbl): IInsp fn get_DisplayName(&self, out: *mut HSTRING) -> HRESULT, fn put_DisplayName(&self, value: HSTRING) -> HRESULT, fn get_SupportedDiscoveryTypes(&self, out: *mut PeerDiscoveryTypes) -> HRESULT, - fn get_AlternateIdentities(&self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, + fn get_AlternateIdentities(&self, out: *mut *mut foundation::collections::IMap) -> HRESULT, fn Start(&self) -> HRESULT, fn StartWithMessage(&self, peerMessage: HSTRING) -> HRESULT, fn Stop(&self) -> HRESULT, - fn add_TriggeredConnectionStateChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_TriggeredConnectionStateChanged(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ConnectionRequested(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ConnectionRequested(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn FindAllPeersAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn ConnectAsync(&self, peerInformation: *mut PeerInformation, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn add_TriggeredConnectionStateChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_TriggeredConnectionStateChanged(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_ConnectionRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ConnectionRequested(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn FindAllPeersAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn ConnectAsync(&self, peerInformation: *mut PeerInformation, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IPeerFinderStatics { - #[inline] pub unsafe fn get_allow_bluetooth(&self) -> Result { + #[inline] pub fn get_allow_bluetooth(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AllowBluetooth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_allow_bluetooth(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_allow_bluetooth(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AllowBluetooth)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_allow_infrastructure(&self) -> Result { + }} + #[inline] pub fn get_allow_infrastructure(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AllowInfrastructure)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_allow_infrastructure(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_allow_infrastructure(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AllowInfrastructure)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_allow_wi_fi_direct(&self) -> Result { + }} + #[inline] pub fn get_allow_wi_fi_direct(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AllowWiFiDirect)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_allow_wi_fi_direct(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_allow_wi_fi_direct(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AllowWiFiDirect)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_display_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_discovery_types(&self) -> Result { + }} + #[inline] pub fn get_supported_discovery_types(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SupportedDiscoveryTypes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_alternate_identities(&self) -> Result>> { + }} + #[inline] pub fn get_alternate_identities(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AlternateIdentities)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start_with_message(&self, peerMessage: &HStringArg) -> Result<()> { + }} + #[inline] pub fn start_with_message(&self, peerMessage: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StartWithMessage)(self as *const _ as *mut _, peerMessage.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_triggered_connection_state_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_triggered_connection_state_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_TriggeredConnectionStateChanged)(self as *const _ as *mut _, 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(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_triggered_connection_state_changed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_TriggeredConnectionStateChanged)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_connection_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_connection_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ConnectionRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_connection_requested(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_connection_requested(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ConnectionRequested)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn find_all_peers_async(&self) -> Result>>> { + }} + #[inline] pub fn find_all_peers_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllPeersAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn connect_async(&self, peerInformation: &PeerInformation) -> Result>> { + }} + #[inline] pub fn connect_async(&self, peerInformation: &PeerInformation) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConnectAsync)(self as *const _ as *mut _, 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] { @@ -4718,40 +4718,40 @@ RT_INTERFACE!{static interface IPeerFinderStatics2(IPeerFinderStatics2Vtbl): IIn fn CreateWatcher(&self, out: *mut *mut PeerWatcher) -> HRESULT }} impl IPeerFinderStatics2 { - #[inline] pub unsafe fn get_role(&self) -> Result { + #[inline] pub fn get_role(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Role)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_role(&self, value: PeerRole) -> Result<()> { + }} + #[inline] pub fn set_role(&self, value: PeerRole) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Role)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_discovery_data(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_discovery_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DiscoveryData)(self 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_discovery_data(&self, value: &super::super::storage::streams::IBuffer) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_discovery_data(&self, value: &super::super::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DiscoveryData)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn create_watcher(&self) -> Result> { + }} + #[inline] pub fn create_watcher(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWatcher)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut HSTRING) -> HRESULT }} impl IPeerInformation { - #[inline] pub unsafe fn get_display_name(&self) -> Result { + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PeerInformation: IPeerInformation} DEFINE_IID!(IID_IPeerInformation3, 2987352362, 56272, 16632, 149, 189, 45, 66, 9, 199, 131, 111); @@ -4760,16 +4760,16 @@ RT_INTERFACE!{interface IPeerInformation3(IPeerInformation3Vtbl): IInspectable(I #[cfg(feature="windows-storage")] fn get_DiscoveryData(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT }} impl IPeerInformation3 { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self 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 get_discovery_data(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_discovery_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DiscoveryData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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] { @@ -4777,95 +4777,95 @@ RT_INTERFACE!{interface IPeerInformationWithHostAndService(IPeerInformationWithH fn get_ServiceName(&self, out: *mut HSTRING) -> HRESULT }} impl IPeerInformationWithHostAndService { - #[inline] pub unsafe fn get_host_name(&self) -> Result> { + #[inline] pub fn get_host_name(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HostName)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_service_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServiceName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum PeerRole: i32 { Peer (PeerRole_Peer) = 0, Host (PeerRole_Host) = 1, Client (PeerRole_Client) = 2, }} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Added(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Removed(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Removed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Updated(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Updated(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_EnumerationCompleted(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_EnumerationCompleted(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Stopped(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Stopped(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Added(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Added(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Removed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Removed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Updated(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Updated(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_EnumerationCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnumerationCompleted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Stopped(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Stopped(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_Status(&self, out: *mut PeerWatcherStatus) -> HRESULT, fn Start(&self) -> HRESULT, fn Stop(&self) -> HRESULT }} impl IPeerWatcher { - #[inline] pub unsafe fn add_added(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_added(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Added)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_added(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_added(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Added)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_removed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_removed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Removed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_removed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_removed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Removed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_updated(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_updated(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Updated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_updated(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_updated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Updated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_enumeration_completed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_enumeration_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_EnumerationCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_enumeration_completed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_enumeration_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_EnumerationCompleted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_stopped(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_stopped(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Stopped)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_stopped(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_stopped(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Stopped)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PeerWatcher: IPeerWatcher} RT_ENUM! { enum PeerWatcherStatus: i32 { @@ -4880,108 +4880,108 @@ RT_INTERFACE!{interface IProximityDevice(IProximityDeviceVtbl): IInspectable(IIn #[cfg(feature="windows-storage")] fn PublishBinaryMessage(&self, messageType: HSTRING, message: *mut super::super::storage::streams::IBuffer, out: *mut i64) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy4(&self) -> (), #[cfg(feature="windows-storage")] fn PublishBinaryMessageWithCallback(&self, messageType: HSTRING, message: *mut super::super::storage::streams::IBuffer, messageTransmittedHandler: *mut MessageTransmittedHandler, out: *mut i64) -> HRESULT, - fn PublishUriMessage(&self, message: *mut super::super::foundation::Uri, out: *mut i64) -> HRESULT, - fn PublishUriMessageWithCallback(&self, message: *mut super::super::foundation::Uri, messageTransmittedHandler: *mut MessageTransmittedHandler, out: *mut i64) -> HRESULT, + fn PublishUriMessage(&self, message: *mut foundation::Uri, out: *mut i64) -> HRESULT, + fn PublishUriMessageWithCallback(&self, message: *mut foundation::Uri, messageTransmittedHandler: *mut MessageTransmittedHandler, out: *mut i64) -> HRESULT, fn StopSubscribingForMessage(&self, subscriptionId: i64) -> HRESULT, fn StopPublishingMessage(&self, messageId: i64) -> HRESULT, - fn add_DeviceArrived(&self, arrivedHandler: *mut DeviceArrivedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DeviceArrived(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_DeviceDeparted(&self, departedHandler: *mut DeviceDepartedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DeviceDeparted(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_DeviceArrived(&self, arrivedHandler: *mut DeviceArrivedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DeviceArrived(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_DeviceDeparted(&self, departedHandler: *mut DeviceDepartedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DeviceDeparted(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, fn get_MaxMessageBytes(&self, out: *mut u32) -> HRESULT, fn get_BitsPerSecond(&self, out: *mut u64) -> HRESULT, fn get_DeviceId(&self, out: *mut HSTRING) -> HRESULT }} impl IProximityDevice { - #[inline] pub unsafe fn subscribe_for_message(&self, messageType: &HStringArg, messageReceivedHandler: &MessageReceivedHandler) -> Result { + #[inline] pub fn subscribe_for_message(&self, messageType: &HStringArg, messageReceivedHandler: &MessageReceivedHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).SubscribeForMessage)(self as *const _ as *mut _, messageType.get(), messageReceivedHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn publish_message(&self, messageType: &HStringArg, message: &HStringArg) -> Result { + }} + #[inline] pub fn publish_message(&self, messageType: &HStringArg, message: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).PublishMessage)(self as *const _ as *mut _, messageType.get(), message.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn publish_message_with_callback(&self, messageType: &HStringArg, message: &HStringArg, messageTransmittedHandler: &MessageTransmittedHandler) -> Result { + }} + #[inline] pub fn publish_message_with_callback(&self, messageType: &HStringArg, message: &HStringArg, messageTransmittedHandler: &MessageTransmittedHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).PublishMessageWithCallback)(self as *const _ as *mut _, 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(&self, messageType: &HStringArg, message: &super::super::storage::streams::IBuffer) -> Result { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn publish_binary_message(&self, messageType: &HStringArg, message: &super::super::storage::streams::IBuffer) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).PublishBinaryMessage)(self as *const _ as *mut _, 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(&self, messageType: &HStringArg, message: &super::super::storage::streams::IBuffer, messageTransmittedHandler: &MessageTransmittedHandler) -> Result { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn publish_binary_message_with_callback(&self, messageType: &HStringArg, message: &super::super::storage::streams::IBuffer, messageTransmittedHandler: &MessageTransmittedHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).PublishBinaryMessageWithCallback)(self as *const _ as *mut _, 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(&self, message: &super::super::foundation::Uri) -> Result { + }} + #[inline] pub fn publish_uri_message(&self, message: &foundation::Uri) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).PublishUriMessage)(self as *const _ as *mut _, 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(&self, message: &super::super::foundation::Uri, messageTransmittedHandler: &MessageTransmittedHandler) -> Result { + }} + #[inline] pub fn publish_uri_message_with_callback(&self, message: &foundation::Uri, messageTransmittedHandler: &MessageTransmittedHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).PublishUriMessageWithCallback)(self as *const _ as *mut _, 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(&self, subscriptionId: i64) -> Result<()> { + }} + #[inline] pub fn stop_subscribing_for_message(&self, subscriptionId: i64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StopSubscribingForMessage)(self as *const _ as *mut _, subscriptionId); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop_publishing_message(&self, messageId: i64) -> Result<()> { + }} + #[inline] pub fn stop_publishing_message(&self, messageId: i64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StopPublishingMessage)(self as *const _ as *mut _, messageId); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_device_arrived(&self, arrivedHandler: &DeviceArrivedEventHandler) -> Result { + }} + #[inline] pub fn add_device_arrived(&self, arrivedHandler: &DeviceArrivedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DeviceArrived)(self as *const _ as *mut _, arrivedHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_device_arrived(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_device_arrived(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DeviceArrived)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_device_departed(&self, departedHandler: &DeviceDepartedEventHandler) -> Result { + }} + #[inline] pub fn add_device_departed(&self, departedHandler: &DeviceDepartedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DeviceDeparted)(self as *const _ as *mut _, departedHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_device_departed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_device_departed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DeviceDeparted)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_message_bytes(&self) -> Result { + }} + #[inline] pub fn get_max_message_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxMessageBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_bits_per_second(&self) -> Result { + }} + #[inline] pub fn get_bits_per_second(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BitsPerSecond)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_id(&self) -> Result { + }} + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ProximityDevice: IProximityDevice} impl RtActivatable for ProximityDevice {} impl ProximityDevice { - #[inline] pub fn get_device_selector() -> Result { unsafe { + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} - #[inline] pub fn get_default() -> Result> { unsafe { + } + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} - #[inline] pub fn from_id(deviceId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn from_id(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().from_id(deviceId) - }} + } } DEFINE_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]) [CLSID_ProximityDevice]); DEFINE_IID!(IID_IProximityDeviceStatics, 2437652509, 63201, 18372, 161, 76, 20, 138, 25, 3, 208, 198); @@ -4991,21 +4991,21 @@ RT_INTERFACE!{static interface IProximityDeviceStatics(IProximityDeviceStaticsVt fn FromId(&self, deviceId: HSTRING, out: *mut *mut ProximityDevice) -> HRESULT }} impl IProximityDeviceStatics { - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_default(&self) -> Result> { + }} + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn from_id(&self, deviceId: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn from_id(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromId)(self as *const _ as *mut _, deviceId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IProximityMessage, 4020963202, 63201, 18037, 160, 69, 216, 227, 32, 194, 72, 8); RT_INTERFACE!{interface IProximityMessage(IProximityMessageVtbl): IInspectable(IInspectableVtbl) [IID_IProximityMessage] { @@ -5016,26 +5016,26 @@ RT_INTERFACE!{interface IProximityMessage(IProximityMessageVtbl): IInspectable(I fn get_DataAsString(&self, out: *mut HSTRING) -> HRESULT }} impl IProximityMessage { - #[inline] pub unsafe fn get_message_type(&self) -> Result { + #[inline] pub fn get_message_type(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MessageType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_subscription_id(&self) -> Result { + }} + #[inline] pub fn get_subscription_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SubscriptionId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_data(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Data)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_data_as_string(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_data_as_string(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DataAsString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ProximityMessage: IProximityMessage} DEFINE_IID!(IID_ITriggeredConnectionStateChangedEventArgs, 3332866221, 63201, 19796, 150, 226, 51, 246, 32, 188, 168, 138); @@ -5045,21 +5045,21 @@ RT_INTERFACE!{interface ITriggeredConnectionStateChangedEventArgs(ITriggeredConn fn get_Socket(&self, out: *mut *mut super::sockets::StreamSocket) -> HRESULT }} impl ITriggeredConnectionStateChangedEventArgs { - #[inline] pub unsafe fn get_state(&self) -> Result { + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&self) -> Result { + }} + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_socket(&self) -> Result> { + }} + #[inline] pub fn get_socket(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Socket)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class TriggeredConnectionStateChangedEventArgs: ITriggeredConnectionStateChangedEventArgs} RT_ENUM! { enum TriggeredConnectState: i32 { @@ -5076,21 +5076,21 @@ RT_INTERFACE!{interface IDnssdRegistrationResult(IDnssdRegistrationResultVtbl): fn get_HasInstanceNameChanged(&self, out: *mut bool) -> HRESULT }} impl IDnssdRegistrationResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ipaddress(&self) -> Result> { + }} + #[inline] pub fn get_ipaddress(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IPAddress)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_instance_name_changed(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_has_instance_name_changed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasInstanceNameChanged)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class DnssdRegistrationResult: IDnssdRegistrationResult} impl RtActivatable for DnssdRegistrationResult {} @@ -5110,157 +5110,157 @@ RT_INTERFACE!{interface IDnssdServiceInstance(IDnssdServiceInstanceVtbl): IInspe fn put_Priority(&self, value: u16) -> HRESULT, fn get_Weight(&self, out: *mut u16) -> HRESULT, fn put_Weight(&self, value: u16) -> HRESULT, - fn get_TextAttributes(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMap) -> HRESULT, - fn RegisterStreamSocketListenerAsync1(&self, socket: *mut super::super::sockets::StreamSocketListener, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn RegisterStreamSocketListenerAsync2(&self, socket: *mut super::super::sockets::StreamSocketListener, adapter: *mut super::super::connectivity::NetworkAdapter, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn RegisterDatagramSocketAsync1(&self, socket: *mut super::super::sockets::DatagramSocket, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn RegisterDatagramSocketAsync2(&self, socket: *mut super::super::sockets::DatagramSocket, adapter: *mut super::super::connectivity::NetworkAdapter, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn get_TextAttributes(&self, out: *mut *mut foundation::collections::IMap) -> HRESULT, + fn RegisterStreamSocketListenerAsync1(&self, socket: *mut super::super::sockets::StreamSocketListener, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RegisterStreamSocketListenerAsync2(&self, socket: *mut super::super::sockets::StreamSocketListener, adapter: *mut super::super::connectivity::NetworkAdapter, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RegisterDatagramSocketAsync1(&self, socket: *mut super::super::sockets::DatagramSocket, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RegisterDatagramSocketAsync2(&self, socket: *mut super::super::sockets::DatagramSocket, adapter: *mut super::super::connectivity::NetworkAdapter, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IDnssdServiceInstance { - #[inline] pub unsafe fn get_dnssd_service_instance_name(&self) -> Result { + #[inline] pub fn get_dnssd_service_instance_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DnssdServiceInstanceName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_dnssd_service_instance_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_dnssd_service_instance_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DnssdServiceInstanceName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_host_name(&self) -> Result> { + }} + #[inline] pub fn get_host_name(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HostName)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_host_name(&self, value: &super::super::HostName) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_host_name(&self, value: &super::super::HostName) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_HostName)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_port(&self) -> Result { + }} + #[inline] pub fn get_port(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Port)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_port(&self, value: u16) -> Result<()> { + }} + #[inline] pub fn set_port(&self, value: u16) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Port)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_priority(&self) -> Result { + }} + #[inline] pub fn get_priority(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Priority)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_priority(&self, value: u16) -> Result<()> { + }} + #[inline] pub fn set_priority(&self, value: u16) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Priority)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_weight(&self) -> Result { + }} + #[inline] pub fn get_weight(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Weight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_weight(&self, value: u16) -> Result<()> { + }} + #[inline] pub fn set_weight(&self, value: u16) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Weight)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_text_attributes(&self) -> Result>> { + }} + #[inline] pub fn get_text_attributes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TextAttributes)(self 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_async1(&self, socket: &super::super::sockets::StreamSocketListener) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn register_stream_socket_listener_async1(&self, socket: &super::super::sockets::StreamSocketListener) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RegisterStreamSocketListenerAsync1)(self as *const _ as *mut _, 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(&self, socket: &super::super::sockets::StreamSocketListener, adapter: &super::super::connectivity::NetworkAdapter) -> Result>> { + }} + #[inline] pub fn register_stream_socket_listener_async2(&self, socket: &super::super::sockets::StreamSocketListener, adapter: &super::super::connectivity::NetworkAdapter) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RegisterStreamSocketListenerAsync2)(self as *const _ as *mut _, 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(&self, socket: &super::super::sockets::DatagramSocket) -> Result>> { + }} + #[inline] pub fn register_datagram_socket_async1(&self, socket: &super::super::sockets::DatagramSocket) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RegisterDatagramSocketAsync1)(self as *const _ as *mut _, 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(&self, socket: &super::super::sockets::DatagramSocket, adapter: &super::super::connectivity::NetworkAdapter) -> Result>> { + }} + #[inline] pub fn register_datagram_socket_async2(&self, socket: &super::super::sockets::DatagramSocket, adapter: &super::super::connectivity::NetworkAdapter) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RegisterDatagramSocketAsync2)(self as *const _ as *mut _, 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 DnssdServiceInstance: IDnssdServiceInstance} impl RtActivatable for DnssdServiceInstance {} impl DnssdServiceInstance { - #[inline] pub fn create(dnssdServiceInstanceName: &HStringArg, hostName: &super::super::HostName, port: u16) -> Result> { unsafe { + #[inline] pub fn create(dnssdServiceInstanceName: &HStringArg, hostName: &super::super::HostName, port: u16) -> Result> { >::get_activation_factory().create(dnssdServiceInstanceName, hostName, port) - }} + } } DEFINE_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]) [CLSID_DnssdServiceInstance]); -RT_CLASS!{class DnssdServiceInstanceCollection: ::rt::gen::windows::foundation::collections::IVectorView} +RT_CLASS!{class DnssdServiceInstanceCollection: foundation::collections::IVectorView} 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(&self, dnssdServiceInstanceName: HSTRING, hostName: *mut super::super::HostName, port: u16, out: *mut *mut DnssdServiceInstance) -> HRESULT }} impl IDnssdServiceInstanceFactory { - #[inline] pub unsafe fn create(&self, dnssdServiceInstanceName: &HStringArg, hostName: &super::super::HostName, port: u16) -> Result> { + #[inline] pub fn create(&self, dnssdServiceInstanceName: &HStringArg, hostName: &super::super::HostName, port: u16) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, dnssdServiceInstanceName.get(), hostName as *const _ as *mut _, port, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Added(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_EnumerationCompleted(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_EnumerationCompleted(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_Stopped(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Stopped(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_Added(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Added(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_EnumerationCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnumerationCompleted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Stopped(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Stopped(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_Status(&self, out: *mut DnssdServiceWatcherStatus) -> HRESULT, fn Start(&self) -> HRESULT, fn Stop(&self) -> HRESULT }} impl IDnssdServiceWatcher { - #[inline] pub unsafe fn add_added(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub fn add_added(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Added)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_added(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_added(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Added)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_enumeration_completed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_enumeration_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_EnumerationCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_enumeration_completed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_enumeration_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_EnumerationCompleted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_stopped(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_stopped(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Stopped)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_stopped(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_stopped(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Stopped)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DnssdServiceWatcher: IDnssdServiceWatcher} RT_ENUM! { enum DnssdServiceWatcherStatus: i32 { @@ -5290,67 +5290,67 @@ RT_INTERFACE!{interface IControlChannelTrigger(IControlChannelTriggerVtbl): IIns fn FlushTransport(&self) -> HRESULT }} impl IControlChannelTrigger { - #[inline] pub unsafe fn get_control_channel_trigger_id(&self) -> Result { + #[inline] pub fn get_control_channel_trigger_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ControlChannelTriggerId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_server_keep_alive_interval_in_minutes(&self) -> Result { + }} + #[inline] pub fn get_server_keep_alive_interval_in_minutes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ServerKeepAliveIntervalInMinutes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_server_keep_alive_interval_in_minutes(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_server_keep_alive_interval_in_minutes(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ServerKeepAliveIntervalInMinutes)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_keep_alive_interval_in_minutes(&self) -> Result { + }} + #[inline] pub fn get_current_keep_alive_interval_in_minutes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CurrentKeepAliveIntervalInMinutes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_transport_object(&self) -> Result> { + }} + #[inline] pub fn get_transport_object(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TransportObject)(self as *const _ as *mut _, &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(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn get_keep_alive_trigger(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_KeepAliveTrigger)(self as *const _ as *mut _, &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(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn get_push_notification_trigger(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PushNotificationTrigger)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn using_transport(&self, transport: &IInspectable) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn using_transport(&self, transport: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).UsingTransport)(self as *const _ as *mut _, transport as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn wait_for_push_enabled(&self) -> Result { + }} + #[inline] pub fn wait_for_push_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).WaitForPushEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn decrease_network_keep_alive_interval(&self) -> Result<()> { + }} + #[inline] pub fn decrease_network_keep_alive_interval(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).DecreaseNetworkKeepAliveInterval)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn flush_transport(&self) -> Result<()> { + }} + #[inline] pub fn flush_transport(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).FlushTransport)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ControlChannelTrigger: IControlChannelTrigger} impl RtActivatable for ControlChannelTrigger {} impl ControlChannelTrigger { - #[inline] pub fn create_control_channel_trigger(channelId: &HStringArg, serverKeepAliveIntervalInMinutes: u32) -> Result> { unsafe { + #[inline] pub fn create_control_channel_trigger(channelId: &HStringArg, serverKeepAliveIntervalInMinutes: u32) -> Result> { >::get_activation_factory().create_control_channel_trigger(channelId, serverKeepAliveIntervalInMinutes) - }} - #[inline] pub fn create_control_channel_trigger_ex(channelId: &HStringArg, serverKeepAliveIntervalInMinutes: u32, resourceRequestType: ControlChannelTriggerResourceType) -> Result> { unsafe { + } + #[inline] pub fn create_control_channel_trigger_ex(channelId: &HStringArg, serverKeepAliveIntervalInMinutes: u32, resourceRequestType: ControlChannelTriggerResourceType) -> Result> { >::get_activation_factory().create_control_channel_trigger_ex(channelId, serverKeepAliveIntervalInMinutes, resourceRequestType) - }} + } } DEFINE_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]) [CLSID_ControlChannelTrigger]); DEFINE_IID!(IID_IControlChannelTrigger2, 2936066615, 20926, 17684, 151, 37, 53, 86, 225, 135, 149, 128); @@ -5358,22 +5358,22 @@ RT_INTERFACE!{interface IControlChannelTrigger2(IControlChannelTrigger2Vtbl): II fn get_IsWakeFromLowPowerSupported(&self, out: *mut bool) -> HRESULT }} impl IControlChannelTrigger2 { - #[inline] pub unsafe fn get_is_wake_from_low_power_supported(&self) -> Result { + #[inline] pub fn get_is_wake_from_low_power_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsWakeFromLowPowerSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut ControlChannelTrigger) -> HRESULT }} impl IControlChannelTriggerEventDetails { - #[inline] pub unsafe fn get_control_channel_trigger(&self) -> Result> { + #[inline] pub fn get_control_channel_trigger(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ControlChannelTrigger)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } 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] { @@ -5381,16 +5381,16 @@ RT_INTERFACE!{static interface IControlChannelTriggerFactory(IControlChannelTrig fn CreateControlChannelTriggerEx(&self, channelId: HSTRING, serverKeepAliveIntervalInMinutes: u32, resourceRequestType: ControlChannelTriggerResourceType, out: *mut *mut ControlChannelTrigger) -> HRESULT }} impl IControlChannelTriggerFactory { - #[inline] pub unsafe fn create_control_channel_trigger(&self, channelId: &HStringArg, serverKeepAliveIntervalInMinutes: u32) -> Result> { + #[inline] pub fn create_control_channel_trigger(&self, channelId: &HStringArg, serverKeepAliveIntervalInMinutes: u32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateControlChannelTrigger)(self as *const _ as *mut _, 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(&self, channelId: &HStringArg, serverKeepAliveIntervalInMinutes: u32, resourceRequestType: ControlChannelTriggerResourceType) -> Result> { + }} + #[inline] pub fn create_control_channel_trigger_ex(&self, channelId: &HStringArg, serverKeepAliveIntervalInMinutes: u32, resourceRequestType: ControlChannelTriggerResourceType) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateControlChannelTriggerEx)(self as *const _ as *mut _, channelId.get(), serverKeepAliveIntervalInMinutes, resourceRequestType, &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] { @@ -5399,21 +5399,21 @@ RT_INTERFACE!{interface IControlChannelTriggerResetEventDetails(IControlChannelT fn get_SoftwareSlotReset(&self, out: *mut bool) -> HRESULT }} impl IControlChannelTriggerResetEventDetails { - #[inline] pub unsafe fn get_reset_reason(&self) -> Result { + #[inline] pub fn get_reset_reason(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ResetReason)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_hardware_slot_reset(&self) -> Result { + }} + #[inline] pub fn get_hardware_slot_reset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HardwareSlotReset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_software_slot_reset(&self) -> Result { + }} + #[inline] pub fn get_software_slot_reset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SoftwareSlotReset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum ControlChannelTriggerResetReason: i32 { FastUserSwitched (ControlChannelTriggerResetReason_FastUserSwitched) = 0, LowPowerExit (ControlChannelTriggerResetReason_LowPowerExit) = 1, QuietHoursExit (ControlChannelTriggerResetReason_QuietHoursExit) = 2, ApplicationRestart (ControlChannelTriggerResetReason_ApplicationRestart) = 3, @@ -5430,136 +5430,136 @@ RT_INTERFACE!{interface IDatagramSocket(IDatagramSocketVtbl): IInspectable(IInsp fn get_Information(&self, out: *mut *mut DatagramSocketInformation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy2(&self) -> (), #[cfg(feature="windows-storage")] fn get_OutputStream(&self, out: *mut *mut super::super::storage::streams::IOutputStream) -> HRESULT, - fn ConnectAsync(&self, remoteHostName: *mut super::HostName, remoteServiceName: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn ConnectWithEndpointPairAsync(&self, endpointPair: *mut super::EndpointPair, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn BindServiceNameAsync(&self, localServiceName: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn BindEndpointAsync(&self, localHostName: *mut super::HostName, localServiceName: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ConnectAsync(&self, remoteHostName: *mut super::HostName, remoteServiceName: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ConnectWithEndpointPairAsync(&self, endpointPair: *mut super::EndpointPair, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn BindServiceNameAsync(&self, localServiceName: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn BindEndpointAsync(&self, localHostName: *mut super::HostName, localServiceName: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn JoinMulticastGroup(&self, host: *mut super::HostName) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy8(&self) -> (), - #[cfg(feature="windows-storage")] fn GetOutputStreamAsync(&self, remoteHostName: *mut super::HostName, remoteServiceName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn GetOutputStreamAsync(&self, remoteHostName: *mut super::HostName, remoteServiceName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy9(&self) -> (), - #[cfg(feature="windows-storage")] fn GetOutputStreamWithEndpointPairAsync(&self, endpointPair: *mut super::EndpointPair, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_MessageReceived(&self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_MessageReceived(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + #[cfg(feature="windows-storage")] fn GetOutputStreamWithEndpointPairAsync(&self, endpointPair: *mut super::EndpointPair, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_MessageReceived(&self, eventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_MessageReceived(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT }} impl IDatagramSocket { - #[inline] pub unsafe fn get_control(&self) -> Result> { + #[inline] pub fn get_control(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Control)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_information(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_information(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Information)(self 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(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_output_stream(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OutputStream)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn connect_async(&self, remoteHostName: &super::HostName, remoteServiceName: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn connect_async(&self, remoteHostName: &super::HostName, remoteServiceName: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConnectAsync)(self as *const _ as *mut _, 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(&self, endpointPair: &super::EndpointPair) -> Result> { + }} + #[inline] pub fn connect_with_endpoint_pair_async(&self, endpointPair: &super::EndpointPair) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConnectWithEndpointPairAsync)(self as *const _ as *mut _, 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(&self, localServiceName: &HStringArg) -> Result> { + }} + #[inline] pub fn bind_service_name_async(&self, localServiceName: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).BindServiceNameAsync)(self as *const _ as *mut _, localServiceName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn bind_endpoint_async(&self, localHostName: &super::HostName, localServiceName: &HStringArg) -> Result> { + }} + #[inline] pub fn bind_endpoint_async(&self, localHostName: &super::HostName, localServiceName: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).BindEndpointAsync)(self as *const _ as *mut _, 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(&self, host: &super::HostName) -> Result<()> { + }} + #[inline] pub fn join_multicast_group(&self, host: &super::HostName) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).JoinMulticastGroup)(self as *const _ as *mut _, 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(&self, remoteHostName: &super::HostName, remoteServiceName: &HStringArg) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_output_stream_async(&self, remoteHostName: &super::HostName, remoteServiceName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetOutputStreamAsync)(self as *const _ as *mut _, 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(&self, endpointPair: &super::EndpointPair) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_output_stream_with_endpoint_pair_async(&self, endpointPair: &super::EndpointPair) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetOutputStreamWithEndpointPairAsync)(self as *const _ as *mut _, 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(&self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_message_received(&self, eventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_MessageReceived)(self as *const _ as *mut _, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_message_received(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_message_received(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_MessageReceived)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DatagramSocket: IDatagramSocket} impl RtActivatable for DatagramSocket {} impl RtActivatable for DatagramSocket {} impl DatagramSocket { - #[inline] pub fn get_endpoint_pairs_async(remoteHostName: &super::HostName, remoteServiceName: &HStringArg) -> Result>>> { unsafe { + #[inline] pub fn get_endpoint_pairs_async(remoteHostName: &super::HostName, remoteServiceName: &HStringArg) -> Result>>> { >::get_activation_factory().get_endpoint_pairs_async(remoteHostName, remoteServiceName) - }} - #[inline] pub fn get_endpoint_pairs_with_sort_options_async(remoteHostName: &super::HostName, remoteServiceName: &HStringArg, sortOptions: super::HostNameSortOptions) -> Result>>> { unsafe { + } + #[inline] pub fn get_endpoint_pairs_with_sort_options_async(remoteHostName: &super::HostName, remoteServiceName: &HStringArg, sortOptions: super::HostNameSortOptions) -> Result>>> { >::get_activation_factory().get_endpoint_pairs_with_sort_options_async(remoteHostName, remoteServiceName, sortOptions) - }} + } } DEFINE_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]) [CLSID_DatagramSocket]); 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(&self, localServiceName: HSTRING, adapter: *mut super::connectivity::NetworkAdapter, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn BindServiceNameAndAdapterAsync(&self, localServiceName: HSTRING, adapter: *mut super::connectivity::NetworkAdapter, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IDatagramSocket2 { - #[inline] pub unsafe fn bind_service_name_and_adapter_async(&self, localServiceName: &HStringArg, adapter: &super::connectivity::NetworkAdapter) -> Result> { + #[inline] pub fn bind_service_name_and_adapter_async(&self, localServiceName: &HStringArg, adapter: &super::connectivity::NetworkAdapter) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).BindServiceNameAndAdapterAsync)(self as *const _ as *mut _, 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(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn CancelIOAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn EnableTransferOwnership(&self, taskId: Guid) -> HRESULT, fn EnableTransferOwnershipWithConnectedStandbyAction(&self, taskId: Guid, connectedStandbyAction: SocketActivityConnectedStandbyAction) -> HRESULT, fn TransferOwnership(&self, socketId: HSTRING) -> HRESULT, fn TransferOwnershipWithContext(&self, socketId: HSTRING, data: *mut SocketActivityContext) -> HRESULT, - fn TransferOwnershipWithContextAndKeepAliveTime(&self, socketId: HSTRING, data: *mut SocketActivityContext, keepAliveTime: super::super::foundation::TimeSpan) -> HRESULT + fn TransferOwnershipWithContextAndKeepAliveTime(&self, socketId: HSTRING, data: *mut SocketActivityContext, keepAliveTime: foundation::TimeSpan) -> HRESULT }} impl IDatagramSocket3 { - #[inline] pub unsafe fn cancel_ioasync(&self) -> Result> { + #[inline] pub fn cancel_ioasync(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CancelIOAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn enable_transfer_ownership(&self, taskId: Guid) -> Result<()> { + }} + #[inline] pub fn enable_transfer_ownership(&self, taskId: Guid) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).EnableTransferOwnership)(self as *const _ as *mut _, taskId); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn enable_transfer_ownership_with_connected_standby_action(&self, taskId: Guid, connectedStandbyAction: SocketActivityConnectedStandbyAction) -> Result<()> { + }} + #[inline] pub fn enable_transfer_ownership_with_connected_standby_action(&self, taskId: Guid, connectedStandbyAction: SocketActivityConnectedStandbyAction) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).EnableTransferOwnershipWithConnectedStandbyAction)(self as *const _ as *mut _, taskId, connectedStandbyAction); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn transfer_ownership(&self, socketId: &HStringArg) -> Result<()> { + }} + #[inline] pub fn transfer_ownership(&self, socketId: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).TransferOwnership)(self as *const _ as *mut _, socketId.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn transfer_ownership_with_context(&self, socketId: &HStringArg, data: &SocketActivityContext) -> Result<()> { + }} + #[inline] pub fn transfer_ownership_with_context(&self, socketId: &HStringArg, data: &SocketActivityContext) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).TransferOwnershipWithContext)(self as *const _ as *mut _, 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(&self, socketId: &HStringArg, data: &SocketActivityContext, keepAliveTime: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn transfer_ownership_with_context_and_keep_alive_time(&self, socketId: &HStringArg, data: &SocketActivityContext, keepAliveTime: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).TransferOwnershipWithContextAndKeepAliveTime)(self as *const _ as *mut _, socketId.get(), data as *const _ as *mut _, keepAliveTime); if hr == S_OK { Ok(()) } 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] { @@ -5569,24 +5569,24 @@ RT_INTERFACE!{interface IDatagramSocketControl(IDatagramSocketControlVtbl): IIns fn put_OutboundUnicastHopLimit(&self, value: u8) -> HRESULT }} impl IDatagramSocketControl { - #[inline] pub unsafe fn get_quality_of_service(&self) -> Result { + #[inline] pub fn get_quality_of_service(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_QualityOfService)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_quality_of_service(&self, value: SocketQualityOfService) -> Result<()> { + }} + #[inline] pub fn set_quality_of_service(&self, value: SocketQualityOfService) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_QualityOfService)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_outbound_unicast_hop_limit(&self) -> Result { + }} + #[inline] pub fn get_outbound_unicast_hop_limit(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OutboundUnicastHopLimit)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_outbound_unicast_hop_limit(&self, value: u8) -> Result<()> { + }} + #[inline] pub fn set_outbound_unicast_hop_limit(&self, value: u8) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OutboundUnicastHopLimit)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DatagramSocketControl: IDatagramSocketControl} DEFINE_IID!(IID_IDatagramSocketControl2, 871028162, 38812, 17429, 130, 161, 60, 250, 246, 70, 193, 146); @@ -5597,24 +5597,24 @@ RT_INTERFACE!{interface IDatagramSocketControl2(IDatagramSocketControl2Vtbl): II fn put_DontFragment(&self, value: bool) -> HRESULT }} impl IDatagramSocketControl2 { - #[inline] pub unsafe fn get_inbound_buffer_size_in_bytes(&self) -> Result { + #[inline] pub fn get_inbound_buffer_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InboundBufferSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_inbound_buffer_size_in_bytes(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_inbound_buffer_size_in_bytes(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InboundBufferSizeInBytes)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_dont_fragment(&self) -> Result { + }} + #[inline] pub fn get_dont_fragment(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DontFragment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_dont_fragment(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_dont_fragment(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DontFragment)(self as *const _ as *mut _, 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] { @@ -5622,15 +5622,15 @@ RT_INTERFACE!{interface IDatagramSocketControl3(IDatagramSocketControl3Vtbl): II fn put_MulticastOnly(&self, value: bool) -> HRESULT }} impl IDatagramSocketControl3 { - #[inline] pub unsafe fn get_multicast_only(&self) -> Result { + #[inline] pub fn get_multicast_only(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MulticastOnly)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_multicast_only(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_multicast_only(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MulticastOnly)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } 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] { @@ -5640,26 +5640,26 @@ RT_INTERFACE!{interface IDatagramSocketInformation(IDatagramSocketInformationVtb fn get_RemotePort(&self, out: *mut HSTRING) -> HRESULT }} impl IDatagramSocketInformation { - #[inline] pub unsafe fn get_local_address(&self) -> Result> { + #[inline] pub fn get_local_address(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LocalAddress)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_local_port(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_local_port(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LocalPort)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_address(&self) -> Result> { + }} + #[inline] pub fn get_remote_address(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteAddress)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_port(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_remote_port(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemotePort)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class DatagramSocketInformation: IDatagramSocketInformation} DEFINE_IID!(IID_IDatagramSocketMessageReceivedEventArgs, 2653805730, 5906, 19684, 177, 121, 140, 101, 44, 109, 16, 126); @@ -5671,96 +5671,96 @@ RT_INTERFACE!{interface IDatagramSocketMessageReceivedEventArgs(IDatagramSocketM #[cfg(feature="windows-storage")] fn GetDataStream(&self, out: *mut *mut super::super::storage::streams::IInputStream) -> HRESULT }} impl IDatagramSocketMessageReceivedEventArgs { - #[inline] pub unsafe fn get_remote_address(&self) -> Result> { + #[inline] pub fn get_remote_address(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteAddress)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_port(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_remote_port(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemotePort)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_local_address(&self) -> Result> { + }} + #[inline] pub fn get_local_address(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LocalAddress)(self 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_data_reader(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_data_reader(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDataReader)(self 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_data_stream(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_data_stream(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDataStream)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DatagramSocketMessageReceivedEventArgs: IDatagramSocketMessageReceivedEventArgs} 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(&self, remoteHostName: *mut super::HostName, remoteServiceName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetEndpointPairsWithSortOptionsAsync(&self, remoteHostName: *mut super::HostName, remoteServiceName: HSTRING, sortOptions: super::HostNameSortOptions, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn GetEndpointPairsAsync(&self, remoteHostName: *mut super::HostName, remoteServiceName: HSTRING, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetEndpointPairsWithSortOptionsAsync(&self, remoteHostName: *mut super::HostName, remoteServiceName: HSTRING, sortOptions: super::HostNameSortOptions, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IDatagramSocketStatics { - #[inline] pub unsafe fn get_endpoint_pairs_async(&self, remoteHostName: &super::HostName, remoteServiceName: &HStringArg) -> Result>>> { + #[inline] pub fn get_endpoint_pairs_async(&self, remoteHostName: &super::HostName, remoteServiceName: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetEndpointPairsAsync)(self as *const _ as *mut _, 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(&self, remoteHostName: &super::HostName, remoteServiceName: &HStringArg, sortOptions: super::HostNameSortOptions) -> Result>>> { + }} + #[inline] pub fn get_endpoint_pairs_with_sort_options_async(&self, remoteHostName: &super::HostName, remoteServiceName: &HStringArg, sortOptions: super::HostNameSortOptions) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetEndpointPairsWithSortOptionsAsync)(self as *const _ as *mut _, remoteHostName as *const _ as *mut _, remoteServiceName.get(), sortOptions, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } 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(&self, out: *mut *mut MessageWebSocketControl) -> HRESULT, fn get_Information(&self, out: *mut *mut MessageWebSocketInformation) -> HRESULT, - fn add_MessageReceived(&self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_MessageReceived(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_MessageReceived(&self, eventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_MessageReceived(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT }} impl IMessageWebSocket { - #[inline] pub unsafe fn get_control(&self) -> Result> { + #[inline] pub fn get_control(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Control)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_information(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_information(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Information)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_message_received(&self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_message_received(&self, eventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_MessageReceived)(self as *const _ as *mut _, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_message_received(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_message_received(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_MessageReceived)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MessageWebSocket: IMessageWebSocket} impl RtActivatable for MessageWebSocket {} DEFINE_CLSID!(MessageWebSocket(&[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,77,101,115,115,97,103,101,87,101,98,83,111,99,107,101,116,0]) [CLSID_MessageWebSocket]); 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(&self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ServerCustomValidationRequested(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ServerCustomValidationRequested(&self, eventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ServerCustomValidationRequested(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT }} impl IMessageWebSocket2 { - #[inline] pub unsafe fn add_server_custom_validation_requested(&self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_server_custom_validation_requested(&self, eventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ServerCustomValidationRequested)(self as *const _ as *mut _, 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(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_server_custom_validation_requested(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ServerCustomValidationRequested)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMessageWebSocketControl, 2165848202, 50729, 20234, 128, 251, 129, 252, 5, 83, 136, 98); RT_INTERFACE!{interface IMessageWebSocketControl(IMessageWebSocketControlVtbl): IInspectable(IInspectableVtbl) [IID_IMessageWebSocketControl] { @@ -5770,69 +5770,69 @@ RT_INTERFACE!{interface IMessageWebSocketControl(IMessageWebSocketControlVtbl): fn put_MessageType(&self, value: SocketMessageType) -> HRESULT }} impl IMessageWebSocketControl { - #[inline] pub unsafe fn get_max_message_size(&self) -> Result { + #[inline] pub fn get_max_message_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxMessageSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_message_size(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_max_message_size(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxMessageSize)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_message_type(&self) -> Result { + }} + #[inline] pub fn get_message_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MessageType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_message_type(&self, value: SocketMessageType) -> Result<()> { + }} + #[inline] pub fn set_message_type(&self, value: SocketMessageType) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MessageType)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MessageWebSocketControl: IMessageWebSocketControl} DEFINE_IID!(IID_IMessageWebSocketControl2, 3809466257, 2060, 16394, 167, 18, 39, 223, 169, 231, 68, 216); RT_INTERFACE!{interface IMessageWebSocketControl2(IMessageWebSocketControl2Vtbl): IInspectable(IInspectableVtbl) [IID_IMessageWebSocketControl2] { - fn get_DesiredUnsolicitedPongInterval(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_DesiredUnsolicitedPongInterval(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_ActualUnsolicitedPongInterval(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_DesiredUnsolicitedPongInterval(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_DesiredUnsolicitedPongInterval(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_ActualUnsolicitedPongInterval(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn get_ReceiveMode(&self, out: *mut MessageWebSocketReceiveMode) -> HRESULT, fn put_ReceiveMode(&self, value: MessageWebSocketReceiveMode) -> HRESULT, #[cfg(feature="windows-security")] fn get_ClientCertificate(&self, out: *mut *mut super::super::security::cryptography::certificates::Certificate) -> HRESULT, #[cfg(feature="windows-security")] fn put_ClientCertificate(&self, value: *mut super::super::security::cryptography::certificates::Certificate) -> HRESULT }} impl IMessageWebSocketControl2 { - #[inline] pub unsafe fn get_desired_unsolicited_pong_interval(&self) -> Result { + #[inline] pub fn get_desired_unsolicited_pong_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DesiredUnsolicitedPongInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_desired_unsolicited_pong_interval(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_desired_unsolicited_pong_interval(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DesiredUnsolicitedPongInterval)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_actual_unsolicited_pong_interval(&self) -> Result { + }} + #[inline] pub fn get_actual_unsolicited_pong_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ActualUnsolicitedPongInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_receive_mode(&self) -> Result { + }} + #[inline] pub fn get_receive_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReceiveMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_receive_mode(&self, value: MessageWebSocketReceiveMode) -> Result<()> { + }} + #[inline] pub fn set_receive_mode(&self, value: MessageWebSocketReceiveMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReceiveMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-security")] #[inline] pub unsafe fn get_client_certificate(&self) -> Result> { + }} + #[cfg(feature="windows-security")] #[inline] pub fn get_client_certificate(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ClientCertificate)(self 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 set_client_certificate(&self, value: &super::super::security::cryptography::certificates::Certificate) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-security")] #[inline] pub fn set_client_certificate(&self, value: &super::super::security::cryptography::certificates::Certificate) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ClientCertificate)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MessageWebSocketInformation: IWebSocketInformation} DEFINE_IID!(IID_IMessageWebSocketMessageReceivedEventArgs, 1200366252, 19531, 17133, 158, 215, 30, 249, 249, 79, 163, 213); @@ -5842,21 +5842,21 @@ RT_INTERFACE!{interface IMessageWebSocketMessageReceivedEventArgs(IMessageWebSoc #[cfg(feature="windows-storage")] fn GetDataStream(&self, out: *mut *mut super::super::storage::streams::IInputStream) -> HRESULT }} impl IMessageWebSocketMessageReceivedEventArgs { - #[inline] pub unsafe fn get_message_type(&self) -> Result { + #[inline] pub fn get_message_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MessageType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_data_reader(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_data_reader(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDataReader)(self 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_data_stream(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_data_stream(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDataStream)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MessageWebSocketMessageReceivedEventArgs: IMessageWebSocketMessageReceivedEventArgs} DEFINE_IID!(IID_IMessageWebSocketMessageReceivedEventArgs2, 2311980797, 56687, 18951, 135, 249, 249, 235, 77, 137, 216, 61); @@ -5864,11 +5864,11 @@ RT_INTERFACE!{interface IMessageWebSocketMessageReceivedEventArgs2(IMessageWebSo fn get_IsMessageComplete(&self, out: *mut bool) -> HRESULT }} impl IMessageWebSocketMessageReceivedEventArgs2 { - #[inline] pub unsafe fn get_is_message_complete(&self) -> Result { + #[inline] pub fn get_is_message_complete(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsMessageComplete)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum MessageWebSocketReceiveMode: i32 { FullMessage (MessageWebSocketReceiveMode_FullMessage) = 0, PartialMessage (MessageWebSocketReceiveMode_PartialMessage) = 1, @@ -5884,18 +5884,18 @@ RT_INTERFACE!{interface ISocketActivityContext(ISocketActivityContextVtbl): IIns #[cfg(feature="windows-storage")] fn get_Data(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT }} impl ISocketActivityContext { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_data(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Data)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SocketActivityContext: ISocketActivityContext} impl RtActivatable for SocketActivityContext {} impl SocketActivityContext { - #[cfg(feature="windows-storage")] #[inline] pub fn create(data: &super::super::storage::streams::IBuffer) -> Result> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn create(data: &super::super::storage::streams::IBuffer) -> Result> { >::get_activation_factory().create(data) - }} + } } DEFINE_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]) [CLSID_SocketActivityContext]); DEFINE_IID!(IID_ISocketActivityContextFactory, 3114255299, 2188, 17288, 131, 174, 37, 37, 19, 142, 4, 154); @@ -5903,11 +5903,11 @@ RT_INTERFACE!{static interface ISocketActivityContextFactory(ISocketActivityCont #[cfg(feature="windows-storage")] fn Create(&self, data: *mut super::super::storage::streams::IBuffer, out: *mut *mut SocketActivityContext) -> HRESULT }} impl ISocketActivityContextFactory { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn create(&self, data: &super::super::storage::streams::IBuffer) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn create(&self, data: &super::super::storage::streams::IBuffer) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, data as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ISocketActivityInformation, 2374648548, 43134, 19316, 153, 104, 24, 91, 37, 17, 222, 254); RT_INTERFACE!{interface ISocketActivityInformation(ISocketActivityInformationVtbl): IInspectable(IInspectableVtbl) [IID_ISocketActivityInformation] { @@ -5920,60 +5920,60 @@ RT_INTERFACE!{interface ISocketActivityInformation(ISocketActivityInformationVtb fn get_StreamSocketListener(&self, out: *mut *mut StreamSocketListener) -> HRESULT }} impl ISocketActivityInformation { - #[inline] pub unsafe fn get_task_id(&self) -> Result { + #[inline] pub fn get_task_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TaskId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&self) -> Result { + }} + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_socket_kind(&self) -> Result { + }} + #[inline] pub fn get_socket_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SocketKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_context(&self) -> Result> { + }} + #[inline] pub fn get_context(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Context)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_datagram_socket(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_datagram_socket(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DatagramSocket)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_stream_socket(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_stream_socket(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StreamSocket)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_stream_socket_listener(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_stream_socket_listener(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StreamSocketListener)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SocketActivityInformation: ISocketActivityInformation} impl RtActivatable for SocketActivityInformation {} impl SocketActivityInformation { - #[inline] pub fn get_all_sockets() -> Result>> { unsafe { + #[inline] pub fn get_all_sockets() -> Result>>> { >::get_activation_factory().get_all_sockets() - }} + } } DEFINE_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]) [CLSID_SocketActivityInformation]); 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(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT + fn get_AllSockets(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT }} impl ISocketActivityInformationStatics { - #[inline] pub unsafe fn get_all_sockets(&self) -> Result>> { + #[inline] pub fn get_all_sockets(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AllSockets)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum SocketActivityKind: i32 { None (SocketActivityKind_None) = 0, StreamSocketListener (SocketActivityKind_StreamSocketListener) = 1, DatagramSocket (SocketActivityKind_DatagramSocket) = 2, StreamSocket (SocketActivityKind_StreamSocket) = 3, @@ -5984,16 +5984,16 @@ RT_INTERFACE!{interface ISocketActivityTriggerDetails(ISocketActivityTriggerDeta fn get_SocketInformation(&self, out: *mut *mut SocketActivityInformation) -> HRESULT }} impl ISocketActivityTriggerDetails { - #[inline] pub unsafe fn get_reason(&self) -> Result { + #[inline] pub fn get_reason(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Reason)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_socket_information(&self) -> Result> { + }} + #[inline] pub fn get_socket_information(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SocketInformation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SocketActivityTriggerDetails: ISocketActivityTriggerDetails} RT_ENUM! { enum SocketActivityTriggerReason: i32 { @@ -6002,9 +6002,9 @@ RT_ENUM! { enum SocketActivityTriggerReason: i32 { RT_CLASS!{static class SocketError} impl RtActivatable for SocketError {} impl SocketError { - #[inline] pub fn get_status(hresult: i32) -> Result { unsafe { + #[inline] pub fn get_status(hresult: i32) -> Result { >::get_activation_factory().get_status(hresult) - }} + } } DEFINE_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]) [CLSID_SocketError]); DEFINE_IID!(IID_ISocketErrorStatics, 2189637620, 32086, 19854, 183, 180, 160, 125, 215, 193, 188, 169); @@ -6012,11 +6012,11 @@ RT_INTERFACE!{static interface ISocketErrorStatics(ISocketErrorStaticsVtbl): IIn fn GetStatus(&self, hresult: i32, out: *mut SocketErrorStatus) -> HRESULT }} impl ISocketErrorStatics { - #[inline] pub unsafe fn get_status(&self, hresult: i32) -> Result { + #[inline] pub fn get_status(&self, hresult: i32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetStatus)(self as *const _ as *mut _, hresult, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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, @@ -6041,117 +6041,117 @@ RT_INTERFACE!{interface IStreamSocket(IStreamSocketVtbl): IInspectable(IInspecta #[cfg(feature="windows-storage")] fn get_InputStream(&self, out: *mut *mut super::super::storage::streams::IInputStream) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy3(&self) -> (), #[cfg(feature="windows-storage")] fn get_OutputStream(&self, out: *mut *mut super::super::storage::streams::IOutputStream) -> HRESULT, - fn ConnectWithEndpointPairAsync(&self, endpointPair: *mut super::EndpointPair, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn ConnectAsync(&self, remoteHostName: *mut super::HostName, remoteServiceName: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn ConnectWithEndpointPairAndProtectionLevelAsync(&self, endpointPair: *mut super::EndpointPair, protectionLevel: SocketProtectionLevel, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn ConnectWithProtectionLevelAsync(&self, remoteHostName: *mut super::HostName, remoteServiceName: HSTRING, protectionLevel: SocketProtectionLevel, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn UpgradeToSslAsync(&self, protectionLevel: SocketProtectionLevel, validationHostName: *mut super::HostName, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn ConnectWithEndpointPairAsync(&self, endpointPair: *mut super::EndpointPair, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ConnectAsync(&self, remoteHostName: *mut super::HostName, remoteServiceName: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ConnectWithEndpointPairAndProtectionLevelAsync(&self, endpointPair: *mut super::EndpointPair, protectionLevel: SocketProtectionLevel, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ConnectWithProtectionLevelAsync(&self, remoteHostName: *mut super::HostName, remoteServiceName: HSTRING, protectionLevel: SocketProtectionLevel, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn UpgradeToSslAsync(&self, protectionLevel: SocketProtectionLevel, validationHostName: *mut super::HostName, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IStreamSocket { - #[inline] pub unsafe fn get_control(&self) -> Result> { + #[inline] pub fn get_control(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Control)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_information(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_information(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Information)(self 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_input_stream(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_input_stream(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InputStream)(self 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(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_output_stream(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OutputStream)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn connect_with_endpoint_pair_async(&self, endpointPair: &super::EndpointPair) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn connect_with_endpoint_pair_async(&self, endpointPair: &super::EndpointPair) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConnectWithEndpointPairAsync)(self as *const _ as *mut _, endpointPair as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn connect_async(&self, remoteHostName: &super::HostName, remoteServiceName: &HStringArg) -> Result> { + }} + #[inline] pub fn connect_async(&self, remoteHostName: &super::HostName, remoteServiceName: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConnectAsync)(self as *const _ as *mut _, 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(&self, endpointPair: &super::EndpointPair, protectionLevel: SocketProtectionLevel) -> Result> { + }} + #[inline] pub fn connect_with_endpoint_pair_and_protection_level_async(&self, endpointPair: &super::EndpointPair, protectionLevel: SocketProtectionLevel) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConnectWithEndpointPairAndProtectionLevelAsync)(self as *const _ as *mut _, 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(&self, remoteHostName: &super::HostName, remoteServiceName: &HStringArg, protectionLevel: SocketProtectionLevel) -> Result> { + }} + #[inline] pub fn connect_with_protection_level_async(&self, remoteHostName: &super::HostName, remoteServiceName: &HStringArg, protectionLevel: SocketProtectionLevel) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConnectWithProtectionLevelAsync)(self as *const _ as *mut _, 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(&self, protectionLevel: SocketProtectionLevel, validationHostName: &super::HostName) -> Result> { + }} + #[inline] pub fn upgrade_to_ssl_async(&self, protectionLevel: SocketProtectionLevel, validationHostName: &super::HostName) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UpgradeToSslAsync)(self as *const _ as *mut _, protectionLevel, validationHostName as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class StreamSocket: IStreamSocket} impl RtActivatable for StreamSocket {} impl RtActivatable for StreamSocket {} impl StreamSocket { - #[inline] pub fn get_endpoint_pairs_async(remoteHostName: &super::HostName, remoteServiceName: &HStringArg) -> Result>>> { unsafe { + #[inline] pub fn get_endpoint_pairs_async(remoteHostName: &super::HostName, remoteServiceName: &HStringArg) -> Result>>> { >::get_activation_factory().get_endpoint_pairs_async(remoteHostName, remoteServiceName) - }} - #[inline] pub fn get_endpoint_pairs_with_sort_options_async(remoteHostName: &super::HostName, remoteServiceName: &HStringArg, sortOptions: super::HostNameSortOptions) -> Result>>> { unsafe { + } + #[inline] pub fn get_endpoint_pairs_with_sort_options_async(remoteHostName: &super::HostName, remoteServiceName: &HStringArg, sortOptions: super::HostNameSortOptions) -> Result>>> { >::get_activation_factory().get_endpoint_pairs_with_sort_options_async(remoteHostName, remoteServiceName, sortOptions) - }} + } } DEFINE_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]) [CLSID_StreamSocket]); 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(&self, remoteHostName: *mut super::HostName, remoteServiceName: HSTRING, protectionLevel: SocketProtectionLevel, adapter: *mut super::connectivity::NetworkAdapter, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn ConnectWithProtectionLevelAndAdapterAsync(&self, remoteHostName: *mut super::HostName, remoteServiceName: HSTRING, protectionLevel: SocketProtectionLevel, adapter: *mut super::connectivity::NetworkAdapter, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IStreamSocket2 { - #[inline] pub unsafe fn connect_with_protection_level_and_adapter_async(&self, remoteHostName: &super::HostName, remoteServiceName: &HStringArg, protectionLevel: SocketProtectionLevel, adapter: &super::connectivity::NetworkAdapter) -> Result> { + #[inline] pub fn connect_with_protection_level_and_adapter_async(&self, remoteHostName: &super::HostName, remoteServiceName: &HStringArg, protectionLevel: SocketProtectionLevel, adapter: &super::connectivity::NetworkAdapter) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConnectWithProtectionLevelAndAdapterAsync)(self as *const _ as *mut _, 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(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn CancelIOAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn EnableTransferOwnership(&self, taskId: Guid) -> HRESULT, fn EnableTransferOwnershipWithConnectedStandbyAction(&self, taskId: Guid, connectedStandbyAction: SocketActivityConnectedStandbyAction) -> HRESULT, fn TransferOwnership(&self, socketId: HSTRING) -> HRESULT, fn TransferOwnershipWithContext(&self, socketId: HSTRING, data: *mut SocketActivityContext) -> HRESULT, - fn TransferOwnershipWithContextAndKeepAliveTime(&self, socketId: HSTRING, data: *mut SocketActivityContext, keepAliveTime: super::super::foundation::TimeSpan) -> HRESULT + fn TransferOwnershipWithContextAndKeepAliveTime(&self, socketId: HSTRING, data: *mut SocketActivityContext, keepAliveTime: foundation::TimeSpan) -> HRESULT }} impl IStreamSocket3 { - #[inline] pub unsafe fn cancel_ioasync(&self) -> Result> { + #[inline] pub fn cancel_ioasync(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CancelIOAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn enable_transfer_ownership(&self, taskId: Guid) -> Result<()> { + }} + #[inline] pub fn enable_transfer_ownership(&self, taskId: Guid) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).EnableTransferOwnership)(self as *const _ as *mut _, taskId); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn enable_transfer_ownership_with_connected_standby_action(&self, taskId: Guid, connectedStandbyAction: SocketActivityConnectedStandbyAction) -> Result<()> { + }} + #[inline] pub fn enable_transfer_ownership_with_connected_standby_action(&self, taskId: Guid, connectedStandbyAction: SocketActivityConnectedStandbyAction) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).EnableTransferOwnershipWithConnectedStandbyAction)(self as *const _ as *mut _, taskId, connectedStandbyAction); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn transfer_ownership(&self, socketId: &HStringArg) -> Result<()> { + }} + #[inline] pub fn transfer_ownership(&self, socketId: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).TransferOwnership)(self as *const _ as *mut _, socketId.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn transfer_ownership_with_context(&self, socketId: &HStringArg, data: &SocketActivityContext) -> Result<()> { + }} + #[inline] pub fn transfer_ownership_with_context(&self, socketId: &HStringArg, data: &SocketActivityContext) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).TransferOwnershipWithContext)(self as *const _ as *mut _, 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(&self, socketId: &HStringArg, data: &SocketActivityContext, keepAliveTime: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn transfer_ownership_with_context_and_keep_alive_time(&self, socketId: &HStringArg, data: &SocketActivityContext, keepAliveTime: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).TransferOwnershipWithContextAndKeepAliveTime)(self as *const _ as *mut _, socketId.get(), data as *const _ as *mut _, keepAliveTime); if hr == S_OK { Ok(()) } 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] { @@ -6167,63 +6167,63 @@ RT_INTERFACE!{interface IStreamSocketControl(IStreamSocketControlVtbl): IInspect fn put_OutboundUnicastHopLimit(&self, value: u8) -> HRESULT }} impl IStreamSocketControl { - #[inline] pub unsafe fn get_no_delay(&self) -> Result { + #[inline] pub fn get_no_delay(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NoDelay)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_no_delay(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_no_delay(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_NoDelay)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_keep_alive(&self) -> Result { + }} + #[inline] pub fn get_keep_alive(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_KeepAlive)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_keep_alive(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_keep_alive(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_KeepAlive)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_outbound_buffer_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_outbound_buffer_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OutboundBufferSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_outbound_buffer_size_in_bytes(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_outbound_buffer_size_in_bytes(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OutboundBufferSizeInBytes)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_quality_of_service(&self) -> Result { + }} + #[inline] pub fn get_quality_of_service(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_QualityOfService)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_quality_of_service(&self, value: SocketQualityOfService) -> Result<()> { + }} + #[inline] pub fn set_quality_of_service(&self, value: SocketQualityOfService) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_QualityOfService)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_outbound_unicast_hop_limit(&self) -> Result { + }} + #[inline] pub fn get_outbound_unicast_hop_limit(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OutboundUnicastHopLimit)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_outbound_unicast_hop_limit(&self, value: u8) -> Result<()> { + }} + #[inline] pub fn set_outbound_unicast_hop_limit(&self, value: u8) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OutboundUnicastHopLimit)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class StreamSocketControl: IStreamSocketControl} 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + #[cfg(feature="windows-security")] fn get_IgnorableServerCertificateErrors(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IStreamSocketControl2 { - #[cfg(feature="windows-security")] #[inline] pub unsafe fn get_ignorable_server_certificate_errors(&self) -> Result>> { + #[cfg(feature="windows-security")] #[inline] pub fn get_ignorable_server_certificate_errors(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IgnorableServerCertificateErrors)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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] { @@ -6233,24 +6233,24 @@ RT_INTERFACE!{interface IStreamSocketControl3(IStreamSocketControl3Vtbl): IInspe #[cfg(feature="windows-security")] fn put_ClientCertificate(&self, value: *mut super::super::security::cryptography::certificates::Certificate) -> HRESULT }} impl IStreamSocketControl3 { - #[inline] pub unsafe fn get_serialize_connection_attempts(&self) -> Result { + #[inline] pub fn get_serialize_connection_attempts(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SerializeConnectionAttempts)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_serialize_connection_attempts(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_serialize_connection_attempts(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SerializeConnectionAttempts)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-security")] #[inline] pub unsafe fn get_client_certificate(&self) -> Result> { + }} + #[cfg(feature="windows-security")] #[inline] pub fn get_client_certificate(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ClientCertificate)(self 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 set_client_certificate(&self, value: &super::super::security::cryptography::certificates::Certificate) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-security")] #[inline] pub fn set_client_certificate(&self, value: &super::super::security::cryptography::certificates::Certificate) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ClientCertificate)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IStreamSocketControl4, 2521705277, 60455, 18568, 179, 206, 199, 75, 65, 132, 35, 173); RT_INTERFACE!{interface IStreamSocketControl4(IStreamSocketControl4Vtbl): IInspectable(IInspectableVtbl) [IID_IStreamSocketControl4] { @@ -6258,15 +6258,15 @@ RT_INTERFACE!{interface IStreamSocketControl4(IStreamSocketControl4Vtbl): IInspe fn put_MinProtectionLevel(&self, value: SocketProtectionLevel) -> HRESULT }} impl IStreamSocketControl4 { - #[inline] pub unsafe fn get_min_protection_level(&self) -> Result { + #[inline] pub fn get_min_protection_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinProtectionLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_min_protection_level(&self, value: SocketProtectionLevel) -> Result<()> { + }} + #[inline] pub fn set_min_protection_level(&self, value: SocketProtectionLevel) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MinProtectionLevel)(self as *const _ as *mut _, value); 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] { @@ -6282,188 +6282,188 @@ RT_INTERFACE!{interface IStreamSocketInformation(IStreamSocketInformationVtbl): #[cfg(feature="windows-storage")] fn get_SessionKey(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT }} impl IStreamSocketInformation { - #[inline] pub unsafe fn get_local_address(&self) -> Result> { + #[inline] pub fn get_local_address(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LocalAddress)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_local_port(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_local_port(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LocalPort)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_host_name(&self) -> Result> { + }} + #[inline] pub fn get_remote_host_name(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteHostName)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_address(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_remote_address(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteAddress)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_service_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_remote_service_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteServiceName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_port(&self) -> Result { + }} + #[inline] pub fn get_remote_port(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemotePort)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_round_trip_time_statistics(&self) -> Result { + }} + #[inline] pub fn get_round_trip_time_statistics(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RoundTripTimeStatistics)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_bandwidth_statistics(&self) -> Result { + }} + #[inline] pub fn get_bandwidth_statistics(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BandwidthStatistics)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_protection_level(&self) -> Result { + }} + #[inline] pub fn get_protection_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProtectionLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_session_key(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_session_key(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SessionKey)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class StreamSocketInformation: IStreamSocketInformation} 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(&self, out: *mut SocketSslErrorSeverity) -> HRESULT, - #[cfg(feature="windows-security")] fn get_ServerCertificateErrors(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + #[cfg(feature="windows-security")] fn get_ServerCertificateErrors(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, #[cfg(feature="windows-security")] fn get_ServerCertificate(&self, out: *mut *mut super::super::security::cryptography::certificates::Certificate) -> HRESULT, - #[cfg(feature="windows-security")] fn get_ServerIntermediateCertificates(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + #[cfg(feature="windows-security")] fn get_ServerIntermediateCertificates(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IStreamSocketInformation2 { - #[inline] pub unsafe fn get_server_certificate_error_severity(&self) -> Result { + #[inline] pub fn get_server_certificate_error_severity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ServerCertificateErrorSeverity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-security")] #[inline] pub unsafe fn get_server_certificate_errors(&self) -> Result>> { + }} + #[cfg(feature="windows-security")] #[inline] pub fn get_server_certificate_errors(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServerCertificateErrors)(self 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 get_server_certificate(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-security")] #[inline] pub fn get_server_certificate(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServerCertificate)(self 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 get_server_intermediate_certificates(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-security")] #[inline] pub fn get_server_intermediate_certificates(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServerIntermediateCertificates)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut StreamSocketListenerControl) -> HRESULT, fn get_Information(&self, out: *mut *mut StreamSocketListenerInformation) -> HRESULT, - fn BindServiceNameAsync(&self, localServiceName: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn BindEndpointAsync(&self, localHostName: *mut super::HostName, localServiceName: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn add_ConnectionReceived(&self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ConnectionReceived(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn BindServiceNameAsync(&self, localServiceName: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn BindEndpointAsync(&self, localHostName: *mut super::HostName, localServiceName: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn add_ConnectionReceived(&self, eventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ConnectionReceived(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT }} impl IStreamSocketListener { - #[inline] pub unsafe fn get_control(&self) -> Result> { + #[inline] pub fn get_control(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Control)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_information(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_information(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Information)(self 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(&self, localServiceName: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn bind_service_name_async(&self, localServiceName: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).BindServiceNameAsync)(self as *const _ as *mut _, localServiceName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn bind_endpoint_async(&self, localHostName: &super::HostName, localServiceName: &HStringArg) -> Result> { + }} + #[inline] pub fn bind_endpoint_async(&self, localHostName: &super::HostName, localServiceName: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).BindEndpointAsync)(self as *const _ as *mut _, 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(&self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_connection_received(&self, eventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ConnectionReceived)(self as *const _ as *mut _, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_connection_received(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_connection_received(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ConnectionReceived)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class StreamSocketListener: IStreamSocketListener} impl RtActivatable for StreamSocketListener {} DEFINE_CLSID!(StreamSocketListener(&[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,76,105,115,116,101,110,101,114,0]) [CLSID_StreamSocketListener]); 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(&self, localServiceName: HSTRING, protectionLevel: SocketProtectionLevel, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn BindServiceNameWithProtectionLevelAndAdapterAsync(&self, localServiceName: HSTRING, protectionLevel: SocketProtectionLevel, adapter: *mut super::connectivity::NetworkAdapter, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn BindServiceNameWithProtectionLevelAsync(&self, localServiceName: HSTRING, protectionLevel: SocketProtectionLevel, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn BindServiceNameWithProtectionLevelAndAdapterAsync(&self, localServiceName: HSTRING, protectionLevel: SocketProtectionLevel, adapter: *mut super::connectivity::NetworkAdapter, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IStreamSocketListener2 { - #[inline] pub unsafe fn bind_service_name_with_protection_level_async(&self, localServiceName: &HStringArg, protectionLevel: SocketProtectionLevel) -> Result> { + #[inline] pub fn bind_service_name_with_protection_level_async(&self, localServiceName: &HStringArg, protectionLevel: SocketProtectionLevel) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).BindServiceNameWithProtectionLevelAsync)(self as *const _ as *mut _, 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(&self, localServiceName: &HStringArg, protectionLevel: SocketProtectionLevel, adapter: &super::connectivity::NetworkAdapter) -> Result> { + }} + #[inline] pub fn bind_service_name_with_protection_level_and_adapter_async(&self, localServiceName: &HStringArg, protectionLevel: SocketProtectionLevel, adapter: &super::connectivity::NetworkAdapter) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).BindServiceNameWithProtectionLevelAndAdapterAsync)(self as *const _ as *mut _, 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(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn CancelIOAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn EnableTransferOwnership(&self, taskId: Guid) -> HRESULT, fn EnableTransferOwnershipWithConnectedStandbyAction(&self, taskId: Guid, connectedStandbyAction: SocketActivityConnectedStandbyAction) -> HRESULT, fn TransferOwnership(&self, socketId: HSTRING) -> HRESULT, fn TransferOwnershipWithContext(&self, socketId: HSTRING, data: *mut SocketActivityContext) -> HRESULT }} impl IStreamSocketListener3 { - #[inline] pub unsafe fn cancel_ioasync(&self) -> Result> { + #[inline] pub fn cancel_ioasync(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CancelIOAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn enable_transfer_ownership(&self, taskId: Guid) -> Result<()> { + }} + #[inline] pub fn enable_transfer_ownership(&self, taskId: Guid) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).EnableTransferOwnership)(self as *const _ as *mut _, taskId); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn enable_transfer_ownership_with_connected_standby_action(&self, taskId: Guid, connectedStandbyAction: SocketActivityConnectedStandbyAction) -> Result<()> { + }} + #[inline] pub fn enable_transfer_ownership_with_connected_standby_action(&self, taskId: Guid, connectedStandbyAction: SocketActivityConnectedStandbyAction) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).EnableTransferOwnershipWithConnectedStandbyAction)(self as *const _ as *mut _, taskId, connectedStandbyAction); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn transfer_ownership(&self, socketId: &HStringArg) -> Result<()> { + }} + #[inline] pub fn transfer_ownership(&self, socketId: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).TransferOwnership)(self as *const _ as *mut _, socketId.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn transfer_ownership_with_context(&self, socketId: &HStringArg, data: &SocketActivityContext) -> Result<()> { + }} + #[inline] pub fn transfer_ownership_with_context(&self, socketId: &HStringArg, data: &SocketActivityContext) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).TransferOwnershipWithContext)(self as *const _ as *mut _, socketId.get(), data as *const _ as *mut _); if hr == S_OK { Ok(()) } 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(&self, out: *mut *mut StreamSocket) -> HRESULT }} impl IStreamSocketListenerConnectionReceivedEventArgs { - #[inline] pub unsafe fn get_socket(&self) -> Result> { + #[inline] pub fn get_socket(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Socket)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class StreamSocketListenerConnectionReceivedEventArgs: IStreamSocketListenerConnectionReceivedEventArgs} DEFINE_IID!(IID_IStreamSocketListenerControl, 551077238, 36234, 19898, 151, 34, 161, 108, 77, 152, 73, 128); @@ -6472,15 +6472,15 @@ RT_INTERFACE!{interface IStreamSocketListenerControl(IStreamSocketListenerContro fn put_QualityOfService(&self, value: SocketQualityOfService) -> HRESULT }} impl IStreamSocketListenerControl { - #[inline] pub unsafe fn get_quality_of_service(&self) -> Result { + #[inline] pub fn get_quality_of_service(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_QualityOfService)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_quality_of_service(&self, value: SocketQualityOfService) -> Result<()> { + }} + #[inline] pub fn set_quality_of_service(&self, value: SocketQualityOfService) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_QualityOfService)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class StreamSocketListenerControl: IStreamSocketListenerControl} DEFINE_IID!(IID_IStreamSocketListenerControl2, 2492184165, 11326, 16459, 184, 176, 142, 178, 73, 162, 176, 161); @@ -6495,71 +6495,71 @@ RT_INTERFACE!{interface IStreamSocketListenerControl2(IStreamSocketListenerContr fn put_OutboundUnicastHopLimit(&self, value: u8) -> HRESULT }} impl IStreamSocketListenerControl2 { - #[inline] pub unsafe fn get_no_delay(&self) -> Result { + #[inline] pub fn get_no_delay(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NoDelay)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_no_delay(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_no_delay(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_NoDelay)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_keep_alive(&self) -> Result { + }} + #[inline] pub fn get_keep_alive(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_KeepAlive)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_keep_alive(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_keep_alive(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_KeepAlive)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_outbound_buffer_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_outbound_buffer_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OutboundBufferSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_outbound_buffer_size_in_bytes(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_outbound_buffer_size_in_bytes(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OutboundBufferSizeInBytes)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_outbound_unicast_hop_limit(&self) -> Result { + }} + #[inline] pub fn get_outbound_unicast_hop_limit(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OutboundUnicastHopLimit)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_outbound_unicast_hop_limit(&self, value: u8) -> Result<()> { + }} + #[inline] pub fn set_outbound_unicast_hop_limit(&self, value: u8) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OutboundUnicastHopLimit)(self as *const _ as *mut _, 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(&self, out: *mut HSTRING) -> HRESULT }} impl IStreamSocketListenerInformation { - #[inline] pub unsafe fn get_local_port(&self) -> Result { + #[inline] pub fn get_local_port(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LocalPort)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class StreamSocketListenerInformation: IStreamSocketListenerInformation} 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(&self, remoteHostName: *mut super::HostName, remoteServiceName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetEndpointPairsWithSortOptionsAsync(&self, remoteHostName: *mut super::HostName, remoteServiceName: HSTRING, sortOptions: super::HostNameSortOptions, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn GetEndpointPairsAsync(&self, remoteHostName: *mut super::HostName, remoteServiceName: HSTRING, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetEndpointPairsWithSortOptionsAsync(&self, remoteHostName: *mut super::HostName, remoteServiceName: HSTRING, sortOptions: super::HostNameSortOptions, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IStreamSocketStatics { - #[inline] pub unsafe fn get_endpoint_pairs_async(&self, remoteHostName: &super::HostName, remoteServiceName: &HStringArg) -> Result>>> { + #[inline] pub fn get_endpoint_pairs_async(&self, remoteHostName: &super::HostName, remoteServiceName: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetEndpointPairsAsync)(self as *const _ as *mut _, 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(&self, remoteHostName: &super::HostName, remoteServiceName: &HStringArg, sortOptions: super::HostNameSortOptions) -> Result>>> { + }} + #[inline] pub fn get_endpoint_pairs_with_sort_options_async(&self, remoteHostName: &super::HostName, remoteServiceName: &HStringArg, sortOptions: super::HostNameSortOptions) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetEndpointPairsWithSortOptionsAsync)(self as *const _ as *mut _, remoteHostName as *const _ as *mut _, remoteServiceName.get(), sortOptions, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } 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] { @@ -6568,40 +6568,40 @@ RT_INTERFACE!{interface IStreamWebSocket(IStreamWebSocketVtbl): IInspectable(IIn #[cfg(feature="windows-storage")] fn get_InputStream(&self, out: *mut *mut super::super::storage::streams::IInputStream) -> HRESULT }} impl IStreamWebSocket { - #[inline] pub unsafe fn get_control(&self) -> Result> { + #[inline] pub fn get_control(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Control)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_information(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_information(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Information)(self 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_input_stream(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_input_stream(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InputStream)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class StreamWebSocket: IStreamWebSocket} impl RtActivatable for StreamWebSocket {} DEFINE_CLSID!(StreamWebSocket(&[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,87,101,98,83,111,99,107,101,116,0]) [CLSID_StreamWebSocket]); 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(&self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ServerCustomValidationRequested(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ServerCustomValidationRequested(&self, eventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ServerCustomValidationRequested(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT }} impl IStreamWebSocket2 { - #[inline] pub unsafe fn add_server_custom_validation_requested(&self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_server_custom_validation_requested(&self, eventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ServerCustomValidationRequested)(self as *const _ as *mut _, 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(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_server_custom_validation_requested(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ServerCustomValidationRequested)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IStreamWebSocketControl, 3035920561, 42074, 18651, 149, 58, 100, 91, 125, 150, 76, 7); RT_INTERFACE!{interface IStreamWebSocketControl(IStreamWebSocketControlVtbl): IInspectable(IInspectableVtbl) [IID_IStreamWebSocketControl] { @@ -6609,89 +6609,89 @@ RT_INTERFACE!{interface IStreamWebSocketControl(IStreamWebSocketControlVtbl): II fn put_NoDelay(&self, value: bool) -> HRESULT }} impl IStreamWebSocketControl { - #[inline] pub unsafe fn get_no_delay(&self) -> Result { + #[inline] pub fn get_no_delay(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NoDelay)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_no_delay(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_no_delay(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_NoDelay)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class StreamWebSocketControl: IStreamWebSocketControl} DEFINE_IID!(IID_IStreamWebSocketControl2, 559783806, 64088, 16602, 159, 17, 164, 141, 175, 233, 80, 55); RT_INTERFACE!{interface IStreamWebSocketControl2(IStreamWebSocketControl2Vtbl): IInspectable(IInspectableVtbl) [IID_IStreamWebSocketControl2] { - fn get_DesiredUnsolicitedPongInterval(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_DesiredUnsolicitedPongInterval(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_ActualUnsolicitedPongInterval(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_DesiredUnsolicitedPongInterval(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_DesiredUnsolicitedPongInterval(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_ActualUnsolicitedPongInterval(&self, out: *mut foundation::TimeSpan) -> HRESULT, #[cfg(feature="windows-security")] fn get_ClientCertificate(&self, out: *mut *mut super::super::security::cryptography::certificates::Certificate) -> HRESULT, #[cfg(feature="windows-security")] fn put_ClientCertificate(&self, value: *mut super::super::security::cryptography::certificates::Certificate) -> HRESULT }} impl IStreamWebSocketControl2 { - #[inline] pub unsafe fn get_desired_unsolicited_pong_interval(&self) -> Result { + #[inline] pub fn get_desired_unsolicited_pong_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DesiredUnsolicitedPongInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_desired_unsolicited_pong_interval(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_desired_unsolicited_pong_interval(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DesiredUnsolicitedPongInterval)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_actual_unsolicited_pong_interval(&self) -> Result { + }} + #[inline] pub fn get_actual_unsolicited_pong_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ActualUnsolicitedPongInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-security")] #[inline] pub unsafe fn get_client_certificate(&self) -> Result> { + }} + #[cfg(feature="windows-security")] #[inline] pub fn get_client_certificate(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ClientCertificate)(self 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 set_client_certificate(&self, value: &super::super::security::cryptography::certificates::Certificate) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-security")] #[inline] pub fn set_client_certificate(&self, value: &super::super::security::cryptography::certificates::Certificate) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ClientCertificate)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class StreamWebSocketInformation: IWebSocketInformation} 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(&self) -> (), #[cfg(feature="windows-storage")] fn get_OutputStream(&self, out: *mut *mut super::super::storage::streams::IOutputStream) -> HRESULT, - fn ConnectAsync(&self, uri: *mut super::super::foundation::Uri, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ConnectAsync(&self, uri: *mut foundation::Uri, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn SetRequestHeader(&self, headerName: HSTRING, headerValue: HSTRING) -> HRESULT, - fn add_Closed(&self, eventHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Closed(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Closed(&self, eventHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Closed(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT, fn CloseWithStatus(&self, code: u16, reason: HSTRING) -> HRESULT }} impl IWebSocket { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_output_stream(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_output_stream(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OutputStream)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn connect_async(&self, uri: &super::super::foundation::Uri) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn connect_async(&self, uri: &foundation::Uri) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConnectAsync)(self 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 set_request_header(&self, headerName: &HStringArg, headerValue: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_request_header(&self, headerName: &HStringArg, headerValue: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetRequestHeader)(self as *const _ as *mut _, headerName.get(), headerValue.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_closed(&self, eventHandler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_closed(&self, eventHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Closed)(self as *const _ as *mut _, eventHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_closed(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_closed(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Closed)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn close_with_status(&self, code: u16, reason: &HStringArg) -> Result<()> { + }} + #[inline] pub fn close_with_status(&self, code: u16, reason: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).CloseWithStatus)(self as *const _ as *mut _, code, reason.get()); if hr == S_OK { Ok(()) } 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] { @@ -6699,16 +6699,16 @@ RT_INTERFACE!{interface IWebSocketClosedEventArgs(IWebSocketClosedEventArgsVtbl) fn get_Reason(&self, out: *mut HSTRING) -> HRESULT }} impl IWebSocketClosedEventArgs { - #[inline] pub unsafe fn get_code(&self) -> Result { + #[inline] pub fn get_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Code)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_reason(&self) -> Result { + }} + #[inline] pub fn get_reason(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Reason)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class WebSocketClosedEventArgs: IWebSocketClosedEventArgs} DEFINE_IID!(IID_IWebSocketControl, 784645571, 55717, 17754, 152, 17, 222, 36, 212, 83, 55, 233); @@ -6723,59 +6723,59 @@ RT_INTERFACE!{interface IWebSocketControl(IWebSocketControlVtbl): IInspectable(I #[cfg(feature="windows-security")] fn get_ProxyCredential(&self, out: *mut *mut super::super::security::credentials::PasswordCredential) -> HRESULT, #[cfg(not(feature="windows-security"))] fn __Dummy5(&self) -> (), #[cfg(feature="windows-security")] fn put_ProxyCredential(&self, value: *mut super::super::security::credentials::PasswordCredential) -> HRESULT, - fn get_SupportedProtocols(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_SupportedProtocols(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IWebSocketControl { - #[inline] pub unsafe fn get_outbound_buffer_size_in_bytes(&self) -> Result { + #[inline] pub fn get_outbound_buffer_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OutboundBufferSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_outbound_buffer_size_in_bytes(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_outbound_buffer_size_in_bytes(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OutboundBufferSizeInBytes)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-security")] #[inline] pub unsafe fn get_server_credential(&self) -> Result> { + }} + #[cfg(feature="windows-security")] #[inline] pub fn get_server_credential(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServerCredential)(self 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 set_server_credential(&self, value: &super::super::security::credentials::PasswordCredential) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-security")] #[inline] pub fn set_server_credential(&self, value: &super::super::security::credentials::PasswordCredential) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ServerCredential)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-security")] #[inline] pub unsafe fn get_proxy_credential(&self) -> Result> { + }} + #[cfg(feature="windows-security")] #[inline] pub fn get_proxy_credential(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProxyCredential)(self 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 set_proxy_credential(&self, value: &super::super::security::credentials::PasswordCredential) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-security")] #[inline] pub fn set_proxy_credential(&self, value: &super::super::security::credentials::PasswordCredential) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ProxyCredential)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_protocols(&self) -> Result>> { + }} + #[inline] pub fn get_supported_protocols(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedProtocols)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + #[cfg(feature="windows-security")] fn get_IgnorableServerCertificateErrors(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IWebSocketControl2 { - #[cfg(feature="windows-security")] #[inline] pub unsafe fn get_ignorable_server_certificate_errors(&self) -> Result>> { + #[cfg(feature="windows-security")] #[inline] pub fn get_ignorable_server_certificate_errors(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IgnorableServerCertificateErrors)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{static class WebSocketError} impl RtActivatable for WebSocketError {} impl WebSocketError { - #[cfg(feature="windows-web")] #[inline] pub fn get_status(hresult: i32) -> Result { unsafe { + #[cfg(feature="windows-web")] #[inline] pub fn get_status(hresult: i32) -> Result { >::get_activation_factory().get_status(hresult) - }} + } } DEFINE_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]) [CLSID_WebSocketError]); DEFINE_IID!(IID_IWebSocketErrorStatics, 667808603, 8033, 18185, 142, 2, 97, 40, 58, 218, 78, 157); @@ -6783,11 +6783,11 @@ RT_INTERFACE!{static interface IWebSocketErrorStatics(IWebSocketErrorStaticsVtbl #[cfg(feature="windows-web")] fn GetStatus(&self, hresult: i32, out: *mut super::super::web::WebErrorStatus) -> HRESULT }} impl IWebSocketErrorStatics { - #[cfg(feature="windows-web")] #[inline] pub unsafe fn get_status(&self, hresult: i32) -> Result { + #[cfg(feature="windows-web")] #[inline] pub fn get_status(&self, hresult: i32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetStatus)(self as *const _ as *mut _, hresult, &mut out); if hr == S_OK { Ok(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] { @@ -6796,50 +6796,50 @@ RT_INTERFACE!{interface IWebSocketInformation(IWebSocketInformationVtbl): IInspe fn get_Protocol(&self, out: *mut HSTRING) -> HRESULT }} impl IWebSocketInformation { - #[inline] pub unsafe fn get_local_address(&self) -> Result> { + #[inline] pub fn get_local_address(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LocalAddress)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_bandwidth_statistics(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_bandwidth_statistics(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BandwidthStatistics)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_protocol(&self) -> Result { + }} + #[inline] pub fn get_protocol(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Protocol)(self as *const _ as *mut _, &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(&self, out: *mut *mut super::super::security::cryptography::certificates::Certificate) -> HRESULT, fn get_ServerCertificateErrorSeverity(&self, out: *mut SocketSslErrorSeverity) -> HRESULT, - #[cfg(feature="windows-security")] fn get_ServerCertificateErrors(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - #[cfg(feature="windows-security")] fn get_ServerIntermediateCertificates(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + #[cfg(feature="windows-security")] fn get_ServerCertificateErrors(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + #[cfg(feature="windows-security")] fn get_ServerIntermediateCertificates(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IWebSocketInformation2 { - #[cfg(feature="windows-security")] #[inline] pub unsafe fn get_server_certificate(&self) -> Result> { + #[cfg(feature="windows-security")] #[inline] pub fn get_server_certificate(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServerCertificate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_server_certificate_error_severity(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_server_certificate_error_severity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ServerCertificateErrorSeverity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-security")] #[inline] pub unsafe fn get_server_certificate_errors(&self) -> Result>> { + }} + #[cfg(feature="windows-security")] #[inline] pub fn get_server_certificate_errors(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServerCertificateErrors)(self 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 get_server_intermediate_certificates(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-security")] #[inline] pub fn get_server_intermediate_certificates(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServerIntermediateCertificates)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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} @@ -6851,42 +6851,42 @@ RT_INTERFACE!{interface IWebSocketServerCustomValidationRequestedEventArgs(IWebS #[cfg(feature="windows-security")] fn get_ServerCertificate(&self, out: *mut *mut super::super::security::cryptography::certificates::Certificate) -> HRESULT, fn get_ServerCertificateErrorSeverity(&self, out: *mut SocketSslErrorSeverity) -> HRESULT, #[cfg(not(feature="windows-security"))] fn __Dummy2(&self) -> (), - #[cfg(feature="windows-security")] fn get_ServerCertificateErrors(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + #[cfg(feature="windows-security")] fn get_ServerCertificateErrors(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, #[cfg(not(feature="windows-security"))] fn __Dummy3(&self) -> (), - #[cfg(feature="windows-security")] fn get_ServerIntermediateCertificates(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + #[cfg(feature="windows-security")] fn get_ServerIntermediateCertificates(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn Reject(&self) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IWebSocketServerCustomValidationRequestedEventArgs { - #[cfg(feature="windows-security")] #[inline] pub unsafe fn get_server_certificate(&self) -> Result> { + #[cfg(feature="windows-security")] #[inline] pub fn get_server_certificate(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServerCertificate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_server_certificate_error_severity(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_server_certificate_error_severity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ServerCertificateErrorSeverity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-security")] #[inline] pub unsafe fn get_server_certificate_errors(&self) -> Result>> { + }} + #[cfg(feature="windows-security")] #[inline] pub fn get_server_certificate_errors(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServerCertificateErrors)(self 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 get_server_intermediate_certificates(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-security")] #[inline] pub fn get_server_intermediate_certificates(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServerIntermediateCertificates)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn reject(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn reject(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Reject)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class WebSocketServerCustomValidationRequestedEventArgs: IWebSocketServerCustomValidationRequestedEventArgs} } // Windows.Networking.Sockets @@ -6900,31 +6900,31 @@ RT_INTERFACE!{interface IVpnAppId(IVpnAppIdVtbl): IInspectable(IInspectableVtbl) fn put_Value(&self, value: HSTRING) -> HRESULT }} impl IVpnAppId { - #[inline] pub unsafe fn get_type(&self) -> Result { + #[inline] pub fn get_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Type)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_type(&self, value: VpnAppIdType) -> Result<()> { + }} + #[inline] pub fn set_type(&self, value: VpnAppIdType) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Type)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result { + }} + #[inline] pub fn get_value(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_value(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_value(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Value)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class VpnAppId: IVpnAppId} impl RtActivatable for VpnAppId {} impl VpnAppId { - #[inline] pub fn create(type_: VpnAppIdType, value: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(type_: VpnAppIdType, value: &HStringArg) -> Result> { >::get_activation_factory().create(type_, value) - }} + } } DEFINE_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]) [CLSID_VpnAppId]); DEFINE_IID!(IID_IVpnAppIdFactory, 1185807658, 2731, 20443, 130, 29, 211, 221, 201, 25, 120, 139); @@ -6932,11 +6932,11 @@ RT_INTERFACE!{static interface IVpnAppIdFactory(IVpnAppIdFactoryVtbl): IInspecta fn Create(&self, type_: VpnAppIdType, value: HSTRING, out: *mut *mut VpnAppId) -> HRESULT }} impl IVpnAppIdFactory { - #[inline] pub unsafe fn create(&self, type_: VpnAppIdType, value: &HStringArg) -> Result> { + #[inline] pub fn create(&self, type_: VpnAppIdType, value: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, type_, value.get(), &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, @@ -6947,7 +6947,7 @@ RT_ENUM! { enum VpnAuthenticationMethod: i32 { 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(&self, mainOuterTunnelTransport: *mut IInspectable, optionalOuterTunnelTransport: *mut IInspectable) -> HRESULT, - fn Start(&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 Start(&self, assignedClientIPv4list: *mut foundation::collections::IVectorView, assignedClientIPv6list: *mut 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(&self) -> HRESULT, #[cfg(not(feature="windows-security"))] fn __Dummy3(&self) -> (), #[cfg(feature="windows-security")] fn RequestCredentials(&self, credType: VpnCredentialType, isRetry: bool, isSingleSignOnCredential: bool, certificate: *mut super::super::security::cryptography::certificates::Certificate, out: *mut *mut VpnPickedCredential) -> HRESULT, @@ -6955,179 +6955,179 @@ RT_INTERFACE!{interface IVpnChannel(IVpnChannelVtbl): IInspectable(IInspectableV fn LogDiagnosticMessage(&self, message: HSTRING) -> HRESULT, fn get_Id(&self, out: *mut u32) -> HRESULT, fn get_Configuration(&self, out: *mut *mut VpnChannelConfiguration) -> HRESULT, - fn add_ActivityChange(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ActivityChange(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ActivityChange(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ActivityChange(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn put_PlugInContext(&self, value: *mut IInspectable) -> HRESULT, fn get_PlugInContext(&self, out: *mut *mut IInspectable) -> HRESULT, fn get_SystemHealth(&self, out: *mut *mut VpnSystemHealth) -> HRESULT, - fn RequestCustomPrompt(&self, customPrompt: *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn RequestCustomPrompt(&self, customPrompt: *mut foundation::collections::IVectorView) -> HRESULT, fn SetErrorMessage(&self, message: HSTRING) -> HRESULT, fn SetAllowedSslTlsVersions(&self, tunnelTransport: *mut IInspectable, useTls12: bool) -> HRESULT }} impl IVpnChannel { - #[inline] pub unsafe fn associate_transport(&self, mainOuterTunnelTransport: &IInspectable, optionalOuterTunnelTransport: &IInspectable) -> Result<()> { + #[inline] pub fn associate_transport(&self, mainOuterTunnelTransport: &IInspectable, optionalOuterTunnelTransport: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AssociateTransport)(self as *const _ as *mut _, mainOuterTunnelTransport as *const _ as *mut _, optionalOuterTunnelTransport as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start(&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<()> { + }} + #[inline] pub fn start(&self, assignedClientIPv4list: &foundation::collections::IVectorView, assignedClientIPv6list: &foundation::collections::IVectorView, vpnInterfaceId: &VpnInterfaceId, routeScope: &VpnRouteAssignment, namespaceScope: &VpnNamespaceAssignment, mtuSize: u32, maxFrameSize: u32, optimizeForLowCostNetwork: bool, mainOuterTunnelTransport: &IInspectable, optionalOuterTunnelTransport: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _, 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(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-security")] #[inline] pub unsafe fn request_credentials(&self, credType: VpnCredentialType, isRetry: bool, isSingleSignOnCredential: bool, certificate: &super::super::security::cryptography::certificates::Certificate) -> Result> { + }} + #[cfg(feature="windows-security")] #[inline] pub fn request_credentials(&self, credType: VpnCredentialType, isRetry: bool, isSingleSignOnCredential: bool, certificate: &super::super::security::cryptography::certificates::Certificate) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestCredentials)(self as *const _ as *mut _, 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(&self, type_: VpnDataPathType) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn request_vpn_packet_buffer(&self, type_: VpnDataPathType) -> Result>> { unsafe { let mut vpnPacketBuffer = null_mut(); let hr = ((*self.lpVtbl).RequestVpnPacketBuffer)(self as *const _ as *mut _, type_, &mut vpnPacketBuffer); - if hr == S_OK { Ok(ComPtr::wrap(vpnPacketBuffer)) } else { err(hr) } - } - #[inline] pub unsafe fn log_diagnostic_message(&self, message: &HStringArg) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(vpnPacketBuffer)) } else { err(hr) } + }} + #[inline] pub fn log_diagnostic_message(&self, message: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).LogDiagnosticMessage)(self as *const _ as *mut _, message.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&self) -> Result { + }} + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_configuration(&self) -> Result> { + }} + #[inline] pub fn get_configuration(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Configuration)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_activity_change(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_activity_change(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ActivityChange)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_activity_change(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_activity_change(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ActivityChange)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_plug_in_context(&self, value: &IInspectable) -> Result<()> { + }} + #[inline] pub fn set_plug_in_context(&self, value: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PlugInContext)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_plug_in_context(&self) -> Result> { + }} + #[inline] pub fn get_plug_in_context(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PlugInContext)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_system_health(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_system_health(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SystemHealth)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_custom_prompt(&self, customPrompt: &super::super::foundation::collections::IVectorView) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn request_custom_prompt(&self, customPrompt: &foundation::collections::IVectorView) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RequestCustomPrompt)(self as *const _ as *mut _, customPrompt as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_error_message(&self, message: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_error_message(&self, message: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetErrorMessage)(self as *const _ as *mut _, message.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_allowed_ssl_tls_versions(&self, tunnelTransport: &IInspectable, useTls12: bool) -> Result<()> { + }} + #[inline] pub fn set_allowed_ssl_tls_versions(&self, tunnelTransport: &IInspectable, useTls12: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetAllowedSslTlsVersions)(self as *const _ as *mut _, tunnelTransport as *const _ as *mut _, useTls12); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class VpnChannel: IVpnChannel} impl RtActivatable for VpnChannel {} impl VpnChannel { - #[inline] pub fn process_event_async(thirdPartyPlugIn: &IInspectable, event: &IInspectable) -> Result<()> { unsafe { + #[inline] pub fn process_event_async(thirdPartyPlugIn: &IInspectable, event: &IInspectable) -> Result<()> { >::get_activation_factory().process_event_async(thirdPartyPlugIn, event) - }} + } } DEFINE_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]) [CLSID_VpnChannel]); 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(&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(&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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ActivityStateChange(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn StartWithMainTransport(&self, assignedClientIPv4list: *mut foundation::collections::IVectorView, assignedClientIPv6list: *mut foundation::collections::IVectorView, vpnInterfaceId: *mut VpnInterfaceId, assignedRoutes: *mut VpnRouteAssignment, assignedDomainName: *mut VpnDomainNameAssignment, mtuSize: u32, maxFrameSize: u32, reserved: bool, mainOuterTunnelTransport: *mut IInspectable) -> HRESULT, + fn StartExistingTransports(&self, assignedClientIPv4list: *mut foundation::collections::IVectorView, assignedClientIPv6list: *mut foundation::collections::IVectorView, vpnInterfaceId: *mut VpnInterfaceId, assignedRoutes: *mut VpnRouteAssignment, assignedDomainName: *mut VpnDomainNameAssignment, mtuSize: u32, maxFrameSize: u32, reserved: bool) -> HRESULT, + fn add_ActivityStateChange(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ActivityStateChange(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn GetVpnSendPacketBuffer(&self, out: *mut *mut VpnPacketBuffer) -> HRESULT, fn GetVpnReceivePacketBuffer(&self, out: *mut *mut VpnPacketBuffer) -> HRESULT, - fn RequestCustomPromptAsync(&self, customPromptElement: *mut super::super::foundation::collections::IVectorView, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn RequestCustomPromptAsync(&self, customPromptElement: *mut foundation::collections::IVectorView, out: *mut *mut foundation::IAsyncAction) -> HRESULT, #[cfg(not(feature="windows-security"))] fn __Dummy7(&self) -> (), - #[cfg(feature="windows-security")] fn RequestCredentialsWithCertificateAsync(&self, credType: VpnCredentialType, credOptions: u32, certificate: *mut super::super::security::cryptography::certificates::Certificate, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestCredentialsWithOptionsAsync(&self, credType: VpnCredentialType, credOptions: u32, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestCredentialsSimpleAsync(&self, credType: VpnCredentialType, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-security")] fn RequestCredentialsWithCertificateAsync(&self, credType: VpnCredentialType, credOptions: u32, certificate: *mut super::super::security::cryptography::certificates::Certificate, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestCredentialsWithOptionsAsync(&self, credType: VpnCredentialType, credOptions: u32, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestCredentialsSimpleAsync(&self, credType: VpnCredentialType, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn TerminateConnection(&self, message: HSTRING) -> HRESULT, - fn StartWithTrafficFilter(&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 + fn StartWithTrafficFilter(&self, assignedClientIpv4List: *mut foundation::collections::IVectorView, assignedClientIpv6List: *mut 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(&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<()> { + #[inline] pub fn start_with_main_transport(&self, assignedClientIPv4list: &foundation::collections::IVectorView, assignedClientIPv6list: &foundation::collections::IVectorView, vpnInterfaceId: &VpnInterfaceId, assignedRoutes: &VpnRouteAssignment, assignedDomainName: &VpnDomainNameAssignment, mtuSize: u32, maxFrameSize: u32, reserved: bool, mainOuterTunnelTransport: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StartWithMainTransport)(self as *const _ as *mut _, 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(&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<()> { + }} + #[inline] pub fn start_existing_transports(&self, assignedClientIPv4list: &foundation::collections::IVectorView, assignedClientIPv6list: &foundation::collections::IVectorView, vpnInterfaceId: &VpnInterfaceId, assignedRoutes: &VpnRouteAssignment, assignedDomainName: &VpnDomainNameAssignment, mtuSize: u32, maxFrameSize: u32, reserved: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StartExistingTransports)(self as *const _ as *mut _, 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(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_activity_state_change(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ActivityStateChange)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_activity_state_change(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_activity_state_change(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ActivityStateChange)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_vpn_send_packet_buffer(&self) -> Result> { + }} + #[inline] pub fn get_vpn_send_packet_buffer(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetVpnSendPacketBuffer)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_vpn_receive_packet_buffer(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_vpn_receive_packet_buffer(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetVpnReceivePacketBuffer)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_custom_prompt_async(&self, customPromptElement: &super::super::foundation::collections::IVectorView) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn request_custom_prompt_async(&self, customPromptElement: &foundation::collections::IVectorView) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestCustomPromptAsync)(self as *const _ as *mut _, 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(&self, credType: VpnCredentialType, credOptions: u32, certificate: &super::super::security::cryptography::certificates::Certificate) -> Result>> { + }} + #[cfg(feature="windows-security")] #[inline] pub fn request_credentials_with_certificate_async(&self, credType: VpnCredentialType, credOptions: u32, certificate: &super::super::security::cryptography::certificates::Certificate) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestCredentialsWithCertificateAsync)(self as *const _ as *mut _, 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(&self, credType: VpnCredentialType, credOptions: u32) -> Result>> { + }} + #[inline] pub fn request_credentials_with_options_async(&self, credType: VpnCredentialType, credOptions: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestCredentialsWithOptionsAsync)(self as *const _ as *mut _, credType, credOptions, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_credentials_simple_async(&self, credType: VpnCredentialType) -> Result>> { + }} + #[inline] pub fn request_credentials_simple_async(&self, credType: VpnCredentialType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestCredentialsSimpleAsync)(self as *const _ as *mut _, credType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn terminate_connection(&self, message: &HStringArg) -> Result<()> { + }} + #[inline] pub fn terminate_connection(&self, message: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).TerminateConnection)(self as *const _ as *mut _, message.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start_with_traffic_filter(&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<()> { + }} + #[inline] pub fn start_with_traffic_filter(&self, assignedClientIpv4List: &foundation::collections::IVectorView, assignedClientIpv6List: &foundation::collections::IVectorView, vpnInterfaceId: &VpnInterfaceId, assignedRoutes: &VpnRouteAssignment, assignedNamespace: &VpnDomainNameAssignment, mtuSize: u32, maxFrameSize: u32, reserved: bool, mainOuterTunnelTransport: &IInspectable, optionalOuterTunnelTransport: &IInspectable, assignedTrafficFilters: &VpnTrafficFilterAssignment) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StartWithTrafficFilter)(self as *const _ as *mut _, 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) } - } + }} } 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(&self, out: *mut VpnChannelActivityEventType) -> HRESULT }} impl IVpnChannelActivityEventArgs { - #[inline] pub unsafe fn get_type(&self) -> Result { + #[inline] pub fn get_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Type)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class VpnChannelActivityEventArgs: IVpnChannelActivityEventArgs} RT_ENUM! { enum VpnChannelActivityEventType: i32 { @@ -7138,47 +7138,47 @@ RT_INTERFACE!{interface IVpnChannelActivityStateChangedArgs(IVpnChannelActivityS fn get_ActivityState(&self, out: *mut VpnChannelActivityEventType) -> HRESULT }} impl IVpnChannelActivityStateChangedArgs { - #[inline] pub unsafe fn get_activity_state(&self) -> Result { + #[inline] pub fn get_activity_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ActivityState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class VpnChannelActivityStateChangedArgs: IVpnChannelActivityStateChangedArgs} 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(&self, out: *mut HSTRING) -> HRESULT, - fn get_ServerHostNameList(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_ServerHostNameList(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_CustomField(&self, out: *mut HSTRING) -> HRESULT }} impl IVpnChannelConfiguration { - #[inline] pub unsafe fn get_server_service_name(&self) -> Result { + #[inline] pub fn get_server_service_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServerServiceName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_server_host_name_list(&self) -> Result>> { + }} + #[inline] pub fn get_server_host_name_list(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServerHostNameList)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_custom_field(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_custom_field(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CustomField)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class VpnChannelConfiguration: IVpnChannelConfiguration} 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_ServerUris(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IVpnChannelConfiguration2 { - #[inline] pub unsafe fn get_server_uris(&self) -> Result>> { + #[inline] pub fn get_server_uris(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServerUris)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum VpnChannelRequestCredentialsOptions: u32 { None (VpnChannelRequestCredentialsOptions_None) = 0, Retrying (VpnChannelRequestCredentialsOptions_Retrying) = 1, UseForSingleSignIn (VpnChannelRequestCredentialsOptions_UseForSingleSignIn) = 2, @@ -7188,10 +7188,10 @@ RT_INTERFACE!{static interface IVpnChannelStatics(IVpnChannelStaticsVtbl): IInsp fn ProcessEventAsync(&self, thirdPartyPlugIn: *mut IInspectable, event: *mut IInspectable) -> HRESULT }} impl IVpnChannelStatics { - #[inline] pub unsafe fn process_event_async(&self, thirdPartyPlugIn: &IInspectable, event: &IInspectable) -> Result<()> { + #[inline] pub fn process_event_async(&self, thirdPartyPlugIn: &IInspectable, event: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ProcessEventAsync)(self as *const _ as *mut _, thirdPartyPlugIn as *const _ as *mut _, event as *const _ as *mut _); if hr == S_OK { Ok(()) } 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] { @@ -7201,26 +7201,26 @@ RT_INTERFACE!{interface IVpnCredential(IVpnCredentialVtbl): IInspectable(IInspec #[cfg(feature="windows-security")] fn get_OldPasswordCredential(&self, out: *mut *mut super::super::security::credentials::PasswordCredential) -> HRESULT }} impl IVpnCredential { - #[cfg(feature="windows-security")] #[inline] pub unsafe fn get_passkey_credential(&self) -> Result> { + #[cfg(feature="windows-security")] #[inline] pub fn get_passkey_credential(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PasskeyCredential)(self 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 get_certificate_credential(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-security")] #[inline] pub fn get_certificate_credential(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CertificateCredential)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_additional_pin(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_additional_pin(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AdditionalPin)(self as *const _ as *mut _, &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(&self) -> Result> { + }} + #[cfg(feature="windows-security")] #[inline] pub fn get_old_password_credential(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OldPasswordCredential)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class VpnCredential: IVpnCredential} RT_ENUM! { enum VpnCredentialType: i32 { @@ -7233,45 +7233,45 @@ RT_INTERFACE!{interface IVpnCustomCheckBox(IVpnCustomCheckBoxVtbl): IInspectable fn get_Checked(&self, out: *mut bool) -> HRESULT }} impl IVpnCustomCheckBox { - #[inline] pub unsafe fn set_initial_check_state(&self, value: bool) -> Result<()> { + #[inline] pub fn set_initial_check_state(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InitialCheckState)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_initial_check_state(&self) -> Result { + }} + #[inline] pub fn get_initial_check_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InitialCheckState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_checked(&self) -> Result { + }} + #[inline] pub fn get_checked(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Checked)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class VpnCustomCheckBox: IVpnCustomCheckBox} impl RtActivatable for VpnCustomCheckBox {} DEFINE_CLSID!(VpnCustomCheckBox(&[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,117,115,116,111,109,67,104,101,99,107,66,111,120,0]) [CLSID_VpnCustomCheckBox]); 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(&self, value: *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_OptionsText(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn put_OptionsText(&self, value: *mut foundation::collections::IVectorView) -> HRESULT, + fn get_OptionsText(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_Selected(&self, out: *mut u32) -> HRESULT }} impl IVpnCustomComboBox { - #[inline] pub unsafe fn set_options_text(&self, value: &super::super::foundation::collections::IVectorView) -> Result<()> { + #[inline] pub fn set_options_text(&self, value: &foundation::collections::IVectorView) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OptionsText)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_options_text(&self) -> Result>> { + }} + #[inline] pub fn get_options_text(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OptionsText)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_selected(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_selected(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Selected)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class VpnCustomComboBox: IVpnCustomComboBox} impl RtActivatable for VpnCustomComboBox {} @@ -7285,29 +7285,29 @@ RT_INTERFACE!{interface IVpnCustomEditBox(IVpnCustomEditBoxVtbl): IInspectable(I fn get_Text(&self, out: *mut HSTRING) -> HRESULT }} impl IVpnCustomEditBox { - #[inline] pub unsafe fn set_default_text(&self, value: &HStringArg) -> Result<()> { + #[inline] pub fn set_default_text(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DefaultText)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_text(&self) -> Result { + }} + #[inline] pub fn get_default_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DefaultText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_no_echo(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_no_echo(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_NoEcho)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_no_echo(&self) -> Result { + }} + #[inline] pub fn get_no_echo(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NoEcho)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_text(&self) -> Result { + }} + #[inline] pub fn get_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Text)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class VpnCustomEditBox: IVpnCustomEditBox} impl RtActivatable for VpnCustomEditBox {} @@ -7329,33 +7329,33 @@ RT_INTERFACE!{interface IVpnCustomPrompt(IVpnCustomPromptVtbl): IInspectable(IIn fn get_Bordered(&self, out: *mut bool) -> HRESULT }} impl IVpnCustomPrompt { - #[inline] pub unsafe fn set_label(&self, value: &HStringArg) -> Result<()> { + #[inline] pub fn set_label(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Label)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_label(&self) -> Result { + }} + #[inline] pub fn get_label(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Label)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_compulsory(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_compulsory(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Compulsory)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_compulsory(&self) -> Result { + }} + #[inline] pub fn get_compulsory(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Compulsory)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_bordered(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_bordered(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Bordered)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_bordered(&self) -> Result { + }} + #[inline] pub fn get_bordered(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Bordered)(self as *const _ as *mut _, &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] { @@ -7364,20 +7364,20 @@ RT_INTERFACE!{interface IVpnCustomPromptBooleanInput(IVpnCustomPromptBooleanInpu fn get_Value(&self, out: *mut bool) -> HRESULT }} impl IVpnCustomPromptBooleanInput { - #[inline] pub unsafe fn set_initial_value(&self, value: bool) -> Result<()> { + #[inline] pub fn set_initial_value(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InitialValue)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_initial_value(&self) -> Result { + }} + #[inline] pub fn get_initial_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InitialValue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result { + }} + #[inline] pub fn get_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class VpnCustomPromptBooleanInput: IVpnCustomPromptBooleanInput} impl RtActivatable for VpnCustomPromptBooleanInput {} @@ -7392,50 +7392,50 @@ RT_INTERFACE!{interface IVpnCustomPromptElement(IVpnCustomPromptElementVtbl): II fn get_Emphasized(&self, out: *mut bool) -> HRESULT }} impl IVpnCustomPromptElement { - #[inline] pub unsafe fn set_display_name(&self, value: &HStringArg) -> Result<()> { + #[inline] pub fn set_display_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_compulsory(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_compulsory(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Compulsory)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_compulsory(&self) -> Result { + }} + #[inline] pub fn get_compulsory(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Compulsory)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_emphasized(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_emphasized(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Emphasized)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_emphasized(&self) -> Result { + }} + #[inline] pub fn get_emphasized(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Emphasized)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Options(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_SelectedIndex(&self, out: *mut u32) -> HRESULT }} impl IVpnCustomPromptOptionSelector { - #[inline] pub unsafe fn get_options(&self) -> Result>> { + #[inline] pub fn get_options(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Options)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_selected_index(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_selected_index(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SelectedIndex)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class VpnCustomPromptOptionSelector: IVpnCustomPromptOptionSelector} impl RtActivatable for VpnCustomPromptOptionSelector {} @@ -7446,15 +7446,15 @@ RT_INTERFACE!{interface IVpnCustomPromptText(IVpnCustomPromptTextVtbl): IInspect fn get_Text(&self, out: *mut HSTRING) -> HRESULT }} impl IVpnCustomPromptText { - #[inline] pub unsafe fn set_text(&self, value: &HStringArg) -> Result<()> { + #[inline] pub fn set_text(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Text)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_text(&self) -> Result { + }} + #[inline] pub fn get_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Text)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class VpnCustomPromptText: IVpnCustomPromptText} impl RtActivatable for VpnCustomPromptText {} @@ -7468,29 +7468,29 @@ RT_INTERFACE!{interface IVpnCustomPromptTextInput(IVpnCustomPromptTextInputVtbl) fn get_Text(&self, out: *mut HSTRING) -> HRESULT }} impl IVpnCustomPromptTextInput { - #[inline] pub unsafe fn set_placeholder_text(&self, value: &HStringArg) -> Result<()> { + #[inline] pub fn set_placeholder_text(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PlaceholderText)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_placeholder_text(&self) -> Result { + }} + #[inline] pub fn get_placeholder_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PlaceholderText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_text_hidden(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_text_hidden(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsTextHidden)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_text_hidden(&self) -> Result { + }} + #[inline] pub fn get_is_text_hidden(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsTextHidden)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_text(&self) -> Result { + }} + #[inline] pub fn get_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Text)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class VpnCustomPromptTextInput: IVpnCustomPromptTextInput} impl RtActivatable for VpnCustomPromptTextInput {} @@ -7501,15 +7501,15 @@ RT_INTERFACE!{interface IVpnCustomTextBox(IVpnCustomTextBoxVtbl): IInspectable(I fn get_DisplayText(&self, out: *mut HSTRING) -> HRESULT }} impl IVpnCustomTextBox { - #[inline] pub unsafe fn set_display_text(&self, value: &HStringArg) -> Result<()> { + #[inline] pub fn set_display_text(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayText)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_text(&self) -> Result { + }} + #[inline] pub fn get_display_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class VpnCustomTextBox: IVpnCustomTextBox} impl RtActivatable for VpnCustomTextBox {} @@ -7519,25 +7519,25 @@ RT_ENUM! { enum VpnDataPathType: i32 { }} 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn put_ProxyAutoConfigurationUri(&self, value: *mut super::super::foundation::Uri) -> HRESULT, - fn get_ProxyAutoConfigurationUri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT + fn get_DomainNameList(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn put_ProxyAutoConfigurationUri(&self, value: *mut foundation::Uri) -> HRESULT, + fn get_ProxyAutoConfigurationUri(&self, out: *mut *mut foundation::Uri) -> HRESULT }} impl IVpnDomainNameAssignment { - #[inline] pub unsafe fn get_domain_name_list(&self) -> Result>> { + #[inline] pub fn get_domain_name_list(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DomainNameList)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_proxy_auto_configuration_uri(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_proxy_auto_configuration_uri(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ProxyAutoConfigurationUri)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_proxy_auto_configuration_uri(&self) -> Result> { + }} + #[inline] pub fn get_proxy_auto_configuration_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProxyAutoConfigurationUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class VpnDomainNameAssignment: IVpnDomainNameAssignment} impl RtActivatable for VpnDomainNameAssignment {} @@ -7548,68 +7548,68 @@ RT_INTERFACE!{interface IVpnDomainNameInfo(IVpnDomainNameInfoVtbl): IInspectable fn get_DomainName(&self, out: *mut *mut super::HostName) -> HRESULT, fn put_DomainNameType(&self, value: VpnDomainNameType) -> HRESULT, fn get_DomainNameType(&self, out: *mut VpnDomainNameType) -> HRESULT, - fn get_DnsServers(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_WebProxyServers(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_DnsServers(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_WebProxyServers(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IVpnDomainNameInfo { - #[inline] pub unsafe fn set_domain_name(&self, value: &super::HostName) -> Result<()> { + #[inline] pub fn set_domain_name(&self, value: &super::HostName) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DomainName)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_domain_name(&self) -> Result> { + }} + #[inline] pub fn get_domain_name(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DomainName)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_domain_name_type(&self, value: VpnDomainNameType) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_domain_name_type(&self, value: VpnDomainNameType) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DomainNameType)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_domain_name_type(&self) -> Result { + }} + #[inline] pub fn get_domain_name_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DomainNameType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_dns_servers(&self) -> Result>> { + }} + #[inline] pub fn get_dns_servers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DnsServers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_web_proxy_servers(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_web_proxy_servers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WebProxyServers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class VpnDomainNameInfo: IVpnDomainNameInfo} impl RtActivatable for VpnDomainNameInfo {} impl VpnDomainNameInfo { - #[inline] pub fn create_vpn_domain_name_info(name: &HStringArg, nameType: VpnDomainNameType, dnsServerList: &super::super::foundation::collections::IIterable, proxyServerList: &super::super::foundation::collections::IIterable) -> Result> { unsafe { + #[inline] pub fn create_vpn_domain_name_info(name: &HStringArg, nameType: VpnDomainNameType, dnsServerList: &foundation::collections::IIterable, proxyServerList: &foundation::collections::IIterable) -> Result> { >::get_activation_factory().create_vpn_domain_name_info(name, nameType, dnsServerList, proxyServerList) - }} + } } DEFINE_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]) [CLSID_VpnDomainNameInfo]); 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_WebProxyUris(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IVpnDomainNameInfo2 { - #[inline] pub unsafe fn get_web_proxy_uris(&self) -> Result>> { + #[inline] pub fn get_web_proxy_uris(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WebProxyUris)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, name: HSTRING, nameType: VpnDomainNameType, dnsServerList: *mut super::super::foundation::collections::IIterable, proxyServerList: *mut super::super::foundation::collections::IIterable, out: *mut *mut VpnDomainNameInfo) -> HRESULT + fn CreateVpnDomainNameInfo(&self, name: HSTRING, nameType: VpnDomainNameType, dnsServerList: *mut foundation::collections::IIterable, proxyServerList: *mut foundation::collections::IIterable, out: *mut *mut VpnDomainNameInfo) -> HRESULT }} impl IVpnDomainNameInfoFactory { - #[inline] pub unsafe fn create_vpn_domain_name_info(&self, name: &HStringArg, nameType: VpnDomainNameType, dnsServerList: &super::super::foundation::collections::IIterable, proxyServerList: &super::super::foundation::collections::IIterable) -> Result> { + #[inline] pub fn create_vpn_domain_name_info(&self, name: &HStringArg, nameType: VpnDomainNameType, dnsServerList: &foundation::collections::IIterable, proxyServerList: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateVpnDomainNameInfo)(self as *const _ as *mut _, 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_ENUM! { enum VpnDomainNameType: i32 { Suffix (VpnDomainNameType_Suffix) = 0, FullyQualified (VpnDomainNameType_FullyQualified) = 1, Reserved (VpnDomainNameType_Reserved) = 65535, @@ -7619,18 +7619,18 @@ RT_INTERFACE!{interface IVpnInterfaceId(IVpnInterfaceIdVtbl): IInspectable(IInsp fn GetAddressInfo(&self, idSize: *mut u32, id: *mut *mut u8) -> HRESULT }} impl IVpnInterfaceId { - #[inline] pub unsafe fn get_address_info(&self) -> Result> { + #[inline] pub fn get_address_info(&self) -> Result> { unsafe { let mut idSize = 0; let mut id = null_mut(); let hr = ((*self.lpVtbl).GetAddressInfo)(self as *const _ as *mut _, &mut idSize, &mut id); if hr == S_OK { Ok(ComArray::from_raw(idSize, id)) } else { err(hr) } - } + }} } RT_CLASS!{class VpnInterfaceId: IVpnInterfaceId} impl RtActivatable for VpnInterfaceId {} impl VpnInterfaceId { - #[inline] pub fn create_vpn_interface_id(address: &[u8]) -> Result> { unsafe { + #[inline] pub fn create_vpn_interface_id(address: &[u8]) -> Result> { >::get_activation_factory().create_vpn_interface_id(address) - }} + } } DEFINE_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]) [CLSID_VpnInterfaceId]); DEFINE_IID!(IID_IVpnInterfaceIdFactory, 2653805730, 5906, 19684, 177, 121, 140, 101, 44, 109, 16, 0); @@ -7638,74 +7638,74 @@ RT_INTERFACE!{static interface IVpnInterfaceIdFactory(IVpnInterfaceIdFactoryVtbl fn CreateVpnInterfaceId(&self, addressSize: u32, address: *mut u8, out: *mut *mut VpnInterfaceId) -> HRESULT }} impl IVpnInterfaceIdFactory { - #[inline] pub unsafe fn create_vpn_interface_id(&self, address: &[u8]) -> Result> { + #[inline] pub fn create_vpn_interface_id(&self, address: &[u8]) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateVpnInterfaceId)(self as *const _ as *mut _, address.len() as u32, address.as_ptr() as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, }} 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(&self, xml: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn AddProfileFromObjectAsync(&self, profile: *mut IVpnProfile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn UpdateProfileFromXmlAsync(&self, xml: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn UpdateProfileFromObjectAsync(&self, profile: *mut IVpnProfile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetProfilesAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn DeleteProfileAsync(&self, profile: *mut IVpnProfile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn ConnectProfileAsync(&self, profile: *mut IVpnProfile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn AddProfileFromXmlAsync(&self, xml: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn AddProfileFromObjectAsync(&self, profile: *mut IVpnProfile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn UpdateProfileFromXmlAsync(&self, xml: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn UpdateProfileFromObjectAsync(&self, profile: *mut IVpnProfile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetProfilesAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn DeleteProfileAsync(&self, profile: *mut IVpnProfile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ConnectProfileAsync(&self, profile: *mut IVpnProfile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-security"))] fn __Dummy7(&self) -> (), - #[cfg(feature="windows-security")] fn ConnectProfileWithPasswordCredentialAsync(&self, profile: *mut IVpnProfile, passwordCredential: *mut super::super::security::credentials::PasswordCredential, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn DisconnectProfileAsync(&self, profile: *mut IVpnProfile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-security")] fn ConnectProfileWithPasswordCredentialAsync(&self, profile: *mut IVpnProfile, passwordCredential: *mut super::super::security::credentials::PasswordCredential, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn DisconnectProfileAsync(&self, profile: *mut IVpnProfile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IVpnManagementAgent { - #[inline] pub unsafe fn add_profile_from_xml_async(&self, xml: &HStringArg) -> Result>> { + #[inline] pub fn add_profile_from_xml_async(&self, xml: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AddProfileFromXmlAsync)(self as *const _ as *mut _, xml.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_profile_from_object_async(&self, profile: &IVpnProfile) -> Result>> { + }} + #[inline] pub fn add_profile_from_object_async(&self, profile: &IVpnProfile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AddProfileFromObjectAsync)(self 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 update_profile_from_xml_async(&self, xml: &HStringArg) -> Result>> { + }} + #[inline] pub fn update_profile_from_xml_async(&self, xml: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UpdateProfileFromXmlAsync)(self as *const _ as *mut _, xml.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn update_profile_from_object_async(&self, profile: &IVpnProfile) -> Result>> { + }} + #[inline] pub fn update_profile_from_object_async(&self, profile: &IVpnProfile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UpdateProfileFromObjectAsync)(self 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_profiles_async(&self) -> Result>>> { + }} + #[inline] pub fn get_profiles_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetProfilesAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete_profile_async(&self, profile: &IVpnProfile) -> Result>> { + }} + #[inline] pub fn delete_profile_async(&self, profile: &IVpnProfile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteProfileAsync)(self 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 connect_profile_async(&self, profile: &IVpnProfile) -> Result>> { + }} + #[inline] pub fn connect_profile_async(&self, profile: &IVpnProfile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConnectProfileAsync)(self 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-security")] #[inline] pub unsafe fn connect_profile_with_password_credential_async(&self, profile: &IVpnProfile, passwordCredential: &super::super::security::credentials::PasswordCredential) -> Result>> { + }} + #[cfg(feature="windows-security")] #[inline] pub fn connect_profile_with_password_credential_async(&self, profile: &IVpnProfile, passwordCredential: &super::super::security::credentials::PasswordCredential) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConnectProfileWithPasswordCredentialAsync)(self as *const _ as *mut _, 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(&self, profile: &IVpnProfile) -> Result>> { + }} + #[inline] pub fn disconnect_profile_async(&self, profile: &IVpnProfile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DisconnectProfileAsync)(self as *const _ as *mut _, profile as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class VpnManagementAgent: IVpnManagementAgent} impl RtActivatable for VpnManagementAgent {} @@ -7718,30 +7718,30 @@ RT_ENUM! { enum VpnManagementErrorStatus: i32 { }} 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(&self, value: *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_NamespaceList(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn put_ProxyAutoConfigUri(&self, value: *mut super::super::foundation::Uri) -> HRESULT, - fn get_ProxyAutoConfigUri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT + fn put_NamespaceList(&self, value: *mut foundation::collections::IVector) -> HRESULT, + fn get_NamespaceList(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn put_ProxyAutoConfigUri(&self, value: *mut foundation::Uri) -> HRESULT, + fn get_ProxyAutoConfigUri(&self, out: *mut *mut foundation::Uri) -> HRESULT }} impl IVpnNamespaceAssignment { - #[inline] pub unsafe fn set_namespace_list(&self, value: &super::super::foundation::collections::IVector) -> Result<()> { + #[inline] pub fn set_namespace_list(&self, value: &foundation::collections::IVector) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_NamespaceList)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_namespace_list(&self) -> Result>> { + }} + #[inline] pub fn get_namespace_list(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NamespaceList)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_proxy_auto_config_uri(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_proxy_auto_config_uri(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ProxyAutoConfigUri)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_proxy_auto_config_uri(&self) -> Result> { + }} + #[inline] pub fn get_proxy_auto_config_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProxyAutoConfigUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class VpnNamespaceAssignment: IVpnNamespaceAssignment} impl RtActivatable for VpnNamespaceAssignment {} @@ -7750,62 +7750,62 @@ DEFINE_IID!(IID_IVpnNamespaceInfo, 820902723, 17487, 17605, 129, 103, 163, 90, 1 RT_INTERFACE!{interface IVpnNamespaceInfo(IVpnNamespaceInfoVtbl): IInspectable(IInspectableVtbl) [IID_IVpnNamespaceInfo] { fn put_Namespace(&self, value: HSTRING) -> HRESULT, fn get_Namespace(&self, out: *mut HSTRING) -> HRESULT, - fn put_DnsServers(&self, value: *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_DnsServers(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn put_WebProxyServers(&self, value: *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_WebProxyServers(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn put_DnsServers(&self, value: *mut foundation::collections::IVector) -> HRESULT, + fn get_DnsServers(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn put_WebProxyServers(&self, value: *mut foundation::collections::IVector) -> HRESULT, + fn get_WebProxyServers(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IVpnNamespaceInfo { - #[inline] pub unsafe fn set_namespace(&self, value: &HStringArg) -> Result<()> { + #[inline] pub fn set_namespace(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Namespace)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_namespace(&self) -> Result { + }} + #[inline] pub fn get_namespace(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Namespace)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_dns_servers(&self, value: &super::super::foundation::collections::IVector) -> Result<()> { + }} + #[inline] pub fn set_dns_servers(&self, value: &foundation::collections::IVector) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DnsServers)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_dns_servers(&self) -> Result>> { + }} + #[inline] pub fn get_dns_servers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DnsServers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_web_proxy_servers(&self, value: &super::super::foundation::collections::IVector) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_web_proxy_servers(&self, value: &foundation::collections::IVector) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_WebProxyServers)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_web_proxy_servers(&self) -> Result>> { + }} + #[inline] pub fn get_web_proxy_servers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WebProxyServers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class VpnNamespaceInfo: IVpnNamespaceInfo} impl RtActivatable for VpnNamespaceInfo {} impl VpnNamespaceInfo { - #[inline] pub fn create_vpn_namespace_info(name: &HStringArg, dnsServerList: &super::super::foundation::collections::IVector, proxyServerList: &super::super::foundation::collections::IVector) -> Result> { unsafe { + #[inline] pub fn create_vpn_namespace_info(name: &HStringArg, dnsServerList: &foundation::collections::IVector, proxyServerList: &foundation::collections::IVector) -> Result> { >::get_activation_factory().create_vpn_namespace_info(name, dnsServerList, proxyServerList) - }} + } } DEFINE_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]) [CLSID_VpnNamespaceInfo]); 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(&self, name: HSTRING, dnsServerList: *mut super::super::foundation::collections::IVector, proxyServerList: *mut super::super::foundation::collections::IVector, out: *mut *mut VpnNamespaceInfo) -> HRESULT + fn CreateVpnNamespaceInfo(&self, name: HSTRING, dnsServerList: *mut foundation::collections::IVector, proxyServerList: *mut foundation::collections::IVector, out: *mut *mut VpnNamespaceInfo) -> HRESULT }} impl IVpnNamespaceInfoFactory { - #[inline] pub unsafe fn create_vpn_namespace_info(&self, name: &HStringArg, dnsServerList: &super::super::foundation::collections::IVector, proxyServerList: &super::super::foundation::collections::IVector) -> Result> { + #[inline] pub fn create_vpn_namespace_info(&self, name: &HStringArg, dnsServerList: &foundation::collections::IVector, proxyServerList: &foundation::collections::IVector) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateVpnNamespaceInfo)(self as *const _ as *mut _, 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) } - } + }} } 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Servers(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_RoutingPolicyType(&self, out: *mut VpnRoutingPolicyType) -> HRESULT, fn put_RoutingPolicyType(&self, value: VpnRoutingPolicyType) -> HRESULT, fn get_NativeProtocolType(&self, out: *mut VpnNativeProtocolType) -> HRESULT, @@ -7818,56 +7818,56 @@ RT_INTERFACE!{interface IVpnNativeProfile(IVpnNativeProfileVtbl): IInspectable(I fn put_EapConfiguration(&self, value: HSTRING) -> HRESULT }} impl IVpnNativeProfile { - #[inline] pub unsafe fn get_servers(&self) -> Result>> { + #[inline] pub fn get_servers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Servers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_routing_policy_type(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_routing_policy_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RoutingPolicyType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_routing_policy_type(&self, value: VpnRoutingPolicyType) -> Result<()> { + }} + #[inline] pub fn set_routing_policy_type(&self, value: VpnRoutingPolicyType) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RoutingPolicyType)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_native_protocol_type(&self) -> Result { + }} + #[inline] pub fn get_native_protocol_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NativeProtocolType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_native_protocol_type(&self, value: VpnNativeProtocolType) -> Result<()> { + }} + #[inline] pub fn set_native_protocol_type(&self, value: VpnNativeProtocolType) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_NativeProtocolType)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_user_authentication_method(&self) -> Result { + }} + #[inline] pub fn get_user_authentication_method(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UserAuthenticationMethod)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_user_authentication_method(&self, value: VpnAuthenticationMethod) -> Result<()> { + }} + #[inline] pub fn set_user_authentication_method(&self, value: VpnAuthenticationMethod) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_UserAuthenticationMethod)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_tunnel_authentication_method(&self) -> Result { + }} + #[inline] pub fn get_tunnel_authentication_method(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TunnelAuthenticationMethod)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_tunnel_authentication_method(&self, value: VpnAuthenticationMethod) -> Result<()> { + }} + #[inline] pub fn set_tunnel_authentication_method(&self, value: VpnAuthenticationMethod) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TunnelAuthenticationMethod)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_eap_configuration(&self) -> Result { + }} + #[inline] pub fn get_eap_configuration(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EapConfiguration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_eap_configuration(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_eap_configuration(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_EapConfiguration)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class VpnNativeProfile: IVpnNativeProfile} impl RtActivatable for VpnNativeProfile {} @@ -7879,20 +7879,20 @@ RT_INTERFACE!{interface IVpnNativeProfile2(IVpnNativeProfile2Vtbl): IInspectable fn get_ConnectionStatus(&self, out: *mut VpnManagementConnectionStatus) -> HRESULT }} impl IVpnNativeProfile2 { - #[inline] pub unsafe fn get_require_vpn_client_app_ui(&self) -> Result { + #[inline] pub fn get_require_vpn_client_app_ui(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RequireVpnClientAppUI)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_require_vpn_client_app_ui(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_require_vpn_client_app_ui(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RequireVpnClientAppUI)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_connection_status(&self) -> Result { + }} + #[inline] pub fn get_connection_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ConnectionStatus)(self as *const _ as *mut _, &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, @@ -7907,36 +7907,36 @@ RT_INTERFACE!{interface IVpnPacketBuffer(IVpnPacketBufferVtbl): IInspectable(IIn fn get_TransportAffinity(&self, out: *mut u32) -> HRESULT }} impl IVpnPacketBuffer { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_buffer(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_buffer(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Buffer)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_status(&self, value: VpnPacketBufferStatus) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_status(&self, value: VpnPacketBufferStatus) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Status)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_transport_affinity(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_transport_affinity(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TransportAffinity)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_transport_affinity(&self) -> Result { + }} + #[inline] pub fn get_transport_affinity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TransportAffinity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class VpnPacketBuffer: IVpnPacketBuffer} impl RtActivatable for VpnPacketBuffer {} impl VpnPacketBuffer { - #[inline] pub fn create_vpn_packet_buffer(parentBuffer: &VpnPacketBuffer, offset: u32, length: u32) -> Result> { unsafe { + #[inline] pub fn create_vpn_packet_buffer(parentBuffer: &VpnPacketBuffer, offset: u32, length: u32) -> Result> { >::get_activation_factory().create_vpn_packet_buffer(parentBuffer, offset, length) - }} + } } DEFINE_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]) [CLSID_VpnPacketBuffer]); DEFINE_IID!(IID_IVpnPacketBuffer2, 1717473776, 34821, 19445, 166, 25, 46, 132, 136, 46, 107, 79); @@ -7944,22 +7944,22 @@ RT_INTERFACE!{interface IVpnPacketBuffer2(IVpnPacketBuffer2Vtbl): IInspectable(I fn get_AppId(&self, out: *mut *mut VpnAppId) -> HRESULT }} impl IVpnPacketBuffer2 { - #[inline] pub unsafe fn get_app_id(&self) -> Result> { + #[inline] pub fn get_app_id(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppId)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } 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(&self, parentBuffer: *mut VpnPacketBuffer, offset: u32, length: u32, out: *mut *mut VpnPacketBuffer) -> HRESULT }} impl IVpnPacketBufferFactory { - #[inline] pub unsafe fn create_vpn_packet_buffer(&self, parentBuffer: &VpnPacketBuffer, offset: u32, length: u32) -> Result> { + #[inline] pub fn create_vpn_packet_buffer(&self, parentBuffer: &VpnPacketBuffer, offset: u32, length: u32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateVpnPacketBuffer)(self as *const _ as *mut _, parentBuffer as *const _ as *mut _, offset, length, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IVpnPacketBufferList, 3271070204, 19804, 19043, 183, 13, 78, 48, 126, 172, 206, 119); RT_INTERFACE!{interface IVpnPacketBufferList(IVpnPacketBufferListVtbl): IInspectable(IInspectableVtbl) [IID_IVpnPacketBufferList] { @@ -7973,42 +7973,42 @@ RT_INTERFACE!{interface IVpnPacketBufferList(IVpnPacketBufferListVtbl): IInspect fn get_Size(&self, out: *mut u32) -> HRESULT }} impl IVpnPacketBufferList { - #[inline] pub unsafe fn append(&self, nextVpnPacketBuffer: &VpnPacketBuffer) -> Result<()> { + #[inline] pub fn append(&self, nextVpnPacketBuffer: &VpnPacketBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Append)(self as *const _ as *mut _, nextVpnPacketBuffer as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_at_begin(&self, nextVpnPacketBuffer: &VpnPacketBuffer) -> Result<()> { + }} + #[inline] pub fn add_at_begin(&self, nextVpnPacketBuffer: &VpnPacketBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddAtBegin)(self as *const _ as *mut _, nextVpnPacketBuffer as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove_at_end(&self) -> Result> { + }} + #[inline] pub fn remove_at_end(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RemoveAtEnd)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn remove_at_begin(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn remove_at_begin(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RemoveAtBegin)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn clear(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn clear(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Clear)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_status(&self, value: VpnPacketBufferStatus) -> Result<()> { + }} + #[inline] pub fn set_status(&self, value: VpnPacketBufferStatus) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Status)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_size(&self) -> Result { + }} + #[inline] pub fn get_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Size)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class VpnPacketBufferList: IVpnPacketBufferList} DEFINE_IID!(IID_IVpnPacketBufferList2, 1048236005, 59934, 18474, 141, 152, 192, 101, 245, 125, 137, 234); @@ -8019,24 +8019,24 @@ RT_INTERFACE!{interface IVpnPacketBufferList2(IVpnPacketBufferList2Vtbl): IInspe fn RemoveTrailingPacket(&self, out: *mut *mut VpnPacketBuffer) -> HRESULT }} impl IVpnPacketBufferList2 { - #[inline] pub unsafe fn add_leading_packet(&self, nextVpnPacketBuffer: &VpnPacketBuffer) -> Result<()> { + #[inline] pub fn add_leading_packet(&self, nextVpnPacketBuffer: &VpnPacketBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddLeadingPacket)(self as *const _ as *mut _, nextVpnPacketBuffer as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove_leading_packet(&self) -> Result> { + }} + #[inline] pub fn remove_leading_packet(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RemoveLeadingPacket)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_trailing_packet(&self, nextVpnPacketBuffer: &VpnPacketBuffer) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_trailing_packet(&self, nextVpnPacketBuffer: &VpnPacketBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddTrailingPacket)(self as *const _ as *mut _, nextVpnPacketBuffer as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove_trailing_packet(&self) -> Result> { + }} + #[inline] pub fn remove_trailing_packet(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RemoveTrailingPacket)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum VpnPacketBufferStatus: i32 { Ok (VpnPacketBufferStatus_Ok) = 0, InvalidBufferSize (VpnPacketBufferStatus_InvalidBufferSize) = 1, @@ -8048,21 +8048,21 @@ RT_INTERFACE!{interface IVpnPickedCredential(IVpnPickedCredentialVtbl): IInspect #[cfg(feature="windows-security")] fn get_OldPasswordCredential(&self, out: *mut *mut super::super::security::credentials::PasswordCredential) -> HRESULT }} impl IVpnPickedCredential { - #[cfg(feature="windows-security")] #[inline] pub unsafe fn get_passkey_credential(&self) -> Result> { + #[cfg(feature="windows-security")] #[inline] pub fn get_passkey_credential(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PasskeyCredential)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_additional_pin(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_additional_pin(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AdditionalPin)(self as *const _ as *mut _, &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(&self) -> Result> { + }} + #[cfg(feature="windows-security")] #[inline] pub fn get_old_password_credential(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OldPasswordCredential)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class VpnPickedCredential: IVpnPickedCredential} DEFINE_IID!(IID_IVpnPlugIn, 3468135687, 53416, 18179, 160, 145, 200, 194, 192, 145, 91, 196); @@ -8074,60 +8074,60 @@ RT_INTERFACE!{interface IVpnPlugIn(IVpnPlugInVtbl): IInspectable(IInspectableVtb fn Decapsulate(&self, channel: *mut VpnChannel, encapBuffer: *mut VpnPacketBuffer, decapsulatedPackets: *mut VpnPacketBufferList, controlPacketsToSend: *mut VpnPacketBufferList) -> HRESULT }} impl IVpnPlugIn { - #[inline] pub unsafe fn connect(&self, channel: &VpnChannel) -> Result<()> { + #[inline] pub fn connect(&self, channel: &VpnChannel) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Connect)(self as *const _ as *mut _, channel as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn disconnect(&self, channel: &VpnChannel) -> Result<()> { + }} + #[inline] pub fn disconnect(&self, channel: &VpnChannel) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Disconnect)(self as *const _ as *mut _, channel as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_keep_alive_payload(&self, channel: &VpnChannel) -> Result> { + }} + #[inline] pub fn get_keep_alive_payload(&self, channel: &VpnChannel) -> Result>> { unsafe { let mut keepAlivePacket = null_mut(); let hr = ((*self.lpVtbl).GetKeepAlivePayload)(self as *const _ as *mut _, channel as *const _ as *mut _, &mut keepAlivePacket); - if hr == S_OK { Ok(ComPtr::wrap(keepAlivePacket)) } else { err(hr) } - } - #[inline] pub unsafe fn encapsulate(&self, channel: &VpnChannel, packets: &VpnPacketBufferList, encapulatedPackets: &VpnPacketBufferList) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(keepAlivePacket)) } else { err(hr) } + }} + #[inline] pub fn encapsulate(&self, channel: &VpnChannel, packets: &VpnPacketBufferList, encapulatedPackets: &VpnPacketBufferList) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Encapsulate)(self as *const _ as *mut _, 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(&self, channel: &VpnChannel, encapBuffer: &VpnPacketBuffer, decapsulatedPackets: &VpnPacketBufferList, controlPacketsToSend: &VpnPacketBufferList) -> Result<()> { + }} + #[inline] pub fn decapsulate(&self, channel: &VpnChannel, encapBuffer: &VpnPacketBuffer, decapsulatedPackets: &VpnPacketBufferList, controlPacketsToSend: &VpnPacketBufferList) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Decapsulate)(self as *const _ as *mut _, 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) } - } + }} } 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_ServerUris(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_CustomConfiguration(&self, out: *mut HSTRING) -> HRESULT, fn put_CustomConfiguration(&self, value: HSTRING) -> HRESULT, fn get_VpnPluginPackageFamilyName(&self, out: *mut HSTRING) -> HRESULT, fn put_VpnPluginPackageFamilyName(&self, value: HSTRING) -> HRESULT }} impl IVpnPlugInProfile { - #[inline] pub unsafe fn get_server_uris(&self) -> Result>> { + #[inline] pub fn get_server_uris(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServerUris)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_custom_configuration(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_custom_configuration(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CustomConfiguration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_custom_configuration(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_custom_configuration(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CustomConfiguration)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_vpn_plugin_package_family_name(&self) -> Result { + }} + #[inline] pub fn get_vpn_plugin_package_family_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VpnPluginPackageFamilyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_vpn_plugin_package_family_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_vpn_plugin_package_family_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_VpnPluginPackageFamilyName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class VpnPlugInProfile: IVpnPlugInProfile} impl RtActivatable for VpnPlugInProfile {} @@ -8139,82 +8139,82 @@ RT_INTERFACE!{interface IVpnPlugInProfile2(IVpnPlugInProfile2Vtbl): IInspectable fn get_ConnectionStatus(&self, out: *mut VpnManagementConnectionStatus) -> HRESULT }} impl IVpnPlugInProfile2 { - #[inline] pub unsafe fn get_require_vpn_client_app_ui(&self) -> Result { + #[inline] pub fn get_require_vpn_client_app_ui(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RequireVpnClientAppUI)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_require_vpn_client_app_ui(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_require_vpn_client_app_ui(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RequireVpnClientAppUI)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_connection_status(&self) -> Result { + }} + #[inline] pub fn get_connection_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ConnectionStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } 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(&self, out: *mut HSTRING) -> HRESULT, fn put_ProfileName(&self, value: HSTRING) -> HRESULT, - fn get_AppTriggers(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_Routes(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_DomainNameInfoList(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_TrafficFilters(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_AppTriggers(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_Routes(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_DomainNameInfoList(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_TrafficFilters(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_RememberCredentials(&self, out: *mut bool) -> HRESULT, fn put_RememberCredentials(&self, value: bool) -> HRESULT, fn get_AlwaysOn(&self, out: *mut bool) -> HRESULT, fn put_AlwaysOn(&self, value: bool) -> HRESULT }} impl IVpnProfile { - #[inline] pub unsafe fn get_profile_name(&self) -> Result { + #[inline] pub fn get_profile_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProfileName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_profile_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_profile_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ProfileName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_triggers(&self) -> Result>> { + }} + #[inline] pub fn get_app_triggers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppTriggers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_routes(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_routes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Routes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_domain_name_info_list(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_domain_name_info_list(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DomainNameInfoList)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_traffic_filters(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_traffic_filters(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TrafficFilters)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_remember_credentials(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_remember_credentials(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RememberCredentials)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_remember_credentials(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_remember_credentials(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RememberCredentials)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_always_on(&self) -> Result { + }} + #[inline] pub fn get_always_on(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AlwaysOn)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_always_on(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_always_on(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AlwaysOn)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IVpnRoute, 3044219779, 2409, 18073, 147, 142, 119, 118, 219, 41, 207, 179); RT_INTERFACE!{interface IVpnRoute(IVpnRouteVtbl): IInspectable(IInspectableVtbl) [IID_IVpnRoute] { @@ -8224,92 +8224,92 @@ RT_INTERFACE!{interface IVpnRoute(IVpnRouteVtbl): IInspectable(IInspectableVtbl) fn get_PrefixSize(&self, out: *mut u8) -> HRESULT }} impl IVpnRoute { - #[inline] pub unsafe fn set_address(&self, value: &super::HostName) -> Result<()> { + #[inline] pub fn set_address(&self, value: &super::HostName) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Address)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_address(&self) -> Result> { + }} + #[inline] pub fn get_address(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Address)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_prefix_size(&self, value: u8) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_prefix_size(&self, value: u8) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PrefixSize)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_prefix_size(&self) -> Result { + }} + #[inline] pub fn get_prefix_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PrefixSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class VpnRoute: IVpnRoute} impl RtActivatable for VpnRoute {} impl VpnRoute { - #[inline] pub fn create_vpn_route(address: &super::HostName, prefixSize: u8) -> Result> { unsafe { + #[inline] pub fn create_vpn_route(address: &super::HostName, prefixSize: u8) -> Result> { >::get_activation_factory().create_vpn_route(address, prefixSize) - }} + } } DEFINE_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]) [CLSID_VpnRoute]); 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(&self, value: *mut super::super::foundation::collections::IVector) -> HRESULT, - fn put_Ipv6InclusionRoutes(&self, value: *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_Ipv4InclusionRoutes(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_Ipv6InclusionRoutes(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn put_Ipv4ExclusionRoutes(&self, value: *mut super::super::foundation::collections::IVector) -> HRESULT, - fn put_Ipv6ExclusionRoutes(&self, value: *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_Ipv4ExclusionRoutes(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_Ipv6ExclusionRoutes(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn put_Ipv4InclusionRoutes(&self, value: *mut foundation::collections::IVector) -> HRESULT, + fn put_Ipv6InclusionRoutes(&self, value: *mut foundation::collections::IVector) -> HRESULT, + fn get_Ipv4InclusionRoutes(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_Ipv6InclusionRoutes(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn put_Ipv4ExclusionRoutes(&self, value: *mut foundation::collections::IVector) -> HRESULT, + fn put_Ipv6ExclusionRoutes(&self, value: *mut foundation::collections::IVector) -> HRESULT, + fn get_Ipv4ExclusionRoutes(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_Ipv6ExclusionRoutes(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn put_ExcludeLocalSubnets(&self, value: bool) -> HRESULT, fn get_ExcludeLocalSubnets(&self, out: *mut bool) -> HRESULT }} impl IVpnRouteAssignment { - #[inline] pub unsafe fn set_ipv4_inclusion_routes(&self, value: &super::super::foundation::collections::IVector) -> Result<()> { + #[inline] pub fn set_ipv4_inclusion_routes(&self, value: &foundation::collections::IVector) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Ipv4InclusionRoutes)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_ipv6_inclusion_routes(&self, value: &super::super::foundation::collections::IVector) -> Result<()> { + }} + #[inline] pub fn set_ipv6_inclusion_routes(&self, value: &foundation::collections::IVector) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Ipv6InclusionRoutes)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_ipv4_inclusion_routes(&self) -> Result>> { + }} + #[inline] pub fn get_ipv4_inclusion_routes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Ipv4InclusionRoutes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ipv6_inclusion_routes(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_ipv6_inclusion_routes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Ipv6InclusionRoutes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_ipv4_exclusion_routes(&self, value: &super::super::foundation::collections::IVector) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_ipv4_exclusion_routes(&self, value: &foundation::collections::IVector) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Ipv4ExclusionRoutes)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_ipv6_exclusion_routes(&self, value: &super::super::foundation::collections::IVector) -> Result<()> { + }} + #[inline] pub fn set_ipv6_exclusion_routes(&self, value: &foundation::collections::IVector) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Ipv6ExclusionRoutes)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_ipv4_exclusion_routes(&self) -> Result>> { + }} + #[inline] pub fn get_ipv4_exclusion_routes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Ipv4ExclusionRoutes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ipv6_exclusion_routes(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_ipv6_exclusion_routes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Ipv6ExclusionRoutes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_exclude_local_subnets(&self, value: bool) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_exclude_local_subnets(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ExcludeLocalSubnets)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_exclude_local_subnets(&self) -> Result { + }} + #[inline] pub fn get_exclude_local_subnets(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExcludeLocalSubnets)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class VpnRouteAssignment: IVpnRouteAssignment} impl RtActivatable for VpnRouteAssignment {} @@ -8319,11 +8319,11 @@ RT_INTERFACE!{static interface IVpnRouteFactory(IVpnRouteFactoryVtbl): IInspecta fn CreateVpnRoute(&self, address: *mut super::HostName, prefixSize: u8, out: *mut *mut VpnRoute) -> HRESULT }} impl IVpnRouteFactory { - #[inline] pub unsafe fn create_vpn_route(&self, address: &super::HostName, prefixSize: u8) -> Result> { + #[inline] pub fn create_vpn_route(&self, address: &super::HostName, prefixSize: u8) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateVpnRoute)(self as *const _ as *mut _, address as *const _ as *mut _, prefixSize, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum VpnRoutingPolicyType: i32 { SplitRouting (VpnRoutingPolicyType_SplitRouting) = 0, ForceAllTrafficOverVpn (VpnRoutingPolicyType_ForceAllTrafficOverVpn) = 1, @@ -8333,121 +8333,121 @@ RT_INTERFACE!{interface IVpnSystemHealth(IVpnSystemHealthVtbl): IInspectable(IIn #[cfg(feature="windows-storage")] fn get_StatementOfHealth(&self, out: *mut *mut super::super::storage::streams::Buffer) -> HRESULT }} impl IVpnSystemHealth { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_statement_of_health(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_statement_of_health(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StatementOfHealth)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class VpnSystemHealth: IVpnSystemHealth} 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(&self, out: *mut *mut VpnAppId) -> HRESULT, fn put_AppId(&self, value: *mut VpnAppId) -> HRESULT, - fn get_AppClaims(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_AppClaims(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_Protocol(&self, out: *mut VpnIPProtocol) -> HRESULT, fn put_Protocol(&self, value: VpnIPProtocol) -> HRESULT, - fn get_LocalPortRanges(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_RemotePortRanges(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_LocalAddressRanges(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_RemoteAddressRanges(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_LocalPortRanges(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_RemotePortRanges(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_LocalAddressRanges(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_RemoteAddressRanges(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_RoutingPolicyType(&self, out: *mut VpnRoutingPolicyType) -> HRESULT, fn put_RoutingPolicyType(&self, value: VpnRoutingPolicyType) -> HRESULT }} impl IVpnTrafficFilter { - #[inline] pub unsafe fn get_app_id(&self) -> Result> { + #[inline] pub fn get_app_id(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppId)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_app_id(&self, value: &VpnAppId) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_app_id(&self, value: &VpnAppId) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AppId)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_claims(&self) -> Result>> { + }} + #[inline] pub fn get_app_claims(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppClaims)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_protocol(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_protocol(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Protocol)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_protocol(&self, value: VpnIPProtocol) -> Result<()> { + }} + #[inline] pub fn set_protocol(&self, value: VpnIPProtocol) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Protocol)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_local_port_ranges(&self) -> Result>> { + }} + #[inline] pub fn get_local_port_ranges(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LocalPortRanges)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_port_ranges(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_remote_port_ranges(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemotePortRanges)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_local_address_ranges(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_local_address_ranges(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LocalAddressRanges)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_address_ranges(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_remote_address_ranges(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteAddressRanges)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_routing_policy_type(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_routing_policy_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RoutingPolicyType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_routing_policy_type(&self, value: VpnRoutingPolicyType) -> Result<()> { + }} + #[inline] pub fn set_routing_policy_type(&self, value: VpnRoutingPolicyType) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RoutingPolicyType)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class VpnTrafficFilter: IVpnTrafficFilter} impl RtActivatable for VpnTrafficFilter {} impl VpnTrafficFilter { - #[inline] pub fn create(appId: &VpnAppId) -> Result> { unsafe { + #[inline] pub fn create(appId: &VpnAppId) -> Result> { >::get_activation_factory().create(appId) - }} + } } DEFINE_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]) [CLSID_VpnTrafficFilter]); 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_TrafficFilterList(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_AllowOutbound(&self, out: *mut bool) -> HRESULT, fn put_AllowOutbound(&self, value: bool) -> HRESULT, fn get_AllowInbound(&self, out: *mut bool) -> HRESULT, fn put_AllowInbound(&self, value: bool) -> HRESULT }} impl IVpnTrafficFilterAssignment { - #[inline] pub unsafe fn get_traffic_filter_list(&self) -> Result>> { + #[inline] pub fn get_traffic_filter_list(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TrafficFilterList)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_allow_outbound(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_allow_outbound(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AllowOutbound)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_allow_outbound(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_allow_outbound(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AllowOutbound)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_allow_inbound(&self) -> Result { + }} + #[inline] pub fn get_allow_inbound(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AllowInbound)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_allow_inbound(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_allow_inbound(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AllowInbound)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class VpnTrafficFilterAssignment: IVpnTrafficFilterAssignment} impl RtActivatable for VpnTrafficFilterAssignment {} @@ -8457,11 +8457,11 @@ RT_INTERFACE!{static interface IVpnTrafficFilterFactory(IVpnTrafficFilterFactory fn Create(&self, appId: *mut VpnAppId, out: *mut *mut VpnTrafficFilter) -> HRESULT }} impl IVpnTrafficFilterFactory { - #[inline] pub unsafe fn create(&self, appId: &VpnAppId) -> Result> { + #[inline] pub fn create(&self, appId: &VpnAppId) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, appId as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } } // Windows.Networking.Vpn pub mod pushnotifications { // Windows.Networking.PushNotifications @@ -8469,35 +8469,35 @@ use ::prelude::*; 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(&self, out: *mut HSTRING) -> HRESULT, - fn get_ExpirationTime(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_ExpirationTime(&self, out: *mut foundation::DateTime) -> HRESULT, fn Close(&self) -> HRESULT, - fn add_PushNotificationReceived(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PushNotificationReceived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_PushNotificationReceived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PushNotificationReceived(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IPushNotificationChannel { - #[inline] pub unsafe fn get_uri(&self) -> Result { + #[inline] pub fn get_uri(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Uri)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_expiration_time(&self) -> Result { + }} + #[inline] pub fn get_expiration_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExpirationTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn close(&self) -> Result<()> { + }} + #[inline] pub fn close(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Close)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_push_notification_received(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_push_notification_received(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PushNotificationReceived)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_push_notification_received(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_push_notification_received(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PushNotificationReceived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PushNotificationChannel: IPushNotificationChannel} RT_CLASS!{static class PushNotificationChannelManager} @@ -8505,114 +8505,114 @@ impl RtActivatable for PushNotificationC impl RtActivatable for PushNotificationChannelManager {} impl RtActivatable for PushNotificationChannelManager {} impl PushNotificationChannelManager { - #[inline] pub fn create_push_notification_channel_for_application_async() -> Result>> { unsafe { + #[inline] pub fn create_push_notification_channel_for_application_async() -> Result>> { >::get_activation_factory().create_push_notification_channel_for_application_async() - }} - #[inline] pub fn create_push_notification_channel_for_application_async_with_id(applicationId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn create_push_notification_channel_for_application_async_with_id(applicationId: &HStringArg) -> Result>> { >::get_activation_factory().create_push_notification_channel_for_application_async_with_id(applicationId) - }} - #[inline] pub fn create_push_notification_channel_for_secondary_tile_async(tileId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn create_push_notification_channel_for_secondary_tile_async(tileId: &HStringArg) -> Result>> { >::get_activation_factory().create_push_notification_channel_for_secondary_tile_async(tileId) - }} - #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::super::system::User) -> Result> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::super::system::User) -> Result>> { >::get_activation_factory().get_for_user(user) - }} - #[inline] pub fn get_default() -> Result> { unsafe { + } + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} + } } DEFINE_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]) [CLSID_PushNotificationChannelManager]); 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CreatePushNotificationChannelForApplicationAsyncWithId(&self, applicationId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CreatePushNotificationChannelForSecondaryTileAsync(&self, tileId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn CreatePushNotificationChannelForApplicationAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreatePushNotificationChannelForApplicationAsyncWithId(&self, applicationId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreatePushNotificationChannelForSecondaryTileAsync(&self, tileId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(feature="windows-system")] fn get_User(&self, out: *mut *mut super::super::system::User) -> HRESULT }} impl IPushNotificationChannelManagerForUser { - #[inline] pub unsafe fn create_push_notification_channel_for_application_async(&self) -> Result>> { + #[inline] pub fn create_push_notification_channel_for_application_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreatePushNotificationChannelForApplicationAsync)(self as *const _ as *mut _, &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(&self, applicationId: &HStringArg) -> Result>> { + }} + #[inline] pub fn create_push_notification_channel_for_application_async_with_id(&self, applicationId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreatePushNotificationChannelForApplicationAsyncWithId)(self as *const _ as *mut _, 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(&self, tileId: &HStringArg) -> Result>> { + }} + #[inline] pub fn create_push_notification_channel_for_secondary_tile_async(&self, tileId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreatePushNotificationChannelForSecondaryTileAsync)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_User)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PushNotificationChannelManagerForUser: IPushNotificationChannelManagerForUser} DEFINE_IID!(IID_IPushNotificationChannelManagerForUser2, 3280668266, 31937, 19884, 135, 253, 190, 110, 146, 4, 20, 164); RT_INTERFACE!{interface IPushNotificationChannelManagerForUser2(IPushNotificationChannelManagerForUser2Vtbl): IInspectable(IInspectableVtbl) [IID_IPushNotificationChannelManagerForUser2] { - #[cfg(feature="windows-storage")] fn CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync(&self, appServerKey: *mut super::super::storage::streams::IBuffer, channelId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsyncWithId(&self, appServerKey: *mut super::super::storage::streams::IBuffer, channelId: HSTRING, appId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync(&self, appServerKey: *mut super::super::storage::streams::IBuffer, channelId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsyncWithId(&self, appServerKey: *mut super::super::storage::streams::IBuffer, channelId: HSTRING, appId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IPushNotificationChannelManagerForUser2 { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn create_raw_push_notification_channel_with_alternate_key_for_application_async(&self, appServerKey: &super::super::storage::streams::IBuffer, channelId: &HStringArg) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn create_raw_push_notification_channel_with_alternate_key_for_application_async(&self, appServerKey: &super::super::storage::streams::IBuffer, channelId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsync)(self as *const _ as *mut _, appServerKey as *const _ as *mut _, channelId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn create_raw_push_notification_channel_with_alternate_key_for_application_async_with_id(&self, appServerKey: &super::super::storage::streams::IBuffer, channelId: &HStringArg, appId: &HStringArg) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_raw_push_notification_channel_with_alternate_key_for_application_async_with_id(&self, appServerKey: &super::super::storage::streams::IBuffer, channelId: &HStringArg, appId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateRawPushNotificationChannelWithAlternateKeyForApplicationAsyncWithId)(self as *const _ as *mut _, appServerKey as *const _ as *mut _, channelId.get(), appId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CreatePushNotificationChannelForApplicationAsyncWithId(&self, applicationId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CreatePushNotificationChannelForSecondaryTileAsync(&self, tileId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn CreatePushNotificationChannelForApplicationAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreatePushNotificationChannelForApplicationAsyncWithId(&self, applicationId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreatePushNotificationChannelForSecondaryTileAsync(&self, tileId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IPushNotificationChannelManagerStatics { - #[inline] pub unsafe fn create_push_notification_channel_for_application_async(&self) -> Result>> { + #[inline] pub fn create_push_notification_channel_for_application_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreatePushNotificationChannelForApplicationAsync)(self as *const _ as *mut _, &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(&self, applicationId: &HStringArg) -> Result>> { + }} + #[inline] pub fn create_push_notification_channel_for_application_async_with_id(&self, applicationId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreatePushNotificationChannelForApplicationAsyncWithId)(self as *const _ as *mut _, 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(&self, tileId: &HStringArg) -> Result>> { + }} + #[inline] pub fn create_push_notification_channel_for_secondary_tile_async(&self, tileId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreatePushNotificationChannelForSecondaryTileAsync)(self as *const _ as *mut _, tileId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&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(&self, user: &super::super::system::User) -> Result> { + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(&self, user: &super::super::system::User) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForUser)(self as *const _ as *mut _, user as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IPushNotificationChannelManagerStatics3, 1191313150, 3806, 19007, 174, 120, 191, 164, 113, 73, 105, 37); RT_INTERFACE!{static interface IPushNotificationChannelManagerStatics3(IPushNotificationChannelManagerStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IPushNotificationChannelManagerStatics3] { fn GetDefault(&self, out: *mut *mut PushNotificationChannelManagerForUser) -> HRESULT }} impl IPushNotificationChannelManagerStatics3 { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IPushNotificationReceivedEventArgs, 3506855436, 14029, 18508, 185, 53, 10, 153, 183, 83, 207, 0); RT_INTERFACE!{interface IPushNotificationReceivedEventArgs(IPushNotificationReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IPushNotificationReceivedEventArgs] { @@ -8628,40 +8628,40 @@ RT_INTERFACE!{interface IPushNotificationReceivedEventArgs(IPushNotificationRece fn get_RawNotification(&self, out: *mut *mut RawNotification) -> HRESULT }} impl IPushNotificationReceivedEventArgs { - #[inline] pub unsafe fn set_cancel(&self, value: bool) -> Result<()> { + #[inline] pub fn set_cancel(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Cancel)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_cancel(&self) -> Result { + }} + #[inline] pub fn get_cancel(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Cancel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_notification_type(&self) -> Result { + }} + #[inline] pub fn get_notification_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NotificationType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_toast_notification(&self) -> Result> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_toast_notification(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ToastNotification)(self 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_tile_notification(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_tile_notification(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TileNotification)(self 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_badge_notification(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_badge_notification(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BadgeNotification)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_raw_notification(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_raw_notification(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RawNotification)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PushNotificationReceivedEventArgs: IPushNotificationReceivedEventArgs} RT_ENUM! { enum PushNotificationType: i32 { @@ -8672,37 +8672,37 @@ RT_INTERFACE!{interface IRawNotification(IRawNotificationVtbl): IInspectable(IIn fn get_Content(&self, out: *mut HSTRING) -> HRESULT }} impl IRawNotification { - #[inline] pub unsafe fn get_content(&self) -> Result { + #[inline] pub fn get_content(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Content)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class RawNotification: IRawNotification} DEFINE_IID!(IID_IRawNotification2, 3872444185, 3183, 19677, 148, 36, 238, 197, 190, 1, 77, 38); RT_INTERFACE!{interface IRawNotification2(IRawNotification2Vtbl): IInspectable(IInspectableVtbl) [IID_IRawNotification2] { - fn get_Headers(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, + fn get_Headers(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT, fn get_ChannelId(&self, out: *mut HSTRING) -> HRESULT }} impl IRawNotification2 { - #[inline] pub unsafe fn get_headers(&self) -> Result>> { + #[inline] pub fn get_headers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Headers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_channel_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_channel_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ChannelId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } } // Windows.Networking.PushNotifications pub mod xboxlive { // Windows.Networking.XboxLive use ::prelude::*; 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SnapshotChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_SnapshotChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SnapshotChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn GetSnapshotAsBase64(&self, out: *mut HSTRING) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy3(&self) -> (), #[cfg(feature="windows-storage")] fn GetSnapshotAsBuffer(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, @@ -8713,69 +8713,69 @@ RT_INTERFACE!{interface IXboxLiveDeviceAddress(IXboxLiveDeviceAddressVtbl): IIns fn get_NetworkAccessKind(&self, out: *mut XboxLiveNetworkAccessKind) -> HRESULT }} impl IXboxLiveDeviceAddress { - #[inline] pub unsafe fn add_snapshot_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_snapshot_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SnapshotChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_snapshot_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_snapshot_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SnapshotChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_snapshot_as_base64(&self) -> Result { + }} + #[inline] pub fn get_snapshot_as_base64(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSnapshotAsBase64)(self 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 get_snapshot_as_buffer(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_snapshot_as_buffer(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSnapshotAsBuffer)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_snapshot_as_bytes(&self, buffer: &mut [u8]) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_snapshot_as_bytes(&self, buffer: &mut [u8]) -> Result { unsafe { let mut bytesWritten = zeroed(); let hr = ((*self.lpVtbl).GetSnapshotAsBytes)(self as *const _ as *mut _, buffer.len() as u32, buffer.as_mut_ptr() as *mut _, &mut bytesWritten); if hr == S_OK { Ok(bytesWritten) } else { err(hr) } - } - #[inline] pub unsafe fn compare(&self, otherDeviceAddress: &XboxLiveDeviceAddress) -> Result { + }} + #[inline] pub fn compare(&self, otherDeviceAddress: &XboxLiveDeviceAddress) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).Compare)(self as *const _ as *mut _, otherDeviceAddress as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_valid(&self) -> Result { + }} + #[inline] pub fn get_is_valid(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsValid)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_local(&self) -> Result { + }} + #[inline] pub fn get_is_local(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsLocal)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_network_access_kind(&self) -> Result { + }} + #[inline] pub fn get_network_access_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NetworkAccessKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class XboxLiveDeviceAddress: IXboxLiveDeviceAddress} impl RtActivatable for XboxLiveDeviceAddress {} impl XboxLiveDeviceAddress { - #[inline] pub fn create_from_snapshot_base64(base64: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_from_snapshot_base64(base64: &HStringArg) -> Result>> { >::get_activation_factory().create_from_snapshot_base64(base64) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn create_from_snapshot_buffer(buffer: &super::super::storage::streams::IBuffer) -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_snapshot_buffer(buffer: &super::super::storage::streams::IBuffer) -> Result>> { >::get_activation_factory().create_from_snapshot_buffer(buffer) - }} - #[inline] pub fn create_from_snapshot_bytes(buffer: &[u8]) -> Result> { unsafe { + } + #[inline] pub fn create_from_snapshot_bytes(buffer: &[u8]) -> Result>> { >::get_activation_factory().create_from_snapshot_bytes(buffer) - }} - #[inline] pub fn get_local() -> Result> { unsafe { + } + #[inline] pub fn get_local() -> Result>> { >::get_activation_factory().get_local() - }} - #[inline] pub fn get_max_snapshot_bytes_size() -> Result { unsafe { + } + #[inline] pub fn get_max_snapshot_bytes_size() -> Result { >::get_activation_factory().get_max_snapshot_bytes_size() - }} + } } DEFINE_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]) [CLSID_XboxLiveDeviceAddress]); DEFINE_IID!(IID_IXboxLiveDeviceAddressStatics, 1498720281, 19065, 18737, 130, 124, 127, 80, 62, 150, 50, 99); @@ -8788,37 +8788,37 @@ RT_INTERFACE!{static interface IXboxLiveDeviceAddressStatics(IXboxLiveDeviceAddr fn get_MaxSnapshotBytesSize(&self, out: *mut u32) -> HRESULT }} impl IXboxLiveDeviceAddressStatics { - #[inline] pub unsafe fn create_from_snapshot_base64(&self, base64: &HStringArg) -> Result> { + #[inline] pub fn create_from_snapshot_base64(&self, base64: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromSnapshotBase64)(self as *const _ as *mut _, 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(&self, buffer: &super::super::storage::streams::IBuffer) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_snapshot_buffer(&self, buffer: &super::super::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromSnapshotBuffer)(self 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 create_from_snapshot_bytes(&self, buffer: &[u8]) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_from_snapshot_bytes(&self, buffer: &[u8]) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromSnapshotBytes)(self 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) } - } - #[inline] pub unsafe fn get_local(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_local(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetLocal)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_snapshot_bytes_size(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_max_snapshot_bytes_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxSnapshotBytesSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StateChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn DeleteAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn add_StateChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StateChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn DeleteAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn GetRemoteSocketAddressBytes(&self, socketAddressSize: u32, socketAddress: *mut u8) -> HRESULT, fn GetLocalSocketAddressBytes(&self, socketAddressSize: u32, socketAddress: *mut u8) -> HRESULT, fn get_State(&self, out: *mut XboxLiveEndpointPairState) -> HRESULT, @@ -8830,73 +8830,73 @@ RT_INTERFACE!{interface IXboxLiveEndpointPair(IXboxLiveEndpointPairVtbl): IInspe fn get_LocalPort(&self, out: *mut HSTRING) -> HRESULT }} impl IXboxLiveEndpointPair { - #[inline] pub unsafe fn add_state_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_state_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StateChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_state_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_state_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StateChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn delete_async(&self) -> Result> { + }} + #[inline] pub fn delete_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_socket_address_bytes(&self, socketAddress: &mut [u8]) -> Result<()> { + }} + #[inline] pub fn get_remote_socket_address_bytes(&self, socketAddress: &mut [u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).GetRemoteSocketAddressBytes)(self as *const _ as *mut _, socketAddress.len() as u32, socketAddress.as_mut_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_local_socket_address_bytes(&self, socketAddress: &mut [u8]) -> Result<()> { + }} + #[inline] pub fn get_local_socket_address_bytes(&self, socketAddress: &mut [u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).GetLocalSocketAddressBytes)(self as *const _ as *mut _, socketAddress.len() as u32, socketAddress.as_mut_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_state(&self) -> Result { + }} + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_template(&self) -> Result> { + }} + #[inline] pub fn get_template(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Template)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_device_address(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_remote_device_address(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteDeviceAddress)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_host_name(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_remote_host_name(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteHostName)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_port(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_remote_port(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemotePort)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_local_host_name(&self) -> Result> { + }} + #[inline] pub fn get_local_host_name(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LocalHostName)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_local_port(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_local_port(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LocalPort)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class XboxLiveEndpointPair: IXboxLiveEndpointPair} impl RtActivatable for XboxLiveEndpointPair {} impl XboxLiveEndpointPair { - #[inline] pub fn find_endpoint_pair_by_socket_address_bytes(localSocketAddress: &[u8], remoteSocketAddress: &[u8]) -> Result> { unsafe { + #[inline] pub fn find_endpoint_pair_by_socket_address_bytes(localSocketAddress: &[u8], remoteSocketAddress: &[u8]) -> Result>> { >::get_activation_factory().find_endpoint_pair_by_socket_address_bytes(localSocketAddress, remoteSocketAddress) - }} - #[inline] pub fn find_endpoint_pair_by_host_names_and_ports(localHostName: &super::HostName, localPort: &HStringArg, remoteHostName: &super::HostName, remotePort: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn find_endpoint_pair_by_host_names_and_ports(localHostName: &super::HostName, localPort: &HStringArg, remoteHostName: &super::HostName, remotePort: &HStringArg) -> Result>> { >::get_activation_factory().find_endpoint_pair_by_host_names_and_ports(localHostName, localPort, remoteHostName, remotePort) - }} + } } DEFINE_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]) [CLSID_XboxLiveEndpointPair]); RT_ENUM! { enum XboxLiveEndpointPairCreationBehaviors: u32 { @@ -8910,26 +8910,26 @@ RT_INTERFACE!{interface IXboxLiveEndpointPairCreationResult(IXboxLiveEndpointPai fn get_EndpointPair(&self, out: *mut *mut XboxLiveEndpointPair) -> HRESULT }} impl IXboxLiveEndpointPairCreationResult { - #[inline] pub unsafe fn get_device_address(&self) -> Result> { + #[inline] pub fn get_device_address(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceAddress)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_existing_path_evaluation(&self) -> Result { + }} + #[inline] pub fn get_is_existing_path_evaluation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsExistingPathEvaluation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_endpoint_pair(&self) -> Result> { + }} + #[inline] pub fn get_endpoint_pair(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EndpointPair)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class XboxLiveEndpointPairCreationResult: IXboxLiveEndpointPairCreationResult} RT_ENUM! { enum XboxLiveEndpointPairCreationStatus: i32 { @@ -8944,16 +8944,16 @@ RT_INTERFACE!{interface IXboxLiveEndpointPairStateChangedEventArgs(IXboxLiveEndp fn get_NewState(&self, out: *mut XboxLiveEndpointPairState) -> HRESULT }} impl IXboxLiveEndpointPairStateChangedEventArgs { - #[inline] pub unsafe fn get_old_state(&self) -> Result { + #[inline] pub fn get_old_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OldState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_new_state(&self) -> Result { + }} + #[inline] pub fn get_new_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NewState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class XboxLiveEndpointPairStateChangedEventArgs: IXboxLiveEndpointPairStateChangedEventArgs} DEFINE_IID!(IID_IXboxLiveEndpointPairStatics, 1680960304, 8570, 16963, 142, 225, 103, 41, 40, 29, 39, 219); @@ -8962,137 +8962,137 @@ RT_INTERFACE!{static interface IXboxLiveEndpointPairStatics(IXboxLiveEndpointPai fn FindEndpointPairByHostNamesAndPorts(&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(&self, localSocketAddress: &[u8], remoteSocketAddress: &[u8]) -> Result> { + #[inline] pub fn find_endpoint_pair_by_socket_address_bytes(&self, localSocketAddress: &[u8], remoteSocketAddress: &[u8]) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindEndpointPairBySocketAddressBytes)(self as *const _ as *mut _, 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(&self, localHostName: &super::HostName, localPort: &HStringArg, remoteHostName: &super::HostName, remotePort: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn find_endpoint_pair_by_host_names_and_ports(&self, localHostName: &super::HostName, localPort: &HStringArg, remoteHostName: &super::HostName, remotePort: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindEndpointPairByHostNamesAndPorts)(self as *const _ as *mut _, 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) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_InboundEndpointPairCreated(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn CreateEndpointPairDefaultAsync(&self, deviceAddress: *mut XboxLiveDeviceAddress, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CreateEndpointPairWithBehaviorsAsync(&self, deviceAddress: *mut XboxLiveDeviceAddress, behaviors: XboxLiveEndpointPairCreationBehaviors, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CreateEndpointPairForPortsDefaultAsync(&self, deviceAddress: *mut XboxLiveDeviceAddress, initiatorPort: HSTRING, acceptorPort: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CreateEndpointPairForPortsWithBehaviorsAsync(&self, deviceAddress: *mut XboxLiveDeviceAddress, initiatorPort: HSTRING, acceptorPort: HSTRING, behaviors: XboxLiveEndpointPairCreationBehaviors, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_InboundEndpointPairCreated(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_InboundEndpointPairCreated(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn CreateEndpointPairDefaultAsync(&self, deviceAddress: *mut XboxLiveDeviceAddress, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreateEndpointPairWithBehaviorsAsync(&self, deviceAddress: *mut XboxLiveDeviceAddress, behaviors: XboxLiveEndpointPairCreationBehaviors, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreateEndpointPairForPortsDefaultAsync(&self, deviceAddress: *mut XboxLiveDeviceAddress, initiatorPort: HSTRING, acceptorPort: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreateEndpointPairForPortsWithBehaviorsAsync(&self, deviceAddress: *mut XboxLiveDeviceAddress, initiatorPort: HSTRING, acceptorPort: HSTRING, behaviors: XboxLiveEndpointPairCreationBehaviors, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn get_Name(&self, out: *mut HSTRING) -> HRESULT, fn get_SocketKind(&self, out: *mut XboxLiveSocketKind) -> HRESULT, fn get_InitiatorBoundPortRangeLower(&self, out: *mut u16) -> HRESULT, fn get_InitiatorBoundPortRangeUpper(&self, out: *mut u16) -> HRESULT, fn get_AcceptorBoundPortRangeLower(&self, out: *mut u16) -> HRESULT, fn get_AcceptorBoundPortRangeUpper(&self, out: *mut u16) -> HRESULT, - fn get_EndpointPairs(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_EndpointPairs(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IXboxLiveEndpointPairTemplate { - #[inline] pub unsafe fn add_inbound_endpoint_pair_created(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_inbound_endpoint_pair_created(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_InboundEndpointPairCreated)(self as *const _ as *mut _, 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(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_inbound_endpoint_pair_created(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_InboundEndpointPairCreated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn create_endpoint_pair_default_async(&self, deviceAddress: &XboxLiveDeviceAddress) -> Result>> { + }} + #[inline] pub fn create_endpoint_pair_default_async(&self, deviceAddress: &XboxLiveDeviceAddress) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateEndpointPairDefaultAsync)(self as *const _ as *mut _, 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(&self, deviceAddress: &XboxLiveDeviceAddress, behaviors: XboxLiveEndpointPairCreationBehaviors) -> Result>> { + }} + #[inline] pub fn create_endpoint_pair_with_behaviors_async(&self, deviceAddress: &XboxLiveDeviceAddress, behaviors: XboxLiveEndpointPairCreationBehaviors) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateEndpointPairWithBehaviorsAsync)(self as *const _ as *mut _, 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(&self, deviceAddress: &XboxLiveDeviceAddress, initiatorPort: &HStringArg, acceptorPort: &HStringArg) -> Result>> { + }} + #[inline] pub fn create_endpoint_pair_for_ports_default_async(&self, deviceAddress: &XboxLiveDeviceAddress, initiatorPort: &HStringArg, acceptorPort: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateEndpointPairForPortsDefaultAsync)(self as *const _ as *mut _, 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(&self, deviceAddress: &XboxLiveDeviceAddress, initiatorPort: &HStringArg, acceptorPort: &HStringArg, behaviors: XboxLiveEndpointPairCreationBehaviors) -> Result>> { + }} + #[inline] pub fn create_endpoint_pair_for_ports_with_behaviors_async(&self, deviceAddress: &XboxLiveDeviceAddress, initiatorPort: &HStringArg, acceptorPort: &HStringArg, behaviors: XboxLiveEndpointPairCreationBehaviors) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateEndpointPairForPortsWithBehaviorsAsync)(self as *const _ as *mut _, 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(&self) -> Result { + }} + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_socket_kind(&self) -> Result { + }} + #[inline] pub fn get_socket_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SocketKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_initiator_bound_port_range_lower(&self) -> Result { + }} + #[inline] pub fn get_initiator_bound_port_range_lower(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InitiatorBoundPortRangeLower)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_initiator_bound_port_range_upper(&self) -> Result { + }} + #[inline] pub fn get_initiator_bound_port_range_upper(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InitiatorBoundPortRangeUpper)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_acceptor_bound_port_range_lower(&self) -> Result { + }} + #[inline] pub fn get_acceptor_bound_port_range_lower(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AcceptorBoundPortRangeLower)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_acceptor_bound_port_range_upper(&self) -> Result { + }} + #[inline] pub fn get_acceptor_bound_port_range_upper(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AcceptorBoundPortRangeUpper)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_endpoint_pairs(&self) -> Result>> { + }} + #[inline] pub fn get_endpoint_pairs(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EndpointPairs)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class XboxLiveEndpointPairTemplate: IXboxLiveEndpointPairTemplate} impl RtActivatable for XboxLiveEndpointPairTemplate {} impl XboxLiveEndpointPairTemplate { - #[inline] pub fn get_template_by_name(name: &HStringArg) -> Result> { unsafe { + #[inline] pub fn get_template_by_name(name: &HStringArg) -> Result>> { >::get_activation_factory().get_template_by_name(name) - }} - #[inline] pub fn get_templates() -> Result>> { unsafe { + } + #[inline] pub fn get_templates() -> Result>>> { >::get_activation_factory().get_templates() - }} + } } DEFINE_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]) [CLSID_XboxLiveEndpointPairTemplate]); 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(&self, name: HSTRING, out: *mut *mut XboxLiveEndpointPairTemplate) -> HRESULT, - fn get_Templates(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_Templates(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IXboxLiveEndpointPairTemplateStatics { - #[inline] pub unsafe fn get_template_by_name(&self, name: &HStringArg) -> Result> { + #[inline] pub fn get_template_by_name(&self, name: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetTemplateByName)(self as *const _ as *mut _, name.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_templates(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_templates(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Templates)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut XboxLiveEndpointPair) -> HRESULT }} impl IXboxLiveInboundEndpointPairCreatedEventArgs { - #[inline] pub unsafe fn get_endpoint_pair(&self) -> Result> { + #[inline] pub fn get_endpoint_pair(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EndpointPair)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class XboxLiveInboundEndpointPairCreatedEventArgs: IXboxLiveInboundEndpointPairCreatedEventArgs} RT_ENUM! { enum XboxLiveNetworkAccessKind: i32 { @@ -9100,13 +9100,13 @@ RT_ENUM! { enum XboxLiveNetworkAccessKind: i32 { }} 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(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn GetMetricResultsForDevice(&self, deviceAddress: *mut XboxLiveDeviceAddress, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn GetMetricResultsForMetric(&self, metric: XboxLiveQualityOfServiceMetric, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn MeasureAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn GetMetricResultsForDevice(&self, deviceAddress: *mut XboxLiveDeviceAddress, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn GetMetricResultsForMetric(&self, metric: XboxLiveQualityOfServiceMetric, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn GetMetricResult(&self, deviceAddress: *mut XboxLiveDeviceAddress, metric: XboxLiveQualityOfServiceMetric, out: *mut *mut XboxLiveQualityOfServiceMetricResult) -> HRESULT, fn GetPrivatePayloadResult(&self, deviceAddress: *mut XboxLiveDeviceAddress, out: *mut *mut XboxLiveQualityOfServicePrivatePayloadResult) -> HRESULT, - fn get_Metrics(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_DeviceAddresses(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Metrics(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_DeviceAddresses(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_ShouldRequestPrivatePayloads(&self, out: *mut bool) -> HRESULT, fn put_ShouldRequestPrivatePayloads(&self, value: bool) -> HRESULT, fn get_TimeoutInMilliseconds(&self, out: *mut u32) -> HRESULT, @@ -9114,125 +9114,125 @@ RT_INTERFACE!{interface IXboxLiveQualityOfServiceMeasurement(IXboxLiveQualityOfS fn get_NumberOfProbesToAttempt(&self, out: *mut u32) -> HRESULT, fn put_NumberOfProbesToAttempt(&self, value: u32) -> HRESULT, fn get_NumberOfResultsPending(&self, out: *mut u32) -> HRESULT, - fn get_MetricResults(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_PrivatePayloadResults(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_MetricResults(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_PrivatePayloadResults(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IXboxLiveQualityOfServiceMeasurement { - #[inline] pub unsafe fn measure_async(&self) -> Result> { + #[inline] pub fn measure_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MeasureAsync)(self 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_device(&self, deviceAddress: &XboxLiveDeviceAddress) -> Result>> { + }} + #[inline] pub fn get_metric_results_for_device(&self, deviceAddress: &XboxLiveDeviceAddress) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetMetricResultsForDevice)(self as *const _ as *mut _, 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(&self, metric: XboxLiveQualityOfServiceMetric) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_metric_results_for_metric(&self, metric: XboxLiveQualityOfServiceMetric) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetMetricResultsForMetric)(self as *const _ as *mut _, metric, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_metric_result(&self, deviceAddress: &XboxLiveDeviceAddress, metric: XboxLiveQualityOfServiceMetric) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_metric_result(&self, deviceAddress: &XboxLiveDeviceAddress, metric: XboxLiveQualityOfServiceMetric) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetMetricResult)(self as *const _ as *mut _, 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(&self, deviceAddress: &XboxLiveDeviceAddress) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_private_payload_result(&self, deviceAddress: &XboxLiveDeviceAddress) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPrivatePayloadResult)(self as *const _ as *mut _, deviceAddress as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_metrics(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_metrics(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Metrics)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_addresses(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_device_addresses(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceAddresses)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_should_request_private_payloads(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_should_request_private_payloads(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ShouldRequestPrivatePayloads)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_should_request_private_payloads(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_should_request_private_payloads(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ShouldRequestPrivatePayloads)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_timeout_in_milliseconds(&self) -> Result { + }} + #[inline] pub fn get_timeout_in_milliseconds(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TimeoutInMilliseconds)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_timeout_in_milliseconds(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_timeout_in_milliseconds(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TimeoutInMilliseconds)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_number_of_probes_to_attempt(&self) -> Result { + }} + #[inline] pub fn get_number_of_probes_to_attempt(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NumberOfProbesToAttempt)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_number_of_probes_to_attempt(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_number_of_probes_to_attempt(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_NumberOfProbesToAttempt)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_number_of_results_pending(&self) -> Result { + }} + #[inline] pub fn get_number_of_results_pending(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NumberOfResultsPending)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_metric_results(&self) -> Result>> { + }} + #[inline] pub fn get_metric_results(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MetricResults)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_private_payload_results(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_private_payload_results(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PrivatePayloadResults)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class XboxLiveQualityOfServiceMeasurement: IXboxLiveQualityOfServiceMeasurement} impl RtActivatable for XboxLiveQualityOfServiceMeasurement {} impl RtActivatable for XboxLiveQualityOfServiceMeasurement {} impl XboxLiveQualityOfServiceMeasurement { - #[inline] pub fn publish_private_payload_bytes(payload: &[u8]) -> Result<()> { unsafe { + #[inline] pub fn publish_private_payload_bytes(payload: &[u8]) -> Result<()> { >::get_activation_factory().publish_private_payload_bytes(payload) - }} - #[inline] pub fn clear_private_payload() -> Result<()> { unsafe { + } + #[inline] pub fn clear_private_payload() -> Result<()> { >::get_activation_factory().clear_private_payload() - }} - #[inline] pub fn get_max_simultaneous_probe_connections() -> Result { unsafe { + } + #[inline] pub fn get_max_simultaneous_probe_connections() -> Result { >::get_activation_factory().get_max_simultaneous_probe_connections() - }} - #[inline] pub fn set_max_simultaneous_probe_connections(value: u32) -> Result<()> { unsafe { + } + #[inline] pub fn set_max_simultaneous_probe_connections(value: u32) -> Result<()> { >::get_activation_factory().set_max_simultaneous_probe_connections(value) - }} - #[inline] pub fn get_is_system_outbound_bandwidth_constrained() -> Result { unsafe { + } + #[inline] pub fn get_is_system_outbound_bandwidth_constrained() -> Result { >::get_activation_factory().get_is_system_outbound_bandwidth_constrained() - }} - #[inline] pub fn set_is_system_outbound_bandwidth_constrained(value: bool) -> Result<()> { unsafe { + } + #[inline] pub fn set_is_system_outbound_bandwidth_constrained(value: bool) -> Result<()> { >::get_activation_factory().set_is_system_outbound_bandwidth_constrained(value) - }} - #[inline] pub fn get_is_system_inbound_bandwidth_constrained() -> Result { unsafe { + } + #[inline] pub fn get_is_system_inbound_bandwidth_constrained() -> Result { >::get_activation_factory().get_is_system_inbound_bandwidth_constrained() - }} - #[inline] pub fn set_is_system_inbound_bandwidth_constrained(value: bool) -> Result<()> { unsafe { + } + #[inline] pub fn set_is_system_inbound_bandwidth_constrained(value: bool) -> Result<()> { >::get_activation_factory().set_is_system_inbound_bandwidth_constrained(value) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn get_published_private_payload() -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn get_published_private_payload() -> Result>> { >::get_activation_factory().get_published_private_payload() - }} - #[cfg(feature="windows-storage")] #[inline] pub fn set_published_private_payload(value: &super::super::storage::streams::IBuffer) -> Result<()> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn set_published_private_payload(value: &super::super::storage::streams::IBuffer) -> Result<()> { >::get_activation_factory().set_published_private_payload(value) - }} - #[inline] pub fn get_max_private_payload_size() -> Result { unsafe { + } + #[inline] pub fn get_max_private_payload_size() -> Result { >::get_activation_factory().get_max_private_payload_size() - }} + } } DEFINE_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]) [CLSID_XboxLiveQualityOfServiceMeasurement]); DEFINE_IID!(IID_IXboxLiveQualityOfServiceMeasurementStatics, 1848978890, 9167, 17418, 176, 119, 94, 48, 133, 122, 130, 52); @@ -9252,55 +9252,55 @@ RT_INTERFACE!{static interface IXboxLiveQualityOfServiceMeasurementStatics(IXbox fn get_MaxPrivatePayloadSize(&self, out: *mut u32) -> HRESULT }} impl IXboxLiveQualityOfServiceMeasurementStatics { - #[inline] pub unsafe fn publish_private_payload_bytes(&self, payload: &[u8]) -> Result<()> { + #[inline] pub fn publish_private_payload_bytes(&self, payload: &[u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).PublishPrivatePayloadBytes)(self as *const _ as *mut _, payload.len() as u32, payload.as_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn clear_private_payload(&self) -> Result<()> { + }} + #[inline] pub fn clear_private_payload(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ClearPrivatePayload)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_simultaneous_probe_connections(&self) -> Result { + }} + #[inline] pub fn get_max_simultaneous_probe_connections(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxSimultaneousProbeConnections)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_simultaneous_probe_connections(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_max_simultaneous_probe_connections(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxSimultaneousProbeConnections)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_system_outbound_bandwidth_constrained(&self) -> Result { + }} + #[inline] pub fn get_is_system_outbound_bandwidth_constrained(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSystemOutboundBandwidthConstrained)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_system_outbound_bandwidth_constrained(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_system_outbound_bandwidth_constrained(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsSystemOutboundBandwidthConstrained)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_system_inbound_bandwidth_constrained(&self) -> Result { + }} + #[inline] pub fn get_is_system_inbound_bandwidth_constrained(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSystemInboundBandwidthConstrained)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_system_inbound_bandwidth_constrained(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_system_inbound_bandwidth_constrained(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsSystemInboundBandwidthConstrained)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_published_private_payload(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_published_private_payload(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PublishedPrivatePayload)(self 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_published_private_payload(&self, value: &super::super::storage::streams::IBuffer) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_published_private_payload(&self, value: &super::super::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PublishedPrivatePayload)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_private_payload_size(&self) -> Result { + }} + #[inline] pub fn get_max_private_payload_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxPrivatePayloadSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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, @@ -9316,26 +9316,26 @@ RT_INTERFACE!{interface IXboxLiveQualityOfServiceMetricResult(IXboxLiveQualityOf fn get_Value(&self, out: *mut u64) -> HRESULT }} impl IXboxLiveQualityOfServiceMetricResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_address(&self) -> Result> { + }} + #[inline] pub fn get_device_address(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceAddress)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_metric(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_metric(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Metric)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result { + }} + #[inline] pub fn get_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class XboxLiveQualityOfServiceMetricResult: IXboxLiveQualityOfServiceMetricResult} DEFINE_IID!(IID_IXboxLiveQualityOfServicePrivatePayloadResult, 1516438190, 28472, 16832, 159, 204, 234, 108, 185, 120, 202, 252); @@ -9345,21 +9345,21 @@ RT_INTERFACE!{interface IXboxLiveQualityOfServicePrivatePayloadResult(IXboxLiveQ #[cfg(feature="windows-storage")] fn get_Value(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT }} impl IXboxLiveQualityOfServicePrivatePayloadResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_address(&self) -> Result> { + }} + #[inline] pub fn get_device_address(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceAddress)(self 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_value(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_value(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class XboxLiveQualityOfServicePrivatePayloadResult: IXboxLiveQualityOfServicePrivatePayloadResult} RT_ENUM! { enum XboxLiveSocketKind: i32 { diff --git a/src/rt/gen/windows/perception.rs b/src/rt/gen/windows/perception.rs index 0032fc4..f31721a 100644 --- a/src/rt/gen/windows/perception.rs +++ b/src/rt/gen/windows/perception.rs @@ -1,40 +1,40 @@ 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(&self, out: *mut super::foundation::DateTime) -> HRESULT, - fn get_PredictionAmount(&self, out: *mut super::foundation::TimeSpan) -> HRESULT + fn get_TargetTime(&self, out: *mut foundation::DateTime) -> HRESULT, + fn get_PredictionAmount(&self, out: *mut foundation::TimeSpan) -> HRESULT }} impl IPerceptionTimestamp { - #[inline] pub unsafe fn get_target_time(&self) -> Result { + #[inline] pub fn get_target_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TargetTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_prediction_amount(&self) -> Result { + }} + #[inline] pub fn get_prediction_amount(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PredictionAmount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PerceptionTimestamp: IPerceptionTimestamp} RT_CLASS!{static class PerceptionTimestampHelper} impl RtActivatable for PerceptionTimestampHelper {} impl PerceptionTimestampHelper { - #[inline] pub fn from_historical_target_time(targetTime: super::foundation::DateTime) -> Result> { unsafe { + #[inline] pub fn from_historical_target_time(targetTime: foundation::DateTime) -> Result>> { >::get_activation_factory().from_historical_target_time(targetTime) - }} + } } DEFINE_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]) [CLSID_PerceptionTimestampHelper]); 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(&self, targetTime: super::foundation::DateTime, out: *mut *mut PerceptionTimestamp) -> HRESULT + fn FromHistoricalTargetTime(&self, targetTime: foundation::DateTime, out: *mut *mut PerceptionTimestamp) -> HRESULT }} impl IPerceptionTimestampHelperStatics { - #[inline] pub unsafe fn from_historical_target_time(&self, targetTime: super::foundation::DateTime) -> Result> { + #[inline] pub fn from_historical_target_time(&self, targetTime: foundation::DateTime) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromHistoricalTargetTime)(self as *const _ as *mut _, targetTime, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } pub mod spatial { // Windows.Perception.Spatial use ::prelude::*; @@ -42,42 +42,42 @@ DEFINE_IID!(IID_ISpatialAnchor, 86631886, 7476, 14082, 188, 236, 234, 191, 245, RT_INTERFACE!{interface ISpatialAnchor(ISpatialAnchorVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialAnchor] { fn get_CoordinateSystem(&self, out: *mut *mut SpatialCoordinateSystem) -> HRESULT, fn get_RawCoordinateSystem(&self, out: *mut *mut SpatialCoordinateSystem) -> HRESULT, - fn add_RawCoordinateSystemAdjusted(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RawCoordinateSystemAdjusted(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_RawCoordinateSystemAdjusted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RawCoordinateSystemAdjusted(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl ISpatialAnchor { - #[inline] pub unsafe fn get_coordinate_system(&self) -> Result> { + #[inline] pub fn get_coordinate_system(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CoordinateSystem)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_raw_coordinate_system(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_raw_coordinate_system(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RawCoordinateSystem)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_raw_coordinate_system_adjusted(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_raw_coordinate_system_adjusted(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RawCoordinateSystemAdjusted)(self as *const _ as *mut _, 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(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_raw_coordinate_system_adjusted(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RawCoordinateSystemAdjusted)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SpatialAnchor: ISpatialAnchor} impl RtActivatable for SpatialAnchor {} impl SpatialAnchor { - #[inline] pub fn try_create_relative_to(coordinateSystem: &SpatialCoordinateSystem) -> Result> { unsafe { + #[inline] pub fn try_create_relative_to(coordinateSystem: &SpatialCoordinateSystem) -> Result>> { >::get_activation_factory().try_create_relative_to(coordinateSystem) - }} - #[inline] pub fn try_create_with_position_relative_to(coordinateSystem: &SpatialCoordinateSystem, position: super::super::foundation::numerics::Vector3) -> Result> { unsafe { + } + #[inline] pub fn try_create_with_position_relative_to(coordinateSystem: &SpatialCoordinateSystem, position: foundation::numerics::Vector3) -> Result>> { >::get_activation_factory().try_create_with_position_relative_to(coordinateSystem, position) - }} - #[inline] pub fn try_create_with_position_and_orientation_relative_to(coordinateSystem: &SpatialCoordinateSystem, position: super::super::foundation::numerics::Vector3, orientation: super::super::foundation::numerics::Quaternion) -> Result> { unsafe { + } + #[inline] pub fn try_create_with_position_and_orientation_relative_to(coordinateSystem: &SpatialCoordinateSystem, position: foundation::numerics::Vector3, orientation: foundation::numerics::Quaternion) -> Result>> { >::get_activation_factory().try_create_with_position_and_orientation_relative_to(coordinateSystem, position, orientation) - }} + } } DEFINE_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]) [CLSID_SpatialAnchor]); DEFINE_IID!(IID_ISpatialAnchor2, 3977758984, 42645, 19702, 146, 253, 151, 38, 59, 167, 16, 71); @@ -85,144 +85,144 @@ RT_INTERFACE!{interface ISpatialAnchor2(ISpatialAnchor2Vtbl): IInspectable(IInsp fn get_RemovedByUser(&self, out: *mut bool) -> HRESULT }} impl ISpatialAnchor2 { - #[inline] pub unsafe fn get_removed_by_user(&self) -> Result { + #[inline] pub fn get_removed_by_user(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RemovedByUser)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{static class SpatialAnchorManager} impl RtActivatable for SpatialAnchorManager {} impl SpatialAnchorManager { - #[inline] pub fn request_store_async() -> Result>> { unsafe { + #[inline] pub fn request_store_async() -> Result>> { >::get_activation_factory().request_store_async() - }} + } } DEFINE_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]) [CLSID_SpatialAnchorManager]); 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn RequestStoreAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ISpatialAnchorManagerStatics { - #[inline] pub unsafe fn request_store_async(&self) -> Result>> { + #[inline] pub fn request_store_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestStoreAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut super::super::foundation::numerics::Matrix4x4) -> HRESULT + fn get_OldRawCoordinateSystemToNewRawCoordinateSystemTransform(&self, out: *mut foundation::numerics::Matrix4x4) -> HRESULT }} impl ISpatialAnchorRawCoordinateSystemAdjustedEventArgs { - #[inline] pub unsafe fn get_old_raw_coordinate_system_to_new_raw_coordinate_system_transform(&self) -> Result { + #[inline] pub fn get_old_raw_coordinate_system_to_new_raw_coordinate_system_transform(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OldRawCoordinateSystemToNewRawCoordinateSystemTransform)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SpatialAnchorRawCoordinateSystemAdjustedEventArgs: ISpatialAnchorRawCoordinateSystemAdjustedEventArgs} 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(&self, coordinateSystem: *mut SpatialCoordinateSystem, out: *mut *mut SpatialAnchor) -> HRESULT, - fn TryCreateWithPositionRelativeTo(&self, coordinateSystem: *mut SpatialCoordinateSystem, position: super::super::foundation::numerics::Vector3, out: *mut *mut SpatialAnchor) -> HRESULT, - fn TryCreateWithPositionAndOrientationRelativeTo(&self, coordinateSystem: *mut SpatialCoordinateSystem, position: super::super::foundation::numerics::Vector3, orientation: super::super::foundation::numerics::Quaternion, out: *mut *mut SpatialAnchor) -> HRESULT + fn TryCreateWithPositionRelativeTo(&self, coordinateSystem: *mut SpatialCoordinateSystem, position: foundation::numerics::Vector3, out: *mut *mut SpatialAnchor) -> HRESULT, + fn TryCreateWithPositionAndOrientationRelativeTo(&self, coordinateSystem: *mut SpatialCoordinateSystem, position: foundation::numerics::Vector3, orientation: foundation::numerics::Quaternion, out: *mut *mut SpatialAnchor) -> HRESULT }} impl ISpatialAnchorStatics { - #[inline] pub unsafe fn try_create_relative_to(&self, coordinateSystem: &SpatialCoordinateSystem) -> Result> { + #[inline] pub fn try_create_relative_to(&self, coordinateSystem: &SpatialCoordinateSystem) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryCreateRelativeTo)(self 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 try_create_with_position_relative_to(&self, coordinateSystem: &SpatialCoordinateSystem, position: super::super::foundation::numerics::Vector3) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn try_create_with_position_relative_to(&self, coordinateSystem: &SpatialCoordinateSystem, position: foundation::numerics::Vector3) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryCreateWithPositionRelativeTo)(self as *const _ as *mut _, 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(&self, coordinateSystem: &SpatialCoordinateSystem, position: super::super::foundation::numerics::Vector3, orientation: super::super::foundation::numerics::Quaternion) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn try_create_with_position_and_orientation_relative_to(&self, coordinateSystem: &SpatialCoordinateSystem, position: foundation::numerics::Vector3, orientation: foundation::numerics::Quaternion) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryCreateWithPositionAndOrientationRelativeTo)(self as *const _ as *mut _, coordinateSystem as *const _ as *mut _, position, orientation, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, + fn GetAllSavedAnchors(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT, fn TrySave(&self, id: HSTRING, anchor: *mut SpatialAnchor, out: *mut bool) -> HRESULT, fn Remove(&self, id: HSTRING) -> HRESULT, fn Clear(&self) -> HRESULT }} impl ISpatialAnchorStore { - #[inline] pub unsafe fn get_all_saved_anchors(&self) -> Result>> { + #[inline] pub fn get_all_saved_anchors(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAllSavedAnchors)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_save(&self, id: &HStringArg, anchor: &SpatialAnchor) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn try_save(&self, id: &HStringArg, anchor: &SpatialAnchor) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TrySave)(self as *const _ as *mut _, id.get(), anchor as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove(&self, id: &HStringArg) -> Result<()> { + }} + #[inline] pub fn remove(&self, id: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Remove)(self as *const _ as *mut _, id.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn clear(&self) -> Result<()> { + }} + #[inline] pub fn clear(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Clear)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SpatialAnchorStore: ISpatialAnchorStore} RT_CLASS!{static class SpatialAnchorTransferManager} impl RtActivatable for SpatialAnchorTransferManager {} impl SpatialAnchorTransferManager { - #[cfg(feature="windows-storage")] #[inline] pub fn try_import_anchors_async(stream: &super::super::storage::streams::IInputStream) -> Result>>> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn try_import_anchors_async(stream: &super::super::storage::streams::IInputStream) -> Result>>> { >::get_activation_factory().try_import_anchors_async(stream) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn try_export_anchors_async(anchors: &super::super::foundation::collections::IIterable>, stream: &super::super::storage::streams::IOutputStream) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn try_export_anchors_async(anchors: &foundation::collections::IIterable>, stream: &super::super::storage::streams::IOutputStream) -> Result>> { >::get_activation_factory().try_export_anchors_async(anchors, stream) - }} - #[inline] pub fn request_access_async() -> Result>> { unsafe { + } + #[inline] pub fn request_access_async() -> Result>> { >::get_activation_factory().request_access_async() - }} + } } DEFINE_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]) [CLSID_SpatialAnchorTransferManager]); 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(&self) -> (), - #[cfg(feature="windows-storage")] fn TryImportAnchorsAsync(&self, stream: *mut super::super::storage::streams::IInputStream, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + #[cfg(feature="windows-storage")] fn TryImportAnchorsAsync(&self, stream: *mut super::super::storage::streams::IInputStream, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-storage")] fn TryExportAnchorsAsync(&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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn TryExportAnchorsAsync(&self, anchors: *mut foundation::collections::IIterable>, stream: *mut super::super::storage::streams::IOutputStream, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestAccessAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ISpatialAnchorTransferManagerStatics { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn try_import_anchors_async(&self, stream: &super::super::storage::streams::IInputStream) -> Result>>> { + #[cfg(feature="windows-storage")] #[inline] pub fn try_import_anchors_async(&self, stream: &super::super::storage::streams::IInputStream) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryImportAnchorsAsync)(self as *const _ as *mut _, 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(&self, anchors: &super::super::foundation::collections::IIterable>, stream: &super::super::storage::streams::IOutputStream) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn try_export_anchors_async(&self, anchors: &foundation::collections::IIterable>, stream: &super::super::storage::streams::IOutputStream) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryExportAnchorsAsync)(self as *const _ as *mut _, 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(&self) -> Result>> { + }} + #[inline] pub fn request_access_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_STRUCT! { struct SpatialBoundingBox { - Center: super::super::foundation::numerics::Vector3, Extents: super::super::foundation::numerics::Vector3, + Center: foundation::numerics::Vector3, Extents: foundation::numerics::Vector3, }} 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, + Near: foundation::numerics::Plane, Far: foundation::numerics::Plane, Right: foundation::numerics::Plane, Left: foundation::numerics::Plane, Top: foundation::numerics::Plane, Bottom: foundation::numerics::Plane, }} RT_STRUCT! { struct SpatialBoundingOrientedBox { - Center: super::super::foundation::numerics::Vector3, Extents: super::super::foundation::numerics::Vector3, Orientation: super::super::foundation::numerics::Quaternion, + Center: foundation::numerics::Vector3, Extents: foundation::numerics::Vector3, Orientation: foundation::numerics::Quaternion, }} RT_STRUCT! { struct SpatialBoundingSphere { - Center: super::super::foundation::numerics::Vector3, Radius: f32, + Center: 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] { @@ -231,18 +231,18 @@ RT_INTERFACE!{interface ISpatialBoundingVolume(ISpatialBoundingVolumeVtbl): IIns RT_CLASS!{class SpatialBoundingVolume: ISpatialBoundingVolume} impl RtActivatable for SpatialBoundingVolume {} impl SpatialBoundingVolume { - #[inline] pub fn from_box(coordinateSystem: &SpatialCoordinateSystem, box_: SpatialBoundingBox) -> Result> { unsafe { + #[inline] pub fn from_box(coordinateSystem: &SpatialCoordinateSystem, box_: SpatialBoundingBox) -> Result>> { >::get_activation_factory().from_box(coordinateSystem, box_) - }} - #[inline] pub fn from_oriented_box(coordinateSystem: &SpatialCoordinateSystem, box_: SpatialBoundingOrientedBox) -> Result> { unsafe { + } + #[inline] pub fn from_oriented_box(coordinateSystem: &SpatialCoordinateSystem, box_: SpatialBoundingOrientedBox) -> Result>> { >::get_activation_factory().from_oriented_box(coordinateSystem, box_) - }} - #[inline] pub fn from_sphere(coordinateSystem: &SpatialCoordinateSystem, sphere: SpatialBoundingSphere) -> Result> { unsafe { + } + #[inline] pub fn from_sphere(coordinateSystem: &SpatialCoordinateSystem, sphere: SpatialBoundingSphere) -> Result>> { >::get_activation_factory().from_sphere(coordinateSystem, sphere) - }} - #[inline] pub fn from_frustum(coordinateSystem: &SpatialCoordinateSystem, frustum: SpatialBoundingFrustum) -> Result> { unsafe { + } + #[inline] pub fn from_frustum(coordinateSystem: &SpatialCoordinateSystem, frustum: SpatialBoundingFrustum) -> Result>> { >::get_activation_factory().from_frustum(coordinateSystem, frustum) - }} + } } DEFINE_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]) [CLSID_SpatialBoundingVolume]); DEFINE_IID!(IID_ISpatialBoundingVolumeStatics, 92836119, 46049, 14040, 176, 23, 86, 97, 129, 165, 177, 150); @@ -253,71 +253,71 @@ RT_INTERFACE!{static interface ISpatialBoundingVolumeStatics(ISpatialBoundingVol fn FromFrustum(&self, coordinateSystem: *mut SpatialCoordinateSystem, frustum: SpatialBoundingFrustum, out: *mut *mut SpatialBoundingVolume) -> HRESULT }} impl ISpatialBoundingVolumeStatics { - #[inline] pub unsafe fn from_box(&self, coordinateSystem: &SpatialCoordinateSystem, box_: SpatialBoundingBox) -> Result> { + #[inline] pub fn from_box(&self, coordinateSystem: &SpatialCoordinateSystem, box_: SpatialBoundingBox) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromBox)(self as *const _ as *mut _, 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(&self, coordinateSystem: &SpatialCoordinateSystem, box_: SpatialBoundingOrientedBox) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn from_oriented_box(&self, coordinateSystem: &SpatialCoordinateSystem, box_: SpatialBoundingOrientedBox) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromOrientedBox)(self as *const _ as *mut _, 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(&self, coordinateSystem: &SpatialCoordinateSystem, sphere: SpatialBoundingSphere) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn from_sphere(&self, coordinateSystem: &SpatialCoordinateSystem, sphere: SpatialBoundingSphere) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromSphere)(self as *const _ as *mut _, 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(&self, coordinateSystem: &SpatialCoordinateSystem, frustum: SpatialBoundingFrustum) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn from_frustum(&self, coordinateSystem: &SpatialCoordinateSystem, frustum: SpatialBoundingFrustum) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromFrustum)(self as *const _ as *mut _, coordinateSystem as *const _ as *mut _, frustum, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, target: *mut SpatialCoordinateSystem, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn TryGetTransformTo(&self, target: *mut SpatialCoordinateSystem, out: *mut *mut foundation::IReference) -> HRESULT }} impl ISpatialCoordinateSystem { - #[inline] pub unsafe fn try_get_transform_to(&self, target: &SpatialCoordinateSystem) -> Result>> { + #[inline] pub fn try_get_transform_to(&self, target: &SpatialCoordinateSystem) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetTransformTo)(self as *const _ as *mut _, target as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SpatialCoordinateSystem: ISpatialCoordinateSystem} DEFINE_IID!(IID_ISpatialEntity, 376301909, 57835, 17740, 186, 8, 230, 192, 102, 141, 220, 101); RT_INTERFACE!{interface ISpatialEntity(ISpatialEntityVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialEntity] { fn get_Id(&self, out: *mut HSTRING) -> HRESULT, fn get_Anchor(&self, out: *mut *mut SpatialAnchor) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT + fn get_Properties(&self, out: *mut *mut foundation::collections::ValueSet) -> HRESULT }} impl ISpatialEntity { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_anchor(&self) -> Result> { + }} + #[inline] pub fn get_anchor(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Anchor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SpatialEntity: ISpatialEntity} impl RtActivatable for SpatialEntity {} impl SpatialEntity { - #[inline] pub fn create_with_spatial_anchor(spatialAnchor: &SpatialAnchor) -> Result> { unsafe { + #[inline] pub fn create_with_spatial_anchor(spatialAnchor: &SpatialAnchor) -> Result> { >::get_activation_factory().create_with_spatial_anchor(spatialAnchor) - }} - #[inline] pub fn create_with_spatial_anchor_and_properties(spatialAnchor: &SpatialAnchor, propertySet: &super::super::foundation::collections::ValueSet) -> Result> { unsafe { + } + #[inline] pub fn create_with_spatial_anchor_and_properties(spatialAnchor: &SpatialAnchor, propertySet: &foundation::collections::ValueSet) -> Result> { >::get_activation_factory().create_with_spatial_anchor_and_properties(spatialAnchor, propertySet) - }} + } } DEFINE_CLSID!(SpatialEntity(&[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,69,110,116,105,116,121,0]) [CLSID_SpatialEntity]); DEFINE_IID!(IID_ISpatialEntityAddedEventArgs, 2744644763, 5482, 18183, 172, 44, 211, 29, 87, 14, 211, 153); @@ -325,74 +325,74 @@ RT_INTERFACE!{interface ISpatialEntityAddedEventArgs(ISpatialEntityAddedEventArg fn get_Entity(&self, out: *mut *mut SpatialEntity) -> HRESULT }} impl ISpatialEntityAddedEventArgs { - #[inline] pub unsafe fn get_entity(&self) -> Result> { + #[inline] pub fn get_entity(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Entity)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SpatialEntityAddedEventArgs: ISpatialEntityAddedEventArgs} DEFINE_IID!(IID_ISpatialEntityFactory, 3790725925, 13471, 16933, 162, 243, 75, 1, 193, 95, 224, 86); RT_INTERFACE!{static interface ISpatialEntityFactory(ISpatialEntityFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialEntityFactory] { fn CreateWithSpatialAnchor(&self, spatialAnchor: *mut SpatialAnchor, out: *mut *mut SpatialEntity) -> HRESULT, - fn CreateWithSpatialAnchorAndProperties(&self, spatialAnchor: *mut SpatialAnchor, propertySet: *mut super::super::foundation::collections::ValueSet, out: *mut *mut SpatialEntity) -> HRESULT + fn CreateWithSpatialAnchorAndProperties(&self, spatialAnchor: *mut SpatialAnchor, propertySet: *mut foundation::collections::ValueSet, out: *mut *mut SpatialEntity) -> HRESULT }} impl ISpatialEntityFactory { - #[inline] pub unsafe fn create_with_spatial_anchor(&self, spatialAnchor: &SpatialAnchor) -> Result> { + #[inline] pub fn create_with_spatial_anchor(&self, spatialAnchor: &SpatialAnchor) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithSpatialAnchor)(self as *const _ as *mut _, spatialAnchor as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_spatial_anchor_and_properties(&self, spatialAnchor: &SpatialAnchor, propertySet: &super::super::foundation::collections::ValueSet) -> Result> { + }} + #[inline] pub fn create_with_spatial_anchor_and_properties(&self, spatialAnchor: &SpatialAnchor, propertySet: &foundation::collections::ValueSet) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithSpatialAnchorAndProperties)(self as *const _ as *mut _, spatialAnchor as *const _ as *mut _, propertySet as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ISpatialEntityRemovedEventArgs, 2440304640, 21357, 20127, 171, 246, 65, 91, 84, 68, 214, 81); RT_INTERFACE!{interface ISpatialEntityRemovedEventArgs(ISpatialEntityRemovedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialEntityRemovedEventArgs] { fn get_Entity(&self, out: *mut *mut SpatialEntity) -> HRESULT }} impl ISpatialEntityRemovedEventArgs { - #[inline] pub unsafe fn get_entity(&self) -> Result> { + #[inline] pub fn get_entity(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Entity)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SpatialEntityRemovedEventArgs: ISpatialEntityRemovedEventArgs} DEFINE_IID!(IID_ISpatialEntityStore, 848791738, 58643, 20230, 136, 157, 27, 227, 14, 207, 67, 230); RT_INTERFACE!{interface ISpatialEntityStore(ISpatialEntityStoreVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialEntityStore] { - fn SaveAsync(&self, entity: *mut SpatialEntity, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn RemoveAsync(&self, entity: *mut SpatialEntity, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn SaveAsync(&self, entity: *mut SpatialEntity, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn RemoveAsync(&self, entity: *mut SpatialEntity, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn CreateEntityWatcher(&self, out: *mut *mut SpatialEntityWatcher) -> HRESULT }} impl ISpatialEntityStore { - #[inline] pub unsafe fn save_async(&self, entity: &SpatialEntity) -> Result> { + #[inline] pub fn save_async(&self, entity: &SpatialEntity) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveAsync)(self as *const _ as *mut _, entity as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn remove_async(&self, entity: &SpatialEntity) -> Result> { + }} + #[inline] pub fn remove_async(&self, entity: &SpatialEntity) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RemoveAsync)(self as *const _ as *mut _, entity as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_entity_watcher(&self) -> Result> { + }} + #[inline] pub fn create_entity_watcher(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateEntityWatcher)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SpatialEntityStore: ISpatialEntityStore} impl RtActivatable for SpatialEntityStore {} impl SpatialEntityStore { - #[inline] pub fn get_is_supported() -> Result { unsafe { + #[inline] pub fn get_is_supported() -> Result { >::get_activation_factory().get_is_supported() - }} - #[cfg(feature="windows-system")] #[inline] pub fn try_get_for_remote_system_session(session: &super::super::system::remotesystems::RemoteSystemSession) -> Result> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn try_get_for_remote_system_session(session: &super::super::system::remotesystems::RemoteSystemSession) -> Result>> { >::get_activation_factory().try_get_for_remote_system_session(session) - }} + } } DEFINE_CLSID!(SpatialEntityStore(&[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,69,110,116,105,116,121,83,116,111,114,101,0]) [CLSID_SpatialEntityStore]); DEFINE_IID!(IID_ISpatialEntityStoreStatics, 1800091806, 31824, 20114, 138, 98, 77, 29, 75, 124, 205, 62); @@ -401,93 +401,93 @@ RT_INTERFACE!{static interface ISpatialEntityStoreStatics(ISpatialEntityStoreSta #[cfg(feature="windows-system")] fn TryGetForRemoteSystemSession(&self, session: *mut super::super::system::remotesystems::RemoteSystemSession, out: *mut *mut SpatialEntityStore) -> HRESULT }} impl ISpatialEntityStoreStatics { - #[inline] pub unsafe fn get_is_supported(&self) -> Result { + #[inline] pub fn get_is_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn try_get_for_remote_system_session(&self, session: &super::super::system::remotesystems::RemoteSystemSession) -> Result> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn try_get_for_remote_system_session(&self, session: &super::super::system::remotesystems::RemoteSystemSession) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetForRemoteSystemSession)(self as *const _ as *mut _, session as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_ISpatialEntityUpdatedEventArgs, 3848738662, 25211, 17355, 164, 159, 179, 190, 109, 71, 222, 237); RT_INTERFACE!{interface ISpatialEntityUpdatedEventArgs(ISpatialEntityUpdatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialEntityUpdatedEventArgs] { fn get_Entity(&self, out: *mut *mut SpatialEntity) -> HRESULT }} impl ISpatialEntityUpdatedEventArgs { - #[inline] pub unsafe fn get_entity(&self) -> Result> { + #[inline] pub fn get_entity(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Entity)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SpatialEntityUpdatedEventArgs: ISpatialEntityUpdatedEventArgs} DEFINE_IID!(IID_ISpatialEntityWatcher, 3015204768, 27998, 19388, 128, 93, 95, 229, 185, 186, 25, 89); RT_INTERFACE!{interface ISpatialEntityWatcher(ISpatialEntityWatcherVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialEntityWatcher] { fn get_Status(&self, out: *mut SpatialEntityWatcherStatus) -> HRESULT, - fn add_Added(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Added(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Updated(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Updated(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Removed(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Removed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_EnumerationCompleted(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_EnumerationCompleted(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Added(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Added(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Updated(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Updated(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Removed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Removed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_EnumerationCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnumerationCompleted(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn Start(&self) -> HRESULT, fn Stop(&self) -> HRESULT }} impl ISpatialEntityWatcher { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_added(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_added(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Added)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_added(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_added(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Added)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_updated(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_updated(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Updated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_updated(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_updated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Updated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_removed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_removed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Removed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_removed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_removed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Removed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_enumeration_completed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_enumeration_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_EnumerationCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_enumeration_completed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_enumeration_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_EnumerationCompleted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SpatialEntityWatcher: ISpatialEntityWatcher} RT_ENUM! { enum SpatialEntityWatcherStatus: i32 { @@ -498,184 +498,184 @@ RT_ENUM! { enum SpatialLocatability: i32 { }} 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(&self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, - fn get_Orientation(&self, out: *mut super::super::foundation::numerics::Quaternion) -> HRESULT, - fn get_AbsoluteLinearVelocity(&self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, - fn get_AbsoluteLinearAcceleration(&self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, - fn get_AbsoluteAngularVelocity(&self, out: *mut super::super::foundation::numerics::Quaternion) -> HRESULT, - fn get_AbsoluteAngularAcceleration(&self, out: *mut super::super::foundation::numerics::Quaternion) -> HRESULT + fn get_Position(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, + fn get_Orientation(&self, out: *mut foundation::numerics::Quaternion) -> HRESULT, + fn get_AbsoluteLinearVelocity(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, + fn get_AbsoluteLinearAcceleration(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, + fn get_AbsoluteAngularVelocity(&self, out: *mut foundation::numerics::Quaternion) -> HRESULT, + fn get_AbsoluteAngularAcceleration(&self, out: *mut foundation::numerics::Quaternion) -> HRESULT }} impl ISpatialLocation { - #[inline] pub unsafe fn get_position(&self) -> Result { + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_orientation(&self) -> Result { + }} + #[inline] pub fn get_orientation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Orientation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_absolute_linear_velocity(&self) -> Result { + }} + #[inline] pub fn get_absolute_linear_velocity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AbsoluteLinearVelocity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_absolute_linear_acceleration(&self) -> Result { + }} + #[inline] pub fn get_absolute_linear_acceleration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AbsoluteLinearAcceleration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_absolute_angular_velocity(&self) -> Result { + }} + #[inline] pub fn get_absolute_angular_velocity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AbsoluteAngularVelocity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_absolute_angular_acceleration(&self) -> Result { + }} + #[inline] pub fn get_absolute_angular_acceleration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AbsoluteAngularAcceleration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SpatialLocation: ISpatialLocation} 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(&self, out: *mut SpatialLocatability) -> HRESULT, - fn add_LocatabilityChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_LocatabilityChanged(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PositionalTrackingDeactivating(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PositionalTrackingDeactivating(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_LocatabilityChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_LocatabilityChanged(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PositionalTrackingDeactivating(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PositionalTrackingDeactivating(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, fn TryLocateAtTimestamp(&self, timestamp: *mut super::PerceptionTimestamp, coordinateSystem: *mut SpatialCoordinateSystem, out: *mut *mut SpatialLocation) -> HRESULT, fn CreateAttachedFrameOfReferenceAtCurrentHeading(&self, out: *mut *mut SpatialLocatorAttachedFrameOfReference) -> HRESULT, - fn CreateAttachedFrameOfReferenceAtCurrentHeadingWithPosition(&self, relativePosition: super::super::foundation::numerics::Vector3, out: *mut *mut SpatialLocatorAttachedFrameOfReference) -> HRESULT, - fn CreateAttachedFrameOfReferenceAtCurrentHeadingWithPositionAndOrientation(&self, relativePosition: super::super::foundation::numerics::Vector3, relativeOrientation: super::super::foundation::numerics::Quaternion, out: *mut *mut SpatialLocatorAttachedFrameOfReference) -> HRESULT, - fn CreateAttachedFrameOfReferenceAtCurrentHeadingWithPositionAndOrientationAndRelativeHeading(&self, relativePosition: super::super::foundation::numerics::Vector3, relativeOrientation: super::super::foundation::numerics::Quaternion, relativeHeadingInRadians: f64, out: *mut *mut SpatialLocatorAttachedFrameOfReference) -> HRESULT, + fn CreateAttachedFrameOfReferenceAtCurrentHeadingWithPosition(&self, relativePosition: foundation::numerics::Vector3, out: *mut *mut SpatialLocatorAttachedFrameOfReference) -> HRESULT, + fn CreateAttachedFrameOfReferenceAtCurrentHeadingWithPositionAndOrientation(&self, relativePosition: foundation::numerics::Vector3, relativeOrientation: foundation::numerics::Quaternion, out: *mut *mut SpatialLocatorAttachedFrameOfReference) -> HRESULT, + fn CreateAttachedFrameOfReferenceAtCurrentHeadingWithPositionAndOrientationAndRelativeHeading(&self, relativePosition: foundation::numerics::Vector3, relativeOrientation: foundation::numerics::Quaternion, relativeHeadingInRadians: f64, out: *mut *mut SpatialLocatorAttachedFrameOfReference) -> HRESULT, fn CreateStationaryFrameOfReferenceAtCurrentLocation(&self, out: *mut *mut SpatialStationaryFrameOfReference) -> HRESULT, - fn CreateStationaryFrameOfReferenceAtCurrentLocationWithPosition(&self, relativePosition: super::super::foundation::numerics::Vector3, out: *mut *mut SpatialStationaryFrameOfReference) -> HRESULT, - fn CreateStationaryFrameOfReferenceAtCurrentLocationWithPositionAndOrientation(&self, relativePosition: super::super::foundation::numerics::Vector3, relativeOrientation: super::super::foundation::numerics::Quaternion, out: *mut *mut SpatialStationaryFrameOfReference) -> HRESULT, - fn CreateStationaryFrameOfReferenceAtCurrentLocationWithPositionAndOrientationAndRelativeHeading(&self, relativePosition: super::super::foundation::numerics::Vector3, relativeOrientation: super::super::foundation::numerics::Quaternion, relativeHeadingInRadians: f64, out: *mut *mut SpatialStationaryFrameOfReference) -> HRESULT + fn CreateStationaryFrameOfReferenceAtCurrentLocationWithPosition(&self, relativePosition: foundation::numerics::Vector3, out: *mut *mut SpatialStationaryFrameOfReference) -> HRESULT, + fn CreateStationaryFrameOfReferenceAtCurrentLocationWithPositionAndOrientation(&self, relativePosition: foundation::numerics::Vector3, relativeOrientation: foundation::numerics::Quaternion, out: *mut *mut SpatialStationaryFrameOfReference) -> HRESULT, + fn CreateStationaryFrameOfReferenceAtCurrentLocationWithPositionAndOrientationAndRelativeHeading(&self, relativePosition: foundation::numerics::Vector3, relativeOrientation: foundation::numerics::Quaternion, relativeHeadingInRadians: f64, out: *mut *mut SpatialStationaryFrameOfReference) -> HRESULT }} impl ISpatialLocator { - #[inline] pub unsafe fn get_locatability(&self) -> Result { + #[inline] pub fn get_locatability(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Locatability)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_locatability_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_locatability_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_LocatabilityChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_locatability_changed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_locatability_changed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_LocatabilityChanged)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_positional_tracking_deactivating(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_positional_tracking_deactivating(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PositionalTrackingDeactivating)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_positional_tracking_deactivating(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_positional_tracking_deactivating(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PositionalTrackingDeactivating)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn try_locate_at_timestamp(&self, timestamp: &super::PerceptionTimestamp, coordinateSystem: &SpatialCoordinateSystem) -> Result> { + }} + #[inline] pub fn try_locate_at_timestamp(&self, timestamp: &super::PerceptionTimestamp, coordinateSystem: &SpatialCoordinateSystem) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryLocateAtTimestamp)(self as *const _ as *mut _, 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(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_attached_frame_of_reference_at_current_heading(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAttachedFrameOfReferenceAtCurrentHeading)(self 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_with_position(&self, relativePosition: super::super::foundation::numerics::Vector3) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_attached_frame_of_reference_at_current_heading_with_position(&self, relativePosition: foundation::numerics::Vector3) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAttachedFrameOfReferenceAtCurrentHeadingWithPosition)(self as *const _ as *mut _, 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(&self, relativePosition: super::super::foundation::numerics::Vector3, relativeOrientation: super::super::foundation::numerics::Quaternion) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_attached_frame_of_reference_at_current_heading_with_position_and_orientation(&self, relativePosition: foundation::numerics::Vector3, relativeOrientation: foundation::numerics::Quaternion) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAttachedFrameOfReferenceAtCurrentHeadingWithPositionAndOrientation)(self as *const _ as *mut _, 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(&self, relativePosition: super::super::foundation::numerics::Vector3, relativeOrientation: super::super::foundation::numerics::Quaternion, relativeHeadingInRadians: f64) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_attached_frame_of_reference_at_current_heading_with_position_and_orientation_and_relative_heading(&self, relativePosition: foundation::numerics::Vector3, relativeOrientation: foundation::numerics::Quaternion, relativeHeadingInRadians: f64) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAttachedFrameOfReferenceAtCurrentHeadingWithPositionAndOrientationAndRelativeHeading)(self as *const _ as *mut _, 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(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_stationary_frame_of_reference_at_current_location(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateStationaryFrameOfReferenceAtCurrentLocation)(self as *const _ as *mut _, &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(&self, relativePosition: super::super::foundation::numerics::Vector3) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_stationary_frame_of_reference_at_current_location_with_position(&self, relativePosition: foundation::numerics::Vector3) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateStationaryFrameOfReferenceAtCurrentLocationWithPosition)(self as *const _ as *mut _, 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(&self, relativePosition: super::super::foundation::numerics::Vector3, relativeOrientation: super::super::foundation::numerics::Quaternion) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_stationary_frame_of_reference_at_current_location_with_position_and_orientation(&self, relativePosition: foundation::numerics::Vector3, relativeOrientation: foundation::numerics::Quaternion) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateStationaryFrameOfReferenceAtCurrentLocationWithPositionAndOrientation)(self as *const _ as *mut _, 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(&self, relativePosition: super::super::foundation::numerics::Vector3, relativeOrientation: super::super::foundation::numerics::Quaternion, relativeHeadingInRadians: f64) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_stationary_frame_of_reference_at_current_location_with_position_and_orientation_and_relative_heading(&self, relativePosition: foundation::numerics::Vector3, relativeOrientation: foundation::numerics::Quaternion, relativeHeadingInRadians: f64) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateStationaryFrameOfReferenceAtCurrentLocationWithPositionAndOrientationAndRelativeHeading)(self as *const _ as *mut _, relativePosition, relativeOrientation, relativeHeadingInRadians, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SpatialLocator: ISpatialLocator} impl RtActivatable for SpatialLocator {} impl SpatialLocator { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} + } } DEFINE_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]) [CLSID_SpatialLocator]); 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(&self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, - fn put_RelativePosition(&self, value: super::super::foundation::numerics::Vector3) -> HRESULT, - fn get_RelativeOrientation(&self, out: *mut super::super::foundation::numerics::Quaternion) -> HRESULT, - fn put_RelativeOrientation(&self, value: super::super::foundation::numerics::Quaternion) -> HRESULT, + fn get_RelativePosition(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, + fn put_RelativePosition(&self, value: foundation::numerics::Vector3) -> HRESULT, + fn get_RelativeOrientation(&self, out: *mut foundation::numerics::Quaternion) -> HRESULT, + fn put_RelativeOrientation(&self, value: foundation::numerics::Quaternion) -> HRESULT, fn AdjustHeading(&self, headingOffsetInRadians: f64) -> HRESULT, fn GetStationaryCoordinateSystemAtTimestamp(&self, timestamp: *mut super::PerceptionTimestamp, out: *mut *mut SpatialCoordinateSystem) -> HRESULT, - fn TryGetRelativeHeadingAtTimestamp(&self, timestamp: *mut super::PerceptionTimestamp, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn TryGetRelativeHeadingAtTimestamp(&self, timestamp: *mut super::PerceptionTimestamp, out: *mut *mut foundation::IReference) -> HRESULT }} impl ISpatialLocatorAttachedFrameOfReference { - #[inline] pub unsafe fn get_relative_position(&self) -> Result { + #[inline] pub fn get_relative_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RelativePosition)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_relative_position(&self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + }} + #[inline] pub fn set_relative_position(&self, value: foundation::numerics::Vector3) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RelativePosition)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_relative_orientation(&self) -> Result { + }} + #[inline] pub fn get_relative_orientation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RelativeOrientation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_relative_orientation(&self, value: super::super::foundation::numerics::Quaternion) -> Result<()> { + }} + #[inline] pub fn set_relative_orientation(&self, value: foundation::numerics::Quaternion) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RelativeOrientation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn adjust_heading(&self, headingOffsetInRadians: f64) -> Result<()> { + }} + #[inline] pub fn adjust_heading(&self, headingOffsetInRadians: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AdjustHeading)(self as *const _ as *mut _, headingOffsetInRadians); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_stationary_coordinate_system_at_timestamp(&self, timestamp: &super::PerceptionTimestamp) -> Result> { + }} + #[inline] pub fn get_stationary_coordinate_system_at_timestamp(&self, timestamp: &super::PerceptionTimestamp) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetStationaryCoordinateSystemAtTimestamp)(self as *const _ as *mut _, 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(&self, timestamp: &super::PerceptionTimestamp) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn try_get_relative_heading_at_timestamp(&self, timestamp: &super::PerceptionTimestamp) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetRelativeHeadingAtTimestamp)(self as *const _ as *mut _, timestamp as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SpatialLocatorAttachedFrameOfReference: ISpatialLocatorAttachedFrameOfReference} DEFINE_IID!(IID_ISpatialLocatorPositionalTrackingDeactivatingEventArgs, 3098034275, 58356, 13963, 144, 97, 158, 169, 209, 214, 204, 22); @@ -684,15 +684,15 @@ RT_INTERFACE!{interface ISpatialLocatorPositionalTrackingDeactivatingEventArgs(I fn put_Canceled(&self, value: bool) -> HRESULT }} impl ISpatialLocatorPositionalTrackingDeactivatingEventArgs { - #[inline] pub unsafe fn get_canceled(&self) -> Result { + #[inline] pub fn get_canceled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Canceled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_canceled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_canceled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Canceled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SpatialLocatorPositionalTrackingDeactivatingEventArgs: ISpatialLocatorPositionalTrackingDeactivatingEventArgs} DEFINE_IID!(IID_ISpatialLocatorStatics, 3077452608, 42946, 13851, 187, 130, 86, 233, 59, 137, 177, 187); @@ -700,11 +700,11 @@ RT_INTERFACE!{static interface ISpatialLocatorStatics(ISpatialLocatorStaticsVtbl fn GetDefault(&self, out: *mut *mut SpatialLocator) -> HRESULT }} impl ISpatialLocatorStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum SpatialLookDirectionRange: i32 { ForwardOnly (SpatialLookDirectionRange_ForwardOnly) = 0, Omnidirectional (SpatialLookDirectionRange_Omnidirectional) = 1, @@ -721,90 +721,90 @@ RT_INTERFACE!{interface ISpatialStageFrameOfReference(ISpatialStageFrameOfRefere fn get_MovementRange(&self, out: *mut SpatialMovementRange) -> HRESULT, fn get_LookDirectionRange(&self, out: *mut SpatialLookDirectionRange) -> HRESULT, fn GetCoordinateSystemAtCurrentLocation(&self, locator: *mut SpatialLocator, out: *mut *mut SpatialCoordinateSystem) -> HRESULT, - fn TryGetMovementBounds(&self, coordinateSystem: *mut SpatialCoordinateSystem, outSize: *mut u32, out: *mut *mut super::super::foundation::numerics::Vector3) -> HRESULT + fn TryGetMovementBounds(&self, coordinateSystem: *mut SpatialCoordinateSystem, outSize: *mut u32, out: *mut *mut foundation::numerics::Vector3) -> HRESULT }} impl ISpatialStageFrameOfReference { - #[inline] pub unsafe fn get_coordinate_system(&self) -> Result> { + #[inline] pub fn get_coordinate_system(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CoordinateSystem)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_movement_range(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_movement_range(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MovementRange)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_look_direction_range(&self) -> Result { + }} + #[inline] pub fn get_look_direction_range(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LookDirectionRange)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_coordinate_system_at_current_location(&self, locator: &SpatialLocator) -> Result> { + }} + #[inline] pub fn get_coordinate_system_at_current_location(&self, locator: &SpatialLocator) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCoordinateSystemAtCurrentLocation)(self as *const _ as *mut _, locator as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_get_movement_bounds(&self, coordinateSystem: &SpatialCoordinateSystem) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn try_get_movement_bounds(&self, coordinateSystem: &SpatialCoordinateSystem) -> Result> { unsafe { let mut outSize = 0; let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetMovementBounds)(self as *const _ as *mut _, coordinateSystem as *const _ as *mut _, &mut outSize, &mut out); if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } - } + }} } RT_CLASS!{class SpatialStageFrameOfReference: ISpatialStageFrameOfReference} impl RtActivatable for SpatialStageFrameOfReference {} impl SpatialStageFrameOfReference { - #[inline] pub fn get_current() -> Result> { unsafe { + #[inline] pub fn get_current() -> Result>> { >::get_activation_factory().get_current() - }} - #[inline] pub fn add_current_changed(handler: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_current_changed(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_current_changed(handler) - }} - #[inline] pub fn remove_current_changed(cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_current_changed(cookie: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_current_changed(cookie) - }} - #[inline] pub fn request_new_stage_async() -> Result>> { unsafe { + } + #[inline] pub fn request_new_stage_async() -> Result>> { >::get_activation_factory().request_new_stage_async() - }} + } } DEFINE_CLSID!(SpatialStageFrameOfReference(&[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,83,116,97,103,101,70,114,97,109,101,79,102,82,101,102,101,114,101,110,99,101,0]) [CLSID_SpatialStageFrameOfReference]); DEFINE_IID!(IID_ISpatialStageFrameOfReferenceStatics, 4153236557, 41124, 18844, 141, 145, 168, 201, 101, 212, 6, 84); RT_INTERFACE!{static interface ISpatialStageFrameOfReferenceStatics(ISpatialStageFrameOfReferenceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialStageFrameOfReferenceStatics] { fn get_Current(&self, out: *mut *mut SpatialStageFrameOfReference) -> HRESULT, - fn add_CurrentChanged(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CurrentChanged(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn RequestNewStageAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn add_CurrentChanged(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CurrentChanged(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn RequestNewStageAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ISpatialStageFrameOfReferenceStatics { - #[inline] pub unsafe fn get_current(&self) -> Result> { + #[inline] pub fn get_current(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Current)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_current_changed(&self, handler: &super::super::foundation::EventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_current_changed(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CurrentChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_current_changed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_current_changed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CurrentChanged)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn request_new_stage_async(&self) -> Result>> { + }} + #[inline] pub fn request_new_stage_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestNewStageAsync)(self 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(&self, out: *mut *mut SpatialCoordinateSystem) -> HRESULT }} impl ISpatialStationaryFrameOfReference { - #[inline] pub unsafe fn get_coordinate_system(&self) -> Result> { + #[inline] pub fn get_coordinate_system(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CoordinateSystem)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SpatialStationaryFrameOfReference: ISpatialStationaryFrameOfReference} pub mod surfaces { // Windows.Perception.Spatial.Surfaces @@ -812,37 +812,37 @@ use ::prelude::*; 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(&self, out: *mut Guid) -> HRESULT, - fn get_UpdateTime(&self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, - fn TryGetBounds(&self, coordinateSystem: *mut super::SpatialCoordinateSystem, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn TryComputeLatestMeshAsync(&self, maxTrianglesPerCubicMeter: f64, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn TryComputeLatestMeshWithOptionsAsync(&self, maxTrianglesPerCubicMeter: f64, options: *mut SpatialSurfaceMeshOptions, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn get_UpdateTime(&self, out: *mut foundation::DateTime) -> HRESULT, + fn TryGetBounds(&self, coordinateSystem: *mut super::SpatialCoordinateSystem, out: *mut *mut foundation::IReference) -> HRESULT, + fn TryComputeLatestMeshAsync(&self, maxTrianglesPerCubicMeter: f64, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryComputeLatestMeshWithOptionsAsync(&self, maxTrianglesPerCubicMeter: f64, options: *mut SpatialSurfaceMeshOptions, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ISpatialSurfaceInfo { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_update_time(&self) -> Result<::rt::gen::windows::foundation::DateTime> { + }} + #[inline] pub fn get_update_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UpdateTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn try_get_bounds(&self, coordinateSystem: &super::SpatialCoordinateSystem) -> Result>> { + }} + #[inline] pub fn try_get_bounds(&self, coordinateSystem: &super::SpatialCoordinateSystem) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetBounds)(self 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 try_compute_latest_mesh_async(&self, maxTrianglesPerCubicMeter: f64) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn try_compute_latest_mesh_async(&self, maxTrianglesPerCubicMeter: f64) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryComputeLatestMeshAsync)(self as *const _ as *mut _, 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(&self, maxTrianglesPerCubicMeter: f64, options: &SpatialSurfaceMeshOptions) -> Result>> { + }} + #[inline] pub fn try_compute_latest_mesh_with_options_async(&self, maxTrianglesPerCubicMeter: f64, options: &SpatialSurfaceMeshOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryComputeLatestMeshWithOptionsAsync)(self as *const _ as *mut _, maxTrianglesPerCubicMeter, options as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class SpatialSurfaceInfo: ISpatialSurfaceInfo} DEFINE_IID!(IID_ISpatialSurfaceMesh, 277829593, 57101, 14672, 160, 253, 249, 114, 199, 124, 39, 180); @@ -851,40 +851,40 @@ RT_INTERFACE!{interface ISpatialSurfaceMesh(ISpatialSurfaceMeshVtbl): IInspectab fn get_CoordinateSystem(&self, out: *mut *mut super::SpatialCoordinateSystem) -> HRESULT, fn get_TriangleIndices(&self, out: *mut *mut SpatialSurfaceMeshBuffer) -> HRESULT, fn get_VertexPositions(&self, out: *mut *mut SpatialSurfaceMeshBuffer) -> HRESULT, - fn get_VertexPositionScale(&self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, + fn get_VertexPositionScale(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, fn get_VertexNormals(&self, out: *mut *mut SpatialSurfaceMeshBuffer) -> HRESULT }} impl ISpatialSurfaceMesh { - #[inline] pub unsafe fn get_surface_info(&self) -> Result> { + #[inline] pub fn get_surface_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SurfaceInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_coordinate_system(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_coordinate_system(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CoordinateSystem)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_triangle_indices(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_triangle_indices(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TriangleIndices)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_vertex_positions(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_vertex_positions(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VertexPositions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_vertex_position_scale(&self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_vertex_position_scale(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VertexPositionScale)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_vertex_normals(&self) -> Result> { + }} + #[inline] pub fn get_vertex_normals(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VertexNormals)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SpatialSurfaceMesh: ISpatialSurfaceMesh} DEFINE_IID!(IID_ISpatialSurfaceMeshBuffer, 2479839712, 34591, 13304, 152, 178, 3, 209, 1, 69, 143, 111); @@ -896,26 +896,26 @@ RT_INTERFACE!{interface ISpatialSurfaceMeshBuffer(ISpatialSurfaceMeshBufferVtbl) #[cfg(feature="windows-storage")] fn get_Data(&self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT }} impl ISpatialSurfaceMeshBuffer { - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn get_format(&self) -> Result<::rt::gen::windows::graphics::directx::DirectXPixelFormat> { + #[cfg(feature="windows-graphics")] #[inline] pub fn get_format(&self) -> Result<::rt::gen::windows::graphics::directx::DirectXPixelFormat> { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Format)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_stride(&self) -> Result { + }} + #[inline] pub fn get_stride(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Stride)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_element_count(&self) -> Result { + }} + #[inline] pub fn get_element_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ElementCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_data(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Data)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SpatialSurfaceMeshBuffer: ISpatialSurfaceMeshBuffer} DEFINE_IID!(IID_ISpatialSurfaceMeshOptions, 3530923913, 13682, 15661, 161, 13, 95, 238, 147, 148, 170, 55); @@ -936,147 +936,147 @@ RT_INTERFACE!{interface ISpatialSurfaceMeshOptions(ISpatialSurfaceMeshOptionsVtb fn put_IncludeVertexNormals(&self, value: bool) -> HRESULT }} impl ISpatialSurfaceMeshOptions { - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn get_vertex_position_format(&self) -> Result<::rt::gen::windows::graphics::directx::DirectXPixelFormat> { + #[cfg(feature="windows-graphics")] #[inline] pub fn get_vertex_position_format(&self) -> Result<::rt::gen::windows::graphics::directx::DirectXPixelFormat> { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VertexPositionFormat)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn set_vertex_position_format(&self, value: ::rt::gen::windows::graphics::directx::DirectXPixelFormat) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn set_vertex_position_format(&self, value: ::rt::gen::windows::graphics::directx::DirectXPixelFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_VertexPositionFormat)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn get_triangle_index_format(&self) -> Result<::rt::gen::windows::graphics::directx::DirectXPixelFormat> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_triangle_index_format(&self) -> Result<::rt::gen::windows::graphics::directx::DirectXPixelFormat> { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TriangleIndexFormat)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn set_triangle_index_format(&self, value: ::rt::gen::windows::graphics::directx::DirectXPixelFormat) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn set_triangle_index_format(&self, value: ::rt::gen::windows::graphics::directx::DirectXPixelFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TriangleIndexFormat)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn get_vertex_normal_format(&self) -> Result<::rt::gen::windows::graphics::directx::DirectXPixelFormat> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_vertex_normal_format(&self) -> Result<::rt::gen::windows::graphics::directx::DirectXPixelFormat> { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VertexNormalFormat)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn set_vertex_normal_format(&self, value: ::rt::gen::windows::graphics::directx::DirectXPixelFormat) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn set_vertex_normal_format(&self, value: ::rt::gen::windows::graphics::directx::DirectXPixelFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_VertexNormalFormat)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_include_vertex_normals(&self) -> Result { + }} + #[inline] pub fn get_include_vertex_normals(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IncludeVertexNormals)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_include_vertex_normals(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_include_vertex_normals(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IncludeVertexNormals)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SpatialSurfaceMeshOptions: ISpatialSurfaceMeshOptions} impl RtActivatable for SpatialSurfaceMeshOptions {} impl RtActivatable for SpatialSurfaceMeshOptions {} impl SpatialSurfaceMeshOptions { - #[cfg(feature="windows-graphics")] #[inline] pub fn get_supported_vertex_position_formats() -> Result>> { unsafe { + #[cfg(feature="windows-graphics")] #[inline] pub fn get_supported_vertex_position_formats() -> Result>>> { >::get_activation_factory().get_supported_vertex_position_formats() - }} - #[cfg(feature="windows-graphics")] #[inline] pub fn get_supported_triangle_index_formats() -> Result>> { unsafe { + } + #[cfg(feature="windows-graphics")] #[inline] pub fn get_supported_triangle_index_formats() -> Result>>> { >::get_activation_factory().get_supported_triangle_index_formats() - }} - #[cfg(feature="windows-graphics")] #[inline] pub fn get_supported_vertex_normal_formats() -> Result>> { unsafe { + } + #[cfg(feature="windows-graphics")] #[inline] pub fn get_supported_vertex_normal_formats() -> Result>>> { >::get_activation_factory().get_supported_vertex_normal_formats() - }} + } } DEFINE_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]) [CLSID_SpatialSurfaceMeshOptions]); 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(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView<::rt::gen::windows::graphics::directx::DirectXPixelFormat>) -> HRESULT, - #[cfg(feature="windows-graphics")] fn get_SupportedTriangleIndexFormats(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView<::rt::gen::windows::graphics::directx::DirectXPixelFormat>) -> HRESULT, - #[cfg(feature="windows-graphics")] fn get_SupportedVertexNormalFormats(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView<::rt::gen::windows::graphics::directx::DirectXPixelFormat>) -> HRESULT + #[cfg(feature="windows-graphics")] fn get_SupportedVertexPositionFormats(&self, out: *mut *mut foundation::collections::IVectorView<::rt::gen::windows::graphics::directx::DirectXPixelFormat>) -> HRESULT, + #[cfg(feature="windows-graphics")] fn get_SupportedTriangleIndexFormats(&self, out: *mut *mut foundation::collections::IVectorView<::rt::gen::windows::graphics::directx::DirectXPixelFormat>) -> HRESULT, + #[cfg(feature="windows-graphics")] fn get_SupportedVertexNormalFormats(&self, out: *mut *mut 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(&self) -> Result>> { + #[cfg(feature="windows-graphics")] #[inline] pub fn get_supported_vertex_position_formats(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedVertexPositionFormats)(self 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_supported_triangle_index_formats(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_supported_triangle_index_formats(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedTriangleIndexFormats)(self 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_supported_vertex_normal_formats(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_supported_vertex_normal_formats(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedVertexNormalFormats)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMapView) -> HRESULT, + fn GetObservedSurfaces(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT, fn SetBoundingVolume(&self, bounds: *mut super::SpatialBoundingVolume) -> HRESULT, - fn SetBoundingVolumes(&self, bounds: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT, - fn add_ObservedSurfacesChanged(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ObservedSurfacesChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn SetBoundingVolumes(&self, bounds: *mut foundation::collections::IIterable) -> HRESULT, + fn add_ObservedSurfacesChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ObservedSurfacesChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl ISpatialSurfaceObserver { - #[inline] pub unsafe fn get_observed_surfaces(&self) -> Result>> { + #[inline] pub fn get_observed_surfaces(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetObservedSurfaces)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_bounding_volume(&self, bounds: &super::SpatialBoundingVolume) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_bounding_volume(&self, bounds: &super::SpatialBoundingVolume) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetBoundingVolume)(self as *const _ as *mut _, bounds as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_bounding_volumes(&self, bounds: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + }} + #[inline] pub fn set_bounding_volumes(&self, bounds: &foundation::collections::IIterable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetBoundingVolumes)(self as *const _ as *mut _, bounds as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_observed_surfaces_changed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_observed_surfaces_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ObservedSurfacesChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_observed_surfaces_changed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_observed_surfaces_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ObservedSurfacesChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SpatialSurfaceObserver: ISpatialSurfaceObserver} impl RtActivatable for SpatialSurfaceObserver {} impl RtActivatable for SpatialSurfaceObserver {} impl RtActivatable for SpatialSurfaceObserver {} impl SpatialSurfaceObserver { - #[inline] pub fn request_access_async() -> Result>> { unsafe { + #[inline] pub fn request_access_async() -> Result>> { >::get_activation_factory().request_access_async() - }} - #[inline] pub fn is_supported() -> Result { unsafe { + } + #[inline] pub fn is_supported() -> Result { >::get_activation_factory().is_supported() - }} + } } DEFINE_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]) [CLSID_SpatialSurfaceObserver]); 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(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn RequestAccessAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ISpatialSurfaceObserverStatics { - #[inline] pub unsafe fn request_access_async(&self) -> Result>> { + #[inline] pub fn request_access_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ISpatialSurfaceObserverStatics2, 257114721, 50525, 20075, 168, 149, 161, 157, 230, 154, 66, 227); RT_INTERFACE!{static interface ISpatialSurfaceObserverStatics2(ISpatialSurfaceObserverStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_ISpatialSurfaceObserverStatics2] { fn IsSupported(&self, out: *mut bool) -> HRESULT }} impl ISpatialSurfaceObserverStatics2 { - #[inline] pub unsafe fn is_supported(&self) -> Result { + #[inline] pub fn is_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } } // Windows.Perception.Spatial.Surfaces } // Windows.Perception.Spatial @@ -1084,26 +1084,26 @@ 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(&self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, - fn get_ForwardDirection(&self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, - fn get_UpDirection(&self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT + fn get_Position(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, + fn get_ForwardDirection(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, + fn get_UpDirection(&self, out: *mut foundation::numerics::Vector3) -> HRESULT }} impl IHeadPose { - #[inline] pub unsafe fn get_position(&self) -> Result { + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_forward_direction(&self) -> Result { + }} + #[inline] pub fn get_forward_direction(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ForwardDirection)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_up_direction(&self) -> Result { + }} + #[inline] pub fn get_up_direction(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UpDirection)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class HeadPose: IHeadPose} } // Windows.Perception.People @@ -1113,20 +1113,20 @@ use ::prelude::*; RT_CLASS!{static class CorePerceptionAutomation} impl RtActivatable for CorePerceptionAutomation {} impl CorePerceptionAutomation { - #[inline] pub fn set_activation_factory_provider(provider: &::rt::gen::windows::foundation::IGetActivationFactory) -> Result<()> { unsafe { + #[inline] pub fn set_activation_factory_provider(provider: &foundation::IGetActivationFactory) -> Result<()> { >::get_activation_factory().set_activation_factory_provider(provider) - }} + } } DEFINE_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]) [CLSID_CorePerceptionAutomation]); 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(&self, provider: *mut ::rt::gen::windows::foundation::IGetActivationFactory) -> HRESULT + fn SetActivationFactoryProvider(&self, provider: *mut foundation::IGetActivationFactory) -> HRESULT }} impl ICorePerceptionAutomationStatics { - #[inline] pub unsafe fn set_activation_factory_provider(&self, provider: &::rt::gen::windows::foundation::IGetActivationFactory) -> Result<()> { + #[inline] pub fn set_activation_factory_provider(&self, provider: &foundation::IGetActivationFactory) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetActivationFactoryProvider)(self as *const _ as *mut _, provider as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } } // Windows.Perception.Automation.Core } // Windows.Perception.Automation diff --git a/src/rt/gen/windows/security.rs b/src/rt/gen/windows/security.rs index 576b4fa..4ea3645 100644 --- a/src/rt/gen/windows/security.rs +++ b/src/rt/gen/windows/security.rs @@ -5,11 +5,11 @@ RT_INTERFACE!{static interface ICredentialFactory(ICredentialFactoryVtbl): IInsp fn CreatePasswordCredential(&self, resource: HSTRING, userName: HSTRING, password: HSTRING, out: *mut *mut PasswordCredential) -> HRESULT }} impl ICredentialFactory { - #[inline] pub unsafe fn create_password_credential(&self, resource: &HStringArg, userName: &HStringArg, password: &HStringArg) -> Result> { + #[inline] pub fn create_password_credential(&self, resource: &HStringArg, userName: &HStringArg, password: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreatePasswordCredential)(self as *const _ as *mut _, resource.get(), userName.get(), password.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IKeyCredential, 2508582797, 17787, 18503, 177, 26, 250, 150, 11, 189, 177, 56); RT_INTERFACE!{interface IKeyCredential(IKeyCredentialVtbl): IInspectable(IInspectableVtbl) [IID_IKeyCredential] { @@ -19,35 +19,35 @@ RT_INTERFACE!{interface IKeyCredential(IKeyCredentialVtbl): IInspectable(IInspec #[cfg(not(feature="windows-storage"))] fn __Dummy2(&self) -> (), #[cfg(feature="windows-storage")] fn RetrievePublicKeyWithBlobType(&self, blobType: super::cryptography::core::CryptographicPublicKeyBlobType, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy3(&self) -> (), - #[cfg(feature="windows-storage")] fn RequestSignAsync(&self, data: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetAttestationAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn RequestSignAsync(&self, data: *mut super::super::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetAttestationAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IKeyCredential { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self 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 retrieve_public_key_with_default_blob_type(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn retrieve_public_key_with_default_blob_type(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RetrievePublicKeyWithDefaultBlobType)(self 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_public_key_with_blob_type(&self, blobType: super::cryptography::core::CryptographicPublicKeyBlobType) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn retrieve_public_key_with_blob_type(&self, blobType: super::cryptography::core::CryptographicPublicKeyBlobType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RetrievePublicKeyWithBlobType)(self 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 request_sign_async(&self, data: &super::super::storage::streams::IBuffer) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn request_sign_async(&self, data: &super::super::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestSignAsync)(self as *const _ as *mut _, 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(&self) -> Result>> { + }} + #[inline] pub fn get_attestation_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAttestationAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class KeyCredential: IKeyCredential} DEFINE_IID!(IID_IKeyCredentialAttestationResult, 2024453025, 41921, 16643, 182, 204, 71, 44, 68, 23, 28, 187); @@ -59,21 +59,21 @@ RT_INTERFACE!{interface IKeyCredentialAttestationResult(IKeyCredentialAttestatio fn get_Status(&self, out: *mut KeyCredentialAttestationStatus) -> HRESULT }} impl IKeyCredentialAttestationResult { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_certificate_chain_buffer(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_certificate_chain_buffer(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CertificateChainBuffer)(self 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_attestation_buffer(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_attestation_buffer(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AttestationBuffer)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class KeyCredentialAttestationResult: IKeyCredentialAttestationResult} RT_ENUM! { enum KeyCredentialAttestationStatus: i32 { @@ -85,57 +85,57 @@ RT_ENUM! { enum KeyCredentialCreationOption: i32 { RT_CLASS!{static class KeyCredentialManager} impl RtActivatable for KeyCredentialManager {} impl KeyCredentialManager { - #[inline] pub fn is_supported_async() -> Result>> { unsafe { + #[inline] pub fn is_supported_async() -> Result>> { >::get_activation_factory().is_supported_async() - }} - #[inline] pub fn renew_attestation_async() -> Result> { unsafe { + } + #[inline] pub fn renew_attestation_async() -> Result> { >::get_activation_factory().renew_attestation_async() - }} - #[inline] pub fn request_create_async(name: &HStringArg, option: KeyCredentialCreationOption) -> Result>> { unsafe { + } + #[inline] pub fn request_create_async(name: &HStringArg, option: KeyCredentialCreationOption) -> Result>> { >::get_activation_factory().request_create_async(name, option) - }} - #[inline] pub fn open_async(name: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn open_async(name: &HStringArg) -> Result>> { >::get_activation_factory().open_async(name) - }} - #[inline] pub fn delete_async(name: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn delete_async(name: &HStringArg) -> Result> { >::get_activation_factory().delete_async(name) - }} + } } DEFINE_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]) [CLSID_KeyCredentialManager]); 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RenewAttestationAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn RequestCreateAsync(&self, name: HSTRING, option: KeyCredentialCreationOption, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn OpenAsync(&self, name: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn DeleteAsync(&self, name: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn IsSupportedAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RenewAttestationAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn RequestCreateAsync(&self, name: HSTRING, option: KeyCredentialCreationOption, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn OpenAsync(&self, name: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn DeleteAsync(&self, name: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IKeyCredentialManagerStatics { - #[inline] pub unsafe fn is_supported_async(&self) -> Result>> { + #[inline] pub fn is_supported_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).IsSupportedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn renew_attestation_async(&self) -> Result> { + }} + #[inline] pub fn renew_attestation_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RenewAttestationAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_create_async(&self, name: &HStringArg, option: KeyCredentialCreationOption) -> Result>> { + }} + #[inline] pub fn request_create_async(&self, name: &HStringArg, option: KeyCredentialCreationOption) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestCreateAsync)(self as *const _ as *mut _, name.get(), option, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn open_async(&self, name: &HStringArg) -> Result>> { + }} + #[inline] pub fn open_async(&self, name: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenAsync)(self as *const _ as *mut _, name.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete_async(&self, name: &HStringArg) -> Result> { + }} + #[inline] pub fn delete_async(&self, name: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteAsync)(self as *const _ as *mut _, name.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IKeyCredentialOperationResult, 4114056897, 21089, 19677, 151, 109, 204, 144, 154, 199, 22, 32); RT_INTERFACE!{interface IKeyCredentialOperationResult(IKeyCredentialOperationResultVtbl): IInspectable(IInspectableVtbl) [IID_IKeyCredentialOperationResult] { @@ -144,16 +144,16 @@ RT_INTERFACE!{interface IKeyCredentialOperationResult(IKeyCredentialOperationRes fn get_Status(&self, out: *mut KeyCredentialStatus) -> HRESULT }} impl IKeyCredentialOperationResult { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_result(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_result(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Result)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class KeyCredentialOperationResult: IKeyCredentialOperationResult} DEFINE_IID!(IID_IKeyCredentialRetrievalResult, 1489860355, 36231, 16969, 155, 88, 246, 89, 140, 201, 100, 78); @@ -162,16 +162,16 @@ RT_INTERFACE!{interface IKeyCredentialRetrievalResult(IKeyCredentialRetrievalRes fn get_Status(&self, out: *mut KeyCredentialStatus) -> HRESULT }} impl IKeyCredentialRetrievalResult { - #[inline] pub unsafe fn get_credential(&self) -> Result> { + #[inline] pub fn get_credential(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Credential)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class KeyCredentialRetrievalResult: IKeyCredentialRetrievalResult} RT_ENUM! { enum KeyCredentialStatus: i32 { @@ -186,56 +186,56 @@ RT_INTERFACE!{interface IPasswordCredential(IPasswordCredentialVtbl): IInspectab fn get_Password(&self, out: *mut HSTRING) -> HRESULT, fn put_Password(&self, password: HSTRING) -> HRESULT, fn RetrievePassword(&self) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::IPropertySet) -> HRESULT + fn get_Properties(&self, out: *mut *mut foundation::collections::IPropertySet) -> HRESULT }} impl IPasswordCredential { - #[inline] pub unsafe fn get_resource(&self) -> Result { + #[inline] pub fn get_resource(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Resource)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_resource(&self, resource: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_resource(&self, resource: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Resource)(self as *const _ as *mut _, resource.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_user_name(&self) -> Result { + }} + #[inline] pub fn get_user_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UserName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_user_name(&self, userName: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_user_name(&self, userName: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_UserName)(self as *const _ as *mut _, userName.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_password(&self) -> Result { + }} + #[inline] pub fn get_password(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Password)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_password(&self, password: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_password(&self, password: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Password)(self as *const _ as *mut _, password.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn retrieve_password(&self) -> Result<()> { + }} + #[inline] pub fn retrieve_password(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RetrievePassword)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result> { + }} + #[inline] pub fn get_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PasswordCredential: IPasswordCredential} impl RtActivatable for PasswordCredential {} impl RtActivatable for PasswordCredential {} impl PasswordCredential { - #[inline] pub fn create_password_credential(resource: &HStringArg, userName: &HStringArg, password: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_password_credential(resource: &HStringArg, userName: &HStringArg, password: &HStringArg) -> Result> { >::get_activation_factory().create_password_credential(resource, userName, password) - }} + } } DEFINE_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]) [CLSID_PasswordCredential]); -RT_CLASS!{class PasswordCredentialPropertyStore: super::super::foundation::collections::IPropertySet} +RT_CLASS!{class PasswordCredentialPropertyStore: foundation::collections::IPropertySet} impl RtActivatable for PasswordCredentialPropertyStore {} DEFINE_CLSID!(PasswordCredentialPropertyStore(&[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,80,114,111,112,101,114,116,121,83,116,111,114,101,0]) [CLSID_PasswordCredentialPropertyStore]); DEFINE_IID!(IID_IPasswordVault, 1643981835, 51412, 18625, 165, 79, 188, 90, 100, 32, 90, 242); @@ -243,39 +243,39 @@ RT_INTERFACE!{interface IPasswordVault(IPasswordVaultVtbl): IInspectable(IInspec fn Add(&self, credential: *mut PasswordCredential) -> HRESULT, fn Remove(&self, credential: *mut PasswordCredential) -> HRESULT, fn Retrieve(&self, resource: HSTRING, userName: HSTRING, out: *mut *mut PasswordCredential) -> HRESULT, - fn FindAllByResource(&self, resource: HSTRING, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn FindAllByUserName(&self, userName: HSTRING, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn RetrieveAll(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn FindAllByResource(&self, resource: HSTRING, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn FindAllByUserName(&self, userName: HSTRING, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn RetrieveAll(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IPasswordVault { - #[inline] pub unsafe fn add(&self, credential: &PasswordCredential) -> Result<()> { + #[inline] pub fn add(&self, credential: &PasswordCredential) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Add)(self as *const _ as *mut _, credential as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove(&self, credential: &PasswordCredential) -> Result<()> { + }} + #[inline] pub fn remove(&self, credential: &PasswordCredential) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Remove)(self as *const _ as *mut _, credential as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn retrieve(&self, resource: &HStringArg, userName: &HStringArg) -> Result> { + }} + #[inline] pub fn retrieve(&self, resource: &HStringArg, userName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Retrieve)(self as *const _ as *mut _, 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(&self, resource: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn find_all_by_resource(&self, resource: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllByResource)(self as *const _ as *mut _, resource.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_all_by_user_name(&self, userName: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn find_all_by_user_name(&self, userName: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllByUserName)(self as *const _ as *mut _, userName.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn retrieve_all(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn retrieve_all(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RetrieveAll)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PasswordVault: IPasswordVault} impl RtActivatable for PasswordVault {} @@ -287,76 +287,76 @@ RT_INTERFACE!{interface IWebAccount(IWebAccountVtbl): IInspectable(IInspectableV fn get_State(&self, out: *mut WebAccountState) -> HRESULT }} impl IWebAccount { - #[inline] pub unsafe fn get_web_account_provider(&self) -> Result> { + #[inline] pub fn get_web_account_provider(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WebAccountProvider)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_user_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_user_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UserName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_state(&self) -> Result { + }} + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class WebAccount: IWebAccount} impl RtActivatable for WebAccount {} impl WebAccount { - #[inline] pub fn create_web_account(webAccountProvider: &WebAccountProvider, userName: &HStringArg, state: WebAccountState) -> Result> { unsafe { + #[inline] pub fn create_web_account(webAccountProvider: &WebAccountProvider, userName: &HStringArg, state: WebAccountState) -> Result> { >::get_activation_factory().create_web_account(webAccountProvider, userName, state) - }} + } } DEFINE_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]) [CLSID_WebAccount]); 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(&self, out: *mut HSTRING) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, + fn get_Properties(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy2(&self) -> (), - #[cfg(feature="windows-storage")] fn GetPictureAsync(&self, desizedSize: WebAccountPictureSize, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn SignOutAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn SignOutWithClientIdAsync(&self, clientId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + #[cfg(feature="windows-storage")] fn GetPictureAsync(&self, desizedSize: WebAccountPictureSize, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn SignOutAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn SignOutWithClientIdAsync(&self, clientId: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IWebAccount2 { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self 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(&self, desizedSize: WebAccountPictureSize) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_picture_async(&self, desizedSize: WebAccountPictureSize) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPictureAsync)(self as *const _ as *mut _, desizedSize, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn sign_out_async(&self) -> Result> { + }} + #[inline] pub fn sign_out_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SignOutAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn sign_out_with_client_id_async(&self, clientId: &HStringArg) -> Result> { + }} + #[inline] pub fn sign_out_with_client_id_async(&self, clientId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SignOutWithClientIdAsync)(self as *const _ as *mut _, clientId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, webAccountProvider: *mut WebAccountProvider, userName: HSTRING, state: WebAccountState, out: *mut *mut WebAccount) -> HRESULT }} impl IWebAccountFactory { - #[inline] pub unsafe fn create_web_account(&self, webAccountProvider: &WebAccountProvider, userName: &HStringArg, state: WebAccountState) -> Result> { + #[inline] pub fn create_web_account(&self, webAccountProvider: &WebAccountProvider, userName: &HStringArg, state: WebAccountState) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWebAccount)(self as *const _ as *mut _, webAccountProvider as *const _ as *mut _, userName.get(), state, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum WebAccountPictureSize: i32 { Size64x64 (WebAccountPictureSize_Size64x64) = 64, Size208x208 (WebAccountPictureSize_Size208x208) = 208, Size424x424 (WebAccountPictureSize_Size424x424) = 424, Size1080x1080 (WebAccountPictureSize_Size1080x1080) = 1080, @@ -365,31 +365,31 @@ DEFINE_IID!(IID_IWebAccountProvider, 702335171, 31417, 19068, 163, 54, 185, 66, RT_INTERFACE!{interface IWebAccountProvider(IWebAccountProviderVtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountProvider] { fn get_Id(&self, out: *mut HSTRING) -> HRESULT, fn get_DisplayName(&self, out: *mut HSTRING) -> HRESULT, - fn get_IconUri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT + fn get_IconUri(&self, out: *mut *mut foundation::Uri) -> HRESULT }} impl IWebAccountProvider { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_icon_uri(&self) -> Result> { + }} + #[inline] pub fn get_icon_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IconUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class WebAccountProvider: IWebAccountProvider} impl RtActivatable for WebAccountProvider {} impl WebAccountProvider { - #[inline] pub fn create_web_account_provider(id: &HStringArg, displayName: &HStringArg, iconUri: &super::super::foundation::Uri) -> Result> { unsafe { + #[inline] pub fn create_web_account_provider(id: &HStringArg, displayName: &HStringArg, iconUri: &foundation::Uri) -> Result> { >::get_activation_factory().create_web_account_provider(id, displayName, iconUri) - }} + } } DEFINE_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]) [CLSID_WebAccountProvider]); DEFINE_IID!(IID_IWebAccountProvider2, 1241639685, 20034, 16852, 181, 24, 224, 8, 165, 22, 54, 20); @@ -398,38 +398,38 @@ RT_INTERFACE!{interface IWebAccountProvider2(IWebAccountProvider2Vtbl): IInspect fn get_Authority(&self, out: *mut HSTRING) -> HRESULT }} impl IWebAccountProvider2 { - #[inline] pub unsafe fn get_display_purpose(&self) -> Result { + #[inline] pub fn get_display_purpose(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayPurpose)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_authority(&self) -> Result { + }} + #[inline] pub fn get_authority(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Authority)(self as *const _ as *mut _, &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(&self, out: *mut *mut super::super::system::User) -> HRESULT }} impl IWebAccountProvider3 { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_user(&self) -> Result> { + #[cfg(feature="windows-system")] #[inline] pub fn get_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_User)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, id: HSTRING, displayName: HSTRING, iconUri: *mut super::super::foundation::Uri, out: *mut *mut WebAccountProvider) -> HRESULT + fn CreateWebAccountProvider(&self, id: HSTRING, displayName: HSTRING, iconUri: *mut foundation::Uri, out: *mut *mut WebAccountProvider) -> HRESULT }} impl IWebAccountProviderFactory { - #[inline] pub unsafe fn create_web_account_provider(&self, id: &HStringArg, displayName: &HStringArg, iconUri: &super::super::foundation::Uri) -> Result> { + #[inline] pub fn create_web_account_provider(&self, id: &HStringArg, displayName: &HStringArg, iconUri: &foundation::Uri) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWebAccountProvider)(self as *const _ as *mut _, id.get(), displayName.get(), iconUri as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum WebAccountState: i32 { None (WebAccountState_None) = 0, Connected (WebAccountState_Connected) = 1, Error (WebAccountState_Error) = 2, @@ -442,15 +442,15 @@ RT_ENUM! { enum AuthenticationProtocol: i32 { RT_CLASS!{static class CredentialPicker} impl RtActivatable for CredentialPicker {} impl CredentialPicker { - #[inline] pub fn pick_with_options_async(options: &CredentialPickerOptions) -> Result>> { unsafe { + #[inline] pub fn pick_with_options_async(options: &CredentialPickerOptions) -> Result>> { >::get_activation_factory().pick_with_options_async(options) - }} - #[inline] pub fn pick_with_message_async(targetName: &HStringArg, message: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn pick_with_message_async(targetName: &HStringArg, message: &HStringArg) -> Result>> { >::get_activation_factory().pick_with_message_async(targetName, message) - }} - #[inline] pub fn pick_with_caption_async(targetName: &HStringArg, message: &HStringArg, caption: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn pick_with_caption_async(targetName: &HStringArg, message: &HStringArg, caption: &HStringArg) -> Result>> { >::get_activation_factory().pick_with_caption_async(targetName, message, caption) - }} + } } DEFINE_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]) [CLSID_CredentialPicker]); DEFINE_IID!(IID_ICredentialPickerOptions, 2522483532, 38394, 18047, 153, 43, 11, 34, 229, 133, 155, 246); @@ -479,96 +479,96 @@ RT_INTERFACE!{interface ICredentialPickerOptions(ICredentialPickerOptionsVtbl): fn get_CredentialSaveOption(&self, out: *mut CredentialSaveOption) -> HRESULT }} impl ICredentialPickerOptions { - #[inline] pub unsafe fn set_caption(&self, value: &HStringArg) -> Result<()> { + #[inline] pub fn set_caption(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Caption)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_caption(&self) -> Result { + }} + #[inline] pub fn get_caption(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Caption)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_message(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_message(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Message)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_message(&self) -> Result { + }} + #[inline] pub fn get_message(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Message)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_error_code(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_error_code(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ErrorCode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_error_code(&self) -> Result { + }} + #[inline] pub fn get_error_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ErrorCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_target_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_target_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TargetName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_target_name(&self) -> Result { + }} + #[inline] pub fn get_target_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TargetName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_authentication_protocol(&self, value: AuthenticationProtocol) -> Result<()> { + }} + #[inline] pub fn set_authentication_protocol(&self, value: AuthenticationProtocol) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AuthenticationProtocol)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_authentication_protocol(&self) -> Result { + }} + #[inline] pub fn get_authentication_protocol(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AuthenticationProtocol)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_custom_authentication_protocol(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_custom_authentication_protocol(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CustomAuthenticationProtocol)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_custom_authentication_protocol(&self) -> Result { + }} + #[inline] pub fn get_custom_authentication_protocol(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CustomAuthenticationProtocol)(self 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 set_previous_credential(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_previous_credential(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PreviousCredential)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_previous_credential(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_previous_credential(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PreviousCredential)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_always_display_dialog(&self, value: bool) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_always_display_dialog(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AlwaysDisplayDialog)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_always_display_dialog(&self) -> Result { + }} + #[inline] pub fn get_always_display_dialog(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AlwaysDisplayDialog)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_caller_saves_credential(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_caller_saves_credential(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CallerSavesCredential)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_caller_saves_credential(&self) -> Result { + }} + #[inline] pub fn get_caller_saves_credential(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CallerSavesCredential)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_credential_save_option(&self, value: CredentialSaveOption) -> Result<()> { + }} + #[inline] pub fn set_credential_save_option(&self, value: CredentialSaveOption) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CredentialSaveOption)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_credential_save_option(&self) -> Result { + }} + #[inline] pub fn get_credential_save_option(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CredentialSaveOption)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class CredentialPickerOptions: ICredentialPickerOptions} impl RtActivatable for CredentialPickerOptions {} @@ -585,65 +585,65 @@ RT_INTERFACE!{interface ICredentialPickerResults(ICredentialPickerResultsVtbl): fn get_CredentialPassword(&self, out: *mut HSTRING) -> HRESULT }} impl ICredentialPickerResults { - #[inline] pub unsafe fn get_error_code(&self) -> Result { + #[inline] pub fn get_error_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ErrorCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_credential_save_option(&self) -> Result { + }} + #[inline] pub fn get_credential_save_option(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CredentialSaveOption)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_credential_saved(&self) -> Result { + }} + #[inline] pub fn get_credential_saved(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CredentialSaved)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_credential(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_credential(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Credential)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_credential_domain_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_credential_domain_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CredentialDomainName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_credential_user_name(&self) -> Result { + }} + #[inline] pub fn get_credential_user_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CredentialUserName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_credential_password(&self) -> Result { + }} + #[inline] pub fn get_credential_password(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CredentialPassword)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class CredentialPickerResults: ICredentialPickerResults} 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(&self, options: *mut CredentialPickerOptions, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn PickWithMessageAsync(&self, targetName: HSTRING, message: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn PickWithCaptionAsync(&self, targetName: HSTRING, message: HSTRING, caption: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn PickWithOptionsAsync(&self, options: *mut CredentialPickerOptions, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn PickWithMessageAsync(&self, targetName: HSTRING, message: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn PickWithCaptionAsync(&self, targetName: HSTRING, message: HSTRING, caption: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ICredentialPickerStatics { - #[inline] pub unsafe fn pick_with_options_async(&self, options: &CredentialPickerOptions) -> Result>> { + #[inline] pub fn pick_with_options_async(&self, options: &CredentialPickerOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PickWithOptionsAsync)(self 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 pick_with_message_async(&self, targetName: &HStringArg, message: &HStringArg) -> Result>> { + }} + #[inline] pub fn pick_with_message_async(&self, targetName: &HStringArg, message: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PickWithMessageAsync)(self as *const _ as *mut _, 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(&self, targetName: &HStringArg, message: &HStringArg, caption: &HStringArg) -> Result>> { + }} + #[inline] pub fn pick_with_caption_async(&self, targetName: &HStringArg, message: &HStringArg, caption: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PickWithCaptionAsync)(self as *const _ as *mut _, targetName.get(), message.get(), caption.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum CredentialSaveOption: i32 { Unselected (CredentialSaveOption_Unselected) = 0, Selected (CredentialSaveOption_Selected) = 1, Hidden (CredentialSaveOption_Hidden) = 2, @@ -654,12 +654,12 @@ RT_ENUM! { enum UserConsentVerificationResult: i32 { RT_CLASS!{static class UserConsentVerifier} impl RtActivatable for UserConsentVerifier {} impl UserConsentVerifier { - #[inline] pub fn check_availability_async() -> Result>> { unsafe { + #[inline] pub fn check_availability_async() -> Result>> { >::get_activation_factory().check_availability_async() - }} - #[inline] pub fn request_verification_async(message: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn request_verification_async(message: &HStringArg) -> Result>> { >::get_activation_factory().request_verification_async(message) - }} + } } DEFINE_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]) [CLSID_UserConsentVerifier]); RT_ENUM! { enum UserConsentVerifierAvailability: i32 { @@ -667,20 +667,20 @@ RT_ENUM! { enum UserConsentVerifierAvailability: i32 { }} 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(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn RequestVerificationAsync(&self, message: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn CheckAvailabilityAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestVerificationAsync(&self, message: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IUserConsentVerifierStatics { - #[inline] pub unsafe fn check_availability_async(&self) -> Result>> { + #[inline] pub fn check_availability_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CheckAvailabilityAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_verification_async(&self, message: &HStringArg) -> Result>> { + }} + #[inline] pub fn request_verification_async(&self, message: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestVerificationAsync)(self as *const _ as *mut _, message.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } } // Windows.Security.Credentials.UI } // Windows.Security.Credentials @@ -696,50 +696,50 @@ RT_INTERFACE!{interface IEnterpriseKeyCredentialRegistrationInfo(IEnterpriseKeyC fn get_KeyName(&self, out: *mut HSTRING) -> HRESULT }} impl IEnterpriseKeyCredentialRegistrationInfo { - #[inline] pub unsafe fn get_tenant_id(&self) -> Result { + #[inline] pub fn get_tenant_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TenantId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_tenant_name(&self) -> Result { + }} + #[inline] pub fn get_tenant_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TenantName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_subject(&self) -> Result { + }} + #[inline] pub fn get_subject(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Subject)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_key_id(&self) -> Result { + }} + #[inline] pub fn get_key_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_KeyId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_key_name(&self) -> Result { + }} + #[inline] pub fn get_key_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_KeyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class EnterpriseKeyCredentialRegistrationInfo: IEnterpriseKeyCredentialRegistrationInfo} 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(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT + fn GetRegistrationsAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IEnterpriseKeyCredentialRegistrationManager { - #[inline] pub unsafe fn get_registrations_async(&self) -> Result>>> { + #[inline] pub fn get_registrations_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetRegistrationsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class EnterpriseKeyCredentialRegistrationManager: IEnterpriseKeyCredentialRegistrationManager} impl RtActivatable for EnterpriseKeyCredentialRegistrationManager {} impl EnterpriseKeyCredentialRegistrationManager { - #[inline] pub fn get_current() -> Result> { unsafe { + #[inline] pub fn get_current() -> Result>> { >::get_activation_factory().get_current() - }} + } } DEFINE_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]) [CLSID_EnterpriseKeyCredentialRegistrationManager]); DEFINE_IID!(IID_IEnterpriseKeyCredentialRegistrationManagerStatics, 2008571550, 44276, 19392, 186, 194, 64, 187, 70, 239, 187, 63); @@ -747,11 +747,11 @@ RT_INTERFACE!{static interface IEnterpriseKeyCredentialRegistrationManagerStatic fn get_Current(&self, out: *mut *mut EnterpriseKeyCredentialRegistrationManager) -> HRESULT }} impl IEnterpriseKeyCredentialRegistrationManagerStatics { - #[inline] pub unsafe fn get_current(&self) -> Result> { + #[inline] pub fn get_current(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Current)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } pub mod provider { // Windows.Security.Authentication.Identity.Provider use ::prelude::*; @@ -766,59 +766,59 @@ RT_INTERFACE!{interface ISecondaryAuthenticationFactorAuthentication(ISecondaryA #[cfg(not(feature="windows-storage"))] fn __Dummy3(&self) -> (), #[cfg(feature="windows-storage")] fn get_DeviceConfigurationData(&self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy4(&self) -> (), - #[cfg(feature="windows-storage")] fn FinishAuthenticationAsync(&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(&self, errorLogMessage: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + #[cfg(feature="windows-storage")] fn FinishAuthenticationAsync(&self, deviceHmac: *mut ::rt::gen::windows::storage::streams::IBuffer, sessionHmac: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn AbortAuthenticationAsync(&self, errorLogMessage: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl ISecondaryAuthenticationFactorAuthentication { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_service_authentication_hmac(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_service_authentication_hmac(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServiceAuthenticationHmac)(self 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_session_nonce(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_session_nonce(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SessionNonce)(self 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_device_nonce(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_device_nonce(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceNonce)(self 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_device_configuration_data(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_device_configuration_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceConfigurationData)(self 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 finish_authentication_async(&self, deviceHmac: &::rt::gen::windows::storage::streams::IBuffer, sessionHmac: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn finish_authentication_async(&self, deviceHmac: &::rt::gen::windows::storage::streams::IBuffer, sessionHmac: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FinishAuthenticationAsync)(self as *const _ as *mut _, 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(&self, errorLogMessage: &HStringArg) -> Result> { + }} + #[inline] pub fn abort_authentication_async(&self, errorLogMessage: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AbortAuthenticationAsync)(self as *const _ as *mut _, errorLogMessage.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class SecondaryAuthenticationFactorAuthentication: ISecondaryAuthenticationFactorAuthentication} impl RtActivatable for SecondaryAuthenticationFactorAuthentication {} impl SecondaryAuthenticationFactorAuthentication { - #[inline] pub fn show_notification_message_async(deviceName: &HStringArg, message: SecondaryAuthenticationFactorAuthenticationMessage) -> Result> { unsafe { + #[inline] pub fn show_notification_message_async(deviceName: &HStringArg, message: SecondaryAuthenticationFactorAuthenticationMessage) -> Result> { >::get_activation_factory().show_notification_message_async(deviceName, message) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn start_authentication_async(deviceId: &HStringArg, serviceAuthenticationNonce: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn start_authentication_async(deviceId: &HStringArg, serviceAuthenticationNonce: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { >::get_activation_factory().start_authentication_async(deviceId, serviceAuthenticationNonce) - }} - #[inline] pub fn add_authentication_stage_changed(handler: &::rt::gen::windows::foundation::EventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { unsafe { + } + #[inline] pub fn add_authentication_stage_changed(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_authentication_stage_changed(handler) - }} - #[inline] pub fn remove_authentication_stage_changed(token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_authentication_stage_changed(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_authentication_stage_changed(token) - }} - #[inline] pub fn get_authentication_stage_info_async() -> Result>> { unsafe { + } + #[inline] pub fn get_authentication_stage_info_async() -> Result>> { >::get_activation_factory().get_authentication_stage_info_async() - }} + } } DEFINE_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]) [CLSID_SecondaryAuthenticationFactorAuthentication]); RT_ENUM! { enum SecondaryAuthenticationFactorAuthenticationMessage: i32 { @@ -830,16 +830,16 @@ RT_INTERFACE!{interface ISecondaryAuthenticationFactorAuthenticationResult(ISeco fn get_Authentication(&self, out: *mut *mut SecondaryAuthenticationFactorAuthentication) -> HRESULT }} impl ISecondaryAuthenticationFactorAuthenticationResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_authentication(&self) -> Result> { + }} + #[inline] pub fn get_authentication(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Authentication)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SecondaryAuthenticationFactorAuthenticationResult: ISecondaryAuthenticationFactorAuthenticationResult} RT_ENUM! { enum SecondaryAuthenticationFactorAuthenticationScenario: i32 { @@ -853,11 +853,11 @@ RT_INTERFACE!{interface ISecondaryAuthenticationFactorAuthenticationStageChanged fn get_StageInfo(&self, out: *mut *mut SecondaryAuthenticationFactorAuthenticationStageInfo) -> HRESULT }} impl ISecondaryAuthenticationFactorAuthenticationStageChangedEventArgs { - #[inline] pub unsafe fn get_stage_info(&self) -> Result> { + #[inline] pub fn get_stage_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StageInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SecondaryAuthenticationFactorAuthenticationStageChangedEventArgs: ISecondaryAuthenticationFactorAuthenticationStageChangedEventArgs} DEFINE_IID!(IID_ISecondaryAuthenticationFactorAuthenticationStageInfo, 1459536523, 59562, 19471, 142, 76, 165, 89, 231, 58, 221, 136); @@ -867,57 +867,57 @@ RT_INTERFACE!{interface ISecondaryAuthenticationFactorAuthenticationStageInfo(IS fn get_DeviceId(&self, out: *mut HSTRING) -> HRESULT }} impl ISecondaryAuthenticationFactorAuthenticationStageInfo { - #[inline] pub unsafe fn get_stage(&self) -> Result { + #[inline] pub fn get_stage(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Stage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_scenario(&self) -> Result { + }} + #[inline] pub fn get_scenario(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Scenario)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_id(&self) -> Result { + }} + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class SecondaryAuthenticationFactorAuthenticationStageInfo: ISecondaryAuthenticationFactorAuthenticationStageInfo} 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(&self, deviceName: HSTRING, message: SecondaryAuthenticationFactorAuthenticationMessage, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn ShowNotificationMessageAsync(&self, deviceName: HSTRING, message: SecondaryAuthenticationFactorAuthenticationMessage, out: *mut *mut foundation::IAsyncAction) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-storage")] fn StartAuthenticationAsync(&self, deviceId: HSTRING, serviceAuthenticationNonce: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn add_AuthenticationStageChanged(&self, handler: *mut ::rt::gen::windows::foundation::EventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AuthenticationStageChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn GetAuthenticationStageInfoAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn StartAuthenticationAsync(&self, deviceId: HSTRING, serviceAuthenticationNonce: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_AuthenticationStageChanged(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AuthenticationStageChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn GetAuthenticationStageInfoAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ISecondaryAuthenticationFactorAuthenticationStatics { - #[inline] pub unsafe fn show_notification_message_async(&self, deviceName: &HStringArg, message: SecondaryAuthenticationFactorAuthenticationMessage) -> Result> { + #[inline] pub fn show_notification_message_async(&self, deviceName: &HStringArg, message: SecondaryAuthenticationFactorAuthenticationMessage) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowNotificationMessageAsync)(self as *const _ as *mut _, 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(&self, deviceId: &HStringArg, serviceAuthenticationNonce: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn start_authentication_async(&self, deviceId: &HStringArg, serviceAuthenticationNonce: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartAuthenticationAsync)(self as *const _ as *mut _, 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(&self, handler: &::rt::gen::windows::foundation::EventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_authentication_stage_changed(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AuthenticationStageChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_authentication_stage_changed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_authentication_stage_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AuthenticationStageChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_authentication_stage_info_async(&self) -> Result>> { + }} + #[inline] pub fn get_authentication_stage_info_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAuthenticationStageInfoAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -936,33 +936,33 @@ RT_ENUM! { enum SecondaryAuthenticationFactorDevicePresenceMonitoringMode: i32 { }} DEFINE_IID!(IID_ISecondaryAuthenticationFactorDevicePresenceMonitoringRegistrationStatics, 2420742681, 32498, 17699, 149, 28, 164, 23, 162, 74, 207, 147); RT_INTERFACE!{static interface ISecondaryAuthenticationFactorDevicePresenceMonitoringRegistrationStatics(ISecondaryAuthenticationFactorDevicePresenceMonitoringRegistrationStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ISecondaryAuthenticationFactorDevicePresenceMonitoringRegistrationStatics] { - fn RegisterDevicePresenceMonitoringAsync(&self, deviceId: HSTRING, deviceInstancePath: HSTRING, monitoringMode: SecondaryAuthenticationFactorDevicePresenceMonitoringMode, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn RegisterDevicePresenceMonitoringAsync(&self, deviceId: HSTRING, deviceInstancePath: HSTRING, monitoringMode: SecondaryAuthenticationFactorDevicePresenceMonitoringMode, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-storage")] fn RegisterDevicePresenceMonitoringWithNewDeviceAsync(&self, deviceId: HSTRING, deviceInstancePath: HSTRING, monitoringMode: SecondaryAuthenticationFactorDevicePresenceMonitoringMode, deviceFriendlyName: HSTRING, deviceModelNumber: HSTRING, deviceConfigurationData: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn UnregisterDevicePresenceMonitoringAsync(&self, deviceId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + #[cfg(feature="windows-storage")] fn RegisterDevicePresenceMonitoringWithNewDeviceAsync(&self, deviceId: HSTRING, deviceInstancePath: HSTRING, monitoringMode: SecondaryAuthenticationFactorDevicePresenceMonitoringMode, deviceFriendlyName: HSTRING, deviceModelNumber: HSTRING, deviceConfigurationData: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn UnregisterDevicePresenceMonitoringAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn IsDevicePresenceMonitoringSupported(&self, out: *mut bool) -> HRESULT }} impl ISecondaryAuthenticationFactorDevicePresenceMonitoringRegistrationStatics { - #[inline] pub unsafe fn register_device_presence_monitoring_async(&self, deviceId: &HStringArg, deviceInstancePath: &HStringArg, monitoringMode: SecondaryAuthenticationFactorDevicePresenceMonitoringMode) -> Result>> { + #[inline] pub fn register_device_presence_monitoring_async(&self, deviceId: &HStringArg, deviceInstancePath: &HStringArg, monitoringMode: SecondaryAuthenticationFactorDevicePresenceMonitoringMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RegisterDevicePresenceMonitoringAsync)(self as *const _ as *mut _, deviceId.get(), deviceInstancePath.get(), monitoringMode, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn register_device_presence_monitoring_with_new_device_async(&self, deviceId: &HStringArg, deviceInstancePath: &HStringArg, monitoringMode: SecondaryAuthenticationFactorDevicePresenceMonitoringMode, deviceFriendlyName: &HStringArg, deviceModelNumber: &HStringArg, deviceConfigurationData: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn register_device_presence_monitoring_with_new_device_async(&self, deviceId: &HStringArg, deviceInstancePath: &HStringArg, monitoringMode: SecondaryAuthenticationFactorDevicePresenceMonitoringMode, deviceFriendlyName: &HStringArg, deviceModelNumber: &HStringArg, deviceConfigurationData: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RegisterDevicePresenceMonitoringWithNewDeviceAsync)(self as *const _ as *mut _, deviceId.get(), deviceInstancePath.get(), monitoringMode, deviceFriendlyName.get(), deviceModelNumber.get(), deviceConfigurationData as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn unregister_device_presence_monitoring_async(&self, deviceId: &HStringArg) -> Result> { + }} + #[inline] pub fn unregister_device_presence_monitoring_async(&self, deviceId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UnregisterDevicePresenceMonitoringAsync)(self as *const _ as *mut _, deviceId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn is_device_presence_monitoring_supported(&self) -> Result { + }} + #[inline] pub fn is_device_presence_monitoring_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsDevicePresenceMonitoringSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum SecondaryAuthenticationFactorDevicePresenceMonitoringRegistrationStatus: i32 { Unsupported (SecondaryAuthenticationFactorDevicePresenceMonitoringRegistrationStatus_Unsupported) = 0, Succeeded (SecondaryAuthenticationFactorDevicePresenceMonitoringRegistrationStatus_Succeeded) = 1, DisabledByPolicy (SecondaryAuthenticationFactorDevicePresenceMonitoringRegistrationStatus_DisabledByPolicy) = 2, @@ -978,97 +978,97 @@ RT_INTERFACE!{interface ISecondaryAuthenticationFactorInfo(ISecondaryAuthenticat #[cfg(feature="windows-storage")] fn get_DeviceConfigurationData(&self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT }} impl ISecondaryAuthenticationFactorInfo { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_friendly_name(&self) -> Result { + }} + #[inline] pub fn get_device_friendly_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceFriendlyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_model_number(&self) -> Result { + }} + #[inline] pub fn get_device_model_number(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceModelNumber)(self 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 get_device_configuration_data(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_device_configuration_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceConfigurationData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SecondaryAuthenticationFactorInfo: ISecondaryAuthenticationFactorInfo} DEFINE_IID!(IID_ISecondaryAuthenticationFactorInfo2, 349798819, 64550, 20471, 171, 195, 72, 232, 42, 81, 42, 10); RT_INTERFACE!{interface ISecondaryAuthenticationFactorInfo2(ISecondaryAuthenticationFactorInfo2Vtbl): IInspectable(IInspectableVtbl) [IID_ISecondaryAuthenticationFactorInfo2] { fn get_PresenceMonitoringMode(&self, out: *mut SecondaryAuthenticationFactorDevicePresenceMonitoringMode) -> HRESULT, - fn UpdateDevicePresenceAsync(&self, presenceState: SecondaryAuthenticationFactorDevicePresence, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn UpdateDevicePresenceAsync(&self, presenceState: SecondaryAuthenticationFactorDevicePresence, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn get_IsAuthenticationSupported(&self, out: *mut bool) -> HRESULT }} impl ISecondaryAuthenticationFactorInfo2 { - #[inline] pub unsafe fn get_presence_monitoring_mode(&self) -> Result { + #[inline] pub fn get_presence_monitoring_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PresenceMonitoringMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn update_device_presence_async(&self, presenceState: SecondaryAuthenticationFactorDevicePresence) -> Result> { + }} + #[inline] pub fn update_device_presence_async(&self, presenceState: SecondaryAuthenticationFactorDevicePresence) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UpdateDevicePresenceAsync)(self as *const _ as *mut _, presenceState, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_authentication_supported(&self) -> Result { + }} + #[inline] pub fn get_is_authentication_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsAuthenticationSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self) -> (), - #[cfg(feature="windows-storage")] fn FinishRegisteringDeviceAsync(&self, deviceConfigurationData: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn AbortRegisteringDeviceAsync(&self, errorLogMessage: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + #[cfg(feature="windows-storage")] fn FinishRegisteringDeviceAsync(&self, deviceConfigurationData: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn AbortRegisteringDeviceAsync(&self, errorLogMessage: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl ISecondaryAuthenticationFactorRegistration { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn finish_registering_device_async(&self, deviceConfigurationData: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn finish_registering_device_async(&self, deviceConfigurationData: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FinishRegisteringDeviceAsync)(self as *const _ as *mut _, 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(&self, errorLogMessage: &HStringArg) -> Result> { + }} + #[inline] pub fn abort_registering_device_async(&self, errorLogMessage: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AbortRegisteringDeviceAsync)(self as *const _ as *mut _, errorLogMessage.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class SecondaryAuthenticationFactorRegistration: ISecondaryAuthenticationFactorRegistration} impl RtActivatable for SecondaryAuthenticationFactorRegistration {} impl RtActivatable for SecondaryAuthenticationFactorRegistration {} impl SecondaryAuthenticationFactorRegistration { - #[inline] pub fn register_device_presence_monitoring_async(deviceId: &HStringArg, deviceInstancePath: &HStringArg, monitoringMode: SecondaryAuthenticationFactorDevicePresenceMonitoringMode) -> Result>> { unsafe { + #[inline] pub fn register_device_presence_monitoring_async(deviceId: &HStringArg, deviceInstancePath: &HStringArg, monitoringMode: SecondaryAuthenticationFactorDevicePresenceMonitoringMode) -> Result>> { >::get_activation_factory().register_device_presence_monitoring_async(deviceId, deviceInstancePath, monitoringMode) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn register_device_presence_monitoring_with_new_device_async(deviceId: &HStringArg, deviceInstancePath: &HStringArg, monitoringMode: SecondaryAuthenticationFactorDevicePresenceMonitoringMode, deviceFriendlyName: &HStringArg, deviceModelNumber: &HStringArg, deviceConfigurationData: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn register_device_presence_monitoring_with_new_device_async(deviceId: &HStringArg, deviceInstancePath: &HStringArg, monitoringMode: SecondaryAuthenticationFactorDevicePresenceMonitoringMode, deviceFriendlyName: &HStringArg, deviceModelNumber: &HStringArg, deviceConfigurationData: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { >::get_activation_factory().register_device_presence_monitoring_with_new_device_async(deviceId, deviceInstancePath, monitoringMode, deviceFriendlyName, deviceModelNumber, deviceConfigurationData) - }} - #[inline] pub fn unregister_device_presence_monitoring_async(deviceId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn unregister_device_presence_monitoring_async(deviceId: &HStringArg) -> Result> { >::get_activation_factory().unregister_device_presence_monitoring_async(deviceId) - }} - #[inline] pub fn is_device_presence_monitoring_supported() -> Result { unsafe { + } + #[inline] pub fn is_device_presence_monitoring_supported() -> Result { >::get_activation_factory().is_device_presence_monitoring_supported() - }} - #[cfg(feature="windows-storage")] #[inline] pub fn request_start_registering_device_async(deviceId: &HStringArg, capabilities: SecondaryAuthenticationFactorDeviceCapabilities, deviceFriendlyName: &HStringArg, deviceModelNumber: &HStringArg, deviceKey: &::rt::gen::windows::storage::streams::IBuffer, mutualAuthenticationKey: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn request_start_registering_device_async(deviceId: &HStringArg, capabilities: SecondaryAuthenticationFactorDeviceCapabilities, deviceFriendlyName: &HStringArg, deviceModelNumber: &HStringArg, deviceKey: &::rt::gen::windows::storage::streams::IBuffer, mutualAuthenticationKey: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { >::get_activation_factory().request_start_registering_device_async(deviceId, capabilities, deviceFriendlyName, deviceModelNumber, deviceKey, mutualAuthenticationKey) - }} - #[inline] pub fn find_all_registered_device_info_async(queryType: SecondaryAuthenticationFactorDeviceFindScope) -> Result>>> { unsafe { + } + #[inline] pub fn find_all_registered_device_info_async(queryType: SecondaryAuthenticationFactorDeviceFindScope) -> Result>>> { >::get_activation_factory().find_all_registered_device_info_async(queryType) - }} - #[inline] pub fn unregister_device_async(deviceId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn unregister_device_async(deviceId: &HStringArg) -> Result> { >::get_activation_factory().unregister_device_async(deviceId) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn update_device_configuration_data_async(deviceId: &HStringArg, deviceConfigurationData: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn update_device_configuration_data_async(deviceId: &HStringArg, deviceConfigurationData: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { >::get_activation_factory().update_device_configuration_data_async(deviceId, deviceConfigurationData) - }} + } } DEFINE_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]) [CLSID_SecondaryAuthenticationFactorRegistration]); DEFINE_IID!(IID_ISecondaryAuthenticationFactorRegistrationResult, 2768123376, 44515, 18817, 175, 107, 236, 25, 89, 33, 104, 42); @@ -1077,46 +1077,46 @@ RT_INTERFACE!{interface ISecondaryAuthenticationFactorRegistrationResult(ISecond fn get_Registration(&self, out: *mut *mut SecondaryAuthenticationFactorRegistration) -> HRESULT }} impl ISecondaryAuthenticationFactorRegistrationResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_registration(&self) -> Result> { + }} + #[inline] pub fn get_registration(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Registration)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SecondaryAuthenticationFactorRegistrationResult: ISecondaryAuthenticationFactorRegistrationResult} 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(&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(&self, queryType: SecondaryAuthenticationFactorDeviceFindScope, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, - fn UnregisterDeviceAsync(&self, deviceId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - #[cfg(feature="windows-storage")] fn UpdateDeviceConfigurationDataAsync(&self, deviceId: HSTRING, deviceConfigurationData: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + #[cfg(feature="windows-storage")] fn RequestStartRegisteringDeviceAsync(&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 foundation::IAsyncOperation) -> HRESULT, + fn FindAllRegisteredDeviceInfoAsync(&self, queryType: SecondaryAuthenticationFactorDeviceFindScope, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn UnregisterDeviceAsync(&self, deviceId: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + #[cfg(feature="windows-storage")] fn UpdateDeviceConfigurationDataAsync(&self, deviceId: HSTRING, deviceConfigurationData: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl ISecondaryAuthenticationFactorRegistrationStatics { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn request_start_registering_device_async(&self, deviceId: &HStringArg, capabilities: SecondaryAuthenticationFactorDeviceCapabilities, deviceFriendlyName: &HStringArg, deviceModelNumber: &HStringArg, deviceKey: &::rt::gen::windows::storage::streams::IBuffer, mutualAuthenticationKey: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn request_start_registering_device_async(&self, deviceId: &HStringArg, capabilities: SecondaryAuthenticationFactorDeviceCapabilities, deviceFriendlyName: &HStringArg, deviceModelNumber: &HStringArg, deviceKey: &::rt::gen::windows::storage::streams::IBuffer, mutualAuthenticationKey: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestStartRegisteringDeviceAsync)(self as *const _ as *mut _, 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(&self, queryType: SecondaryAuthenticationFactorDeviceFindScope) -> Result>>> { + }} + #[inline] pub fn find_all_registered_device_info_async(&self, queryType: SecondaryAuthenticationFactorDeviceFindScope) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllRegisteredDeviceInfoAsync)(self as *const _ as *mut _, queryType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn unregister_device_async(&self, deviceId: &HStringArg) -> Result> { + }} + #[inline] pub fn unregister_device_async(&self, deviceId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UnregisterDeviceAsync)(self as *const _ as *mut _, 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(&self, deviceId: &HStringArg, deviceConfigurationData: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn update_device_configuration_data_async(&self, deviceId: &HStringArg, deviceConfigurationData: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UpdateDeviceConfigurationDataAsync)(self as *const _ as *mut _, deviceId.get(), deviceConfigurationData as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -1126,75 +1126,75 @@ pub mod core { // Windows.Security.Authentication.Identity.Core use ::prelude::*; 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(&self, userAccountId: HSTRING, codeLength: u32, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn AddDeviceAsync(&self, userAccountId: HSTRING, authenticationToken: HSTRING, wnsChannelId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn RemoveDeviceAsync(&self, userAccountId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn UpdateWnsChannelAsync(&self, userAccountId: HSTRING, channelUri: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn GetSessionsAsync(&self, userAccountIdList: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn GetSessionsAndUnregisteredAccountsAsync(&self, userAccountIdList: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn ApproveSessionUsingAuthSessionInfoAsync(&self, sessionAuthentictionStatus: MicrosoftAccountMultiFactorSessionAuthenticationStatus, authenticationSessionInfo: *mut MicrosoftAccountMultiFactorSessionInfo, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn ApproveSessionAsync(&self, sessionAuthentictionStatus: MicrosoftAccountMultiFactorSessionAuthenticationStatus, userAccountId: HSTRING, sessionId: HSTRING, sessionAuthenticationType: MicrosoftAccountMultiFactorAuthenticationType, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn DenySessionUsingAuthSessionInfoAsync(&self, authenticationSessionInfo: *mut MicrosoftAccountMultiFactorSessionInfo, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn DenySessionAsync(&self, userAccountId: HSTRING, sessionId: HSTRING, sessionAuthenticationType: MicrosoftAccountMultiFactorAuthenticationType, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn GetOneTimePassCodeAsync(&self, userAccountId: HSTRING, codeLength: u32, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn AddDeviceAsync(&self, userAccountId: HSTRING, authenticationToken: HSTRING, wnsChannelId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RemoveDeviceAsync(&self, userAccountId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn UpdateWnsChannelAsync(&self, userAccountId: HSTRING, channelUri: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetSessionsAsync(&self, userAccountIdList: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetSessionsAndUnregisteredAccountsAsync(&self, userAccountIdList: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ApproveSessionUsingAuthSessionInfoAsync(&self, sessionAuthentictionStatus: MicrosoftAccountMultiFactorSessionAuthenticationStatus, authenticationSessionInfo: *mut MicrosoftAccountMultiFactorSessionInfo, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ApproveSessionAsync(&self, sessionAuthentictionStatus: MicrosoftAccountMultiFactorSessionAuthenticationStatus, userAccountId: HSTRING, sessionId: HSTRING, sessionAuthenticationType: MicrosoftAccountMultiFactorAuthenticationType, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn DenySessionUsingAuthSessionInfoAsync(&self, authenticationSessionInfo: *mut MicrosoftAccountMultiFactorSessionInfo, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn DenySessionAsync(&self, userAccountId: HSTRING, sessionId: HSTRING, sessionAuthenticationType: MicrosoftAccountMultiFactorAuthenticationType, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IMicrosoftAccountMultiFactorAuthenticationManager { - #[inline] pub unsafe fn get_one_time_pass_code_async(&self, userAccountId: &HStringArg, codeLength: u32) -> Result>> { + #[inline] pub fn get_one_time_pass_code_async(&self, userAccountId: &HStringArg, codeLength: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetOneTimePassCodeAsync)(self as *const _ as *mut _, userAccountId.get(), codeLength, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_device_async(&self, userAccountId: &HStringArg, authenticationToken: &HStringArg, wnsChannelId: &HStringArg) -> Result>> { + }} + #[inline] pub fn add_device_async(&self, userAccountId: &HStringArg, authenticationToken: &HStringArg, wnsChannelId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AddDeviceAsync)(self as *const _ as *mut _, 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(&self, userAccountId: &HStringArg) -> Result>> { + }} + #[inline] pub fn remove_device_async(&self, userAccountId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RemoveDeviceAsync)(self as *const _ as *mut _, userAccountId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn update_wns_channel_async(&self, userAccountId: &HStringArg, channelUri: &HStringArg) -> Result>> { + }} + #[inline] pub fn update_wns_channel_async(&self, userAccountId: &HStringArg, channelUri: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UpdateWnsChannelAsync)(self as *const _ as *mut _, userAccountId.get(), channelUri.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sessions_async(&self, userAccountIdList: &::rt::gen::windows::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn get_sessions_async(&self, userAccountIdList: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSessionsAsync)(self as *const _ as *mut _, 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(&self, userAccountIdList: &::rt::gen::windows::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn get_sessions_and_unregistered_accounts_async(&self, userAccountIdList: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSessionsAndUnregisteredAccountsAsync)(self as *const _ as *mut _, 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(&self, sessionAuthentictionStatus: MicrosoftAccountMultiFactorSessionAuthenticationStatus, authenticationSessionInfo: &MicrosoftAccountMultiFactorSessionInfo) -> Result>> { + }} + #[inline] pub fn approve_session_using_auth_session_info_async(&self, sessionAuthentictionStatus: MicrosoftAccountMultiFactorSessionAuthenticationStatus, authenticationSessionInfo: &MicrosoftAccountMultiFactorSessionInfo) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ApproveSessionUsingAuthSessionInfoAsync)(self as *const _ as *mut _, 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(&self, sessionAuthentictionStatus: MicrosoftAccountMultiFactorSessionAuthenticationStatus, userAccountId: &HStringArg, sessionId: &HStringArg, sessionAuthenticationType: MicrosoftAccountMultiFactorAuthenticationType) -> Result>> { + }} + #[inline] pub fn approve_session_async(&self, sessionAuthentictionStatus: MicrosoftAccountMultiFactorSessionAuthenticationStatus, userAccountId: &HStringArg, sessionId: &HStringArg, sessionAuthenticationType: MicrosoftAccountMultiFactorAuthenticationType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ApproveSessionAsync)(self as *const _ as *mut _, 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(&self, authenticationSessionInfo: &MicrosoftAccountMultiFactorSessionInfo) -> Result>> { + }} + #[inline] pub fn deny_session_using_auth_session_info_async(&self, authenticationSessionInfo: &MicrosoftAccountMultiFactorSessionInfo) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DenySessionUsingAuthSessionInfoAsync)(self as *const _ as *mut _, 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(&self, userAccountId: &HStringArg, sessionId: &HStringArg, sessionAuthenticationType: MicrosoftAccountMultiFactorAuthenticationType) -> Result>> { + }} + #[inline] pub fn deny_session_async(&self, userAccountId: &HStringArg, sessionId: &HStringArg, sessionAuthenticationType: MicrosoftAccountMultiFactorAuthenticationType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DenySessionAsync)(self as *const _ as *mut _, userAccountId.get(), sessionId.get(), sessionAuthenticationType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class MicrosoftAccountMultiFactorAuthenticationManager: IMicrosoftAccountMultiFactorAuthenticationManager} impl RtActivatable for MicrosoftAccountMultiFactorAuthenticationManager {} impl MicrosoftAccountMultiFactorAuthenticationManager { - #[inline] pub fn get_current() -> Result> { unsafe { + #[inline] pub fn get_current() -> Result>> { >::get_activation_factory().get_current() - }} + } } DEFINE_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]) [CLSID_MicrosoftAccountMultiFactorAuthenticationManager]); RT_ENUM! { enum MicrosoftAccountMultiFactorAuthenticationType: i32 { @@ -1205,58 +1205,58 @@ RT_INTERFACE!{static interface IMicrosoftAccountMultiFactorAuthenticatorStatics( fn get_Current(&self, out: *mut *mut MicrosoftAccountMultiFactorAuthenticationManager) -> HRESULT }} impl IMicrosoftAccountMultiFactorAuthenticatorStatics { - #[inline] pub unsafe fn get_current(&self) -> Result> { + #[inline] pub fn get_current(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Current)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_Sessions(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_ServiceResponse(&self, out: *mut MicrosoftAccountMultiFactorServiceResponse) -> HRESULT }} impl IMicrosoftAccountMultiFactorGetSessionsResult { - #[inline] pub unsafe fn get_sessions(&self) -> Result>> { + #[inline] pub fn get_sessions(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Sessions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_response(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_service_response(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ServiceResponse)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MicrosoftAccountMultiFactorGetSessionsResult: IMicrosoftAccountMultiFactorGetSessionsResult} 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(&self, out: *mut HSTRING) -> HRESULT, - fn get_TimeInterval(&self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn get_TimeToLive(&self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_TimeInterval(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_TimeToLive(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn get_ServiceResponse(&self, out: *mut MicrosoftAccountMultiFactorServiceResponse) -> HRESULT }} impl IMicrosoftAccountMultiFactorOneTimeCodedInfo { - #[inline] pub unsafe fn get_code(&self) -> Result { + #[inline] pub fn get_code(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Code)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_time_interval(&self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + }} + #[inline] pub fn get_time_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TimeInterval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_time_to_live(&self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + }} + #[inline] pub fn get_time_to_live(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TimeToLive)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_response(&self) -> Result { + }} + #[inline] pub fn get_service_response(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ServiceResponse)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MicrosoftAccountMultiFactorOneTimeCodedInfo: IMicrosoftAccountMultiFactorOneTimeCodedInfo} RT_ENUM! { enum MicrosoftAccountMultiFactorServiceResponse: i32 { @@ -1275,69 +1275,69 @@ RT_INTERFACE!{interface IMicrosoftAccountMultiFactorSessionInfo(IMicrosoftAccoun fn get_DisplaySessionId(&self, out: *mut HSTRING) -> HRESULT, fn get_ApprovalStatus(&self, out: *mut MicrosoftAccountMultiFactorSessionApprovalStatus) -> HRESULT, fn get_AuthenticationType(&self, out: *mut MicrosoftAccountMultiFactorAuthenticationType) -> HRESULT, - fn get_RequestTime(&self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, - fn get_ExpirationTime(&self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT + fn get_RequestTime(&self, out: *mut foundation::DateTime) -> HRESULT, + fn get_ExpirationTime(&self, out: *mut foundation::DateTime) -> HRESULT }} impl IMicrosoftAccountMultiFactorSessionInfo { - #[inline] pub unsafe fn get_user_account_id(&self) -> Result { + #[inline] pub fn get_user_account_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UserAccountId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_session_id(&self) -> Result { + }} + #[inline] pub fn get_session_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SessionId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_session_id(&self) -> Result { + }} + #[inline] pub fn get_display_session_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplaySessionId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_approval_status(&self) -> Result { + }} + #[inline] pub fn get_approval_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ApprovalStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_authentication_type(&self) -> Result { + }} + #[inline] pub fn get_authentication_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AuthenticationType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_request_time(&self) -> Result<::rt::gen::windows::foundation::DateTime> { + }} + #[inline] pub fn get_request_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RequestTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_expiration_time(&self) -> Result<::rt::gen::windows::foundation::DateTime> { + }} + #[inline] pub fn get_expiration_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExpirationTime)(self as *const _ as *mut _, &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(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn get_UnregisteredAccounts(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_Sessions(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_UnregisteredAccounts(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_ServiceResponse(&self, out: *mut MicrosoftAccountMultiFactorServiceResponse) -> HRESULT }} impl IMicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo { - #[inline] pub unsafe fn get_sessions(&self) -> Result>> { + #[inline] pub fn get_sessions(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Sessions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_unregistered_accounts(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_unregistered_accounts(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UnregisteredAccounts)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_response(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_service_response(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ServiceResponse)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo: IMicrosoftAccountMultiFactorUnregisteredAccountsAndSessionInfo} } // Windows.Security.Authentication.Identity.Core @@ -1350,7 +1350,7 @@ RT_ENUM! { enum CredentialPromptType: i32 { 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(&self, request: *mut OnlineIdServiceTicketRequest, out: *mut *mut UserAuthenticationOperation) -> HRESULT, - fn AuthenticateUserAsyncAdvanced(&self, requests: *mut ::rt::gen::windows::foundation::collections::IIterable, credentialPromptType: CredentialPromptType, out: *mut *mut UserAuthenticationOperation) -> HRESULT, + fn AuthenticateUserAsyncAdvanced(&self, requests: *mut foundation::collections::IIterable, credentialPromptType: CredentialPromptType, out: *mut *mut UserAuthenticationOperation) -> HRESULT, fn SignOutUserAsync(&self, out: *mut *mut SignOutUserOperation) -> HRESULT, fn put_ApplicationId(&self, value: Guid) -> HRESULT, fn get_ApplicationId(&self, out: *mut Guid) -> HRESULT, @@ -1358,40 +1358,40 @@ RT_INTERFACE!{interface IOnlineIdAuthenticator(IOnlineIdAuthenticatorVtbl): IIns fn get_AuthenticatedSafeCustomerId(&self, out: *mut HSTRING) -> HRESULT }} impl IOnlineIdAuthenticator { - #[inline] pub unsafe fn authenticate_user_async(&self, request: &OnlineIdServiceTicketRequest) -> Result> { + #[inline] pub fn authenticate_user_async(&self, request: &OnlineIdServiceTicketRequest) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AuthenticateUserAsync)(self as *const _ as *mut _, 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(&self, requests: &::rt::gen::windows::foundation::collections::IIterable, credentialPromptType: CredentialPromptType) -> Result> { + }} + #[inline] pub fn authenticate_user_async_advanced(&self, requests: &foundation::collections::IIterable, credentialPromptType: CredentialPromptType) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AuthenticateUserAsyncAdvanced)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[inline] pub fn sign_out_user_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SignOutUserAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_application_id(&self, value: Guid) -> Result<()> { + }} + #[inline] pub fn set_application_id(&self, value: Guid) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ApplicationId)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_application_id(&self) -> Result { + }} + #[inline] pub fn get_application_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ApplicationId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_sign_out(&self) -> Result { + }} + #[inline] pub fn get_can_sign_out(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanSignOut)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_authenticated_safe_customer_id(&self) -> Result { + }} + #[inline] pub fn get_authenticated_safe_customer_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AuthenticatedSafeCustomerId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class OnlineIdAuthenticator: IOnlineIdAuthenticator} impl RtActivatable for OnlineIdAuthenticator {} @@ -1403,21 +1403,21 @@ RT_INTERFACE!{interface IOnlineIdServiceTicket(IOnlineIdServiceTicketVtbl): IIns fn get_ErrorCode(&self, out: *mut i32) -> HRESULT }} impl IOnlineIdServiceTicket { - #[inline] pub unsafe fn get_value(&self) -> Result { + #[inline] pub fn get_value(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_request(&self) -> Result> { + }} + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_error_code(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_error_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ErrorCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class OnlineIdServiceTicket: IOnlineIdServiceTicket} DEFINE_IID!(IID_IOnlineIdServiceTicketRequest, 695485907, 64355, 16693, 137, 9, 78, 53, 76, 6, 20, 102); @@ -1426,26 +1426,26 @@ RT_INTERFACE!{interface IOnlineIdServiceTicketRequest(IOnlineIdServiceTicketRequ fn get_Policy(&self, out: *mut HSTRING) -> HRESULT }} impl IOnlineIdServiceTicketRequest { - #[inline] pub unsafe fn get_service(&self) -> Result { + #[inline] pub fn get_service(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Service)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_policy(&self) -> Result { + }} + #[inline] pub fn get_policy(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Policy)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class OnlineIdServiceTicketRequest: IOnlineIdServiceTicketRequest} impl RtActivatable for OnlineIdServiceTicketRequest {} impl OnlineIdServiceTicketRequest { - #[inline] pub fn create_online_id_service_ticket_request(service: &HStringArg, policy: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_online_id_service_ticket_request(service: &HStringArg, policy: &HStringArg) -> Result> { >::get_activation_factory().create_online_id_service_ticket_request(service, policy) - }} - #[inline] pub fn create_online_id_service_ticket_request_advanced(service: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_online_id_service_ticket_request_advanced(service: &HStringArg) -> Result> { >::get_activation_factory().create_online_id_service_ticket_request_advanced(service) - }} + } } DEFINE_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]) [CLSID_OnlineIdServiceTicketRequest]); DEFINE_IID!(IID_IOnlineIdServiceTicketRequestFactory, 3199928840, 40563, 16503, 150, 20, 8, 97, 76, 11, 194, 69); @@ -1454,55 +1454,55 @@ RT_INTERFACE!{static interface IOnlineIdServiceTicketRequestFactory(IOnlineIdSer fn CreateOnlineIdServiceTicketRequestAdvanced(&self, service: HSTRING, out: *mut *mut OnlineIdServiceTicketRequest) -> HRESULT }} impl IOnlineIdServiceTicketRequestFactory { - #[inline] pub unsafe fn create_online_id_service_ticket_request(&self, service: &HStringArg, policy: &HStringArg) -> Result> { + #[inline] pub fn create_online_id_service_ticket_request(&self, service: &HStringArg, policy: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateOnlineIdServiceTicketRequest)(self as *const _ as *mut _, 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(&self, service: &HStringArg) -> Result> { + }} + #[inline] pub fn create_online_id_service_ticket_request_advanced(&self, service: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateOnlineIdServiceTicketRequestAdvanced)(self as *const _ as *mut _, service.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class OnlineIdSystemAuthenticator} impl RtActivatable for OnlineIdSystemAuthenticator {} impl OnlineIdSystemAuthenticator { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} - #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &::rt::gen::windows::system::User) -> Result> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &::rt::gen::windows::system::User) -> Result>> { >::get_activation_factory().get_for_user(user) - }} + } } DEFINE_CLSID!(OnlineIdSystemAuthenticator(&[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,121,115,116,101,109,65,117,116,104,101,110,116,105,99,97,116,111,114,0]) [CLSID_OnlineIdSystemAuthenticator]); DEFINE_IID!(IID_IOnlineIdSystemAuthenticatorForUser, 1469628155, 7652, 16774, 162, 230, 181, 99, 248, 106, 175, 68); RT_INTERFACE!{interface IOnlineIdSystemAuthenticatorForUser(IOnlineIdSystemAuthenticatorForUserVtbl): IInspectable(IInspectableVtbl) [IID_IOnlineIdSystemAuthenticatorForUser] { - fn GetTicketAsync(&self, request: *mut OnlineIdServiceTicketRequest, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn GetTicketAsync(&self, request: *mut OnlineIdServiceTicketRequest, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn put_ApplicationId(&self, value: Guid) -> HRESULT, fn get_ApplicationId(&self, out: *mut Guid) -> HRESULT, #[cfg(feature="windows-system")] fn get_User(&self, out: *mut *mut ::rt::gen::windows::system::User) -> HRESULT }} impl IOnlineIdSystemAuthenticatorForUser { - #[inline] pub unsafe fn get_ticket_async(&self, request: &OnlineIdServiceTicketRequest) -> Result>> { + #[inline] pub fn get_ticket_async(&self, request: &OnlineIdServiceTicketRequest) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetTicketAsync)(self as *const _ as *mut _, request as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_application_id(&self, value: Guid) -> Result<()> { + }} + #[inline] pub fn set_application_id(&self, value: Guid) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ApplicationId)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_application_id(&self) -> Result { + }} + #[inline] pub fn get_application_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ApplicationId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_user(&self) -> Result> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_User)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class OnlineIdSystemAuthenticatorForUser: IOnlineIdSystemAuthenticatorForUser} DEFINE_IID!(IID_IOnlineIdSystemAuthenticatorStatics, 2231662482, 63028, 16867, 150, 164, 81, 100, 233, 2, 199, 64); @@ -1511,16 +1511,16 @@ RT_INTERFACE!{static interface IOnlineIdSystemAuthenticatorStatics(IOnlineIdSyst #[cfg(feature="windows-system")] fn GetForUser(&self, user: *mut ::rt::gen::windows::system::User, out: *mut *mut OnlineIdSystemAuthenticatorForUser) -> HRESULT }} impl IOnlineIdSystemAuthenticatorStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Default)(self 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 get_for_user(&self, user: &::rt::gen::windows::system::User) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(&self, user: &::rt::gen::windows::system::User) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForUser)(self as *const _ as *mut _, user as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IOnlineIdSystemIdentity, 1950142989, 46794, 17229, 129, 36, 83, 234, 18, 104, 83, 7); RT_INTERFACE!{interface IOnlineIdSystemIdentity(IOnlineIdSystemIdentityVtbl): IInspectable(IInspectableVtbl) [IID_IOnlineIdSystemIdentity] { @@ -1528,50 +1528,50 @@ RT_INTERFACE!{interface IOnlineIdSystemIdentity(IOnlineIdSystemIdentityVtbl): II fn get_Id(&self, out: *mut HSTRING) -> HRESULT }} impl IOnlineIdSystemIdentity { - #[inline] pub unsafe fn get_ticket(&self) -> Result> { + #[inline] pub fn get_ticket(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Ticket)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class OnlineIdSystemIdentity: IOnlineIdSystemIdentity} DEFINE_IID!(IID_IOnlineIdSystemTicketResult, 3674890232, 45208, 19149, 157, 19, 158, 100, 6, 82, 181, 182); RT_INTERFACE!{interface IOnlineIdSystemTicketResult(IOnlineIdSystemTicketResultVtbl): IInspectable(IInspectableVtbl) [IID_IOnlineIdSystemTicketResult] { fn get_Identity(&self, out: *mut *mut OnlineIdSystemIdentity) -> HRESULT, fn get_Status(&self, out: *mut OnlineIdSystemTicketStatus) -> HRESULT, - fn get_ExtendedError(&self, out: *mut ::rt::gen::windows::foundation::HResult) -> HRESULT + fn get_ExtendedError(&self, out: *mut foundation::HResult) -> HRESULT }} impl IOnlineIdSystemTicketResult { - #[inline] pub unsafe fn get_identity(&self) -> Result> { + #[inline] pub fn get_identity(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Identity)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_error(&self) -> Result<::rt::gen::windows::foundation::HResult> { + }} + #[inline] pub fn get_extended_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class OnlineIdSystemTicketResult: IOnlineIdSystemTicketResult} RT_ENUM! { enum OnlineIdSystemTicketStatus: i32 { Success (OnlineIdSystemTicketStatus_Success) = 0, Error (OnlineIdSystemTicketStatus_Error) = 1, ServiceConnectionError (OnlineIdSystemTicketStatus_ServiceConnectionError) = 2, }} -RT_CLASS!{class SignOutUserOperation: ::rt::gen::windows::foundation::IAsyncAction} -RT_CLASS!{class UserAuthenticationOperation: ::rt::gen::windows::foundation::IAsyncOperation} +RT_CLASS!{class SignOutUserOperation: foundation::IAsyncAction} +RT_CLASS!{class UserAuthenticationOperation: foundation::IAsyncOperation} 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(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_Tickets(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_Id(&self, out: *mut HSTRING) -> HRESULT, fn get_SafeCustomerId(&self, out: *mut HSTRING) -> HRESULT, fn get_SignInName(&self, out: *mut HSTRING) -> HRESULT, @@ -1581,46 +1581,46 @@ RT_INTERFACE!{interface IUserIdentity(IUserIdentityVtbl): IInspectable(IInspecta fn get_IsConfirmedPC(&self, out: *mut bool) -> HRESULT }} impl IUserIdentity { - #[inline] pub unsafe fn get_tickets(&self) -> Result>> { + #[inline] pub fn get_tickets(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Tickets)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_safe_customer_id(&self) -> Result { + }} + #[inline] pub fn get_safe_customer_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SafeCustomerId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sign_in_name(&self) -> Result { + }} + #[inline] pub fn get_sign_in_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SignInName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_first_name(&self) -> Result { + }} + #[inline] pub fn get_first_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FirstName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_last_name(&self) -> Result { + }} + #[inline] pub fn get_last_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LastName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_beta_account(&self) -> Result { + }} + #[inline] pub fn get_is_beta_account(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsBetaAccount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_confirmed_pc(&self) -> Result { + }} + #[inline] pub fn get_is_confirmed_pc(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsConfirmedPC)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class UserIdentity: IUserIdentity} } // Windows.Security.Authentication.OnlineId @@ -1633,86 +1633,86 @@ RT_CLASS!{static class WebAuthenticationBroker} impl RtActivatable for WebAuthenticationBroker {} impl RtActivatable for WebAuthenticationBroker {} impl WebAuthenticationBroker { - #[inline] pub fn authenticate_with_callback_uri_async(options: WebAuthenticationOptions, requestUri: &::rt::gen::windows::foundation::Uri, callbackUri: &::rt::gen::windows::foundation::Uri) -> Result>> { unsafe { + #[inline] pub fn authenticate_with_callback_uri_async(options: WebAuthenticationOptions, requestUri: &foundation::Uri, callbackUri: &foundation::Uri) -> Result>> { >::get_activation_factory().authenticate_with_callback_uri_async(options, requestUri, callbackUri) - }} - #[inline] pub fn authenticate_without_callback_uri_async(options: WebAuthenticationOptions, requestUri: &::rt::gen::windows::foundation::Uri) -> Result>> { unsafe { + } + #[inline] pub fn authenticate_without_callback_uri_async(options: WebAuthenticationOptions, requestUri: &foundation::Uri) -> Result>> { >::get_activation_factory().authenticate_without_callback_uri_async(options, requestUri) - }} - #[inline] pub fn get_current_application_callback_uri() -> Result> { unsafe { + } + #[inline] pub fn get_current_application_callback_uri() -> Result>> { >::get_activation_factory().get_current_application_callback_uri() - }} - #[inline] pub fn authenticate_and_continue(requestUri: &::rt::gen::windows::foundation::Uri) -> Result<()> { unsafe { + } + #[inline] pub fn authenticate_and_continue(requestUri: &foundation::Uri) -> Result<()> { >::get_activation_factory().authenticate_and_continue(requestUri) - }} - #[inline] pub fn authenticate_with_callback_uri_and_continue(requestUri: &::rt::gen::windows::foundation::Uri, callbackUri: &::rt::gen::windows::foundation::Uri) -> Result<()> { unsafe { + } + #[inline] pub fn authenticate_with_callback_uri_and_continue(requestUri: &foundation::Uri, callbackUri: &foundation::Uri) -> Result<()> { >::get_activation_factory().authenticate_with_callback_uri_and_continue(requestUri, callbackUri) - }} - #[inline] pub fn authenticate_with_callback_uri_continuation_data_and_options_and_continue(requestUri: &::rt::gen::windows::foundation::Uri, callbackUri: &::rt::gen::windows::foundation::Uri, continuationData: &::rt::gen::windows::foundation::collections::ValueSet, options: WebAuthenticationOptions) -> Result<()> { unsafe { + } + #[inline] pub fn authenticate_with_callback_uri_continuation_data_and_options_and_continue(requestUri: &foundation::Uri, callbackUri: &foundation::Uri, continuationData: &foundation::collections::ValueSet, options: WebAuthenticationOptions) -> Result<()> { >::get_activation_factory().authenticate_with_callback_uri_continuation_data_and_options_and_continue(requestUri, callbackUri, continuationData, options) - }} - #[inline] pub fn authenticate_silently_async(requestUri: &::rt::gen::windows::foundation::Uri) -> Result>> { unsafe { + } + #[inline] pub fn authenticate_silently_async(requestUri: &foundation::Uri) -> Result>> { >::get_activation_factory().authenticate_silently_async(requestUri) - }} - #[inline] pub fn authenticate_silently_with_options_async(requestUri: &::rt::gen::windows::foundation::Uri, options: WebAuthenticationOptions) -> Result>> { unsafe { + } + #[inline] pub fn authenticate_silently_with_options_async(requestUri: &foundation::Uri, options: WebAuthenticationOptions) -> Result>> { >::get_activation_factory().authenticate_silently_with_options_async(requestUri, options) - }} + } } DEFINE_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]) [CLSID_WebAuthenticationBroker]); 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(&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(&self, options: WebAuthenticationOptions, requestUri: *mut ::rt::gen::windows::foundation::Uri, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn GetCurrentApplicationCallbackUri(&self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT + fn AuthenticateWithCallbackUriAsync(&self, options: WebAuthenticationOptions, requestUri: *mut foundation::Uri, callbackUri: *mut foundation::Uri, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn AuthenticateWithoutCallbackUriAsync(&self, options: WebAuthenticationOptions, requestUri: *mut foundation::Uri, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetCurrentApplicationCallbackUri(&self, out: *mut *mut foundation::Uri) -> HRESULT }} impl IWebAuthenticationBrokerStatics { - #[inline] pub unsafe fn authenticate_with_callback_uri_async(&self, options: WebAuthenticationOptions, requestUri: &::rt::gen::windows::foundation::Uri, callbackUri: &::rt::gen::windows::foundation::Uri) -> Result>> { + #[inline] pub fn authenticate_with_callback_uri_async(&self, options: WebAuthenticationOptions, requestUri: &foundation::Uri, callbackUri: &foundation::Uri) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AuthenticateWithCallbackUriAsync)(self as *const _ as *mut _, 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(&self, options: WebAuthenticationOptions, requestUri: &::rt::gen::windows::foundation::Uri) -> Result>> { + }} + #[inline] pub fn authenticate_without_callback_uri_async(&self, options: WebAuthenticationOptions, requestUri: &foundation::Uri) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AuthenticateWithoutCallbackUriAsync)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[inline] pub fn get_current_application_callback_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentApplicationCallbackUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, requestUri: *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, - fn AuthenticateWithCallbackUriAndContinue(&self, requestUri: *mut ::rt::gen::windows::foundation::Uri, callbackUri: *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, - fn AuthenticateWithCallbackUriContinuationDataAndOptionsAndContinue(&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(&self, requestUri: *mut ::rt::gen::windows::foundation::Uri, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn AuthenticateSilentlyWithOptionsAsync(&self, requestUri: *mut ::rt::gen::windows::foundation::Uri, options: WebAuthenticationOptions, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn AuthenticateAndContinue(&self, requestUri: *mut foundation::Uri) -> HRESULT, + fn AuthenticateWithCallbackUriAndContinue(&self, requestUri: *mut foundation::Uri, callbackUri: *mut foundation::Uri) -> HRESULT, + fn AuthenticateWithCallbackUriContinuationDataAndOptionsAndContinue(&self, requestUri: *mut foundation::Uri, callbackUri: *mut foundation::Uri, continuationData: *mut foundation::collections::ValueSet, options: WebAuthenticationOptions) -> HRESULT, + fn AuthenticateSilentlyAsync(&self, requestUri: *mut foundation::Uri, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn AuthenticateSilentlyWithOptionsAsync(&self, requestUri: *mut foundation::Uri, options: WebAuthenticationOptions, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IWebAuthenticationBrokerStatics2 { - #[inline] pub unsafe fn authenticate_and_continue(&self, requestUri: &::rt::gen::windows::foundation::Uri) -> Result<()> { + #[inline] pub fn authenticate_and_continue(&self, requestUri: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AuthenticateAndContinue)(self as *const _ as *mut _, requestUri as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn authenticate_with_callback_uri_and_continue(&self, requestUri: &::rt::gen::windows::foundation::Uri, callbackUri: &::rt::gen::windows::foundation::Uri) -> Result<()> { + }} + #[inline] pub fn authenticate_with_callback_uri_and_continue(&self, requestUri: &foundation::Uri, callbackUri: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AuthenticateWithCallbackUriAndContinue)(self as *const _ as *mut _, 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(&self, requestUri: &::rt::gen::windows::foundation::Uri, callbackUri: &::rt::gen::windows::foundation::Uri, continuationData: &::rt::gen::windows::foundation::collections::ValueSet, options: WebAuthenticationOptions) -> Result<()> { + }} + #[inline] pub fn authenticate_with_callback_uri_continuation_data_and_options_and_continue(&self, requestUri: &foundation::Uri, callbackUri: &foundation::Uri, continuationData: &foundation::collections::ValueSet, options: WebAuthenticationOptions) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AuthenticateWithCallbackUriContinuationDataAndOptionsAndContinue)(self as *const _ as *mut _, 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(&self, requestUri: &::rt::gen::windows::foundation::Uri) -> Result>> { + }} + #[inline] pub fn authenticate_silently_async(&self, requestUri: &foundation::Uri) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AuthenticateSilentlyAsync)(self as *const _ as *mut _, 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(&self, requestUri: &::rt::gen::windows::foundation::Uri, options: WebAuthenticationOptions) -> Result>> { + }} + #[inline] pub fn authenticate_silently_with_options_async(&self, requestUri: &foundation::Uri, options: WebAuthenticationOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AuthenticateSilentlyWithOptionsAsync)(self as *const _ as *mut _, requestUri as *const _ as *mut _, options, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -1724,21 +1724,21 @@ RT_INTERFACE!{interface IWebAuthenticationResult(IWebAuthenticationResultVtbl): fn get_ResponseErrorDetail(&self, out: *mut u32) -> HRESULT }} impl IWebAuthenticationResult { - #[inline] pub unsafe fn get_response_data(&self) -> Result { + #[inline] pub fn get_response_data(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResponseData)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_response_status(&self) -> Result { + }} + #[inline] pub fn get_response_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ResponseStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_response_error_detail(&self) -> Result { + }} + #[inline] pub fn get_response_error_detail(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ResponseErrorDetail)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class WebAuthenticationResult: IWebAuthenticationResult} RT_ENUM! { enum WebAuthenticationStatus: i32 { @@ -1748,54 +1748,54 @@ pub mod provider { // Windows.Security.Authentication.Web.Provider use ::prelude::*; 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(&self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn get_ApplicationCallbackUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, fn get_Type(&self, out: *mut WebAccountClientViewType) -> HRESULT, fn get_AccountPairwiseId(&self, out: *mut HSTRING) -> HRESULT }} impl IWebAccountClientView { - #[inline] pub unsafe fn get_application_callback_uri(&self) -> Result> { + #[inline] pub fn get_application_callback_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ApplicationCallbackUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_type(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Type)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_account_pairwise_id(&self) -> Result { + }} + #[inline] pub fn get_account_pairwise_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AccountPairwiseId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class WebAccountClientView: IWebAccountClientView} impl RtActivatable for WebAccountClientView {} impl WebAccountClientView { - #[inline] pub fn create(viewType: WebAccountClientViewType, applicationCallbackUri: &::rt::gen::windows::foundation::Uri) -> Result> { unsafe { + #[inline] pub fn create(viewType: WebAccountClientViewType, applicationCallbackUri: &foundation::Uri) -> Result> { >::get_activation_factory().create(viewType, applicationCallbackUri) - }} - #[inline] pub fn create_with_pairwise_id(viewType: WebAccountClientViewType, applicationCallbackUri: &::rt::gen::windows::foundation::Uri, accountPairwiseId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_with_pairwise_id(viewType: WebAccountClientViewType, applicationCallbackUri: &foundation::Uri, accountPairwiseId: &HStringArg) -> Result> { >::get_activation_factory().create_with_pairwise_id(viewType, applicationCallbackUri, accountPairwiseId) - }} + } } DEFINE_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]) [CLSID_WebAccountClientView]); 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(&self, viewType: WebAccountClientViewType, applicationCallbackUri: *mut ::rt::gen::windows::foundation::Uri, out: *mut *mut WebAccountClientView) -> HRESULT, - fn CreateWithPairwiseId(&self, viewType: WebAccountClientViewType, applicationCallbackUri: *mut ::rt::gen::windows::foundation::Uri, accountPairwiseId: HSTRING, out: *mut *mut WebAccountClientView) -> HRESULT + fn Create(&self, viewType: WebAccountClientViewType, applicationCallbackUri: *mut foundation::Uri, out: *mut *mut WebAccountClientView) -> HRESULT, + fn CreateWithPairwiseId(&self, viewType: WebAccountClientViewType, applicationCallbackUri: *mut foundation::Uri, accountPairwiseId: HSTRING, out: *mut *mut WebAccountClientView) -> HRESULT }} impl IWebAccountClientViewFactory { - #[inline] pub unsafe fn create(&self, viewType: WebAccountClientViewType, applicationCallbackUri: &::rt::gen::windows::foundation::Uri) -> Result> { + #[inline] pub fn create(&self, viewType: WebAccountClientViewType, applicationCallbackUri: &foundation::Uri) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, 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(&self, viewType: WebAccountClientViewType, applicationCallbackUri: &::rt::gen::windows::foundation::Uri, accountPairwiseId: &HStringArg) -> Result> { + }} + #[inline] pub fn create_with_pairwise_id(&self, viewType: WebAccountClientViewType, applicationCallbackUri: &foundation::Uri, accountPairwiseId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithPairwiseId)(self as *const _ as *mut _, viewType, applicationCallbackUri as *const _ as *mut _, accountPairwiseId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum WebAccountClientViewType: i32 { IdOnly (WebAccountClientViewType_IdOnly) = 0, IdAndProperties (WebAccountClientViewType_IdAndProperties) = 1, @@ -1808,242 +1808,242 @@ impl RtActivatable for WebAccountManager {} impl RtActivatable for WebAccountManager {} impl RtActivatable for WebAccountManager {} impl WebAccountManager { - #[inline] pub fn update_web_account_properties_async(webAccount: &super::super::super::credentials::WebAccount, webAccountUserName: &HStringArg, additionalProperties: &::rt::gen::windows::foundation::collections::IMapView) -> Result> { unsafe { + #[inline] pub fn update_web_account_properties_async(webAccount: &super::super::super::credentials::WebAccount, webAccountUserName: &HStringArg, additionalProperties: &foundation::collections::IMapView) -> Result> { >::get_activation_factory().update_web_account_properties_async(webAccount, webAccountUserName, additionalProperties) - }} - #[inline] pub fn add_web_account_async(webAccountId: &HStringArg, webAccountUserName: &HStringArg, props: &::rt::gen::windows::foundation::collections::IMapView) -> Result>> { unsafe { + } + #[inline] pub fn add_web_account_async(webAccountId: &HStringArg, webAccountUserName: &HStringArg, props: &foundation::collections::IMapView) -> Result>> { >::get_activation_factory().add_web_account_async(webAccountId, webAccountUserName, props) - }} - #[inline] pub fn delete_web_account_async(webAccount: &super::super::super::credentials::WebAccount) -> Result> { unsafe { + } + #[inline] pub fn delete_web_account_async(webAccount: &super::super::super::credentials::WebAccount) -> Result> { >::get_activation_factory().delete_web_account_async(webAccount) - }} - #[inline] pub fn find_all_provider_web_accounts_async() -> Result>>> { unsafe { + } + #[inline] pub fn find_all_provider_web_accounts_async() -> Result>>> { >::get_activation_factory().find_all_provider_web_accounts_async() - }} - #[cfg(feature="windows-web")] #[inline] pub fn push_cookies_async(uri: &::rt::gen::windows::foundation::Uri, cookies: &::rt::gen::windows::foundation::collections::IVectorView<::rt::gen::windows::web::http::HttpCookie>) -> Result> { unsafe { + } + #[cfg(feature="windows-web")] #[inline] pub fn push_cookies_async(uri: &foundation::Uri, cookies: &foundation::collections::IVectorView<::rt::gen::windows::web::http::HttpCookie>) -> Result> { >::get_activation_factory().push_cookies_async(uri, cookies) - }} - #[inline] pub fn set_view_async(webAccount: &super::super::super::credentials::WebAccount, view: &WebAccountClientView) -> Result> { unsafe { + } + #[inline] pub fn set_view_async(webAccount: &super::super::super::credentials::WebAccount, view: &WebAccountClientView) -> Result> { >::get_activation_factory().set_view_async(webAccount, view) - }} - #[inline] pub fn clear_view_async(webAccount: &super::super::super::credentials::WebAccount, applicationCallbackUri: &::rt::gen::windows::foundation::Uri) -> Result> { unsafe { + } + #[inline] pub fn clear_view_async(webAccount: &super::super::super::credentials::WebAccount, applicationCallbackUri: &foundation::Uri) -> Result> { >::get_activation_factory().clear_view_async(webAccount, applicationCallbackUri) - }} - #[inline] pub fn get_views_async(webAccount: &super::super::super::credentials::WebAccount) -> Result>>> { unsafe { + } + #[inline] pub fn get_views_async(webAccount: &super::super::super::credentials::WebAccount) -> Result>>> { >::get_activation_factory().get_views_async(webAccount) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn set_web_account_picture_async(webAccount: &super::super::super::credentials::WebAccount, webAccountPicture: &::rt::gen::windows::storage::streams::IRandomAccessStream) -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn set_web_account_picture_async(webAccount: &super::super::super::credentials::WebAccount, webAccountPicture: &::rt::gen::windows::storage::streams::IRandomAccessStream) -> Result> { >::get_activation_factory().set_web_account_picture_async(webAccount, webAccountPicture) - }} - #[inline] pub fn clear_web_account_picture_async(webAccount: &super::super::super::credentials::WebAccount) -> Result> { unsafe { + } + #[inline] pub fn clear_web_account_picture_async(webAccount: &super::super::super::credentials::WebAccount) -> Result> { >::get_activation_factory().clear_web_account_picture_async(webAccount) - }} - #[inline] pub fn pull_cookies_async(uriString: &HStringArg, callerPFN: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn pull_cookies_async(uriString: &HStringArg, callerPFN: &HStringArg) -> Result> { >::get_activation_factory().pull_cookies_async(uriString, callerPFN) - }} - #[cfg(feature="windows-system")] #[inline] pub fn find_all_provider_web_accounts_for_user_async(user: &::rt::gen::windows::system::User) -> Result>>> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn find_all_provider_web_accounts_for_user_async(user: &::rt::gen::windows::system::User) -> Result>>> { >::get_activation_factory().find_all_provider_web_accounts_for_user_async(user) - }} - #[cfg(feature="windows-system")] #[inline] pub fn add_web_account_for_user_async(user: &::rt::gen::windows::system::User, webAccountId: &HStringArg, webAccountUserName: &HStringArg, props: &::rt::gen::windows::foundation::collections::IMapView) -> Result>> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn add_web_account_for_user_async(user: &::rt::gen::windows::system::User, webAccountId: &HStringArg, webAccountUserName: &HStringArg, props: &foundation::collections::IMapView) -> Result>> { >::get_activation_factory().add_web_account_for_user_async(user, webAccountId, webAccountUserName, props) - }} - #[cfg(feature="windows-system")] #[inline] pub fn add_web_account_with_scope_for_user_async(user: &::rt::gen::windows::system::User, webAccountId: &HStringArg, webAccountUserName: &HStringArg, props: &::rt::gen::windows::foundation::collections::IMapView, scope: WebAccountScope) -> Result>> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn add_web_account_with_scope_for_user_async(user: &::rt::gen::windows::system::User, webAccountId: &HStringArg, webAccountUserName: &HStringArg, props: &foundation::collections::IMapView, scope: WebAccountScope) -> Result>> { >::get_activation_factory().add_web_account_with_scope_for_user_async(user, webAccountId, webAccountUserName, props, scope) - }} - #[cfg(feature="windows-system")] #[inline] pub fn add_web_account_with_scope_and_map_for_user_async(user: &::rt::gen::windows::system::User, webAccountId: &HStringArg, webAccountUserName: &HStringArg, props: &::rt::gen::windows::foundation::collections::IMapView, scope: WebAccountScope, perUserWebAccountId: &HStringArg) -> Result>> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn add_web_account_with_scope_and_map_for_user_async(user: &::rt::gen::windows::system::User, webAccountId: &HStringArg, webAccountUserName: &HStringArg, props: &foundation::collections::IMapView, scope: WebAccountScope, perUserWebAccountId: &HStringArg) -> Result>> { >::get_activation_factory().add_web_account_with_scope_and_map_for_user_async(user, webAccountId, webAccountUserName, props, scope, perUserWebAccountId) - }} - #[inline] pub fn invalidate_app_cache_for_all_accounts_async() -> Result> { unsafe { + } + #[inline] pub fn invalidate_app_cache_for_all_accounts_async() -> Result> { >::get_activation_factory().invalidate_app_cache_for_all_accounts_async() - }} - #[inline] pub fn invalidate_app_cache_for_account_async(webAccount: &super::super::super::credentials::WebAccount) -> Result> { unsafe { + } + #[inline] pub fn invalidate_app_cache_for_account_async(webAccount: &super::super::super::credentials::WebAccount) -> Result> { >::get_activation_factory().invalidate_app_cache_for_account_async(webAccount) - }} - #[inline] pub fn add_web_account_with_scope_and_map_async(webAccountId: &HStringArg, webAccountUserName: &HStringArg, props: &::rt::gen::windows::foundation::collections::IMapView, scope: WebAccountScope, perUserWebAccountId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn add_web_account_with_scope_and_map_async(webAccountId: &HStringArg, webAccountUserName: &HStringArg, props: &foundation::collections::IMapView, scope: WebAccountScope, perUserWebAccountId: &HStringArg) -> Result>> { >::get_activation_factory().add_web_account_with_scope_and_map_async(webAccountId, webAccountUserName, props, scope, perUserWebAccountId) - }} - #[inline] pub fn set_per_app_to_per_user_account_async(perAppAccount: &super::super::super::credentials::WebAccount, perUserWebAccountId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn set_per_app_to_per_user_account_async(perAppAccount: &super::super::super::credentials::WebAccount, perUserWebAccountId: &HStringArg) -> Result> { >::get_activation_factory().set_per_app_to_per_user_account_async(perAppAccount, perUserWebAccountId) - }} - #[inline] pub fn get_per_user_from_per_app_account_async(perAppAccount: &super::super::super::credentials::WebAccount) -> Result>> { unsafe { + } + #[inline] pub fn get_per_user_from_per_app_account_async(perAppAccount: &super::super::super::credentials::WebAccount) -> Result>> { >::get_activation_factory().get_per_user_from_per_app_account_async(perAppAccount) - }} - #[inline] pub fn clear_per_user_from_per_app_account_async(perAppAccount: &super::super::super::credentials::WebAccount) -> Result> { unsafe { + } + #[inline] pub fn clear_per_user_from_per_app_account_async(perAppAccount: &super::super::super::credentials::WebAccount) -> Result> { >::get_activation_factory().clear_per_user_from_per_app_account_async(perAppAccount) - }} - #[inline] pub fn add_web_account_with_scope_async(webAccountId: &HStringArg, webAccountUserName: &HStringArg, props: &::rt::gen::windows::foundation::collections::IMapView, scope: WebAccountScope) -> Result>> { unsafe { + } + #[inline] pub fn add_web_account_with_scope_async(webAccountId: &HStringArg, webAccountUserName: &HStringArg, props: &foundation::collections::IMapView, scope: WebAccountScope) -> Result>> { >::get_activation_factory().add_web_account_with_scope_async(webAccountId, webAccountUserName, props, scope) - }} - #[inline] pub fn set_scope_async(webAccount: &super::super::super::credentials::WebAccount, scope: WebAccountScope) -> Result> { unsafe { + } + #[inline] pub fn set_scope_async(webAccount: &super::super::super::credentials::WebAccount, scope: WebAccountScope) -> Result> { >::get_activation_factory().set_scope_async(webAccount, scope) - }} - #[inline] pub fn get_scope(webAccount: &super::super::super::credentials::WebAccount) -> Result { unsafe { + } + #[inline] pub fn get_scope(webAccount: &super::super::super::credentials::WebAccount) -> Result { >::get_activation_factory().get_scope(webAccount) - }} + } } DEFINE_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]) [CLSID_WebAccountManager]); 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(&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(&self, webAccountId: HSTRING, webAccountUserName: HSTRING, props: *mut ::rt::gen::windows::foundation::collections::IMapView, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn DeleteWebAccountAsync(&self, webAccount: *mut super::super::super::credentials::WebAccount, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn FindAllProviderWebAccountsAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, + fn UpdateWebAccountPropertiesAsync(&self, webAccount: *mut super::super::super::credentials::WebAccount, webAccountUserName: HSTRING, additionalProperties: *mut foundation::collections::IMapView, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn AddWebAccountAsync(&self, webAccountId: HSTRING, webAccountUserName: HSTRING, props: *mut foundation::collections::IMapView, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn DeleteWebAccountAsync(&self, webAccount: *mut super::super::super::credentials::WebAccount, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn FindAllProviderWebAccountsAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, #[cfg(not(feature="windows-web"))] fn __Dummy4(&self) -> (), - #[cfg(feature="windows-web")] fn PushCookiesAsync(&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(&self, webAccount: *mut super::super::super::credentials::WebAccount, view: *mut WebAccountClientView, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ClearViewAsync(&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(&self, webAccount: *mut super::super::super::credentials::WebAccount, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, + #[cfg(feature="windows-web")] fn PushCookiesAsync(&self, uri: *mut foundation::Uri, cookies: *mut foundation::collections::IVectorView<::rt::gen::windows::web::http::HttpCookie>, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn SetViewAsync(&self, webAccount: *mut super::super::super::credentials::WebAccount, view: *mut WebAccountClientView, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ClearViewAsync(&self, webAccount: *mut super::super::super::credentials::WebAccount, applicationCallbackUri: *mut foundation::Uri, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn GetViewsAsync(&self, webAccount: *mut super::super::super::credentials::WebAccount, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy8(&self) -> (), - #[cfg(feature="windows-storage")] fn SetWebAccountPictureAsync(&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(&self, webAccount: *mut super::super::super::credentials::WebAccount, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + #[cfg(feature="windows-storage")] fn SetWebAccountPictureAsync(&self, webAccount: *mut super::super::super::credentials::WebAccount, webAccountPicture: *mut ::rt::gen::windows::storage::streams::IRandomAccessStream, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ClearWebAccountPictureAsync(&self, webAccount: *mut super::super::super::credentials::WebAccount, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IWebAccountManagerStatics { - #[inline] pub unsafe fn update_web_account_properties_async(&self, webAccount: &super::super::super::credentials::WebAccount, webAccountUserName: &HStringArg, additionalProperties: &::rt::gen::windows::foundation::collections::IMapView) -> Result> { + #[inline] pub fn update_web_account_properties_async(&self, webAccount: &super::super::super::credentials::WebAccount, webAccountUserName: &HStringArg, additionalProperties: &foundation::collections::IMapView) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UpdateWebAccountPropertiesAsync)(self as *const _ as *mut _, 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(&self, webAccountId: &HStringArg, webAccountUserName: &HStringArg, props: &::rt::gen::windows::foundation::collections::IMapView) -> Result>> { + }} + #[inline] pub fn add_web_account_async(&self, webAccountId: &HStringArg, webAccountUserName: &HStringArg, props: &foundation::collections::IMapView) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AddWebAccountAsync)(self as *const _ as *mut _, 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(&self, webAccount: &super::super::super::credentials::WebAccount) -> Result> { + }} + #[inline] pub fn delete_web_account_async(&self, webAccount: &super::super::super::credentials::WebAccount) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteWebAccountAsync)(self 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_all_provider_web_accounts_async(&self) -> Result>>> { + }} + #[inline] pub fn find_all_provider_web_accounts_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllProviderWebAccountsAsync)(self 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 push_cookies_async(&self, uri: &::rt::gen::windows::foundation::Uri, cookies: &::rt::gen::windows::foundation::collections::IVectorView<::rt::gen::windows::web::http::HttpCookie>) -> Result> { + }} + #[cfg(feature="windows-web")] #[inline] pub fn push_cookies_async(&self, uri: &foundation::Uri, cookies: &foundation::collections::IVectorView<::rt::gen::windows::web::http::HttpCookie>) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PushCookiesAsync)(self as *const _ as *mut _, 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(&self, webAccount: &super::super::super::credentials::WebAccount, view: &WebAccountClientView) -> Result> { + }} + #[inline] pub fn set_view_async(&self, webAccount: &super::super::super::credentials::WebAccount, view: &WebAccountClientView) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetViewAsync)(self as *const _ as *mut _, 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(&self, webAccount: &super::super::super::credentials::WebAccount, applicationCallbackUri: &::rt::gen::windows::foundation::Uri) -> Result> { + }} + #[inline] pub fn clear_view_async(&self, webAccount: &super::super::super::credentials::WebAccount, applicationCallbackUri: &foundation::Uri) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ClearViewAsync)(self as *const _ as *mut _, 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(&self, webAccount: &super::super::super::credentials::WebAccount) -> Result>>> { + }} + #[inline] pub fn get_views_async(&self, webAccount: &super::super::super::credentials::WebAccount) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetViewsAsync)(self as *const _ as *mut _, 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(&self, webAccount: &super::super::super::credentials::WebAccount, webAccountPicture: &::rt::gen::windows::storage::streams::IRandomAccessStream) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_web_account_picture_async(&self, webAccount: &super::super::super::credentials::WebAccount, webAccountPicture: &::rt::gen::windows::storage::streams::IRandomAccessStream) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetWebAccountPictureAsync)(self as *const _ as *mut _, 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(&self, webAccount: &super::super::super::credentials::WebAccount) -> Result> { + }} + #[inline] pub fn clear_web_account_picture_async(&self, webAccount: &super::super::super::credentials::WebAccount) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ClearWebAccountPictureAsync)(self as *const _ as *mut _, 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(&self, uriString: HSTRING, callerPFN: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn PullCookiesAsync(&self, uriString: HSTRING, callerPFN: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IWebAccountManagerStatics2 { - #[inline] pub unsafe fn pull_cookies_async(&self, uriString: &HStringArg, callerPFN: &HStringArg) -> Result> { + #[inline] pub fn pull_cookies_async(&self, uriString: &HStringArg, callerPFN: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PullCookiesAsync)(self as *const _ as *mut _, uriString.get(), callerPFN.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IWebAccountManagerStatics3, 3712295846, 35407, 19106, 177, 94, 3, 245, 80, 175, 19, 89); RT_INTERFACE!{static interface IWebAccountManagerStatics3(IWebAccountManagerStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountManagerStatics3] { - #[cfg(feature="windows-system")] fn FindAllProviderWebAccountsForUserAsync(&self, user: *mut ::rt::gen::windows::system::User, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, - #[cfg(feature="windows-system")] fn AddWebAccountForUserAsync(&self, user: *mut ::rt::gen::windows::system::User, webAccountId: HSTRING, webAccountUserName: HSTRING, props: *mut ::rt::gen::windows::foundation::collections::IMapView, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-system")] fn AddWebAccountWithScopeForUserAsync(&self, user: *mut ::rt::gen::windows::system::User, webAccountId: HSTRING, webAccountUserName: HSTRING, props: *mut ::rt::gen::windows::foundation::collections::IMapView, scope: WebAccountScope, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-system")] fn AddWebAccountWithScopeAndMapForUserAsync(&self, user: *mut ::rt::gen::windows::system::User, 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 + #[cfg(feature="windows-system")] fn FindAllProviderWebAccountsForUserAsync(&self, user: *mut ::rt::gen::windows::system::User, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + #[cfg(feature="windows-system")] fn AddWebAccountForUserAsync(&self, user: *mut ::rt::gen::windows::system::User, webAccountId: HSTRING, webAccountUserName: HSTRING, props: *mut foundation::collections::IMapView, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-system")] fn AddWebAccountWithScopeForUserAsync(&self, user: *mut ::rt::gen::windows::system::User, webAccountId: HSTRING, webAccountUserName: HSTRING, props: *mut foundation::collections::IMapView, scope: WebAccountScope, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-system")] fn AddWebAccountWithScopeAndMapForUserAsync(&self, user: *mut ::rt::gen::windows::system::User, webAccountId: HSTRING, webAccountUserName: HSTRING, props: *mut foundation::collections::IMapView, scope: WebAccountScope, perUserWebAccountId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IWebAccountManagerStatics3 { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn find_all_provider_web_accounts_for_user_async(&self, user: &::rt::gen::windows::system::User) -> Result>>> { + #[cfg(feature="windows-system")] #[inline] pub fn find_all_provider_web_accounts_for_user_async(&self, user: &::rt::gen::windows::system::User) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllProviderWebAccountsForUserAsync)(self as *const _ as *mut _, 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 add_web_account_for_user_async(&self, user: &::rt::gen::windows::system::User, webAccountId: &HStringArg, webAccountUserName: &HStringArg, props: &::rt::gen::windows::foundation::collections::IMapView) -> Result>> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn add_web_account_for_user_async(&self, user: &::rt::gen::windows::system::User, webAccountId: &HStringArg, webAccountUserName: &HStringArg, props: &foundation::collections::IMapView) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AddWebAccountForUserAsync)(self as *const _ as *mut _, user as *const _ as *mut _, webAccountId.get(), webAccountUserName.get(), props 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 add_web_account_with_scope_for_user_async(&self, user: &::rt::gen::windows::system::User, webAccountId: &HStringArg, webAccountUserName: &HStringArg, props: &::rt::gen::windows::foundation::collections::IMapView, scope: WebAccountScope) -> Result>> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn add_web_account_with_scope_for_user_async(&self, user: &::rt::gen::windows::system::User, webAccountId: &HStringArg, webAccountUserName: &HStringArg, props: &foundation::collections::IMapView, scope: WebAccountScope) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AddWebAccountWithScopeForUserAsync)(self as *const _ as *mut _, user as *const _ as *mut _, webAccountId.get(), webAccountUserName.get(), props as *const _ as *mut _, scope, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn add_web_account_with_scope_and_map_for_user_async(&self, user: &::rt::gen::windows::system::User, webAccountId: &HStringArg, webAccountUserName: &HStringArg, props: &::rt::gen::windows::foundation::collections::IMapView, scope: WebAccountScope, perUserWebAccountId: &HStringArg) -> Result>> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn add_web_account_with_scope_and_map_for_user_async(&self, user: &::rt::gen::windows::system::User, webAccountId: &HStringArg, webAccountUserName: &HStringArg, props: &foundation::collections::IMapView, scope: WebAccountScope, perUserWebAccountId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AddWebAccountWithScopeAndMapForUserAsync)(self as *const _ as *mut _, user as *const _ as *mut _, 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) } - } + }} } DEFINE_IID!(IID_IWebAccountManagerStatics4, 1508623058, 63451, 16687, 188, 63, 242, 254, 160, 68, 48, 180); RT_INTERFACE!{static interface IWebAccountManagerStatics4(IWebAccountManagerStatics4Vtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountManagerStatics4] { - fn InvalidateAppCacheForAllAccountsAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn InvalidateAppCacheForAccountAsync(&self, webAccount: *mut super::super::super::credentials::WebAccount, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn InvalidateAppCacheForAllAccountsAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn InvalidateAppCacheForAccountAsync(&self, webAccount: *mut super::super::super::credentials::WebAccount, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IWebAccountManagerStatics4 { - #[inline] pub unsafe fn invalidate_app_cache_for_all_accounts_async(&self) -> Result> { + #[inline] pub fn invalidate_app_cache_for_all_accounts_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).InvalidateAppCacheForAllAccountsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn invalidate_app_cache_for_account_async(&self, webAccount: &super::super::super::credentials::WebAccount) -> Result> { + }} + #[inline] pub fn invalidate_app_cache_for_account_async(&self, webAccount: &super::super::super::credentials::WebAccount) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).InvalidateAppCacheForAccountAsync)(self as *const _ as *mut _, webAccount as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(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(&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(&self, perAppAccount: *mut super::super::super::credentials::WebAccount, perUserWebAccountId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn GetPerUserFromPerAppAccountAsync(&self, perAppAccount: *mut super::super::super::credentials::WebAccount, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn ClearPerUserFromPerAppAccountAsync(&self, perAppAccount: *mut super::super::super::credentials::WebAccount, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn AddWebAccountWithScopeAndMapAsync(&self, webAccountId: HSTRING, webAccountUserName: HSTRING, props: *mut foundation::collections::IMapView, scope: WebAccountScope, perUserWebAccountId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn SetPerAppToPerUserAccountAsync(&self, perAppAccount: *mut super::super::super::credentials::WebAccount, perUserWebAccountId: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn GetPerUserFromPerAppAccountAsync(&self, perAppAccount: *mut super::super::super::credentials::WebAccount, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ClearPerUserFromPerAppAccountAsync(&self, perAppAccount: *mut super::super::super::credentials::WebAccount, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IWebAccountMapManagerStatics { - #[inline] pub unsafe fn add_web_account_with_scope_and_map_async(&self, webAccountId: &HStringArg, webAccountUserName: &HStringArg, props: &::rt::gen::windows::foundation::collections::IMapView, scope: WebAccountScope, perUserWebAccountId: &HStringArg) -> Result>> { + #[inline] pub fn add_web_account_with_scope_and_map_async(&self, webAccountId: &HStringArg, webAccountUserName: &HStringArg, props: &foundation::collections::IMapView, scope: WebAccountScope, perUserWebAccountId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AddWebAccountWithScopeAndMapAsync)(self as *const _ as *mut _, 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(&self, perAppAccount: &super::super::super::credentials::WebAccount, perUserWebAccountId: &HStringArg) -> Result> { + }} + #[inline] pub fn set_per_app_to_per_user_account_async(&self, perAppAccount: &super::super::super::credentials::WebAccount, perUserWebAccountId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetPerAppToPerUserAccountAsync)(self as *const _ as *mut _, 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(&self, perAppAccount: &super::super::super::credentials::WebAccount) -> Result>> { + }} + #[inline] pub fn get_per_user_from_per_app_account_async(&self, perAppAccount: &super::super::super::credentials::WebAccount) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPerUserFromPerAppAccountAsync)(self as *const _ as *mut _, 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(&self, perAppAccount: &super::super::super::credentials::WebAccount) -> Result> { + }} + #[inline] pub fn clear_per_user_from_per_app_account_async(&self, perAppAccount: &super::super::super::credentials::WebAccount) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ClearPerUserFromPerAppAccountAsync)(self as *const _ as *mut _, perAppAccount as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(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(&self) -> HRESULT }} impl IWebAccountProviderAddAccountOperation { - #[inline] pub unsafe fn report_completed(&self) -> Result<()> { + #[inline] pub fn report_completed(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportCompleted)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class WebAccountProviderAddAccountOperation: IWebAccountProviderAddAccountOperation} DEFINE_IID!(IID_IWebAccountProviderBaseReportOperation, 3148131515, 39227, 19799, 187, 228, 20, 33, 227, 102, 139, 76); @@ -2052,25 +2052,25 @@ RT_INTERFACE!{interface IWebAccountProviderBaseReportOperation(IWebAccountProvid fn ReportError(&self, value: *mut super::core::WebProviderError) -> HRESULT }} impl IWebAccountProviderBaseReportOperation { - #[inline] pub unsafe fn report_completed(&self) -> Result<()> { + #[inline] pub fn report_completed(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportCompleted)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn report_error(&self, value: &super::core::WebProviderError) -> Result<()> { + }} + #[inline] pub fn report_error(&self, value: &super::core::WebProviderError) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportError)(self as *const _ as *mut _, value as *const _ as *mut _); 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(&self, out: *mut *mut super::super::super::credentials::WebAccount) -> HRESULT }} impl IWebAccountProviderDeleteAccountOperation { - #[inline] pub unsafe fn get_web_account(&self) -> Result> { + #[inline] pub fn get_web_account(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WebAccount)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class WebAccountProviderDeleteAccountOperation: IWebAccountProviderDeleteAccountOperation} RT_CLASS!{class WebAccountProviderGetTokenSilentOperation: IWebAccountProviderTokenOperation} @@ -2080,15 +2080,15 @@ RT_INTERFACE!{interface IWebAccountProviderManageAccountOperation(IWebAccountPro fn ReportCompleted(&self) -> HRESULT }} impl IWebAccountProviderManageAccountOperation { - #[inline] pub unsafe fn get_web_account(&self) -> Result> { + #[inline] pub fn get_web_account(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WebAccount)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_completed(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn report_completed(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportCompleted)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class WebAccountProviderManageAccountOperation: IWebAccountProviderManageAccountOperation} DEFINE_IID!(IID_IWebAccountProviderOperation, 1834820646, 4273, 16794, 164, 78, 249, 197, 22, 21, 116, 230); @@ -2096,11 +2096,11 @@ RT_INTERFACE!{interface IWebAccountProviderOperation(IWebAccountProviderOperatio fn get_Kind(&self, out: *mut WebAccountProviderOperationKind) -> HRESULT }} impl IWebAccountProviderOperation { - #[inline] pub unsafe fn get_kind(&self) -> Result { + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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, @@ -2108,62 +2108,62 @@ RT_ENUM! { enum WebAccountProviderOperationKind: i32 { RT_CLASS!{class WebAccountProviderRequestTokenOperation: IWebAccountProviderTokenOperation} 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(&self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn get_Context(&self, out: *mut *mut foundation::Uri) -> HRESULT, #[cfg(not(feature="windows-web"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-web")] fn get_Cookies(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector<::rt::gen::windows::web::http::HttpCookie>) -> HRESULT, - fn put_Uri(&self, uri: *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, - fn get_Uri(&self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, - fn get_ApplicationCallbackUri(&self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT + #[cfg(feature="windows-web")] fn get_Cookies(&self, out: *mut *mut foundation::collections::IVector<::rt::gen::windows::web::http::HttpCookie>) -> HRESULT, + fn put_Uri(&self, uri: *mut foundation::Uri) -> HRESULT, + fn get_Uri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn get_ApplicationCallbackUri(&self, out: *mut *mut foundation::Uri) -> HRESULT }} impl IWebAccountProviderRetrieveCookiesOperation { - #[inline] pub unsafe fn get_context(&self) -> Result> { + #[inline] pub fn get_context(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Context)(self 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 get_cookies(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-web")] #[inline] pub fn get_cookies(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Cookies)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_uri(&self, uri: &::rt::gen::windows::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_uri(&self, uri: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Uri)(self as *const _ as *mut _, uri as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_uri(&self) -> Result> { + }} + #[inline] pub fn get_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Uri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_application_callback_uri(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_application_callback_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ApplicationCallbackUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class WebAccountProviderRetrieveCookiesOperation: IWebAccountProviderRetrieveCookiesOperation} 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(&self, out: *mut *mut super::super::super::credentials::WebAccount) -> HRESULT, - fn get_ApplicationCallbackUri(&self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn get_ApplicationCallbackUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, fn get_ClientId(&self, out: *mut HSTRING) -> HRESULT }} impl IWebAccountProviderSignOutAccountOperation { - #[inline] pub unsafe fn get_web_account(&self) -> Result> { + #[inline] pub fn get_web_account(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WebAccount)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_application_callback_uri(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_application_callback_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ApplicationCallbackUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_client_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_client_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ClientId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class WebAccountProviderSignOutAccountOperation: IWebAccountProviderSignOutAccountOperation} DEFINE_IID!(IID_IWebAccountProviderSilentReportOperation, 3769976312, 15119, 17626, 146, 76, 123, 24, 186, 170, 98, 169); @@ -2172,64 +2172,64 @@ RT_INTERFACE!{interface IWebAccountProviderSilentReportOperation(IWebAccountProv fn ReportUserInteractionRequiredWithError(&self, value: *mut super::core::WebProviderError) -> HRESULT }} impl IWebAccountProviderSilentReportOperation { - #[inline] pub unsafe fn report_user_interaction_required(&self) -> Result<()> { + #[inline] pub fn report_user_interaction_required(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportUserInteractionRequired)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn report_user_interaction_required_with_error(&self, value: &super::core::WebProviderError) -> Result<()> { + }} + #[inline] pub fn report_user_interaction_required_with_error(&self, value: &super::core::WebProviderError) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportUserInteractionRequiredWithError)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut IWebAccountProviderOperation) -> HRESULT }} impl IWebAccountProviderTokenObjects { - #[inline] pub unsafe fn get_operation(&self) -> Result> { + #[inline] pub fn get_operation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Operation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IWebAccountProviderTokenObjects2, 270579859, 23717, 20479, 149, 251, 184, 32, 39, 63, 195, 149); RT_INTERFACE!{interface IWebAccountProviderTokenObjects2(IWebAccountProviderTokenObjects2Vtbl): IInspectable(IInspectableVtbl) [IID_IWebAccountProviderTokenObjects2] { #[cfg(feature="windows-system")] fn get_User(&self, out: *mut *mut ::rt::gen::windows::system::User) -> HRESULT }} impl IWebAccountProviderTokenObjects2 { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_user(&self) -> Result> { + #[cfg(feature="windows-system")] #[inline] pub fn get_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_User)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } 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(&self, out: *mut *mut WebProviderTokenRequest) -> HRESULT, - fn get_ProviderResponses(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, - fn put_CacheExpirationTime(&self, value: ::rt::gen::windows::foundation::DateTime) -> HRESULT, - fn get_CacheExpirationTime(&self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT + fn get_ProviderResponses(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn put_CacheExpirationTime(&self, value: foundation::DateTime) -> HRESULT, + fn get_CacheExpirationTime(&self, out: *mut foundation::DateTime) -> HRESULT }} impl IWebAccountProviderTokenOperation { - #[inline] pub unsafe fn get_provider_request(&self) -> Result> { + #[inline] pub fn get_provider_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProviderRequest)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_provider_responses(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_provider_responses(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProviderResponses)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_cache_expiration_time(&self, value: ::rt::gen::windows::foundation::DateTime) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_cache_expiration_time(&self, value: foundation::DateTime) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CacheExpirationTime)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_cache_expiration_time(&self) -> Result<::rt::gen::windows::foundation::DateTime> { + }} + #[inline] pub fn get_cache_expiration_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CacheExpirationTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class WebAccountProviderTriggerDetails: IWebAccountProviderTokenObjects} DEFINE_IID!(IID_IWebAccountProviderUIReportOperation, 687837907, 36736, 17147, 148, 79, 178, 16, 123, 189, 66, 230); @@ -2237,36 +2237,36 @@ RT_INTERFACE!{interface IWebAccountProviderUIReportOperation(IWebAccountProvider fn ReportUserCanceled(&self) -> HRESULT }} impl IWebAccountProviderUIReportOperation { - #[inline] pub unsafe fn report_user_canceled(&self) -> Result<()> { + #[inline] pub fn report_user_canceled(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportUserCanceled)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum WebAccountScope: i32 { PerUser (WebAccountScope_PerUser) = 0, PerApplication (WebAccountScope_PerApplication) = 1, }} 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(&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(&self, webAccount: *mut super::super::super::credentials::WebAccount, scope: WebAccountScope, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, + fn AddWebAccountWithScopeAsync(&self, webAccountId: HSTRING, webAccountUserName: HSTRING, props: *mut foundation::collections::IMapView, scope: WebAccountScope, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn SetScopeAsync(&self, webAccount: *mut super::super::super::credentials::WebAccount, scope: WebAccountScope, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn GetScope(&self, webAccount: *mut super::super::super::credentials::WebAccount, out: *mut WebAccountScope) -> HRESULT }} impl IWebAccountScopeManagerStatics { - #[inline] pub unsafe fn add_web_account_with_scope_async(&self, webAccountId: &HStringArg, webAccountUserName: &HStringArg, props: &::rt::gen::windows::foundation::collections::IMapView, scope: WebAccountScope) -> Result>> { + #[inline] pub fn add_web_account_with_scope_async(&self, webAccountId: &HStringArg, webAccountUserName: &HStringArg, props: &foundation::collections::IMapView, scope: WebAccountScope) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AddWebAccountWithScopeAsync)(self as *const _ as *mut _, 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(&self, webAccount: &super::super::super::credentials::WebAccount, scope: WebAccountScope) -> Result> { + }} + #[inline] pub fn set_scope_async(&self, webAccount: &super::super::super::credentials::WebAccount, scope: WebAccountScope) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetScopeAsync)(self as *const _ as *mut _, 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(&self, webAccount: &super::super::super::credentials::WebAccount) -> Result { + }} + #[inline] pub fn get_scope(&self, webAccount: &super::super::super::credentials::WebAccount) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetScope)(self as *const _ as *mut _, webAccount as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum WebAccountSelectionOptions: u32 { Default (WebAccountSelectionOptions_Default) = 0, New (WebAccountSelectionOptions_New) = 1, @@ -2274,67 +2274,67 @@ RT_ENUM! { enum WebAccountSelectionOptions: u32 { 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(&self, out: *mut *mut super::core::WebTokenRequest) -> HRESULT, - fn get_WebAccounts(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_WebAccounts(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_WebAccountSelectionOptions(&self, out: *mut WebAccountSelectionOptions) -> HRESULT, - fn get_ApplicationCallbackUri(&self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, - fn GetApplicationTokenBindingKeyAsync(&self, keyType: super::TokenBindingKeyType, target: *mut ::rt::gen::windows::foundation::Uri, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn get_ApplicationCallbackUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn GetApplicationTokenBindingKeyAsync(&self, keyType: super::TokenBindingKeyType, target: *mut foundation::Uri, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IWebProviderTokenRequest { - #[inline] pub unsafe fn get_client_request(&self) -> Result> { + #[inline] pub fn get_client_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ClientRequest)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_web_accounts(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_web_accounts(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WebAccounts)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_web_account_selection_options(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_web_account_selection_options(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_WebAccountSelectionOptions)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_application_callback_uri(&self) -> Result> { + }} + #[inline] pub fn get_application_callback_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ApplicationCallbackUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_application_token_binding_key_async(&self, keyType: super::TokenBindingKeyType, target: &::rt::gen::windows::foundation::Uri) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_application_token_binding_key_async(&self, keyType: super::TokenBindingKeyType, target: &foundation::Uri) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetApplicationTokenBindingKeyAsync)(self as *const _ as *mut _, 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_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(&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 + #[cfg(feature="windows-storage")] fn GetApplicationTokenBindingKeyIdAsync(&self, keyType: super::TokenBindingKeyType, target: *mut foundation::Uri, out: *mut *mut 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(&self, keyType: super::TokenBindingKeyType, target: &::rt::gen::windows::foundation::Uri) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_application_token_binding_key_id_async(&self, keyType: super::TokenBindingKeyType, target: &foundation::Uri) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetApplicationTokenBindingKeyIdAsync)(self as *const _ as *mut _, keyType, target as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::core::WebTokenResponse) -> HRESULT }} impl IWebProviderTokenResponse { - #[inline] pub unsafe fn get_client_response(&self) -> Result> { + #[inline] pub fn get_client_response(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ClientResponse)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class WebProviderTokenResponse: IWebProviderTokenResponse} impl RtActivatable for WebProviderTokenResponse {} impl WebProviderTokenResponse { - #[inline] pub fn create(webTokenResponse: &super::core::WebTokenResponse) -> Result> { unsafe { + #[inline] pub fn create(webTokenResponse: &super::core::WebTokenResponse) -> Result> { >::get_activation_factory().create(webTokenResponse) - }} + } } DEFINE_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]) [CLSID_WebProviderTokenResponse]); DEFINE_IID!(IID_IWebProviderTokenResponseFactory, 4199143834, 9658, 16503, 156, 250, 157, 180, 222, 167, 183, 26); @@ -2342,11 +2342,11 @@ RT_INTERFACE!{static interface IWebProviderTokenResponseFactory(IWebProviderToke fn Create(&self, webTokenResponse: *mut super::core::WebTokenResponse, out: *mut *mut WebProviderTokenResponse) -> HRESULT }} impl IWebProviderTokenResponseFactory { - #[inline] pub unsafe fn create(&self, webTokenResponse: &super::core::WebTokenResponse) -> Result> { + #[inline] pub fn create(&self, webTokenResponse: &super::core::WebTokenResponse) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, webTokenResponse as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } } // Windows.Security.Authentication.Web.Provider pub mod core { // Windows.Security.Authentication.Web.Core @@ -2356,50 +2356,50 @@ RT_INTERFACE!{interface IWebAccountEventArgs(IWebAccountEventArgsVtbl): IInspect fn get_Account(&self, out: *mut *mut super::super::super::credentials::WebAccount) -> HRESULT }} impl IWebAccountEventArgs { - #[inline] pub unsafe fn get_account(&self) -> Result> { + #[inline] pub fn get_account(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Account)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class WebAccountEventArgs: IWebAccountEventArgs} 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(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Updated(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_Removed(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Removed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_DefaultSignInAccountChanged(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DefaultSignInAccountChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn add_Updated(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Updated(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Removed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Removed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_DefaultSignInAccountChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DefaultSignInAccountChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IWebAccountMonitor { - #[inline] pub unsafe fn add_updated(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub fn add_updated(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Updated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_updated(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_updated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Updated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_removed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_removed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Removed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_removed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_removed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Removed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_default_sign_in_account_changed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_default_sign_in_account_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DefaultSignInAccountChanged)(self as *const _ as *mut _, 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(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_default_sign_in_account_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DefaultSignInAccountChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class WebAccountMonitor: IWebAccountMonitor} RT_CLASS!{static class WebAuthenticationCoreManager} @@ -2407,133 +2407,133 @@ impl RtActivatable for WebAuthenticationCo impl RtActivatable for WebAuthenticationCoreManager {} impl RtActivatable for WebAuthenticationCoreManager {} impl WebAuthenticationCoreManager { - #[inline] pub fn get_token_silently_async(request: &WebTokenRequest) -> Result>> { unsafe { + #[inline] pub fn get_token_silently_async(request: &WebTokenRequest) -> Result>> { >::get_activation_factory().get_token_silently_async(request) - }} - #[inline] pub fn get_token_silently_with_web_account_async(request: &WebTokenRequest, webAccount: &super::super::super::credentials::WebAccount) -> Result>> { unsafe { + } + #[inline] pub fn get_token_silently_with_web_account_async(request: &WebTokenRequest, webAccount: &super::super::super::credentials::WebAccount) -> Result>> { >::get_activation_factory().get_token_silently_with_web_account_async(request, webAccount) - }} - #[inline] pub fn request_token_async(request: &WebTokenRequest) -> Result>> { unsafe { + } + #[inline] pub fn request_token_async(request: &WebTokenRequest) -> Result>> { >::get_activation_factory().request_token_async(request) - }} - #[inline] pub fn request_token_with_web_account_async(request: &WebTokenRequest, webAccount: &super::super::super::credentials::WebAccount) -> Result>> { unsafe { + } + #[inline] pub fn request_token_with_web_account_async(request: &WebTokenRequest, webAccount: &super::super::super::credentials::WebAccount) -> Result>> { >::get_activation_factory().request_token_with_web_account_async(request, webAccount) - }} - #[inline] pub fn find_account_async(provider: &super::super::super::credentials::WebAccountProvider, webAccountId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn find_account_async(provider: &super::super::super::credentials::WebAccountProvider, webAccountId: &HStringArg) -> Result>> { >::get_activation_factory().find_account_async(provider, webAccountId) - }} - #[inline] pub fn find_account_provider_async(webAccountProviderId: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn find_account_provider_async(webAccountProviderId: &HStringArg) -> Result>> { >::get_activation_factory().find_account_provider_async(webAccountProviderId) - }} - #[inline] pub fn find_account_provider_with_authority_async(webAccountProviderId: &HStringArg, authority: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn find_account_provider_with_authority_async(webAccountProviderId: &HStringArg, authority: &HStringArg) -> Result>> { >::get_activation_factory().find_account_provider_with_authority_async(webAccountProviderId, authority) - }} - #[cfg(feature="windows-system")] #[inline] pub fn find_account_provider_with_authority_for_user_async(webAccountProviderId: &HStringArg, authority: &HStringArg, user: &::rt::gen::windows::system::User) -> Result>> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn find_account_provider_with_authority_for_user_async(webAccountProviderId: &HStringArg, authority: &HStringArg, user: &::rt::gen::windows::system::User) -> Result>> { >::get_activation_factory().find_account_provider_with_authority_for_user_async(webAccountProviderId, authority, user) - }} - #[inline] pub fn create_web_account_monitor(webAccounts: &::rt::gen::windows::foundation::collections::IIterable) -> Result> { unsafe { + } + #[inline] pub fn create_web_account_monitor(webAccounts: &foundation::collections::IIterable) -> Result>> { >::get_activation_factory().create_web_account_monitor(webAccounts) - }} + } } DEFINE_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]) [CLSID_WebAuthenticationCoreManager]); 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(&self, request: *mut WebTokenRequest, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn GetTokenSilentlyWithWebAccountAsync(&self, request: *mut WebTokenRequest, webAccount: *mut super::super::super::credentials::WebAccount, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn RequestTokenAsync(&self, request: *mut WebTokenRequest, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn RequestTokenWithWebAccountAsync(&self, request: *mut WebTokenRequest, webAccount: *mut super::super::super::credentials::WebAccount, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn FindAccountAsync(&self, provider: *mut super::super::super::credentials::WebAccountProvider, webAccountId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn FindAccountProviderAsync(&self, webAccountProviderId: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn FindAccountProviderWithAuthorityAsync(&self, webAccountProviderId: HSTRING, authority: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn GetTokenSilentlyAsync(&self, request: *mut WebTokenRequest, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetTokenSilentlyWithWebAccountAsync(&self, request: *mut WebTokenRequest, webAccount: *mut super::super::super::credentials::WebAccount, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestTokenAsync(&self, request: *mut WebTokenRequest, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestTokenWithWebAccountAsync(&self, request: *mut WebTokenRequest, webAccount: *mut super::super::super::credentials::WebAccount, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn FindAccountAsync(&self, provider: *mut super::super::super::credentials::WebAccountProvider, webAccountId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn FindAccountProviderAsync(&self, webAccountProviderId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn FindAccountProviderWithAuthorityAsync(&self, webAccountProviderId: HSTRING, authority: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IWebAuthenticationCoreManagerStatics { - #[inline] pub unsafe fn get_token_silently_async(&self, request: &WebTokenRequest) -> Result>> { + #[inline] pub fn get_token_silently_async(&self, request: &WebTokenRequest) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetTokenSilentlyAsync)(self as *const _ as *mut _, 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(&self, request: &WebTokenRequest, webAccount: &super::super::super::credentials::WebAccount) -> Result>> { + }} + #[inline] pub fn get_token_silently_with_web_account_async(&self, request: &WebTokenRequest, webAccount: &super::super::super::credentials::WebAccount) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetTokenSilentlyWithWebAccountAsync)(self as *const _ as *mut _, 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(&self, request: &WebTokenRequest) -> Result>> { + }} + #[inline] pub fn request_token_async(&self, request: &WebTokenRequest) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestTokenAsync)(self as *const _ as *mut _, 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(&self, request: &WebTokenRequest, webAccount: &super::super::super::credentials::WebAccount) -> Result>> { + }} + #[inline] pub fn request_token_with_web_account_async(&self, request: &WebTokenRequest, webAccount: &super::super::super::credentials::WebAccount) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestTokenWithWebAccountAsync)(self as *const _ as *mut _, 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(&self, provider: &super::super::super::credentials::WebAccountProvider, webAccountId: &HStringArg) -> Result>> { + }} + #[inline] pub fn find_account_async(&self, provider: &super::super::super::credentials::WebAccountProvider, webAccountId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAccountAsync)(self as *const _ as *mut _, 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(&self, webAccountProviderId: &HStringArg) -> Result>> { + }} + #[inline] pub fn find_account_provider_async(&self, webAccountProviderId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAccountProviderAsync)(self as *const _ as *mut _, 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(&self, webAccountProviderId: &HStringArg, authority: &HStringArg) -> Result>> { + }} + #[inline] pub fn find_account_provider_with_authority_async(&self, webAccountProviderId: &HStringArg, authority: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAccountProviderWithAuthorityAsync)(self as *const _ as *mut _, 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(&self, webAccountProviderId: HSTRING, authority: HSTRING, user: *mut ::rt::gen::windows::system::User, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-system")] fn FindAccountProviderWithAuthorityForUserAsync(&self, webAccountProviderId: HSTRING, authority: HSTRING, user: *mut ::rt::gen::windows::system::User, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IWebAuthenticationCoreManagerStatics2 { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn find_account_provider_with_authority_for_user_async(&self, webAccountProviderId: &HStringArg, authority: &HStringArg, user: &::rt::gen::windows::system::User) -> Result>> { + #[cfg(feature="windows-system")] #[inline] pub fn find_account_provider_with_authority_for_user_async(&self, webAccountProviderId: &HStringArg, authority: &HStringArg, user: &::rt::gen::windows::system::User) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAccountProviderWithAuthorityForUserAsync)(self as *const _ as *mut _, 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(&self, webAccounts: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut WebAccountMonitor) -> HRESULT + fn CreateWebAccountMonitor(&self, webAccounts: *mut foundation::collections::IIterable, out: *mut *mut WebAccountMonitor) -> HRESULT }} impl IWebAuthenticationCoreManagerStatics3 { - #[inline] pub unsafe fn create_web_account_monitor(&self, webAccounts: &::rt::gen::windows::foundation::collections::IIterable) -> Result> { + #[inline] pub fn create_web_account_monitor(&self, webAccounts: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWebAccountMonitor)(self as *const _ as *mut _, webAccounts as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut u32) -> HRESULT, fn get_ErrorMessage(&self, out: *mut HSTRING) -> HRESULT, - fn get_Properties(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMap) -> HRESULT + fn get_Properties(&self, out: *mut *mut foundation::collections::IMap) -> HRESULT }} impl IWebProviderError { - #[inline] pub unsafe fn get_error_code(&self) -> Result { + #[inline] pub fn get_error_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ErrorCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_error_message(&self) -> Result { + }} + #[inline] pub fn get_error_message(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ErrorMessage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class WebProviderError: IWebProviderError} impl RtActivatable for WebProviderError {} impl WebProviderError { - #[inline] pub fn create(errorCode: u32, errorMessage: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(errorCode: u32, errorMessage: &HStringArg) -> Result> { >::get_activation_factory().create(errorCode, errorMessage) - }} + } } DEFINE_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]) [CLSID_WebProviderError]); DEFINE_IID!(IID_IWebProviderErrorFactory, 3821275693, 35311, 20023, 132, 127, 168, 185, 213, 163, 41, 16); @@ -2541,11 +2541,11 @@ RT_INTERFACE!{static interface IWebProviderErrorFactory(IWebProviderErrorFactory fn Create(&self, errorCode: u32, errorMessage: HSTRING, out: *mut *mut WebProviderError) -> HRESULT }} impl IWebProviderErrorFactory { - #[inline] pub unsafe fn create(&self, errorCode: u32, errorMessage: &HStringArg) -> Result> { + #[inline] pub fn create(&self, errorCode: u32, errorMessage: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, errorCode, errorMessage.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IWebTokenRequest, 3078311272, 44491, 18035, 179, 100, 12, 247, 179, 92, 175, 151); RT_INTERFACE!{interface IWebTokenRequest(IWebTokenRequestVtbl): IInspectable(IInspectableVtbl) [IID_IWebTokenRequest] { @@ -2553,62 +2553,62 @@ RT_INTERFACE!{interface IWebTokenRequest(IWebTokenRequestVtbl): IInspectable(IIn fn get_Scope(&self, out: *mut HSTRING) -> HRESULT, fn get_ClientId(&self, out: *mut HSTRING) -> HRESULT, fn get_PromptType(&self, out: *mut WebTokenRequestPromptType) -> HRESULT, - fn get_Properties(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMap) -> HRESULT + fn get_Properties(&self, out: *mut *mut foundation::collections::IMap) -> HRESULT }} impl IWebTokenRequest { - #[inline] pub unsafe fn get_web_account_provider(&self) -> Result> { + #[inline] pub fn get_web_account_provider(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WebAccountProvider)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_scope(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_scope(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Scope)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_client_id(&self) -> Result { + }} + #[inline] pub fn get_client_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ClientId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_prompt_type(&self) -> Result { + }} + #[inline] pub fn get_prompt_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PromptType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class WebTokenRequest: IWebTokenRequest} impl RtActivatable for WebTokenRequest {} impl WebTokenRequest { - #[inline] pub fn create(provider: &super::super::super::credentials::WebAccountProvider, scope: &HStringArg, clientId: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(provider: &super::super::super::credentials::WebAccountProvider, scope: &HStringArg, clientId: &HStringArg) -> Result> { >::get_activation_factory().create(provider, scope, clientId) - }} - #[inline] pub fn create_with_prompt_type(provider: &super::super::super::credentials::WebAccountProvider, scope: &HStringArg, clientId: &HStringArg, promptType: WebTokenRequestPromptType) -> Result> { unsafe { + } + #[inline] pub fn create_with_prompt_type(provider: &super::super::super::credentials::WebAccountProvider, scope: &HStringArg, clientId: &HStringArg, promptType: WebTokenRequestPromptType) -> Result> { >::get_activation_factory().create_with_prompt_type(provider, scope, clientId, promptType) - }} - #[inline] pub fn create_with_provider(provider: &super::super::super::credentials::WebAccountProvider) -> Result> { unsafe { + } + #[inline] pub fn create_with_provider(provider: &super::super::super::credentials::WebAccountProvider) -> Result> { >::get_activation_factory().create_with_provider(provider) - }} - #[inline] pub fn create_with_scope(provider: &super::super::super::credentials::WebAccountProvider, scope: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_with_scope(provider: &super::super::super::credentials::WebAccountProvider, scope: &HStringArg) -> Result> { >::get_activation_factory().create_with_scope(provider, scope) - }} + } } DEFINE_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]) [CLSID_WebTokenRequest]); 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(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMap) -> HRESULT + fn get_AppProperties(&self, out: *mut *mut foundation::collections::IMap) -> HRESULT }} impl IWebTokenRequest2 { - #[inline] pub unsafe fn get_app_properties(&self) -> Result>> { + #[inline] pub fn get_app_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IWebTokenRequest3, 1517640529, 15281, 16805, 166, 61, 144, 188, 50, 199, 219, 154); RT_INTERFACE!{interface IWebTokenRequest3(IWebTokenRequest3Vtbl): IInspectable(IInspectableVtbl) [IID_IWebTokenRequest3] { @@ -2616,15 +2616,15 @@ RT_INTERFACE!{interface IWebTokenRequest3(IWebTokenRequest3Vtbl): IInspectable(I fn put_CorrelationId(&self, value: HSTRING) -> HRESULT }} impl IWebTokenRequest3 { - #[inline] pub unsafe fn get_correlation_id(&self) -> Result { + #[inline] pub fn get_correlation_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CorrelationId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_correlation_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_correlation_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CorrelationId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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] { @@ -2634,58 +2634,58 @@ RT_INTERFACE!{static interface IWebTokenRequestFactory(IWebTokenRequestFactoryVt fn CreateWithScope(&self, provider: *mut super::super::super::credentials::WebAccountProvider, scope: HSTRING, out: *mut *mut WebTokenRequest) -> HRESULT }} impl IWebTokenRequestFactory { - #[inline] pub unsafe fn create(&self, provider: &super::super::super::credentials::WebAccountProvider, scope: &HStringArg, clientId: &HStringArg) -> Result> { + #[inline] pub fn create(&self, provider: &super::super::super::credentials::WebAccountProvider, scope: &HStringArg, clientId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, 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(&self, provider: &super::super::super::credentials::WebAccountProvider, scope: &HStringArg, clientId: &HStringArg, promptType: WebTokenRequestPromptType) -> Result> { + }} + #[inline] pub fn create_with_prompt_type(&self, provider: &super::super::super::credentials::WebAccountProvider, scope: &HStringArg, clientId: &HStringArg, promptType: WebTokenRequestPromptType) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithPromptType)(self as *const _ as *mut _, 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(&self, provider: &super::super::super::credentials::WebAccountProvider) -> Result> { + }} + #[inline] pub fn create_with_provider(&self, provider: &super::super::super::credentials::WebAccountProvider) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithProvider)(self as *const _ as *mut _, 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(&self, provider: &super::super::super::credentials::WebAccountProvider, scope: &HStringArg) -> Result> { + }} + #[inline] pub fn create_with_scope(&self, provider: &super::super::super::credentials::WebAccountProvider, scope: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithScope)(self as *const _ as *mut _, provider as *const _ as *mut _, scope.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum WebTokenRequestPromptType: i32 { Default (WebTokenRequestPromptType_Default) = 0, ForceAuthentication (WebTokenRequestPromptType_ForceAuthentication) = 1, }} 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(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_ResponseData(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_ResponseStatus(&self, out: *mut WebTokenRequestStatus) -> HRESULT, fn get_ResponseError(&self, out: *mut *mut WebProviderError) -> HRESULT, - fn InvalidateCacheAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn InvalidateCacheAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IWebTokenRequestResult { - #[inline] pub unsafe fn get_response_data(&self) -> Result>> { + #[inline] pub fn get_response_data(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResponseData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_response_status(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_response_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ResponseStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_response_error(&self) -> Result> { + }} + #[inline] pub fn get_response_error(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResponseError)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn invalidate_cache_async(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn invalidate_cache_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).InvalidateCacheAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class WebTokenRequestResult: IWebTokenRequestResult} RT_ENUM! { enum WebTokenRequestStatus: i32 { @@ -2696,43 +2696,43 @@ RT_INTERFACE!{interface IWebTokenResponse(IWebTokenResponseVtbl): IInspectable(I fn get_Token(&self, out: *mut HSTRING) -> HRESULT, fn get_ProviderError(&self, out: *mut *mut WebProviderError) -> HRESULT, fn get_WebAccount(&self, out: *mut *mut super::super::super::credentials::WebAccount) -> HRESULT, - fn get_Properties(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IMap) -> HRESULT + fn get_Properties(&self, out: *mut *mut foundation::collections::IMap) -> HRESULT }} impl IWebTokenResponse { - #[inline] pub unsafe fn get_token(&self) -> Result { + #[inline] pub fn get_token(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Token)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_provider_error(&self) -> Result> { + }} + #[inline] pub fn get_provider_error(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProviderError)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_web_account(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_web_account(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WebAccount)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class WebTokenResponse: IWebTokenResponse} impl RtActivatable for WebTokenResponse {} impl RtActivatable for WebTokenResponse {} impl WebTokenResponse { - #[inline] pub fn create_with_token(token: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_with_token(token: &HStringArg) -> Result> { >::get_activation_factory().create_with_token(token) - }} - #[inline] pub fn create_with_token_and_account(token: &HStringArg, webAccount: &super::super::super::credentials::WebAccount) -> Result> { unsafe { + } + #[inline] pub fn create_with_token_and_account(token: &HStringArg, webAccount: &super::super::super::credentials::WebAccount) -> Result> { >::get_activation_factory().create_with_token_and_account(token, webAccount) - }} - #[inline] pub fn create_with_token_account_and_error(token: &HStringArg, webAccount: &super::super::super::credentials::WebAccount, error: &WebProviderError) -> Result> { unsafe { + } + #[inline] pub fn create_with_token_account_and_error(token: &HStringArg, webAccount: &super::super::super::credentials::WebAccount, error: &WebProviderError) -> Result> { >::get_activation_factory().create_with_token_account_and_error(token, webAccount, error) - }} + } } DEFINE_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]) [CLSID_WebTokenResponse]); DEFINE_IID!(IID_IWebTokenResponseFactory, 2875979768, 21584, 20214, 151, 247, 5, 43, 4, 49, 192, 240); @@ -2742,21 +2742,21 @@ RT_INTERFACE!{static interface IWebTokenResponseFactory(IWebTokenResponseFactory fn CreateWithTokenAccountAndError(&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(&self, token: &HStringArg) -> Result> { + #[inline] pub fn create_with_token(&self, token: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithToken)(self as *const _ as *mut _, token.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_token_and_account(&self, token: &HStringArg, webAccount: &super::super::super::credentials::WebAccount) -> Result> { + }} + #[inline] pub fn create_with_token_and_account(&self, token: &HStringArg, webAccount: &super::super::super::credentials::WebAccount) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithTokenAndAccount)(self as *const _ as *mut _, 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(&self, token: &HStringArg, webAccount: &super::super::super::credentials::WebAccount, error: &WebProviderError) -> Result> { + }} + #[inline] pub fn create_with_token_account_and_error(&self, token: &HStringArg, webAccount: &super::super::super::credentials::WebAccount, error: &WebProviderError) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithTokenAccountAndError)(self as *const _ as *mut _, 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 @@ -2769,39 +2769,39 @@ RT_ENUM! { enum BinaryStringEncoding: i32 { RT_CLASS!{static class CryptographicBuffer} impl RtActivatable for CryptographicBuffer {} impl CryptographicBuffer { - #[cfg(feature="windows-storage")] #[inline] pub fn compare(object1: &super::super::storage::streams::IBuffer, object2: &super::super::storage::streams::IBuffer) -> Result { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn compare(object1: &super::super::storage::streams::IBuffer, object2: &super::super::storage::streams::IBuffer) -> Result { >::get_activation_factory().compare(object1, object2) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn generate_random(length: u32) -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn generate_random(length: u32) -> Result>> { >::get_activation_factory().generate_random(length) - }} - #[inline] pub fn generate_random_number() -> Result { unsafe { + } + #[inline] pub fn generate_random_number() -> Result { >::get_activation_factory().generate_random_number() - }} - #[cfg(feature="windows-storage")] #[inline] pub fn create_from_byte_array(value: &[u8]) -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_byte_array(value: &[u8]) -> Result>> { >::get_activation_factory().create_from_byte_array(value) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn copy_to_byte_array(buffer: &super::super::storage::streams::IBuffer) -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn copy_to_byte_array(buffer: &super::super::storage::streams::IBuffer) -> Result> { >::get_activation_factory().copy_to_byte_array(buffer) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn decode_from_hex_string(value: &HStringArg) -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn decode_from_hex_string(value: &HStringArg) -> Result>> { >::get_activation_factory().decode_from_hex_string(value) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn encode_to_hex_string(buffer: &super::super::storage::streams::IBuffer) -> Result { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn encode_to_hex_string(buffer: &super::super::storage::streams::IBuffer) -> Result { >::get_activation_factory().encode_to_hex_string(buffer) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn decode_from_base64_string(value: &HStringArg) -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn decode_from_base64_string(value: &HStringArg) -> Result>> { >::get_activation_factory().decode_from_base64_string(value) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn encode_to_base64_string(buffer: &super::super::storage::streams::IBuffer) -> Result { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn encode_to_base64_string(buffer: &super::super::storage::streams::IBuffer) -> Result { >::get_activation_factory().encode_to_base64_string(buffer) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn convert_string_to_binary(value: &HStringArg, encoding: BinaryStringEncoding) -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn convert_string_to_binary(value: &HStringArg, encoding: BinaryStringEncoding) -> Result>> { >::get_activation_factory().convert_string_to_binary(value, encoding) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn convert_binary_to_string(encoding: BinaryStringEncoding, buffer: &super::super::storage::streams::IBuffer) -> Result { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn convert_binary_to_string(encoding: BinaryStringEncoding, buffer: &super::super::storage::streams::IBuffer) -> Result { >::get_activation_factory().convert_binary_to_string(encoding, buffer) - }} + } } DEFINE_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]) [CLSID_CryptographicBuffer]); DEFINE_IID!(IID_ICryptographicBufferStatics, 839613986, 15536, 19679, 134, 99, 29, 40, 145, 0, 101, 235); @@ -2819,68 +2819,68 @@ RT_INTERFACE!{static interface ICryptographicBufferStatics(ICryptographicBufferS #[cfg(feature="windows-storage")] fn ConvertBinaryToString(&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(&self, object1: &super::super::storage::streams::IBuffer, object2: &super::super::storage::streams::IBuffer) -> Result { + #[cfg(feature="windows-storage")] #[inline] pub fn compare(&self, object1: &super::super::storage::streams::IBuffer, object2: &super::super::storage::streams::IBuffer) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).Compare)(self as *const _ as *mut _, 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(&self, length: u32) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn generate_random(&self, length: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GenerateRandom)(self as *const _ as *mut _, length, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn generate_random_number(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn generate_random_number(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GenerateRandomNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn create_from_byte_array(&self, value: &[u8]) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_byte_array(&self, value: &[u8]) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromByteArray)(self as *const _ as *mut _, 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(&self, buffer: &super::super::storage::streams::IBuffer) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn copy_to_byte_array(&self, buffer: &super::super::storage::streams::IBuffer) -> Result> { unsafe { let mut valueSize = 0; let mut value = null_mut(); let hr = ((*self.lpVtbl).CopyToByteArray)(self as *const _ as *mut _, 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(&self, value: &HStringArg) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn decode_from_hex_string(&self, value: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DecodeFromHexString)(self as *const _ as *mut _, 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(&self, buffer: &super::super::storage::streams::IBuffer) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn encode_to_hex_string(&self, buffer: &super::super::storage::streams::IBuffer) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).EncodeToHexString)(self as *const _ as *mut _, 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(&self, value: &HStringArg) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn decode_from_base64_string(&self, value: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DecodeFromBase64String)(self as *const _ as *mut _, 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(&self, buffer: &super::super::storage::streams::IBuffer) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn encode_to_base64_string(&self, buffer: &super::super::storage::streams::IBuffer) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).EncodeToBase64String)(self as *const _ as *mut _, 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(&self, value: &HStringArg, encoding: BinaryStringEncoding) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn convert_string_to_binary(&self, value: &HStringArg, encoding: BinaryStringEncoding) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConvertStringToBinary)(self as *const _ as *mut _, 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(&self, encoding: BinaryStringEncoding, buffer: &super::super::storage::streams::IBuffer) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn convert_binary_to_string(&self, encoding: BinaryStringEncoding, buffer: &super::super::storage::streams::IBuffer) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConvertBinaryToString)(self as *const _ as *mut _, encoding, buffer as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } pub mod certificates { // Windows.Security.Cryptography.Certificates use ::prelude::*; 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(&self, certificates: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn BuildChainWithParametersAsync(&self, certificates: *mut ::rt::gen::windows::foundation::collections::IIterable, parameters: *mut ChainBuildingParameters, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn BuildChainAsync(&self, certificates: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn BuildChainWithParametersAsync(&self, certificates: *mut foundation::collections::IIterable, parameters: *mut ChainBuildingParameters, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn get_SerialNumber(&self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT, fn GetHashValue(&self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT, fn GetHashValueWithAlgorithm(&self, hashAlgorithmName: HSTRING, outSize: *mut u32, out: *mut *mut u8) -> HRESULT, @@ -2890,94 +2890,94 @@ RT_INTERFACE!{interface ICertificate(ICertificateVtbl): IInspectable(IInspectabl fn get_Issuer(&self, out: *mut HSTRING) -> HRESULT, fn get_HasPrivateKey(&self, out: *mut bool) -> HRESULT, fn get_IsStronglyProtected(&self, out: *mut bool) -> HRESULT, - fn get_ValidFrom(&self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, - fn get_ValidTo(&self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, - fn get_EnhancedKeyUsages(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_ValidFrom(&self, out: *mut foundation::DateTime) -> HRESULT, + fn get_ValidTo(&self, out: *mut foundation::DateTime) -> HRESULT, + fn get_EnhancedKeyUsages(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn put_FriendlyName(&self, value: HSTRING) -> HRESULT, fn get_FriendlyName(&self, out: *mut HSTRING) -> HRESULT }} impl ICertificate { - #[inline] pub unsafe fn build_chain_async(&self, certificates: &::rt::gen::windows::foundation::collections::IIterable) -> Result>> { + #[inline] pub fn build_chain_async(&self, certificates: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).BuildChainAsync)(self as *const _ as *mut _, 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(&self, certificates: &::rt::gen::windows::foundation::collections::IIterable, parameters: &ChainBuildingParameters) -> Result>> { + }} + #[inline] pub fn build_chain_with_parameters_async(&self, certificates: &foundation::collections::IIterable, parameters: &ChainBuildingParameters) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).BuildChainWithParametersAsync)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[inline] pub fn get_serial_number(&self) -> Result> { unsafe { let mut outSize = 0; let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SerialNumber)(self as *const _ as *mut _, &mut outSize, &mut out); if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_hash_value(&self) -> Result> { + }} + #[inline] pub fn get_hash_value(&self) -> Result> { unsafe { let mut outSize = 0; let mut out = null_mut(); let hr = ((*self.lpVtbl).GetHashValue)(self as *const _ as *mut _, &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(&self, hashAlgorithmName: &HStringArg) -> Result> { + }} + #[inline] pub fn get_hash_value_with_algorithm(&self, hashAlgorithmName: &HStringArg) -> Result> { unsafe { let mut outSize = 0; let mut out = null_mut(); let hr = ((*self.lpVtbl).GetHashValueWithAlgorithm)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_certificate_blob(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCertificateBlob)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_subject(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_subject(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Subject)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_issuer(&self) -> Result { + }} + #[inline] pub fn get_issuer(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Issuer)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_private_key(&self) -> Result { + }} + #[inline] pub fn get_has_private_key(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasPrivateKey)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_strongly_protected(&self) -> Result { + }} + #[inline] pub fn get_is_strongly_protected(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsStronglyProtected)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_valid_from(&self) -> Result<::rt::gen::windows::foundation::DateTime> { + }} + #[inline] pub fn get_valid_from(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ValidFrom)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_valid_to(&self) -> Result<::rt::gen::windows::foundation::DateTime> { + }} + #[inline] pub fn get_valid_to(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ValidTo)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_enhanced_key_usages(&self) -> Result>> { + }} + #[inline] pub fn get_enhanced_key_usages(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EnhancedKeyUsages)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_friendly_name(&self, value: &HStringArg) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_friendly_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FriendlyName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_friendly_name(&self) -> Result { + }} + #[inline] pub fn get_friendly_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FriendlyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class Certificate: ICertificate} impl RtActivatable for Certificate {} impl Certificate { - #[cfg(feature="windows-storage")] #[inline] pub fn create_certificate(certBlob: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn create_certificate(certBlob: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { >::get_activation_factory().create_certificate(certBlob) - }} + } } DEFINE_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]) [CLSID_Certificate]); DEFINE_IID!(IID_ICertificate2, 397948748, 35365, 19862, 164, 146, 143, 194, 154, 196, 253, 166); @@ -2990,36 +2990,36 @@ RT_INTERFACE!{interface ICertificate2(ICertificate2Vtbl): IInspectable(IInspecta fn get_SubjectAlternativeName(&self, out: *mut *mut SubjectAlternativeNameInfo) -> HRESULT }} impl ICertificate2 { - #[inline] pub unsafe fn get_is_security_device_bound(&self) -> Result { + #[inline] pub fn get_is_security_device_bound(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSecurityDeviceBound)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_key_usages(&self) -> Result> { + }} + #[inline] pub fn get_key_usages(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_KeyUsages)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_key_algorithm_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_key_algorithm_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_KeyAlgorithmName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_signature_algorithm_name(&self) -> Result { + }} + #[inline] pub fn get_signature_algorithm_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SignatureAlgorithmName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_signature_hash_algorithm_name(&self) -> Result { + }} + #[inline] pub fn get_signature_hash_algorithm_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SignatureHashAlgorithmName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_subject_alternative_name(&self) -> Result> { + }} + #[inline] pub fn get_subject_alternative_name(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SubjectAlternativeName)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_ICertificate3, 3193022822, 44639, 18002, 172, 231, 198, 215, 231, 114, 76, 243); RT_INTERFACE!{interface ICertificate3(ICertificate3Vtbl): IInspectable(IInspectableVtbl) [IID_ICertificate3] { @@ -3028,44 +3028,44 @@ RT_INTERFACE!{interface ICertificate3(ICertificate3Vtbl): IInspectable(IInspecta fn get_KeyStorageProviderName(&self, out: *mut HSTRING) -> HRESULT }} impl ICertificate3 { - #[inline] pub unsafe fn get_is_per_user(&self) -> Result { + #[inline] pub fn get_is_per_user(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPerUser)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_store_name(&self) -> Result { + }} + #[inline] pub fn get_store_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StoreName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_key_storage_provider_name(&self) -> Result { + }} + #[inline] pub fn get_key_storage_provider_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_KeyStorageProviderName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } 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(&self, out: *mut ChainValidationResult) -> HRESULT, fn ValidateWithParameters(&self, parameter: *mut ChainValidationParameters, out: *mut ChainValidationResult) -> HRESULT, - fn GetCertificates(&self, includeRoot: bool, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn GetCertificates(&self, includeRoot: bool, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl ICertificateChain { - #[inline] pub unsafe fn validate(&self) -> Result { + #[inline] pub fn validate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).Validate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn validate_with_parameters(&self, parameter: &ChainValidationParameters) -> Result { + }} + #[inline] pub fn validate_with_parameters(&self, parameter: &ChainValidationParameters) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ValidateWithParameters)(self as *const _ as *mut _, parameter as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_certificates(&self, includeRoot: bool) -> Result>> { + }} + #[inline] pub fn get_certificates(&self, includeRoot: bool) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCertificates)(self as *const _ as *mut _, includeRoot, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CertificateChain: ICertificateChain} RT_ENUM! { enum CertificateChainPolicy: i32 { @@ -3076,76 +3076,76 @@ impl RtActivatable for CertificateEnrollme impl RtActivatable for CertificateEnrollmentManager {} impl RtActivatable for CertificateEnrollmentManager {} impl CertificateEnrollmentManager { - #[inline] pub fn create_request_async(request: &CertificateRequestProperties) -> Result>> { unsafe { + #[inline] pub fn create_request_async(request: &CertificateRequestProperties) -> Result>> { >::get_activation_factory().create_request_async(request) - }} - #[inline] pub fn install_certificate_async(certificate: &HStringArg, installOption: InstallOptions) -> Result> { unsafe { + } + #[inline] pub fn install_certificate_async(certificate: &HStringArg, installOption: InstallOptions) -> Result> { >::get_activation_factory().install_certificate_async(certificate, installOption) - }} - #[inline] pub fn import_pfx_data_async(pfxData: &HStringArg, password: &HStringArg, exportable: ExportOption, keyProtectionLevel: KeyProtectionLevel, installOption: InstallOptions, friendlyName: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn import_pfx_data_async(pfxData: &HStringArg, password: &HStringArg, exportable: ExportOption, keyProtectionLevel: KeyProtectionLevel, installOption: InstallOptions, friendlyName: &HStringArg) -> Result> { >::get_activation_factory().import_pfx_data_async(pfxData, password, exportable, keyProtectionLevel, installOption, friendlyName) - }} - #[inline] pub fn get_user_certificate_enrollment_manager() -> Result> { unsafe { + } + #[inline] pub fn get_user_certificate_enrollment_manager() -> Result>> { >::get_activation_factory().get_user_certificate_enrollment_manager() - }} - #[inline] pub fn import_pfx_data_to_ksp_async(pfxData: &HStringArg, password: &HStringArg, exportable: ExportOption, keyProtectionLevel: KeyProtectionLevel, installOption: InstallOptions, friendlyName: &HStringArg, keyStorageProvider: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn import_pfx_data_to_ksp_async(pfxData: &HStringArg, password: &HStringArg, exportable: ExportOption, keyProtectionLevel: KeyProtectionLevel, installOption: InstallOptions, friendlyName: &HStringArg, keyStorageProvider: &HStringArg) -> Result> { >::get_activation_factory().import_pfx_data_to_ksp_async(pfxData, password, exportable, keyProtectionLevel, installOption, friendlyName, keyStorageProvider) - }} - #[inline] pub fn import_pfx_data_to_ksp_with_parameters_async(pfxData: &HStringArg, password: &HStringArg, pfxImportParameters: &PfxImportParameters) -> Result> { unsafe { + } + #[inline] pub fn import_pfx_data_to_ksp_with_parameters_async(pfxData: &HStringArg, password: &HStringArg, pfxImportParameters: &PfxImportParameters) -> Result> { >::get_activation_factory().import_pfx_data_to_ksp_with_parameters_async(pfxData, password, pfxImportParameters) - }} + } } DEFINE_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]) [CLSID_CertificateEnrollmentManager]); 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(&self, request: *mut CertificateRequestProperties, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn InstallCertificateAsync(&self, certificate: HSTRING, installOption: InstallOptions, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ImportPfxDataAsync(&self, pfxData: HSTRING, password: HSTRING, exportable: ExportOption, keyProtectionLevel: KeyProtectionLevel, installOption: InstallOptions, friendlyName: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn CreateRequestAsync(&self, request: *mut CertificateRequestProperties, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn InstallCertificateAsync(&self, certificate: HSTRING, installOption: InstallOptions, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ImportPfxDataAsync(&self, pfxData: HSTRING, password: HSTRING, exportable: ExportOption, keyProtectionLevel: KeyProtectionLevel, installOption: InstallOptions, friendlyName: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl ICertificateEnrollmentManagerStatics { - #[inline] pub unsafe fn create_request_async(&self, request: &CertificateRequestProperties) -> Result>> { + #[inline] pub fn create_request_async(&self, request: &CertificateRequestProperties) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateRequestAsync)(self as *const _ as *mut _, 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(&self, certificate: &HStringArg, installOption: InstallOptions) -> Result> { + }} + #[inline] pub fn install_certificate_async(&self, certificate: &HStringArg, installOption: InstallOptions) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).InstallCertificateAsync)(self as *const _ as *mut _, certificate.get(), installOption, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn import_pfx_data_async(&self, pfxData: &HStringArg, password: &HStringArg, exportable: ExportOption, keyProtectionLevel: KeyProtectionLevel, installOption: InstallOptions, friendlyName: &HStringArg) -> Result> { + }} + #[inline] pub fn import_pfx_data_async(&self, pfxData: &HStringArg, password: &HStringArg, exportable: ExportOption, keyProtectionLevel: KeyProtectionLevel, installOption: InstallOptions, friendlyName: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ImportPfxDataAsync)(self as *const _ as *mut _, 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(&self, out: *mut *mut UserCertificateEnrollmentManager) -> HRESULT, - fn ImportPfxDataToKspAsync(&self, pfxData: HSTRING, password: HSTRING, exportable: ExportOption, keyProtectionLevel: KeyProtectionLevel, installOption: InstallOptions, friendlyName: HSTRING, keyStorageProvider: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn ImportPfxDataToKspAsync(&self, pfxData: HSTRING, password: HSTRING, exportable: ExportOption, keyProtectionLevel: KeyProtectionLevel, installOption: InstallOptions, friendlyName: HSTRING, keyStorageProvider: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl ICertificateEnrollmentManagerStatics2 { - #[inline] pub unsafe fn get_user_certificate_enrollment_manager(&self) -> Result> { + #[inline] pub fn get_user_certificate_enrollment_manager(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UserCertificateEnrollmentManager)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn import_pfx_data_to_ksp_async(&self, pfxData: &HStringArg, password: &HStringArg, exportable: ExportOption, keyProtectionLevel: KeyProtectionLevel, installOption: InstallOptions, friendlyName: &HStringArg, keyStorageProvider: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn import_pfx_data_to_ksp_async(&self, pfxData: &HStringArg, password: &HStringArg, exportable: ExportOption, keyProtectionLevel: KeyProtectionLevel, installOption: InstallOptions, friendlyName: &HStringArg, keyStorageProvider: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ImportPfxDataToKspAsync)(self as *const _ as *mut _, 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_ICertificateEnrollmentManagerStatics3, 4260135614, 24956, 16986, 183, 45, 57, 139, 38, 172, 114, 100); RT_INTERFACE!{static interface ICertificateEnrollmentManagerStatics3(ICertificateEnrollmentManagerStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_ICertificateEnrollmentManagerStatics3] { - fn ImportPfxDataToKspWithParametersAsync(&self, pfxData: HSTRING, password: HSTRING, pfxImportParameters: *mut PfxImportParameters, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn ImportPfxDataToKspWithParametersAsync(&self, pfxData: HSTRING, password: HSTRING, pfxImportParameters: *mut PfxImportParameters, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl ICertificateEnrollmentManagerStatics3 { - #[inline] pub unsafe fn import_pfx_data_to_ksp_with_parameters_async(&self, pfxData: &HStringArg, password: &HStringArg, pfxImportParameters: &PfxImportParameters) -> Result> { + #[inline] pub fn import_pfx_data_to_ksp_with_parameters_async(&self, pfxData: &HStringArg, password: &HStringArg, pfxImportParameters: &PfxImportParameters) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ImportPfxDataToKspWithParametersAsync)(self as *const _ as *mut _, 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_ICertificateExtension, 2228160086, 43494, 17741, 142, 69, 46, 167, 196, 188, 213, 59); RT_INTERFACE!{interface ICertificateExtension(ICertificateExtensionVtbl): IInspectable(IInspectableVtbl) [IID_ICertificateExtension] { @@ -3158,37 +3158,37 @@ RT_INTERFACE!{interface ICertificateExtension(ICertificateExtensionVtbl): IInspe fn put_Value(&self, valueSize: u32, value: *mut u8) -> HRESULT }} impl ICertificateExtension { - #[inline] pub unsafe fn get_object_id(&self) -> Result { + #[inline] pub fn get_object_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ObjectId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_object_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_object_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ObjectId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_critical(&self) -> Result { + }} + #[inline] pub fn get_is_critical(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCritical)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_critical(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_critical(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsCritical)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn encode_value(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn encode_value(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).EncodeValue)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result> { + }} + #[inline] pub fn get_value(&self) -> Result> { unsafe { let mut outSize = 0; let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut outSize, &mut out); if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_value(&self, value: &[u8]) -> Result<()> { + }} + #[inline] pub fn set_value(&self, value: &[u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Value)(self as *const _ as *mut _, value.len() as u32, value.as_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CertificateExtension: ICertificateExtension} impl RtActivatable for CertificateExtension {} @@ -3198,11 +3198,11 @@ RT_INTERFACE!{static interface ICertificateFactory(ICertificateFactoryVtbl): IIn #[cfg(feature="windows-storage")] fn CreateCertificate(&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(&self, certBlob: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn create_certificate(&self, certBlob: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateCertificate)(self as *const _ as *mut _, certBlob as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } 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] { @@ -3224,85 +3224,85 @@ RT_INTERFACE!{interface ICertificateKeyUsages(ICertificateKeyUsagesVtbl): IInspe fn put_DigitalSignature(&self, value: bool) -> HRESULT }} impl ICertificateKeyUsages { - #[inline] pub unsafe fn get_encipher_only(&self) -> Result { + #[inline] pub fn get_encipher_only(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EncipherOnly)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_encipher_only(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_encipher_only(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_EncipherOnly)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_crl_sign(&self) -> Result { + }} + #[inline] pub fn get_crl_sign(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CrlSign)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_crl_sign(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_crl_sign(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CrlSign)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_key_certificate_sign(&self) -> Result { + }} + #[inline] pub fn get_key_certificate_sign(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_KeyCertificateSign)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_key_certificate_sign(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_key_certificate_sign(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_KeyCertificateSign)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_key_agreement(&self) -> Result { + }} + #[inline] pub fn get_key_agreement(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_KeyAgreement)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_key_agreement(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_key_agreement(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_KeyAgreement)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_data_encipherment(&self) -> Result { + }} + #[inline] pub fn get_data_encipherment(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DataEncipherment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_data_encipherment(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_data_encipherment(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DataEncipherment)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_key_encipherment(&self) -> Result { + }} + #[inline] pub fn get_key_encipherment(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_KeyEncipherment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_key_encipherment(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_key_encipherment(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_KeyEncipherment)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_non_repudiation(&self) -> Result { + }} + #[inline] pub fn get_non_repudiation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NonRepudiation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_non_repudiation(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_non_repudiation(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_NonRepudiation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_digital_signature(&self) -> Result { + }} + #[inline] pub fn get_digital_signature(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DigitalSignature)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_digital_signature(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_digital_signature(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DigitalSignature)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CertificateKeyUsages: ICertificateKeyUsages} impl RtActivatable for CertificateKeyUsages {} DEFINE_CLSID!(CertificateKeyUsages(&[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,75,101,121,85,115,97,103,101,115,0]) [CLSID_CertificateKeyUsages]); 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(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, + fn get_EnhancedKeyUsages(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_IssuerName(&self, out: *mut HSTRING) -> HRESULT, fn put_IssuerName(&self, value: HSTRING) -> HRESULT, fn get_FriendlyName(&self, out: *mut HSTRING) -> HRESULT, @@ -3313,47 +3313,47 @@ RT_INTERFACE!{interface ICertificateQuery(ICertificateQueryVtbl): IInspectable(I fn put_HardwareOnly(&self, value: bool) -> HRESULT }} impl ICertificateQuery { - #[inline] pub unsafe fn get_enhanced_key_usages(&self) -> Result>> { + #[inline] pub fn get_enhanced_key_usages(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EnhancedKeyUsages)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_issuer_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_issuer_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IssuerName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_issuer_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_issuer_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IssuerName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_friendly_name(&self) -> Result { + }} + #[inline] pub fn get_friendly_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FriendlyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_friendly_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_friendly_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FriendlyName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_thumbprint(&self) -> Result> { + }} + #[inline] pub fn get_thumbprint(&self) -> Result> { unsafe { let mut outSize = 0; let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Thumbprint)(self as *const _ as *mut _, &mut outSize, &mut out); if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_thumbprint(&self, value: &[u8]) -> Result<()> { + }} + #[inline] pub fn set_thumbprint(&self, value: &[u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Thumbprint)(self as *const _ as *mut _, value.len() as u32, value.as_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_hardware_only(&self) -> Result { + }} + #[inline] pub fn get_hardware_only(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HardwareOnly)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_hardware_only(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_hardware_only(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_HardwareOnly)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CertificateQuery: ICertificateQuery} impl RtActivatable for CertificateQuery {} @@ -3368,33 +3368,33 @@ RT_INTERFACE!{interface ICertificateQuery2(ICertificateQuery2Vtbl): IInspectable fn put_StoreName(&self, value: HSTRING) -> HRESULT }} impl ICertificateQuery2 { - #[inline] pub unsafe fn get_include_duplicates(&self) -> Result { + #[inline] pub fn get_include_duplicates(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IncludeDuplicates)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_include_duplicates(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_include_duplicates(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IncludeDuplicates)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_include_expired_certificates(&self) -> Result { + }} + #[inline] pub fn get_include_expired_certificates(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IncludeExpiredCertificates)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_include_expired_certificates(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_include_expired_certificates(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IncludeExpiredCertificates)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_store_name(&self) -> Result { + }} + #[inline] pub fn get_store_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StoreName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_store_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_store_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StoreName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ICertificateRequestProperties, 1216251126, 38114, 19918, 136, 51, 26, 112, 10, 55, 162, 154); RT_INTERFACE!{interface ICertificateRequestProperties(ICertificateRequestPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_ICertificateRequestProperties] { @@ -3418,87 +3418,87 @@ RT_INTERFACE!{interface ICertificateRequestProperties(ICertificateRequestPropert fn put_KeyStorageProviderName(&self, value: HSTRING) -> HRESULT }} impl ICertificateRequestProperties { - #[inline] pub unsafe fn get_subject(&self) -> Result { + #[inline] pub fn get_subject(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Subject)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_subject(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_subject(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Subject)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_key_algorithm_name(&self) -> Result { + }} + #[inline] pub fn get_key_algorithm_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_KeyAlgorithmName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_key_algorithm_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_key_algorithm_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_KeyAlgorithmName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_key_size(&self) -> Result { + }} + #[inline] pub fn get_key_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_KeySize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_key_size(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_key_size(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_KeySize)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_friendly_name(&self) -> Result { + }} + #[inline] pub fn get_friendly_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FriendlyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_friendly_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_friendly_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FriendlyName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_hash_algorithm_name(&self) -> Result { + }} + #[inline] pub fn get_hash_algorithm_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HashAlgorithmName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_hash_algorithm_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_hash_algorithm_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_HashAlgorithmName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_exportable(&self) -> Result { + }} + #[inline] pub fn get_exportable(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Exportable)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_exportable(&self, value: ExportOption) -> Result<()> { + }} + #[inline] pub fn set_exportable(&self, value: ExportOption) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Exportable)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_key_usages(&self) -> Result { + }} + #[inline] pub fn get_key_usages(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_KeyUsages)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_key_usages(&self, value: EnrollKeyUsages) -> Result<()> { + }} + #[inline] pub fn set_key_usages(&self, value: EnrollKeyUsages) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_KeyUsages)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_key_protection_level(&self) -> Result { + }} + #[inline] pub fn get_key_protection_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_KeyProtectionLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_key_protection_level(&self, value: KeyProtectionLevel) -> Result<()> { + }} + #[inline] pub fn set_key_protection_level(&self, value: KeyProtectionLevel) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_KeyProtectionLevel)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_key_storage_provider_name(&self) -> Result { + }} + #[inline] pub fn get_key_storage_provider_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_KeyStorageProviderName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_key_storage_provider_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_key_storage_provider_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_KeyStorageProviderName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CertificateRequestProperties: ICertificateRequestProperties} impl RtActivatable for CertificateRequestProperties {} @@ -3513,33 +3513,33 @@ RT_INTERFACE!{interface ICertificateRequestProperties2(ICertificateRequestProper fn put_AttestationCredentialCertificate(&self, value: *mut Certificate) -> HRESULT }} impl ICertificateRequestProperties2 { - #[inline] pub unsafe fn get_smartcard_reader_name(&self) -> Result { + #[inline] pub fn get_smartcard_reader_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SmartcardReaderName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_smartcard_reader_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_smartcard_reader_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SmartcardReaderName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_signing_certificate(&self) -> Result> { + }} + #[inline] pub fn get_signing_certificate(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SigningCertificate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_signing_certificate(&self, value: &Certificate) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_signing_certificate(&self, value: &Certificate) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SigningCertificate)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_attestation_credential_certificate(&self) -> Result> { + }} + #[inline] pub fn get_attestation_credential_certificate(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AttestationCredentialCertificate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_attestation_credential_certificate(&self, value: &Certificate) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_attestation_credential_certificate(&self, value: &Certificate) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AttestationCredentialCertificate)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ICertificateRequestProperties3, 3867670038, 29517, 18097, 157, 76, 110, 223, 219, 252, 132, 91); RT_INTERFACE!{interface ICertificateRequestProperties3(ICertificateRequestProperties3Vtbl): IInspectable(IInspectableVtbl) [IID_ICertificateRequestProperties3] { @@ -3555,74 +3555,74 @@ RT_INTERFACE!{interface ICertificateRequestProperties3(ICertificateRequestProper fn put_UseExistingKey(&self, value: bool) -> HRESULT }} impl ICertificateRequestProperties3 { - #[inline] pub unsafe fn get_curve_name(&self) -> Result { + #[inline] pub fn get_curve_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CurveName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_curve_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_curve_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CurveName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_curve_parameters(&self) -> Result> { + }} + #[inline] pub fn get_curve_parameters(&self) -> Result> { unsafe { let mut outSize = 0; let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CurveParameters)(self as *const _ as *mut _, &mut outSize, &mut out); if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_curve_parameters(&self, value: &[u8]) -> Result<()> { + }} + #[inline] pub fn set_curve_parameters(&self, value: &[u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CurveParameters)(self as *const _ as *mut _, 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(&self) -> Result { + }} + #[inline] pub fn get_container_name_prefix(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContainerNamePrefix)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_container_name_prefix(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_container_name_prefix(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ContainerNamePrefix)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_container_name(&self) -> Result { + }} + #[inline] pub fn get_container_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContainerName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_container_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_container_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ContainerName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_use_existing_key(&self) -> Result { + }} + #[inline] pub fn get_use_existing_key(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UseExistingKey)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_use_existing_key(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_use_existing_key(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_UseExistingKey)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ICertificateRequestProperties4, 1312987858, 7265, 20458, 184, 254, 19, 95, 177, 156, 220, 228); RT_INTERFACE!{interface ICertificateRequestProperties4(ICertificateRequestProperties4Vtbl): IInspectable(IInspectableVtbl) [IID_ICertificateRequestProperties4] { - fn get_SuppressedDefaults(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, + fn get_SuppressedDefaults(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_SubjectAlternativeName(&self, out: *mut *mut SubjectAlternativeNameInfo) -> HRESULT, - fn get_Extensions(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT + fn get_Extensions(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl ICertificateRequestProperties4 { - #[inline] pub unsafe fn get_suppressed_defaults(&self) -> Result>> { + #[inline] pub fn get_suppressed_defaults(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SuppressedDefaults)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_subject_alternative_name(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_subject_alternative_name(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SubjectAlternativeName)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_extensions(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_extensions(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Extensions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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] { @@ -3630,14 +3630,14 @@ RT_INTERFACE!{interface ICertificateStore(ICertificateStoreVtbl): IInspectable(I fn Delete(&self, certificate: *mut Certificate) -> HRESULT }} impl ICertificateStore { - #[inline] pub unsafe fn add(&self, certificate: &Certificate) -> Result<()> { + #[inline] pub fn add(&self, certificate: &Certificate) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Add)(self as *const _ as *mut _, certificate as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn delete(&self, certificate: &Certificate) -> Result<()> { + }} + #[inline] pub fn delete(&self, certificate: &Certificate) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Delete)(self as *const _ as *mut _, certificate as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CertificateStore: ICertificateStore} DEFINE_IID!(IID_ICertificateStore2, 3353775690, 16765, 19738, 186, 189, 21, 104, 126, 84, 153, 116); @@ -3645,87 +3645,87 @@ RT_INTERFACE!{interface ICertificateStore2(ICertificateStore2Vtbl): IInspectable fn get_Name(&self, out: *mut HSTRING) -> HRESULT }} impl ICertificateStore2 { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class CertificateStores} impl RtActivatable for CertificateStores {} impl RtActivatable for CertificateStores {} impl CertificateStores { - #[inline] pub fn find_all_async() -> Result>>> { unsafe { + #[inline] pub fn find_all_async() -> Result>>> { >::get_activation_factory().find_all_async() - }} - #[inline] pub fn find_all_with_query_async(query: &CertificateQuery) -> Result>>> { unsafe { + } + #[inline] pub fn find_all_with_query_async(query: &CertificateQuery) -> Result>>> { >::get_activation_factory().find_all_with_query_async(query) - }} - #[inline] pub fn get_trusted_root_certification_authorities() -> Result> { unsafe { + } + #[inline] pub fn get_trusted_root_certification_authorities() -> Result>> { >::get_activation_factory().get_trusted_root_certification_authorities() - }} - #[inline] pub fn get_intermediate_certification_authorities() -> Result> { unsafe { + } + #[inline] pub fn get_intermediate_certification_authorities() -> Result>> { >::get_activation_factory().get_intermediate_certification_authorities() - }} - #[inline] pub fn get_store_by_name(storeName: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn get_store_by_name(storeName: &HStringArg) -> Result>> { >::get_activation_factory().get_store_by_name(storeName) - }} - #[inline] pub fn get_user_store_by_name(storeName: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn get_user_store_by_name(storeName: &HStringArg) -> Result>> { >::get_activation_factory().get_user_store_by_name(storeName) - }} + } } DEFINE_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]) [CLSID_CertificateStores]); 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(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, - fn FindAllWithQueryAsync(&self, query: *mut CertificateQuery, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, + fn FindAllAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn FindAllWithQueryAsync(&self, query: *mut CertificateQuery, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, fn get_TrustedRootCertificationAuthorities(&self, out: *mut *mut CertificateStore) -> HRESULT, fn get_IntermediateCertificationAuthorities(&self, out: *mut *mut CertificateStore) -> HRESULT, fn GetStoreByName(&self, storeName: HSTRING, out: *mut *mut CertificateStore) -> HRESULT }} impl ICertificateStoresStatics { - #[inline] pub unsafe fn find_all_async(&self) -> Result>>> { + #[inline] pub fn find_all_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_all_with_query_async(&self, query: &CertificateQuery) -> Result>>> { + }} + #[inline] pub fn find_all_with_query_async(&self, query: &CertificateQuery) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllWithQueryAsync)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[inline] pub fn get_trusted_root_certification_authorities(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TrustedRootCertificationAuthorities)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_intermediate_certification_authorities(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_intermediate_certification_authorities(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IntermediateCertificationAuthorities)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_store_by_name(&self, storeName: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_store_by_name(&self, storeName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetStoreByName)(self as *const _ as *mut _, storeName.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, storeName: HSTRING, out: *mut *mut UserCertificateStore) -> HRESULT }} impl ICertificateStoresStatics2 { - #[inline] pub unsafe fn get_user_store_by_name(&self, storeName: &HStringArg) -> Result> { + #[inline] pub fn get_user_store_by_name(&self, storeName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetUserStoreByName)(self as *const _ as *mut _, storeName.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, - fn get_ValidationTimestamp(&self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT, - fn put_ValidationTimestamp(&self, value: ::rt::gen::windows::foundation::DateTime) -> HRESULT, + fn get_EnhancedKeyUsages(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_ValidationTimestamp(&self, out: *mut foundation::DateTime) -> HRESULT, + fn put_ValidationTimestamp(&self, value: foundation::DateTime) -> HRESULT, fn get_RevocationCheckEnabled(&self, out: *mut bool) -> HRESULT, fn put_RevocationCheckEnabled(&self, value: bool) -> HRESULT, fn get_NetworkRetrievalEnabled(&self, out: *mut bool) -> HRESULT, @@ -3734,64 +3734,64 @@ RT_INTERFACE!{interface IChainBuildingParameters(IChainBuildingParametersVtbl): fn put_AuthorityInformationAccessEnabled(&self, value: bool) -> HRESULT, fn get_CurrentTimeValidationEnabled(&self, out: *mut bool) -> HRESULT, fn put_CurrentTimeValidationEnabled(&self, value: bool) -> HRESULT, - fn get_ExclusiveTrustRoots(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT + fn get_ExclusiveTrustRoots(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IChainBuildingParameters { - #[inline] pub unsafe fn get_enhanced_key_usages(&self) -> Result>> { + #[inline] pub fn get_enhanced_key_usages(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EnhancedKeyUsages)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_validation_timestamp(&self) -> Result<::rt::gen::windows::foundation::DateTime> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_validation_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ValidationTimestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_validation_timestamp(&self, value: ::rt::gen::windows::foundation::DateTime) -> Result<()> { + }} + #[inline] pub fn set_validation_timestamp(&self, value: foundation::DateTime) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ValidationTimestamp)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_revocation_check_enabled(&self) -> Result { + }} + #[inline] pub fn get_revocation_check_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RevocationCheckEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_revocation_check_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_revocation_check_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RevocationCheckEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_network_retrieval_enabled(&self) -> Result { + }} + #[inline] pub fn get_network_retrieval_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NetworkRetrievalEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_network_retrieval_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_network_retrieval_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_NetworkRetrievalEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_authority_information_access_enabled(&self) -> Result { + }} + #[inline] pub fn get_authority_information_access_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AuthorityInformationAccessEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_authority_information_access_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_authority_information_access_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AuthorityInformationAccessEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_time_validation_enabled(&self) -> Result { + }} + #[inline] pub fn get_current_time_validation_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CurrentTimeValidationEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_current_time_validation_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_current_time_validation_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CurrentTimeValidationEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_exclusive_trust_roots(&self) -> Result>> { + }} + #[inline] pub fn get_exclusive_trust_roots(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExclusiveTrustRoots)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ChainBuildingParameters: IChainBuildingParameters} impl RtActivatable for ChainBuildingParameters {} @@ -3804,24 +3804,24 @@ RT_INTERFACE!{interface IChainValidationParameters(IChainValidationParametersVtb #[cfg(feature="windows-networking")] fn put_ServerDnsName(&self, value: *mut ::rt::gen::windows::networking::HostName) -> HRESULT }} impl IChainValidationParameters { - #[inline] pub unsafe fn get_certificate_chain_policy(&self) -> Result { + #[inline] pub fn get_certificate_chain_policy(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CertificateChainPolicy)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_certificate_chain_policy(&self, value: CertificateChainPolicy) -> Result<()> { + }} + #[inline] pub fn set_certificate_chain_policy(&self, value: CertificateChainPolicy) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CertificateChainPolicy)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-networking")] #[inline] pub unsafe fn get_server_dns_name(&self) -> Result> { + }} + #[cfg(feature="windows-networking")] #[inline] pub fn get_server_dns_name(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServerDnsName)(self 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 set_server_dns_name(&self, value: &::rt::gen::windows::networking::HostName) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-networking")] #[inline] pub fn set_server_dns_name(&self, value: &::rt::gen::windows::networking::HostName) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ServerDnsName)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ChainValidationParameters: IChainValidationParameters} impl RtActivatable for ChainValidationParameters {} @@ -3831,43 +3831,43 @@ RT_ENUM! { enum ChainValidationResult: i32 { }} 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(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_Certificates(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_Content(&self, outSize: *mut u32, out: *mut *mut u8) -> HRESULT, - fn get_Signers(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_Signers(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn VerifySignature(&self, out: *mut SignatureValidationResult) -> HRESULT }} impl ICmsAttachedSignature { - #[inline] pub unsafe fn get_certificates(&self) -> Result>> { + #[inline] pub fn get_certificates(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Certificates)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_content(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_content(&self) -> Result> { unsafe { let mut outSize = 0; let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Content)(self as *const _ as *mut _, &mut outSize, &mut out); if hr == S_OK { Ok(ComArray::from_raw(outSize, out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_signers(&self) -> Result>> { + }} + #[inline] pub fn get_signers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Signers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn verify_signature(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn verify_signature(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).VerifySignature)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class CmsAttachedSignature: ICmsAttachedSignature} impl RtActivatable for CmsAttachedSignature {} impl RtActivatable for CmsAttachedSignature {} impl CmsAttachedSignature { - #[cfg(feature="windows-storage")] #[inline] pub fn create_cms_attached_signature(inputBlob: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn create_cms_attached_signature(inputBlob: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { >::get_activation_factory().create_cms_attached_signature(inputBlob) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn generate_signature_async(data: &::rt::gen::windows::storage::streams::IBuffer, signers: &::rt::gen::windows::foundation::collections::IIterable, certificates: &::rt::gen::windows::foundation::collections::IIterable) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn generate_signature_async(data: &::rt::gen::windows::storage::streams::IBuffer, signers: &foundation::collections::IIterable, certificates: &foundation::collections::IIterable) -> Result>> { >::get_activation_factory().generate_signature_async(data, signers, certificates) - }} + } } DEFINE_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]) [CLSID_CmsAttachedSignature]); DEFINE_IID!(IID_ICmsAttachedSignatureFactory, 3502832661, 63319, 19556, 163, 98, 82, 204, 28, 119, 207, 251); @@ -3875,56 +3875,56 @@ RT_INTERFACE!{static interface ICmsAttachedSignatureFactory(ICmsAttachedSignatur #[cfg(feature="windows-storage")] fn CreateCmsAttachedSignature(&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(&self, inputBlob: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn create_cms_attached_signature(&self, inputBlob: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateCmsAttachedSignature)(self as *const _ as *mut _, inputBlob as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&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 + #[cfg(feature="windows-storage")] fn GenerateSignatureAsync(&self, data: *mut ::rt::gen::windows::storage::streams::IBuffer, signers: *mut foundation::collections::IIterable, certificates: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation<::rt::gen::windows::storage::streams::IBuffer>) -> HRESULT }} impl ICmsAttachedSignatureStatics { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn generate_signature_async(&self, data: &::rt::gen::windows::storage::streams::IBuffer, signers: &::rt::gen::windows::foundation::collections::IIterable, certificates: &::rt::gen::windows::foundation::collections::IIterable) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn generate_signature_async(&self, data: &::rt::gen::windows::storage::streams::IBuffer, signers: &foundation::collections::IIterable, certificates: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GenerateSignatureAsync)(self as *const _ as *mut _, 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(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn get_Signers(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - #[cfg(feature="windows-storage")] fn VerifySignatureAsync(&self, data: *mut ::rt::gen::windows::storage::streams::IInputStream, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn get_Certificates(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_Signers(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + #[cfg(feature="windows-storage")] fn VerifySignatureAsync(&self, data: *mut ::rt::gen::windows::storage::streams::IInputStream, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ICmsDetachedSignature { - #[inline] pub unsafe fn get_certificates(&self) -> Result>> { + #[inline] pub fn get_certificates(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Certificates)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_signers(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_signers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Signers)(self 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_async(&self, data: &::rt::gen::windows::storage::streams::IInputStream) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn verify_signature_async(&self, data: &::rt::gen::windows::storage::streams::IInputStream) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).VerifySignatureAsync)(self as *const _ as *mut _, data as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class CmsDetachedSignature: ICmsDetachedSignature} impl RtActivatable for CmsDetachedSignature {} impl RtActivatable for CmsDetachedSignature {} impl CmsDetachedSignature { - #[cfg(feature="windows-storage")] #[inline] pub fn create_cms_detached_signature(inputBlob: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn create_cms_detached_signature(inputBlob: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { >::get_activation_factory().create_cms_detached_signature(inputBlob) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn generate_signature_async(data: &::rt::gen::windows::storage::streams::IInputStream, signers: &::rt::gen::windows::foundation::collections::IIterable, certificates: &::rt::gen::windows::foundation::collections::IIterable) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn generate_signature_async(data: &::rt::gen::windows::storage::streams::IInputStream, signers: &foundation::collections::IIterable, certificates: &foundation::collections::IIterable) -> Result>> { >::get_activation_factory().generate_signature_async(data, signers, certificates) - }} + } } DEFINE_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]) [CLSID_CmsDetachedSignature]); DEFINE_IID!(IID_ICmsDetachedSignatureFactory, 3299554563, 44671, 17287, 173, 25, 0, 241, 80, 228, 142, 187); @@ -3932,22 +3932,22 @@ RT_INTERFACE!{static interface ICmsDetachedSignatureFactory(ICmsDetachedSignatur #[cfg(feature="windows-storage")] fn CreateCmsDetachedSignature(&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(&self, inputBlob: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn create_cms_detached_signature(&self, inputBlob: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateCmsDetachedSignature)(self as *const _ as *mut _, inputBlob as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&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 + #[cfg(feature="windows-storage")] fn GenerateSignatureAsync(&self, data: *mut ::rt::gen::windows::storage::streams::IInputStream, signers: *mut foundation::collections::IIterable, certificates: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation<::rt::gen::windows::storage::streams::IBuffer>) -> HRESULT }} impl ICmsDetachedSignatureStatics { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn generate_signature_async(&self, data: &::rt::gen::windows::storage::streams::IInputStream, signers: &::rt::gen::windows::foundation::collections::IIterable, certificates: &::rt::gen::windows::foundation::collections::IIterable) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn generate_signature_async(&self, data: &::rt::gen::windows::storage::streams::IInputStream, signers: &foundation::collections::IIterable, certificates: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GenerateSignatureAsync)(self as *const _ as *mut _, 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_ICmsSignerInfo, 1355817179, 7471, 19482, 181, 197, 208, 24, 143, 249, 31, 71); RT_INTERFACE!{interface ICmsSignerInfo(ICmsSignerInfoVtbl): IInspectable(IInspectableVtbl) [IID_ICmsSignerInfo] { @@ -3958,29 +3958,29 @@ RT_INTERFACE!{interface ICmsSignerInfo(ICmsSignerInfoVtbl): IInspectable(IInspec fn get_TimestampInfo(&self, out: *mut *mut CmsTimestampInfo) -> HRESULT }} impl ICmsSignerInfo { - #[inline] pub unsafe fn get_certificate(&self) -> Result> { + #[inline] pub fn get_certificate(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Certificate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_certificate(&self, value: &Certificate) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_certificate(&self, value: &Certificate) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Certificate)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_hash_algorithm_name(&self) -> Result { + }} + #[inline] pub fn get_hash_algorithm_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HashAlgorithmName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_hash_algorithm_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_hash_algorithm_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_HashAlgorithmName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_timestamp_info(&self) -> Result> { + }} + #[inline] pub fn get_timestamp_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TimestampInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CmsSignerInfo: ICmsSignerInfo} impl RtActivatable for CmsSignerInfo {} @@ -3988,25 +3988,25 @@ DEFINE_CLSID!(CmsSignerInfo(&[87,105,110,100,111,119,115,46,83,101,99,117,114,10 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(&self, out: *mut *mut Certificate) -> HRESULT, - fn get_Certificates(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn get_Timestamp(&self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT + fn get_Certificates(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT }} impl ICmsTimestampInfo { - #[inline] pub unsafe fn get_signing_certificate(&self) -> Result> { + #[inline] pub fn get_signing_certificate(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SigningCertificate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_certificates(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_certificates(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Certificates)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_timestamp(&self) -> Result<::rt::gen::windows::foundation::DateTime> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class CmsTimestampInfo: ICmsTimestampInfo} RT_ENUM! { enum EnrollKeyUsages: u32 { @@ -4022,36 +4022,36 @@ RT_CLASS!{static class KeyAlgorithmNames} impl RtActivatable for KeyAlgorithmNames {} impl RtActivatable for KeyAlgorithmNames {} impl KeyAlgorithmNames { - #[inline] pub fn get_rsa() -> Result { unsafe { + #[inline] pub fn get_rsa() -> Result { >::get_activation_factory().get_rsa() - }} - #[inline] pub fn get_dsa() -> Result { unsafe { + } + #[inline] pub fn get_dsa() -> Result { >::get_activation_factory().get_dsa() - }} - #[inline] pub fn get_ecdh256() -> Result { unsafe { + } + #[inline] pub fn get_ecdh256() -> Result { >::get_activation_factory().get_ecdh256() - }} - #[inline] pub fn get_ecdh384() -> Result { unsafe { + } + #[inline] pub fn get_ecdh384() -> Result { >::get_activation_factory().get_ecdh384() - }} - #[inline] pub fn get_ecdh521() -> Result { unsafe { + } + #[inline] pub fn get_ecdh521() -> Result { >::get_activation_factory().get_ecdh521() - }} - #[inline] pub fn get_ecdsa256() -> Result { unsafe { + } + #[inline] pub fn get_ecdsa256() -> Result { >::get_activation_factory().get_ecdsa256() - }} - #[inline] pub fn get_ecdsa384() -> Result { unsafe { + } + #[inline] pub fn get_ecdsa384() -> Result { >::get_activation_factory().get_ecdsa384() - }} - #[inline] pub fn get_ecdsa521() -> Result { unsafe { + } + #[inline] pub fn get_ecdsa521() -> Result { >::get_activation_factory().get_ecdsa521() - }} - #[inline] pub fn get_ecdsa() -> Result { unsafe { + } + #[inline] pub fn get_ecdsa() -> Result { >::get_activation_factory().get_ecdsa() - }} - #[inline] pub fn get_ecdh() -> Result { unsafe { + } + #[inline] pub fn get_ecdh() -> Result { >::get_activation_factory().get_ecdh() - }} + } } DEFINE_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]) [CLSID_KeyAlgorithmNames]); DEFINE_IID!(IID_IKeyAlgorithmNamesStatics, 1200645591, 31431, 17793, 140, 59, 208, 112, 39, 20, 4, 72); @@ -4066,46 +4066,46 @@ RT_INTERFACE!{static interface IKeyAlgorithmNamesStatics(IKeyAlgorithmNamesStati fn get_Ecdsa521(&self, out: *mut HSTRING) -> HRESULT }} impl IKeyAlgorithmNamesStatics { - #[inline] pub unsafe fn get_rsa(&self) -> Result { + #[inline] pub fn get_rsa(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Rsa)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_dsa(&self) -> Result { + }} + #[inline] pub fn get_dsa(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Dsa)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ecdh256(&self) -> Result { + }} + #[inline] pub fn get_ecdh256(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Ecdh256)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ecdh384(&self) -> Result { + }} + #[inline] pub fn get_ecdh384(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Ecdh384)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ecdh521(&self) -> Result { + }} + #[inline] pub fn get_ecdh521(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Ecdh521)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ecdsa256(&self) -> Result { + }} + #[inline] pub fn get_ecdsa256(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Ecdsa256)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ecdsa384(&self) -> Result { + }} + #[inline] pub fn get_ecdsa384(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Ecdsa384)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ecdsa521(&self) -> Result { + }} + #[inline] pub fn get_ecdsa521(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Ecdsa521)(self as *const _ as *mut _, &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] { @@ -4113,59 +4113,59 @@ RT_INTERFACE!{static interface IKeyAlgorithmNamesStatics2(IKeyAlgorithmNamesStat fn get_Ecdh(&self, out: *mut HSTRING) -> HRESULT }} impl IKeyAlgorithmNamesStatics2 { - #[inline] pub unsafe fn get_ecdsa(&self) -> Result { + #[inline] pub fn get_ecdsa(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Ecdsa)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ecdh(&self) -> Result { + }} + #[inline] pub fn get_ecdh(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Ecdh)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class KeyAttestationHelper} impl RtActivatable for KeyAttestationHelper {} impl RtActivatable for KeyAttestationHelper {} impl KeyAttestationHelper { - #[inline] pub fn decrypt_tpm_attestation_credential_async(credential: &HStringArg) -> Result>> { unsafe { + #[inline] pub fn decrypt_tpm_attestation_credential_async(credential: &HStringArg) -> Result>> { >::get_activation_factory().decrypt_tpm_attestation_credential_async(credential) - }} - #[inline] pub fn get_tpm_attestation_credential_id(credential: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn get_tpm_attestation_credential_id(credential: &HStringArg) -> Result { >::get_activation_factory().get_tpm_attestation_credential_id(credential) - }} - #[inline] pub fn decrypt_tpm_attestation_credential_with_container_name_async(credential: &HStringArg, containerName: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn decrypt_tpm_attestation_credential_with_container_name_async(credential: &HStringArg, containerName: &HStringArg) -> Result>> { >::get_activation_factory().decrypt_tpm_attestation_credential_with_container_name_async(credential, containerName) - }} + } } DEFINE_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]) [CLSID_KeyAttestationHelper]); 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(&self, credential: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn DecryptTpmAttestationCredentialAsync(&self, credential: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetTpmAttestationCredentialId(&self, credential: HSTRING, out: *mut HSTRING) -> HRESULT }} impl IKeyAttestationHelperStatics { - #[inline] pub unsafe fn decrypt_tpm_attestation_credential_async(&self, credential: &HStringArg) -> Result>> { + #[inline] pub fn decrypt_tpm_attestation_credential_async(&self, credential: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DecryptTpmAttestationCredentialAsync)(self as *const _ as *mut _, credential.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_tpm_attestation_credential_id(&self, credential: &HStringArg) -> Result { + }} + #[inline] pub fn get_tpm_attestation_credential_id(&self, credential: &HStringArg) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetTpmAttestationCredentialId)(self as *const _ as *mut _, 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(&self, credential: HSTRING, containerName: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn DecryptTpmAttestationCredentialWithContainerNameAsync(&self, credential: HSTRING, containerName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IKeyAttestationHelperStatics2 { - #[inline] pub unsafe fn decrypt_tpm_attestation_credential_with_container_name_async(&self, credential: &HStringArg, containerName: &HStringArg) -> Result>> { + #[inline] pub fn decrypt_tpm_attestation_credential_with_container_name_async(&self, credential: &HStringArg, containerName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DecryptTpmAttestationCredentialWithContainerNameAsync)(self as *const _ as *mut _, credential.get(), containerName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum KeyProtectionLevel: i32 { NoConsent (KeyProtectionLevel_NoConsent) = 0, ConsentOnly (KeyProtectionLevel_ConsentOnly) = 1, ConsentWithPassword (KeyProtectionLevel_ConsentWithPassword) = 2, ConsentWithFingerprint (KeyProtectionLevel_ConsentWithFingerprint) = 3, @@ -4177,18 +4177,18 @@ RT_CLASS!{static class KeyStorageProviderNames} impl RtActivatable for KeyStorageProviderNames {} impl RtActivatable for KeyStorageProviderNames {} impl KeyStorageProviderNames { - #[inline] pub fn get_software_key_storage_provider() -> Result { unsafe { + #[inline] pub fn get_software_key_storage_provider() -> Result { >::get_activation_factory().get_software_key_storage_provider() - }} - #[inline] pub fn get_smartcard_key_storage_provider() -> Result { unsafe { + } + #[inline] pub fn get_smartcard_key_storage_provider() -> Result { >::get_activation_factory().get_smartcard_key_storage_provider() - }} - #[inline] pub fn get_platform_key_storage_provider() -> Result { unsafe { + } + #[inline] pub fn get_platform_key_storage_provider() -> Result { >::get_activation_factory().get_platform_key_storage_provider() - }} - #[inline] pub fn get_passport_key_storage_provider() -> Result { unsafe { + } + #[inline] pub fn get_passport_key_storage_provider() -> Result { >::get_activation_factory().get_passport_key_storage_provider() - }} + } } DEFINE_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]) [CLSID_KeyStorageProviderNames]); DEFINE_IID!(IID_IKeyStorageProviderNamesStatics, 2937613024, 21801, 17922, 189, 148, 10, 171, 145, 149, 123, 92); @@ -4198,32 +4198,32 @@ RT_INTERFACE!{static interface IKeyStorageProviderNamesStatics(IKeyStorageProvid fn get_PlatformKeyStorageProvider(&self, out: *mut HSTRING) -> HRESULT }} impl IKeyStorageProviderNamesStatics { - #[inline] pub unsafe fn get_software_key_storage_provider(&self) -> Result { + #[inline] pub fn get_software_key_storage_provider(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SoftwareKeyStorageProvider)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_smartcard_key_storage_provider(&self) -> Result { + }} + #[inline] pub fn get_smartcard_key_storage_provider(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SmartcardKeyStorageProvider)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_platform_key_storage_provider(&self) -> Result { + }} + #[inline] pub fn get_platform_key_storage_provider(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PlatformKeyStorageProvider)(self as *const _ as *mut _, &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(&self, out: *mut HSTRING) -> HRESULT }} impl IKeyStorageProviderNamesStatics2 { - #[inline] pub unsafe fn get_passport_key_storage_provider(&self) -> Result { + #[inline] pub fn get_passport_key_storage_provider(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PassportKeyStorageProvider)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::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] { @@ -4243,69 +4243,69 @@ RT_INTERFACE!{interface IPfxImportParameters(IPfxImportParametersVtbl): IInspect fn put_ReaderName(&self, value: HSTRING) -> HRESULT }} impl IPfxImportParameters { - #[inline] pub unsafe fn get_exportable(&self) -> Result { + #[inline] pub fn get_exportable(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Exportable)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_exportable(&self, value: ExportOption) -> Result<()> { + }} + #[inline] pub fn set_exportable(&self, value: ExportOption) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Exportable)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_key_protection_level(&self) -> Result { + }} + #[inline] pub fn get_key_protection_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_KeyProtectionLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_key_protection_level(&self, value: KeyProtectionLevel) -> Result<()> { + }} + #[inline] pub fn set_key_protection_level(&self, value: KeyProtectionLevel) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_KeyProtectionLevel)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_install_options(&self) -> Result { + }} + #[inline] pub fn get_install_options(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InstallOptions)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_install_options(&self, value: InstallOptions) -> Result<()> { + }} + #[inline] pub fn set_install_options(&self, value: InstallOptions) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InstallOptions)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_friendly_name(&self) -> Result { + }} + #[inline] pub fn get_friendly_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FriendlyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_friendly_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_friendly_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FriendlyName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_key_storage_provider_name(&self) -> Result { + }} + #[inline] pub fn get_key_storage_provider_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_KeyStorageProviderName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_key_storage_provider_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_key_storage_provider_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_KeyStorageProviderName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_container_name_prefix(&self) -> Result { + }} + #[inline] pub fn get_container_name_prefix(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContainerNamePrefix)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_container_name_prefix(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_container_name_prefix(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ContainerNamePrefix)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_reader_name(&self) -> Result { + }} + #[inline] pub fn get_reader_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ReaderName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_reader_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_reader_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReaderName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PfxImportParameters: IPfxImportParameters} impl RtActivatable for PfxImportParameters {} @@ -4316,15 +4316,15 @@ RT_ENUM! { enum SignatureValidationResult: i32 { RT_CLASS!{static class StandardCertificateStoreNames} impl RtActivatable for StandardCertificateStoreNames {} impl StandardCertificateStoreNames { - #[inline] pub fn get_personal() -> Result { unsafe { + #[inline] pub fn get_personal() -> Result { >::get_activation_factory().get_personal() - }} - #[inline] pub fn get_trusted_root_certification_authorities() -> Result { unsafe { + } + #[inline] pub fn get_trusted_root_certification_authorities() -> Result { >::get_activation_factory().get_trusted_root_certification_authorities() - }} - #[inline] pub fn get_intermediate_certification_authorities() -> Result { unsafe { + } + #[inline] pub fn get_intermediate_certification_authorities() -> Result { >::get_activation_factory().get_intermediate_certification_authorities() - }} + } } DEFINE_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]) [CLSID_StandardCertificateStoreNames]); DEFINE_IID!(IID_IStandardCertificateStoreNamesStatics, 202722011, 42134, 16888, 143, 229, 158, 150, 243, 110, 251, 248); @@ -4334,176 +4334,176 @@ RT_INTERFACE!{static interface IStandardCertificateStoreNamesStatics(IStandardCe fn get_IntermediateCertificationAuthorities(&self, out: *mut HSTRING) -> HRESULT }} impl IStandardCertificateStoreNamesStatics { - #[inline] pub unsafe fn get_personal(&self) -> Result { + #[inline] pub fn get_personal(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Personal)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_trusted_root_certification_authorities(&self) -> Result { + }} + #[inline] pub fn get_trusted_root_certification_authorities(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TrustedRootCertificationAuthorities)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_intermediate_certification_authorities(&self) -> Result { + }} + #[inline] pub fn get_intermediate_certification_authorities(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IntermediateCertificationAuthorities)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::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(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn get_IPAddress(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn get_Url(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn get_DnsName(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn get_DistinguishedName(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn get_PrincipalName(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn get_EmailName(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_IPAddress(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_Url(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_DnsName(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_DistinguishedName(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_PrincipalName(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl ISubjectAlternativeNameInfo { - #[inline] pub unsafe fn get_email_name(&self) -> Result>> { + #[inline] pub fn get_email_name(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EmailName)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ipaddress(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_ipaddress(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IPAddress)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_url(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_url(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Url)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_dns_name(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_dns_name(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DnsName)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_distinguished_name(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_distinguished_name(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DistinguishedName)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_principal_name(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_principal_name(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PrincipalName)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SubjectAlternativeNameInfo: ISubjectAlternativeNameInfo} impl RtActivatable for SubjectAlternativeNameInfo {} DEFINE_CLSID!(SubjectAlternativeNameInfo(&[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,117,98,106,101,99,116,65,108,116,101,114,110,97,116,105,118,101,78,97,109,101,73,110,102,111,0]) [CLSID_SubjectAlternativeNameInfo]); DEFINE_IID!(IID_ISubjectAlternativeNameInfo2, 1132099782, 7249, 16874, 179, 74, 61, 101, 67, 152, 163, 112); RT_INTERFACE!{interface ISubjectAlternativeNameInfo2(ISubjectAlternativeNameInfo2Vtbl): IInspectable(IInspectableVtbl) [IID_ISubjectAlternativeNameInfo2] { - fn get_EmailNames(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, - fn get_IPAddresses(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, - fn get_Urls(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, - fn get_DnsNames(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, - fn get_DistinguishedNames(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, - fn get_PrincipalNames(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, + fn get_EmailNames(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_IPAddresses(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_Urls(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_DnsNames(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_DistinguishedNames(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_PrincipalNames(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_Extension(&self, out: *mut *mut CertificateExtension) -> HRESULT }} impl ISubjectAlternativeNameInfo2 { - #[inline] pub unsafe fn get_email_names(&self) -> Result>> { + #[inline] pub fn get_email_names(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EmailNames)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ipaddresses(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_ipaddresses(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IPAddresses)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_urls(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_urls(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Urls)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_dns_names(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_dns_names(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DnsNames)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_distinguished_names(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_distinguished_names(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DistinguishedNames)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_principal_names(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_principal_names(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PrincipalNames)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_extension(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_extension(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Extension)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, request: *mut CertificateRequestProperties, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn InstallCertificateAsync(&self, certificate: HSTRING, installOption: InstallOptions, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ImportPfxDataAsync(&self, pfxData: HSTRING, password: HSTRING, exportable: ExportOption, keyProtectionLevel: KeyProtectionLevel, installOption: InstallOptions, friendlyName: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT, - fn ImportPfxDataToKspAsync(&self, pfxData: HSTRING, password: HSTRING, exportable: ExportOption, keyProtectionLevel: KeyProtectionLevel, installOption: InstallOptions, friendlyName: HSTRING, keyStorageProvider: HSTRING, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn CreateRequestAsync(&self, request: *mut CertificateRequestProperties, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn InstallCertificateAsync(&self, certificate: HSTRING, installOption: InstallOptions, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ImportPfxDataAsync(&self, pfxData: HSTRING, password: HSTRING, exportable: ExportOption, keyProtectionLevel: KeyProtectionLevel, installOption: InstallOptions, friendlyName: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ImportPfxDataToKspAsync(&self, pfxData: HSTRING, password: HSTRING, exportable: ExportOption, keyProtectionLevel: KeyProtectionLevel, installOption: InstallOptions, friendlyName: HSTRING, keyStorageProvider: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IUserCertificateEnrollmentManager { - #[inline] pub unsafe fn create_request_async(&self, request: &CertificateRequestProperties) -> Result>> { + #[inline] pub fn create_request_async(&self, request: &CertificateRequestProperties) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateRequestAsync)(self as *const _ as *mut _, 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(&self, certificate: &HStringArg, installOption: InstallOptions) -> Result> { + }} + #[inline] pub fn install_certificate_async(&self, certificate: &HStringArg, installOption: InstallOptions) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).InstallCertificateAsync)(self as *const _ as *mut _, certificate.get(), installOption, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn import_pfx_data_async(&self, pfxData: &HStringArg, password: &HStringArg, exportable: ExportOption, keyProtectionLevel: KeyProtectionLevel, installOption: InstallOptions, friendlyName: &HStringArg) -> Result> { + }} + #[inline] pub fn import_pfx_data_async(&self, pfxData: &HStringArg, password: &HStringArg, exportable: ExportOption, keyProtectionLevel: KeyProtectionLevel, installOption: InstallOptions, friendlyName: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ImportPfxDataAsync)(self as *const _ as *mut _, 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(&self, pfxData: &HStringArg, password: &HStringArg, exportable: ExportOption, keyProtectionLevel: KeyProtectionLevel, installOption: InstallOptions, friendlyName: &HStringArg, keyStorageProvider: &HStringArg) -> Result> { + }} + #[inline] pub fn import_pfx_data_to_ksp_async(&self, pfxData: &HStringArg, password: &HStringArg, exportable: ExportOption, keyProtectionLevel: KeyProtectionLevel, installOption: InstallOptions, friendlyName: &HStringArg, keyStorageProvider: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ImportPfxDataToKspAsync)(self as *const _ as *mut _, 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_IUserCertificateEnrollmentManager2, 229481649, 26078, 18730, 184, 109, 252, 92, 72, 44, 55, 71); RT_INTERFACE!{interface IUserCertificateEnrollmentManager2(IUserCertificateEnrollmentManager2Vtbl): IInspectable(IInspectableVtbl) [IID_IUserCertificateEnrollmentManager2] { - fn ImportPfxDataToKspWithParametersAsync(&self, pfxData: HSTRING, password: HSTRING, pfxImportParameters: *mut PfxImportParameters, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn ImportPfxDataToKspWithParametersAsync(&self, pfxData: HSTRING, password: HSTRING, pfxImportParameters: *mut PfxImportParameters, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IUserCertificateEnrollmentManager2 { - #[inline] pub unsafe fn import_pfx_data_to_ksp_with_parameters_async(&self, pfxData: &HStringArg, password: &HStringArg, pfxImportParameters: &PfxImportParameters) -> Result> { + #[inline] pub fn import_pfx_data_to_ksp_with_parameters_async(&self, pfxData: &HStringArg, password: &HStringArg, pfxImportParameters: &PfxImportParameters) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ImportPfxDataToKspWithParametersAsync)(self as *const _ as *mut _, 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_IUserCertificateStore, 3388677507, 30879, 19278, 145, 128, 4, 90, 117, 122, 172, 109); RT_INTERFACE!{interface IUserCertificateStore(IUserCertificateStoreVtbl): IInspectable(IInspectableVtbl) [IID_IUserCertificateStore] { - fn RequestAddAsync(&self, certificate: *mut Certificate, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - fn RequestDeleteAsync(&self, certificate: *mut Certificate, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn RequestAddAsync(&self, certificate: *mut Certificate, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestDeleteAsync(&self, certificate: *mut Certificate, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn get_Name(&self, out: *mut HSTRING) -> HRESULT }} impl IUserCertificateStore { - #[inline] pub unsafe fn request_add_async(&self, certificate: &Certificate) -> Result>> { + #[inline] pub fn request_add_async(&self, certificate: &Certificate) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAddAsync)(self as *const _ as *mut _, 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(&self, certificate: &Certificate) -> Result>> { + }} + #[inline] pub fn request_delete_async(&self, certificate: &Certificate) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestDeleteAsync)(self as *const _ as *mut _, certificate as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_name(&self) -> Result { + }} + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class UserCertificateStore: IUserCertificateStore} } // Windows.Security.Cryptography.Certificates @@ -4513,69 +4513,69 @@ RT_CLASS!{static class AsymmetricAlgorithmNames} impl RtActivatable for AsymmetricAlgorithmNames {} impl RtActivatable for AsymmetricAlgorithmNames {} impl AsymmetricAlgorithmNames { - #[inline] pub fn get_rsa_pkcs1() -> Result { unsafe { + #[inline] pub fn get_rsa_pkcs1() -> Result { >::get_activation_factory().get_rsa_pkcs1() - }} - #[inline] pub fn get_rsa_oaep_sha1() -> Result { unsafe { + } + #[inline] pub fn get_rsa_oaep_sha1() -> Result { >::get_activation_factory().get_rsa_oaep_sha1() - }} - #[inline] pub fn get_rsa_oaep_sha256() -> Result { unsafe { + } + #[inline] pub fn get_rsa_oaep_sha256() -> Result { >::get_activation_factory().get_rsa_oaep_sha256() - }} - #[inline] pub fn get_rsa_oaep_sha384() -> Result { unsafe { + } + #[inline] pub fn get_rsa_oaep_sha384() -> Result { >::get_activation_factory().get_rsa_oaep_sha384() - }} - #[inline] pub fn get_rsa_oaep_sha512() -> Result { unsafe { + } + #[inline] pub fn get_rsa_oaep_sha512() -> Result { >::get_activation_factory().get_rsa_oaep_sha512() - }} - #[inline] pub fn get_ecdsa_p256_sha256() -> Result { unsafe { + } + #[inline] pub fn get_ecdsa_p256_sha256() -> Result { >::get_activation_factory().get_ecdsa_p256_sha256() - }} - #[inline] pub fn get_ecdsa_p384_sha384() -> Result { unsafe { + } + #[inline] pub fn get_ecdsa_p384_sha384() -> Result { >::get_activation_factory().get_ecdsa_p384_sha384() - }} - #[inline] pub fn get_ecdsa_p521_sha512() -> Result { unsafe { + } + #[inline] pub fn get_ecdsa_p521_sha512() -> Result { >::get_activation_factory().get_ecdsa_p521_sha512() - }} - #[inline] pub fn get_dsa_sha1() -> Result { unsafe { + } + #[inline] pub fn get_dsa_sha1() -> Result { >::get_activation_factory().get_dsa_sha1() - }} - #[inline] pub fn get_dsa_sha256() -> Result { unsafe { + } + #[inline] pub fn get_dsa_sha256() -> Result { >::get_activation_factory().get_dsa_sha256() - }} - #[inline] pub fn get_rsa_sign_pkcs1_sha1() -> Result { unsafe { + } + #[inline] pub fn get_rsa_sign_pkcs1_sha1() -> Result { >::get_activation_factory().get_rsa_sign_pkcs1_sha1() - }} - #[inline] pub fn get_rsa_sign_pkcs1_sha256() -> Result { unsafe { + } + #[inline] pub fn get_rsa_sign_pkcs1_sha256() -> Result { >::get_activation_factory().get_rsa_sign_pkcs1_sha256() - }} - #[inline] pub fn get_rsa_sign_pkcs1_sha384() -> Result { unsafe { + } + #[inline] pub fn get_rsa_sign_pkcs1_sha384() -> Result { >::get_activation_factory().get_rsa_sign_pkcs1_sha384() - }} - #[inline] pub fn get_rsa_sign_pkcs1_sha512() -> Result { unsafe { + } + #[inline] pub fn get_rsa_sign_pkcs1_sha512() -> Result { >::get_activation_factory().get_rsa_sign_pkcs1_sha512() - }} - #[inline] pub fn get_rsa_sign_pss_sha1() -> Result { unsafe { + } + #[inline] pub fn get_rsa_sign_pss_sha1() -> Result { >::get_activation_factory().get_rsa_sign_pss_sha1() - }} - #[inline] pub fn get_rsa_sign_pss_sha256() -> Result { unsafe { + } + #[inline] pub fn get_rsa_sign_pss_sha256() -> Result { >::get_activation_factory().get_rsa_sign_pss_sha256() - }} - #[inline] pub fn get_rsa_sign_pss_sha384() -> Result { unsafe { + } + #[inline] pub fn get_rsa_sign_pss_sha384() -> Result { >::get_activation_factory().get_rsa_sign_pss_sha384() - }} - #[inline] pub fn get_rsa_sign_pss_sha512() -> Result { unsafe { + } + #[inline] pub fn get_rsa_sign_pss_sha512() -> Result { >::get_activation_factory().get_rsa_sign_pss_sha512() - }} - #[inline] pub fn get_ecdsa_sha256() -> Result { unsafe { + } + #[inline] pub fn get_ecdsa_sha256() -> Result { >::get_activation_factory().get_ecdsa_sha256() - }} - #[inline] pub fn get_ecdsa_sha384() -> Result { unsafe { + } + #[inline] pub fn get_ecdsa_sha384() -> Result { >::get_activation_factory().get_ecdsa_sha384() - }} - #[inline] pub fn get_ecdsa_sha512() -> Result { unsafe { + } + #[inline] pub fn get_ecdsa_sha512() -> Result { >::get_activation_factory().get_ecdsa_sha512() - }} + } } DEFINE_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]) [CLSID_AsymmetricAlgorithmNames]); DEFINE_IID!(IID_IAsymmetricAlgorithmNamesStatics, 3405184228, 26560, 18090, 132, 249, 117, 46, 119, 68, 159, 155); @@ -4600,96 +4600,96 @@ RT_INTERFACE!{static interface IAsymmetricAlgorithmNamesStatics(IAsymmetricAlgor fn get_RsaSignPssSha512(&self, out: *mut HSTRING) -> HRESULT }} impl IAsymmetricAlgorithmNamesStatics { - #[inline] pub unsafe fn get_rsa_pkcs1(&self) -> Result { + #[inline] pub fn get_rsa_pkcs1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RsaPkcs1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rsa_oaep_sha1(&self) -> Result { + }} + #[inline] pub fn get_rsa_oaep_sha1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RsaOaepSha1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rsa_oaep_sha256(&self) -> Result { + }} + #[inline] pub fn get_rsa_oaep_sha256(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RsaOaepSha256)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rsa_oaep_sha384(&self) -> Result { + }} + #[inline] pub fn get_rsa_oaep_sha384(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RsaOaepSha384)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rsa_oaep_sha512(&self) -> Result { + }} + #[inline] pub fn get_rsa_oaep_sha512(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RsaOaepSha512)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ecdsa_p256_sha256(&self) -> Result { + }} + #[inline] pub fn get_ecdsa_p256_sha256(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EcdsaP256Sha256)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ecdsa_p384_sha384(&self) -> Result { + }} + #[inline] pub fn get_ecdsa_p384_sha384(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EcdsaP384Sha384)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ecdsa_p521_sha512(&self) -> Result { + }} + #[inline] pub fn get_ecdsa_p521_sha512(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EcdsaP521Sha512)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_dsa_sha1(&self) -> Result { + }} + #[inline] pub fn get_dsa_sha1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DsaSha1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_dsa_sha256(&self) -> Result { + }} + #[inline] pub fn get_dsa_sha256(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DsaSha256)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rsa_sign_pkcs1_sha1(&self) -> Result { + }} + #[inline] pub fn get_rsa_sign_pkcs1_sha1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RsaSignPkcs1Sha1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rsa_sign_pkcs1_sha256(&self) -> Result { + }} + #[inline] pub fn get_rsa_sign_pkcs1_sha256(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RsaSignPkcs1Sha256)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rsa_sign_pkcs1_sha384(&self) -> Result { + }} + #[inline] pub fn get_rsa_sign_pkcs1_sha384(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RsaSignPkcs1Sha384)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rsa_sign_pkcs1_sha512(&self) -> Result { + }} + #[inline] pub fn get_rsa_sign_pkcs1_sha512(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RsaSignPkcs1Sha512)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rsa_sign_pss_sha1(&self) -> Result { + }} + #[inline] pub fn get_rsa_sign_pss_sha1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RsaSignPssSha1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rsa_sign_pss_sha256(&self) -> Result { + }} + #[inline] pub fn get_rsa_sign_pss_sha256(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RsaSignPssSha256)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rsa_sign_pss_sha384(&self) -> Result { + }} + #[inline] pub fn get_rsa_sign_pss_sha384(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RsaSignPssSha384)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rsa_sign_pss_sha512(&self) -> Result { + }} + #[inline] pub fn get_rsa_sign_pss_sha512(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RsaSignPssSha512)(self as *const _ as *mut _, &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] { @@ -4698,21 +4698,21 @@ RT_INTERFACE!{static interface IAsymmetricAlgorithmNamesStatics2(IAsymmetricAlgo fn get_EcdsaSha512(&self, out: *mut HSTRING) -> HRESULT }} impl IAsymmetricAlgorithmNamesStatics2 { - #[inline] pub unsafe fn get_ecdsa_sha256(&self) -> Result { + #[inline] pub fn get_ecdsa_sha256(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EcdsaSha256)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ecdsa_sha384(&self) -> Result { + }} + #[inline] pub fn get_ecdsa_sha384(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EcdsaSha384)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ecdsa_sha512(&self) -> Result { + }} + #[inline] pub fn get_ecdsa_sha512(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EcdsaSha512)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::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] { @@ -4724,43 +4724,43 @@ RT_INTERFACE!{interface IAsymmetricKeyAlgorithmProvider(IAsymmetricKeyAlgorithmP #[cfg(feature="windows-storage")] fn ImportPublicKeyWithBlobType(&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(&self) -> Result { + #[inline] pub fn get_algorithm_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AlgorithmName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_key_pair(&self, keySize: u32) -> Result> { + }} + #[inline] pub fn create_key_pair(&self, keySize: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateKeyPair)(self as *const _ as *mut _, 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(&self, keyBlob: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn import_default_private_key_blob(&self, keyBlob: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ImportDefaultPrivateKeyBlob)(self as *const _ as *mut _, 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(&self, keyBlob: &::rt::gen::windows::storage::streams::IBuffer, blobType: CryptographicPrivateKeyBlobType) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn import_key_pair_with_blob_type(&self, keyBlob: &::rt::gen::windows::storage::streams::IBuffer, blobType: CryptographicPrivateKeyBlobType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ImportKeyPairWithBlobType)(self as *const _ as *mut _, 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(&self, keyBlob: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn import_default_public_key_blob(&self, keyBlob: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ImportDefaultPublicKeyBlob)(self as *const _ as *mut _, 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(&self, keyBlob: &::rt::gen::windows::storage::streams::IBuffer, blobType: CryptographicPublicKeyBlobType) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn import_public_key_with_blob_type(&self, keyBlob: &::rt::gen::windows::storage::streams::IBuffer, blobType: CryptographicPublicKeyBlobType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ImportPublicKeyWithBlobType)(self as *const _ as *mut _, keyBlob as *const _ as *mut _, blobType, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AsymmetricKeyAlgorithmProvider: IAsymmetricKeyAlgorithmProvider} impl RtActivatable for AsymmetricKeyAlgorithmProvider {} impl AsymmetricKeyAlgorithmProvider { - #[inline] pub fn open_algorithm(algorithm: &HStringArg) -> Result> { unsafe { + #[inline] pub fn open_algorithm(algorithm: &HStringArg) -> Result>> { >::get_activation_factory().open_algorithm(algorithm) - }} + } } DEFINE_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]) [CLSID_AsymmetricKeyAlgorithmProvider]); DEFINE_IID!(IID_IAsymmetricKeyAlgorithmProvider2, 1311910526, 31821, 18839, 172, 79, 27, 132, 139, 54, 48, 110); @@ -4769,27 +4769,27 @@ RT_INTERFACE!{interface IAsymmetricKeyAlgorithmProvider2(IAsymmetricKeyAlgorithm fn CreateKeyPairWithCurveParameters(&self, parametersSize: u32, parameters: *mut u8, out: *mut *mut CryptographicKey) -> HRESULT }} impl IAsymmetricKeyAlgorithmProvider2 { - #[inline] pub unsafe fn create_key_pair_with_curve_name(&self, curveName: &HStringArg) -> Result> { + #[inline] pub fn create_key_pair_with_curve_name(&self, curveName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateKeyPairWithCurveName)(self as *const _ as *mut _, 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(&self, parameters: &[u8]) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_key_pair_with_curve_parameters(&self, parameters: &[u8]) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateKeyPairWithCurveParameters)(self as *const _ as *mut _, parameters.len() as u32, parameters.as_ptr() as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, algorithm: HSTRING, out: *mut *mut AsymmetricKeyAlgorithmProvider) -> HRESULT }} impl IAsymmetricKeyAlgorithmProviderStatics { - #[inline] pub unsafe fn open_algorithm(&self, algorithm: &HStringArg) -> Result> { + #[inline] pub fn open_algorithm(&self, algorithm: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenAlgorithm)(self as *const _ as *mut _, algorithm.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum Capi1KdfTargetAlgorithm: i32 { NotAes (Capi1KdfTargetAlgorithm_NotAes) = 0, Aes (Capi1KdfTargetAlgorithm_Aes) = 1, @@ -4798,42 +4798,42 @@ RT_CLASS!{static class CryptographicEngine} impl RtActivatable for CryptographicEngine {} impl RtActivatable for CryptographicEngine {} impl CryptographicEngine { - #[cfg(feature="windows-storage")] #[inline] pub fn encrypt(key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer, iv: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn encrypt(key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer, iv: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { >::get_activation_factory().encrypt(key, data, iv) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn decrypt(key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer, iv: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn decrypt(key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer, iv: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { >::get_activation_factory().decrypt(key, data, iv) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn encrypt_and_authenticate(key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer, nonce: &::rt::gen::windows::storage::streams::IBuffer, authenticatedData: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn encrypt_and_authenticate(key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer, nonce: &::rt::gen::windows::storage::streams::IBuffer, authenticatedData: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { >::get_activation_factory().encrypt_and_authenticate(key, data, nonce, authenticatedData) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn decrypt_and_authenticate(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> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn decrypt_and_authenticate(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>> { >::get_activation_factory().decrypt_and_authenticate(key, data, nonce, authenticationTag, authenticatedData) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn sign(key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn sign(key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { >::get_activation_factory().sign(key, data) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn verify_signature(key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer, signature: &::rt::gen::windows::storage::streams::IBuffer) -> Result { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn verify_signature(key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer, signature: &::rt::gen::windows::storage::streams::IBuffer) -> Result { >::get_activation_factory().verify_signature(key, data, signature) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn derive_key_material(key: &CryptographicKey, parameters: &KeyDerivationParameters, desiredKeySize: u32) -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn derive_key_material(key: &CryptographicKey, parameters: &KeyDerivationParameters, desiredKeySize: u32) -> Result>> { >::get_activation_factory().derive_key_material(key, parameters, desiredKeySize) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn sign_hashed_data(key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn sign_hashed_data(key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { >::get_activation_factory().sign_hashed_data(key, data) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn verify_signature_with_hash_input(key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer, signature: &::rt::gen::windows::storage::streams::IBuffer) -> Result { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn verify_signature_with_hash_input(key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer, signature: &::rt::gen::windows::storage::streams::IBuffer) -> Result { >::get_activation_factory().verify_signature_with_hash_input(key, data, signature) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn decrypt_async(key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer, iv: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn decrypt_async(key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer, iv: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { >::get_activation_factory().decrypt_async(key, data, iv) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn sign_async(key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn sign_async(key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { >::get_activation_factory().sign_async(key, data) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn sign_hashed_data_async(key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn sign_hashed_data_async(key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { >::get_activation_factory().sign_hashed_data_async(key, data) - }} + } } DEFINE_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]) [CLSID_CryptographicEngine]); DEFINE_IID!(IID_ICryptographicEngineStatics, 2682914361, 28663, 19589, 160, 149, 149, 235, 49, 113, 94, 185); @@ -4847,76 +4847,76 @@ RT_INTERFACE!{static interface ICryptographicEngineStatics(ICryptographicEngineS #[cfg(feature="windows-storage")] fn DeriveKeyMaterial(&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(&self, key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer, iv: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn encrypt(&self, key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer, iv: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Encrypt)(self as *const _ as *mut _, 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(&self, key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer, iv: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn decrypt(&self, key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer, iv: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Decrypt)(self as *const _ as *mut _, 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(&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> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn encrypt_and_authenticate(&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>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).EncryptAndAuthenticate)(self as *const _ as *mut _, 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(&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> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn decrypt_and_authenticate(&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>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DecryptAndAuthenticate)(self as *const _ as *mut _, 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(&self, key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn sign(&self, key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Sign)(self as *const _ as *mut _, 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(&self, key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer, signature: &::rt::gen::windows::storage::streams::IBuffer) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn verify_signature(&self, key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer, signature: &::rt::gen::windows::storage::streams::IBuffer) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).VerifySignature)(self as *const _ as *mut _, 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(&self, key: &CryptographicKey, parameters: &KeyDerivationParameters, desiredKeySize: u32) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn derive_key_material(&self, key: &CryptographicKey, parameters: &KeyDerivationParameters, desiredKeySize: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeriveKeyMaterial)(self as *const _ as *mut _, key as *const _ as *mut _, parameters as *const _ as *mut _, desiredKeySize, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&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(&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(&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(&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(&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 DecryptAsync(&self, key: *mut CryptographicKey, data: *mut ::rt::gen::windows::storage::streams::IBuffer, iv: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncOperation<::rt::gen::windows::storage::streams::IBuffer>) -> HRESULT, + #[cfg(feature="windows-storage")] fn SignAsync(&self, key: *mut CryptographicKey, data: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncOperation<::rt::gen::windows::storage::streams::IBuffer>) -> HRESULT, + #[cfg(feature="windows-storage")] fn SignHashedDataAsync(&self, key: *mut CryptographicKey, data: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncOperation<::rt::gen::windows::storage::streams::IBuffer>) -> HRESULT }} impl ICryptographicEngineStatics2 { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn sign_hashed_data(&self, key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn sign_hashed_data(&self, key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SignHashedData)(self as *const _ as *mut _, 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(&self, key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer, signature: &::rt::gen::windows::storage::streams::IBuffer) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn verify_signature_with_hash_input(&self, key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer, signature: &::rt::gen::windows::storage::streams::IBuffer) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).VerifySignatureWithHashInput)(self as *const _ as *mut _, 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(&self, key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer, iv: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn decrypt_async(&self, key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer, iv: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DecryptAsync)(self as *const _ as *mut _, 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(&self, key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn sign_async(&self, key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SignAsync)(self as *const _ as *mut _, 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(&self, key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn sign_hashed_data_async(&self, key: &CryptographicKey, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SignHashedDataAsync)(self as *const _ as *mut _, key as *const _ as *mut _, data as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class CryptographicHash: IHashComputation} DEFINE_IID!(IID_ICryptographicKey, 3978967920, 36475, 16393, 132, 1, 255, 209, 166, 46, 235, 39); @@ -4928,31 +4928,31 @@ RT_INTERFACE!{interface ICryptographicKey(ICryptographicKeyVtbl): IInspectable(I #[cfg(feature="windows-storage")] fn ExportPublicKeyWithBlobType(&self, blobType: CryptographicPublicKeyBlobType, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT }} impl ICryptographicKey { - #[inline] pub unsafe fn get_key_size(&self) -> Result { + #[inline] pub fn get_key_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_KeySize)(self as *const _ as *mut _, &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(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn export_default_private_key_blob_type(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ExportDefaultPrivateKeyBlobType)(self 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 export_private_key_with_blob_type(&self, blobType: CryptographicPrivateKeyBlobType) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn export_private_key_with_blob_type(&self, blobType: CryptographicPrivateKeyBlobType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ExportPrivateKeyWithBlobType)(self 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 export_default_public_key_blob_type(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn export_default_public_key_blob_type(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ExportDefaultPublicKeyBlobType)(self 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 export_public_key_with_blob_type(&self, blobType: CryptographicPublicKeyBlobType) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn export_public_key_with_blob_type(&self, blobType: CryptographicPublicKeyBlobType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ExportPublicKeyWithBlobType)(self as *const _ as *mut _, blobType, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CryptographicKey: ICryptographicKey} RT_ENUM! { enum CryptographicPadding: i32 { @@ -4967,144 +4967,144 @@ RT_ENUM! { enum CryptographicPublicKeyBlobType: i32 { RT_CLASS!{static class EccCurveNames} impl RtActivatable for EccCurveNames {} impl EccCurveNames { - #[inline] pub fn get_brainpool_p160r1() -> Result { unsafe { + #[inline] pub fn get_brainpool_p160r1() -> Result { >::get_activation_factory().get_brainpool_p160r1() - }} - #[inline] pub fn get_brainpool_p160t1() -> Result { unsafe { + } + #[inline] pub fn get_brainpool_p160t1() -> Result { >::get_activation_factory().get_brainpool_p160t1() - }} - #[inline] pub fn get_brainpool_p192r1() -> Result { unsafe { + } + #[inline] pub fn get_brainpool_p192r1() -> Result { >::get_activation_factory().get_brainpool_p192r1() - }} - #[inline] pub fn get_brainpool_p192t1() -> Result { unsafe { + } + #[inline] pub fn get_brainpool_p192t1() -> Result { >::get_activation_factory().get_brainpool_p192t1() - }} - #[inline] pub fn get_brainpool_p224r1() -> Result { unsafe { + } + #[inline] pub fn get_brainpool_p224r1() -> Result { >::get_activation_factory().get_brainpool_p224r1() - }} - #[inline] pub fn get_brainpool_p224t1() -> Result { unsafe { + } + #[inline] pub fn get_brainpool_p224t1() -> Result { >::get_activation_factory().get_brainpool_p224t1() - }} - #[inline] pub fn get_brainpool_p256r1() -> Result { unsafe { + } + #[inline] pub fn get_brainpool_p256r1() -> Result { >::get_activation_factory().get_brainpool_p256r1() - }} - #[inline] pub fn get_brainpool_p256t1() -> Result { unsafe { + } + #[inline] pub fn get_brainpool_p256t1() -> Result { >::get_activation_factory().get_brainpool_p256t1() - }} - #[inline] pub fn get_brainpool_p320r1() -> Result { unsafe { + } + #[inline] pub fn get_brainpool_p320r1() -> Result { >::get_activation_factory().get_brainpool_p320r1() - }} - #[inline] pub fn get_brainpool_p320t1() -> Result { unsafe { + } + #[inline] pub fn get_brainpool_p320t1() -> Result { >::get_activation_factory().get_brainpool_p320t1() - }} - #[inline] pub fn get_brainpool_p384r1() -> Result { unsafe { + } + #[inline] pub fn get_brainpool_p384r1() -> Result { >::get_activation_factory().get_brainpool_p384r1() - }} - #[inline] pub fn get_brainpool_p384t1() -> Result { unsafe { + } + #[inline] pub fn get_brainpool_p384t1() -> Result { >::get_activation_factory().get_brainpool_p384t1() - }} - #[inline] pub fn get_brainpool_p512r1() -> Result { unsafe { + } + #[inline] pub fn get_brainpool_p512r1() -> Result { >::get_activation_factory().get_brainpool_p512r1() - }} - #[inline] pub fn get_brainpool_p512t1() -> Result { unsafe { + } + #[inline] pub fn get_brainpool_p512t1() -> Result { >::get_activation_factory().get_brainpool_p512t1() - }} - #[inline] pub fn get_curve25519() -> Result { unsafe { + } + #[inline] pub fn get_curve25519() -> Result { >::get_activation_factory().get_curve25519() - }} - #[inline] pub fn get_ec192wapi() -> Result { unsafe { + } + #[inline] pub fn get_ec192wapi() -> Result { >::get_activation_factory().get_ec192wapi() - }} - #[inline] pub fn get_nist_p192() -> Result { unsafe { + } + #[inline] pub fn get_nist_p192() -> Result { >::get_activation_factory().get_nist_p192() - }} - #[inline] pub fn get_nist_p224() -> Result { unsafe { + } + #[inline] pub fn get_nist_p224() -> Result { >::get_activation_factory().get_nist_p224() - }} - #[inline] pub fn get_nist_p256() -> Result { unsafe { + } + #[inline] pub fn get_nist_p256() -> Result { >::get_activation_factory().get_nist_p256() - }} - #[inline] pub fn get_nist_p384() -> Result { unsafe { + } + #[inline] pub fn get_nist_p384() -> Result { >::get_activation_factory().get_nist_p384() - }} - #[inline] pub fn get_nist_p521() -> Result { unsafe { + } + #[inline] pub fn get_nist_p521() -> Result { >::get_activation_factory().get_nist_p521() - }} - #[inline] pub fn get_nums_p256t1() -> Result { unsafe { + } + #[inline] pub fn get_nums_p256t1() -> Result { >::get_activation_factory().get_nums_p256t1() - }} - #[inline] pub fn get_nums_p384t1() -> Result { unsafe { + } + #[inline] pub fn get_nums_p384t1() -> Result { >::get_activation_factory().get_nums_p384t1() - }} - #[inline] pub fn get_nums_p512t1() -> Result { unsafe { + } + #[inline] pub fn get_nums_p512t1() -> Result { >::get_activation_factory().get_nums_p512t1() - }} - #[inline] pub fn get_sec_p160k1() -> Result { unsafe { + } + #[inline] pub fn get_sec_p160k1() -> Result { >::get_activation_factory().get_sec_p160k1() - }} - #[inline] pub fn get_sec_p160r1() -> Result { unsafe { + } + #[inline] pub fn get_sec_p160r1() -> Result { >::get_activation_factory().get_sec_p160r1() - }} - #[inline] pub fn get_sec_p160r2() -> Result { unsafe { + } + #[inline] pub fn get_sec_p160r2() -> Result { >::get_activation_factory().get_sec_p160r2() - }} - #[inline] pub fn get_sec_p192k1() -> Result { unsafe { + } + #[inline] pub fn get_sec_p192k1() -> Result { >::get_activation_factory().get_sec_p192k1() - }} - #[inline] pub fn get_sec_p192r1() -> Result { unsafe { + } + #[inline] pub fn get_sec_p192r1() -> Result { >::get_activation_factory().get_sec_p192r1() - }} - #[inline] pub fn get_sec_p224k1() -> Result { unsafe { + } + #[inline] pub fn get_sec_p224k1() -> Result { >::get_activation_factory().get_sec_p224k1() - }} - #[inline] pub fn get_sec_p224r1() -> Result { unsafe { + } + #[inline] pub fn get_sec_p224r1() -> Result { >::get_activation_factory().get_sec_p224r1() - }} - #[inline] pub fn get_sec_p256k1() -> Result { unsafe { + } + #[inline] pub fn get_sec_p256k1() -> Result { >::get_activation_factory().get_sec_p256k1() - }} - #[inline] pub fn get_sec_p256r1() -> Result { unsafe { + } + #[inline] pub fn get_sec_p256r1() -> Result { >::get_activation_factory().get_sec_p256r1() - }} - #[inline] pub fn get_sec_p384r1() -> Result { unsafe { + } + #[inline] pub fn get_sec_p384r1() -> Result { >::get_activation_factory().get_sec_p384r1() - }} - #[inline] pub fn get_sec_p521r1() -> Result { unsafe { + } + #[inline] pub fn get_sec_p521r1() -> Result { >::get_activation_factory().get_sec_p521r1() - }} - #[inline] pub fn get_wtls7() -> Result { unsafe { + } + #[inline] pub fn get_wtls7() -> Result { >::get_activation_factory().get_wtls7() - }} - #[inline] pub fn get_wtls9() -> Result { unsafe { + } + #[inline] pub fn get_wtls9() -> Result { >::get_activation_factory().get_wtls9() - }} - #[inline] pub fn get_wtls12() -> Result { unsafe { + } + #[inline] pub fn get_wtls12() -> Result { >::get_activation_factory().get_wtls12() - }} - #[inline] pub fn get_x962_p192v1() -> Result { unsafe { + } + #[inline] pub fn get_x962_p192v1() -> Result { >::get_activation_factory().get_x962_p192v1() - }} - #[inline] pub fn get_x962_p192v2() -> Result { unsafe { + } + #[inline] pub fn get_x962_p192v2() -> Result { >::get_activation_factory().get_x962_p192v2() - }} - #[inline] pub fn get_x962_p192v3() -> Result { unsafe { + } + #[inline] pub fn get_x962_p192v3() -> Result { >::get_activation_factory().get_x962_p192v3() - }} - #[inline] pub fn get_x962_p239v1() -> Result { unsafe { + } + #[inline] pub fn get_x962_p239v1() -> Result { >::get_activation_factory().get_x962_p239v1() - }} - #[inline] pub fn get_x962_p239v2() -> Result { unsafe { + } + #[inline] pub fn get_x962_p239v2() -> Result { >::get_activation_factory().get_x962_p239v2() - }} - #[inline] pub fn get_x962_p239v3() -> Result { unsafe { + } + #[inline] pub fn get_x962_p239v3() -> Result { >::get_activation_factory().get_x962_p239v3() - }} - #[inline] pub fn get_x962_p256v1() -> Result { unsafe { + } + #[inline] pub fn get_x962_p256v1() -> Result { >::get_activation_factory().get_x962_p256v1() - }} - #[inline] pub fn get_all_ecc_curve_names() -> Result>> { unsafe { + } + #[inline] pub fn get_all_ecc_curve_names() -> Result>>> { >::get_activation_factory().get_all_ecc_curve_names() - }} + } } DEFINE_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]) [CLSID_EccCurveNames]); DEFINE_IID!(IID_IEccCurveNamesStatics, 3019870988, 44779, 16542, 183, 212, 155, 149, 41, 90, 174, 207); @@ -5154,239 +5154,239 @@ RT_INTERFACE!{static interface IEccCurveNamesStatics(IEccCurveNamesStaticsVtbl): fn get_X962P239v2(&self, out: *mut HSTRING) -> HRESULT, fn get_X962P239v3(&self, out: *mut HSTRING) -> HRESULT, fn get_X962P256v1(&self, out: *mut HSTRING) -> HRESULT, - fn get_AllEccCurveNames(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn get_AllEccCurveNames(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IEccCurveNamesStatics { - #[inline] pub unsafe fn get_brainpool_p160r1(&self) -> Result { + #[inline] pub fn get_brainpool_p160r1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BrainpoolP160r1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_brainpool_p160t1(&self) -> Result { + }} + #[inline] pub fn get_brainpool_p160t1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BrainpoolP160t1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_brainpool_p192r1(&self) -> Result { + }} + #[inline] pub fn get_brainpool_p192r1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BrainpoolP192r1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_brainpool_p192t1(&self) -> Result { + }} + #[inline] pub fn get_brainpool_p192t1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BrainpoolP192t1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_brainpool_p224r1(&self) -> Result { + }} + #[inline] pub fn get_brainpool_p224r1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BrainpoolP224r1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_brainpool_p224t1(&self) -> Result { + }} + #[inline] pub fn get_brainpool_p224t1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BrainpoolP224t1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_brainpool_p256r1(&self) -> Result { + }} + #[inline] pub fn get_brainpool_p256r1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BrainpoolP256r1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_brainpool_p256t1(&self) -> Result { + }} + #[inline] pub fn get_brainpool_p256t1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BrainpoolP256t1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_brainpool_p320r1(&self) -> Result { + }} + #[inline] pub fn get_brainpool_p320r1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BrainpoolP320r1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_brainpool_p320t1(&self) -> Result { + }} + #[inline] pub fn get_brainpool_p320t1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BrainpoolP320t1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_brainpool_p384r1(&self) -> Result { + }} + #[inline] pub fn get_brainpool_p384r1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BrainpoolP384r1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_brainpool_p384t1(&self) -> Result { + }} + #[inline] pub fn get_brainpool_p384t1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BrainpoolP384t1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_brainpool_p512r1(&self) -> Result { + }} + #[inline] pub fn get_brainpool_p512r1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BrainpoolP512r1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_brainpool_p512t1(&self) -> Result { + }} + #[inline] pub fn get_brainpool_p512t1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BrainpoolP512t1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_curve25519(&self) -> Result { + }} + #[inline] pub fn get_curve25519(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Curve25519)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_ec192wapi(&self) -> Result { + }} + #[inline] pub fn get_ec192wapi(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Ec192wapi)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_nist_p192(&self) -> Result { + }} + #[inline] pub fn get_nist_p192(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NistP192)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_nist_p224(&self) -> Result { + }} + #[inline] pub fn get_nist_p224(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NistP224)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_nist_p256(&self) -> Result { + }} + #[inline] pub fn get_nist_p256(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NistP256)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_nist_p384(&self) -> Result { + }} + #[inline] pub fn get_nist_p384(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NistP384)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_nist_p521(&self) -> Result { + }} + #[inline] pub fn get_nist_p521(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NistP521)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_nums_p256t1(&self) -> Result { + }} + #[inline] pub fn get_nums_p256t1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NumsP256t1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_nums_p384t1(&self) -> Result { + }} + #[inline] pub fn get_nums_p384t1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NumsP384t1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_nums_p512t1(&self) -> Result { + }} + #[inline] pub fn get_nums_p512t1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NumsP512t1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sec_p160k1(&self) -> Result { + }} + #[inline] pub fn get_sec_p160k1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SecP160k1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sec_p160r1(&self) -> Result { + }} + #[inline] pub fn get_sec_p160r1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SecP160r1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sec_p160r2(&self) -> Result { + }} + #[inline] pub fn get_sec_p160r2(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SecP160r2)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sec_p192k1(&self) -> Result { + }} + #[inline] pub fn get_sec_p192k1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SecP192k1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sec_p192r1(&self) -> Result { + }} + #[inline] pub fn get_sec_p192r1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SecP192r1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sec_p224k1(&self) -> Result { + }} + #[inline] pub fn get_sec_p224k1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SecP224k1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sec_p224r1(&self) -> Result { + }} + #[inline] pub fn get_sec_p224r1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SecP224r1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sec_p256k1(&self) -> Result { + }} + #[inline] pub fn get_sec_p256k1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SecP256k1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sec_p256r1(&self) -> Result { + }} + #[inline] pub fn get_sec_p256r1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SecP256r1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sec_p384r1(&self) -> Result { + }} + #[inline] pub fn get_sec_p384r1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SecP384r1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sec_p521r1(&self) -> Result { + }} + #[inline] pub fn get_sec_p521r1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SecP521r1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_wtls7(&self) -> Result { + }} + #[inline] pub fn get_wtls7(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Wtls7)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_wtls9(&self) -> Result { + }} + #[inline] pub fn get_wtls9(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Wtls9)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_wtls12(&self) -> Result { + }} + #[inline] pub fn get_wtls12(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Wtls12)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_x962_p192v1(&self) -> Result { + }} + #[inline] pub fn get_x962_p192v1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_X962P192v1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_x962_p192v2(&self) -> Result { + }} + #[inline] pub fn get_x962_p192v2(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_X962P192v2)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_x962_p192v3(&self) -> Result { + }} + #[inline] pub fn get_x962_p192v3(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_X962P192v3)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_x962_p239v1(&self) -> Result { + }} + #[inline] pub fn get_x962_p239v1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_X962P239v1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_x962_p239v2(&self) -> Result { + }} + #[inline] pub fn get_x962_p239v2(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_X962P239v2)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_x962_p239v3(&self) -> Result { + }} + #[inline] pub fn get_x962_p239v3(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_X962P239v3)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_x962_p256v1(&self) -> Result { + }} + #[inline] pub fn get_x962_p256v1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_X962P256v1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_all_ecc_curve_names(&self) -> Result>> { + }} + #[inline] pub fn get_all_ecc_curve_names(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AllEccCurveNames)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IEncryptedAndAuthenticatedData, 1873031143, 7883, 19200, 190, 165, 96, 184, 63, 134, 47, 23); RT_INTERFACE!{interface IEncryptedAndAuthenticatedData(IEncryptedAndAuthenticatedDataVtbl): IInspectable(IInspectableVtbl) [IID_IEncryptedAndAuthenticatedData] { @@ -5394,36 +5394,36 @@ RT_INTERFACE!{interface IEncryptedAndAuthenticatedData(IEncryptedAndAuthenticate #[cfg(feature="windows-storage")] fn get_AuthenticationTag(&self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT }} impl IEncryptedAndAuthenticatedData { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_encrypted_data(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_encrypted_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EncryptedData)(self 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_authentication_tag(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_authentication_tag(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AuthenticationTag)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class EncryptedAndAuthenticatedData: IEncryptedAndAuthenticatedData} RT_CLASS!{static class HashAlgorithmNames} impl RtActivatable for HashAlgorithmNames {} impl HashAlgorithmNames { - #[inline] pub fn get_md5() -> Result { unsafe { + #[inline] pub fn get_md5() -> Result { >::get_activation_factory().get_md5() - }} - #[inline] pub fn get_sha1() -> Result { unsafe { + } + #[inline] pub fn get_sha1() -> Result { >::get_activation_factory().get_sha1() - }} - #[inline] pub fn get_sha256() -> Result { unsafe { + } + #[inline] pub fn get_sha256() -> Result { >::get_activation_factory().get_sha256() - }} - #[inline] pub fn get_sha384() -> Result { unsafe { + } + #[inline] pub fn get_sha384() -> Result { >::get_activation_factory().get_sha384() - }} - #[inline] pub fn get_sha512() -> Result { unsafe { + } + #[inline] pub fn get_sha512() -> Result { >::get_activation_factory().get_sha512() - }} + } } DEFINE_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]) [CLSID_HashAlgorithmNames]); DEFINE_IID!(IID_IHashAlgorithmNamesStatics, 1801323798, 56982, 20234, 141, 87, 220, 201, 218, 227, 108, 118); @@ -5435,31 +5435,31 @@ RT_INTERFACE!{static interface IHashAlgorithmNamesStatics(IHashAlgorithmNamesSta fn get_Sha512(&self, out: *mut HSTRING) -> HRESULT }} impl IHashAlgorithmNamesStatics { - #[inline] pub unsafe fn get_md5(&self) -> Result { + #[inline] pub fn get_md5(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Md5)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sha1(&self) -> Result { + }} + #[inline] pub fn get_sha1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Sha1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sha256(&self) -> Result { + }} + #[inline] pub fn get_sha256(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Sha256)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sha384(&self) -> Result { + }} + #[inline] pub fn get_sha384(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Sha384)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sha512(&self) -> Result { + }} + #[inline] pub fn get_sha512(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Sha512)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IHashAlgorithmProvider, 3197841536, 45763, 16939, 188, 225, 236, 144, 239, 181, 215, 181); RT_INTERFACE!{interface IHashAlgorithmProvider(IHashAlgorithmProviderVtbl): IInspectable(IInspectableVtbl) [IID_IHashAlgorithmProvider] { @@ -5470,33 +5470,33 @@ RT_INTERFACE!{interface IHashAlgorithmProvider(IHashAlgorithmProviderVtbl): IIns fn CreateHash(&self, out: *mut *mut CryptographicHash) -> HRESULT }} impl IHashAlgorithmProvider { - #[inline] pub unsafe fn get_algorithm_name(&self) -> Result { + #[inline] pub fn get_algorithm_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AlgorithmName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_hash_length(&self) -> Result { + }} + #[inline] pub fn get_hash_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HashLength)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn hash_data(&self, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn hash_data(&self, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).HashData)(self as *const _ as *mut _, data as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_hash(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_hash(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateHash)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class HashAlgorithmProvider: IHashAlgorithmProvider} impl RtActivatable for HashAlgorithmProvider {} impl HashAlgorithmProvider { - #[inline] pub fn open_algorithm(algorithm: &HStringArg) -> Result> { unsafe { + #[inline] pub fn open_algorithm(algorithm: &HStringArg) -> Result>> { >::get_activation_factory().open_algorithm(algorithm) - }} + } } DEFINE_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]) [CLSID_HashAlgorithmProvider]); DEFINE_IID!(IID_IHashAlgorithmProviderStatics, 2678888257, 23748, 17206, 174, 56, 98, 18, 183, 90, 145, 90); @@ -5504,11 +5504,11 @@ RT_INTERFACE!{static interface IHashAlgorithmProviderStatics(IHashAlgorithmProvi fn OpenAlgorithm(&self, algorithm: HSTRING, out: *mut *mut HashAlgorithmProvider) -> HRESULT }} impl IHashAlgorithmProviderStatics { - #[inline] pub unsafe fn open_algorithm(&self, algorithm: &HStringArg) -> Result> { + #[inline] pub fn open_algorithm(&self, algorithm: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenAlgorithm)(self as *const _ as *mut _, algorithm.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IHashComputation, 1493488054, 44337, 17923, 163, 164, 177, 189, 169, 142, 37, 98); RT_INTERFACE!{interface IHashComputation(IHashComputationVtbl): IInspectable(IInspectableVtbl) [IID_IHashComputation] { @@ -5516,80 +5516,80 @@ RT_INTERFACE!{interface IHashComputation(IHashComputationVtbl): IInspectable(IIn #[cfg(feature="windows-storage")] fn GetValueAndReset(&self, out: *mut *mut ::rt::gen::windows::storage::streams::IBuffer) -> HRESULT }} impl IHashComputation { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn append(&self, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { + #[cfg(feature="windows-storage")] #[inline] pub fn append(&self, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Append)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_value_and_reset(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetValueAndReset)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{static class KeyDerivationAlgorithmNames} impl RtActivatable for KeyDerivationAlgorithmNames {} impl RtActivatable for KeyDerivationAlgorithmNames {} impl KeyDerivationAlgorithmNames { - #[inline] pub fn get_pbkdf2_md5() -> Result { unsafe { + #[inline] pub fn get_pbkdf2_md5() -> Result { >::get_activation_factory().get_pbkdf2_md5() - }} - #[inline] pub fn get_pbkdf2_sha1() -> Result { unsafe { + } + #[inline] pub fn get_pbkdf2_sha1() -> Result { >::get_activation_factory().get_pbkdf2_sha1() - }} - #[inline] pub fn get_pbkdf2_sha256() -> Result { unsafe { + } + #[inline] pub fn get_pbkdf2_sha256() -> Result { >::get_activation_factory().get_pbkdf2_sha256() - }} - #[inline] pub fn get_pbkdf2_sha384() -> Result { unsafe { + } + #[inline] pub fn get_pbkdf2_sha384() -> Result { >::get_activation_factory().get_pbkdf2_sha384() - }} - #[inline] pub fn get_pbkdf2_sha512() -> Result { unsafe { + } + #[inline] pub fn get_pbkdf2_sha512() -> Result { >::get_activation_factory().get_pbkdf2_sha512() - }} - #[inline] pub fn get_sp800108_ctr_hmac_md5() -> Result { unsafe { + } + #[inline] pub fn get_sp800108_ctr_hmac_md5() -> Result { >::get_activation_factory().get_sp800108_ctr_hmac_md5() - }} - #[inline] pub fn get_sp800108_ctr_hmac_sha1() -> Result { unsafe { + } + #[inline] pub fn get_sp800108_ctr_hmac_sha1() -> Result { >::get_activation_factory().get_sp800108_ctr_hmac_sha1() - }} - #[inline] pub fn get_sp800108_ctr_hmac_sha256() -> Result { unsafe { + } + #[inline] pub fn get_sp800108_ctr_hmac_sha256() -> Result { >::get_activation_factory().get_sp800108_ctr_hmac_sha256() - }} - #[inline] pub fn get_sp800108_ctr_hmac_sha384() -> Result { unsafe { + } + #[inline] pub fn get_sp800108_ctr_hmac_sha384() -> Result { >::get_activation_factory().get_sp800108_ctr_hmac_sha384() - }} - #[inline] pub fn get_sp800108_ctr_hmac_sha512() -> Result { unsafe { + } + #[inline] pub fn get_sp800108_ctr_hmac_sha512() -> Result { >::get_activation_factory().get_sp800108_ctr_hmac_sha512() - }} - #[inline] pub fn get_sp80056a_concat_md5() -> Result { unsafe { + } + #[inline] pub fn get_sp80056a_concat_md5() -> Result { >::get_activation_factory().get_sp80056a_concat_md5() - }} - #[inline] pub fn get_sp80056a_concat_sha1() -> Result { unsafe { + } + #[inline] pub fn get_sp80056a_concat_sha1() -> Result { >::get_activation_factory().get_sp80056a_concat_sha1() - }} - #[inline] pub fn get_sp80056a_concat_sha256() -> Result { unsafe { + } + #[inline] pub fn get_sp80056a_concat_sha256() -> Result { >::get_activation_factory().get_sp80056a_concat_sha256() - }} - #[inline] pub fn get_sp80056a_concat_sha384() -> Result { unsafe { + } + #[inline] pub fn get_sp80056a_concat_sha384() -> Result { >::get_activation_factory().get_sp80056a_concat_sha384() - }} - #[inline] pub fn get_sp80056a_concat_sha512() -> Result { unsafe { + } + #[inline] pub fn get_sp80056a_concat_sha512() -> Result { >::get_activation_factory().get_sp80056a_concat_sha512() - }} - #[inline] pub fn get_capi_kdf_md5() -> Result { unsafe { + } + #[inline] pub fn get_capi_kdf_md5() -> Result { >::get_activation_factory().get_capi_kdf_md5() - }} - #[inline] pub fn get_capi_kdf_sha1() -> Result { unsafe { + } + #[inline] pub fn get_capi_kdf_sha1() -> Result { >::get_activation_factory().get_capi_kdf_sha1() - }} - #[inline] pub fn get_capi_kdf_sha256() -> Result { unsafe { + } + #[inline] pub fn get_capi_kdf_sha256() -> Result { >::get_activation_factory().get_capi_kdf_sha256() - }} - #[inline] pub fn get_capi_kdf_sha384() -> Result { unsafe { + } + #[inline] pub fn get_capi_kdf_sha384() -> Result { >::get_activation_factory().get_capi_kdf_sha384() - }} - #[inline] pub fn get_capi_kdf_sha512() -> Result { unsafe { + } + #[inline] pub fn get_capi_kdf_sha512() -> Result { >::get_activation_factory().get_capi_kdf_sha512() - }} + } } DEFINE_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]) [CLSID_KeyDerivationAlgorithmNames]); DEFINE_IID!(IID_IKeyDerivationAlgorithmNamesStatics, 2070820414, 38098, 18233, 165, 123, 2, 46, 12, 58, 64, 42); @@ -5611,81 +5611,81 @@ RT_INTERFACE!{static interface IKeyDerivationAlgorithmNamesStatics(IKeyDerivatio fn get_Sp80056aConcatSha512(&self, out: *mut HSTRING) -> HRESULT }} impl IKeyDerivationAlgorithmNamesStatics { - #[inline] pub unsafe fn get_pbkdf2_md5(&self) -> Result { + #[inline] pub fn get_pbkdf2_md5(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Pbkdf2Md5)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pbkdf2_sha1(&self) -> Result { + }} + #[inline] pub fn get_pbkdf2_sha1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Pbkdf2Sha1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pbkdf2_sha256(&self) -> Result { + }} + #[inline] pub fn get_pbkdf2_sha256(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Pbkdf2Sha256)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pbkdf2_sha384(&self) -> Result { + }} + #[inline] pub fn get_pbkdf2_sha384(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Pbkdf2Sha384)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pbkdf2_sha512(&self) -> Result { + }} + #[inline] pub fn get_pbkdf2_sha512(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Pbkdf2Sha512)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sp800108_ctr_hmac_md5(&self) -> Result { + }} + #[inline] pub fn get_sp800108_ctr_hmac_md5(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Sp800108CtrHmacMd5)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sp800108_ctr_hmac_sha1(&self) -> Result { + }} + #[inline] pub fn get_sp800108_ctr_hmac_sha1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Sp800108CtrHmacSha1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sp800108_ctr_hmac_sha256(&self) -> Result { + }} + #[inline] pub fn get_sp800108_ctr_hmac_sha256(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Sp800108CtrHmacSha256)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sp800108_ctr_hmac_sha384(&self) -> Result { + }} + #[inline] pub fn get_sp800108_ctr_hmac_sha384(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Sp800108CtrHmacSha384)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sp800108_ctr_hmac_sha512(&self) -> Result { + }} + #[inline] pub fn get_sp800108_ctr_hmac_sha512(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Sp800108CtrHmacSha512)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sp80056a_concat_md5(&self) -> Result { + }} + #[inline] pub fn get_sp80056a_concat_md5(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Sp80056aConcatMd5)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sp80056a_concat_sha1(&self) -> Result { + }} + #[inline] pub fn get_sp80056a_concat_sha1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Sp80056aConcatSha1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sp80056a_concat_sha256(&self) -> Result { + }} + #[inline] pub fn get_sp80056a_concat_sha256(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Sp80056aConcatSha256)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sp80056a_concat_sha384(&self) -> Result { + }} + #[inline] pub fn get_sp80056a_concat_sha384(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Sp80056aConcatSha384)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sp80056a_concat_sha512(&self) -> Result { + }} + #[inline] pub fn get_sp80056a_concat_sha512(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Sp80056aConcatSha512)(self as *const _ as *mut _, &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] { @@ -5696,31 +5696,31 @@ RT_INTERFACE!{static interface IKeyDerivationAlgorithmNamesStatics2(IKeyDerivati fn get_CapiKdfSha512(&self, out: *mut HSTRING) -> HRESULT }} impl IKeyDerivationAlgorithmNamesStatics2 { - #[inline] pub unsafe fn get_capi_kdf_md5(&self) -> Result { + #[inline] pub fn get_capi_kdf_md5(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CapiKdfMd5)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_capi_kdf_sha1(&self) -> Result { + }} + #[inline] pub fn get_capi_kdf_sha1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CapiKdfSha1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_capi_kdf_sha256(&self) -> Result { + }} + #[inline] pub fn get_capi_kdf_sha256(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CapiKdfSha256)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_capi_kdf_sha384(&self) -> Result { + }} + #[inline] pub fn get_capi_kdf_sha384(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CapiKdfSha384)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_capi_kdf_sha512(&self) -> Result { + }} + #[inline] pub fn get_capi_kdf_sha512(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CapiKdfSha512)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::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] { @@ -5728,23 +5728,23 @@ RT_INTERFACE!{interface IKeyDerivationAlgorithmProvider(IKeyDerivationAlgorithmP #[cfg(feature="windows-storage")] fn CreateKey(&self, keyMaterial: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut CryptographicKey) -> HRESULT }} impl IKeyDerivationAlgorithmProvider { - #[inline] pub unsafe fn get_algorithm_name(&self) -> Result { + #[inline] pub fn get_algorithm_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AlgorithmName)(self 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 create_key(&self, keyMaterial: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_key(&self, keyMaterial: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateKey)(self as *const _ as *mut _, keyMaterial as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class KeyDerivationAlgorithmProvider: IKeyDerivationAlgorithmProvider} impl RtActivatable for KeyDerivationAlgorithmProvider {} impl KeyDerivationAlgorithmProvider { - #[inline] pub fn open_algorithm(algorithm: &HStringArg) -> Result> { unsafe { + #[inline] pub fn open_algorithm(algorithm: &HStringArg) -> Result>> { >::get_activation_factory().open_algorithm(algorithm) - }} + } } DEFINE_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]) [CLSID_KeyDerivationAlgorithmProvider]); DEFINE_IID!(IID_IKeyDerivationAlgorithmProviderStatics, 170002810, 2588, 17467, 148, 24, 185, 73, 138, 235, 22, 3); @@ -5752,11 +5752,11 @@ RT_INTERFACE!{static interface IKeyDerivationAlgorithmProviderStatics(IKeyDeriva fn OpenAlgorithm(&self, algorithm: HSTRING, out: *mut *mut KeyDerivationAlgorithmProvider) -> HRESULT }} impl IKeyDerivationAlgorithmProviderStatics { - #[inline] pub unsafe fn open_algorithm(&self, algorithm: &HStringArg) -> Result> { + #[inline] pub fn open_algorithm(&self, algorithm: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenAlgorithm)(self as *const _ as *mut _, algorithm.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IKeyDerivationParameters, 2079349095, 1147, 19084, 150, 74, 70, 159, 253, 85, 34, 226); RT_INTERFACE!{interface IKeyDerivationParameters(IKeyDerivationParametersVtbl): IInspectable(IInspectableVtbl) [IID_IKeyDerivationParameters] { @@ -5767,37 +5767,37 @@ RT_INTERFACE!{interface IKeyDerivationParameters(IKeyDerivationParametersVtbl): fn get_IterationCount(&self, out: *mut u32) -> HRESULT }} impl IKeyDerivationParameters { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_kdf_generic_binary(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_kdf_generic_binary(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_KdfGenericBinary)(self 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_kdf_generic_binary(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_kdf_generic_binary(&self, value: &::rt::gen::windows::storage::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_KdfGenericBinary)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_iteration_count(&self) -> Result { + }} + #[inline] pub fn get_iteration_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IterationCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class KeyDerivationParameters: IKeyDerivationParameters} impl RtActivatable for KeyDerivationParameters {} impl RtActivatable for KeyDerivationParameters {} impl KeyDerivationParameters { - #[cfg(feature="windows-storage")] #[inline] pub fn build_for_pbkdf2(pbkdf2Salt: &::rt::gen::windows::storage::streams::IBuffer, iterationCount: u32) -> Result> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn build_for_pbkdf2(pbkdf2Salt: &::rt::gen::windows::storage::streams::IBuffer, iterationCount: u32) -> Result>> { >::get_activation_factory().build_for_pbkdf2(pbkdf2Salt, iterationCount) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn build_for_sp800108(label: &::rt::gen::windows::storage::streams::IBuffer, context: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn build_for_sp800108(label: &::rt::gen::windows::storage::streams::IBuffer, context: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { >::get_activation_factory().build_for_sp800108(label, context) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn build_for_sp80056a(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> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn build_for_sp80056a(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>> { >::get_activation_factory().build_for_sp80056a(algorithmId, partyUInfo, partyVInfo, suppPubInfo, suppPrivInfo) - }} - #[inline] pub fn build_for_capi1_kdf(capi1KdfTargetAlgorithm: Capi1KdfTargetAlgorithm) -> Result> { unsafe { + } + #[inline] pub fn build_for_capi1_kdf(capi1KdfTargetAlgorithm: Capi1KdfTargetAlgorithm) -> Result>> { >::get_activation_factory().build_for_capi1_kdf(capi1KdfTargetAlgorithm) - }} + } } DEFINE_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]) [CLSID_KeyDerivationParameters]); DEFINE_IID!(IID_IKeyDerivationParameters2, 3443615441, 16766, 20300, 182, 102, 192, 216, 121, 243, 248, 224); @@ -5806,15 +5806,15 @@ RT_INTERFACE!{interface IKeyDerivationParameters2(IKeyDerivationParameters2Vtbl) fn put_Capi1KdfTargetAlgorithm(&self, value: Capi1KdfTargetAlgorithm) -> HRESULT }} impl IKeyDerivationParameters2 { - #[inline] pub unsafe fn get_capi1_kdf_target_algorithm(&self) -> Result { + #[inline] pub fn get_capi1_kdf_target_algorithm(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Capi1KdfTargetAlgorithm)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_capi1_kdf_target_algorithm(&self, value: Capi1KdfTargetAlgorithm) -> Result<()> { + }} + #[inline] pub fn set_capi1_kdf_target_algorithm(&self, value: Capi1KdfTargetAlgorithm) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Capi1KdfTargetAlgorithm)(self as *const _ as *mut _, 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] { @@ -5823,54 +5823,54 @@ RT_INTERFACE!{static interface IKeyDerivationParametersStatics(IKeyDerivationPar #[cfg(feature="windows-storage")] fn BuildForSP80056a(&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(&self, pbkdf2Salt: &::rt::gen::windows::storage::streams::IBuffer, iterationCount: u32) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn build_for_pbkdf2(&self, pbkdf2Salt: &::rt::gen::windows::storage::streams::IBuffer, iterationCount: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).BuildForPbkdf2)(self as *const _ as *mut _, 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(&self, label: &::rt::gen::windows::storage::streams::IBuffer, context: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn build_for_sp800108(&self, label: &::rt::gen::windows::storage::streams::IBuffer, context: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).BuildForSP800108)(self as *const _ as *mut _, 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(&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> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn build_for_sp80056a(&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>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).BuildForSP80056a)(self as *const _ as *mut _, 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) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, capi1KdfTargetAlgorithm: Capi1KdfTargetAlgorithm, out: *mut *mut KeyDerivationParameters) -> HRESULT }} impl IKeyDerivationParametersStatics2 { - #[inline] pub unsafe fn build_for_capi1_kdf(&self, capi1KdfTargetAlgorithm: Capi1KdfTargetAlgorithm) -> Result> { + #[inline] pub fn build_for_capi1_kdf(&self, capi1KdfTargetAlgorithm: Capi1KdfTargetAlgorithm) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).BuildForCapi1Kdf)(self as *const _ as *mut _, capi1KdfTargetAlgorithm, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{static class MacAlgorithmNames} impl RtActivatable for MacAlgorithmNames {} impl MacAlgorithmNames { - #[inline] pub fn get_hmac_md5() -> Result { unsafe { + #[inline] pub fn get_hmac_md5() -> Result { >::get_activation_factory().get_hmac_md5() - }} - #[inline] pub fn get_hmac_sha1() -> Result { unsafe { + } + #[inline] pub fn get_hmac_sha1() -> Result { >::get_activation_factory().get_hmac_sha1() - }} - #[inline] pub fn get_hmac_sha256() -> Result { unsafe { + } + #[inline] pub fn get_hmac_sha256() -> Result { >::get_activation_factory().get_hmac_sha256() - }} - #[inline] pub fn get_hmac_sha384() -> Result { unsafe { + } + #[inline] pub fn get_hmac_sha384() -> Result { >::get_activation_factory().get_hmac_sha384() - }} - #[inline] pub fn get_hmac_sha512() -> Result { unsafe { + } + #[inline] pub fn get_hmac_sha512() -> Result { >::get_activation_factory().get_hmac_sha512() - }} - #[inline] pub fn get_aes_cmac() -> Result { unsafe { + } + #[inline] pub fn get_aes_cmac() -> Result { >::get_activation_factory().get_aes_cmac() - }} + } } DEFINE_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]) [CLSID_MacAlgorithmNames]); DEFINE_IID!(IID_IMacAlgorithmNamesStatics, 1094788728, 64286, 17316, 137, 94, 169, 2, 110, 67, 144, 163); @@ -5883,36 +5883,36 @@ RT_INTERFACE!{static interface IMacAlgorithmNamesStatics(IMacAlgorithmNamesStati fn get_AesCmac(&self, out: *mut HSTRING) -> HRESULT }} impl IMacAlgorithmNamesStatics { - #[inline] pub unsafe fn get_hmac_md5(&self) -> Result { + #[inline] pub fn get_hmac_md5(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HmacMd5)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_hmac_sha1(&self) -> Result { + }} + #[inline] pub fn get_hmac_sha1(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HmacSha1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_hmac_sha256(&self) -> Result { + }} + #[inline] pub fn get_hmac_sha256(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HmacSha256)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_hmac_sha384(&self) -> Result { + }} + #[inline] pub fn get_hmac_sha384(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HmacSha384)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_hmac_sha512(&self) -> Result { + }} + #[inline] pub fn get_hmac_sha512(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HmacSha512)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_aes_cmac(&self) -> Result { + }} + #[inline] pub fn get_aes_cmac(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AesCmac)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::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] { @@ -5921,28 +5921,28 @@ RT_INTERFACE!{interface IMacAlgorithmProvider(IMacAlgorithmProviderVtbl): IInspe #[cfg(feature="windows-storage")] fn CreateKey(&self, keyMaterial: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut CryptographicKey) -> HRESULT }} impl IMacAlgorithmProvider { - #[inline] pub unsafe fn get_algorithm_name(&self) -> Result { + #[inline] pub fn get_algorithm_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AlgorithmName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mac_length(&self) -> Result { + }} + #[inline] pub fn get_mac_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MacLength)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn create_key(&self, keyMaterial: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_key(&self, keyMaterial: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateKey)(self as *const _ as *mut _, keyMaterial as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MacAlgorithmProvider: IMacAlgorithmProvider} impl RtActivatable for MacAlgorithmProvider {} impl MacAlgorithmProvider { - #[inline] pub fn open_algorithm(algorithm: &HStringArg) -> Result> { unsafe { + #[inline] pub fn open_algorithm(algorithm: &HStringArg) -> Result>> { >::get_activation_factory().open_algorithm(algorithm) - }} + } } DEFINE_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]) [CLSID_MacAlgorithmProvider]); DEFINE_IID!(IID_IMacAlgorithmProvider2, 1839409685, 55601, 17133, 142, 126, 195, 1, 202, 238, 17, 156); @@ -5950,111 +5950,111 @@ RT_INTERFACE!{interface IMacAlgorithmProvider2(IMacAlgorithmProvider2Vtbl): IIns #[cfg(feature="windows-storage")] fn CreateHash(&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(&self, keyMaterial: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn create_hash(&self, keyMaterial: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateHash)(self as *const _ as *mut _, keyMaterial as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, algorithm: HSTRING, out: *mut *mut MacAlgorithmProvider) -> HRESULT }} impl IMacAlgorithmProviderStatics { - #[inline] pub unsafe fn open_algorithm(&self, algorithm: &HStringArg) -> Result> { + #[inline] pub fn open_algorithm(&self, algorithm: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenAlgorithm)(self as *const _ as *mut _, algorithm.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{static class PersistedKeyProvider} impl RtActivatable for PersistedKeyProvider {} impl PersistedKeyProvider { - #[inline] pub fn open_key_pair_from_certificate_async(certificate: &super::certificates::Certificate, hashAlgorithmName: &HStringArg, padding: CryptographicPadding) -> Result>> { unsafe { + #[inline] pub fn open_key_pair_from_certificate_async(certificate: &super::certificates::Certificate, hashAlgorithmName: &HStringArg, padding: CryptographicPadding) -> Result>> { >::get_activation_factory().open_key_pair_from_certificate_async(certificate, hashAlgorithmName, padding) - }} - #[inline] pub fn open_public_key_from_certificate(certificate: &super::certificates::Certificate, hashAlgorithmName: &HStringArg, padding: CryptographicPadding) -> Result> { unsafe { + } + #[inline] pub fn open_public_key_from_certificate(certificate: &super::certificates::Certificate, hashAlgorithmName: &HStringArg, padding: CryptographicPadding) -> Result>> { >::get_activation_factory().open_public_key_from_certificate(certificate, hashAlgorithmName, padding) - }} + } } DEFINE_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]) [CLSID_PersistedKeyProvider]); 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(&self, certificate: *mut super::certificates::Certificate, hashAlgorithmName: HSTRING, padding: CryptographicPadding, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn OpenKeyPairFromCertificateAsync(&self, certificate: *mut super::certificates::Certificate, hashAlgorithmName: HSTRING, padding: CryptographicPadding, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn OpenPublicKeyFromCertificate(&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(&self, certificate: &super::certificates::Certificate, hashAlgorithmName: &HStringArg, padding: CryptographicPadding) -> Result>> { + #[inline] pub fn open_key_pair_from_certificate_async(&self, certificate: &super::certificates::Certificate, hashAlgorithmName: &HStringArg, padding: CryptographicPadding) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenKeyPairFromCertificateAsync)(self as *const _ as *mut _, 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(&self, certificate: &super::certificates::Certificate, hashAlgorithmName: &HStringArg, padding: CryptographicPadding) -> Result> { + }} + #[inline] pub fn open_public_key_from_certificate(&self, certificate: &super::certificates::Certificate, hashAlgorithmName: &HStringArg, padding: CryptographicPadding) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenPublicKeyFromCertificate)(self as *const _ as *mut _, certificate as *const _ as *mut _, hashAlgorithmName.get(), padding, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{static class SymmetricAlgorithmNames} impl RtActivatable for SymmetricAlgorithmNames {} impl SymmetricAlgorithmNames { - #[inline] pub fn get_des_cbc() -> Result { unsafe { + #[inline] pub fn get_des_cbc() -> Result { >::get_activation_factory().get_des_cbc() - }} - #[inline] pub fn get_des_ecb() -> Result { unsafe { + } + #[inline] pub fn get_des_ecb() -> Result { >::get_activation_factory().get_des_ecb() - }} - #[inline] pub fn get_triple_des_cbc() -> Result { unsafe { + } + #[inline] pub fn get_triple_des_cbc() -> Result { >::get_activation_factory().get_triple_des_cbc() - }} - #[inline] pub fn get_triple_des_ecb() -> Result { unsafe { + } + #[inline] pub fn get_triple_des_ecb() -> Result { >::get_activation_factory().get_triple_des_ecb() - }} - #[inline] pub fn get_rc2_cbc() -> Result { unsafe { + } + #[inline] pub fn get_rc2_cbc() -> Result { >::get_activation_factory().get_rc2_cbc() - }} - #[inline] pub fn get_rc2_ecb() -> Result { unsafe { + } + #[inline] pub fn get_rc2_ecb() -> Result { >::get_activation_factory().get_rc2_ecb() - }} - #[inline] pub fn get_aes_cbc() -> Result { unsafe { + } + #[inline] pub fn get_aes_cbc() -> Result { >::get_activation_factory().get_aes_cbc() - }} - #[inline] pub fn get_aes_ecb() -> Result { unsafe { + } + #[inline] pub fn get_aes_ecb() -> Result { >::get_activation_factory().get_aes_ecb() - }} - #[inline] pub fn get_aes_gcm() -> Result { unsafe { + } + #[inline] pub fn get_aes_gcm() -> Result { >::get_activation_factory().get_aes_gcm() - }} - #[inline] pub fn get_aes_ccm() -> Result { unsafe { + } + #[inline] pub fn get_aes_ccm() -> Result { >::get_activation_factory().get_aes_ccm() - }} - #[inline] pub fn get_aes_cbc_pkcs7() -> Result { unsafe { + } + #[inline] pub fn get_aes_cbc_pkcs7() -> Result { >::get_activation_factory().get_aes_cbc_pkcs7() - }} - #[inline] pub fn get_aes_ecb_pkcs7() -> Result { unsafe { + } + #[inline] pub fn get_aes_ecb_pkcs7() -> Result { >::get_activation_factory().get_aes_ecb_pkcs7() - }} - #[inline] pub fn get_des_cbc_pkcs7() -> Result { unsafe { + } + #[inline] pub fn get_des_cbc_pkcs7() -> Result { >::get_activation_factory().get_des_cbc_pkcs7() - }} - #[inline] pub fn get_des_ecb_pkcs7() -> Result { unsafe { + } + #[inline] pub fn get_des_ecb_pkcs7() -> Result { >::get_activation_factory().get_des_ecb_pkcs7() - }} - #[inline] pub fn get_triple_des_cbc_pkcs7() -> Result { unsafe { + } + #[inline] pub fn get_triple_des_cbc_pkcs7() -> Result { >::get_activation_factory().get_triple_des_cbc_pkcs7() - }} - #[inline] pub fn get_triple_des_ecb_pkcs7() -> Result { unsafe { + } + #[inline] pub fn get_triple_des_ecb_pkcs7() -> Result { >::get_activation_factory().get_triple_des_ecb_pkcs7() - }} - #[inline] pub fn get_rc2_cbc_pkcs7() -> Result { unsafe { + } + #[inline] pub fn get_rc2_cbc_pkcs7() -> Result { >::get_activation_factory().get_rc2_cbc_pkcs7() - }} - #[inline] pub fn get_rc2_ecb_pkcs7() -> Result { unsafe { + } + #[inline] pub fn get_rc2_ecb_pkcs7() -> Result { >::get_activation_factory().get_rc2_ecb_pkcs7() - }} - #[inline] pub fn get_rc4() -> Result { unsafe { + } + #[inline] pub fn get_rc4() -> Result { >::get_activation_factory().get_rc4() - }} + } } DEFINE_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]) [CLSID_SymmetricAlgorithmNames]); DEFINE_IID!(IID_ISymmetricAlgorithmNamesStatics, 1752199803, 51606, 20142, 132, 215, 121, 178, 174, 183, 59, 156); @@ -6080,101 +6080,101 @@ RT_INTERFACE!{static interface ISymmetricAlgorithmNamesStatics(ISymmetricAlgorit fn get_Rc4(&self, out: *mut HSTRING) -> HRESULT }} impl ISymmetricAlgorithmNamesStatics { - #[inline] pub unsafe fn get_des_cbc(&self) -> Result { + #[inline] pub fn get_des_cbc(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DesCbc)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_des_ecb(&self) -> Result { + }} + #[inline] pub fn get_des_ecb(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DesEcb)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_triple_des_cbc(&self) -> Result { + }} + #[inline] pub fn get_triple_des_cbc(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TripleDesCbc)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_triple_des_ecb(&self) -> Result { + }} + #[inline] pub fn get_triple_des_ecb(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TripleDesEcb)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rc2_cbc(&self) -> Result { + }} + #[inline] pub fn get_rc2_cbc(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Rc2Cbc)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rc2_ecb(&self) -> Result { + }} + #[inline] pub fn get_rc2_ecb(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Rc2Ecb)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_aes_cbc(&self) -> Result { + }} + #[inline] pub fn get_aes_cbc(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AesCbc)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_aes_ecb(&self) -> Result { + }} + #[inline] pub fn get_aes_ecb(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AesEcb)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_aes_gcm(&self) -> Result { + }} + #[inline] pub fn get_aes_gcm(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AesGcm)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_aes_ccm(&self) -> Result { + }} + #[inline] pub fn get_aes_ccm(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AesCcm)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_aes_cbc_pkcs7(&self) -> Result { + }} + #[inline] pub fn get_aes_cbc_pkcs7(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AesCbcPkcs7)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_aes_ecb_pkcs7(&self) -> Result { + }} + #[inline] pub fn get_aes_ecb_pkcs7(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AesEcbPkcs7)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_des_cbc_pkcs7(&self) -> Result { + }} + #[inline] pub fn get_des_cbc_pkcs7(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DesCbcPkcs7)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_des_ecb_pkcs7(&self) -> Result { + }} + #[inline] pub fn get_des_ecb_pkcs7(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DesEcbPkcs7)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_triple_des_cbc_pkcs7(&self) -> Result { + }} + #[inline] pub fn get_triple_des_cbc_pkcs7(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TripleDesCbcPkcs7)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_triple_des_ecb_pkcs7(&self) -> Result { + }} + #[inline] pub fn get_triple_des_ecb_pkcs7(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TripleDesEcbPkcs7)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rc2_cbc_pkcs7(&self) -> Result { + }} + #[inline] pub fn get_rc2_cbc_pkcs7(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Rc2CbcPkcs7)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rc2_ecb_pkcs7(&self) -> Result { + }} + #[inline] pub fn get_rc2_ecb_pkcs7(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Rc2EcbPkcs7)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rc4(&self) -> Result { + }} + #[inline] pub fn get_rc4(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Rc4)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::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] { @@ -6183,28 +6183,28 @@ RT_INTERFACE!{interface ISymmetricKeyAlgorithmProvider(ISymmetricKeyAlgorithmPro #[cfg(feature="windows-storage")] fn CreateSymmetricKey(&self, keyMaterial: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut CryptographicKey) -> HRESULT }} impl ISymmetricKeyAlgorithmProvider { - #[inline] pub unsafe fn get_algorithm_name(&self) -> Result { + #[inline] pub fn get_algorithm_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AlgorithmName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_block_length(&self) -> Result { + }} + #[inline] pub fn get_block_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BlockLength)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn create_symmetric_key(&self, keyMaterial: &::rt::gen::windows::storage::streams::IBuffer) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_symmetric_key(&self, keyMaterial: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateSymmetricKey)(self as *const _ as *mut _, keyMaterial as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SymmetricKeyAlgorithmProvider: ISymmetricKeyAlgorithmProvider} impl RtActivatable for SymmetricKeyAlgorithmProvider {} impl SymmetricKeyAlgorithmProvider { - #[inline] pub fn open_algorithm(algorithm: &HStringArg) -> Result> { unsafe { + #[inline] pub fn open_algorithm(algorithm: &HStringArg) -> Result>> { >::get_activation_factory().open_algorithm(algorithm) - }} + } } DEFINE_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]) [CLSID_SymmetricKeyAlgorithmProvider]); DEFINE_IID!(IID_ISymmetricKeyAlgorithmProviderStatics, 2369463078, 7991, 18719, 182, 14, 245, 67, 27, 38, 180, 131); @@ -6212,51 +6212,51 @@ RT_INTERFACE!{static interface ISymmetricKeyAlgorithmProviderStatics(ISymmetricK fn OpenAlgorithm(&self, algorithm: HSTRING, out: *mut *mut SymmetricKeyAlgorithmProvider) -> HRESULT }} impl ISymmetricKeyAlgorithmProviderStatics { - #[inline] pub unsafe fn open_algorithm(&self, algorithm: &HStringArg) -> Result> { + #[inline] pub fn open_algorithm(&self, algorithm: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenAlgorithm)(self as *const _ as *mut _, algorithm.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } } // 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(&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(&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(&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(&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 ProtectAsync(&self, data: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncOperation<::rt::gen::windows::storage::streams::IBuffer>) -> HRESULT, + #[cfg(feature="windows-storage")] fn UnprotectAsync(&self, data: *mut ::rt::gen::windows::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncOperation<::rt::gen::windows::storage::streams::IBuffer>) -> HRESULT, + #[cfg(feature="windows-storage")] fn ProtectStreamAsync(&self, src: *mut ::rt::gen::windows::storage::streams::IInputStream, dest: *mut ::rt::gen::windows::storage::streams::IOutputStream, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + #[cfg(feature="windows-storage")] fn UnprotectStreamAsync(&self, src: *mut ::rt::gen::windows::storage::streams::IInputStream, dest: *mut ::rt::gen::windows::storage::streams::IOutputStream, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IDataProtectionProvider { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn protect_async(&self, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn protect_async(&self, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ProtectAsync)(self 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 unprotect_async(&self, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn unprotect_async(&self, data: &::rt::gen::windows::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UnprotectAsync)(self 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 protect_stream_async(&self, src: &::rt::gen::windows::storage::streams::IInputStream, dest: &::rt::gen::windows::storage::streams::IOutputStream) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn protect_stream_async(&self, src: &::rt::gen::windows::storage::streams::IInputStream, dest: &::rt::gen::windows::storage::streams::IOutputStream) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ProtectStreamAsync)(self as *const _ as *mut _, 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(&self, src: &::rt::gen::windows::storage::streams::IInputStream, dest: &::rt::gen::windows::storage::streams::IOutputStream) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn unprotect_stream_async(&self, src: &::rt::gen::windows::storage::streams::IInputStream, dest: &::rt::gen::windows::storage::streams::IOutputStream) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UnprotectStreamAsync)(self as *const _ as *mut _, src as *const _ as *mut _, dest as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class DataProtectionProvider: IDataProtectionProvider} impl RtActivatable for DataProtectionProvider {} impl RtActivatable for DataProtectionProvider {} impl DataProtectionProvider { - #[inline] pub fn create_overload_explicit(protectionDescriptor: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_overload_explicit(protectionDescriptor: &HStringArg) -> Result> { >::get_activation_factory().create_overload_explicit(protectionDescriptor) - }} + } } DEFINE_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]) [CLSID_DataProtectionProvider]); DEFINE_IID!(IID_IDataProtectionProviderFactory, 2918399404, 18738, 19679, 172, 65, 114, 20, 51, 53, 20, 202); @@ -6264,11 +6264,11 @@ RT_INTERFACE!{static interface IDataProtectionProviderFactory(IDataProtectionPro fn CreateOverloadExplicit(&self, protectionDescriptor: HSTRING, out: *mut *mut DataProtectionProvider) -> HRESULT }} impl IDataProtectionProviderFactory { - #[inline] pub unsafe fn create_overload_explicit(&self, protectionDescriptor: &HStringArg) -> Result> { + #[inline] pub fn create_overload_explicit(&self, protectionDescriptor: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateOverloadExplicit)(self as *const _ as *mut _, protectionDescriptor.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } } // Windows.Security.Cryptography.DataProtection } // Windows.Security.Cryptography @@ -6281,16 +6281,16 @@ RT_INTERFACE!{interface IBufferProtectUnprotectResult(IBufferProtectUnprotectRes fn get_ProtectionInfo(&self, out: *mut *mut DataProtectionInfo) -> HRESULT }} impl IBufferProtectUnprotectResult { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_buffer(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_buffer(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Buffer)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_protection_info(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_protection_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProtectionInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class BufferProtectUnprotectResult: IBufferProtectUnprotectResult} DEFINE_IID!(IID_IDataProtectionInfo, 2216734913, 24113, 17413, 149, 64, 63, 148, 58, 240, 203, 38); @@ -6299,81 +6299,81 @@ RT_INTERFACE!{interface IDataProtectionInfo(IDataProtectionInfoVtbl): IInspectab fn get_Identity(&self, out: *mut HSTRING) -> HRESULT }} impl IDataProtectionInfo { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_identity(&self) -> Result { + }} + #[inline] pub fn get_identity(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Identity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class DataProtectionInfo: IDataProtectionInfo} RT_CLASS!{static class DataProtectionManager} impl RtActivatable for DataProtectionManager {} impl DataProtectionManager { - #[cfg(feature="windows-storage")] #[inline] pub fn protect_async(data: &super::super::storage::streams::IBuffer, identity: &HStringArg) -> Result>> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn protect_async(data: &super::super::storage::streams::IBuffer, identity: &HStringArg) -> Result>> { >::get_activation_factory().protect_async(data, identity) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn unprotect_async(data: &super::super::storage::streams::IBuffer) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn unprotect_async(data: &super::super::storage::streams::IBuffer) -> Result>> { >::get_activation_factory().unprotect_async(data) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn protect_stream_async(unprotectedStream: &super::super::storage::streams::IInputStream, identity: &HStringArg, protectedStream: &super::super::storage::streams::IOutputStream) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn protect_stream_async(unprotectedStream: &super::super::storage::streams::IInputStream, identity: &HStringArg, protectedStream: &super::super::storage::streams::IOutputStream) -> Result>> { >::get_activation_factory().protect_stream_async(unprotectedStream, identity, protectedStream) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn unprotect_stream_async(protectedStream: &super::super::storage::streams::IInputStream, unprotectedStream: &super::super::storage::streams::IOutputStream) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn unprotect_stream_async(protectedStream: &super::super::storage::streams::IInputStream, unprotectedStream: &super::super::storage::streams::IOutputStream) -> Result>> { >::get_activation_factory().unprotect_stream_async(protectedStream, unprotectedStream) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn get_protection_info_async(protectedData: &super::super::storage::streams::IBuffer) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn get_protection_info_async(protectedData: &super::super::storage::streams::IBuffer) -> Result>> { >::get_activation_factory().get_protection_info_async(protectedData) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn get_stream_protection_info_async(protectedStream: &super::super::storage::streams::IInputStream) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn get_stream_protection_info_async(protectedStream: &super::super::storage::streams::IInputStream) -> Result>> { >::get_activation_factory().get_stream_protection_info_async(protectedStream) - }} + } } DEFINE_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]) [CLSID_DataProtectionManager]); 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(&self, data: *mut super::super::storage::streams::IBuffer, identity: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn UnprotectAsync(&self, data: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn ProtectStreamAsync(&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(&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(&self, protectedData: *mut super::super::storage::streams::IBuffer, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn GetStreamProtectionInfoAsync(&self, protectedStream: *mut super::super::storage::streams::IInputStream, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn ProtectAsync(&self, data: *mut super::super::storage::streams::IBuffer, identity: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn UnprotectAsync(&self, data: *mut super::super::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn ProtectStreamAsync(&self, unprotectedStream: *mut super::super::storage::streams::IInputStream, identity: HSTRING, protectedStream: *mut super::super::storage::streams::IOutputStream, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn UnprotectStreamAsync(&self, protectedStream: *mut super::super::storage::streams::IInputStream, unprotectedStream: *mut super::super::storage::streams::IOutputStream, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn GetProtectionInfoAsync(&self, protectedData: *mut super::super::storage::streams::IBuffer, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn GetStreamProtectionInfoAsync(&self, protectedStream: *mut super::super::storage::streams::IInputStream, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IDataProtectionManagerStatics { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn protect_async(&self, data: &super::super::storage::streams::IBuffer, identity: &HStringArg) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn protect_async(&self, data: &super::super::storage::streams::IBuffer, identity: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ProtectAsync)(self as *const _ as *mut _, 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(&self, data: &super::super::storage::streams::IBuffer) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn unprotect_async(&self, data: &super::super::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UnprotectAsync)(self 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 protect_stream_async(&self, unprotectedStream: &super::super::storage::streams::IInputStream, identity: &HStringArg, protectedStream: &super::super::storage::streams::IOutputStream) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn protect_stream_async(&self, unprotectedStream: &super::super::storage::streams::IInputStream, identity: &HStringArg, protectedStream: &super::super::storage::streams::IOutputStream) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ProtectStreamAsync)(self as *const _ as *mut _, 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(&self, protectedStream: &super::super::storage::streams::IInputStream, unprotectedStream: &super::super::storage::streams::IOutputStream) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn unprotect_stream_async(&self, protectedStream: &super::super::storage::streams::IInputStream, unprotectedStream: &super::super::storage::streams::IOutputStream) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UnprotectStreamAsync)(self as *const _ as *mut _, 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(&self, protectedData: &super::super::storage::streams::IBuffer) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_protection_info_async(&self, protectedData: &super::super::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetProtectionInfoAsync)(self as *const _ as *mut _, 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(&self, protectedStream: &super::super::storage::streams::IInputStream) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_stream_protection_info_async(&self, protectedStream: &super::super::storage::streams::IInputStream) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetStreamProtectionInfoAsync)(self as *const _ as *mut _, protectedStream as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -6388,21 +6388,21 @@ RT_INTERFACE!{interface IFileProtectionInfo(IFileProtectionInfoVtbl): IInspectab fn get_Identity(&self, out: *mut HSTRING) -> HRESULT }} impl IFileProtectionInfo { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_roamable(&self) -> Result { + }} + #[inline] pub fn get_is_roamable(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsRoamable)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_identity(&self) -> Result { + }} + #[inline] pub fn get_identity(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Identity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class FileProtectionInfo: IFileProtectionInfo} DEFINE_IID!(IID_IFileProtectionInfo2, 2182232652, 21882, 18829, 142, 148, 148, 76, 213, 131, 100, 50); @@ -6410,141 +6410,141 @@ RT_INTERFACE!{interface IFileProtectionInfo2(IFileProtectionInfo2Vtbl): IInspect fn get_IsProtectWhileOpenSupported(&self, out: *mut bool) -> HRESULT }} impl IFileProtectionInfo2 { - #[inline] pub unsafe fn get_is_protect_while_open_supported(&self) -> Result { + #[inline] pub fn get_is_protect_while_open_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsProtectWhileOpenSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{static class FileProtectionManager} impl RtActivatable for FileProtectionManager {} impl RtActivatable for FileProtectionManager {} impl RtActivatable for FileProtectionManager {} impl FileProtectionManager { - #[cfg(feature="windows-storage")] #[inline] pub fn protect_async(target: &super::super::storage::IStorageItem, identity: &HStringArg) -> Result>> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn protect_async(target: &super::super::storage::IStorageItem, identity: &HStringArg) -> Result>> { >::get_activation_factory().protect_async(target, identity) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn copy_protection_async(source: &super::super::storage::IStorageItem, target: &super::super::storage::IStorageItem) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn copy_protection_async(source: &super::super::storage::IStorageItem, target: &super::super::storage::IStorageItem) -> Result>> { >::get_activation_factory().copy_protection_async(source, target) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn get_protection_info_async(source: &super::super::storage::IStorageItem) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn get_protection_info_async(source: &super::super::storage::IStorageItem) -> Result>> { >::get_activation_factory().get_protection_info_async(source) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn save_file_as_container_async(protectedFile: &super::super::storage::IStorageFile) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn save_file_as_container_async(protectedFile: &super::super::storage::IStorageFile) -> Result>> { >::get_activation_factory().save_file_as_container_async(protectedFile) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn load_file_from_container_async(containerFile: &super::super::storage::IStorageFile) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn load_file_from_container_async(containerFile: &super::super::storage::IStorageFile) -> Result>> { >::get_activation_factory().load_file_from_container_async(containerFile) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn load_file_from_container_with_target_async(containerFile: &super::super::storage::IStorageFile, target: &super::super::storage::IStorageItem) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn load_file_from_container_with_target_async(containerFile: &super::super::storage::IStorageFile, target: &super::super::storage::IStorageItem) -> Result>> { >::get_activation_factory().load_file_from_container_with_target_async(containerFile, target) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn create_protected_and_open_async(parentFolder: &super::super::storage::IStorageFolder, desiredName: &HStringArg, identity: &HStringArg, collisionOption: super::super::storage::CreationCollisionOption) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn create_protected_and_open_async(parentFolder: &super::super::storage::IStorageFolder, desiredName: &HStringArg, identity: &HStringArg, collisionOption: super::super::storage::CreationCollisionOption) -> Result>> { >::get_activation_factory().create_protected_and_open_async(parentFolder, desiredName, identity, collisionOption) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn is_container_async(file: &super::super::storage::IStorageFile) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn is_container_async(file: &super::super::storage::IStorageFile) -> Result>> { >::get_activation_factory().is_container_async(file) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn load_file_from_container_with_target_and_name_collision_option_async(containerFile: &super::super::storage::IStorageFile, target: &super::super::storage::IStorageItem, collisionOption: super::super::storage::NameCollisionOption) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn load_file_from_container_with_target_and_name_collision_option_async(containerFile: &super::super::storage::IStorageFile, target: &super::super::storage::IStorageItem, collisionOption: super::super::storage::NameCollisionOption) -> Result>> { >::get_activation_factory().load_file_from_container_with_target_and_name_collision_option_async(containerFile, target, collisionOption) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn save_file_as_container_with_sharing_async(protectedFile: &super::super::storage::IStorageFile, sharedWithIdentities: &super::super::foundation::collections::IIterable) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn save_file_as_container_with_sharing_async(protectedFile: &super::super::storage::IStorageFile, sharedWithIdentities: &foundation::collections::IIterable) -> Result>> { >::get_activation_factory().save_file_as_container_with_sharing_async(protectedFile, sharedWithIdentities) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn unprotect_async(target: &super::super::storage::IStorageItem) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn unprotect_async(target: &super::super::storage::IStorageItem) -> Result>> { >::get_activation_factory().unprotect_async(target) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn unprotect_with_options_async(target: &super::super::storage::IStorageItem, options: &FileUnprotectOptions) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn unprotect_with_options_async(target: &super::super::storage::IStorageItem, options: &FileUnprotectOptions) -> Result>> { >::get_activation_factory().unprotect_with_options_async(target, options) - }} + } } DEFINE_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]) [CLSID_FileProtectionManager]); 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(&self, target: *mut super::super::storage::IStorageItem, identity: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn CopyProtectionAsync(&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(&self, source: *mut super::super::storage::IStorageItem, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn SaveFileAsContainerAsync(&self, protectedFile: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn LoadFileFromContainerAsync(&self, containerFile: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn LoadFileFromContainerWithTargetAsync(&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(&self, parentFolder: *mut super::super::storage::IStorageFolder, desiredName: HSTRING, identity: HSTRING, collisionOption: super::super::storage::CreationCollisionOption, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn ProtectAsync(&self, target: *mut super::super::storage::IStorageItem, identity: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn CopyProtectionAsync(&self, source: *mut super::super::storage::IStorageItem, target: *mut super::super::storage::IStorageItem, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn GetProtectionInfoAsync(&self, source: *mut super::super::storage::IStorageItem, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn SaveFileAsContainerAsync(&self, protectedFile: *mut super::super::storage::IStorageFile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn LoadFileFromContainerAsync(&self, containerFile: *mut super::super::storage::IStorageFile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn LoadFileFromContainerWithTargetAsync(&self, containerFile: *mut super::super::storage::IStorageFile, target: *mut super::super::storage::IStorageItem, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn CreateProtectedAndOpenAsync(&self, parentFolder: *mut super::super::storage::IStorageFolder, desiredName: HSTRING, identity: HSTRING, collisionOption: super::super::storage::CreationCollisionOption, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IFileProtectionManagerStatics { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn protect_async(&self, target: &super::super::storage::IStorageItem, identity: &HStringArg) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn protect_async(&self, target: &super::super::storage::IStorageItem, identity: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ProtectAsync)(self as *const _ as *mut _, 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(&self, source: &super::super::storage::IStorageItem, target: &super::super::storage::IStorageItem) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn copy_protection_async(&self, source: &super::super::storage::IStorageItem, target: &super::super::storage::IStorageItem) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CopyProtectionAsync)(self as *const _ as *mut _, 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(&self, source: &super::super::storage::IStorageItem) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_protection_info_async(&self, source: &super::super::storage::IStorageItem) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetProtectionInfoAsync)(self as *const _ as *mut _, 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(&self, protectedFile: &super::super::storage::IStorageFile) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn save_file_as_container_async(&self, protectedFile: &super::super::storage::IStorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveFileAsContainerAsync)(self as *const _ as *mut _, 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(&self, containerFile: &super::super::storage::IStorageFile) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn load_file_from_container_async(&self, containerFile: &super::super::storage::IStorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LoadFileFromContainerAsync)(self as *const _ as *mut _, 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(&self, containerFile: &super::super::storage::IStorageFile, target: &super::super::storage::IStorageItem) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn load_file_from_container_with_target_async(&self, containerFile: &super::super::storage::IStorageFile, target: &super::super::storage::IStorageItem) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LoadFileFromContainerWithTargetAsync)(self as *const _ as *mut _, 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(&self, parentFolder: &super::super::storage::IStorageFolder, desiredName: &HStringArg, identity: &HStringArg, collisionOption: super::super::storage::CreationCollisionOption) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn create_protected_and_open_async(&self, parentFolder: &super::super::storage::IStorageFolder, desiredName: &HStringArg, identity: &HStringArg, collisionOption: super::super::storage::CreationCollisionOption) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateProtectedAndOpenAsync)(self as *const _ as *mut _, parentFolder as *const _ as *mut _, desiredName.get(), identity.get(), collisionOption, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, file: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn LoadFileFromContainerWithTargetAndNameCollisionOptionAsync(&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(&self, protectedFile: *mut super::super::storage::IStorageFile, sharedWithIdentities: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn IsContainerAsync(&self, file: *mut super::super::storage::IStorageFile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn LoadFileFromContainerWithTargetAndNameCollisionOptionAsync(&self, containerFile: *mut super::super::storage::IStorageFile, target: *mut super::super::storage::IStorageItem, collisionOption: super::super::storage::NameCollisionOption, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn SaveFileAsContainerWithSharingAsync(&self, protectedFile: *mut super::super::storage::IStorageFile, sharedWithIdentities: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IFileProtectionManagerStatics2 { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn is_container_async(&self, file: &super::super::storage::IStorageFile) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn is_container_async(&self, file: &super::super::storage::IStorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).IsContainerAsync)(self 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 load_file_from_container_with_target_and_name_collision_option_async(&self, containerFile: &super::super::storage::IStorageFile, target: &super::super::storage::IStorageItem, collisionOption: super::super::storage::NameCollisionOption) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn load_file_from_container_with_target_and_name_collision_option_async(&self, containerFile: &super::super::storage::IStorageFile, target: &super::super::storage::IStorageItem, collisionOption: super::super::storage::NameCollisionOption) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LoadFileFromContainerWithTargetAndNameCollisionOptionAsync)(self as *const _ as *mut _, 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(&self, protectedFile: &super::super::storage::IStorageFile, sharedWithIdentities: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn save_file_as_container_with_sharing_async(&self, protectedFile: &super::super::storage::IStorageFile, sharedWithIdentities: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveFileAsContainerWithSharingAsync)(self as *const _ as *mut _, 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_IFileProtectionManagerStatics3, 1763214490, 25167, 18134, 178, 65, 233, 205, 95, 223, 62, 63); RT_INTERFACE!{static interface IFileProtectionManagerStatics3(IFileProtectionManagerStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IFileProtectionManagerStatics3] { - #[cfg(feature="windows-storage")] fn UnprotectAsync(&self, target: *mut super::super::storage::IStorageItem, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn UnprotectWithOptionsAsync(&self, target: *mut super::super::storage::IStorageItem, options: *mut FileUnprotectOptions, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn UnprotectAsync(&self, target: *mut super::super::storage::IStorageItem, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn UnprotectWithOptionsAsync(&self, target: *mut super::super::storage::IStorageItem, options: *mut FileUnprotectOptions, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IFileProtectionManagerStatics3 { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn unprotect_async(&self, target: &super::super::storage::IStorageItem) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn unprotect_async(&self, target: &super::super::storage::IStorageItem) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UnprotectAsync)(self 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 unprotect_with_options_async(&self, target: &super::super::storage::IStorageItem, options: &FileUnprotectOptions) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn unprotect_with_options_async(&self, target: &super::super::storage::IStorageItem, options: &FileUnprotectOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UnprotectWithOptionsAsync)(self as *const _ as *mut _, target as *const _ as *mut _, options as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -6552,47 +6552,47 @@ RT_ENUM! { enum FileProtectionStatus: i32 { RT_CLASS!{static class FileRevocationManager} impl RtActivatable for FileRevocationManager {} impl FileRevocationManager { - #[cfg(feature="windows-storage")] #[inline] pub fn protect_async(storageItem: &super::super::storage::IStorageItem, enterpriseIdentity: &HStringArg) -> Result>> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn protect_async(storageItem: &super::super::storage::IStorageItem, enterpriseIdentity: &HStringArg) -> Result>> { >::get_activation_factory().protect_async(storageItem, enterpriseIdentity) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn copy_protection_async(sourceStorageItem: &super::super::storage::IStorageItem, targetStorageItem: &super::super::storage::IStorageItem) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn copy_protection_async(sourceStorageItem: &super::super::storage::IStorageItem, targetStorageItem: &super::super::storage::IStorageItem) -> Result>> { >::get_activation_factory().copy_protection_async(sourceStorageItem, targetStorageItem) - }} - #[inline] pub fn revoke(enterpriseIdentity: &HStringArg) -> Result<()> { unsafe { + } + #[inline] pub fn revoke(enterpriseIdentity: &HStringArg) -> Result<()> { >::get_activation_factory().revoke(enterpriseIdentity) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn get_status_async(storageItem: &super::super::storage::IStorageItem) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn get_status_async(storageItem: &super::super::storage::IStorageItem) -> Result>> { >::get_activation_factory().get_status_async(storageItem) - }} + } } DEFINE_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]) [CLSID_FileRevocationManager]); 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(&self, storageItem: *mut super::super::storage::IStorageItem, enterpriseIdentity: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn CopyProtectionAsync(&self, sourceStorageItem: *mut super::super::storage::IStorageItem, targetStorageItem: *mut super::super::storage::IStorageItem, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn ProtectAsync(&self, storageItem: *mut super::super::storage::IStorageItem, enterpriseIdentity: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn CopyProtectionAsync(&self, sourceStorageItem: *mut super::super::storage::IStorageItem, targetStorageItem: *mut super::super::storage::IStorageItem, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn Revoke(&self, enterpriseIdentity: HSTRING) -> HRESULT, - #[cfg(feature="windows-storage")] fn GetStatusAsync(&self, storageItem: *mut super::super::storage::IStorageItem, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn GetStatusAsync(&self, storageItem: *mut super::super::storage::IStorageItem, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IFileRevocationManagerStatics { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn protect_async(&self, storageItem: &super::super::storage::IStorageItem, enterpriseIdentity: &HStringArg) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn protect_async(&self, storageItem: &super::super::storage::IStorageItem, enterpriseIdentity: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ProtectAsync)(self as *const _ as *mut _, 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(&self, sourceStorageItem: &super::super::storage::IStorageItem, targetStorageItem: &super::super::storage::IStorageItem) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn copy_protection_async(&self, sourceStorageItem: &super::super::storage::IStorageItem, targetStorageItem: &super::super::storage::IStorageItem) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CopyProtectionAsync)(self as *const _ as *mut _, 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(&self, enterpriseIdentity: &HStringArg) -> Result<()> { + }} + #[inline] pub fn revoke(&self, enterpriseIdentity: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Revoke)(self as *const _ as *mut _, enterpriseIdentity.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_status_async(&self, storageItem: &super::super::storage::IStorageItem) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_status_async(&self, storageItem: &super::super::storage::IStorageItem) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetStatusAsync)(self as *const _ as *mut _, storageItem as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IFileUnprotectOptions, 2098402033, 15117, 19928, 161, 248, 30, 197, 56, 34, 226, 243); RT_INTERFACE!{interface IFileUnprotectOptions(IFileUnprotectOptionsVtbl): IInspectable(IInspectableVtbl) [IID_IFileUnprotectOptions] { @@ -6600,22 +6600,22 @@ RT_INTERFACE!{interface IFileUnprotectOptions(IFileUnprotectOptionsVtbl): IInspe fn get_Audit(&self, out: *mut bool) -> HRESULT }} impl IFileUnprotectOptions { - #[inline] pub unsafe fn set_audit(&self, value: bool) -> Result<()> { + #[inline] pub fn set_audit(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Audit)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_audit(&self) -> Result { + }} + #[inline] pub fn get_audit(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Audit)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class FileUnprotectOptions: IFileUnprotectOptions} impl RtActivatable for FileUnprotectOptions {} impl FileUnprotectOptions { - #[inline] pub fn create(audit: bool) -> Result> { unsafe { + #[inline] pub fn create(audit: bool) -> Result> { >::get_activation_factory().create(audit) - }} + } } DEFINE_CLSID!(FileUnprotectOptions(&[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,85,110,112,114,111,116,101,99,116,79,112,116,105,111,110,115,0]) [CLSID_FileUnprotectOptions]); DEFINE_IID!(IID_IFileUnprotectOptionsFactory, 1370403740, 55948, 19519, 155, 251, 203, 115, 167, 204, 224, 221); @@ -6623,46 +6623,46 @@ RT_INTERFACE!{static interface IFileUnprotectOptionsFactory(IFileUnprotectOption fn Create(&self, audit: bool, out: *mut *mut FileUnprotectOptions) -> HRESULT }} impl IFileUnprotectOptionsFactory { - #[inline] pub unsafe fn create(&self, audit: bool) -> Result> { + #[inline] pub fn create(&self, audit: bool) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, audit, &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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_Identities(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IProtectedAccessResumedEventArgs { - #[inline] pub unsafe fn get_identities(&self) -> Result>> { + #[inline] pub fn get_identities(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Identities)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ProtectedAccessResumedEventArgs: IProtectedAccessResumedEventArgs} 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_Deadline(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + fn get_Identities(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_Deadline(&self, out: *mut foundation::DateTime) -> HRESULT, + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IProtectedAccessSuspendingEventArgs { - #[inline] pub unsafe fn get_identities(&self) -> Result>> { + #[inline] pub fn get_identities(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Identities)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deadline(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deadline(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Deadline)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ProtectedAccessSuspendingEventArgs: IProtectedAccessSuspendingEventArgs} DEFINE_IID!(IID_IProtectedContainerExportResult, 961081237, 63483, 19266, 175, 176, 223, 112, 180, 21, 67, 193); @@ -6671,16 +6671,16 @@ RT_INTERFACE!{interface IProtectedContainerExportResult(IProtectedContainerExpor #[cfg(feature="windows-storage")] fn get_File(&self, out: *mut *mut super::super::storage::StorageFile) -> HRESULT }} impl IProtectedContainerExportResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_file(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_file(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_File)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ProtectedContainerExportResult: IProtectedContainerExportResult} DEFINE_IID!(IID_IProtectedContainerImportResult, 3451355345, 59323, 19738, 147, 57, 52, 220, 65, 20, 159, 155); @@ -6689,28 +6689,28 @@ RT_INTERFACE!{interface IProtectedContainerImportResult(IProtectedContainerImpor #[cfg(feature="windows-storage")] fn get_File(&self, out: *mut *mut super::super::storage::StorageFile) -> HRESULT }} impl IProtectedContainerImportResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_file(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_file(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_File)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ProtectedContainerImportResult: IProtectedContainerImportResult} 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_Identities(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IProtectedContentRevokedEventArgs { - #[inline] pub unsafe fn get_identities(&self) -> Result>> { + #[inline] pub fn get_identities(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Identities)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ProtectedContentRevokedEventArgs: IProtectedContentRevokedEventArgs} DEFINE_IID!(IID_IProtectedFileCreateResult, 686026090, 59879, 18947, 159, 83, 189, 177, 97, 114, 105, 155); @@ -6722,21 +6722,21 @@ RT_INTERFACE!{interface IProtectedFileCreateResult(IProtectedFileCreateResultVtb fn get_ProtectionInfo(&self, out: *mut *mut FileProtectionInfo) -> HRESULT }} impl IProtectedFileCreateResult { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_file(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_file(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_File)(self 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(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_stream(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Stream)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_protection_info(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_protection_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProtectionInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ProtectedFileCreateResult: IProtectedFileCreateResult} RT_ENUM! { enum ProtectedImportExportStatus: i32 { @@ -6757,52 +6757,52 @@ RT_INTERFACE!{interface IProtectionPolicyAuditInfo(IProtectionPolicyAuditInfoVtb fn get_TargetDescription(&self, out: *mut HSTRING) -> HRESULT }} impl IProtectionPolicyAuditInfo { - #[inline] pub unsafe fn set_action(&self, value: ProtectionPolicyAuditAction) -> Result<()> { + #[inline] pub fn set_action(&self, value: ProtectionPolicyAuditAction) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Action)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_action(&self) -> Result { + }} + #[inline] pub fn get_action(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Action)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_data_description(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_data_description(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DataDescription)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_data_description(&self) -> Result { + }} + #[inline] pub fn get_data_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DataDescription)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_source_description(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_source_description(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SourceDescription)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_source_description(&self) -> Result { + }} + #[inline] pub fn get_source_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SourceDescription)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_target_description(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_target_description(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TargetDescription)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_target_description(&self) -> Result { + }} + #[inline] pub fn get_target_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TargetDescription)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ProtectionPolicyAuditInfo: IProtectionPolicyAuditInfo} impl RtActivatable for ProtectionPolicyAuditInfo {} impl ProtectionPolicyAuditInfo { - #[inline] pub fn create(action: ProtectionPolicyAuditAction, dataDescription: &HStringArg, sourceDescription: &HStringArg, targetDescription: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(action: ProtectionPolicyAuditAction, dataDescription: &HStringArg, sourceDescription: &HStringArg, targetDescription: &HStringArg) -> Result> { >::get_activation_factory().create(action, dataDescription, sourceDescription, targetDescription) - }} - #[inline] pub fn create_with_action_and_data_description(action: ProtectionPolicyAuditAction, dataDescription: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_with_action_and_data_description(action: ProtectionPolicyAuditAction, dataDescription: &HStringArg) -> Result> { >::get_activation_factory().create_with_action_and_data_description(action, dataDescription) - }} + } } DEFINE_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]) [CLSID_ProtectionPolicyAuditInfo]); DEFINE_IID!(IID_IProtectionPolicyAuditInfoFactory, 2127829003, 37608, 17109, 131, 212, 37, 68, 11, 66, 53, 73); @@ -6811,16 +6811,16 @@ RT_INTERFACE!{static interface IProtectionPolicyAuditInfoFactory(IProtectionPoli fn CreateWithActionAndDataDescription(&self, action: ProtectionPolicyAuditAction, dataDescription: HSTRING, out: *mut *mut ProtectionPolicyAuditInfo) -> HRESULT }} impl IProtectionPolicyAuditInfoFactory { - #[inline] pub unsafe fn create(&self, action: ProtectionPolicyAuditAction, dataDescription: &HStringArg, sourceDescription: &HStringArg, targetDescription: &HStringArg) -> Result> { + #[inline] pub fn create(&self, action: ProtectionPolicyAuditAction, dataDescription: &HStringArg, sourceDescription: &HStringArg, targetDescription: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, 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(&self, action: ProtectionPolicyAuditAction, dataDescription: &HStringArg) -> Result> { + }} + #[inline] pub fn create_with_action_and_data_description(&self, action: ProtectionPolicyAuditAction, dataDescription: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithActionAndDataDescription)(self as *const _ as *mut _, action, dataDescription.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum ProtectionPolicyEvaluationResult: i32 { Allowed (ProtectionPolicyEvaluationResult_Allowed) = 0, Blocked (ProtectionPolicyEvaluationResult_Blocked) = 1, ConsentRequired (ProtectionPolicyEvaluationResult_ConsentRequired) = 2, @@ -6831,15 +6831,15 @@ RT_INTERFACE!{interface IProtectionPolicyManager(IProtectionPolicyManagerVtbl): fn get_Identity(&self, out: *mut HSTRING) -> HRESULT }} impl IProtectionPolicyManager { - #[inline] pub unsafe fn set_identity(&self, value: &HStringArg) -> Result<()> { + #[inline] pub fn set_identity(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Identity)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_identity(&self) -> Result { + }} + #[inline] pub fn get_identity(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Identity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ProtectionPolicyManager: IProtectionPolicyManager} impl RtActivatable for ProtectionPolicyManager {} @@ -6847,126 +6847,126 @@ impl RtActivatable for ProtectionPolicyManager impl RtActivatable for ProtectionPolicyManager {} impl RtActivatable for ProtectionPolicyManager {} impl ProtectionPolicyManager { - #[inline] pub fn is_identity_managed(identity: &HStringArg) -> Result { unsafe { + #[inline] pub fn is_identity_managed(identity: &HStringArg) -> Result { >::get_activation_factory().is_identity_managed(identity) - }} - #[inline] pub fn try_apply_process_uipolicy(identity: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn try_apply_process_uipolicy(identity: &HStringArg) -> Result { >::get_activation_factory().try_apply_process_uipolicy(identity) - }} - #[inline] pub fn clear_process_uipolicy() -> Result<()> { unsafe { + } + #[inline] pub fn clear_process_uipolicy() -> Result<()> { >::get_activation_factory().clear_process_uipolicy() - }} - #[inline] pub fn create_current_thread_network_context(identity: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_current_thread_network_context(identity: &HStringArg) -> Result>> { >::get_activation_factory().create_current_thread_network_context(identity) - }} - #[cfg(feature="windows-networking")] #[inline] pub fn get_primary_managed_identity_for_network_endpoint_async(endpointHost: &super::super::networking::HostName) -> Result>> { unsafe { + } + #[cfg(feature="windows-networking")] #[inline] pub fn get_primary_managed_identity_for_network_endpoint_async(endpointHost: &super::super::networking::HostName) -> Result>> { >::get_activation_factory().get_primary_managed_identity_for_network_endpoint_async(endpointHost) - }} - #[inline] pub fn revoke_content(identity: &HStringArg) -> Result<()> { unsafe { + } + #[inline] pub fn revoke_content(identity: &HStringArg) -> Result<()> { >::get_activation_factory().revoke_content(identity) - }} - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + } + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} - #[inline] pub fn add_protected_access_suspending(handler: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_protected_access_suspending(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_protected_access_suspending(handler) - }} - #[inline] pub fn remove_protected_access_suspending(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_protected_access_suspending(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_protected_access_suspending(token) - }} - #[inline] pub fn add_protected_access_resumed(handler: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_protected_access_resumed(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_protected_access_resumed(handler) - }} - #[inline] pub fn remove_protected_access_resumed(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_protected_access_resumed(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_protected_access_resumed(token) - }} - #[inline] pub fn add_protected_content_revoked(handler: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_protected_content_revoked(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_protected_content_revoked(handler) - }} - #[inline] pub fn remove_protected_content_revoked(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_protected_content_revoked(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_protected_content_revoked(token) - }} - #[inline] pub fn check_access(sourceIdentity: &HStringArg, targetIdentity: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn check_access(sourceIdentity: &HStringArg, targetIdentity: &HStringArg) -> Result { >::get_activation_factory().check_access(sourceIdentity, targetIdentity) - }} - #[inline] pub fn request_access_async(sourceIdentity: &HStringArg, targetIdentity: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn request_access_async(sourceIdentity: &HStringArg, targetIdentity: &HStringArg) -> Result>> { >::get_activation_factory().request_access_async(sourceIdentity, targetIdentity) - }} - #[inline] pub fn has_content_been_revoked_since(identity: &HStringArg, since: super::super::foundation::DateTime) -> Result { unsafe { + } + #[inline] pub fn has_content_been_revoked_since(identity: &HStringArg, since: foundation::DateTime) -> Result { >::get_activation_factory().has_content_been_revoked_since(identity, since) - }} - #[inline] pub fn check_access_for_app(sourceIdentity: &HStringArg, appPackageFamilyName: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn check_access_for_app(sourceIdentity: &HStringArg, appPackageFamilyName: &HStringArg) -> Result { >::get_activation_factory().check_access_for_app(sourceIdentity, appPackageFamilyName) - }} - #[inline] pub fn request_access_for_app_async(sourceIdentity: &HStringArg, appPackageFamilyName: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn request_access_for_app_async(sourceIdentity: &HStringArg, appPackageFamilyName: &HStringArg) -> Result>> { >::get_activation_factory().request_access_for_app_async(sourceIdentity, appPackageFamilyName) - }} - #[inline] pub fn get_enforcement_level(identity: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn get_enforcement_level(identity: &HStringArg) -> Result { >::get_activation_factory().get_enforcement_level(identity) - }} - #[inline] pub fn is_user_decryption_allowed(identity: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn is_user_decryption_allowed(identity: &HStringArg) -> Result { >::get_activation_factory().is_user_decryption_allowed(identity) - }} - #[inline] pub fn is_protection_under_lock_required(identity: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn is_protection_under_lock_required(identity: &HStringArg) -> Result { >::get_activation_factory().is_protection_under_lock_required(identity) - }} - #[inline] pub fn add_policy_changed(handler: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_policy_changed(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_policy_changed(handler) - }} - #[inline] pub fn remove_policy_changed(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_policy_changed(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_policy_changed(token) - }} - #[inline] pub fn get_is_protection_enabled() -> Result { unsafe { + } + #[inline] pub fn get_is_protection_enabled() -> Result { >::get_activation_factory().get_is_protection_enabled() - }} - #[inline] pub fn request_access_with_auditing_info_async(sourceIdentity: &HStringArg, targetIdentity: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo) -> Result>> { unsafe { + } + #[inline] pub fn request_access_with_auditing_info_async(sourceIdentity: &HStringArg, targetIdentity: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo) -> Result>> { >::get_activation_factory().request_access_with_auditing_info_async(sourceIdentity, targetIdentity, auditInfo) - }} - #[inline] pub fn request_access_with_message_async(sourceIdentity: &HStringArg, targetIdentity: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo, messageFromApp: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn request_access_with_message_async(sourceIdentity: &HStringArg, targetIdentity: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo, messageFromApp: &HStringArg) -> Result>> { >::get_activation_factory().request_access_with_message_async(sourceIdentity, targetIdentity, auditInfo, messageFromApp) - }} - #[inline] pub fn request_access_for_app_with_auditing_info_async(sourceIdentity: &HStringArg, appPackageFamilyName: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo) -> Result>> { unsafe { + } + #[inline] pub fn request_access_for_app_with_auditing_info_async(sourceIdentity: &HStringArg, appPackageFamilyName: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo) -> Result>> { >::get_activation_factory().request_access_for_app_with_auditing_info_async(sourceIdentity, appPackageFamilyName, auditInfo) - }} - #[inline] pub fn request_access_for_app_with_message_async(sourceIdentity: &HStringArg, appPackageFamilyName: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo, messageFromApp: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn request_access_for_app_with_message_async(sourceIdentity: &HStringArg, appPackageFamilyName: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo, messageFromApp: &HStringArg) -> Result>> { >::get_activation_factory().request_access_for_app_with_message_async(sourceIdentity, appPackageFamilyName, auditInfo, messageFromApp) - }} - #[inline] pub fn log_audit_event(sourceIdentity: &HStringArg, targetIdentity: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo) -> Result<()> { unsafe { + } + #[inline] pub fn log_audit_event(sourceIdentity: &HStringArg, targetIdentity: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo) -> Result<()> { >::get_activation_factory().log_audit_event(sourceIdentity, targetIdentity, auditInfo) - }} - #[inline] pub fn is_roamable_protection_enabled(identity: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn is_roamable_protection_enabled(identity: &HStringArg) -> Result { >::get_activation_factory().is_roamable_protection_enabled(identity) - }} - #[inline] pub fn request_access_with_behavior_async(sourceIdentity: &HStringArg, targetIdentity: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo, messageFromApp: &HStringArg, behavior: ProtectionPolicyRequestAccessBehavior) -> Result>> { unsafe { + } + #[inline] pub fn request_access_with_behavior_async(sourceIdentity: &HStringArg, targetIdentity: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo, messageFromApp: &HStringArg, behavior: ProtectionPolicyRequestAccessBehavior) -> Result>> { >::get_activation_factory().request_access_with_behavior_async(sourceIdentity, targetIdentity, auditInfo, messageFromApp, behavior) - }} - #[inline] pub fn request_access_for_app_with_behavior_async(sourceIdentity: &HStringArg, appPackageFamilyName: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo, messageFromApp: &HStringArg, behavior: ProtectionPolicyRequestAccessBehavior) -> Result>> { unsafe { + } + #[inline] pub fn request_access_for_app_with_behavior_async(sourceIdentity: &HStringArg, appPackageFamilyName: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo, messageFromApp: &HStringArg, behavior: ProtectionPolicyRequestAccessBehavior) -> Result>> { >::get_activation_factory().request_access_for_app_with_behavior_async(sourceIdentity, appPackageFamilyName, auditInfo, messageFromApp, behavior) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn request_access_to_files_for_app_async(sourceItemList: &super::super::foundation::collections::IIterable, appPackageFamilyName: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn request_access_to_files_for_app_async(sourceItemList: &foundation::collections::IIterable, appPackageFamilyName: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo) -> Result>> { >::get_activation_factory().request_access_to_files_for_app_async(sourceItemList, appPackageFamilyName, auditInfo) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn request_access_to_files_for_app_with_message_and_behavior_async(sourceItemList: &super::super::foundation::collections::IIterable, appPackageFamilyName: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo, messageFromApp: &HStringArg, behavior: ProtectionPolicyRequestAccessBehavior) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn request_access_to_files_for_app_with_message_and_behavior_async(sourceItemList: &foundation::collections::IIterable, appPackageFamilyName: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo, messageFromApp: &HStringArg, behavior: ProtectionPolicyRequestAccessBehavior) -> Result>> { >::get_activation_factory().request_access_to_files_for_app_with_message_and_behavior_async(sourceItemList, appPackageFamilyName, auditInfo, messageFromApp, behavior) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn request_access_to_files_for_process_async(sourceItemList: &super::super::foundation::collections::IIterable, processId: u32, auditInfo: &ProtectionPolicyAuditInfo) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn request_access_to_files_for_process_async(sourceItemList: &foundation::collections::IIterable, processId: u32, auditInfo: &ProtectionPolicyAuditInfo) -> Result>> { >::get_activation_factory().request_access_to_files_for_process_async(sourceItemList, processId, auditInfo) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn request_access_to_files_for_process_with_message_and_behavior_async(sourceItemList: &super::super::foundation::collections::IIterable, processId: u32, auditInfo: &ProtectionPolicyAuditInfo, messageFromApp: &HStringArg, behavior: ProtectionPolicyRequestAccessBehavior) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn request_access_to_files_for_process_with_message_and_behavior_async(sourceItemList: &foundation::collections::IIterable, processId: u32, auditInfo: &ProtectionPolicyAuditInfo, messageFromApp: &HStringArg, behavior: ProtectionPolicyRequestAccessBehavior) -> Result>> { >::get_activation_factory().request_access_to_files_for_process_with_message_and_behavior_async(sourceItemList, processId, auditInfo, messageFromApp, behavior) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn is_file_protection_required_async(target: &super::super::storage::IStorageItem, identity: &HStringArg) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn is_file_protection_required_async(target: &super::super::storage::IStorageItem, identity: &HStringArg) -> Result>> { >::get_activation_factory().is_file_protection_required_async(target, identity) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn is_file_protection_required_for_new_file_async(parentFolder: &super::super::storage::IStorageFolder, identity: &HStringArg, desiredName: &HStringArg) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn is_file_protection_required_for_new_file_async(parentFolder: &super::super::storage::IStorageFolder, identity: &HStringArg, desiredName: &HStringArg) -> Result>> { >::get_activation_factory().is_file_protection_required_for_new_file_async(parentFolder, identity, desiredName) - }} - #[inline] pub fn get_primary_managed_identity() -> Result { unsafe { + } + #[inline] pub fn get_primary_managed_identity() -> Result { >::get_activation_factory().get_primary_managed_identity() - }} - #[inline] pub fn get_primary_managed_identity_for_identity(identity: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn get_primary_managed_identity_for_identity(identity: &HStringArg) -> Result { >::get_activation_factory().get_primary_managed_identity_for_identity(identity) - }} + } } DEFINE_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]) [CLSID_ProtectionPolicyManager]); DEFINE_IID!(IID_IProtectionPolicyManager2, 2885112442, 33845, 16767, 153, 182, 81, 190, 175, 54, 88, 136); @@ -6975,15 +6975,15 @@ RT_INTERFACE!{interface IProtectionPolicyManager2(IProtectionPolicyManager2Vtbl) fn get_ShowEnterpriseIndicator(&self, out: *mut bool) -> HRESULT }} impl IProtectionPolicyManager2 { - #[inline] pub unsafe fn set_show_enterprise_indicator(&self, value: bool) -> Result<()> { + #[inline] pub fn set_show_enterprise_indicator(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ShowEnterpriseIndicator)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_show_enterprise_indicator(&self) -> Result { + }} + #[inline] pub fn get_show_enterprise_indicator(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ShowEnterpriseIndicator)(self as *const _ as *mut _, &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] { @@ -6992,258 +6992,258 @@ RT_INTERFACE!{static interface IProtectionPolicyManagerStatics(IProtectionPolicy fn ClearProcessUIPolicy(&self) -> HRESULT, fn CreateCurrentThreadNetworkContext(&self, identity: HSTRING, out: *mut *mut ThreadNetworkContext) -> HRESULT, #[cfg(not(feature="windows-networking"))] fn __Dummy4(&self) -> (), - #[cfg(feature="windows-networking")] fn GetPrimaryManagedIdentityForNetworkEndpointAsync(&self, endpointHost: *mut super::super::networking::HostName, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-networking")] fn GetPrimaryManagedIdentityForNetworkEndpointAsync(&self, endpointHost: *mut super::super::networking::HostName, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn RevokeContent(&self, identity: HSTRING) -> HRESULT, fn GetForCurrentView(&self, out: *mut *mut ProtectionPolicyManager) -> HRESULT, - fn add_ProtectedAccessSuspending(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ProtectedAccessSuspending(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ProtectedAccessResumed(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ProtectedAccessResumed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ProtectedContentRevoked(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ProtectedContentRevoked(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ProtectedAccessSuspending(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ProtectedAccessSuspending(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ProtectedAccessResumed(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ProtectedAccessResumed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ProtectedContentRevoked(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ProtectedContentRevoked(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn CheckAccess(&self, sourceIdentity: HSTRING, targetIdentity: HSTRING, out: *mut ProtectionPolicyEvaluationResult) -> HRESULT, - fn RequestAccessAsync(&self, sourceIdentity: HSTRING, targetIdentity: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn RequestAccessAsync(&self, sourceIdentity: HSTRING, targetIdentity: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IProtectionPolicyManagerStatics { - #[inline] pub unsafe fn is_identity_managed(&self, identity: &HStringArg) -> Result { + #[inline] pub fn is_identity_managed(&self, identity: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsIdentityManaged)(self as *const _ as *mut _, identity.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn try_apply_process_uipolicy(&self, identity: &HStringArg) -> Result { + }} + #[inline] pub fn try_apply_process_uipolicy(&self, identity: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TryApplyProcessUIPolicy)(self as *const _ as *mut _, identity.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn clear_process_uipolicy(&self) -> Result<()> { + }} + #[inline] pub fn clear_process_uipolicy(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ClearProcessUIPolicy)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn create_current_thread_network_context(&self, identity: &HStringArg) -> Result> { + }} + #[inline] pub fn create_current_thread_network_context(&self, identity: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateCurrentThreadNetworkContext)(self as *const _ as *mut _, 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(&self, endpointHost: &super::super::networking::HostName) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-networking")] #[inline] pub fn get_primary_managed_identity_for_network_endpoint_async(&self, endpointHost: &super::super::networking::HostName) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPrimaryManagedIdentityForNetworkEndpointAsync)(self as *const _ as *mut _, endpointHost as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn revoke_content(&self, identity: &HStringArg) -> Result<()> { + }} + #[inline] pub fn revoke_content(&self, identity: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RevokeContent)(self as *const _ as *mut _, identity.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + }} + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_protected_access_suspending(&self, handler: &super::super::foundation::EventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_protected_access_suspending(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ProtectedAccessSuspending)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_protected_access_suspending(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_protected_access_suspending(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ProtectedAccessSuspending)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_protected_access_resumed(&self, handler: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_protected_access_resumed(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ProtectedAccessResumed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_protected_access_resumed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_protected_access_resumed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ProtectedAccessResumed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_protected_content_revoked(&self, handler: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_protected_content_revoked(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ProtectedContentRevoked)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_protected_content_revoked(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_protected_content_revoked(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ProtectedContentRevoked)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn check_access(&self, sourceIdentity: &HStringArg, targetIdentity: &HStringArg) -> Result { + }} + #[inline] pub fn check_access(&self, sourceIdentity: &HStringArg, targetIdentity: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).CheckAccess)(self as *const _ as *mut _, sourceIdentity.get(), targetIdentity.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn request_access_async(&self, sourceIdentity: &HStringArg, targetIdentity: &HStringArg) -> Result>> { + }} + #[inline] pub fn request_access_async(&self, sourceIdentity: &HStringArg, targetIdentity: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessAsync)(self as *const _ as *mut _, sourceIdentity.get(), targetIdentity.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, identity: HSTRING, since: super::super::foundation::DateTime, out: *mut bool) -> HRESULT, + fn HasContentBeenRevokedSince(&self, identity: HSTRING, since: foundation::DateTime, out: *mut bool) -> HRESULT, fn CheckAccessForApp(&self, sourceIdentity: HSTRING, appPackageFamilyName: HSTRING, out: *mut ProtectionPolicyEvaluationResult) -> HRESULT, - fn RequestAccessForAppAsync(&self, sourceIdentity: HSTRING, appPackageFamilyName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestAccessForAppAsync(&self, sourceIdentity: HSTRING, appPackageFamilyName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetEnforcementLevel(&self, identity: HSTRING, out: *mut EnforcementLevel) -> HRESULT, fn IsUserDecryptionAllowed(&self, identity: HSTRING, out: *mut bool) -> HRESULT, fn IsProtectionUnderLockRequired(&self, identity: HSTRING, out: *mut bool) -> HRESULT, - fn add_PolicyChanged(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PolicyChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PolicyChanged(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PolicyChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_IsProtectionEnabled(&self, out: *mut bool) -> HRESULT }} impl IProtectionPolicyManagerStatics2 { - #[inline] pub unsafe fn has_content_been_revoked_since(&self, identity: &HStringArg, since: super::super::foundation::DateTime) -> Result { + #[inline] pub fn has_content_been_revoked_since(&self, identity: &HStringArg, since: foundation::DateTime) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).HasContentBeenRevokedSince)(self as *const _ as *mut _, identity.get(), since, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn check_access_for_app(&self, sourceIdentity: &HStringArg, appPackageFamilyName: &HStringArg) -> Result { + }} + #[inline] pub fn check_access_for_app(&self, sourceIdentity: &HStringArg, appPackageFamilyName: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).CheckAccessForApp)(self as *const _ as *mut _, sourceIdentity.get(), appPackageFamilyName.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn request_access_for_app_async(&self, sourceIdentity: &HStringArg, appPackageFamilyName: &HStringArg) -> Result>> { + }} + #[inline] pub fn request_access_for_app_async(&self, sourceIdentity: &HStringArg, appPackageFamilyName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessForAppAsync)(self as *const _ as *mut _, sourceIdentity.get(), appPackageFamilyName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_enforcement_level(&self, identity: &HStringArg) -> Result { + }} + #[inline] pub fn get_enforcement_level(&self, identity: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetEnforcementLevel)(self as *const _ as *mut _, identity.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_user_decryption_allowed(&self, identity: &HStringArg) -> Result { + }} + #[inline] pub fn is_user_decryption_allowed(&self, identity: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsUserDecryptionAllowed)(self as *const _ as *mut _, identity.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_protection_under_lock_required(&self, identity: &HStringArg) -> Result { + }} + #[inline] pub fn is_protection_under_lock_required(&self, identity: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsProtectionUnderLockRequired)(self as *const _ as *mut _, identity.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_policy_changed(&self, handler: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_policy_changed(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PolicyChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_policy_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_policy_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PolicyChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_protection_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_protection_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsProtectionEnabled)(self as *const _ as *mut _, &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(&self, sourceIdentity: HSTRING, targetIdentity: HSTRING, auditInfo: *mut ProtectionPolicyAuditInfo, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestAccessWithMessageAsync(&self, sourceIdentity: HSTRING, targetIdentity: HSTRING, auditInfo: *mut ProtectionPolicyAuditInfo, messageFromApp: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestAccessForAppWithAuditingInfoAsync(&self, sourceIdentity: HSTRING, appPackageFamilyName: HSTRING, auditInfo: *mut ProtectionPolicyAuditInfo, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestAccessForAppWithMessageAsync(&self, sourceIdentity: HSTRING, appPackageFamilyName: HSTRING, auditInfo: *mut ProtectionPolicyAuditInfo, messageFromApp: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestAccessWithAuditingInfoAsync(&self, sourceIdentity: HSTRING, targetIdentity: HSTRING, auditInfo: *mut ProtectionPolicyAuditInfo, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestAccessWithMessageAsync(&self, sourceIdentity: HSTRING, targetIdentity: HSTRING, auditInfo: *mut ProtectionPolicyAuditInfo, messageFromApp: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestAccessForAppWithAuditingInfoAsync(&self, sourceIdentity: HSTRING, appPackageFamilyName: HSTRING, auditInfo: *mut ProtectionPolicyAuditInfo, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestAccessForAppWithMessageAsync(&self, sourceIdentity: HSTRING, appPackageFamilyName: HSTRING, auditInfo: *mut ProtectionPolicyAuditInfo, messageFromApp: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn LogAuditEvent(&self, sourceIdentity: HSTRING, targetIdentity: HSTRING, auditInfo: *mut ProtectionPolicyAuditInfo) -> HRESULT }} impl IProtectionPolicyManagerStatics3 { - #[inline] pub unsafe fn request_access_with_auditing_info_async(&self, sourceIdentity: &HStringArg, targetIdentity: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo) -> Result>> { + #[inline] pub fn request_access_with_auditing_info_async(&self, sourceIdentity: &HStringArg, targetIdentity: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessWithAuditingInfoAsync)(self as *const _ as *mut _, 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(&self, sourceIdentity: &HStringArg, targetIdentity: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo, messageFromApp: &HStringArg) -> Result>> { + }} + #[inline] pub fn request_access_with_message_async(&self, sourceIdentity: &HStringArg, targetIdentity: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo, messageFromApp: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessWithMessageAsync)(self as *const _ as *mut _, 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(&self, sourceIdentity: &HStringArg, appPackageFamilyName: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo) -> Result>> { + }} + #[inline] pub fn request_access_for_app_with_auditing_info_async(&self, sourceIdentity: &HStringArg, appPackageFamilyName: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessForAppWithAuditingInfoAsync)(self as *const _ as *mut _, 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(&self, sourceIdentity: &HStringArg, appPackageFamilyName: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo, messageFromApp: &HStringArg) -> Result>> { + }} + #[inline] pub fn request_access_for_app_with_message_async(&self, sourceIdentity: &HStringArg, appPackageFamilyName: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo, messageFromApp: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessForAppWithMessageAsync)(self as *const _ as *mut _, 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(&self, sourceIdentity: &HStringArg, targetIdentity: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo) -> Result<()> { + }} + #[inline] pub fn log_audit_event(&self, sourceIdentity: &HStringArg, targetIdentity: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).LogAuditEvent)(self as *const _ as *mut _, sourceIdentity.get(), targetIdentity.get(), auditInfo as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IProtectionPolicyManagerStatics4, 548902107, 52413, 18703, 140, 131, 73, 204, 183, 122, 234, 108); RT_INTERFACE!{static interface IProtectionPolicyManagerStatics4(IProtectionPolicyManagerStatics4Vtbl): IInspectable(IInspectableVtbl) [IID_IProtectionPolicyManagerStatics4] { fn IsRoamableProtectionEnabled(&self, identity: HSTRING, out: *mut bool) -> HRESULT, - fn RequestAccessWithBehaviorAsync(&self, sourceIdentity: HSTRING, targetIdentity: HSTRING, auditInfo: *mut ProtectionPolicyAuditInfo, messageFromApp: HSTRING, behavior: ProtectionPolicyRequestAccessBehavior, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestAccessForAppWithBehaviorAsync(&self, sourceIdentity: HSTRING, appPackageFamilyName: HSTRING, auditInfo: *mut ProtectionPolicyAuditInfo, messageFromApp: HSTRING, behavior: ProtectionPolicyRequestAccessBehavior, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestAccessWithBehaviorAsync(&self, sourceIdentity: HSTRING, targetIdentity: HSTRING, auditInfo: *mut ProtectionPolicyAuditInfo, messageFromApp: HSTRING, behavior: ProtectionPolicyRequestAccessBehavior, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestAccessForAppWithBehaviorAsync(&self, sourceIdentity: HSTRING, appPackageFamilyName: HSTRING, auditInfo: *mut ProtectionPolicyAuditInfo, messageFromApp: HSTRING, behavior: ProtectionPolicyRequestAccessBehavior, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy3(&self) -> (), - #[cfg(feature="windows-storage")] fn RequestAccessToFilesForAppAsync(&self, sourceItemList: *mut super::super::foundation::collections::IIterable, appPackageFamilyName: HSTRING, auditInfo: *mut ProtectionPolicyAuditInfo, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn RequestAccessToFilesForAppAsync(&self, sourceItemList: *mut foundation::collections::IIterable, appPackageFamilyName: HSTRING, auditInfo: *mut ProtectionPolicyAuditInfo, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy4(&self) -> (), - #[cfg(feature="windows-storage")] fn RequestAccessToFilesForAppWithMessageAndBehaviorAsync(&self, sourceItemList: *mut super::super::foundation::collections::IIterable, appPackageFamilyName: HSTRING, auditInfo: *mut ProtectionPolicyAuditInfo, messageFromApp: HSTRING, behavior: ProtectionPolicyRequestAccessBehavior, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn RequestAccessToFilesForAppWithMessageAndBehaviorAsync(&self, sourceItemList: *mut foundation::collections::IIterable, appPackageFamilyName: HSTRING, auditInfo: *mut ProtectionPolicyAuditInfo, messageFromApp: HSTRING, behavior: ProtectionPolicyRequestAccessBehavior, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy5(&self) -> (), - #[cfg(feature="windows-storage")] fn RequestAccessToFilesForProcessAsync(&self, sourceItemList: *mut super::super::foundation::collections::IIterable, processId: u32, auditInfo: *mut ProtectionPolicyAuditInfo, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn RequestAccessToFilesForProcessAsync(&self, sourceItemList: *mut foundation::collections::IIterable, processId: u32, auditInfo: *mut ProtectionPolicyAuditInfo, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy6(&self) -> (), - #[cfg(feature="windows-storage")] fn RequestAccessToFilesForProcessWithMessageAndBehaviorAsync(&self, sourceItemList: *mut super::super::foundation::collections::IIterable, processId: u32, auditInfo: *mut ProtectionPolicyAuditInfo, messageFromApp: HSTRING, behavior: ProtectionPolicyRequestAccessBehavior, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn RequestAccessToFilesForProcessWithMessageAndBehaviorAsync(&self, sourceItemList: *mut foundation::collections::IIterable, processId: u32, auditInfo: *mut ProtectionPolicyAuditInfo, messageFromApp: HSTRING, behavior: ProtectionPolicyRequestAccessBehavior, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy7(&self) -> (), - #[cfg(feature="windows-storage")] fn IsFileProtectionRequiredAsync(&self, target: *mut super::super::storage::IStorageItem, identity: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn IsFileProtectionRequiredAsync(&self, target: *mut super::super::storage::IStorageItem, identity: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy8(&self) -> (), - #[cfg(feature="windows-storage")] fn IsFileProtectionRequiredForNewFileAsync(&self, parentFolder: *mut super::super::storage::IStorageFolder, identity: HSTRING, desiredName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn IsFileProtectionRequiredForNewFileAsync(&self, parentFolder: *mut super::super::storage::IStorageFolder, identity: HSTRING, desiredName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn get_PrimaryManagedIdentity(&self, out: *mut HSTRING) -> HRESULT, fn GetPrimaryManagedIdentityForIdentity(&self, identity: HSTRING, out: *mut HSTRING) -> HRESULT }} impl IProtectionPolicyManagerStatics4 { - #[inline] pub unsafe fn is_roamable_protection_enabled(&self, identity: &HStringArg) -> Result { + #[inline] pub fn is_roamable_protection_enabled(&self, identity: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsRoamableProtectionEnabled)(self as *const _ as *mut _, identity.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn request_access_with_behavior_async(&self, sourceIdentity: &HStringArg, targetIdentity: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo, messageFromApp: &HStringArg, behavior: ProtectionPolicyRequestAccessBehavior) -> Result>> { + }} + #[inline] pub fn request_access_with_behavior_async(&self, sourceIdentity: &HStringArg, targetIdentity: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo, messageFromApp: &HStringArg, behavior: ProtectionPolicyRequestAccessBehavior) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessWithBehaviorAsync)(self as *const _ as *mut _, sourceIdentity.get(), targetIdentity.get(), auditInfo as *const _ as *mut _, messageFromApp.get(), behavior, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_access_for_app_with_behavior_async(&self, sourceIdentity: &HStringArg, appPackageFamilyName: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo, messageFromApp: &HStringArg, behavior: ProtectionPolicyRequestAccessBehavior) -> Result>> { + }} + #[inline] pub fn request_access_for_app_with_behavior_async(&self, sourceIdentity: &HStringArg, appPackageFamilyName: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo, messageFromApp: &HStringArg, behavior: ProtectionPolicyRequestAccessBehavior) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessForAppWithBehaviorAsync)(self as *const _ as *mut _, sourceIdentity.get(), appPackageFamilyName.get(), auditInfo as *const _ as *mut _, messageFromApp.get(), behavior, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn request_access_to_files_for_app_async(&self, sourceItemList: &super::super::foundation::collections::IIterable, appPackageFamilyName: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn request_access_to_files_for_app_async(&self, sourceItemList: &foundation::collections::IIterable, appPackageFamilyName: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessToFilesForAppAsync)(self as *const _ as *mut _, sourceItemList as *const _ as *mut _, appPackageFamilyName.get(), auditInfo 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_access_to_files_for_app_with_message_and_behavior_async(&self, sourceItemList: &super::super::foundation::collections::IIterable, appPackageFamilyName: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo, messageFromApp: &HStringArg, behavior: ProtectionPolicyRequestAccessBehavior) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn request_access_to_files_for_app_with_message_and_behavior_async(&self, sourceItemList: &foundation::collections::IIterable, appPackageFamilyName: &HStringArg, auditInfo: &ProtectionPolicyAuditInfo, messageFromApp: &HStringArg, behavior: ProtectionPolicyRequestAccessBehavior) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessToFilesForAppWithMessageAndBehaviorAsync)(self as *const _ as *mut _, sourceItemList as *const _ as *mut _, appPackageFamilyName.get(), auditInfo as *const _ as *mut _, messageFromApp.get(), behavior, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn request_access_to_files_for_process_async(&self, sourceItemList: &super::super::foundation::collections::IIterable, processId: u32, auditInfo: &ProtectionPolicyAuditInfo) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn request_access_to_files_for_process_async(&self, sourceItemList: &foundation::collections::IIterable, processId: u32, auditInfo: &ProtectionPolicyAuditInfo) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessToFilesForProcessAsync)(self as *const _ as *mut _, sourceItemList as *const _ as *mut _, processId, auditInfo 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_access_to_files_for_process_with_message_and_behavior_async(&self, sourceItemList: &super::super::foundation::collections::IIterable, processId: u32, auditInfo: &ProtectionPolicyAuditInfo, messageFromApp: &HStringArg, behavior: ProtectionPolicyRequestAccessBehavior) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn request_access_to_files_for_process_with_message_and_behavior_async(&self, sourceItemList: &foundation::collections::IIterable, processId: u32, auditInfo: &ProtectionPolicyAuditInfo, messageFromApp: &HStringArg, behavior: ProtectionPolicyRequestAccessBehavior) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessToFilesForProcessWithMessageAndBehaviorAsync)(self as *const _ as *mut _, sourceItemList as *const _ as *mut _, processId, auditInfo as *const _ as *mut _, messageFromApp.get(), behavior, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn is_file_protection_required_async(&self, target: &super::super::storage::IStorageItem, identity: &HStringArg) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn is_file_protection_required_async(&self, target: &super::super::storage::IStorageItem, identity: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).IsFileProtectionRequiredAsync)(self as *const _ as *mut _, 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 is_file_protection_required_for_new_file_async(&self, parentFolder: &super::super::storage::IStorageFolder, identity: &HStringArg, desiredName: &HStringArg) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn is_file_protection_required_for_new_file_async(&self, parentFolder: &super::super::storage::IStorageFolder, identity: &HStringArg, desiredName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).IsFileProtectionRequiredForNewFileAsync)(self as *const _ as *mut _, parentFolder as *const _ as *mut _, identity.get(), desiredName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_primary_managed_identity(&self) -> Result { + }} + #[inline] pub fn get_primary_managed_identity(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PrimaryManagedIdentity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_primary_managed_identity_for_identity(&self, identity: &HStringArg) -> Result { + }} + #[inline] pub fn get_primary_managed_identity_for_identity(&self, identity: &HStringArg) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPrimaryManagedIdentityForIdentity)(self as *const _ as *mut _, identity.get(), &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum ProtectionPolicyRequestAccessBehavior: i32 { Decrypt (ProtectionPolicyRequestAccessBehavior_Decrypt) = 0, TreatOverridePolicyAsBlock (ProtectionPolicyRequestAccessBehavior_TreatOverridePolicyAsBlock) = 1, @@ -7266,36 +7266,36 @@ RT_INTERFACE!{interface IEasClientDeviceInformation(IEasClientDeviceInformationV fn get_SystemSku(&self, out: *mut HSTRING) -> HRESULT }} impl IEasClientDeviceInformation { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_operating_system(&self) -> Result { + }} + #[inline] pub fn get_operating_system(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OperatingSystem)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_friendly_name(&self) -> Result { + }} + #[inline] pub fn get_friendly_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FriendlyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_system_manufacturer(&self) -> Result { + }} + #[inline] pub fn get_system_manufacturer(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SystemManufacturer)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_system_product_name(&self) -> Result { + }} + #[inline] pub fn get_system_product_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SystemProductName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_system_sku(&self) -> Result { + }} + #[inline] pub fn get_system_sku(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SystemSku)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class EasClientDeviceInformation: IEasClientDeviceInformation} impl RtActivatable for EasClientDeviceInformation {} @@ -7306,16 +7306,16 @@ RT_INTERFACE!{interface IEasClientDeviceInformation2(IEasClientDeviceInformation fn get_SystemFirmwareVersion(&self, out: *mut HSTRING) -> HRESULT }} impl IEasClientDeviceInformation2 { - #[inline] pub unsafe fn get_system_hardware_version(&self) -> Result { + #[inline] pub fn get_system_hardware_version(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SystemHardwareVersion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_system_firmware_version(&self) -> Result { + }} + #[inline] pub fn get_system_firmware_version(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SystemFirmwareVersion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IEasClientSecurityPolicy, 1169630050, 57274, 19099, 172, 237, 111, 226, 173, 203, 100, 32); RT_INTERFACE!{interface IEasClientSecurityPolicy(IEasClientSecurityPolicyVtbl): IInspectable(IInspectableVtbl) [IID_IEasClientSecurityPolicy] { @@ -7327,100 +7327,100 @@ RT_INTERFACE!{interface IEasClientSecurityPolicy(IEasClientSecurityPolicyVtbl): fn put_DisallowConvenienceLogon(&self, value: bool) -> HRESULT, fn get_MinPasswordComplexCharacters(&self, out: *mut u8) -> HRESULT, fn put_MinPasswordComplexCharacters(&self, value: u8) -> HRESULT, - fn get_PasswordExpiration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_PasswordExpiration(&self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_PasswordExpiration(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_PasswordExpiration(&self, value: foundation::TimeSpan) -> HRESULT, fn get_PasswordHistory(&self, out: *mut u32) -> HRESULT, fn put_PasswordHistory(&self, value: u32) -> HRESULT, fn get_MaxPasswordFailedAttempts(&self, out: *mut u8) -> HRESULT, fn put_MaxPasswordFailedAttempts(&self, value: u8) -> HRESULT, - fn get_MaxInactivityTimeLock(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_MaxInactivityTimeLock(&self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_MaxInactivityTimeLock(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_MaxInactivityTimeLock(&self, value: foundation::TimeSpan) -> HRESULT, fn CheckCompliance(&self, out: *mut *mut EasComplianceResults) -> HRESULT, - fn ApplyAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn ApplyAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IEasClientSecurityPolicy { - #[inline] pub unsafe fn get_require_encryption(&self) -> Result { + #[inline] pub fn get_require_encryption(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RequireEncryption)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_require_encryption(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_require_encryption(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RequireEncryption)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_password_length(&self) -> Result { + }} + #[inline] pub fn get_min_password_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinPasswordLength)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_min_password_length(&self, value: u8) -> Result<()> { + }} + #[inline] pub fn set_min_password_length(&self, value: u8) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MinPasswordLength)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_disallow_convenience_logon(&self) -> Result { + }} + #[inline] pub fn get_disallow_convenience_logon(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DisallowConvenienceLogon)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_disallow_convenience_logon(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_disallow_convenience_logon(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisallowConvenienceLogon)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_password_complex_characters(&self) -> Result { + }} + #[inline] pub fn get_min_password_complex_characters(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinPasswordComplexCharacters)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_min_password_complex_characters(&self, value: u8) -> Result<()> { + }} + #[inline] pub fn set_min_password_complex_characters(&self, value: u8) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MinPasswordComplexCharacters)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_password_expiration(&self) -> Result { + }} + #[inline] pub fn get_password_expiration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PasswordExpiration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_password_expiration(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_password_expiration(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PasswordExpiration)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_password_history(&self) -> Result { + }} + #[inline] pub fn get_password_history(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PasswordHistory)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_password_history(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_password_history(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PasswordHistory)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_password_failed_attempts(&self) -> Result { + }} + #[inline] pub fn get_max_password_failed_attempts(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxPasswordFailedAttempts)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_password_failed_attempts(&self, value: u8) -> Result<()> { + }} + #[inline] pub fn set_max_password_failed_attempts(&self, value: u8) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxPasswordFailedAttempts)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_inactivity_time_lock(&self) -> Result { + }} + #[inline] pub fn get_max_inactivity_time_lock(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxInactivityTimeLock)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_inactivity_time_lock(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_max_inactivity_time_lock(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxInactivityTimeLock)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn check_compliance(&self) -> Result> { + }} + #[inline] pub fn check_compliance(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CheckCompliance)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn apply_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn apply_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ApplyAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class EasClientSecurityPolicy: IEasClientSecurityPolicy} impl RtActivatable for EasClientSecurityPolicy {} @@ -7438,51 +7438,51 @@ RT_INTERFACE!{interface IEasComplianceResults(IEasComplianceResultsVtbl): IInspe fn get_MaxInactivityTimeLockResult(&self, out: *mut EasMaxInactivityTimeLockResult) -> HRESULT }} impl IEasComplianceResults { - #[inline] pub unsafe fn get_compliant(&self) -> Result { + #[inline] pub fn get_compliant(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Compliant)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_require_encryption_result(&self) -> Result { + }} + #[inline] pub fn get_require_encryption_result(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RequireEncryptionResult)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_password_length_result(&self) -> Result { + }} + #[inline] pub fn get_min_password_length_result(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinPasswordLengthResult)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_disallow_convenience_logon_result(&self) -> Result { + }} + #[inline] pub fn get_disallow_convenience_logon_result(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DisallowConvenienceLogonResult)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_password_complex_characters_result(&self) -> Result { + }} + #[inline] pub fn get_min_password_complex_characters_result(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinPasswordComplexCharactersResult)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_password_expiration_result(&self) -> Result { + }} + #[inline] pub fn get_password_expiration_result(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PasswordExpirationResult)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_password_history_result(&self) -> Result { + }} + #[inline] pub fn get_password_history_result(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PasswordHistoryResult)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_password_failed_attempts_result(&self) -> Result { + }} + #[inline] pub fn get_max_password_failed_attempts_result(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxPasswordFailedAttemptsResult)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_inactivity_time_lock_result(&self) -> Result { + }} + #[inline] pub fn get_max_inactivity_time_lock_result(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxInactivityTimeLockResult)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class EasComplianceResults: IEasComplianceResults} DEFINE_IID!(IID_IEasComplianceResults2, 801005769, 6824, 18421, 136, 187, 203, 62, 240, 191, 251, 21); @@ -7490,11 +7490,11 @@ RT_INTERFACE!{interface IEasComplianceResults2(IEasComplianceResults2Vtbl): IIns fn get_EncryptionProviderType(&self, out: *mut EasEncryptionProviderType) -> HRESULT }} impl IEasComplianceResults2 { - #[inline] pub unsafe fn get_encryption_provider_type(&self) -> Result { + #[inline] pub fn get_encryption_provider_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EncryptionProviderType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum EasDisallowConvenienceLogonResult: i32 { NotEvaluated (EasDisallowConvenienceLogonResult_NotEvaluated) = 0, Compliant (EasDisallowConvenienceLogonResult_Compliant) = 1, CanBeCompliant (EasDisallowConvenienceLogonResult_CanBeCompliant) = 2, RequestedPolicyIsStricter (EasDisallowConvenienceLogonResult_RequestedPolicyIsStricter) = 3, diff --git a/src/rt/gen/windows/services.rs b/src/rt/gen/windows/services.rs index bd1a03e..f28bde7 100644 --- a/src/rt/gen/windows/services.rs +++ b/src/rt/gen/windows/services.rs @@ -9,38 +9,38 @@ RT_ENUM! { enum CortanaPermissionsChangeResult: i32 { DEFINE_IID!(IID_ICortanaPermissionsManager, 420688096, 34453, 17290, 149, 69, 61, 164, 232, 34, 221, 180); RT_INTERFACE!{interface ICortanaPermissionsManager(ICortanaPermissionsManagerVtbl): IInspectable(IInspectableVtbl) [IID_ICortanaPermissionsManager] { fn IsSupported(&self, out: *mut bool) -> HRESULT, - fn ArePermissionsGrantedAsync(&self, permissions: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GrantPermissionsAsync(&self, permissions: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RevokePermissionsAsync(&self, permissions: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn ArePermissionsGrantedAsync(&self, permissions: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GrantPermissionsAsync(&self, permissions: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RevokePermissionsAsync(&self, permissions: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ICortanaPermissionsManager { - #[inline] pub unsafe fn is_supported(&self) -> Result { + #[inline] pub fn is_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn are_permissions_granted_async(&self, permissions: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn are_permissions_granted_async(&self, permissions: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ArePermissionsGrantedAsync)(self as *const _ as *mut _, permissions as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn grant_permissions_async(&self, permissions: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn grant_permissions_async(&self, permissions: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GrantPermissionsAsync)(self as *const _ as *mut _, permissions as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn revoke_permissions_async(&self, permissions: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn revoke_permissions_async(&self, permissions: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RevokePermissionsAsync)(self as *const _ as *mut _, permissions as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class CortanaPermissionsManager: ICortanaPermissionsManager} impl RtActivatable for CortanaPermissionsManager {} impl CortanaPermissionsManager { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} + } } DEFINE_CLSID!(CortanaPermissionsManager(&[87,105,110,100,111,119,115,46,83,101,114,118,105,99,101,115,46,67,111,114,116,97,110,97,46,67,111,114,116,97,110,97,80,101,114,109,105,115,115,105,111,110,115,77,97,110,97,103,101,114,0]) [CLSID_CortanaPermissionsManager]); DEFINE_IID!(IID_ICortanaPermissionsManagerStatics, 1991370362, 45125, 17428, 157, 109, 42, 211, 165, 254, 58, 126); @@ -48,11 +48,11 @@ RT_INTERFACE!{static interface ICortanaPermissionsManagerStatics(ICortanaPermiss fn GetDefault(&self, out: *mut *mut CortanaPermissionsManager) -> HRESULT }} impl ICortanaPermissionsManagerStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_ICortanaSettings, 1423274407, 32866, 16628, 171, 231, 222, 223, 214, 151, 176, 25); RT_INTERFACE!{interface ICortanaSettings(ICortanaSettingsVtbl): IInspectable(IInspectableVtbl) [IID_ICortanaSettings] { @@ -61,30 +61,30 @@ RT_INTERFACE!{interface ICortanaSettings(ICortanaSettingsVtbl): IInspectable(IIn fn put_IsVoiceActivationEnabled(&self, value: bool) -> HRESULT }} impl ICortanaSettings { - #[inline] pub unsafe fn get_has_user_consent_to_voice_activation(&self) -> Result { + #[inline] pub fn get_has_user_consent_to_voice_activation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasUserConsentToVoiceActivation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_voice_activation_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_voice_activation_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsVoiceActivationEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_voice_activation_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_voice_activation_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsVoiceActivationEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CortanaSettings: ICortanaSettings} impl RtActivatable for CortanaSettings {} impl CortanaSettings { - #[inline] pub fn is_supported() -> Result { unsafe { + #[inline] pub fn is_supported() -> Result { >::get_activation_factory().is_supported() - }} - #[inline] pub fn get_default() -> Result> { unsafe { + } + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} + } } DEFINE_CLSID!(CortanaSettings(&[87,105,110,100,111,119,115,46,83,101,114,118,105,99,101,115,46,67,111,114,116,97,110,97,46,67,111,114,116,97,110,97,83,101,116,116,105,110,103,115,0]) [CLSID_CortanaSettings]); DEFINE_IID!(IID_ICortanaSettingsStatics, 2334969214, 11968, 17517, 146, 133, 51, 240, 124, 232, 172, 4); @@ -93,16 +93,16 @@ RT_INTERFACE!{static interface ICortanaSettingsStatics(ICortanaSettingsStaticsVt fn GetDefault(&self, out: *mut *mut CortanaSettings) -> HRESULT }} impl ICortanaSettingsStatics { - #[inline] pub unsafe fn is_supported(&self) -> Result { + #[inline] pub fn is_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_default(&self) -> Result> { + }} + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } } // Windows.Services.Cortana pub mod maps { // Windows.Services.Maps @@ -114,23 +114,23 @@ RT_INTERFACE!{interface IEnhancedWaypoint(IEnhancedWaypointVtbl): IInspectable(I fn get_Kind(&self, out: *mut WaypointKind) -> HRESULT }} impl IEnhancedWaypoint { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_point(&self) -> Result> { + #[cfg(feature="windows-devices")] #[inline] pub fn get_point(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Point)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_kind(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class EnhancedWaypoint: IEnhancedWaypoint} impl RtActivatable for EnhancedWaypoint {} impl EnhancedWaypoint { - #[cfg(feature="windows-devices")] #[inline] pub fn create(point: &super::super::devices::geolocation::Geopoint, kind: WaypointKind) -> Result> { unsafe { + #[cfg(feature="windows-devices")] #[inline] pub fn create(point: &super::super::devices::geolocation::Geopoint, kind: WaypointKind) -> Result> { >::get_activation_factory().create(point, kind) - }} + } } DEFINE_CLSID!(EnhancedWaypoint(&[87,105,110,100,111,119,115,46,83,101,114,118,105,99,101,115,46,77,97,112,115,46,69,110,104,97,110,99,101,100,87,97,121,112,111,105,110,116,0]) [CLSID_EnhancedWaypoint]); DEFINE_IID!(IID_IEnhancedWaypointFactory, 2944828535, 41642, 18141, 182, 69, 35, 179, 27, 138, 166, 199); @@ -138,11 +138,11 @@ RT_INTERFACE!{static interface IEnhancedWaypointFactory(IEnhancedWaypointFactory #[cfg(feature="windows-devices")] fn Create(&self, point: *mut super::super::devices::geolocation::Geopoint, kind: WaypointKind, out: *mut *mut EnhancedWaypoint) -> HRESULT }} impl IEnhancedWaypointFactory { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn create(&self, point: &super::super::devices::geolocation::Geopoint, kind: WaypointKind) -> Result> { + #[cfg(feature="windows-devices")] #[inline] pub fn create(&self, point: &super::super::devices::geolocation::Geopoint, kind: WaypointKind) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, point as *const _ as *mut _, kind, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IManeuverWarning, 3248713098, 9776, 17272, 158, 74, 110, 68, 37, 61, 206, 186); RT_INTERFACE!{interface IManeuverWarning(IManeuverWarningVtbl): IInspectable(IInspectableVtbl) [IID_IManeuverWarning] { @@ -150,16 +150,16 @@ RT_INTERFACE!{interface IManeuverWarning(IManeuverWarningVtbl): IInspectable(IIn fn get_Severity(&self, out: *mut ManeuverWarningSeverity) -> HRESULT }} impl IManeuverWarning { - #[inline] pub unsafe fn get_kind(&self) -> Result { + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_severity(&self) -> Result { + }} + #[inline] pub fn get_severity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Severity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ManeuverWarning: IManeuverWarning} RT_ENUM! { enum ManeuverWarningKind: i32 { @@ -187,81 +187,81 @@ RT_INTERFACE!{interface IMapAddress(IMapAddressVtbl): IInspectable(IInspectableV fn get_Continent(&self, out: *mut HSTRING) -> HRESULT }} impl IMapAddress { - #[inline] pub unsafe fn get_building_name(&self) -> Result { + #[inline] pub fn get_building_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BuildingName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_building_floor(&self) -> Result { + }} + #[inline] pub fn get_building_floor(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BuildingFloor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_building_room(&self) -> Result { + }} + #[inline] pub fn get_building_room(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BuildingRoom)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_building_wing(&self) -> Result { + }} + #[inline] pub fn get_building_wing(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BuildingWing)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_street_number(&self) -> Result { + }} + #[inline] pub fn get_street_number(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StreetNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_street(&self) -> Result { + }} + #[inline] pub fn get_street(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Street)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_neighborhood(&self) -> Result { + }} + #[inline] pub fn get_neighborhood(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Neighborhood)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_district(&self) -> Result { + }} + #[inline] pub fn get_district(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_District)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_town(&self) -> Result { + }} + #[inline] pub fn get_town(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Town)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_region(&self) -> Result { + }} + #[inline] pub fn get_region(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Region)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_region_code(&self) -> Result { + }} + #[inline] pub fn get_region_code(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RegionCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_country(&self) -> Result { + }} + #[inline] pub fn get_country(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Country)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_country_code(&self) -> Result { + }} + #[inline] pub fn get_country_code(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CountryCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_post_code(&self) -> Result { + }} + #[inline] pub fn get_post_code(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PostCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_continent(&self) -> Result { + }} + #[inline] pub fn get_continent(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Continent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class MapAddress: IMapAddress} DEFINE_IID!(IID_IMapAddress2, 1976397297, 58797, 17833, 191, 64, 108, 242, 86, 193, 221, 19); @@ -269,11 +269,11 @@ RT_INTERFACE!{interface IMapAddress2(IMapAddress2Vtbl): IInspectable(IInspectabl fn get_FormattedAddress(&self, out: *mut HSTRING) -> HRESULT }} impl IMapAddress2 { - #[inline] pub unsafe fn get_formatted_address(&self) -> Result { + #[inline] pub fn get_formatted_address(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FormattedAddress)(self as *const _ as *mut _, &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] { @@ -284,26 +284,26 @@ RT_INTERFACE!{interface IMapLocation(IMapLocationVtbl): IInspectable(IInspectabl fn get_Address(&self, out: *mut *mut MapAddress) -> HRESULT }} impl IMapLocation { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_point(&self) -> Result> { + #[cfg(feature="windows-devices")] #[inline] pub fn get_point(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Point)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_description(&self) -> Result { + }} + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_address(&self) -> Result> { + }} + #[inline] pub fn get_address(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Address)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MapLocation: IMapLocation} RT_ENUM! { enum MapLocationDesiredAccuracy: i32 { @@ -313,71 +313,71 @@ RT_CLASS!{static class MapLocationFinder} impl RtActivatable for MapLocationFinder {} impl RtActivatable for MapLocationFinder {} impl MapLocationFinder { - #[cfg(feature="windows-devices")] #[inline] pub fn find_locations_at_async(queryPoint: &super::super::devices::geolocation::Geopoint) -> Result>> { unsafe { + #[cfg(feature="windows-devices")] #[inline] pub fn find_locations_at_async(queryPoint: &super::super::devices::geolocation::Geopoint) -> Result>> { >::get_activation_factory().find_locations_at_async(queryPoint) - }} - #[cfg(feature="windows-devices")] #[inline] pub fn find_locations_async(searchText: &HStringArg, referencePoint: &super::super::devices::geolocation::Geopoint) -> Result>> { unsafe { + } + #[cfg(feature="windows-devices")] #[inline] pub fn find_locations_async(searchText: &HStringArg, referencePoint: &super::super::devices::geolocation::Geopoint) -> Result>> { >::get_activation_factory().find_locations_async(searchText, referencePoint) - }} - #[cfg(feature="windows-devices")] #[inline] pub fn find_locations_with_max_count_async(searchText: &HStringArg, referencePoint: &super::super::devices::geolocation::Geopoint, maxCount: u32) -> Result>> { unsafe { + } + #[cfg(feature="windows-devices")] #[inline] pub fn find_locations_with_max_count_async(searchText: &HStringArg, referencePoint: &super::super::devices::geolocation::Geopoint, maxCount: u32) -> Result>> { >::get_activation_factory().find_locations_with_max_count_async(searchText, referencePoint, maxCount) - }} - #[cfg(feature="windows-devices")] #[inline] pub fn find_locations_at_with_accuracy_async(queryPoint: &super::super::devices::geolocation::Geopoint, accuracy: MapLocationDesiredAccuracy) -> Result>> { unsafe { + } + #[cfg(feature="windows-devices")] #[inline] pub fn find_locations_at_with_accuracy_async(queryPoint: &super::super::devices::geolocation::Geopoint, accuracy: MapLocationDesiredAccuracy) -> Result>> { >::get_activation_factory().find_locations_at_with_accuracy_async(queryPoint, accuracy) - }} + } } DEFINE_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]) [CLSID_MapLocationFinder]); 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Locations(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_Status(&self, out: *mut MapLocationFinderStatus) -> HRESULT }} impl IMapLocationFinderResult { - #[inline] pub unsafe fn get_locations(&self) -> Result>> { + #[inline] pub fn get_locations(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Locations)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MapLocationFinderResult: IMapLocationFinderResult} 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(&self, queryPoint: *mut super::super::devices::geolocation::Geopoint, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-devices")] fn FindLocationsAsync(&self, searchText: HSTRING, referencePoint: *mut super::super::devices::geolocation::Geopoint, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-devices")] fn FindLocationsWithMaxCountAsync(&self, searchText: HSTRING, referencePoint: *mut super::super::devices::geolocation::Geopoint, maxCount: u32, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-devices")] fn FindLocationsAtAsync(&self, queryPoint: *mut super::super::devices::geolocation::Geopoint, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-devices")] fn FindLocationsAsync(&self, searchText: HSTRING, referencePoint: *mut super::super::devices::geolocation::Geopoint, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-devices")] fn FindLocationsWithMaxCountAsync(&self, searchText: HSTRING, referencePoint: *mut super::super::devices::geolocation::Geopoint, maxCount: u32, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IMapLocationFinderStatics { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn find_locations_at_async(&self, queryPoint: &super::super::devices::geolocation::Geopoint) -> Result>> { + #[cfg(feature="windows-devices")] #[inline] pub fn find_locations_at_async(&self, queryPoint: &super::super::devices::geolocation::Geopoint) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindLocationsAtAsync)(self as *const _ as *mut _, 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(&self, searchText: &HStringArg, referencePoint: &super::super::devices::geolocation::Geopoint) -> Result>> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn find_locations_async(&self, searchText: &HStringArg, referencePoint: &super::super::devices::geolocation::Geopoint) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindLocationsAsync)(self as *const _ as *mut _, 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(&self, searchText: &HStringArg, referencePoint: &super::super::devices::geolocation::Geopoint, maxCount: u32) -> Result>> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn find_locations_with_max_count_async(&self, searchText: &HStringArg, referencePoint: &super::super::devices::geolocation::Geopoint, maxCount: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindLocationsWithMaxCountAsync)(self as *const _ as *mut _, searchText.get(), referencePoint as *const _ as *mut _, maxCount, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, queryPoint: *mut super::super::devices::geolocation::Geopoint, accuracy: MapLocationDesiredAccuracy, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-devices")] fn FindLocationsAtWithAccuracyAsync(&self, queryPoint: *mut super::super::devices::geolocation::Geopoint, accuracy: MapLocationDesiredAccuracy, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IMapLocationFinderStatics2 { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn find_locations_at_with_accuracy_async(&self, queryPoint: &super::super::devices::geolocation::Geopoint, accuracy: MapLocationDesiredAccuracy) -> Result>> { + #[cfg(feature="windows-devices")] #[inline] pub fn find_locations_at_with_accuracy_async(&self, queryPoint: &super::super::devices::geolocation::Geopoint, accuracy: MapLocationDesiredAccuracy) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindLocationsAtWithAccuracyAsync)(self as *const _ as *mut _, queryPoint as *const _ as *mut _, accuracy, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -385,12 +385,12 @@ RT_ENUM! { enum MapLocationFinderStatus: i32 { RT_CLASS!{static class MapManager} impl RtActivatable for MapManager {} impl MapManager { - #[inline] pub fn show_downloaded_maps_ui() -> Result<()> { unsafe { + #[inline] pub fn show_downloaded_maps_ui() -> Result<()> { >::get_activation_factory().show_downloaded_maps_ui() - }} - #[inline] pub fn show_maps_update_ui() -> Result<()> { unsafe { + } + #[inline] pub fn show_maps_update_ui() -> Result<()> { >::get_activation_factory().show_maps_update_ui() - }} + } } DEFINE_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]) [CLSID_MapManager]); DEFINE_IID!(IID_IMapManagerStatics, 937682197, 33460, 19796, 143, 217, 175, 38, 36, 179, 1, 28); @@ -399,14 +399,14 @@ RT_INTERFACE!{static interface IMapManagerStatics(IMapManagerStaticsVtbl): IInsp fn ShowMapsUpdateUI(&self) -> HRESULT }} impl IMapManagerStatics { - #[inline] pub unsafe fn show_downloaded_maps_ui(&self) -> Result<()> { + #[inline] pub fn show_downloaded_maps_ui(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ShowDownloadedMapsUI)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn show_maps_update_ui(&self) -> Result<()> { + }} + #[inline] pub fn show_maps_update_ui(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ShowMapsUpdateUI)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum MapManeuverNotices: u32 { None (MapManeuverNotices_None) = 0, Toll (MapManeuverNotices_Toll) = 1, Unpaved (MapManeuverNotices_Unpaved) = 2, @@ -416,43 +416,43 @@ RT_INTERFACE!{interface IMapRoute(IMapRouteVtbl): IInspectable(IInspectableVtbl) #[cfg(not(feature="windows-devices"))] fn __Dummy0(&self) -> (), #[cfg(feature="windows-devices")] fn get_BoundingBox(&self, out: *mut *mut super::super::devices::geolocation::GeoboundingBox) -> HRESULT, fn get_LengthInMeters(&self, out: *mut f64) -> HRESULT, - fn get_EstimatedDuration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_EstimatedDuration(&self, out: *mut foundation::TimeSpan) -> HRESULT, #[cfg(not(feature="windows-devices"))] fn __Dummy3(&self) -> (), #[cfg(feature="windows-devices")] fn get_Path(&self, out: *mut *mut super::super::devices::geolocation::Geopath) -> HRESULT, - fn get_Legs(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Legs(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_IsTrafficBased(&self, out: *mut bool) -> HRESULT }} impl IMapRoute { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_bounding_box(&self) -> Result> { + #[cfg(feature="windows-devices")] #[inline] pub fn get_bounding_box(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BoundingBox)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_length_in_meters(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_length_in_meters(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LengthInMeters)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_estimated_duration(&self) -> Result { + }} + #[inline] pub fn get_estimated_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EstimatedDuration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_path(&self) -> Result> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_path(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Path)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_legs(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_legs(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Legs)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_traffic_based(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_traffic_based(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsTrafficBased)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MapRoute: IMapRoute} DEFINE_IID!(IID_IMapRoute2, 3519403020, 8723, 19120, 162, 96, 70, 179, 129, 105, 190, 172); @@ -461,93 +461,93 @@ RT_INTERFACE!{interface IMapRoute2(IMapRoute2Vtbl): IInspectable(IInspectableVtb fn get_HasBlockedRoads(&self, out: *mut bool) -> HRESULT }} impl IMapRoute2 { - #[inline] pub unsafe fn get_violated_restrictions(&self) -> Result { + #[inline] pub fn get_violated_restrictions(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ViolatedRestrictions)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_blocked_roads(&self) -> Result { + }} + #[inline] pub fn get_has_blocked_roads(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasBlockedRoads)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMapRoute3, 2240618158, 62125, 17055, 187, 55, 205, 33, 9, 79, 252, 146); RT_INTERFACE!{interface IMapRoute3(IMapRoute3Vtbl): IInspectable(IInspectableVtbl) [IID_IMapRoute3] { - fn get_DurationWithoutTraffic(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_DurationWithoutTraffic(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn get_TrafficCongestion(&self, out: *mut TrafficCongestion) -> HRESULT }} impl IMapRoute3 { - #[inline] pub unsafe fn get_duration_without_traffic(&self) -> Result { + #[inline] pub fn get_duration_without_traffic(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DurationWithoutTraffic)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_traffic_congestion(&self) -> Result { + }} + #[inline] pub fn get_traffic_congestion(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TrafficCongestion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMapRoute4, 913083557, 12371, 20385, 128, 255, 212, 117, 243, 237, 30, 110); RT_INTERFACE!{interface IMapRoute4(IMapRoute4Vtbl): IInspectable(IInspectableVtbl) [IID_IMapRoute4] { fn get_IsScenic(&self, out: *mut bool) -> HRESULT }} impl IMapRoute4 { - #[inline] pub unsafe fn get_is_scenic(&self) -> Result { + #[inline] pub fn get_is_scenic(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsScenic)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, out: *mut u32) -> HRESULT, fn put_MaxAlternateRouteCount(&self, value: u32) -> HRESULT, - fn get_InitialHeading(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_InitialHeading(&self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_InitialHeading(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_InitialHeading(&self, value: *mut foundation::IReference) -> HRESULT, fn get_RouteOptimization(&self, out: *mut MapRouteOptimization) -> HRESULT, fn put_RouteOptimization(&self, value: MapRouteOptimization) -> HRESULT, fn get_RouteRestrictions(&self, out: *mut MapRouteRestrictions) -> HRESULT, fn put_RouteRestrictions(&self, value: MapRouteRestrictions) -> HRESULT }} impl IMapRouteDrivingOptions { - #[inline] pub unsafe fn get_max_alternate_route_count(&self) -> Result { + #[inline] pub fn get_max_alternate_route_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxAlternateRouteCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_alternate_route_count(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_max_alternate_route_count(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxAlternateRouteCount)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_initial_heading(&self) -> Result>> { + }} + #[inline] pub fn get_initial_heading(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InitialHeading)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_initial_heading(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_initial_heading(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InitialHeading)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_route_optimization(&self) -> Result { + }} + #[inline] pub fn get_route_optimization(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RouteOptimization)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_route_optimization(&self, value: MapRouteOptimization) -> Result<()> { + }} + #[inline] pub fn set_route_optimization(&self, value: MapRouteOptimization) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RouteOptimization)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_route_restrictions(&self) -> Result { + }} + #[inline] pub fn get_route_restrictions(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RouteRestrictions)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_route_restrictions(&self, value: MapRouteRestrictions) -> Result<()> { + }} + #[inline] pub fn set_route_restrictions(&self, value: MapRouteRestrictions) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RouteRestrictions)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MapRouteDrivingOptions: IMapRouteDrivingOptions} impl RtActivatable for MapRouteDrivingOptions {} @@ -557,45 +557,45 @@ impl RtActivatable for MapRouteFinder {} impl RtActivatable for MapRouteFinder {} impl RtActivatable for MapRouteFinder {} impl MapRouteFinder { - #[cfg(feature="windows-devices")] #[inline] pub fn get_driving_route_async(startPoint: &super::super::devices::geolocation::Geopoint, endPoint: &super::super::devices::geolocation::Geopoint) -> Result>> { unsafe { + #[cfg(feature="windows-devices")] #[inline] pub fn get_driving_route_async(startPoint: &super::super::devices::geolocation::Geopoint, endPoint: &super::super::devices::geolocation::Geopoint) -> Result>> { >::get_activation_factory().get_driving_route_async(startPoint, endPoint) - }} - #[cfg(feature="windows-devices")] #[inline] pub fn get_driving_route_with_optimization_async(startPoint: &super::super::devices::geolocation::Geopoint, endPoint: &super::super::devices::geolocation::Geopoint, optimization: MapRouteOptimization) -> Result>> { unsafe { + } + #[cfg(feature="windows-devices")] #[inline] pub fn get_driving_route_with_optimization_async(startPoint: &super::super::devices::geolocation::Geopoint, endPoint: &super::super::devices::geolocation::Geopoint, optimization: MapRouteOptimization) -> Result>> { >::get_activation_factory().get_driving_route_with_optimization_async(startPoint, endPoint, optimization) - }} - #[cfg(feature="windows-devices")] #[inline] pub fn get_driving_route_with_optimization_and_restrictions_async(startPoint: &super::super::devices::geolocation::Geopoint, endPoint: &super::super::devices::geolocation::Geopoint, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions) -> Result>> { unsafe { + } + #[cfg(feature="windows-devices")] #[inline] pub fn get_driving_route_with_optimization_and_restrictions_async(startPoint: &super::super::devices::geolocation::Geopoint, endPoint: &super::super::devices::geolocation::Geopoint, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions) -> Result>> { >::get_activation_factory().get_driving_route_with_optimization_and_restrictions_async(startPoint, endPoint, optimization, restrictions) - }} - #[cfg(feature="windows-devices")] #[inline] pub fn get_driving_route_with_optimization_restrictions_and_heading_async(startPoint: &super::super::devices::geolocation::Geopoint, endPoint: &super::super::devices::geolocation::Geopoint, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions, headingInDegrees: f64) -> Result>> { unsafe { + } + #[cfg(feature="windows-devices")] #[inline] pub fn get_driving_route_with_optimization_restrictions_and_heading_async(startPoint: &super::super::devices::geolocation::Geopoint, endPoint: &super::super::devices::geolocation::Geopoint, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions, headingInDegrees: f64) -> Result>> { >::get_activation_factory().get_driving_route_with_optimization_restrictions_and_heading_async(startPoint, endPoint, optimization, restrictions, headingInDegrees) - }} - #[cfg(feature="windows-devices")] #[inline] pub fn get_driving_route_from_waypoints_async(wayPoints: &super::super::foundation::collections::IIterable) -> Result>> { unsafe { + } + #[cfg(feature="windows-devices")] #[inline] pub fn get_driving_route_from_waypoints_async(wayPoints: &foundation::collections::IIterable) -> Result>> { >::get_activation_factory().get_driving_route_from_waypoints_async(wayPoints) - }} - #[cfg(feature="windows-devices")] #[inline] pub fn get_driving_route_from_waypoints_and_optimization_async(wayPoints: &super::super::foundation::collections::IIterable, optimization: MapRouteOptimization) -> Result>> { unsafe { + } + #[cfg(feature="windows-devices")] #[inline] pub fn get_driving_route_from_waypoints_and_optimization_async(wayPoints: &foundation::collections::IIterable, optimization: MapRouteOptimization) -> Result>> { >::get_activation_factory().get_driving_route_from_waypoints_and_optimization_async(wayPoints, optimization) - }} - #[cfg(feature="windows-devices")] #[inline] pub fn get_driving_route_from_waypoints_optimization_and_restrictions_async(wayPoints: &super::super::foundation::collections::IIterable, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions) -> Result>> { unsafe { + } + #[cfg(feature="windows-devices")] #[inline] pub fn get_driving_route_from_waypoints_optimization_and_restrictions_async(wayPoints: &foundation::collections::IIterable, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions) -> Result>> { >::get_activation_factory().get_driving_route_from_waypoints_optimization_and_restrictions_async(wayPoints, optimization, restrictions) - }} - #[cfg(feature="windows-devices")] #[inline] pub fn get_driving_route_from_waypoints_optimization_restrictions_and_heading_async(wayPoints: &super::super::foundation::collections::IIterable, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions, headingInDegrees: f64) -> Result>> { unsafe { + } + #[cfg(feature="windows-devices")] #[inline] pub fn get_driving_route_from_waypoints_optimization_restrictions_and_heading_async(wayPoints: &foundation::collections::IIterable, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions, headingInDegrees: f64) -> Result>> { >::get_activation_factory().get_driving_route_from_waypoints_optimization_restrictions_and_heading_async(wayPoints, optimization, restrictions, headingInDegrees) - }} - #[cfg(feature="windows-devices")] #[inline] pub fn get_walking_route_async(startPoint: &super::super::devices::geolocation::Geopoint, endPoint: &super::super::devices::geolocation::Geopoint) -> Result>> { unsafe { + } + #[cfg(feature="windows-devices")] #[inline] pub fn get_walking_route_async(startPoint: &super::super::devices::geolocation::Geopoint, endPoint: &super::super::devices::geolocation::Geopoint) -> Result>> { >::get_activation_factory().get_walking_route_async(startPoint, endPoint) - }} - #[cfg(feature="windows-devices")] #[inline] pub fn get_walking_route_from_waypoints_async(wayPoints: &super::super::foundation::collections::IIterable) -> Result>> { unsafe { + } + #[cfg(feature="windows-devices")] #[inline] pub fn get_walking_route_from_waypoints_async(wayPoints: &foundation::collections::IIterable) -> Result>> { >::get_activation_factory().get_walking_route_from_waypoints_async(wayPoints) - }} - #[cfg(feature="windows-devices")] #[inline] pub fn get_driving_route_with_options_async(startPoint: &super::super::devices::geolocation::Geopoint, endPoint: &super::super::devices::geolocation::Geopoint, options: &MapRouteDrivingOptions) -> Result>> { unsafe { + } + #[cfg(feature="windows-devices")] #[inline] pub fn get_driving_route_with_options_async(startPoint: &super::super::devices::geolocation::Geopoint, endPoint: &super::super::devices::geolocation::Geopoint, options: &MapRouteDrivingOptions) -> Result>> { >::get_activation_factory().get_driving_route_with_options_async(startPoint, endPoint, options) - }} - #[inline] pub fn get_driving_route_from_enhanced_waypoints_async(waypoints: &super::super::foundation::collections::IIterable) -> Result>> { unsafe { + } + #[inline] pub fn get_driving_route_from_enhanced_waypoints_async(waypoints: &foundation::collections::IIterable) -> Result>> { >::get_activation_factory().get_driving_route_from_enhanced_waypoints_async(waypoints) - }} - #[inline] pub fn get_driving_route_from_enhanced_waypoints_with_options_async(waypoints: &super::super::foundation::collections::IIterable, options: &MapRouteDrivingOptions) -> Result>> { unsafe { + } + #[inline] pub fn get_driving_route_from_enhanced_waypoints_with_options_async(waypoints: &foundation::collections::IIterable, options: &MapRouteDrivingOptions) -> Result>> { >::get_activation_factory().get_driving_route_from_enhanced_waypoints_with_options_async(waypoints, options) - }} + } } DEFINE_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]) [CLSID_MapRouteFinder]); DEFINE_IID!(IID_IMapRouteFinderResult, 2825429786, 37922, 18092, 140, 161, 177, 97, 77, 75, 251, 226); @@ -604,121 +604,121 @@ RT_INTERFACE!{interface IMapRouteFinderResult(IMapRouteFinderResultVtbl): IInspe fn get_Status(&self, out: *mut MapRouteFinderStatus) -> HRESULT }} impl IMapRouteFinderResult { - #[inline] pub unsafe fn get_route(&self) -> Result> { + #[inline] pub fn get_route(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Route)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MapRouteFinderResult: IMapRouteFinderResult} 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_AlternateRoutes(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IMapRouteFinderResult2 { - #[inline] pub unsafe fn get_alternate_routes(&self) -> Result>> { + #[inline] pub fn get_alternate_routes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AlternateRoutes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&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(&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(&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(&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(&self, wayPoints: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-devices")] fn GetDrivingRouteFromWaypointsAndOptimizationAsync(&self, wayPoints: *mut super::super::foundation::collections::IIterable, optimization: MapRouteOptimization, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-devices")] fn GetDrivingRouteFromWaypointsOptimizationAndRestrictionsAsync(&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(&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(&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(&self, wayPoints: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-devices")] fn GetDrivingRouteAsync(&self, startPoint: *mut super::super::devices::geolocation::Geopoint, endPoint: *mut super::super::devices::geolocation::Geopoint, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-devices")] fn GetDrivingRouteWithOptimizationAsync(&self, startPoint: *mut super::super::devices::geolocation::Geopoint, endPoint: *mut super::super::devices::geolocation::Geopoint, optimization: MapRouteOptimization, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-devices")] fn GetDrivingRouteWithOptimizationAndRestrictionsAsync(&self, startPoint: *mut super::super::devices::geolocation::Geopoint, endPoint: *mut super::super::devices::geolocation::Geopoint, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-devices")] fn GetDrivingRouteWithOptimizationRestrictionsAndHeadingAsync(&self, startPoint: *mut super::super::devices::geolocation::Geopoint, endPoint: *mut super::super::devices::geolocation::Geopoint, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions, headingInDegrees: f64, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-devices")] fn GetDrivingRouteFromWaypointsAsync(&self, wayPoints: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-devices")] fn GetDrivingRouteFromWaypointsAndOptimizationAsync(&self, wayPoints: *mut foundation::collections::IIterable, optimization: MapRouteOptimization, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-devices")] fn GetDrivingRouteFromWaypointsOptimizationAndRestrictionsAsync(&self, wayPoints: *mut foundation::collections::IIterable, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-devices")] fn GetDrivingRouteFromWaypointsOptimizationRestrictionsAndHeadingAsync(&self, wayPoints: *mut foundation::collections::IIterable, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions, headingInDegrees: f64, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-devices")] fn GetWalkingRouteAsync(&self, startPoint: *mut super::super::devices::geolocation::Geopoint, endPoint: *mut super::super::devices::geolocation::Geopoint, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-devices")] fn GetWalkingRouteFromWaypointsAsync(&self, wayPoints: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IMapRouteFinderStatics { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_driving_route_async(&self, startPoint: &super::super::devices::geolocation::Geopoint, endPoint: &super::super::devices::geolocation::Geopoint) -> Result>> { + #[cfg(feature="windows-devices")] #[inline] pub fn get_driving_route_async(&self, startPoint: &super::super::devices::geolocation::Geopoint, endPoint: &super::super::devices::geolocation::Geopoint) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDrivingRouteAsync)(self as *const _ as *mut _, 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(&self, startPoint: &super::super::devices::geolocation::Geopoint, endPoint: &super::super::devices::geolocation::Geopoint, optimization: MapRouteOptimization) -> Result>> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_driving_route_with_optimization_async(&self, startPoint: &super::super::devices::geolocation::Geopoint, endPoint: &super::super::devices::geolocation::Geopoint, optimization: MapRouteOptimization) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDrivingRouteWithOptimizationAsync)(self as *const _ as *mut _, 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(&self, startPoint: &super::super::devices::geolocation::Geopoint, endPoint: &super::super::devices::geolocation::Geopoint, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions) -> Result>> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_driving_route_with_optimization_and_restrictions_async(&self, startPoint: &super::super::devices::geolocation::Geopoint, endPoint: &super::super::devices::geolocation::Geopoint, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDrivingRouteWithOptimizationAndRestrictionsAsync)(self as *const _ as *mut _, 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(&self, startPoint: &super::super::devices::geolocation::Geopoint, endPoint: &super::super::devices::geolocation::Geopoint, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions, headingInDegrees: f64) -> Result>> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_driving_route_with_optimization_restrictions_and_heading_async(&self, startPoint: &super::super::devices::geolocation::Geopoint, endPoint: &super::super::devices::geolocation::Geopoint, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions, headingInDegrees: f64) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDrivingRouteWithOptimizationRestrictionsAndHeadingAsync)(self as *const _ as *mut _, 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(&self, wayPoints: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_driving_route_from_waypoints_async(&self, wayPoints: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDrivingRouteFromWaypointsAsync)(self as *const _ as *mut _, 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(&self, wayPoints: &super::super::foundation::collections::IIterable, optimization: MapRouteOptimization) -> Result>> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_driving_route_from_waypoints_and_optimization_async(&self, wayPoints: &foundation::collections::IIterable, optimization: MapRouteOptimization) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDrivingRouteFromWaypointsAndOptimizationAsync)(self as *const _ as *mut _, 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(&self, wayPoints: &super::super::foundation::collections::IIterable, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions) -> Result>> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_driving_route_from_waypoints_optimization_and_restrictions_async(&self, wayPoints: &foundation::collections::IIterable, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDrivingRouteFromWaypointsOptimizationAndRestrictionsAsync)(self as *const _ as *mut _, 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(&self, wayPoints: &super::super::foundation::collections::IIterable, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions, headingInDegrees: f64) -> Result>> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_driving_route_from_waypoints_optimization_restrictions_and_heading_async(&self, wayPoints: &foundation::collections::IIterable, optimization: MapRouteOptimization, restrictions: MapRouteRestrictions, headingInDegrees: f64) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDrivingRouteFromWaypointsOptimizationRestrictionsAndHeadingAsync)(self as *const _ as *mut _, 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(&self, startPoint: &super::super::devices::geolocation::Geopoint, endPoint: &super::super::devices::geolocation::Geopoint) -> Result>> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_walking_route_async(&self, startPoint: &super::super::devices::geolocation::Geopoint, endPoint: &super::super::devices::geolocation::Geopoint) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetWalkingRouteAsync)(self as *const _ as *mut _, 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(&self, wayPoints: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_walking_route_from_waypoints_async(&self, wayPoints: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetWalkingRouteFromWaypointsAsync)(self as *const _ as *mut _, wayPoints as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&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 + #[cfg(feature="windows-devices")] fn GetDrivingRouteWithOptionsAsync(&self, startPoint: *mut super::super::devices::geolocation::Geopoint, endPoint: *mut super::super::devices::geolocation::Geopoint, options: *mut MapRouteDrivingOptions, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IMapRouteFinderStatics2 { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_driving_route_with_options_async(&self, startPoint: &super::super::devices::geolocation::Geopoint, endPoint: &super::super::devices::geolocation::Geopoint, options: &MapRouteDrivingOptions) -> Result>> { + #[cfg(feature="windows-devices")] #[inline] pub fn get_driving_route_with_options_async(&self, startPoint: &super::super::devices::geolocation::Geopoint, endPoint: &super::super::devices::geolocation::Geopoint, options: &MapRouteDrivingOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDrivingRouteWithOptionsAsync)(self as *const _ as *mut _, 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) } - } + }} } DEFINE_IID!(IID_IMapRouteFinderStatics3, 4127818036, 22803, 4582, 139, 119, 134, 243, 12, 168, 147, 211); RT_INTERFACE!{static interface IMapRouteFinderStatics3(IMapRouteFinderStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IMapRouteFinderStatics3] { - fn GetDrivingRouteFromEnhancedWaypointsAsync(&self, waypoints: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetDrivingRouteFromEnhancedWaypointsWithOptionsAsync(&self, waypoints: *mut super::super::foundation::collections::IIterable, options: *mut MapRouteDrivingOptions, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetDrivingRouteFromEnhancedWaypointsAsync(&self, waypoints: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetDrivingRouteFromEnhancedWaypointsWithOptionsAsync(&self, waypoints: *mut foundation::collections::IIterable, options: *mut MapRouteDrivingOptions, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IMapRouteFinderStatics3 { - #[inline] pub unsafe fn get_driving_route_from_enhanced_waypoints_async(&self, waypoints: &super::super::foundation::collections::IIterable) -> Result>> { + #[inline] pub fn get_driving_route_from_enhanced_waypoints_async(&self, waypoints: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDrivingRouteFromEnhancedWaypointsAsync)(self as *const _ as *mut _, waypoints as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_driving_route_from_enhanced_waypoints_with_options_async(&self, waypoints: &super::super::foundation::collections::IIterable, options: &MapRouteDrivingOptions) -> Result>> { + }} + #[inline] pub fn get_driving_route_from_enhanced_waypoints_with_options_async(&self, waypoints: &foundation::collections::IIterable, options: &MapRouteDrivingOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDrivingRouteFromEnhancedWaypointsWithOptionsAsync)(self as *const _ as *mut _, waypoints as *const _ as *mut _, options as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -730,53 +730,53 @@ RT_INTERFACE!{interface IMapRouteLeg(IMapRouteLegVtbl): IInspectable(IInspectabl #[cfg(not(feature="windows-devices"))] fn __Dummy1(&self) -> (), #[cfg(feature="windows-devices")] fn get_Path(&self, out: *mut *mut super::super::devices::geolocation::Geopath) -> HRESULT, fn get_LengthInMeters(&self, out: *mut f64) -> HRESULT, - fn get_EstimatedDuration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn get_Maneuvers(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_EstimatedDuration(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_Maneuvers(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IMapRouteLeg { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_bounding_box(&self) -> Result> { + #[cfg(feature="windows-devices")] #[inline] pub fn get_bounding_box(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BoundingBox)(self 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_path(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_path(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Path)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_length_in_meters(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_length_in_meters(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LengthInMeters)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_estimated_duration(&self) -> Result { + }} + #[inline] pub fn get_estimated_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EstimatedDuration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_maneuvers(&self) -> Result>> { + }} + #[inline] pub fn get_maneuvers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Maneuvers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class MapRouteLeg: IMapRouteLeg} DEFINE_IID!(IID_IMapRouteLeg2, 48367149, 51654, 17848, 142, 84, 26, 16, 181, 122, 23, 232); RT_INTERFACE!{interface IMapRouteLeg2(IMapRouteLeg2Vtbl): IInspectable(IInspectableVtbl) [IID_IMapRouteLeg2] { - fn get_DurationWithoutTraffic(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_DurationWithoutTraffic(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn get_TrafficCongestion(&self, out: *mut TrafficCongestion) -> HRESULT }} impl IMapRouteLeg2 { - #[inline] pub unsafe fn get_duration_without_traffic(&self) -> Result { + #[inline] pub fn get_duration_without_traffic(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DurationWithoutTraffic)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_traffic_congestion(&self) -> Result { + }} + #[inline] pub fn get_traffic_congestion(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TrafficCongestion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMapRouteManeuver, 3982235632, 42667, 19813, 160, 134, 250, 138, 126, 52, 13, 242); RT_INTERFACE!{interface IMapRouteManeuver(IMapRouteManeuverVtbl): IInspectable(IInspectableVtbl) [IID_IMapRouteManeuver] { @@ -789,36 +789,36 @@ RT_INTERFACE!{interface IMapRouteManeuver(IMapRouteManeuverVtbl): IInspectable(I fn get_ManeuverNotices(&self, out: *mut MapManeuverNotices) -> HRESULT }} impl IMapRouteManeuver { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_starting_point(&self) -> Result> { + #[cfg(feature="windows-devices")] #[inline] pub fn get_starting_point(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StartingPoint)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_length_in_meters(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_length_in_meters(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LengthInMeters)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_instruction_text(&self) -> Result { + }} + #[inline] pub fn get_instruction_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InstructionText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_kind(&self) -> Result { + }} + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_exit_number(&self) -> Result { + }} + #[inline] pub fn get_exit_number(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExitNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_maneuver_notices(&self) -> Result { + }} + #[inline] pub fn get_maneuver_notices(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ManeuverNotices)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class MapRouteManeuver: IMapRouteManeuver} DEFINE_IID!(IID_IMapRouteManeuver2, 1568394652, 31899, 16863, 131, 139, 234, 226, 30, 75, 5, 169); @@ -828,32 +828,32 @@ RT_INTERFACE!{interface IMapRouteManeuver2(IMapRouteManeuver2Vtbl): IInspectable fn get_StreetName(&self, out: *mut HSTRING) -> HRESULT }} impl IMapRouteManeuver2 { - #[inline] pub unsafe fn get_start_heading(&self) -> Result { + #[inline] pub fn get_start_heading(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StartHeading)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_end_heading(&self) -> Result { + }} + #[inline] pub fn get_end_heading(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EndHeading)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_street_name(&self) -> Result { + }} + #[inline] pub fn get_street_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StreetName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMapRouteManeuver3, 2795583711, 1155, 16742, 133, 190, 185, 147, 54, 193, 24, 117); RT_INTERFACE!{interface IMapRouteManeuver3(IMapRouteManeuver3Vtbl): IInspectable(IInspectableVtbl) [IID_IMapRouteManeuver3] { - fn get_Warnings(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_Warnings(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IMapRouteManeuver3 { - #[inline] pub unsafe fn get_warnings(&self) -> Result>> { + #[inline] pub fn get_warnings(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Warnings)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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, @@ -870,24 +870,24 @@ impl RtActivatable for MapService {} impl RtActivatable for MapService {} impl RtActivatable for MapService {} impl MapService { - #[inline] pub fn set_service_token(value: &HStringArg) -> Result<()> { unsafe { + #[inline] pub fn set_service_token(value: &HStringArg) -> Result<()> { >::get_activation_factory().set_service_token(value) - }} - #[inline] pub fn get_service_token() -> Result { unsafe { + } + #[inline] pub fn get_service_token() -> Result { >::get_activation_factory().get_service_token() - }} - #[inline] pub fn get_world_view_region_code() -> Result { unsafe { + } + #[inline] pub fn get_world_view_region_code() -> Result { >::get_activation_factory().get_world_view_region_code() - }} - #[inline] pub fn get_data_attributions() -> Result { unsafe { + } + #[inline] pub fn get_data_attributions() -> Result { >::get_activation_factory().get_data_attributions() - }} - #[inline] pub fn set_data_usage_preference(value: MapServiceDataUsagePreference) -> Result<()> { unsafe { + } + #[inline] pub fn set_data_usage_preference(value: MapServiceDataUsagePreference) -> Result<()> { >::get_activation_factory().set_data_usage_preference(value) - }} - #[inline] pub fn get_data_usage_preference() -> Result { unsafe { + } + #[inline] pub fn get_data_usage_preference() -> Result { >::get_activation_factory().get_data_usage_preference() - }} + } } DEFINE_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]) [CLSID_MapService]); RT_ENUM! { enum MapServiceDataUsagePreference: i32 { @@ -899,37 +899,37 @@ RT_INTERFACE!{static interface IMapServiceStatics(IMapServiceStaticsVtbl): IInsp fn get_ServiceToken(&self, out: *mut HSTRING) -> HRESULT }} impl IMapServiceStatics { - #[inline] pub unsafe fn set_service_token(&self, value: &HStringArg) -> Result<()> { + #[inline] pub fn set_service_token(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ServiceToken)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_service_token(&self) -> Result { + }} + #[inline] pub fn get_service_token(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ServiceToken)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } 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(&self, out: *mut HSTRING) -> HRESULT }} impl IMapServiceStatics2 { - #[inline] pub unsafe fn get_world_view_region_code(&self) -> Result { + #[inline] pub fn get_world_view_region_code(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WorldViewRegionCode)(self as *const _ as *mut _, &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(&self, out: *mut HSTRING) -> HRESULT }} impl IMapServiceStatics3 { - #[inline] pub unsafe fn get_data_attributions(&self) -> Result { + #[inline] pub fn get_data_attributions(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DataAttributions)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMapServiceStatics4, 143272034, 27324, 16910, 148, 95, 76, 253, 137, 198, 115, 86); RT_INTERFACE!{static interface IMapServiceStatics4(IMapServiceStatics4Vtbl): IInspectable(IInspectableVtbl) [IID_IMapServiceStatics4] { @@ -937,77 +937,77 @@ RT_INTERFACE!{static interface IMapServiceStatics4(IMapServiceStatics4Vtbl): IIn fn get_DataUsagePreference(&self, out: *mut MapServiceDataUsagePreference) -> HRESULT }} impl IMapServiceStatics4 { - #[inline] pub unsafe fn set_data_usage_preference(&self, value: MapServiceDataUsagePreference) -> Result<()> { + #[inline] pub fn set_data_usage_preference(&self, value: MapServiceDataUsagePreference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DataUsagePreference)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_data_usage_preference(&self) -> Result { + }} + #[inline] pub fn get_data_usage_preference(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DataUsagePreference)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IPlaceInfo, 2584219830, 12744, 20330, 159, 24, 149, 11, 76, 56, 149, 26); RT_INTERFACE!{interface IPlaceInfo(IPlaceInfoVtbl): IInspectable(IInspectableVtbl) [IID_IPlaceInfo] { - fn Show(&self, selection: super::super::foundation::Rect) -> HRESULT, + fn Show(&self, selection: foundation::Rect) -> HRESULT, #[cfg(not(feature="windows-ui"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-ui")] fn ShowWithPreferredPlacement(&self, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> HRESULT, + #[cfg(feature="windows-ui")] fn ShowWithPreferredPlacement(&self, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> HRESULT, fn get_Identifier(&self, out: *mut HSTRING) -> HRESULT, fn get_DisplayName(&self, out: *mut HSTRING) -> HRESULT, fn get_DisplayAddress(&self, out: *mut HSTRING) -> HRESULT, #[cfg(feature="windows-devices")] fn get_Geoshape(&self, out: *mut *mut super::super::devices::geolocation::IGeoshape) -> HRESULT }} impl IPlaceInfo { - #[inline] pub unsafe fn show(&self, selection: super::super::foundation::Rect) -> Result<()> { + #[inline] pub fn show(&self, selection: foundation::Rect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Show)(self as *const _ as *mut _, selection); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn show_with_preferred_placement(&self, selection: super::super::foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn show_with_preferred_placement(&self, selection: foundation::Rect, preferredPlacement: super::super::ui::popups::Placement) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ShowWithPreferredPlacement)(self as *const _ as *mut _, selection, preferredPlacement); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_identifier(&self) -> Result { + }} + #[inline] pub fn get_identifier(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Identifier)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_address(&self) -> Result { + }} + #[inline] pub fn get_display_address(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayAddress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_geoshape(&self) -> Result> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_geoshape(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Geoshape)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PlaceInfo: IPlaceInfo} impl RtActivatable for PlaceInfo {} impl PlaceInfo { - #[cfg(feature="windows-devices")] #[inline] pub fn create(referencePoint: &super::super::devices::geolocation::Geopoint) -> Result> { unsafe { + #[cfg(feature="windows-devices")] #[inline] pub fn create(referencePoint: &super::super::devices::geolocation::Geopoint) -> Result>> { >::get_activation_factory().create(referencePoint) - }} - #[cfg(feature="windows-devices")] #[inline] pub fn create_with_geopoint_and_options(referencePoint: &super::super::devices::geolocation::Geopoint, options: &PlaceInfoCreateOptions) -> Result> { unsafe { + } + #[cfg(feature="windows-devices")] #[inline] pub fn create_with_geopoint_and_options(referencePoint: &super::super::devices::geolocation::Geopoint, options: &PlaceInfoCreateOptions) -> Result>> { >::get_activation_factory().create_with_geopoint_and_options(referencePoint, options) - }} - #[inline] pub fn create_from_identifier(identifier: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_from_identifier(identifier: &HStringArg) -> Result>> { >::get_activation_factory().create_from_identifier(identifier) - }} - #[cfg(feature="windows-devices")] #[inline] pub fn create_from_identifier_with_options(identifier: &HStringArg, defaultPoint: &super::super::devices::geolocation::Geopoint, options: &PlaceInfoCreateOptions) -> Result> { unsafe { + } + #[cfg(feature="windows-devices")] #[inline] pub fn create_from_identifier_with_options(identifier: &HStringArg, defaultPoint: &super::super::devices::geolocation::Geopoint, options: &PlaceInfoCreateOptions) -> Result>> { >::get_activation_factory().create_from_identifier_with_options(identifier, defaultPoint, options) - }} - #[inline] pub fn create_from_map_location(location: &MapLocation) -> Result> { unsafe { + } + #[inline] pub fn create_from_map_location(location: &MapLocation) -> Result>> { >::get_activation_factory().create_from_map_location(location) - }} - #[inline] pub fn get_is_show_supported() -> Result { unsafe { + } + #[inline] pub fn get_is_show_supported() -> Result { >::get_activation_factory().get_is_show_supported() - }} + } } DEFINE_CLSID!(PlaceInfo(&[87,105,110,100,111,119,115,46,83,101,114,118,105,99,101,115,46,77,97,112,115,46,80,108,97,99,101,73,110,102,111,0]) [CLSID_PlaceInfo]); DEFINE_IID!(IID_IPlaceInfoCreateOptions, 3442721061, 26609, 19379, 153, 7, 236, 206, 147, 155, 3, 153); @@ -1018,24 +1018,24 @@ RT_INTERFACE!{interface IPlaceInfoCreateOptions(IPlaceInfoCreateOptionsVtbl): II fn get_DisplayAddress(&self, out: *mut HSTRING) -> HRESULT }} impl IPlaceInfoCreateOptions { - #[inline] pub unsafe fn set_display_name(&self, value: &HStringArg) -> Result<()> { + #[inline] pub fn set_display_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_address(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_display_address(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayAddress)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_address(&self) -> Result { + }} + #[inline] pub fn get_display_address(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayAddress)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PlaceInfoCreateOptions: IPlaceInfoCreateOptions} impl RtActivatable for PlaceInfoCreateOptions {} @@ -1053,36 +1053,36 @@ RT_INTERFACE!{static interface IPlaceInfoStatics(IPlaceInfoStaticsVtbl): IInspec fn get_IsShowSupported(&self, out: *mut bool) -> HRESULT }} impl IPlaceInfoStatics { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn create(&self, referencePoint: &super::super::devices::geolocation::Geopoint) -> Result> { + #[cfg(feature="windows-devices")] #[inline] pub fn create(&self, referencePoint: &super::super::devices::geolocation::Geopoint) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, 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 create_with_geopoint_and_options(&self, referencePoint: &super::super::devices::geolocation::Geopoint, options: &PlaceInfoCreateOptions) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-devices")] #[inline] pub fn create_with_geopoint_and_options(&self, referencePoint: &super::super::devices::geolocation::Geopoint, options: &PlaceInfoCreateOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithGeopointAndOptions)(self as *const _ as *mut _, referencePoint 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 create_from_identifier(&self, identifier: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_from_identifier(&self, identifier: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromIdentifier)(self as *const _ as *mut _, identifier.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn create_from_identifier_with_options(&self, identifier: &HStringArg, defaultPoint: &super::super::devices::geolocation::Geopoint, options: &PlaceInfoCreateOptions) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-devices")] #[inline] pub fn create_from_identifier_with_options(&self, identifier: &HStringArg, defaultPoint: &super::super::devices::geolocation::Geopoint, options: &PlaceInfoCreateOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromIdentifierWithOptions)(self as *const _ as *mut _, identifier.get(), defaultPoint 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 create_from_map_location(&self, location: &MapLocation) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_from_map_location(&self, location: &MapLocation) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromMapLocation)(self as *const _ as *mut _, location as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_show_supported(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_show_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsShowSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum TrafficCongestion: i32 { Unknown (TrafficCongestion_Unknown) = 0, Light (TrafficCongestion_Light) = 1, Mild (TrafficCongestion_Mild) = 2, Medium (TrafficCongestion_Medium) = 3, Heavy (TrafficCongestion_Heavy) = 4, @@ -1098,76 +1098,76 @@ RT_INTERFACE!{interface IOfflineMapPackage(IOfflineMapPackageVtbl): IInspectable fn get_DisplayName(&self, out: *mut HSTRING) -> HRESULT, fn get_EnclosingRegionName(&self, out: *mut HSTRING) -> HRESULT, fn get_EstimatedSizeInBytes(&self, out: *mut u64) -> HRESULT, - fn remove_StatusChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_StatusChanged(&self, value: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn RequestStartDownloadAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn remove_StatusChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_StatusChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn RequestStartDownloadAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IOfflineMapPackage { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_enclosing_region_name(&self) -> Result { + }} + #[inline] pub fn get_enclosing_region_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EnclosingRegionName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_estimated_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_estimated_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EstimatedSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_status_changed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_status_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StatusChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_status_changed(&self, value: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_status_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StatusChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn request_start_download_async(&self) -> Result>> { + }} + #[inline] pub fn request_start_download_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestStartDownloadAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class OfflineMapPackage: IOfflineMapPackage} impl RtActivatable for OfflineMapPackage {} impl OfflineMapPackage { - #[cfg(feature="windows-devices")] #[inline] pub fn find_packages_async(queryPoint: &::rt::gen::windows::devices::geolocation::Geopoint) -> Result>> { unsafe { + #[cfg(feature="windows-devices")] #[inline] pub fn find_packages_async(queryPoint: &::rt::gen::windows::devices::geolocation::Geopoint) -> Result>> { >::get_activation_factory().find_packages_async(queryPoint) - }} - #[cfg(feature="windows-devices")] #[inline] pub fn find_packages_in_bounding_box_async(queryBoundingBox: &::rt::gen::windows::devices::geolocation::GeoboundingBox) -> Result>> { unsafe { + } + #[cfg(feature="windows-devices")] #[inline] pub fn find_packages_in_bounding_box_async(queryBoundingBox: &::rt::gen::windows::devices::geolocation::GeoboundingBox) -> Result>> { >::get_activation_factory().find_packages_in_bounding_box_async(queryBoundingBox) - }} - #[cfg(feature="windows-devices")] #[inline] pub fn find_packages_in_geocircle_async(queryCircle: &::rt::gen::windows::devices::geolocation::Geocircle) -> Result>> { unsafe { + } + #[cfg(feature="windows-devices")] #[inline] pub fn find_packages_in_geocircle_async(queryCircle: &::rt::gen::windows::devices::geolocation::Geocircle) -> Result>> { >::get_activation_factory().find_packages_in_geocircle_async(queryCircle) - }} + } } DEFINE_CLSID!(OfflineMapPackage(&[87,105,110,100,111,119,115,46,83,101,114,118,105,99,101,115,46,77,97,112,115,46,79,102,102,108,105,110,101,77,97,112,115,46,79,102,102,108,105,110,101,77,97,112,80,97,99,107,97,103,101,0]) [CLSID_OfflineMapPackage]); DEFINE_IID!(IID_IOfflineMapPackageQueryResult, 1431852049, 14817, 20033, 164, 225, 95, 72, 114, 190, 225, 153); RT_INTERFACE!{interface IOfflineMapPackageQueryResult(IOfflineMapPackageQueryResultVtbl): IInspectable(IInspectableVtbl) [IID_IOfflineMapPackageQueryResult] { fn get_Status(&self, out: *mut OfflineMapPackageQueryStatus) -> HRESULT, - fn get_Packages(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn get_Packages(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IOfflineMapPackageQueryResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_packages(&self) -> Result>> { + }} + #[inline] pub fn get_packages(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Packages)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class OfflineMapPackageQueryResult: IOfflineMapPackageQueryResult} RT_ENUM! { enum OfflineMapPackageQueryStatus: i32 { @@ -1178,11 +1178,11 @@ RT_INTERFACE!{interface IOfflineMapPackageStartDownloadResult(IOfflineMapPackage fn get_Status(&self, out: *mut OfflineMapPackageStartDownloadStatus) -> HRESULT }} impl IOfflineMapPackageStartDownloadResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class OfflineMapPackageStartDownloadResult: IOfflineMapPackageStartDownloadResult} RT_ENUM! { enum OfflineMapPackageStartDownloadStatus: i32 { @@ -1190,26 +1190,26 @@ RT_ENUM! { enum OfflineMapPackageStartDownloadStatus: i32 { }} DEFINE_IID!(IID_IOfflineMapPackageStatics, 408844578, 43057, 19120, 148, 31, 105, 152, 250, 146, 146, 133); RT_INTERFACE!{static interface IOfflineMapPackageStatics(IOfflineMapPackageStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IOfflineMapPackageStatics] { - #[cfg(feature="windows-devices")] fn FindPackagesAsync(&self, queryPoint: *mut ::rt::gen::windows::devices::geolocation::Geopoint, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-devices")] fn FindPackagesInBoundingBoxAsync(&self, queryBoundingBox: *mut ::rt::gen::windows::devices::geolocation::GeoboundingBox, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-devices")] fn FindPackagesInGeocircleAsync(&self, queryCircle: *mut ::rt::gen::windows::devices::geolocation::Geocircle, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-devices")] fn FindPackagesAsync(&self, queryPoint: *mut ::rt::gen::windows::devices::geolocation::Geopoint, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-devices")] fn FindPackagesInBoundingBoxAsync(&self, queryBoundingBox: *mut ::rt::gen::windows::devices::geolocation::GeoboundingBox, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-devices")] fn FindPackagesInGeocircleAsync(&self, queryCircle: *mut ::rt::gen::windows::devices::geolocation::Geocircle, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IOfflineMapPackageStatics { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn find_packages_async(&self, queryPoint: &::rt::gen::windows::devices::geolocation::Geopoint) -> Result>> { + #[cfg(feature="windows-devices")] #[inline] pub fn find_packages_async(&self, queryPoint: &::rt::gen::windows::devices::geolocation::Geopoint) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackagesAsync)(self as *const _ as *mut _, 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_packages_in_bounding_box_async(&self, queryBoundingBox: &::rt::gen::windows::devices::geolocation::GeoboundingBox) -> Result>> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn find_packages_in_bounding_box_async(&self, queryBoundingBox: &::rt::gen::windows::devices::geolocation::GeoboundingBox) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackagesInBoundingBoxAsync)(self as *const _ as *mut _, queryBoundingBox 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_packages_in_geocircle_async(&self, queryCircle: &::rt::gen::windows::devices::geolocation::Geocircle) -> Result>> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn find_packages_in_geocircle_async(&self, queryCircle: &::rt::gen::windows::devices::geolocation::Geocircle) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindPackagesInGeocircleAsync)(self as *const _ as *mut _, queryCircle as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum OfflineMapPackageStatus: i32 { NotDownloaded (OfflineMapPackageStatus_NotDownloaded) = 0, Downloading (OfflineMapPackageStatus_Downloading) = 1, Downloaded (OfflineMapPackageStatus_Downloaded) = 2, Deleting (OfflineMapPackageStatus_Deleting) = 3, @@ -1220,30 +1220,30 @@ use ::prelude::*; RT_CLASS!{static class LocalCategories} impl RtActivatable for LocalCategories {} impl LocalCategories { - #[inline] pub fn get_bank_and_credit_unions() -> Result { unsafe { + #[inline] pub fn get_bank_and_credit_unions() -> Result { >::get_activation_factory().get_bank_and_credit_unions() - }} - #[inline] pub fn get_eat_drink() -> Result { unsafe { + } + #[inline] pub fn get_eat_drink() -> Result { >::get_activation_factory().get_eat_drink() - }} - #[inline] pub fn get_hospitals() -> Result { unsafe { + } + #[inline] pub fn get_hospitals() -> Result { >::get_activation_factory().get_hospitals() - }} - #[inline] pub fn get_hotels_and_motels() -> Result { unsafe { + } + #[inline] pub fn get_hotels_and_motels() -> Result { >::get_activation_factory().get_hotels_and_motels() - }} - #[inline] pub fn get_all() -> Result { unsafe { + } + #[inline] pub fn get_all() -> Result { >::get_activation_factory().get_all() - }} - #[inline] pub fn get_parking() -> Result { unsafe { + } + #[inline] pub fn get_parking() -> Result { >::get_activation_factory().get_parking() - }} - #[inline] pub fn get_see_do() -> Result { unsafe { + } + #[inline] pub fn get_see_do() -> Result { >::get_activation_factory().get_see_do() - }} - #[inline] pub fn get_shop() -> Result { unsafe { + } + #[inline] pub fn get_shop() -> Result { >::get_activation_factory().get_shop() - }} + } } DEFINE_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]) [CLSID_LocalCategories]); DEFINE_IID!(IID_ILocalCategoriesStatics, 4103313909, 33377, 17185, 153, 116, 239, 146, 212, 154, 141, 202); @@ -1258,46 +1258,46 @@ RT_INTERFACE!{static interface ILocalCategoriesStatics(ILocalCategoriesStaticsVt fn get_Shop(&self, out: *mut HSTRING) -> HRESULT }} impl ILocalCategoriesStatics { - #[inline] pub unsafe fn get_bank_and_credit_unions(&self) -> Result { + #[inline] pub fn get_bank_and_credit_unions(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BankAndCreditUnions)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_eat_drink(&self) -> Result { + }} + #[inline] pub fn get_eat_drink(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EatDrink)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_hospitals(&self) -> Result { + }} + #[inline] pub fn get_hospitals(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Hospitals)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_hotels_and_motels(&self) -> Result { + }} + #[inline] pub fn get_hotels_and_motels(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HotelsAndMotels)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_all(&self) -> Result { + }} + #[inline] pub fn get_all(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_All)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_parking(&self) -> Result { + }} + #[inline] pub fn get_parking(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Parking)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_see_do(&self) -> Result { + }} + #[inline] pub fn get_see_do(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SeeDo)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_shop(&self) -> Result { + }} + #[inline] pub fn get_shop(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Shop)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ILocalLocation, 3138382251, 17666, 20268, 148, 169, 13, 96, 222, 14, 33, 99); RT_INTERFACE!{interface ILocalLocation(ILocalLocationVtbl): IInspectable(IInspectableVtbl) [IID_ILocalLocation] { @@ -1311,102 +1311,102 @@ RT_INTERFACE!{interface ILocalLocation(ILocalLocationVtbl): IInspectable(IInspec fn get_DataAttribution(&self, out: *mut HSTRING) -> HRESULT }} impl ILocalLocation { - #[inline] pub unsafe fn get_address(&self) -> Result> { + #[inline] pub fn get_address(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Address)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_identifier(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_identifier(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Identifier)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_description(&self) -> Result { + }} + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_point(&self) -> Result> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_point(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Point)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_phone_number(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_phone_number(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PhoneNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_data_attribution(&self) -> Result { + }} + #[inline] pub fn get_data_attribution(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DataAttribution)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class LocalLocation: ILocalLocation} 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(&self, out: *mut HSTRING) -> HRESULT, fn get_RatingInfo(&self, out: *mut *mut LocalLocationRatingInfo) -> HRESULT, - fn get_HoursOfOperation(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn get_HoursOfOperation(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl ILocalLocation2 { - #[inline] pub unsafe fn get_category(&self) -> Result { + #[inline] pub fn get_category(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Category)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rating_info(&self) -> Result> { + }} + #[inline] pub fn get_rating_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RatingInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_hours_of_operation(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_hours_of_operation(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HoursOfOperation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{static class LocalLocationFinder} impl RtActivatable for LocalLocationFinder {} impl LocalLocationFinder { - #[cfg(feature="windows-devices")] #[inline] pub fn find_local_locations_async(searchTerm: &HStringArg, searchArea: &::rt::gen::windows::devices::geolocation::Geocircle, localCategory: &HStringArg, maxResults: u32) -> Result>> { unsafe { + #[cfg(feature="windows-devices")] #[inline] pub fn find_local_locations_async(searchTerm: &HStringArg, searchArea: &::rt::gen::windows::devices::geolocation::Geocircle, localCategory: &HStringArg, maxResults: u32) -> Result>> { >::get_activation_factory().find_local_locations_async(searchTerm, searchArea, localCategory, maxResults) - }} + } } DEFINE_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]) [CLSID_LocalLocationFinder]); 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(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_LocalLocations(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_Status(&self, out: *mut LocalLocationFinderStatus) -> HRESULT }} impl ILocalLocationFinderResult { - #[inline] pub unsafe fn get_local_locations(&self) -> Result>> { + #[inline] pub fn get_local_locations(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LocalLocations)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class LocalLocationFinderResult: ILocalLocationFinderResult} 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(&self, searchTerm: HSTRING, searchArea: *mut ::rt::gen::windows::devices::geolocation::Geocircle, localCategory: HSTRING, maxResults: u32, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-devices")] fn FindLocalLocationsAsync(&self, searchTerm: HSTRING, searchArea: *mut ::rt::gen::windows::devices::geolocation::Geocircle, localCategory: HSTRING, maxResults: u32, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ILocalLocationFinderStatics { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn find_local_locations_async(&self, searchTerm: &HStringArg, searchArea: &::rt::gen::windows::devices::geolocation::Geocircle, localCategory: &HStringArg, maxResults: u32) -> Result>> { + #[cfg(feature="windows-devices")] #[inline] pub fn find_local_locations_async(&self, searchTerm: &HStringArg, searchArea: &::rt::gen::windows::devices::geolocation::Geocircle, localCategory: &HStringArg, maxResults: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindLocalLocationsAsync)(self as *const _ as *mut _, searchTerm.get(), searchArea as *const _ as *mut _, localCategory.get(), maxResults, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -1415,57 +1415,57 @@ DEFINE_IID!(IID_ILocalLocationHoursOfOperationItem, 592743538, 41415, 17393, 164 RT_INTERFACE!{interface ILocalLocationHoursOfOperationItem(ILocalLocationHoursOfOperationItemVtbl): IInspectable(IInspectableVtbl) [IID_ILocalLocationHoursOfOperationItem] { #[cfg(not(feature="windows-globalization"))] fn __Dummy0(&self) -> (), #[cfg(feature="windows-globalization")] fn get_Day(&self, out: *mut ::rt::gen::windows::globalization::DayOfWeek) -> HRESULT, - fn get_Start(&self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn get_Span(&self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT + fn get_Start(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_Span(&self, out: *mut foundation::TimeSpan) -> HRESULT }} impl ILocalLocationHoursOfOperationItem { - #[cfg(feature="windows-globalization")] #[inline] pub unsafe fn get_day(&self) -> Result<::rt::gen::windows::globalization::DayOfWeek> { + #[cfg(feature="windows-globalization")] #[inline] pub fn get_day(&self) -> Result<::rt::gen::windows::globalization::DayOfWeek> { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Day)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_start(&self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + }} + #[inline] pub fn get_start(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Start)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_span(&self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + }} + #[inline] pub fn get_span(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Span)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class LocalLocationHoursOfOperationItem: ILocalLocationHoursOfOperationItem} 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(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn get_RatingCount(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_AggregateRating(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_RatingCount(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn get_ProviderIdentifier(&self, out: *mut HSTRING) -> HRESULT }} impl ILocalLocationRatingInfo { - #[inline] pub unsafe fn get_aggregate_rating(&self) -> Result>> { + #[inline] pub fn get_aggregate_rating(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AggregateRating)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rating_count(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_rating_count(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RatingCount)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_provider_identifier(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_provider_identifier(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProviderIdentifier)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class LocalLocationRatingInfo: ILocalLocationRatingInfo} RT_CLASS!{static class PlaceInfoHelper} impl RtActivatable for PlaceInfoHelper {} impl PlaceInfoHelper { - #[inline] pub fn create_from_local_location(location: &LocalLocation) -> Result> { unsafe { + #[inline] pub fn create_from_local_location(location: &LocalLocation) -> Result>> { >::get_activation_factory().create_from_local_location(location) - }} + } } DEFINE_CLSID!(PlaceInfoHelper(&[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,80,108,97,99,101,73,110,102,111,72,101,108,112,101,114,0]) [CLSID_PlaceInfoHelper]); DEFINE_IID!(IID_IPlaceInfoHelperStatics, 3709643175, 43462, 18715, 188, 9, 232, 15, 206, 164, 142, 230); @@ -1473,11 +1473,11 @@ RT_INTERFACE!{static interface IPlaceInfoHelperStatics(IPlaceInfoHelperStaticsVt fn CreateFromLocalLocation(&self, location: *mut LocalLocation, out: *mut *mut super::PlaceInfo) -> HRESULT }} impl IPlaceInfoHelperStatics { - #[inline] pub unsafe fn create_from_local_location(&self, location: &LocalLocation) -> Result> { + #[inline] pub fn create_from_local_location(&self, location: &LocalLocation) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromLocalLocation)(self as *const _ as *mut _, location as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } } // Windows.Services.Maps.LocalSearch pub mod guidance { // Windows.Services.Maps.Guidance @@ -1491,25 +1491,25 @@ RT_ENUM! { enum GuidanceAudioNotificationKind: i32 { 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(&self, out: *mut GuidanceAudioNotificationKind) -> HRESULT, - fn get_AudioFilePaths(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_AudioFilePaths(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_AudioText(&self, out: *mut HSTRING) -> HRESULT }} impl IGuidanceAudioNotificationRequestedEventArgs { - #[inline] pub unsafe fn get_audio_notification(&self) -> Result { + #[inline] pub fn get_audio_notification(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AudioNotification)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_file_paths(&self) -> Result>> { + }} + #[inline] pub fn get_audio_file_paths(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioFilePaths)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_text(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_audio_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AudioText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class GuidanceAudioNotificationRequestedEventArgs: IGuidanceAudioNotificationRequestedEventArgs} RT_ENUM! { enum GuidanceAudioNotifications: u32 { @@ -1521,16 +1521,16 @@ RT_INTERFACE!{interface IGuidanceLaneInfo(IGuidanceLaneInfoVtbl): IInspectable(I fn get_IsOnRoute(&self, out: *mut bool) -> HRESULT }} impl IGuidanceLaneInfo { - #[inline] pub unsafe fn get_lane_markers(&self) -> Result { + #[inline] pub fn get_lane_markers(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LaneMarkers)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_on_route(&self) -> Result { + }} + #[inline] pub fn get_is_on_route(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsOnRoute)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class GuidanceLaneInfo: IGuidanceLaneInfo} RT_ENUM! { enum GuidanceLaneMarkers: u32 { @@ -1553,66 +1553,66 @@ RT_INTERFACE!{interface IGuidanceManeuver(IGuidanceManeuverVtbl): IInspectable(I fn get_InstructionText(&self, out: *mut HSTRING) -> HRESULT }} impl IGuidanceManeuver { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_start_location(&self) -> Result> { + #[cfg(feature="windows-devices")] #[inline] pub fn get_start_location(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StartLocation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_distance_from_route_start(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_distance_from_route_start(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DistanceFromRouteStart)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_distance_from_previous_maneuver(&self) -> Result { + }} + #[inline] pub fn get_distance_from_previous_maneuver(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DistanceFromPreviousManeuver)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_departure_road_name(&self) -> Result { + }} + #[inline] pub fn get_departure_road_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DepartureRoadName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_next_road_name(&self) -> Result { + }} + #[inline] pub fn get_next_road_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NextRoadName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_departure_short_road_name(&self) -> Result { + }} + #[inline] pub fn get_departure_short_road_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DepartureShortRoadName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_next_short_road_name(&self) -> Result { + }} + #[inline] pub fn get_next_short_road_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NextShortRoadName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_kind(&self) -> Result { + }} + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_start_angle(&self) -> Result { + }} + #[inline] pub fn get_start_angle(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StartAngle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_end_angle(&self) -> Result { + }} + #[inline] pub fn get_end_angle(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EndAngle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_road_signpost(&self) -> Result> { + }} + #[inline] pub fn get_road_signpost(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RoadSignpost)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_instruction_text(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_instruction_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InstructionText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class GuidanceManeuver: IGuidanceManeuver} RT_ENUM! { enum GuidanceManeuverKind: i32 { @@ -1628,31 +1628,31 @@ RT_INTERFACE!{interface IGuidanceMapMatchedCoordinate(IGuidanceMapMatchedCoordin fn get_Road(&self, out: *mut *mut GuidanceRoadSegment) -> HRESULT }} impl IGuidanceMapMatchedCoordinate { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_location(&self) -> Result> { + #[cfg(feature="windows-devices")] #[inline] pub fn get_location(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Location)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_heading(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_current_heading(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CurrentHeading)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_speed(&self) -> Result { + }} + #[inline] pub fn get_current_speed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CurrentSpeed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_on_street(&self) -> Result { + }} + #[inline] pub fn get_is_on_street(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsOnStreet)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_road(&self) -> Result> { + }} + #[inline] pub fn get_road(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Road)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class GuidanceMapMatchedCoordinate: IGuidanceMapMatchedCoordinate} RT_ENUM! { enum GuidanceMode: i32 { @@ -1671,218 +1671,218 @@ RT_INTERFACE!{interface IGuidanceNavigator(IGuidanceNavigatorVtbl): IInspectable fn put_AudioMeasurementSystem(&self, value: GuidanceAudioMeasurementSystem) -> HRESULT, fn get_AudioNotifications(&self, out: *mut GuidanceAudioNotifications) -> HRESULT, fn put_AudioNotifications(&self, value: GuidanceAudioNotifications) -> HRESULT, - fn add_GuidanceUpdated(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_GuidanceUpdated(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_DestinationReached(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DestinationReached(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_Rerouting(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Rerouting(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_Rerouted(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Rerouted(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_RerouteFailed(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RerouteFailed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_UserLocationLost(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_UserLocationLost(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_UserLocationRestored(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_UserLocationRestored(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_GuidanceUpdated(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_GuidanceUpdated(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_DestinationReached(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DestinationReached(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Rerouting(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Rerouting(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Rerouted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Rerouted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_RerouteFailed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RerouteFailed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_UserLocationLost(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_UserLocationLost(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_UserLocationRestored(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_UserLocationRestored(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn SetGuidanceVoice(&self, voiceId: i32, voiceFolder: HSTRING) -> HRESULT, #[cfg(feature="windows-devices")] fn UpdateUserLocation(&self, userLocation: *mut ::rt::gen::windows::devices::geolocation::Geocoordinate) -> HRESULT, #[cfg(feature="windows-devices")] fn UpdateUserLocationWithPositionOverride(&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(&self, route: &GuidanceRoute) -> Result<()> { + #[inline] pub fn start_navigating(&self, route: &GuidanceRoute) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StartNavigating)(self as *const _ as *mut _, route as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start_simulating(&self, route: &GuidanceRoute, speedInMetersPerSecond: i32) -> Result<()> { + }} + #[inline] pub fn start_simulating(&self, route: &GuidanceRoute, speedInMetersPerSecond: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StartSimulating)(self as *const _ as *mut _, route as *const _ as *mut _, speedInMetersPerSecond); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start_tracking(&self) -> Result<()> { + }} + #[inline] pub fn start_tracking(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StartTracking)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn pause(&self) -> Result<()> { + }} + #[inline] pub fn pause(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Pause)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn resume(&self) -> Result<()> { + }} + #[inline] pub fn resume(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Resume)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn repeat_last_audio_notification(&self) -> Result<()> { + }} + #[inline] pub fn repeat_last_audio_notification(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RepeatLastAudioNotification)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_measurement_system(&self) -> Result { + }} + #[inline] pub fn get_audio_measurement_system(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AudioMeasurementSystem)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_audio_measurement_system(&self, value: GuidanceAudioMeasurementSystem) -> Result<()> { + }} + #[inline] pub fn set_audio_measurement_system(&self, value: GuidanceAudioMeasurementSystem) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AudioMeasurementSystem)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio_notifications(&self) -> Result { + }} + #[inline] pub fn get_audio_notifications(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AudioNotifications)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_audio_notifications(&self, value: GuidanceAudioNotifications) -> Result<()> { + }} + #[inline] pub fn set_audio_notifications(&self, value: GuidanceAudioNotifications) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AudioNotifications)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_guidance_updated(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_guidance_updated(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_GuidanceUpdated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_guidance_updated(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_guidance_updated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_GuidanceUpdated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_destination_reached(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_destination_reached(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DestinationReached)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_destination_reached(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_destination_reached(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DestinationReached)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_rerouting(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_rerouting(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Rerouting)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_rerouting(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_rerouting(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Rerouting)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_rerouted(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_rerouted(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Rerouted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_rerouted(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_rerouted(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Rerouted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_reroute_failed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_reroute_failed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RerouteFailed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_reroute_failed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_reroute_failed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RerouteFailed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_user_location_lost(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_user_location_lost(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_UserLocationLost)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_user_location_lost(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_user_location_lost(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_UserLocationLost)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_user_location_restored(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_user_location_restored(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_UserLocationRestored)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_user_location_restored(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_user_location_restored(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_UserLocationRestored)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_guidance_voice(&self, voiceId: i32, voiceFolder: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_guidance_voice(&self, voiceId: i32, voiceFolder: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetGuidanceVoice)(self as *const _ as *mut _, voiceId, voiceFolder.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn update_user_location(&self, userLocation: &::rt::gen::windows::devices::geolocation::Geocoordinate) -> Result<()> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn update_user_location(&self, userLocation: &::rt::gen::windows::devices::geolocation::Geocoordinate) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).UpdateUserLocation)(self as *const _ as *mut _, 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(&self, userLocation: &::rt::gen::windows::devices::geolocation::Geocoordinate, positionOverride: ::rt::gen::windows::devices::geolocation::BasicGeoposition) -> Result<()> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn update_user_location_with_position_override(&self, userLocation: &::rt::gen::windows::devices::geolocation::Geocoordinate, positionOverride: ::rt::gen::windows::devices::geolocation::BasicGeoposition) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).UpdateUserLocationWithPositionOverride)(self as *const _ as *mut _, userLocation as *const _ as *mut _, positionOverride); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class GuidanceNavigator: IGuidanceNavigator} impl RtActivatable for GuidanceNavigator {} impl RtActivatable for GuidanceNavigator {} impl GuidanceNavigator { - #[inline] pub fn get_current() -> Result> { unsafe { + #[inline] pub fn get_current() -> Result>> { >::get_activation_factory().get_current() - }} - #[inline] pub fn get_use_app_provided_voice() -> Result { unsafe { + } + #[inline] pub fn get_use_app_provided_voice() -> Result { >::get_activation_factory().get_use_app_provided_voice() - }} + } } DEFINE_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]) [CLSID_GuidanceNavigator]); 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(&self, value: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AudioNotificationRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_AudioNotificationRequested(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AudioNotificationRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_IsGuidanceAudioMuted(&self, out: *mut bool) -> HRESULT, fn put_IsGuidanceAudioMuted(&self, value: bool) -> HRESULT }} impl IGuidanceNavigator2 { - #[inline] pub unsafe fn add_audio_notification_requested(&self, value: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub fn add_audio_notification_requested(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AudioNotificationRequested)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_audio_notification_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_audio_notification_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AudioNotificationRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_guidance_audio_muted(&self) -> Result { + }} + #[inline] pub fn get_is_guidance_audio_muted(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsGuidanceAudioMuted)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_guidance_audio_muted(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_guidance_audio_muted(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsGuidanceAudioMuted)(self as *const _ as *mut _, 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(&self, out: *mut *mut GuidanceNavigator) -> HRESULT }} impl IGuidanceNavigatorStatics { - #[inline] pub unsafe fn get_current(&self) -> Result> { + #[inline] pub fn get_current(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut bool) -> HRESULT }} impl IGuidanceNavigatorStatics2 { - #[inline] pub unsafe fn get_use_app_provided_voice(&self) -> Result { + #[inline] pub fn get_use_app_provided_voice(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UseAppProvidedVoice)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut GuidanceRoute) -> HRESULT }} impl IGuidanceReroutedEventArgs { - #[inline] pub unsafe fn get_route(&self) -> Result> { + #[inline] pub fn get_route(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Route)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class GuidanceReroutedEventArgs: IGuidanceReroutedEventArgs} DEFINE_IID!(IID_IGuidanceRoadSegment, 3005700262, 48760, 19555, 175, 231, 108, 41, 87, 71, 155, 62); @@ -1890,7 +1890,7 @@ RT_INTERFACE!{interface IGuidanceRoadSegment(IGuidanceRoadSegmentVtbl): IInspect fn get_RoadName(&self, out: *mut HSTRING) -> HRESULT, fn get_ShortRoadName(&self, out: *mut HSTRING) -> HRESULT, fn get_SpeedLimit(&self, out: *mut f64) -> HRESULT, - fn get_TravelTime(&self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_TravelTime(&self, out: *mut foundation::TimeSpan) -> HRESULT, #[cfg(not(feature="windows-devices"))] fn __Dummy4(&self) -> (), #[cfg(feature="windows-devices")] fn get_Path(&self, out: *mut *mut ::rt::gen::windows::devices::geolocation::Geopath) -> HRESULT, fn get_Id(&self, out: *mut HSTRING) -> HRESULT, @@ -1899,51 +1899,51 @@ RT_INTERFACE!{interface IGuidanceRoadSegment(IGuidanceRoadSegmentVtbl): IInspect fn get_IsTollRoad(&self, out: *mut bool) -> HRESULT }} impl IGuidanceRoadSegment { - #[inline] pub unsafe fn get_road_name(&self) -> Result { + #[inline] pub fn get_road_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RoadName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_short_road_name(&self) -> Result { + }} + #[inline] pub fn get_short_road_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ShortRoadName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_speed_limit(&self) -> Result { + }} + #[inline] pub fn get_speed_limit(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SpeedLimit)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_travel_time(&self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + }} + #[inline] pub fn get_travel_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TravelTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_path(&self) -> Result> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_path(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Path)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_highway(&self) -> Result { + }} + #[inline] pub fn get_is_highway(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsHighway)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_tunnel(&self) -> Result { + }} + #[inline] pub fn get_is_tunnel(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsTunnel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_toll_road(&self) -> Result { + }} + #[inline] pub fn get_is_toll_road(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsTollRoad)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class GuidanceRoadSegment: IGuidanceRoadSegment} DEFINE_IID!(IID_IGuidanceRoadSegment2, 611624477, 5923, 18929, 137, 91, 71, 162, 196, 170, 156, 85); @@ -1951,11 +1951,11 @@ RT_INTERFACE!{interface IGuidanceRoadSegment2(IGuidanceRoadSegment2Vtbl): IInspe fn get_IsScenic(&self, out: *mut bool) -> HRESULT }} impl IGuidanceRoadSegment2 { - #[inline] pub unsafe fn get_is_scenic(&self) -> Result { + #[inline] pub fn get_is_scenic(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsScenic)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IGuidanceRoadSignpost, 4054263990, 63354, 18242, 131, 18, 83, 48, 15, 152, 69, 240); RT_INTERFACE!{interface IGuidanceRoadSignpost(IGuidanceRoadSignpostVtbl): IInspectable(IInspectableVtbl) [IID_IGuidanceRoadSignpost] { @@ -1965,94 +1965,94 @@ RT_INTERFACE!{interface IGuidanceRoadSignpost(IGuidanceRoadSignpostVtbl): IInspe #[cfg(feature="windows-ui")] fn get_BackgroundColor(&self, out: *mut ::rt::gen::windows::ui::Color) -> HRESULT, #[cfg(not(feature="windows-ui"))] fn __Dummy3(&self) -> (), #[cfg(feature="windows-ui")] fn get_ForegroundColor(&self, out: *mut ::rt::gen::windows::ui::Color) -> HRESULT, - fn get_ExitDirections(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn get_ExitDirections(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IGuidanceRoadSignpost { - #[inline] pub unsafe fn get_exit_number(&self) -> Result { + #[inline] pub fn get_exit_number(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExitNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_exit(&self) -> Result { + }} + #[inline] pub fn get_exit(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Exit)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_background_color(&self) -> Result<::rt::gen::windows::ui::Color> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_background_color(&self) -> Result<::rt::gen::windows::ui::Color> { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BackgroundColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_foreground_color(&self) -> Result<::rt::gen::windows::ui::Color> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_foreground_color(&self) -> Result<::rt::gen::windows::ui::Color> { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ForegroundColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_exit_directions(&self) -> Result>> { + }} + #[inline] pub fn get_exit_directions(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExitDirections)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class GuidanceRoadSignpost: IGuidanceRoadSignpost} 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(&self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_Duration(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn get_Distance(&self, out: *mut i32) -> HRESULT, - fn get_Maneuvers(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_Maneuvers(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, #[cfg(not(feature="windows-devices"))] fn __Dummy3(&self) -> (), #[cfg(feature="windows-devices")] fn get_BoundingBox(&self, out: *mut *mut ::rt::gen::windows::devices::geolocation::GeoboundingBox) -> HRESULT, #[cfg(not(feature="windows-devices"))] fn __Dummy4(&self) -> (), #[cfg(feature="windows-devices")] fn get_Path(&self, out: *mut *mut ::rt::gen::windows::devices::geolocation::Geopath) -> HRESULT, - fn get_RoadSegments(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_RoadSegments(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn ConvertToMapRoute(&self, out: *mut *mut super::MapRoute) -> HRESULT }} impl IGuidanceRoute { - #[inline] pub unsafe fn get_duration(&self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + #[inline] pub fn get_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Duration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_distance(&self) -> Result { + }} + #[inline] pub fn get_distance(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Distance)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_maneuvers(&self) -> Result>> { + }} + #[inline] pub fn get_maneuvers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Maneuvers)(self 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_bounding_box(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_bounding_box(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BoundingBox)(self 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_path(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_path(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Path)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_road_segments(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_road_segments(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RoadSegments)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn convert_to_map_route(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn convert_to_map_route(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ConvertToMapRoute)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class GuidanceRoute: IGuidanceRoute} impl RtActivatable for GuidanceRoute {} impl GuidanceRoute { - #[inline] pub fn can_create_from_map_route(mapRoute: &super::MapRoute) -> Result { unsafe { + #[inline] pub fn can_create_from_map_route(mapRoute: &super::MapRoute) -> Result { >::get_activation_factory().can_create_from_map_route(mapRoute) - }} - #[inline] pub fn try_create_from_map_route(mapRoute: &super::MapRoute) -> Result> { unsafe { + } + #[inline] pub fn try_create_from_map_route(mapRoute: &super::MapRoute) -> Result>> { >::get_activation_factory().try_create_from_map_route(mapRoute) - }} + } } DEFINE_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]) [CLSID_GuidanceRoute]); DEFINE_IID!(IID_IGuidanceRouteStatics, 4117598826, 21997, 18881, 176, 156, 75, 130, 35, 181, 13, 179); @@ -2061,16 +2061,16 @@ RT_INTERFACE!{static interface IGuidanceRouteStatics(IGuidanceRouteStaticsVtbl): fn TryCreateFromMapRoute(&self, mapRoute: *mut super::MapRoute, out: *mut *mut GuidanceRoute) -> HRESULT }} impl IGuidanceRouteStatics { - #[inline] pub unsafe fn can_create_from_map_route(&self, mapRoute: &super::MapRoute) -> Result { + #[inline] pub fn can_create_from_map_route(&self, mapRoute: &super::MapRoute) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).CanCreateFromMapRoute)(self as *const _ as *mut _, 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(&self, mapRoute: &super::MapRoute) -> Result> { + }} + #[inline] pub fn try_create_from_map_route(&self, mapRoute: &super::MapRoute) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryCreateFromMapRoute)(self as *const _ as *mut _, mapRoute as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IGuidanceTelemetryCollector, 3676278181, 47224, 19858, 152, 221, 52, 125, 35, 211, 130, 98); RT_INTERFACE!{interface IGuidanceTelemetryCollector(IGuidanceTelemetryCollectorVtbl): IInspectable(IInspectableVtbl) [IID_IGuidanceTelemetryCollector] { @@ -2083,44 +2083,44 @@ RT_INTERFACE!{interface IGuidanceTelemetryCollector(IGuidanceTelemetryCollectorV fn put_UploadFrequency(&self, value: i32) -> HRESULT }} impl IGuidanceTelemetryCollector { - #[inline] pub unsafe fn get_enabled(&self) -> Result { + #[inline] pub fn get_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Enabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Enabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn clear_local_data(&self) -> Result<()> { + }} + #[inline] pub fn clear_local_data(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ClearLocalData)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_speed_trigger(&self) -> Result { + }} + #[inline] pub fn get_speed_trigger(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SpeedTrigger)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_speed_trigger(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_speed_trigger(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SpeedTrigger)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_upload_frequency(&self) -> Result { + }} + #[inline] pub fn get_upload_frequency(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UploadFrequency)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_upload_frequency(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_upload_frequency(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_UploadFrequency)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class GuidanceTelemetryCollector: IGuidanceTelemetryCollector} impl RtActivatable for GuidanceTelemetryCollector {} impl GuidanceTelemetryCollector { - #[inline] pub fn get_current() -> Result> { unsafe { + #[inline] pub fn get_current() -> Result>> { >::get_activation_factory().get_current() - }} + } } DEFINE_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]) [CLSID_GuidanceTelemetryCollector]); DEFINE_IID!(IID_IGuidanceTelemetryCollectorStatics, 911417415, 61792, 17659, 181, 120, 148, 87, 124, 160, 89, 144); @@ -2128,11 +2128,11 @@ RT_INTERFACE!{static interface IGuidanceTelemetryCollectorStatics(IGuidanceTelem fn GetCurrent(&self, out: *mut *mut GuidanceTelemetryCollector) -> HRESULT }} impl IGuidanceTelemetryCollectorStatics { - #[inline] pub unsafe fn get_current(&self) -> Result> { + #[inline] pub fn get_current(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IGuidanceUpdatedEventArgs, 4255913483, 40589, 19939, 169, 250, 176, 99, 33, 209, 141, 185); RT_INTERFACE!{interface IGuidanceUpdatedEventArgs(IGuidanceUpdatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IGuidanceUpdatedEventArgs] { @@ -2143,85 +2143,85 @@ RT_INTERFACE!{interface IGuidanceUpdatedEventArgs(IGuidanceUpdatedEventArgsVtbl) fn get_AfterNextManeuverDistance(&self, out: *mut i32) -> HRESULT, fn get_DistanceToDestination(&self, out: *mut i32) -> HRESULT, fn get_ElapsedDistance(&self, out: *mut i32) -> HRESULT, - fn get_ElapsedTime(&self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn get_TimeToDestination(&self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_ElapsedTime(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_TimeToDestination(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn get_RoadName(&self, out: *mut HSTRING) -> HRESULT, fn get_Route(&self, out: *mut *mut GuidanceRoute) -> HRESULT, fn get_CurrentLocation(&self, out: *mut *mut GuidanceMapMatchedCoordinate) -> HRESULT, fn get_IsNewManeuver(&self, out: *mut bool) -> HRESULT, - fn get_LaneInfo(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn get_LaneInfo(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IGuidanceUpdatedEventArgs { - #[inline] pub unsafe fn get_mode(&self) -> Result { + #[inline] pub fn get_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Mode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_next_maneuver(&self) -> Result> { + }} + #[inline] pub fn get_next_maneuver(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NextManeuver)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_next_maneuver_distance(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_next_maneuver_distance(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NextManeuverDistance)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_after_next_maneuver(&self) -> Result> { + }} + #[inline] pub fn get_after_next_maneuver(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AfterNextManeuver)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_after_next_maneuver_distance(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_after_next_maneuver_distance(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AfterNextManeuverDistance)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_distance_to_destination(&self) -> Result { + }} + #[inline] pub fn get_distance_to_destination(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DistanceToDestination)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_elapsed_distance(&self) -> Result { + }} + #[inline] pub fn get_elapsed_distance(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ElapsedDistance)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_elapsed_time(&self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + }} + #[inline] pub fn get_elapsed_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ElapsedTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_time_to_destination(&self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + }} + #[inline] pub fn get_time_to_destination(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TimeToDestination)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_road_name(&self) -> Result { + }} + #[inline] pub fn get_road_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RoadName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_route(&self) -> Result> { + }} + #[inline] pub fn get_route(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Route)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_location(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_current_location(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CurrentLocation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_new_maneuver(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_new_maneuver(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsNewManeuver)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_lane_info(&self) -> Result>> { + }} + #[inline] pub fn get_lane_info(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LaneInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class GuidanceUpdatedEventArgs: IGuidanceUpdatedEventArgs} } // Windows.Services.Maps.Guidance @@ -2231,19 +2231,19 @@ use ::prelude::*; 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(&self, out: *mut *mut StorePackageLicense) -> HRESULT, - fn get_ExtendedError(&self, out: *mut super::super::foundation::HResult) -> HRESULT + fn get_ExtendedError(&self, out: *mut foundation::HResult) -> HRESULT }} impl IStoreAcquireLicenseResult { - #[inline] pub unsafe fn get_store_package_license(&self) -> Result> { + #[inline] pub fn get_store_package_license(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StorePackageLicense)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_error(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_extended_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class StoreAcquireLicenseResult: IStoreAcquireLicenseResult} DEFINE_IID!(IID_IStoreAppLicense, 4085905886, 29632, 17870, 155, 171, 178, 254, 62, 94, 175, 211); @@ -2251,101 +2251,101 @@ RT_INTERFACE!{interface IStoreAppLicense(IStoreAppLicenseVtbl): IInspectable(IIn fn get_SkuStoreId(&self, out: *mut HSTRING) -> HRESULT, fn get_IsActive(&self, out: *mut bool) -> HRESULT, fn get_IsTrial(&self, out: *mut bool) -> HRESULT, - fn get_ExpirationDate(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_ExpirationDate(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_ExtendedJsonData(&self, out: *mut HSTRING) -> HRESULT, - fn get_AddOnLicenses(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, - fn get_TrialTimeRemaining(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_AddOnLicenses(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT, + fn get_TrialTimeRemaining(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn get_IsTrialOwnedByThisUser(&self, out: *mut bool) -> HRESULT, fn get_TrialUniqueId(&self, out: *mut HSTRING) -> HRESULT }} impl IStoreAppLicense { - #[inline] pub unsafe fn get_sku_store_id(&self) -> Result { + #[inline] pub fn get_sku_store_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SkuStoreId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_active(&self) -> Result { + }} + #[inline] pub fn get_is_active(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsActive)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_trial(&self) -> Result { + }} + #[inline] pub fn get_is_trial(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsTrial)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_expiration_date(&self) -> Result { + }} + #[inline] pub fn get_expiration_date(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExpirationDate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_json_data(&self) -> Result { + }} + #[inline] pub fn get_extended_json_data(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExtendedJsonData)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_add_on_licenses(&self) -> Result>> { + }} + #[inline] pub fn get_add_on_licenses(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AddOnLicenses)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_trial_time_remaining(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_trial_time_remaining(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TrialTimeRemaining)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_trial_owned_by_this_user(&self) -> Result { + }} + #[inline] pub fn get_is_trial_owned_by_this_user(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsTrialOwnedByThisUser)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_trial_unique_id(&self) -> Result { + }} + #[inline] pub fn get_trial_unique_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TrialUniqueId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class StoreAppLicense: IStoreAppLicense} 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(&self, out: *mut HSTRING) -> HRESULT, - fn get_EndDate(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_EndDate(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_Price(&self, out: *mut *mut StorePrice) -> HRESULT, fn get_ExtendedJsonData(&self, out: *mut HSTRING) -> HRESULT, - fn RequestPurchaseAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestPurchaseWithPurchasePropertiesAsync(&self, storePurchaseProperties: *mut StorePurchaseProperties, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn RequestPurchaseAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestPurchaseWithPurchasePropertiesAsync(&self, storePurchaseProperties: *mut StorePurchaseProperties, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IStoreAvailability { - #[inline] pub unsafe fn get_store_id(&self) -> Result { + #[inline] pub fn get_store_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StoreId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_end_date(&self) -> Result { + }} + #[inline] pub fn get_end_date(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EndDate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_price(&self) -> Result> { + }} + #[inline] pub fn get_price(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Price)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_json_data(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_extended_json_data(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExtendedJsonData)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_purchase_async(&self) -> Result>> { + }} + #[inline] pub fn request_purchase_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestPurchaseAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_purchase_with_purchase_properties_async(&self, storePurchaseProperties: &StorePurchaseProperties) -> Result>> { + }} + #[inline] pub fn request_purchase_with_purchase_properties_async(&self, storePurchaseProperties: &StorePurchaseProperties) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestPurchaseWithPurchasePropertiesAsync)(self as *const _ as *mut _, storePurchaseProperties as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class StoreAvailability: IStoreAvailability} DEFINE_IID!(IID_IStoreCollectionData, 2326053811, 23475, 17434, 42, 180, 77, 171, 115, 213, 206, 103); @@ -2353,53 +2353,53 @@ RT_INTERFACE!{interface IStoreCollectionData(IStoreCollectionDataVtbl): IInspect fn get_IsTrial(&self, out: *mut bool) -> HRESULT, fn get_CampaignId(&self, out: *mut HSTRING) -> HRESULT, fn get_DeveloperOfferId(&self, out: *mut HSTRING) -> HRESULT, - fn get_AcquiredDate(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_StartDate(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_EndDate(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_TrialTimeRemaining(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_AcquiredDate(&self, out: *mut foundation::DateTime) -> HRESULT, + fn get_StartDate(&self, out: *mut foundation::DateTime) -> HRESULT, + fn get_EndDate(&self, out: *mut foundation::DateTime) -> HRESULT, + fn get_TrialTimeRemaining(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn get_ExtendedJsonData(&self, out: *mut HSTRING) -> HRESULT }} impl IStoreCollectionData { - #[inline] pub unsafe fn get_is_trial(&self) -> Result { + #[inline] pub fn get_is_trial(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsTrial)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_campaign_id(&self) -> Result { + }} + #[inline] pub fn get_campaign_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CampaignId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_developer_offer_id(&self) -> Result { + }} + #[inline] pub fn get_developer_offer_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeveloperOfferId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_acquired_date(&self) -> Result { + }} + #[inline] pub fn get_acquired_date(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AcquiredDate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_start_date(&self) -> Result { + }} + #[inline] pub fn get_start_date(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StartDate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_end_date(&self) -> Result { + }} + #[inline] pub fn get_end_date(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EndDate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_trial_time_remaining(&self) -> Result { + }} + #[inline] pub fn get_trial_time_remaining(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TrialTimeRemaining)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_json_data(&self) -> Result { + }} + #[inline] pub fn get_extended_json_data(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExtendedJsonData)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class StoreCollectionData: IStoreCollectionData} DEFINE_IID!(IID_IStoreConsumableResult, 3932007282, 27136, 16466, 190, 91, 191, 218, 180, 67, 51, 82); @@ -2407,29 +2407,29 @@ RT_INTERFACE!{interface IStoreConsumableResult(IStoreConsumableResultVtbl): IIns fn get_Status(&self, out: *mut StoreConsumableStatus) -> HRESULT, fn get_TrackingId(&self, out: *mut Guid) -> HRESULT, fn get_BalanceRemaining(&self, out: *mut u32) -> HRESULT, - fn get_ExtendedError(&self, out: *mut super::super::foundation::HResult) -> HRESULT + fn get_ExtendedError(&self, out: *mut foundation::HResult) -> HRESULT }} impl IStoreConsumableResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_tracking_id(&self) -> Result { + }} + #[inline] pub fn get_tracking_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TrackingId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_balance_remaining(&self) -> Result { + }} + #[inline] pub fn get_balance_remaining(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BalanceRemaining)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_error(&self) -> Result { + }} + #[inline] pub fn get_extended_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class StoreConsumableResult: IStoreConsumableResult} RT_ENUM! { enum StoreConsumableStatus: i32 { @@ -2439,155 +2439,155 @@ DEFINE_IID!(IID_IStoreContext, 2895689406, 62717, 18706, 186, 189, 80, 53, 229, RT_INTERFACE!{interface IStoreContext(IStoreContextVtbl): IInspectable(IInspectableVtbl) [IID_IStoreContext] { #[cfg(not(feature="windows-system"))] fn __Dummy0(&self) -> (), #[cfg(feature="windows-system")] fn get_User(&self, out: *mut *mut super::super::system::User) -> HRESULT, - fn add_OfflineLicensesChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_OfflineLicensesChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn GetCustomerPurchaseIdAsync(&self, serviceTicket: HSTRING, publisherUserId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetCustomerCollectionsIdAsync(&self, serviceTicket: HSTRING, publisherUserId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetAppLicenseAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetStoreProductForCurrentAppAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetStoreProductsAsync(&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(&self, productKinds: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetAssociatedStoreProductsWithPagingAsync(&self, productKinds: *mut super::super::foundation::collections::IIterable, maxItemsToRetrievePerPage: u32, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetUserCollectionAsync(&self, productKinds: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetUserCollectionWithPagingAsync(&self, productKinds: *mut super::super::foundation::collections::IIterable, maxItemsToRetrievePerPage: u32, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn ReportConsumableFulfillmentAsync(&self, productStoreId: HSTRING, quantity: u32, trackingId: Guid, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetConsumableBalanceRemainingAsync(&self, productStoreId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_OfflineLicensesChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_OfflineLicensesChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn GetCustomerPurchaseIdAsync(&self, serviceTicket: HSTRING, publisherUserId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetCustomerCollectionsIdAsync(&self, serviceTicket: HSTRING, publisherUserId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetAppLicenseAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetStoreProductForCurrentAppAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetStoreProductsAsync(&self, productKinds: *mut foundation::collections::IIterable, storeIds: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetAssociatedStoreProductsAsync(&self, productKinds: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetAssociatedStoreProductsWithPagingAsync(&self, productKinds: *mut foundation::collections::IIterable, maxItemsToRetrievePerPage: u32, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetUserCollectionAsync(&self, productKinds: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetUserCollectionWithPagingAsync(&self, productKinds: *mut foundation::collections::IIterable, maxItemsToRetrievePerPage: u32, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ReportConsumableFulfillmentAsync(&self, productStoreId: HSTRING, quantity: u32, trackingId: Guid, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetConsumableBalanceRemainingAsync(&self, productStoreId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-applicationmodel"))] fn __Dummy14(&self) -> (), - #[cfg(feature="windows-applicationmodel")] fn AcquireStoreLicenseForOptionalPackageAsync(&self, optionalPackage: *mut super::super::applicationmodel::Package, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestPurchaseAsync(&self, storeId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestPurchaseWithPurchasePropertiesAsync(&self, storeId: HSTRING, storePurchaseProperties: *mut StorePurchaseProperties, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetAppAndOptionalStorePackageUpdatesAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn RequestDownloadStorePackageUpdatesAsync(&self, storePackageUpdates: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, - fn RequestDownloadAndInstallStorePackageUpdatesAsync(&self, storePackageUpdates: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, - fn RequestDownloadAndInstallStorePackagesAsync(&self, storeIds: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT + #[cfg(feature="windows-applicationmodel")] fn AcquireStoreLicenseForOptionalPackageAsync(&self, optionalPackage: *mut super::super::applicationmodel::Package, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestPurchaseAsync(&self, storeId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestPurchaseWithPurchasePropertiesAsync(&self, storeId: HSTRING, storePurchaseProperties: *mut StorePurchaseProperties, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetAppAndOptionalStorePackageUpdatesAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn RequestDownloadStorePackageUpdatesAsync(&self, storePackageUpdates: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + fn RequestDownloadAndInstallStorePackageUpdatesAsync(&self, storePackageUpdates: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + fn RequestDownloadAndInstallStorePackagesAsync(&self, storeIds: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT }} impl IStoreContext { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_user(&self) -> Result> { + #[cfg(feature="windows-system")] #[inline] pub fn get_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_User)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_offline_licenses_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_offline_licenses_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_OfflineLicensesChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_offline_licenses_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_offline_licenses_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_OfflineLicensesChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_customer_purchase_id_async(&self, serviceTicket: &HStringArg, publisherUserId: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_customer_purchase_id_async(&self, serviceTicket: &HStringArg, publisherUserId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCustomerPurchaseIdAsync)(self as *const _ as *mut _, 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(&self, serviceTicket: &HStringArg, publisherUserId: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_customer_collections_id_async(&self, serviceTicket: &HStringArg, publisherUserId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCustomerCollectionsIdAsync)(self as *const _ as *mut _, 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(&self) -> Result>> { + }} + #[inline] pub fn get_app_license_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAppLicenseAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_store_product_for_current_app_async(&self) -> Result>> { + }} + #[inline] pub fn get_store_product_for_current_app_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetStoreProductForCurrentAppAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_store_products_async(&self, productKinds: &super::super::foundation::collections::IIterable, storeIds: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn get_store_products_async(&self, productKinds: &foundation::collections::IIterable, storeIds: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetStoreProductsAsync)(self as *const _ as *mut _, 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(&self, productKinds: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn get_associated_store_products_async(&self, productKinds: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAssociatedStoreProductsAsync)(self as *const _ as *mut _, 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(&self, productKinds: &super::super::foundation::collections::IIterable, maxItemsToRetrievePerPage: u32) -> Result>> { + }} + #[inline] pub fn get_associated_store_products_with_paging_async(&self, productKinds: &foundation::collections::IIterable, maxItemsToRetrievePerPage: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAssociatedStoreProductsWithPagingAsync)(self as *const _ as *mut _, 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(&self, productKinds: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn get_user_collection_async(&self, productKinds: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetUserCollectionAsync)(self as *const _ as *mut _, 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(&self, productKinds: &super::super::foundation::collections::IIterable, maxItemsToRetrievePerPage: u32) -> Result>> { + }} + #[inline] pub fn get_user_collection_with_paging_async(&self, productKinds: &foundation::collections::IIterable, maxItemsToRetrievePerPage: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetUserCollectionWithPagingAsync)(self as *const _ as *mut _, 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(&self, productStoreId: &HStringArg, quantity: u32, trackingId: Guid) -> Result>> { + }} + #[inline] pub fn report_consumable_fulfillment_async(&self, productStoreId: &HStringArg, quantity: u32, trackingId: Guid) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReportConsumableFulfillmentAsync)(self as *const _ as *mut _, 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(&self, productStoreId: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_consumable_balance_remaining_async(&self, productStoreId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetConsumableBalanceRemainingAsync)(self as *const _ as *mut _, 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(&self, optionalPackage: &super::super::applicationmodel::Package) -> Result>> { + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn acquire_store_license_for_optional_package_async(&self, optionalPackage: &super::super::applicationmodel::Package) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AcquireStoreLicenseForOptionalPackageAsync)(self as *const _ as *mut _, 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(&self, storeId: &HStringArg) -> Result>> { + }} + #[inline] pub fn request_purchase_async(&self, storeId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestPurchaseAsync)(self as *const _ as *mut _, 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(&self, storeId: &HStringArg, storePurchaseProperties: &StorePurchaseProperties) -> Result>> { + }} + #[inline] pub fn request_purchase_with_purchase_properties_async(&self, storeId: &HStringArg, storePurchaseProperties: &StorePurchaseProperties) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestPurchaseWithPurchasePropertiesAsync)(self as *const _ as *mut _, 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(&self) -> Result>>> { + }} + #[inline] pub fn get_app_and_optional_store_package_updates_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAppAndOptionalStorePackageUpdatesAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_download_store_package_updates_async(&self, storePackageUpdates: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn request_download_store_package_updates_async(&self, storePackageUpdates: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestDownloadStorePackageUpdatesAsync)(self as *const _ as *mut _, 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(&self, storePackageUpdates: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn request_download_and_install_store_package_updates_async(&self, storePackageUpdates: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestDownloadAndInstallStorePackageUpdatesAsync)(self as *const _ as *mut _, 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(&self, storeIds: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn request_download_and_install_store_packages_async(&self, storeIds: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestDownloadAndInstallStorePackagesAsync)(self as *const _ as *mut _, storeIds as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class StoreContext: IStoreContext} impl RtActivatable for StoreContext {} impl StoreContext { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} - #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::super::system::User) -> Result> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::super::system::User) -> Result>> { >::get_activation_factory().get_for_user(user) - }} + } } DEFINE_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]) [CLSID_StoreContext]); DEFINE_IID!(IID_IStoreContext2, 414995674, 31705, 17708, 145, 22, 59, 189, 6, 255, 198, 58); RT_INTERFACE!{interface IStoreContext2(IStoreContext2Vtbl): IInspectable(IInspectableVtbl) [IID_IStoreContext2] { - #[cfg(feature="windows-applicationmodel")] fn FindStoreProductForPackageAsync(&self, productKinds: *mut super::super::foundation::collections::IIterable, package: *mut super::super::applicationmodel::Package, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-applicationmodel")] fn FindStoreProductForPackageAsync(&self, productKinds: *mut foundation::collections::IIterable, package: *mut super::super::applicationmodel::Package, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IStoreContext2 { - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn find_store_product_for_package_async(&self, productKinds: &super::super::foundation::collections::IIterable, package: &super::super::applicationmodel::Package) -> Result>> { + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_store_product_for_package_async(&self, productKinds: &foundation::collections::IIterable, package: &super::super::applicationmodel::Package) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindStoreProductForPackageAsync)(self as *const _ as *mut _, productKinds as *const _ as *mut _, package as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(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] { @@ -2595,125 +2595,125 @@ RT_INTERFACE!{static interface IStoreContextStatics(IStoreContextStaticsVtbl): I #[cfg(feature="windows-system")] fn GetForUser(&self, user: *mut super::super::system::User, out: *mut *mut StoreContext) -> HRESULT }} impl IStoreContextStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self 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 get_for_user(&self, user: &super::super::system::User) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(&self, user: &super::super::system::User) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForUser)(self as *const _ as *mut _, user as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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, }} 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(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn get_Uri(&self, out: *mut *mut foundation::Uri) -> HRESULT, fn get_ImagePurposeTag(&self, out: *mut HSTRING) -> HRESULT, fn get_Width(&self, out: *mut u32) -> HRESULT, fn get_Height(&self, out: *mut u32) -> HRESULT, fn get_Caption(&self, out: *mut HSTRING) -> HRESULT }} impl IStoreImage { - #[inline] pub unsafe fn get_uri(&self) -> Result> { + #[inline] pub fn get_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Uri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_image_purpose_tag(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_image_purpose_tag(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ImagePurposeTag)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_width(&self) -> Result { + }} + #[inline] pub fn get_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Width)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_height(&self) -> Result { + }} + #[inline] pub fn get_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Height)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_caption(&self) -> Result { + }} + #[inline] pub fn get_caption(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Caption)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class StoreImage: IStoreImage} 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(&self, out: *mut HSTRING) -> HRESULT, fn get_IsActive(&self, out: *mut bool) -> HRESULT, - fn get_ExpirationDate(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_ExpirationDate(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_ExtendedJsonData(&self, out: *mut HSTRING) -> HRESULT, fn get_InAppOfferToken(&self, out: *mut HSTRING) -> HRESULT }} impl IStoreLicense { - #[inline] pub unsafe fn get_sku_store_id(&self) -> Result { + #[inline] pub fn get_sku_store_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SkuStoreId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_active(&self) -> Result { + }} + #[inline] pub fn get_is_active(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsActive)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_expiration_date(&self) -> Result { + }} + #[inline] pub fn get_expiration_date(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExpirationDate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_json_data(&self) -> Result { + }} + #[inline] pub fn get_extended_json_data(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExtendedJsonData)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_in_app_offer_token(&self) -> Result { + }} + #[inline] pub fn get_in_app_offer_token(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InAppOfferToken)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class StoreLicense: IStoreLicense} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_LicenseLost(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_LicenseLost(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_LicenseLost(&self, token: foundation::EventRegistrationToken) -> HRESULT, #[cfg(not(feature="windows-applicationmodel"))] fn __Dummy2(&self) -> (), #[cfg(feature="windows-applicationmodel")] fn get_Package(&self, out: *mut *mut super::super::applicationmodel::Package) -> HRESULT, fn get_IsValid(&self, out: *mut bool) -> HRESULT, fn ReleaseLicense(&self) -> HRESULT }} impl IStorePackageLicense { - #[inline] pub unsafe fn add_license_lost(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_license_lost(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_LicenseLost)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_license_lost(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_license_lost(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_LicenseLost)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn get_package(&self) -> Result> { + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn get_package(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Package)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_valid(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_valid(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsValid)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn release_license(&self) -> Result<()> { + }} + #[inline] pub fn release_license(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReleaseLicense)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class StorePackageLicense: IStorePackageLicense} DEFINE_IID!(IID_IStorePackageUpdate, 336568656, 15551, 18997, 185, 31, 72, 39, 28, 49, 176, 114); @@ -2723,34 +2723,34 @@ RT_INTERFACE!{interface IStorePackageUpdate(IStorePackageUpdateVtbl): IInspectab fn get_Mandatory(&self, out: *mut bool) -> HRESULT }} impl IStorePackageUpdate { - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn get_package(&self) -> Result> { + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn get_package(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Package)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_mandatory(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_mandatory(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Mandatory)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class StorePackageUpdate: IStorePackageUpdate} 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(&self, out: *mut StorePackageUpdateState) -> HRESULT, - fn get_StorePackageUpdateStatuses(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_StorePackageUpdateStatuses(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IStorePackageUpdateResult { - #[inline] pub unsafe fn get_overall_state(&self) -> Result { + #[inline] pub fn get_overall_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OverallState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_store_package_update_statuses(&self) -> Result>> { + }} + #[inline] pub fn get_store_package_update_statuses(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StorePackageUpdateStatuses)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class StorePackageUpdateResult: IStorePackageUpdateResult} RT_ENUM! { enum StorePackageUpdateState: i32 { @@ -2764,41 +2764,41 @@ RT_INTERFACE!{interface IStorePrice(IStorePriceVtbl): IInspectable(IInspectableV fn get_FormattedBasePrice(&self, out: *mut HSTRING) -> HRESULT, fn get_FormattedPrice(&self, out: *mut HSTRING) -> HRESULT, fn get_IsOnSale(&self, out: *mut bool) -> HRESULT, - fn get_SaleEndDate(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_SaleEndDate(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_CurrencyCode(&self, out: *mut HSTRING) -> HRESULT, fn get_FormattedRecurrencePrice(&self, out: *mut HSTRING) -> HRESULT }} impl IStorePrice { - #[inline] pub unsafe fn get_formatted_base_price(&self) -> Result { + #[inline] pub fn get_formatted_base_price(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FormattedBasePrice)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_formatted_price(&self) -> Result { + }} + #[inline] pub fn get_formatted_price(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FormattedPrice)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_on_sale(&self) -> Result { + }} + #[inline] pub fn get_is_on_sale(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsOnSale)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sale_end_date(&self) -> Result { + }} + #[inline] pub fn get_sale_end_date(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SaleEndDate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_currency_code(&self) -> Result { + }} + #[inline] pub fn get_currency_code(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CurrencyCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_formatted_recurrence_price(&self) -> Result { + }} + #[inline] pub fn get_formatted_recurrence_price(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FormattedRecurrencePrice)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class StorePrice: IStorePrice} DEFINE_IID!(IID_IStoreProduct, 839789650, 55136, 17674, 164, 43, 103, 209, 233, 1, 172, 144); @@ -2809,176 +2809,176 @@ RT_INTERFACE!{interface IStoreProduct(IStoreProductVtbl): IInspectable(IInspecta fn get_Description(&self, out: *mut HSTRING) -> HRESULT, fn get_ProductKind(&self, out: *mut HSTRING) -> HRESULT, fn get_HasDigitalDownload(&self, out: *mut bool) -> HRESULT, - fn get_Keywords(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_Images(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_Videos(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_Skus(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Keywords(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_Images(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_Videos(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_Skus(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_IsInUserCollection(&self, out: *mut bool) -> HRESULT, fn get_Price(&self, out: *mut *mut StorePrice) -> HRESULT, fn get_ExtendedJsonData(&self, out: *mut HSTRING) -> HRESULT, - fn get_LinkUri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn GetIsAnySkuInstalledAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestPurchaseAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestPurchaseWithPurchasePropertiesAsync(&self, storePurchaseProperties: *mut StorePurchaseProperties, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn get_LinkUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn GetIsAnySkuInstalledAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestPurchaseAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestPurchaseWithPurchasePropertiesAsync(&self, storePurchaseProperties: *mut StorePurchaseProperties, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn get_InAppOfferToken(&self, out: *mut HSTRING) -> HRESULT }} impl IStoreProduct { - #[inline] pub unsafe fn get_store_id(&self) -> Result { + #[inline] pub fn get_store_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StoreId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_language(&self) -> Result { + }} + #[inline] pub fn get_language(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Language)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_title(&self) -> Result { + }} + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_description(&self) -> Result { + }} + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_product_kind(&self) -> Result { + }} + #[inline] pub fn get_product_kind(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProductKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_digital_download(&self) -> Result { + }} + #[inline] pub fn get_has_digital_download(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasDigitalDownload)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_keywords(&self) -> Result>> { + }} + #[inline] pub fn get_keywords(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Keywords)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_images(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_images(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Images)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_videos(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_videos(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Videos)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_skus(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_skus(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Skus)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_in_user_collection(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_in_user_collection(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsInUserCollection)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_price(&self) -> Result> { + }} + #[inline] pub fn get_price(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Price)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_json_data(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_extended_json_data(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExtendedJsonData)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_link_uri(&self) -> Result> { + }} + #[inline] pub fn get_link_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LinkUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_any_sku_installed_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_any_sku_installed_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetIsAnySkuInstalledAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_purchase_async(&self) -> Result>> { + }} + #[inline] pub fn request_purchase_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestPurchaseAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_purchase_with_purchase_properties_async(&self, storePurchaseProperties: &StorePurchaseProperties) -> Result>> { + }} + #[inline] pub fn request_purchase_with_purchase_properties_async(&self, storePurchaseProperties: &StorePurchaseProperties) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestPurchaseWithPurchasePropertiesAsync)(self as *const _ as *mut _, 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(&self) -> Result { + }} + #[inline] pub fn get_in_app_offer_token(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InAppOfferToken)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class StoreProduct: IStoreProduct} 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(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, + fn get_Products(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT, fn get_HasMoreResults(&self, out: *mut bool) -> HRESULT, - fn get_ExtendedError(&self, out: *mut super::super::foundation::HResult) -> HRESULT, - fn GetNextAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn get_ExtendedError(&self, out: *mut foundation::HResult) -> HRESULT, + fn GetNextAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IStoreProductPagedQueryResult { - #[inline] pub unsafe fn get_products(&self) -> Result>> { + #[inline] pub fn get_products(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Products)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_more_results(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_has_more_results(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasMoreResults)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_error(&self) -> Result { + }} + #[inline] pub fn get_extended_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_next_async(&self) -> Result>> { + }} + #[inline] pub fn get_next_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetNextAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, - fn get_ExtendedError(&self, out: *mut super::super::foundation::HResult) -> HRESULT + fn get_Products(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT, + fn get_ExtendedError(&self, out: *mut foundation::HResult) -> HRESULT }} impl IStoreProductQueryResult { - #[inline] pub unsafe fn get_products(&self) -> Result>> { + #[inline] pub fn get_products(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Products)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_error(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_extended_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class StoreProductQueryResult: IStoreProductQueryResult} 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(&self, out: *mut *mut StoreProduct) -> HRESULT, - fn get_ExtendedError(&self, out: *mut super::super::foundation::HResult) -> HRESULT + fn get_ExtendedError(&self, out: *mut foundation::HResult) -> HRESULT }} impl IStoreProductResult { - #[inline] pub unsafe fn get_product(&self) -> Result> { + #[inline] pub fn get_product(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Product)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_error(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_extended_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class StoreProductResult: IStoreProductResult} DEFINE_IID!(IID_IStorePurchaseProperties, 2204268787, 65415, 17252, 165, 180, 253, 33, 83, 235, 228, 59); @@ -2989,32 +2989,32 @@ RT_INTERFACE!{interface IStorePurchaseProperties(IStorePurchasePropertiesVtbl): fn put_ExtendedJsonData(&self, value: HSTRING) -> HRESULT }} impl IStorePurchaseProperties { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Name)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_json_data(&self) -> Result { + }} + #[inline] pub fn get_extended_json_data(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExtendedJsonData)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_extended_json_data(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_extended_json_data(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ExtendedJsonData)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class StorePurchaseProperties: IStorePurchaseProperties} impl RtActivatable for StorePurchaseProperties {} impl RtActivatable for StorePurchaseProperties {} impl StorePurchaseProperties { - #[inline] pub fn create(name: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(name: &HStringArg) -> Result> { >::get_activation_factory().create(name) - }} + } } DEFINE_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]) [CLSID_StorePurchaseProperties]); DEFINE_IID!(IID_IStorePurchasePropertiesFactory, 2808673694, 65277, 18591, 154, 23, 34, 165, 147, 230, 139, 157); @@ -3022,28 +3022,28 @@ RT_INTERFACE!{static interface IStorePurchasePropertiesFactory(IStorePurchasePro fn Create(&self, name: HSTRING, out: *mut *mut StorePurchaseProperties) -> HRESULT }} impl IStorePurchasePropertiesFactory { - #[inline] pub unsafe fn create(&self, name: &HStringArg) -> Result> { + #[inline] pub fn create(&self, name: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, name.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(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(&self, out: *mut StorePurchaseStatus) -> HRESULT, - fn get_ExtendedError(&self, out: *mut super::super::foundation::HResult) -> HRESULT + fn get_ExtendedError(&self, out: *mut foundation::HResult) -> HRESULT }} impl IStorePurchaseResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_error(&self) -> Result { + }} + #[inline] pub fn get_extended_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class StorePurchaseResult: IStorePurchaseResult} RT_ENUM! { enum StorePurchaseStatus: i32 { @@ -3052,38 +3052,38 @@ RT_ENUM! { enum StorePurchaseStatus: i32 { RT_CLASS!{static class StoreRequestHelper} impl RtActivatable for StoreRequestHelper {} impl StoreRequestHelper { - #[inline] pub fn send_request_async(context: &StoreContext, requestKind: u32, parametersAsJson: &HStringArg) -> Result>> { unsafe { + #[inline] pub fn send_request_async(context: &StoreContext, requestKind: u32, parametersAsJson: &HStringArg) -> Result>> { >::get_activation_factory().send_request_async(context, requestKind, parametersAsJson) - }} + } } DEFINE_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]) [CLSID_StoreRequestHelper]); 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(&self, context: *mut StoreContext, requestKind: u32, parametersAsJson: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn SendRequestAsync(&self, context: *mut StoreContext, requestKind: u32, parametersAsJson: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IStoreRequestHelperStatics { - #[inline] pub unsafe fn send_request_async(&self, context: &StoreContext, requestKind: u32, parametersAsJson: &HStringArg) -> Result>> { + #[inline] pub fn send_request_async(&self, context: &StoreContext, requestKind: u32, parametersAsJson: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SendRequestAsync)(self as *const _ as *mut _, context as *const _ as *mut _, requestKind, parametersAsJson.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut HSTRING) -> HRESULT, - fn get_ExtendedError(&self, out: *mut super::super::foundation::HResult) -> HRESULT + fn get_ExtendedError(&self, out: *mut foundation::HResult) -> HRESULT }} impl IStoreSendRequestResult { - #[inline] pub unsafe fn get_response(&self) -> Result { + #[inline] pub fn get_response(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Response)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_error(&self) -> Result { + }} + #[inline] pub fn get_extended_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class StoreSendRequestResult: IStoreSendRequestResult} DEFINE_IID!(IID_IStoreSendRequestResult2, 687941999, 49328, 18896, 142, 141, 170, 148, 10, 249, 193, 11); @@ -3091,11 +3091,11 @@ RT_INTERFACE!{interface IStoreSendRequestResult2(IStoreSendRequestResult2Vtbl): #[cfg(feature="windows-web")] fn get_HttpStatusCode(&self, out: *mut super::super::web::http::HttpStatusCode) -> HRESULT }} impl IStoreSendRequestResult2 { - #[cfg(feature="windows-web")] #[inline] pub unsafe fn get_http_status_code(&self) -> Result { + #[cfg(feature="windows-web")] #[inline] pub fn get_http_status_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HttpStatusCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(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] { @@ -3105,116 +3105,116 @@ RT_INTERFACE!{interface IStoreSku(IStoreSkuVtbl): IInspectable(IInspectableVtbl) fn get_Description(&self, out: *mut HSTRING) -> HRESULT, fn get_IsTrial(&self, out: *mut bool) -> HRESULT, fn get_CustomDeveloperData(&self, out: *mut HSTRING) -> HRESULT, - fn get_Images(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_Videos(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_Availabilities(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Images(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_Videos(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_Availabilities(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_Price(&self, out: *mut *mut StorePrice) -> HRESULT, fn get_ExtendedJsonData(&self, out: *mut HSTRING) -> HRESULT, fn get_IsInUserCollection(&self, out: *mut bool) -> HRESULT, - fn get_BundledSkus(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_BundledSkus(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_CollectionData(&self, out: *mut *mut StoreCollectionData) -> HRESULT, - fn GetIsInstalledAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestPurchaseAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestPurchaseWithPurchasePropertiesAsync(&self, storePurchaseProperties: *mut StorePurchaseProperties, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetIsInstalledAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestPurchaseAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestPurchaseWithPurchasePropertiesAsync(&self, storePurchaseProperties: *mut StorePurchaseProperties, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn get_IsSubscription(&self, out: *mut bool) -> HRESULT, fn get_SubscriptionInfo(&self, out: *mut *mut StoreSubscriptionInfo) -> HRESULT }} impl IStoreSku { - #[inline] pub unsafe fn get_store_id(&self) -> Result { + #[inline] pub fn get_store_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StoreId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_language(&self) -> Result { + }} + #[inline] pub fn get_language(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Language)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_title(&self) -> Result { + }} + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_description(&self) -> Result { + }} + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_trial(&self) -> Result { + }} + #[inline] pub fn get_is_trial(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsTrial)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_custom_developer_data(&self) -> Result { + }} + #[inline] pub fn get_custom_developer_data(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CustomDeveloperData)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_images(&self) -> Result>> { + }} + #[inline] pub fn get_images(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Images)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_videos(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_videos(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Videos)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_availabilities(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_availabilities(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Availabilities)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_price(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_price(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Price)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_json_data(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_extended_json_data(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExtendedJsonData)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_in_user_collection(&self) -> Result { + }} + #[inline] pub fn get_is_in_user_collection(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsInUserCollection)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_bundled_skus(&self) -> Result>> { + }} + #[inline] pub fn get_bundled_skus(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BundledSkus)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_collection_data(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_collection_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CollectionData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_installed_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_installed_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetIsInstalledAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_purchase_async(&self) -> Result>> { + }} + #[inline] pub fn request_purchase_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestPurchaseAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_purchase_with_purchase_properties_async(&self, storePurchaseProperties: &StorePurchaseProperties) -> Result>> { + }} + #[inline] pub fn request_purchase_with_purchase_properties_async(&self, storePurchaseProperties: &StorePurchaseProperties) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestPurchaseWithPurchasePropertiesAsync)(self as *const _ as *mut _, 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(&self) -> Result { + }} + #[inline] pub fn get_is_subscription(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSubscription)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_subscription_info(&self) -> Result> { + }} + #[inline] pub fn get_subscription_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SubscriptionInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class StoreSku: IStoreSku} DEFINE_IID!(IID_IStoreSubscriptionInfo, 1099528042, 1369, 17324, 169, 198, 58, 176, 1, 31, 184, 235); @@ -3226,36 +3226,36 @@ RT_INTERFACE!{interface IStoreSubscriptionInfo(IStoreSubscriptionInfoVtbl): IIns fn get_TrialPeriodUnit(&self, out: *mut StoreDurationUnit) -> HRESULT }} impl IStoreSubscriptionInfo { - #[inline] pub unsafe fn get_billing_period(&self) -> Result { + #[inline] pub fn get_billing_period(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BillingPeriod)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_billing_period_unit(&self) -> Result { + }} + #[inline] pub fn get_billing_period_unit(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BillingPeriodUnit)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_trial_period(&self) -> Result { + }} + #[inline] pub fn get_has_trial_period(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasTrialPeriod)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_trial_period(&self) -> Result { + }} + #[inline] pub fn get_trial_period(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TrialPeriod)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_trial_period_unit(&self) -> Result { + }} + #[inline] pub fn get_trial_period_unit(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TrialPeriodUnit)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class StoreSubscriptionInfo: IStoreSubscriptionInfo} 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(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn get_Uri(&self, out: *mut *mut foundation::Uri) -> HRESULT, fn get_VideoPurposeTag(&self, out: *mut HSTRING) -> HRESULT, fn get_Width(&self, out: *mut u32) -> HRESULT, fn get_Height(&self, out: *mut u32) -> HRESULT, @@ -3263,36 +3263,36 @@ RT_INTERFACE!{interface IStoreVideo(IStoreVideoVtbl): IInspectable(IInspectableV fn get_PreviewImage(&self, out: *mut *mut StoreImage) -> HRESULT }} impl IStoreVideo { - #[inline] pub unsafe fn get_uri(&self) -> Result> { + #[inline] pub fn get_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Uri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_purpose_tag(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_video_purpose_tag(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoPurposeTag)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_width(&self) -> Result { + }} + #[inline] pub fn get_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Width)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_height(&self) -> Result { + }} + #[inline] pub fn get_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Height)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_caption(&self) -> Result { + }} + #[inline] pub fn get_caption(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Caption)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_preview_image(&self) -> Result> { + }} + #[inline] pub fn get_preview_image(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PreviewImage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class StoreVideo: IStoreVideo} } // Windows.Services.Store @@ -3300,14 +3300,14 @@ pub mod targetedcontent { // Windows.Services.TargetedContent use ::prelude::*; DEFINE_IID!(IID_ITargetedContentAction, 3613092126, 27862, 19616, 157, 143, 71, 40, 176, 183, 230, 182); RT_INTERFACE!{interface ITargetedContentAction(ITargetedContentActionVtbl): IInspectable(IInspectableVtbl) [IID_ITargetedContentAction] { - fn InvokeAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn InvokeAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl ITargetedContentAction { - #[inline] pub unsafe fn invoke_async(&self) -> Result> { + #[inline] pub fn invoke_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).InvokeAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class TargetedContentAction: ITargetedContentAction} RT_ENUM! { enum TargetedContentAppInstallationState: i32 { @@ -3318,32 +3318,32 @@ RT_ENUM! { enum TargetedContentAvailability: i32 { }} DEFINE_IID!(IID_ITargetedContentAvailabilityChangedEventArgs, 3774192934, 22823, 17488, 150, 92, 28, 235, 123, 236, 222, 101); RT_INTERFACE!{interface ITargetedContentAvailabilityChangedEventArgs(ITargetedContentAvailabilityChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ITargetedContentAvailabilityChangedEventArgs] { - fn GetDeferral(&self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl ITargetedContentAvailabilityChangedEventArgs { - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class TargetedContentAvailabilityChangedEventArgs: ITargetedContentAvailabilityChangedEventArgs} DEFINE_IID!(IID_ITargetedContentChangedEventArgs, 2580842697, 22654, 17798, 142, 247, 181, 76, 169, 69, 58, 22); RT_INTERFACE!{interface ITargetedContentChangedEventArgs(ITargetedContentChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ITargetedContentChangedEventArgs] { - fn GetDeferral(&self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT, + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT, fn get_HasPreviousContentExpired(&self, out: *mut bool) -> HRESULT }} impl ITargetedContentChangedEventArgs { - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_previous_content_expired(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_has_previous_content_expired(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasPreviousContentExpired)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class TargetedContentChangedEventArgs: ITargetedContentChangedEventArgs} DEFINE_IID!(IID_ITargetedContentCollection, 759916229, 61795, 17594, 159, 110, 225, 164, 194, 187, 85, 157); @@ -3352,99 +3352,99 @@ RT_INTERFACE!{interface ITargetedContentCollection(ITargetedContentCollectionVtb fn ReportInteraction(&self, interaction: TargetedContentInteraction) -> HRESULT, fn ReportCustomInteraction(&self, customInteractionName: HSTRING) -> HRESULT, fn get_Path(&self, out: *mut HSTRING) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, - fn get_Collections(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_Items(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_Properties(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT, + fn get_Collections(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_Items(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl ITargetedContentCollection { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_interaction(&self, interaction: TargetedContentInteraction) -> Result<()> { + }} + #[inline] pub fn report_interaction(&self, interaction: TargetedContentInteraction) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportInteraction)(self as *const _ as *mut _, interaction); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn report_custom_interaction(&self, customInteractionName: &HStringArg) -> Result<()> { + }} + #[inline] pub fn report_custom_interaction(&self, customInteractionName: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportCustomInteraction)(self as *const _ as *mut _, customInteractionName.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_path(&self) -> Result { + }} + #[inline] pub fn get_path(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Path)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_collections(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_collections(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Collections)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_items(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_items(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Items)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class TargetedContentCollection: ITargetedContentCollection} DEFINE_IID!(IID_ITargetedContentContainer, 3156513993, 34871, 18370, 133, 15, 215, 157, 100, 89, 89, 38); RT_INTERFACE!{interface ITargetedContentContainer(ITargetedContentContainerVtbl): IInspectable(IInspectableVtbl) [IID_ITargetedContentContainer] { fn get_Id(&self, out: *mut HSTRING) -> HRESULT, - fn get_Timestamp(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_Timestamp(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_Availability(&self, out: *mut TargetedContentAvailability) -> HRESULT, fn get_Content(&self, out: *mut *mut TargetedContentCollection) -> HRESULT, fn SelectSingleObject(&self, path: HSTRING, out: *mut *mut TargetedContentObject) -> HRESULT }} impl ITargetedContentContainer { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + }} + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_availability(&self) -> Result { + }} + #[inline] pub fn get_availability(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Availability)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_content(&self) -> Result> { + }} + #[inline] pub fn get_content(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Content)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn select_single_object(&self, path: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn select_single_object(&self, path: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SelectSingleObject)(self as *const _ as *mut _, path.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class TargetedContentContainer: ITargetedContentContainer} impl RtActivatable for TargetedContentContainer {} impl TargetedContentContainer { - #[inline] pub fn get_async(contentId: &HStringArg) -> Result>> { unsafe { + #[inline] pub fn get_async(contentId: &HStringArg) -> Result>> { >::get_activation_factory().get_async(contentId) - }} + } } DEFINE_CLSID!(TargetedContentContainer(&[87,105,110,100,111,119,115,46,83,101,114,118,105,99,101,115,46,84,97,114,103,101,116,101,100,67,111,110,116,101,110,116,46,84,97,114,103,101,116,101,100,67,111,110,116,101,110,116,67,111,110,116,97,105,110,101,114,0]) [CLSID_TargetedContentContainer]); DEFINE_IID!(IID_ITargetedContentContainerStatics, 1531439099, 8512, 19487, 167, 54, 197, 149, 131, 242, 39, 216); RT_INTERFACE!{static interface ITargetedContentContainerStatics(ITargetedContentContainerStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ITargetedContentContainerStatics] { - fn GetAsync(&self, contentId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetAsync(&self, contentId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ITargetedContentContainerStatics { - #[inline] pub unsafe fn get_async(&self, contentId: &HStringArg) -> Result>> { + #[inline] pub fn get_async(&self, contentId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAsync)(self as *const _ as *mut _, contentId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } #[cfg(feature="windows-storage")] RT_CLASS!{class TargetedContentFile: super::super::storage::streams::IRandomAccessStreamReference} #[cfg(not(feature="windows-storage"))] RT_CLASS!{class TargetedContentFile: IInspectable} @@ -3454,16 +3454,16 @@ RT_INTERFACE!{interface ITargetedContentImage(ITargetedContentImageVtbl): IInspe fn get_Width(&self, out: *mut u32) -> HRESULT }} impl ITargetedContentImage { - #[inline] pub unsafe fn get_height(&self) -> Result { + #[inline] pub fn get_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Height)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_width(&self) -> Result { + }} + #[inline] pub fn get_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Width)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class TargetedContentImage: ITargetedContentImage} RT_ENUM! { enum TargetedContentInteraction: i32 { @@ -3475,38 +3475,38 @@ RT_INTERFACE!{interface ITargetedContentItem(ITargetedContentItemVtbl): IInspect fn ReportInteraction(&self, interaction: TargetedContentInteraction) -> HRESULT, fn ReportCustomInteraction(&self, customInteractionName: HSTRING) -> HRESULT, fn get_State(&self, out: *mut *mut TargetedContentItemState) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT, - fn get_Collections(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_Properties(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT, + fn get_Collections(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl ITargetedContentItem { - #[inline] pub unsafe fn get_path(&self) -> Result { + #[inline] pub fn get_path(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Path)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn report_interaction(&self, interaction: TargetedContentInteraction) -> Result<()> { + }} + #[inline] pub fn report_interaction(&self, interaction: TargetedContentInteraction) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportInteraction)(self as *const _ as *mut _, interaction); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn report_custom_interaction(&self, customInteractionName: &HStringArg) -> Result<()> { + }} + #[inline] pub fn report_custom_interaction(&self, customInteractionName: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportCustomInteraction)(self as *const _ as *mut _, customInteractionName.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_state(&self) -> Result> { + }} + #[inline] pub fn get_state(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_collections(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_collections(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Collections)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class TargetedContentItem: ITargetedContentItem} DEFINE_IID!(IID_ITargetedContentItemState, 1939035220, 19557, 19271, 164, 65, 71, 45, 229, 60, 121, 182); @@ -3515,16 +3515,16 @@ RT_INTERFACE!{interface ITargetedContentItemState(ITargetedContentItemStateVtbl) fn get_AppInstallationState(&self, out: *mut TargetedContentAppInstallationState) -> HRESULT }} impl ITargetedContentItemState { - #[inline] pub unsafe fn get_should_display(&self) -> Result { + #[inline] pub fn get_should_display(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ShouldDisplay)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_installation_state(&self) -> Result { + }} + #[inline] pub fn get_app_installation_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AppInstallationState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class TargetedContentItemState: ITargetedContentItemState} DEFINE_IID!(IID_ITargetedContentObject, 69040489, 8722, 17105, 157, 250, 136, 168, 227, 3, 58, 163); @@ -3535,26 +3535,26 @@ RT_INTERFACE!{interface ITargetedContentObject(ITargetedContentObjectVtbl): IIns fn get_Value(&self, out: *mut *mut TargetedContentValue) -> HRESULT }} impl ITargetedContentObject { - #[inline] pub unsafe fn get_object_kind(&self) -> Result { + #[inline] pub fn get_object_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ObjectKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_collection(&self) -> Result> { + }} + #[inline] pub fn get_collection(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Collection)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_item(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_item(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Item)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_value(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class TargetedContentObject: ITargetedContentObject} RT_ENUM! { enum TargetedContentObjectKind: i32 { @@ -3562,75 +3562,75 @@ RT_ENUM! { enum TargetedContentObjectKind: i32 { }} DEFINE_IID!(IID_ITargetedContentStateChangedEventArgs, 2585587517, 32883, 17430, 141, 242, 84, 104, 53, 166, 65, 79); RT_INTERFACE!{interface ITargetedContentStateChangedEventArgs(ITargetedContentStateChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ITargetedContentStateChangedEventArgs] { - fn GetDeferral(&self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl ITargetedContentStateChangedEventArgs { - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class TargetedContentStateChangedEventArgs: ITargetedContentStateChangedEventArgs} DEFINE_IID!(IID_ITargetedContentSubscription, 2284596297, 50770, 19578, 172, 173, 31, 127, 162, 152, 108, 115); RT_INTERFACE!{interface ITargetedContentSubscription(ITargetedContentSubscriptionVtbl): IInspectable(IInspectableVtbl) [IID_ITargetedContentSubscription] { fn get_Id(&self, out: *mut HSTRING) -> HRESULT, - fn GetContentContainerAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_ContentChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ContentChanged(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_AvailabilityChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AvailabilityChanged(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_StateChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StateChanged(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn GetContentContainerAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_ContentChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ContentChanged(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_AvailabilityChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AvailabilityChanged(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_StateChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StateChanged(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl ITargetedContentSubscription { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_content_container_async(&self) -> Result>> { + }} + #[inline] pub fn get_content_container_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetContentContainerAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_content_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_content_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ContentChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_content_changed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_content_changed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ContentChanged)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_availability_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_availability_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AvailabilityChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_availability_changed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_availability_changed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AvailabilityChanged)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_state_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_state_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StateChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_state_changed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_state_changed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StateChanged)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class TargetedContentSubscription: ITargetedContentSubscription} impl RtActivatable for TargetedContentSubscription {} impl TargetedContentSubscription { - #[inline] pub fn get_async(subscriptionId: &HStringArg) -> Result>> { unsafe { + #[inline] pub fn get_async(subscriptionId: &HStringArg) -> Result>> { >::get_activation_factory().get_async(subscriptionId) - }} - #[inline] pub fn get_options(subscriptionId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn get_options(subscriptionId: &HStringArg) -> Result>> { >::get_activation_factory().get_options(subscriptionId) - }} + } } DEFINE_CLSID!(TargetedContentSubscription(&[87,105,110,100,111,119,115,46,83,101,114,118,105,99,101,115,46,84,97,114,103,101,116,101,100,67,111,110,116,101,110,116,46,84,97,114,103,101,116,101,100,67,111,110,116,101,110,116,83,117,98,115,99,114,105,112,116,105,111,110,0]) [CLSID_TargetedContentSubscription]); DEFINE_IID!(IID_ITargetedContentSubscriptionOptions, 1643014864, 11395, 16923, 132, 103, 65, 62, 175, 26, 235, 151); @@ -3638,158 +3638,158 @@ RT_INTERFACE!{interface ITargetedContentSubscriptionOptions(ITargetedContentSubs fn get_SubscriptionId(&self, out: *mut HSTRING) -> HRESULT, fn get_AllowPartialContentAvailability(&self, out: *mut bool) -> HRESULT, fn put_AllowPartialContentAvailability(&self, value: bool) -> HRESULT, - fn get_CloudQueryParameters(&self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, - fn get_LocalFilters(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_CloudQueryParameters(&self, out: *mut *mut foundation::collections::IMap) -> HRESULT, + fn get_LocalFilters(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn Update(&self) -> HRESULT }} impl ITargetedContentSubscriptionOptions { - #[inline] pub unsafe fn get_subscription_id(&self) -> Result { + #[inline] pub fn get_subscription_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SubscriptionId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_allow_partial_content_availability(&self) -> Result { + }} + #[inline] pub fn get_allow_partial_content_availability(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AllowPartialContentAvailability)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_allow_partial_content_availability(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_allow_partial_content_availability(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AllowPartialContentAvailability)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_cloud_query_parameters(&self) -> Result>> { + }} + #[inline] pub fn get_cloud_query_parameters(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CloudQueryParameters)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_local_filters(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_local_filters(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LocalFilters)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn update(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn update(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Update)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class TargetedContentSubscriptionOptions: ITargetedContentSubscriptionOptions} DEFINE_IID!(IID_ITargetedContentSubscriptionStatics, 4208852608, 13837, 18710, 181, 60, 126, 162, 112, 144, 208, 42); RT_INTERFACE!{static interface ITargetedContentSubscriptionStatics(ITargetedContentSubscriptionStaticsVtbl): IInspectable(IInspectableVtbl) [IID_ITargetedContentSubscriptionStatics] { - fn GetAsync(&self, subscriptionId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetAsync(&self, subscriptionId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetOptions(&self, subscriptionId: HSTRING, out: *mut *mut TargetedContentSubscriptionOptions) -> HRESULT }} impl ITargetedContentSubscriptionStatics { - #[inline] pub unsafe fn get_async(&self, subscriptionId: &HStringArg) -> Result>> { + #[inline] pub fn get_async(&self, subscriptionId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAsync)(self as *const _ as *mut _, subscriptionId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_options(&self, subscriptionId: &HStringArg) -> Result> { + }} + #[inline] pub fn get_options(&self, subscriptionId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetOptions)(self as *const _ as *mut _, subscriptionId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_ITargetedContentValue, 2868765875, 16917, 19448, 134, 127, 67, 240, 72, 101, 249, 191); RT_INTERFACE!{interface ITargetedContentValue(ITargetedContentValueVtbl): IInspectable(IInspectableVtbl) [IID_ITargetedContentValue] { fn get_ValueKind(&self, out: *mut TargetedContentValueKind) -> HRESULT, fn get_Path(&self, out: *mut HSTRING) -> HRESULT, fn get_String(&self, out: *mut HSTRING) -> HRESULT, - fn get_Uri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn get_Uri(&self, out: *mut *mut foundation::Uri) -> HRESULT, fn get_Number(&self, out: *mut f64) -> HRESULT, fn get_Boolean(&self, out: *mut bool) -> HRESULT, fn get_File(&self, out: *mut *mut TargetedContentFile) -> HRESULT, fn get_ImageFile(&self, out: *mut *mut TargetedContentImage) -> HRESULT, fn get_Action(&self, out: *mut *mut TargetedContentAction) -> HRESULT, - fn get_Strings(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_Uris(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_Numbers(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_Booleans(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_Files(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_ImageFiles(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_Actions(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_Strings(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_Uris(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_Numbers(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_Booleans(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_Files(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_ImageFiles(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_Actions(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl ITargetedContentValue { - #[inline] pub unsafe fn get_value_kind(&self) -> Result { + #[inline] pub fn get_value_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ValueKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_path(&self) -> Result { + }} + #[inline] pub fn get_path(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Path)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_string(&self) -> Result { + }} + #[inline] pub fn get_string(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_String)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_uri(&self) -> Result> { + }} + #[inline] pub fn get_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Uri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_number(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_number(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Number)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_boolean(&self) -> Result { + }} + #[inline] pub fn get_boolean(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Boolean)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_file(&self) -> Result> { + }} + #[inline] pub fn get_file(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_File)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_image_file(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_image_file(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ImageFile)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_action(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_action(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Action)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_strings(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_strings(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Strings)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_uris(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_uris(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Uris)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_numbers(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_numbers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Numbers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_booleans(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_booleans(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Booleans)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_files(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_files(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Files)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_image_files(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_image_files(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ImageFiles)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_actions(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_actions(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Actions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class TargetedContentValue: ITargetedContentValue} RT_ENUM! { enum TargetedContentValueKind: i32 { diff --git a/src/rt/gen/windows/storage.rs b/src/rt/gen/windows/storage.rs index ed20984..f70d2b6 100644 --- a/src/rt/gen/windows/storage.rs +++ b/src/rt/gen/windows/storage.rs @@ -12,61 +12,61 @@ RT_INTERFACE!{interface IAppDataPaths(IAppDataPathsVtbl): IInspectable(IInspecta fn get_RoamingAppData(&self, out: *mut HSTRING) -> HRESULT }} impl IAppDataPaths { - #[inline] pub unsafe fn get_cookies(&self) -> Result { + #[inline] pub fn get_cookies(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Cookies)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_desktop(&self) -> Result { + }} + #[inline] pub fn get_desktop(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Desktop)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_documents(&self) -> Result { + }} + #[inline] pub fn get_documents(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Documents)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_favorites(&self) -> Result { + }} + #[inline] pub fn get_favorites(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Favorites)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_history(&self) -> Result { + }} + #[inline] pub fn get_history(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_History)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_internet_cache(&self) -> Result { + }} + #[inline] pub fn get_internet_cache(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InternetCache)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_local_app_data(&self) -> Result { + }} + #[inline] pub fn get_local_app_data(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LocalAppData)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_program_data(&self) -> Result { + }} + #[inline] pub fn get_program_data(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProgramData)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_roaming_app_data(&self) -> Result { + }} + #[inline] pub fn get_roaming_app_data(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RoamingAppData)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class AppDataPaths: IAppDataPaths} impl RtActivatable for AppDataPaths {} impl AppDataPaths { - #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::system::User) -> Result> { unsafe { + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::system::User) -> Result>> { >::get_activation_factory().get_for_user(user) - }} - #[inline] pub fn get_default() -> Result> { unsafe { + } + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} + } } DEFINE_CLSID!(AppDataPaths(&[87,105,110,100,111,119,115,46,83,116,111,114,97,103,101,46,65,112,112,68,97,116,97,80,97,116,104,115,0]) [CLSID_AppDataPaths]); DEFINE_IID!(IID_IAppDataPathsStatics, 3639290622, 43481, 19220, 185, 153, 227, 146, 19, 121, 217, 3); @@ -76,108 +76,108 @@ RT_INTERFACE!{static interface IAppDataPathsStatics(IAppDataPathsStaticsVtbl): I fn GetDefault(&self, out: *mut *mut AppDataPaths) -> HRESULT }} impl IAppDataPathsStatics { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_for_user(&self, user: &super::system::User) -> Result> { + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(&self, user: &super::system::User) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForUser)(self as *const _ as *mut _, user as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_default(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut u32) -> HRESULT, - fn SetVersionAsync(&self, desiredVersion: u32, handler: *mut ApplicationDataSetVersionHandler, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn ClearAllAsync(&self, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn ClearAsync(&self, locality: ApplicationDataLocality, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn SetVersionAsync(&self, desiredVersion: u32, handler: *mut ApplicationDataSetVersionHandler, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ClearAllAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ClearAsync(&self, locality: ApplicationDataLocality, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn get_LocalSettings(&self, out: *mut *mut ApplicationDataContainer) -> HRESULT, fn get_RoamingSettings(&self, out: *mut *mut ApplicationDataContainer) -> HRESULT, fn get_LocalFolder(&self, out: *mut *mut StorageFolder) -> HRESULT, fn get_RoamingFolder(&self, out: *mut *mut StorageFolder) -> HRESULT, fn get_TemporaryFolder(&self, out: *mut *mut StorageFolder) -> HRESULT, - fn add_DataChanged(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DataChanged(&self, token: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_DataChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DataChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn SignalDataChanged(&self) -> HRESULT, fn get_RoamingStorageQuota(&self, out: *mut u64) -> HRESULT }} impl IApplicationData { - #[inline] pub unsafe fn get_version(&self) -> Result { + #[inline] pub fn get_version(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Version)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_version_async(&self, desiredVersion: u32, handler: &ApplicationDataSetVersionHandler) -> Result> { + }} + #[inline] pub fn set_version_async(&self, desiredVersion: u32, handler: &ApplicationDataSetVersionHandler) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetVersionAsync)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[inline] pub fn clear_all_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ClearAllAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn clear_async(&self, locality: ApplicationDataLocality) -> Result> { + }} + #[inline] pub fn clear_async(&self, locality: ApplicationDataLocality) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ClearAsync)(self as *const _ as *mut _, locality, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_local_settings(&self) -> Result> { + }} + #[inline] pub fn get_local_settings(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LocalSettings)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_roaming_settings(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_roaming_settings(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RoamingSettings)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_local_folder(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_local_folder(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LocalFolder)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_roaming_folder(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_roaming_folder(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RoamingFolder)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_temporary_folder(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_temporary_folder(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TemporaryFolder)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_data_changed(&self, handler: &super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_data_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DataChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_data_changed(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_data_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DataChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn signal_data_changed(&self) -> Result<()> { + }} + #[inline] pub fn signal_data_changed(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SignalDataChanged)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_roaming_storage_quota(&self) -> Result { + }} + #[inline] pub fn get_roaming_storage_quota(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RoamingStorageQuota)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ApplicationData: IApplicationData} impl RtActivatable for ApplicationData {} impl RtActivatable for ApplicationData {} impl ApplicationData { - #[inline] pub fn get_current() -> Result> { unsafe { + #[inline] pub fn get_current() -> Result>> { >::get_activation_factory().get_current() - }} - #[cfg(feature="windows-system")] #[inline] pub fn get_for_user_async(user: &super::system::User) -> Result>> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user_async(user: &super::system::User) -> Result>> { >::get_activation_factory().get_for_user_async(user) - }} + } } DEFINE_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]) [CLSID_ApplicationData]); DEFINE_IID!(IID_IApplicationData2, 2657471849, 2979, 20018, 190, 41, 176, 45, 230, 96, 118, 56); @@ -185,80 +185,80 @@ RT_INTERFACE!{interface IApplicationData2(IApplicationData2Vtbl): IInspectable(I fn get_LocalCacheFolder(&self, out: *mut *mut StorageFolder) -> HRESULT }} impl IApplicationData2 { - #[inline] pub unsafe fn get_local_cache_folder(&self) -> Result> { + #[inline] pub fn get_local_cache_folder(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LocalCacheFolder)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, folderName: HSTRING, out: *mut *mut StorageFolder) -> HRESULT, - fn ClearPublisherCacheFolderAsync(&self, folderName: HSTRING, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, + fn ClearPublisherCacheFolderAsync(&self, folderName: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn get_SharedLocalFolder(&self, out: *mut *mut StorageFolder) -> HRESULT }} impl IApplicationData3 { - #[inline] pub unsafe fn get_publisher_cache_folder(&self, folderName: &HStringArg) -> Result> { + #[inline] pub fn get_publisher_cache_folder(&self, folderName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPublisherCacheFolder)(self as *const _ as *mut _, folderName.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn clear_publisher_cache_folder_async(&self, folderName: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn clear_publisher_cache_folder_async(&self, folderName: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ClearPublisherCacheFolderAsync)(self as *const _ as *mut _, folderName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_shared_local_folder(&self) -> Result> { + }} + #[inline] pub fn get_shared_local_folder(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SharedLocalFolder)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } -RT_CLASS!{class ApplicationDataCompositeValue: super::foundation::collections::IPropertySet} +RT_CLASS!{class ApplicationDataCompositeValue: foundation::collections::IPropertySet} impl RtActivatable for ApplicationDataCompositeValue {} DEFINE_CLSID!(ApplicationDataCompositeValue(&[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,67,111,109,112,111,115,105,116,101,86,97,108,117,101,0]) [CLSID_ApplicationDataCompositeValue]); 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(&self, out: *mut HSTRING) -> HRESULT, fn get_Locality(&self, out: *mut ApplicationDataLocality) -> HRESULT, - fn get_Values(&self, out: *mut *mut super::foundation::collections::IPropertySet) -> HRESULT, - fn get_Containers(&self, out: *mut *mut super::foundation::collections::IMapView) -> HRESULT, + fn get_Values(&self, out: *mut *mut foundation::collections::IPropertySet) -> HRESULT, + fn get_Containers(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT, fn CreateContainer(&self, name: HSTRING, disposition: ApplicationDataCreateDisposition, out: *mut *mut ApplicationDataContainer) -> HRESULT, fn DeleteContainer(&self, name: HSTRING) -> HRESULT }} impl IApplicationDataContainer { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_locality(&self) -> Result { + }} + #[inline] pub fn get_locality(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Locality)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_values(&self) -> Result> { + }} + #[inline] pub fn get_values(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Values)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_containers(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_containers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Containers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_container(&self, name: &HStringArg, disposition: ApplicationDataCreateDisposition) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_container(&self, name: &HStringArg, disposition: ApplicationDataCreateDisposition) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateContainer)(self as *const _ as *mut _, name.get(), disposition, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete_container(&self, name: &HStringArg) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn delete_container(&self, name: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).DeleteContainer)(self as *const _ as *mut _, name.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ApplicationDataContainer: IApplicationDataContainer} -RT_CLASS!{class ApplicationDataContainerSettings: super::foundation::collections::IPropertySet} +RT_CLASS!{class ApplicationDataContainerSettings: foundation::collections::IPropertySet} RT_ENUM! { enum ApplicationDataCreateDisposition: i32 { Always (ApplicationDataCreateDisposition_Always) = 0, Existing (ApplicationDataCreateDisposition_Existing) = 1, }} @@ -270,59 +270,59 @@ RT_DELEGATE!{delegate ApplicationDataSetVersionHandler(ApplicationDataSetVersion fn Invoke(&self, setVersionRequest: *mut SetVersionRequest) -> HRESULT }} impl ApplicationDataSetVersionHandler { - #[inline] pub unsafe fn invoke(&self, setVersionRequest: &SetVersionRequest) -> Result<()> { + #[inline] pub fn invoke(&self, setVersionRequest: &SetVersionRequest) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, setVersionRequest as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut ApplicationData) -> HRESULT }} impl IApplicationDataStatics { - #[inline] pub unsafe fn get_current(&self) -> Result> { + #[inline] pub fn get_current(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Current)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, user: *mut super::system::User, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-system")] fn GetForUserAsync(&self, user: *mut super::system::User, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IApplicationDataStatics2 { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_for_user_async(&self, user: &super::system::User) -> Result>> { + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user_async(&self, user: &super::system::User) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForUserAsync)(self as *const _ as *mut _, user as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class CachedFileManager} impl RtActivatable for CachedFileManager {} impl CachedFileManager { - #[inline] pub fn defer_updates(file: &IStorageFile) -> Result<()> { unsafe { + #[inline] pub fn defer_updates(file: &IStorageFile) -> Result<()> { >::get_activation_factory().defer_updates(file) - }} - #[inline] pub fn complete_updates_async(file: &IStorageFile) -> Result>> { unsafe { + } + #[inline] pub fn complete_updates_async(file: &IStorageFile) -> Result>> { >::get_activation_factory().complete_updates_async(file) - }} + } } DEFINE_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]) [CLSID_CachedFileManager]); 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(&self, file: *mut IStorageFile) -> HRESULT, - fn CompleteUpdatesAsync(&self, file: *mut IStorageFile, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + fn CompleteUpdatesAsync(&self, file: *mut IStorageFile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ICachedFileManagerStatics { - #[inline] pub unsafe fn defer_updates(&self, file: &IStorageFile) -> Result<()> { + #[inline] pub fn defer_updates(&self, file: &IStorageFile) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).DeferUpdates)(self as *const _ as *mut _, file as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn complete_updates_async(&self, file: &IStorageFile) -> Result>> { + }} + #[inline] pub fn complete_updates_async(&self, file: &IStorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CompleteUpdatesAsync)(self as *const _ as *mut _, file as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum CreationCollisionOption: i32 { GenerateUniqueName (CreationCollisionOption_GenerateUniqueName) = 0, ReplaceExisting (CreationCollisionOption_ReplaceExisting) = 1, FailIfExists (CreationCollisionOption_FailIfExists) = 2, OpenIfExists (CreationCollisionOption_OpenIfExists) = 3, @@ -331,89 +331,89 @@ RT_CLASS!{static class DownloadsFolder} impl RtActivatable for DownloadsFolder {} impl RtActivatable for DownloadsFolder {} impl DownloadsFolder { - #[inline] pub fn create_file_async(desiredName: &HStringArg) -> Result>> { unsafe { + #[inline] pub fn create_file_async(desiredName: &HStringArg) -> Result>> { >::get_activation_factory().create_file_async(desiredName) - }} - #[inline] pub fn create_folder_async(desiredName: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn create_folder_async(desiredName: &HStringArg) -> Result>> { >::get_activation_factory().create_folder_async(desiredName) - }} - #[inline] pub fn create_file_with_collision_option_async(desiredName: &HStringArg, option: CreationCollisionOption) -> Result>> { unsafe { + } + #[inline] pub fn create_file_with_collision_option_async(desiredName: &HStringArg, option: CreationCollisionOption) -> Result>> { >::get_activation_factory().create_file_with_collision_option_async(desiredName, option) - }} - #[inline] pub fn create_folder_with_collision_option_async(desiredName: &HStringArg, option: CreationCollisionOption) -> Result>> { unsafe { + } + #[inline] pub fn create_folder_with_collision_option_async(desiredName: &HStringArg, option: CreationCollisionOption) -> Result>> { >::get_activation_factory().create_folder_with_collision_option_async(desiredName, option) - }} - #[cfg(feature="windows-system")] #[inline] pub fn create_file_for_user_async(user: &super::system::User, desiredName: &HStringArg) -> Result>> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn create_file_for_user_async(user: &super::system::User, desiredName: &HStringArg) -> Result>> { >::get_activation_factory().create_file_for_user_async(user, desiredName) - }} - #[cfg(feature="windows-system")] #[inline] pub fn create_folder_for_user_async(user: &super::system::User, desiredName: &HStringArg) -> Result>> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn create_folder_for_user_async(user: &super::system::User, desiredName: &HStringArg) -> Result>> { >::get_activation_factory().create_folder_for_user_async(user, desiredName) - }} - #[cfg(feature="windows-system")] #[inline] pub fn create_file_for_user_with_collision_option_async(user: &super::system::User, desiredName: &HStringArg, option: CreationCollisionOption) -> Result>> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn create_file_for_user_with_collision_option_async(user: &super::system::User, desiredName: &HStringArg, option: CreationCollisionOption) -> Result>> { >::get_activation_factory().create_file_for_user_with_collision_option_async(user, desiredName, option) - }} - #[cfg(feature="windows-system")] #[inline] pub fn create_folder_for_user_with_collision_option_async(user: &super::system::User, desiredName: &HStringArg, option: CreationCollisionOption) -> Result>> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn create_folder_for_user_with_collision_option_async(user: &super::system::User, desiredName: &HStringArg, option: CreationCollisionOption) -> Result>> { >::get_activation_factory().create_folder_for_user_with_collision_option_async(user, desiredName, option) - }} + } } DEFINE_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]) [CLSID_DownloadsFolder]); 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(&self, desiredName: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn CreateFolderAsync(&self, desiredName: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn CreateFileWithCollisionOptionAsync(&self, desiredName: HSTRING, option: CreationCollisionOption, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn CreateFolderWithCollisionOptionAsync(&self, desiredName: HSTRING, option: CreationCollisionOption, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + fn CreateFileAsync(&self, desiredName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreateFolderAsync(&self, desiredName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreateFileWithCollisionOptionAsync(&self, desiredName: HSTRING, option: CreationCollisionOption, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreateFolderWithCollisionOptionAsync(&self, desiredName: HSTRING, option: CreationCollisionOption, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IDownloadsFolderStatics { - #[inline] pub unsafe fn create_file_async(&self, desiredName: &HStringArg) -> Result>> { + #[inline] pub fn create_file_async(&self, desiredName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFileAsync)(self as *const _ as *mut _, desiredName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_folder_async(&self, desiredName: &HStringArg) -> Result>> { + }} + #[inline] pub fn create_folder_async(&self, desiredName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFolderAsync)(self as *const _ as *mut _, 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(&self, desiredName: &HStringArg, option: CreationCollisionOption) -> Result>> { + }} + #[inline] pub fn create_file_with_collision_option_async(&self, desiredName: &HStringArg, option: CreationCollisionOption) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFileWithCollisionOptionAsync)(self as *const _ as *mut _, 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(&self, desiredName: &HStringArg, option: CreationCollisionOption) -> Result>> { + }} + #[inline] pub fn create_folder_with_collision_option_async(&self, desiredName: &HStringArg, option: CreationCollisionOption) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFolderWithCollisionOptionAsync)(self as *const _ as *mut _, desiredName.get(), option, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, user: *mut super::system::User, desiredName: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-system")] fn CreateFolderForUserAsync(&self, user: *mut super::system::User, desiredName: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-system")] fn CreateFileForUserWithCollisionOptionAsync(&self, user: *mut super::system::User, desiredName: HSTRING, option: CreationCollisionOption, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-system")] fn CreateFolderForUserWithCollisionOptionAsync(&self, user: *mut super::system::User, desiredName: HSTRING, option: CreationCollisionOption, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-system")] fn CreateFileForUserAsync(&self, user: *mut super::system::User, desiredName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-system")] fn CreateFolderForUserAsync(&self, user: *mut super::system::User, desiredName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-system")] fn CreateFileForUserWithCollisionOptionAsync(&self, user: *mut super::system::User, desiredName: HSTRING, option: CreationCollisionOption, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-system")] fn CreateFolderForUserWithCollisionOptionAsync(&self, user: *mut super::system::User, desiredName: HSTRING, option: CreationCollisionOption, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IDownloadsFolderStatics2 { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn create_file_for_user_async(&self, user: &super::system::User, desiredName: &HStringArg) -> Result>> { + #[cfg(feature="windows-system")] #[inline] pub fn create_file_for_user_async(&self, user: &super::system::User, desiredName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFileForUserAsync)(self as *const _ as *mut _, 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(&self, user: &super::system::User, desiredName: &HStringArg) -> Result>> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn create_folder_for_user_async(&self, user: &super::system::User, desiredName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFolderForUserAsync)(self as *const _ as *mut _, 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(&self, user: &super::system::User, desiredName: &HStringArg, option: CreationCollisionOption) -> Result>> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn create_file_for_user_with_collision_option_async(&self, user: &super::system::User, desiredName: &HStringArg, option: CreationCollisionOption) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFileForUserWithCollisionOptionAsync)(self as *const _ as *mut _, 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(&self, user: &super::system::User, desiredName: &HStringArg, option: CreationCollisionOption) -> Result>> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn create_folder_for_user_with_collision_option_async(&self, user: &super::system::User, desiredName: &HStringArg, option: CreationCollisionOption) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFolderForUserWithCollisionOptionAsync)(self as *const _ as *mut _, user as *const _ as *mut _, desiredName.get(), option, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum FileAccessMode: i32 { Read (FileAccessMode_Read) = 0, ReadWrite (FileAccessMode_ReadWrite) = 1, @@ -424,147 +424,147 @@ RT_ENUM! { enum FileAttributes: u32 { RT_CLASS!{static class FileIO} impl RtActivatable for FileIO {} impl FileIO { - #[inline] pub fn read_text_async(file: &IStorageFile) -> Result>> { unsafe { + #[inline] pub fn read_text_async(file: &IStorageFile) -> Result>> { >::get_activation_factory().read_text_async(file) - }} - #[inline] pub fn read_text_with_encoding_async(file: &IStorageFile, encoding: streams::UnicodeEncoding) -> Result>> { unsafe { + } + #[inline] pub fn read_text_with_encoding_async(file: &IStorageFile, encoding: streams::UnicodeEncoding) -> Result>> { >::get_activation_factory().read_text_with_encoding_async(file, encoding) - }} - #[inline] pub fn write_text_async(file: &IStorageFile, contents: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn write_text_async(file: &IStorageFile, contents: &HStringArg) -> Result> { >::get_activation_factory().write_text_async(file, contents) - }} - #[inline] pub fn write_text_with_encoding_async(file: &IStorageFile, contents: &HStringArg, encoding: streams::UnicodeEncoding) -> Result> { unsafe { + } + #[inline] pub fn write_text_with_encoding_async(file: &IStorageFile, contents: &HStringArg, encoding: streams::UnicodeEncoding) -> Result> { >::get_activation_factory().write_text_with_encoding_async(file, contents, encoding) - }} - #[inline] pub fn append_text_async(file: &IStorageFile, contents: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn append_text_async(file: &IStorageFile, contents: &HStringArg) -> Result> { >::get_activation_factory().append_text_async(file, contents) - }} - #[inline] pub fn append_text_with_encoding_async(file: &IStorageFile, contents: &HStringArg, encoding: streams::UnicodeEncoding) -> Result> { unsafe { + } + #[inline] pub fn append_text_with_encoding_async(file: &IStorageFile, contents: &HStringArg, encoding: streams::UnicodeEncoding) -> Result> { >::get_activation_factory().append_text_with_encoding_async(file, contents, encoding) - }} - #[inline] pub fn read_lines_async(file: &IStorageFile) -> Result>>> { unsafe { + } + #[inline] pub fn read_lines_async(file: &IStorageFile) -> Result>>> { >::get_activation_factory().read_lines_async(file) - }} - #[inline] pub fn read_lines_with_encoding_async(file: &IStorageFile, encoding: streams::UnicodeEncoding) -> Result>>> { unsafe { + } + #[inline] pub fn read_lines_with_encoding_async(file: &IStorageFile, encoding: streams::UnicodeEncoding) -> Result>>> { >::get_activation_factory().read_lines_with_encoding_async(file, encoding) - }} - #[inline] pub fn write_lines_async(file: &IStorageFile, lines: &super::foundation::collections::IIterable) -> Result> { unsafe { + } + #[inline] pub fn write_lines_async(file: &IStorageFile, lines: &foundation::collections::IIterable) -> Result> { >::get_activation_factory().write_lines_async(file, lines) - }} - #[inline] pub fn write_lines_with_encoding_async(file: &IStorageFile, lines: &super::foundation::collections::IIterable, encoding: streams::UnicodeEncoding) -> Result> { unsafe { + } + #[inline] pub fn write_lines_with_encoding_async(file: &IStorageFile, lines: &foundation::collections::IIterable, encoding: streams::UnicodeEncoding) -> Result> { >::get_activation_factory().write_lines_with_encoding_async(file, lines, encoding) - }} - #[inline] pub fn append_lines_async(file: &IStorageFile, lines: &super::foundation::collections::IIterable) -> Result> { unsafe { + } + #[inline] pub fn append_lines_async(file: &IStorageFile, lines: &foundation::collections::IIterable) -> Result> { >::get_activation_factory().append_lines_async(file, lines) - }} - #[inline] pub fn append_lines_with_encoding_async(file: &IStorageFile, lines: &super::foundation::collections::IIterable, encoding: streams::UnicodeEncoding) -> Result> { unsafe { + } + #[inline] pub fn append_lines_with_encoding_async(file: &IStorageFile, lines: &foundation::collections::IIterable, encoding: streams::UnicodeEncoding) -> Result> { >::get_activation_factory().append_lines_with_encoding_async(file, lines, encoding) - }} - #[inline] pub fn read_buffer_async(file: &IStorageFile) -> Result>> { unsafe { + } + #[inline] pub fn read_buffer_async(file: &IStorageFile) -> Result>> { >::get_activation_factory().read_buffer_async(file) - }} - #[inline] pub fn write_buffer_async(file: &IStorageFile, buffer: &streams::IBuffer) -> Result> { unsafe { + } + #[inline] pub fn write_buffer_async(file: &IStorageFile, buffer: &streams::IBuffer) -> Result> { >::get_activation_factory().write_buffer_async(file, buffer) - }} - #[inline] pub fn write_bytes_async(file: &IStorageFile, buffer: &[u8]) -> Result> { unsafe { + } + #[inline] pub fn write_bytes_async(file: &IStorageFile, buffer: &[u8]) -> Result> { >::get_activation_factory().write_bytes_async(file, buffer) - }} + } } DEFINE_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]) [CLSID_FileIO]); 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(&self, file: *mut IStorageFile, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn ReadTextWithEncodingAsync(&self, file: *mut IStorageFile, encoding: streams::UnicodeEncoding, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn WriteTextAsync(&self, file: *mut IStorageFile, contents: HSTRING, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn WriteTextWithEncodingAsync(&self, file: *mut IStorageFile, contents: HSTRING, encoding: streams::UnicodeEncoding, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn AppendTextAsync(&self, file: *mut IStorageFile, contents: HSTRING, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn AppendTextWithEncodingAsync(&self, file: *mut IStorageFile, contents: HSTRING, encoding: streams::UnicodeEncoding, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn ReadLinesAsync(&self, file: *mut IStorageFile, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, - fn ReadLinesWithEncodingAsync(&self, file: *mut IStorageFile, encoding: streams::UnicodeEncoding, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, - fn WriteLinesAsync(&self, file: *mut IStorageFile, lines: *mut super::foundation::collections::IIterable, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn WriteLinesWithEncodingAsync(&self, file: *mut IStorageFile, lines: *mut super::foundation::collections::IIterable, encoding: streams::UnicodeEncoding, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn AppendLinesAsync(&self, file: *mut IStorageFile, lines: *mut super::foundation::collections::IIterable, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn AppendLinesWithEncodingAsync(&self, file: *mut IStorageFile, lines: *mut super::foundation::collections::IIterable, encoding: streams::UnicodeEncoding, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn ReadBufferAsync(&self, file: *mut IStorageFile, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn WriteBufferAsync(&self, file: *mut IStorageFile, buffer: *mut streams::IBuffer, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn WriteBytesAsync(&self, file: *mut IStorageFile, bufferSize: u32, buffer: *mut u8, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT + fn ReadTextAsync(&self, file: *mut IStorageFile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ReadTextWithEncodingAsync(&self, file: *mut IStorageFile, encoding: streams::UnicodeEncoding, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn WriteTextAsync(&self, file: *mut IStorageFile, contents: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn WriteTextWithEncodingAsync(&self, file: *mut IStorageFile, contents: HSTRING, encoding: streams::UnicodeEncoding, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn AppendTextAsync(&self, file: *mut IStorageFile, contents: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn AppendTextWithEncodingAsync(&self, file: *mut IStorageFile, contents: HSTRING, encoding: streams::UnicodeEncoding, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReadLinesAsync(&self, file: *mut IStorageFile, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn ReadLinesWithEncodingAsync(&self, file: *mut IStorageFile, encoding: streams::UnicodeEncoding, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn WriteLinesAsync(&self, file: *mut IStorageFile, lines: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn WriteLinesWithEncodingAsync(&self, file: *mut IStorageFile, lines: *mut foundation::collections::IIterable, encoding: streams::UnicodeEncoding, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn AppendLinesAsync(&self, file: *mut IStorageFile, lines: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn AppendLinesWithEncodingAsync(&self, file: *mut IStorageFile, lines: *mut foundation::collections::IIterable, encoding: streams::UnicodeEncoding, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReadBufferAsync(&self, file: *mut IStorageFile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn WriteBufferAsync(&self, file: *mut IStorageFile, buffer: *mut streams::IBuffer, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn WriteBytesAsync(&self, file: *mut IStorageFile, bufferSize: u32, buffer: *mut u8, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IFileIOStatics { - #[inline] pub unsafe fn read_text_async(&self, file: &IStorageFile) -> Result>> { + #[inline] pub fn read_text_async(&self, file: &IStorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadTextAsync)(self as *const _ as *mut _, 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(&self, file: &IStorageFile, encoding: streams::UnicodeEncoding) -> Result>> { + }} + #[inline] pub fn read_text_with_encoding_async(&self, file: &IStorageFile, encoding: streams::UnicodeEncoding) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadTextWithEncodingAsync)(self as *const _ as *mut _, 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(&self, file: &IStorageFile, contents: &HStringArg) -> Result> { + }} + #[inline] pub fn write_text_async(&self, file: &IStorageFile, contents: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).WriteTextAsync)(self as *const _ as *mut _, 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(&self, file: &IStorageFile, contents: &HStringArg, encoding: streams::UnicodeEncoding) -> Result> { + }} + #[inline] pub fn write_text_with_encoding_async(&self, file: &IStorageFile, contents: &HStringArg, encoding: streams::UnicodeEncoding) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).WriteTextWithEncodingAsync)(self as *const _ as *mut _, 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(&self, file: &IStorageFile, contents: &HStringArg) -> Result> { + }} + #[inline] pub fn append_text_async(&self, file: &IStorageFile, contents: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AppendTextAsync)(self as *const _ as *mut _, 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(&self, file: &IStorageFile, contents: &HStringArg, encoding: streams::UnicodeEncoding) -> Result> { + }} + #[inline] pub fn append_text_with_encoding_async(&self, file: &IStorageFile, contents: &HStringArg, encoding: streams::UnicodeEncoding) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AppendTextWithEncodingAsync)(self as *const _ as *mut _, 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(&self, file: &IStorageFile) -> Result>>> { + }} + #[inline] pub fn read_lines_async(&self, file: &IStorageFile) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadLinesAsync)(self as *const _ as *mut _, 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(&self, file: &IStorageFile, encoding: streams::UnicodeEncoding) -> Result>>> { + }} + #[inline] pub fn read_lines_with_encoding_async(&self, file: &IStorageFile, encoding: streams::UnicodeEncoding) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadLinesWithEncodingAsync)(self as *const _ as *mut _, 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(&self, file: &IStorageFile, lines: &super::foundation::collections::IIterable) -> Result> { + }} + #[inline] pub fn write_lines_async(&self, file: &IStorageFile, lines: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).WriteLinesAsync)(self as *const _ as *mut _, 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(&self, file: &IStorageFile, lines: &super::foundation::collections::IIterable, encoding: streams::UnicodeEncoding) -> Result> { + }} + #[inline] pub fn write_lines_with_encoding_async(&self, file: &IStorageFile, lines: &foundation::collections::IIterable, encoding: streams::UnicodeEncoding) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).WriteLinesWithEncodingAsync)(self as *const _ as *mut _, 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(&self, file: &IStorageFile, lines: &super::foundation::collections::IIterable) -> Result> { + }} + #[inline] pub fn append_lines_async(&self, file: &IStorageFile, lines: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AppendLinesAsync)(self as *const _ as *mut _, 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(&self, file: &IStorageFile, lines: &super::foundation::collections::IIterable, encoding: streams::UnicodeEncoding) -> Result> { + }} + #[inline] pub fn append_lines_with_encoding_async(&self, file: &IStorageFile, lines: &foundation::collections::IIterable, encoding: streams::UnicodeEncoding) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AppendLinesWithEncodingAsync)(self as *const _ as *mut _, 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(&self, file: &IStorageFile) -> Result>> { + }} + #[inline] pub fn read_buffer_async(&self, file: &IStorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadBufferAsync)(self as *const _ as *mut _, 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(&self, file: &IStorageFile, buffer: &streams::IBuffer) -> Result> { + }} + #[inline] pub fn write_buffer_async(&self, file: &IStorageFile, buffer: &streams::IBuffer) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).WriteBufferAsync)(self as *const _ as *mut _, 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(&self, file: &IStorageFile, buffer: &[u8]) -> Result> { + }} + #[inline] pub fn write_bytes_async(&self, file: &IStorageFile, buffer: &[u8]) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).WriteBytesAsync)(self as *const _ as *mut _, 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_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, AllAppMods (KnownFolderId_AllAppMods) = 14, CurrentAppMods (KnownFolderId_CurrentAppMods) = 15, @@ -577,48 +577,48 @@ impl RtActivatable for KnownFolders {} impl RtActivatable for KnownFolders {} impl RtActivatable for KnownFolders {} impl KnownFolders { - #[inline] pub fn get_camera_roll() -> Result> { unsafe { + #[inline] pub fn get_camera_roll() -> Result>> { >::get_activation_factory().get_camera_roll() - }} - #[inline] pub fn get_playlists() -> Result> { unsafe { + } + #[inline] pub fn get_playlists() -> Result>> { >::get_activation_factory().get_playlists() - }} - #[inline] pub fn get_saved_pictures() -> Result> { unsafe { + } + #[inline] pub fn get_saved_pictures() -> Result>> { >::get_activation_factory().get_saved_pictures() - }} - #[inline] pub fn get_music_library() -> Result> { unsafe { + } + #[inline] pub fn get_music_library() -> Result>> { >::get_activation_factory().get_music_library() - }} - #[inline] pub fn get_pictures_library() -> Result> { unsafe { + } + #[inline] pub fn get_pictures_library() -> Result>> { >::get_activation_factory().get_pictures_library() - }} - #[inline] pub fn get_videos_library() -> Result> { unsafe { + } + #[inline] pub fn get_videos_library() -> Result>> { >::get_activation_factory().get_videos_library() - }} - #[inline] pub fn get_documents_library() -> Result> { unsafe { + } + #[inline] pub fn get_documents_library() -> Result>> { >::get_activation_factory().get_documents_library() - }} - #[inline] pub fn get_home_group() -> Result> { unsafe { + } + #[inline] pub fn get_home_group() -> Result>> { >::get_activation_factory().get_home_group() - }} - #[inline] pub fn get_removable_devices() -> Result> { unsafe { + } + #[inline] pub fn get_removable_devices() -> Result>> { >::get_activation_factory().get_removable_devices() - }} - #[inline] pub fn get_media_server_devices() -> Result> { unsafe { + } + #[inline] pub fn get_media_server_devices() -> Result>> { >::get_activation_factory().get_media_server_devices() - }} - #[inline] pub fn get_objects3_d() -> Result> { unsafe { + } + #[inline] pub fn get_objects3_d() -> Result>> { >::get_activation_factory().get_objects3_d() - }} - #[inline] pub fn get_app_captures() -> Result> { unsafe { + } + #[inline] pub fn get_app_captures() -> Result>> { >::get_activation_factory().get_app_captures() - }} - #[inline] pub fn get_recorded_calls() -> Result> { unsafe { + } + #[inline] pub fn get_recorded_calls() -> Result>> { >::get_activation_factory().get_recorded_calls() - }} - #[cfg(feature="windows-system")] #[inline] pub fn get_folder_for_user_async(user: &super::system::User, folderId: KnownFolderId) -> Result>> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn get_folder_for_user_async(user: &super::system::User, folderId: KnownFolderId) -> Result>> { >::get_activation_factory().get_folder_for_user_async(user, folderId) - }} + } } DEFINE_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]) [CLSID_KnownFolders]); DEFINE_IID!(IID_IKnownFoldersCameraRollStatics, 1561419366, 10216, 18735, 184, 229, 47, 144, 137, 108, 212, 205); @@ -626,33 +626,33 @@ RT_INTERFACE!{static interface IKnownFoldersCameraRollStatics(IKnownFoldersCamer fn get_CameraRoll(&self, out: *mut *mut StorageFolder) -> HRESULT }} impl IKnownFoldersCameraRollStatics { - #[inline] pub unsafe fn get_camera_roll(&self) -> Result> { + #[inline] pub fn get_camera_roll(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CameraRoll)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut StorageFolder) -> HRESULT }} impl IKnownFoldersPlaylistsStatics { - #[inline] pub unsafe fn get_playlists(&self) -> Result> { + #[inline] pub fn get_playlists(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Playlists)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut StorageFolder) -> HRESULT }} impl IKnownFoldersSavedPicturesStatics { - #[inline] pub unsafe fn get_saved_pictures(&self) -> Result> { + #[inline] pub fn get_saved_pictures(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SavedPictures)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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] { @@ -665,41 +665,41 @@ RT_INTERFACE!{static interface IKnownFoldersStatics(IKnownFoldersStaticsVtbl): I fn get_MediaServerDevices(&self, out: *mut *mut StorageFolder) -> HRESULT }} impl IKnownFoldersStatics { - #[inline] pub unsafe fn get_music_library(&self) -> Result> { + #[inline] pub fn get_music_library(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MusicLibrary)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pictures_library(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_pictures_library(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PicturesLibrary)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_videos_library(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_videos_library(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideosLibrary)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_documents_library(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_documents_library(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DocumentsLibrary)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_home_group(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_home_group(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HomeGroup)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_removable_devices(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_removable_devices(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemovableDevices)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_media_server_devices(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_media_server_devices(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MediaServerDevices)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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] { @@ -708,32 +708,32 @@ RT_INTERFACE!{static interface IKnownFoldersStatics2(IKnownFoldersStatics2Vtbl): fn get_RecordedCalls(&self, out: *mut *mut StorageFolder) -> HRESULT }} impl IKnownFoldersStatics2 { - #[inline] pub unsafe fn get_objects3_d(&self) -> Result> { + #[inline] pub fn get_objects3_d(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Objects3D)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_captures(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_app_captures(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppCaptures)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_recorded_calls(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_recorded_calls(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RecordedCalls)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, user: *mut super::system::User, folderId: KnownFolderId, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-system")] fn GetFolderForUserAsync(&self, user: *mut super::system::User, folderId: KnownFolderId, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IKnownFoldersStatics3 { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_folder_for_user_async(&self, user: &super::system::User, folderId: KnownFolderId) -> Result>> { + #[cfg(feature="windows-system")] #[inline] pub fn get_folder_for_user_async(&self, user: &super::system::User, folderId: KnownFolderId) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFolderForUserAsync)(self as *const _ as *mut _, user as *const _ as *mut _, folderId, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum KnownLibraryId: i32 { Music (KnownLibraryId_Music) = 0, Pictures (KnownLibraryId_Pictures) = 1, Videos (KnownLibraryId_Videos) = 2, Documents (KnownLibraryId_Documents) = 3, @@ -744,157 +744,157 @@ RT_ENUM! { enum NameCollisionOption: i32 { RT_CLASS!{static class PathIO} impl RtActivatable for PathIO {} impl PathIO { - #[inline] pub fn read_text_async(absolutePath: &HStringArg) -> Result>> { unsafe { + #[inline] pub fn read_text_async(absolutePath: &HStringArg) -> Result>> { >::get_activation_factory().read_text_async(absolutePath) - }} - #[inline] pub fn read_text_with_encoding_async(absolutePath: &HStringArg, encoding: streams::UnicodeEncoding) -> Result>> { unsafe { + } + #[inline] pub fn read_text_with_encoding_async(absolutePath: &HStringArg, encoding: streams::UnicodeEncoding) -> Result>> { >::get_activation_factory().read_text_with_encoding_async(absolutePath, encoding) - }} - #[inline] pub fn write_text_async(absolutePath: &HStringArg, contents: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn write_text_async(absolutePath: &HStringArg, contents: &HStringArg) -> Result> { >::get_activation_factory().write_text_async(absolutePath, contents) - }} - #[inline] pub fn write_text_with_encoding_async(absolutePath: &HStringArg, contents: &HStringArg, encoding: streams::UnicodeEncoding) -> Result> { unsafe { + } + #[inline] pub fn write_text_with_encoding_async(absolutePath: &HStringArg, contents: &HStringArg, encoding: streams::UnicodeEncoding) -> Result> { >::get_activation_factory().write_text_with_encoding_async(absolutePath, contents, encoding) - }} - #[inline] pub fn append_text_async(absolutePath: &HStringArg, contents: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn append_text_async(absolutePath: &HStringArg, contents: &HStringArg) -> Result> { >::get_activation_factory().append_text_async(absolutePath, contents) - }} - #[inline] pub fn append_text_with_encoding_async(absolutePath: &HStringArg, contents: &HStringArg, encoding: streams::UnicodeEncoding) -> Result> { unsafe { + } + #[inline] pub fn append_text_with_encoding_async(absolutePath: &HStringArg, contents: &HStringArg, encoding: streams::UnicodeEncoding) -> Result> { >::get_activation_factory().append_text_with_encoding_async(absolutePath, contents, encoding) - }} - #[inline] pub fn read_lines_async(absolutePath: &HStringArg) -> Result>>> { unsafe { + } + #[inline] pub fn read_lines_async(absolutePath: &HStringArg) -> Result>>> { >::get_activation_factory().read_lines_async(absolutePath) - }} - #[inline] pub fn read_lines_with_encoding_async(absolutePath: &HStringArg, encoding: streams::UnicodeEncoding) -> Result>>> { unsafe { + } + #[inline] pub fn read_lines_with_encoding_async(absolutePath: &HStringArg, encoding: streams::UnicodeEncoding) -> Result>>> { >::get_activation_factory().read_lines_with_encoding_async(absolutePath, encoding) - }} - #[inline] pub fn write_lines_async(absolutePath: &HStringArg, lines: &super::foundation::collections::IIterable) -> Result> { unsafe { + } + #[inline] pub fn write_lines_async(absolutePath: &HStringArg, lines: &foundation::collections::IIterable) -> Result> { >::get_activation_factory().write_lines_async(absolutePath, lines) - }} - #[inline] pub fn write_lines_with_encoding_async(absolutePath: &HStringArg, lines: &super::foundation::collections::IIterable, encoding: streams::UnicodeEncoding) -> Result> { unsafe { + } + #[inline] pub fn write_lines_with_encoding_async(absolutePath: &HStringArg, lines: &foundation::collections::IIterable, encoding: streams::UnicodeEncoding) -> Result> { >::get_activation_factory().write_lines_with_encoding_async(absolutePath, lines, encoding) - }} - #[inline] pub fn append_lines_async(absolutePath: &HStringArg, lines: &super::foundation::collections::IIterable) -> Result> { unsafe { + } + #[inline] pub fn append_lines_async(absolutePath: &HStringArg, lines: &foundation::collections::IIterable) -> Result> { >::get_activation_factory().append_lines_async(absolutePath, lines) - }} - #[inline] pub fn append_lines_with_encoding_async(absolutePath: &HStringArg, lines: &super::foundation::collections::IIterable, encoding: streams::UnicodeEncoding) -> Result> { unsafe { + } + #[inline] pub fn append_lines_with_encoding_async(absolutePath: &HStringArg, lines: &foundation::collections::IIterable, encoding: streams::UnicodeEncoding) -> Result> { >::get_activation_factory().append_lines_with_encoding_async(absolutePath, lines, encoding) - }} - #[inline] pub fn read_buffer_async(absolutePath: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn read_buffer_async(absolutePath: &HStringArg) -> Result>> { >::get_activation_factory().read_buffer_async(absolutePath) - }} - #[inline] pub fn write_buffer_async(absolutePath: &HStringArg, buffer: &streams::IBuffer) -> Result> { unsafe { + } + #[inline] pub fn write_buffer_async(absolutePath: &HStringArg, buffer: &streams::IBuffer) -> Result> { >::get_activation_factory().write_buffer_async(absolutePath, buffer) - }} - #[inline] pub fn write_bytes_async(absolutePath: &HStringArg, buffer: &[u8]) -> Result> { unsafe { + } + #[inline] pub fn write_bytes_async(absolutePath: &HStringArg, buffer: &[u8]) -> Result> { >::get_activation_factory().write_bytes_async(absolutePath, buffer) - }} + } } DEFINE_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]) [CLSID_PathIO]); 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(&self, absolutePath: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn ReadTextWithEncodingAsync(&self, absolutePath: HSTRING, encoding: streams::UnicodeEncoding, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn WriteTextAsync(&self, absolutePath: HSTRING, contents: HSTRING, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn WriteTextWithEncodingAsync(&self, absolutePath: HSTRING, contents: HSTRING, encoding: streams::UnicodeEncoding, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn AppendTextAsync(&self, absolutePath: HSTRING, contents: HSTRING, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn AppendTextWithEncodingAsync(&self, absolutePath: HSTRING, contents: HSTRING, encoding: streams::UnicodeEncoding, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn ReadLinesAsync(&self, absolutePath: HSTRING, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, - fn ReadLinesWithEncodingAsync(&self, absolutePath: HSTRING, encoding: streams::UnicodeEncoding, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, - fn WriteLinesAsync(&self, absolutePath: HSTRING, lines: *mut super::foundation::collections::IIterable, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn WriteLinesWithEncodingAsync(&self, absolutePath: HSTRING, lines: *mut super::foundation::collections::IIterable, encoding: streams::UnicodeEncoding, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn AppendLinesAsync(&self, absolutePath: HSTRING, lines: *mut super::foundation::collections::IIterable, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn AppendLinesWithEncodingAsync(&self, absolutePath: HSTRING, lines: *mut super::foundation::collections::IIterable, encoding: streams::UnicodeEncoding, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn ReadBufferAsync(&self, absolutePath: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn WriteBufferAsync(&self, absolutePath: HSTRING, buffer: *mut streams::IBuffer, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn WriteBytesAsync(&self, absolutePath: HSTRING, bufferSize: u32, buffer: *mut u8, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT + fn ReadTextAsync(&self, absolutePath: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ReadTextWithEncodingAsync(&self, absolutePath: HSTRING, encoding: streams::UnicodeEncoding, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn WriteTextAsync(&self, absolutePath: HSTRING, contents: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn WriteTextWithEncodingAsync(&self, absolutePath: HSTRING, contents: HSTRING, encoding: streams::UnicodeEncoding, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn AppendTextAsync(&self, absolutePath: HSTRING, contents: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn AppendTextWithEncodingAsync(&self, absolutePath: HSTRING, contents: HSTRING, encoding: streams::UnicodeEncoding, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReadLinesAsync(&self, absolutePath: HSTRING, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn ReadLinesWithEncodingAsync(&self, absolutePath: HSTRING, encoding: streams::UnicodeEncoding, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn WriteLinesAsync(&self, absolutePath: HSTRING, lines: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn WriteLinesWithEncodingAsync(&self, absolutePath: HSTRING, lines: *mut foundation::collections::IIterable, encoding: streams::UnicodeEncoding, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn AppendLinesAsync(&self, absolutePath: HSTRING, lines: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn AppendLinesWithEncodingAsync(&self, absolutePath: HSTRING, lines: *mut foundation::collections::IIterable, encoding: streams::UnicodeEncoding, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ReadBufferAsync(&self, absolutePath: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn WriteBufferAsync(&self, absolutePath: HSTRING, buffer: *mut streams::IBuffer, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn WriteBytesAsync(&self, absolutePath: HSTRING, bufferSize: u32, buffer: *mut u8, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IPathIOStatics { - #[inline] pub unsafe fn read_text_async(&self, absolutePath: &HStringArg) -> Result>> { + #[inline] pub fn read_text_async(&self, absolutePath: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadTextAsync)(self as *const _ as *mut _, absolutePath.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn read_text_with_encoding_async(&self, absolutePath: &HStringArg, encoding: streams::UnicodeEncoding) -> Result>> { + }} + #[inline] pub fn read_text_with_encoding_async(&self, absolutePath: &HStringArg, encoding: streams::UnicodeEncoding) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadTextWithEncodingAsync)(self as *const _ as *mut _, absolutePath.get(), encoding, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn write_text_async(&self, absolutePath: &HStringArg, contents: &HStringArg) -> Result> { + }} + #[inline] pub fn write_text_async(&self, absolutePath: &HStringArg, contents: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).WriteTextAsync)(self as *const _ as *mut _, 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(&self, absolutePath: &HStringArg, contents: &HStringArg, encoding: streams::UnicodeEncoding) -> Result> { + }} + #[inline] pub fn write_text_with_encoding_async(&self, absolutePath: &HStringArg, contents: &HStringArg, encoding: streams::UnicodeEncoding) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).WriteTextWithEncodingAsync)(self as *const _ as *mut _, 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(&self, absolutePath: &HStringArg, contents: &HStringArg) -> Result> { + }} + #[inline] pub fn append_text_async(&self, absolutePath: &HStringArg, contents: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AppendTextAsync)(self as *const _ as *mut _, 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(&self, absolutePath: &HStringArg, contents: &HStringArg, encoding: streams::UnicodeEncoding) -> Result> { + }} + #[inline] pub fn append_text_with_encoding_async(&self, absolutePath: &HStringArg, contents: &HStringArg, encoding: streams::UnicodeEncoding) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AppendTextWithEncodingAsync)(self as *const _ as *mut _, 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(&self, absolutePath: &HStringArg) -> Result>>> { + }} + #[inline] pub fn read_lines_async(&self, absolutePath: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadLinesAsync)(self as *const _ as *mut _, absolutePath.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn read_lines_with_encoding_async(&self, absolutePath: &HStringArg, encoding: streams::UnicodeEncoding) -> Result>>> { + }} + #[inline] pub fn read_lines_with_encoding_async(&self, absolutePath: &HStringArg, encoding: streams::UnicodeEncoding) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadLinesWithEncodingAsync)(self as *const _ as *mut _, absolutePath.get(), encoding, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn write_lines_async(&self, absolutePath: &HStringArg, lines: &super::foundation::collections::IIterable) -> Result> { + }} + #[inline] pub fn write_lines_async(&self, absolutePath: &HStringArg, lines: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).WriteLinesAsync)(self as *const _ as *mut _, 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(&self, absolutePath: &HStringArg, lines: &super::foundation::collections::IIterable, encoding: streams::UnicodeEncoding) -> Result> { + }} + #[inline] pub fn write_lines_with_encoding_async(&self, absolutePath: &HStringArg, lines: &foundation::collections::IIterable, encoding: streams::UnicodeEncoding) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).WriteLinesWithEncodingAsync)(self as *const _ as *mut _, 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(&self, absolutePath: &HStringArg, lines: &super::foundation::collections::IIterable) -> Result> { + }} + #[inline] pub fn append_lines_async(&self, absolutePath: &HStringArg, lines: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AppendLinesAsync)(self as *const _ as *mut _, 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(&self, absolutePath: &HStringArg, lines: &super::foundation::collections::IIterable, encoding: streams::UnicodeEncoding) -> Result> { + }} + #[inline] pub fn append_lines_with_encoding_async(&self, absolutePath: &HStringArg, lines: &foundation::collections::IIterable, encoding: streams::UnicodeEncoding) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AppendLinesWithEncodingAsync)(self as *const _ as *mut _, 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(&self, absolutePath: &HStringArg) -> Result>> { + }} + #[inline] pub fn read_buffer_async(&self, absolutePath: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadBufferAsync)(self as *const _ as *mut _, absolutePath.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn write_buffer_async(&self, absolutePath: &HStringArg, buffer: &streams::IBuffer) -> Result> { + }} + #[inline] pub fn write_buffer_async(&self, absolutePath: &HStringArg, buffer: &streams::IBuffer) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).WriteBufferAsync)(self as *const _ as *mut _, 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(&self, absolutePath: &HStringArg, buffer: &[u8]) -> Result> { + }} + #[inline] pub fn write_bytes_async(&self, absolutePath: &HStringArg, buffer: &[u8]) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).WriteBytesAsync)(self as *const _ as *mut _, absolutePath.get(), buffer.len() as u32, buffer.as_ptr() as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self) -> HRESULT }} impl ISetVersionDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SetVersionDeferral: ISetVersionDeferral} DEFINE_IID!(IID_ISetVersionRequest, 3116854171, 4182, 20073, 131, 48, 22, 38, 25, 149, 111, 155); @@ -904,21 +904,21 @@ RT_INTERFACE!{interface ISetVersionRequest(ISetVersionRequestVtbl): IInspectable fn GetDeferral(&self, out: *mut *mut SetVersionDeferral) -> HRESULT }} impl ISetVersionRequest { - #[inline] pub unsafe fn get_current_version(&self) -> Result { + #[inline] pub fn get_current_version(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CurrentVersion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_desired_version(&self) -> Result { + }} + #[inline] pub fn get_desired_version(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DesiredVersion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SetVersionRequest: ISetVersionRequest} RT_ENUM! { enum StorageDeleteOption: i32 { @@ -928,482 +928,482 @@ DEFINE_IID!(IID_IStorageFile, 4198457734, 16916, 17036, 166, 76, 20, 201, 172, 1 RT_INTERFACE!{interface IStorageFile(IStorageFileVtbl): IInspectable(IInspectableVtbl) [IID_IStorageFile] { fn get_FileType(&self, out: *mut HSTRING) -> HRESULT, fn get_ContentType(&self, out: *mut HSTRING) -> HRESULT, - fn OpenAsync(&self, accessMode: FileAccessMode, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn OpenTransactedWriteAsync(&self, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn CopyOverloadDefaultNameAndOptions(&self, destinationFolder: *mut IStorageFolder, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn CopyOverloadDefaultOptions(&self, destinationFolder: *mut IStorageFolder, desiredNewName: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn CopyOverload(&self, destinationFolder: *mut IStorageFolder, desiredNewName: HSTRING, option: NameCollisionOption, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn CopyAndReplaceAsync(&self, fileToReplace: *mut IStorageFile, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn MoveOverloadDefaultNameAndOptions(&self, destinationFolder: *mut IStorageFolder, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn MoveOverloadDefaultOptions(&self, destinationFolder: *mut IStorageFolder, desiredNewName: HSTRING, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn MoveOverload(&self, destinationFolder: *mut IStorageFolder, desiredNewName: HSTRING, option: NameCollisionOption, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn MoveAndReplaceAsync(&self, fileToReplace: *mut IStorageFile, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT + fn OpenAsync(&self, accessMode: FileAccessMode, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn OpenTransactedWriteAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CopyOverloadDefaultNameAndOptions(&self, destinationFolder: *mut IStorageFolder, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CopyOverloadDefaultOptions(&self, destinationFolder: *mut IStorageFolder, desiredNewName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CopyOverload(&self, destinationFolder: *mut IStorageFolder, desiredNewName: HSTRING, option: NameCollisionOption, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CopyAndReplaceAsync(&self, fileToReplace: *mut IStorageFile, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn MoveOverloadDefaultNameAndOptions(&self, destinationFolder: *mut IStorageFolder, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn MoveOverloadDefaultOptions(&self, destinationFolder: *mut IStorageFolder, desiredNewName: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn MoveOverload(&self, destinationFolder: *mut IStorageFolder, desiredNewName: HSTRING, option: NameCollisionOption, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn MoveAndReplaceAsync(&self, fileToReplace: *mut IStorageFile, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IStorageFile { - #[inline] pub unsafe fn get_file_type(&self) -> Result { + #[inline] pub fn get_file_type(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FileType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_content_type(&self) -> Result { + }} + #[inline] pub fn get_content_type(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContentType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn open_async(&self, accessMode: FileAccessMode) -> Result>> { + }} + #[inline] pub fn open_async(&self, accessMode: FileAccessMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenAsync)(self as *const _ as *mut _, accessMode, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn open_transacted_write_async(&self) -> Result>> { + }} + #[inline] pub fn open_transacted_write_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenTransactedWriteAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn copy_overload_default_name_and_options(&self, destinationFolder: &IStorageFolder) -> Result>> { + }} + #[inline] pub fn copy_overload_default_name_and_options(&self, destinationFolder: &IStorageFolder) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CopyOverloadDefaultNameAndOptions)(self as *const _ as *mut _, 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(&self, destinationFolder: &IStorageFolder, desiredNewName: &HStringArg) -> Result>> { + }} + #[inline] pub fn copy_overload_default_options(&self, destinationFolder: &IStorageFolder, desiredNewName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CopyOverloadDefaultOptions)(self as *const _ as *mut _, 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(&self, destinationFolder: &IStorageFolder, desiredNewName: &HStringArg, option: NameCollisionOption) -> Result>> { + }} + #[inline] pub fn copy_overload(&self, destinationFolder: &IStorageFolder, desiredNewName: &HStringArg, option: NameCollisionOption) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CopyOverload)(self as *const _ as *mut _, 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(&self, fileToReplace: &IStorageFile) -> Result> { + }} + #[inline] pub fn copy_and_replace_async(&self, fileToReplace: &IStorageFile) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CopyAndReplaceAsync)(self as *const _ as *mut _, 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(&self, destinationFolder: &IStorageFolder) -> Result> { + }} + #[inline] pub fn move_overload_default_name_and_options(&self, destinationFolder: &IStorageFolder) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MoveOverloadDefaultNameAndOptions)(self as *const _ as *mut _, 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(&self, destinationFolder: &IStorageFolder, desiredNewName: &HStringArg) -> Result> { + }} + #[inline] pub fn move_overload_default_options(&self, destinationFolder: &IStorageFolder, desiredNewName: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MoveOverloadDefaultOptions)(self as *const _ as *mut _, 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(&self, destinationFolder: &IStorageFolder, desiredNewName: &HStringArg, option: NameCollisionOption) -> Result> { + }} + #[inline] pub fn move_overload(&self, destinationFolder: &IStorageFolder, desiredNewName: &HStringArg, option: NameCollisionOption) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MoveOverload)(self as *const _ as *mut _, 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(&self, fileToReplace: &IStorageFile) -> Result> { + }} + #[inline] pub fn move_and_replace_async(&self, fileToReplace: &IStorageFile) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).MoveAndReplaceAsync)(self as *const _ as *mut _, fileToReplace as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class StorageFile: IStorageFile} impl RtActivatable for StorageFile {} impl StorageFile { - #[inline] pub fn get_file_from_path_async(path: &HStringArg) -> Result>> { unsafe { + #[inline] pub fn get_file_from_path_async(path: &HStringArg) -> Result>> { >::get_activation_factory().get_file_from_path_async(path) - }} - #[inline] pub fn get_file_from_application_uri_async(uri: &super::foundation::Uri) -> Result>> { unsafe { + } + #[inline] pub fn get_file_from_application_uri_async(uri: &foundation::Uri) -> Result>> { >::get_activation_factory().get_file_from_application_uri_async(uri) - }} - #[inline] pub fn create_streamed_file_async(displayNameWithExtension: &HStringArg, dataRequested: &StreamedFileDataRequestedHandler, thumbnail: &streams::IRandomAccessStreamReference) -> Result>> { unsafe { + } + #[inline] pub fn create_streamed_file_async(displayNameWithExtension: &HStringArg, dataRequested: &StreamedFileDataRequestedHandler, thumbnail: &streams::IRandomAccessStreamReference) -> Result>> { >::get_activation_factory().create_streamed_file_async(displayNameWithExtension, dataRequested, thumbnail) - }} - #[inline] pub fn replace_with_streamed_file_async(fileToReplace: &IStorageFile, dataRequested: &StreamedFileDataRequestedHandler, thumbnail: &streams::IRandomAccessStreamReference) -> Result>> { unsafe { + } + #[inline] pub fn replace_with_streamed_file_async(fileToReplace: &IStorageFile, dataRequested: &StreamedFileDataRequestedHandler, thumbnail: &streams::IRandomAccessStreamReference) -> Result>> { >::get_activation_factory().replace_with_streamed_file_async(fileToReplace, dataRequested, thumbnail) - }} - #[inline] pub fn create_streamed_file_from_uri_async(displayNameWithExtension: &HStringArg, uri: &super::foundation::Uri, thumbnail: &streams::IRandomAccessStreamReference) -> Result>> { unsafe { + } + #[inline] pub fn create_streamed_file_from_uri_async(displayNameWithExtension: &HStringArg, uri: &foundation::Uri, thumbnail: &streams::IRandomAccessStreamReference) -> Result>> { >::get_activation_factory().create_streamed_file_from_uri_async(displayNameWithExtension, uri, thumbnail) - }} - #[inline] pub fn replace_with_streamed_file_from_uri_async(fileToReplace: &IStorageFile, uri: &super::foundation::Uri, thumbnail: &streams::IRandomAccessStreamReference) -> Result>> { unsafe { + } + #[inline] pub fn replace_with_streamed_file_from_uri_async(fileToReplace: &IStorageFile, uri: &foundation::Uri, thumbnail: &streams::IRandomAccessStreamReference) -> Result>> { >::get_activation_factory().replace_with_streamed_file_from_uri_async(fileToReplace, uri, thumbnail) - }} + } } DEFINE_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]) [CLSID_StorageFile]); 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(&self, accessMode: FileAccessMode, options: StorageOpenOptions, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn OpenTransactedWriteWithOptionsAsync(&self, options: StorageOpenOptions, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + fn OpenWithOptionsAsync(&self, accessMode: FileAccessMode, options: StorageOpenOptions, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn OpenTransactedWriteWithOptionsAsync(&self, options: StorageOpenOptions, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IStorageFile2 { - #[inline] pub unsafe fn open_with_options_async(&self, accessMode: FileAccessMode, options: StorageOpenOptions) -> Result>> { + #[inline] pub fn open_with_options_async(&self, accessMode: FileAccessMode, options: StorageOpenOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenWithOptionsAsync)(self as *const _ as *mut _, 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(&self, options: StorageOpenOptions) -> Result>> { + }} + #[inline] pub fn open_transacted_write_with_options_async(&self, options: StorageOpenOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenTransactedWriteWithOptionsAsync)(self as *const _ as *mut _, options, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut bool) -> HRESULT }} impl IStorageFilePropertiesWithAvailability { - #[inline] pub unsafe fn get_is_available(&self) -> Result { + #[inline] pub fn get_is_available(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsAvailable)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } 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(&self, path: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn GetFileFromApplicationUriAsync(&self, uri: *mut super::foundation::Uri, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn CreateStreamedFileAsync(&self, displayNameWithExtension: HSTRING, dataRequested: *mut StreamedFileDataRequestedHandler, thumbnail: *mut streams::IRandomAccessStreamReference, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn ReplaceWithStreamedFileAsync(&self, fileToReplace: *mut IStorageFile, dataRequested: *mut StreamedFileDataRequestedHandler, thumbnail: *mut streams::IRandomAccessStreamReference, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn CreateStreamedFileFromUriAsync(&self, displayNameWithExtension: HSTRING, uri: *mut super::foundation::Uri, thumbnail: *mut streams::IRandomAccessStreamReference, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn ReplaceWithStreamedFileFromUriAsync(&self, fileToReplace: *mut IStorageFile, uri: *mut super::foundation::Uri, thumbnail: *mut streams::IRandomAccessStreamReference, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + fn GetFileFromPathAsync(&self, path: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetFileFromApplicationUriAsync(&self, uri: *mut foundation::Uri, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreateStreamedFileAsync(&self, displayNameWithExtension: HSTRING, dataRequested: *mut StreamedFileDataRequestedHandler, thumbnail: *mut streams::IRandomAccessStreamReference, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ReplaceWithStreamedFileAsync(&self, fileToReplace: *mut IStorageFile, dataRequested: *mut StreamedFileDataRequestedHandler, thumbnail: *mut streams::IRandomAccessStreamReference, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreateStreamedFileFromUriAsync(&self, displayNameWithExtension: HSTRING, uri: *mut foundation::Uri, thumbnail: *mut streams::IRandomAccessStreamReference, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ReplaceWithStreamedFileFromUriAsync(&self, fileToReplace: *mut IStorageFile, uri: *mut foundation::Uri, thumbnail: *mut streams::IRandomAccessStreamReference, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IStorageFileStatics { - #[inline] pub unsafe fn get_file_from_path_async(&self, path: &HStringArg) -> Result>> { + #[inline] pub fn get_file_from_path_async(&self, path: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFileFromPathAsync)(self as *const _ as *mut _, 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(&self, uri: &super::foundation::Uri) -> Result>> { + }} + #[inline] pub fn get_file_from_application_uri_async(&self, uri: &foundation::Uri) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFileFromApplicationUriAsync)(self 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 create_streamed_file_async(&self, displayNameWithExtension: &HStringArg, dataRequested: &StreamedFileDataRequestedHandler, thumbnail: &streams::IRandomAccessStreamReference) -> Result>> { + }} + #[inline] pub fn create_streamed_file_async(&self, displayNameWithExtension: &HStringArg, dataRequested: &StreamedFileDataRequestedHandler, thumbnail: &streams::IRandomAccessStreamReference) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateStreamedFileAsync)(self as *const _ as *mut _, 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(&self, fileToReplace: &IStorageFile, dataRequested: &StreamedFileDataRequestedHandler, thumbnail: &streams::IRandomAccessStreamReference) -> Result>> { + }} + #[inline] pub fn replace_with_streamed_file_async(&self, fileToReplace: &IStorageFile, dataRequested: &StreamedFileDataRequestedHandler, thumbnail: &streams::IRandomAccessStreamReference) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReplaceWithStreamedFileAsync)(self as *const _ as *mut _, 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(&self, displayNameWithExtension: &HStringArg, uri: &super::foundation::Uri, thumbnail: &streams::IRandomAccessStreamReference) -> Result>> { + }} + #[inline] pub fn create_streamed_file_from_uri_async(&self, displayNameWithExtension: &HStringArg, uri: &foundation::Uri, thumbnail: &streams::IRandomAccessStreamReference) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateStreamedFileFromUriAsync)(self as *const _ as *mut _, 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(&self, fileToReplace: &IStorageFile, uri: &super::foundation::Uri, thumbnail: &streams::IRandomAccessStreamReference) -> Result>> { + }} + #[inline] pub fn replace_with_streamed_file_from_uri_async(&self, fileToReplace: &IStorageFile, uri: &foundation::Uri, thumbnail: &streams::IRandomAccessStreamReference) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReplaceWithStreamedFileFromUriAsync)(self as *const _ as *mut _, 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) } - } + }} } 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(&self, desiredName: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn CreateFileAsync(&self, desiredName: HSTRING, options: CreationCollisionOption, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn CreateFolderAsyncOverloadDefaultOptions(&self, desiredName: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn CreateFolderAsync(&self, desiredName: HSTRING, options: CreationCollisionOption, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn GetFileAsync(&self, name: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn GetFolderAsync(&self, name: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn GetItemAsync(&self, name: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn GetFilesAsyncOverloadDefaultOptionsStartAndCount(&self, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, - fn GetFoldersAsyncOverloadDefaultOptionsStartAndCount(&self, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, - fn GetItemsAsyncOverloadDefaultStartAndCount(&self, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT + fn CreateFileAsyncOverloadDefaultOptions(&self, desiredName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreateFileAsync(&self, desiredName: HSTRING, options: CreationCollisionOption, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreateFolderAsyncOverloadDefaultOptions(&self, desiredName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreateFolderAsync(&self, desiredName: HSTRING, options: CreationCollisionOption, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetFileAsync(&self, name: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetFolderAsync(&self, name: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetItemAsync(&self, name: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetFilesAsyncOverloadDefaultOptionsStartAndCount(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetFoldersAsyncOverloadDefaultOptionsStartAndCount(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetItemsAsyncOverloadDefaultStartAndCount(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IStorageFolder { - #[inline] pub unsafe fn create_file_async_overload_default_options(&self, desiredName: &HStringArg) -> Result>> { + #[inline] pub fn create_file_async_overload_default_options(&self, desiredName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFileAsyncOverloadDefaultOptions)(self as *const _ as *mut _, desiredName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_file_async(&self, desiredName: &HStringArg, options: CreationCollisionOption) -> Result>> { + }} + #[inline] pub fn create_file_async(&self, desiredName: &HStringArg, options: CreationCollisionOption) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFileAsync)(self as *const _ as *mut _, 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(&self, desiredName: &HStringArg) -> Result>> { + }} + #[inline] pub fn create_folder_async_overload_default_options(&self, desiredName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFolderAsyncOverloadDefaultOptions)(self as *const _ as *mut _, desiredName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_folder_async(&self, desiredName: &HStringArg, options: CreationCollisionOption) -> Result>> { + }} + #[inline] pub fn create_folder_async(&self, desiredName: &HStringArg, options: CreationCollisionOption) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFolderAsync)(self as *const _ as *mut _, desiredName.get(), options, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_file_async(&self, name: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_file_async(&self, name: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFileAsync)(self as *const _ as *mut _, name.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_folder_async(&self, name: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_folder_async(&self, name: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFolderAsync)(self as *const _ as *mut _, name.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_item_async(&self, name: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_item_async(&self, name: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetItemAsync)(self as *const _ as *mut _, 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(&self) -> Result>>> { + }} + #[inline] pub fn get_files_async_overload_default_options_start_and_count(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFilesAsyncOverloadDefaultOptionsStartAndCount)(self as *const _ as *mut _, &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(&self) -> Result>>> { + }} + #[inline] pub fn get_folders_async_overload_default_options_start_and_count(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFoldersAsyncOverloadDefaultOptionsStartAndCount)(self as *const _ as *mut _, &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(&self) -> Result>>> { + }} + #[inline] pub fn get_items_async_overload_default_start_and_count(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetItemsAsyncOverloadDefaultStartAndCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class StorageFolder: IStorageFolder} impl RtActivatable for StorageFolder {} impl StorageFolder { - #[inline] pub fn get_folder_from_path_async(path: &HStringArg) -> Result>> { unsafe { + #[inline] pub fn get_folder_from_path_async(path: &HStringArg) -> Result>> { >::get_activation_factory().get_folder_from_path_async(path) - }} + } } DEFINE_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]) [CLSID_StorageFolder]); 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(&self, name: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + fn TryGetItemAsync(&self, name: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IStorageFolder2 { - #[inline] pub unsafe fn try_get_item_async(&self, name: &HStringArg) -> Result>> { + #[inline] pub fn try_get_item_async(&self, name: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetItemAsync)(self as *const _ as *mut _, name.get(), &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(&self, path: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + fn GetFolderFromPathAsync(&self, path: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IStorageFolderStatics { - #[inline] pub unsafe fn get_folder_from_path_async(&self, path: &HStringArg) -> Result>> { + #[inline] pub fn get_folder_from_path_async(&self, path: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFolderFromPathAsync)(self as *const _ as *mut _, path.get(), &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(&self, desiredName: HSTRING, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn RenameAsync(&self, desiredName: HSTRING, option: NameCollisionOption, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn DeleteAsyncOverloadDefaultOptions(&self, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn DeleteAsync(&self, option: StorageDeleteOption, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT, - fn GetBasicPropertiesAsync(&self, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn RenameAsyncOverloadDefaultOptions(&self, desiredName: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn RenameAsync(&self, desiredName: HSTRING, option: NameCollisionOption, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn DeleteAsyncOverloadDefaultOptions(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn DeleteAsync(&self, option: StorageDeleteOption, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn GetBasicPropertiesAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn get_Name(&self, out: *mut HSTRING) -> HRESULT, fn get_Path(&self, out: *mut HSTRING) -> HRESULT, fn get_Attributes(&self, out: *mut FileAttributes) -> HRESULT, - fn get_DateCreated(&self, out: *mut super::foundation::DateTime) -> HRESULT, + fn get_DateCreated(&self, out: *mut foundation::DateTime) -> HRESULT, fn IsOfType(&self, type_: StorageItemTypes, out: *mut bool) -> HRESULT }} impl IStorageItem { - #[inline] pub unsafe fn rename_async_overload_default_options(&self, desiredName: &HStringArg) -> Result> { + #[inline] pub fn rename_async_overload_default_options(&self, desiredName: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RenameAsyncOverloadDefaultOptions)(self as *const _ as *mut _, desiredName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn rename_async(&self, desiredName: &HStringArg, option: NameCollisionOption) -> Result> { + }} + #[inline] pub fn rename_async(&self, desiredName: &HStringArg, option: NameCollisionOption) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RenameAsync)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[inline] pub fn delete_async_overload_default_options(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteAsyncOverloadDefaultOptions)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete_async(&self, option: StorageDeleteOption) -> Result> { + }} + #[inline] pub fn delete_async(&self, option: StorageDeleteOption) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteAsync)(self as *const _ as *mut _, option, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_basic_properties_async(&self) -> Result>> { + }} + #[inline] pub fn get_basic_properties_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetBasicPropertiesAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_name(&self) -> Result { + }} + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_path(&self) -> Result { + }} + #[inline] pub fn get_path(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Path)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_attributes(&self) -> Result { + }} + #[inline] pub fn get_attributes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Attributes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_date_created(&self) -> Result { + }} + #[inline] pub fn get_date_created(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DateCreated)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_of_type(&self, type_: StorageItemTypes) -> Result { + }} + #[inline] pub fn is_of_type(&self, type_: StorageItemTypes) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsOfType)(self as *const _ as *mut _, type_, &mut out); if hr == S_OK { Ok(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(&self, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn GetParentAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn IsEqual(&self, item: *mut IStorageItem, out: *mut bool) -> HRESULT }} impl IStorageItem2 { - #[inline] pub unsafe fn get_parent_async(&self) -> Result>> { + #[inline] pub fn get_parent_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetParentAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn is_equal(&self, item: &IStorageItem) -> Result { + }} + #[inline] pub fn is_equal(&self, item: &IStorageItem) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsEqual)(self as *const _ as *mut _, 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(&self, mode: fileproperties::ThumbnailMode, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn GetThumbnailAsyncOverloadDefaultOptions(&self, mode: fileproperties::ThumbnailMode, requestedSize: u32, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn GetThumbnailAsync(&self, mode: fileproperties::ThumbnailMode, requestedSize: u32, options: fileproperties::ThumbnailOptions, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn GetThumbnailAsyncOverloadDefaultSizeDefaultOptions(&self, mode: fileproperties::ThumbnailMode, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetThumbnailAsyncOverloadDefaultOptions(&self, mode: fileproperties::ThumbnailMode, requestedSize: u32, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetThumbnailAsync(&self, mode: fileproperties::ThumbnailMode, requestedSize: u32, options: fileproperties::ThumbnailOptions, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn get_DisplayName(&self, out: *mut HSTRING) -> HRESULT, fn get_DisplayType(&self, out: *mut HSTRING) -> HRESULT, fn get_FolderRelativeId(&self, out: *mut HSTRING) -> HRESULT, fn get_Properties(&self, out: *mut *mut fileproperties::StorageItemContentProperties) -> HRESULT }} impl IStorageItemProperties { - #[inline] pub unsafe fn get_thumbnail_async_overload_default_size_default_options(&self, mode: fileproperties::ThumbnailMode) -> Result>> { + #[inline] pub fn get_thumbnail_async_overload_default_size_default_options(&self, mode: fileproperties::ThumbnailMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetThumbnailAsyncOverloadDefaultSizeDefaultOptions)(self as *const _ as *mut _, mode, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_thumbnail_async_overload_default_options(&self, mode: fileproperties::ThumbnailMode, requestedSize: u32) -> Result>> { + }} + #[inline] pub fn get_thumbnail_async_overload_default_options(&self, mode: fileproperties::ThumbnailMode, requestedSize: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetThumbnailAsyncOverloadDefaultOptions)(self as *const _ as *mut _, mode, requestedSize, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_thumbnail_async(&self, mode: fileproperties::ThumbnailMode, requestedSize: u32, options: fileproperties::ThumbnailOptions) -> Result>> { + }} + #[inline] pub fn get_thumbnail_async(&self, mode: fileproperties::ThumbnailMode, requestedSize: u32, options: fileproperties::ThumbnailOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetThumbnailAsync)(self as *const _ as *mut _, mode, requestedSize, options, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_type(&self) -> Result { + }} + #[inline] pub fn get_display_type(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_folder_relative_id(&self) -> Result { + }} + #[inline] pub fn get_folder_relative_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FolderRelativeId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result> { + }} + #[inline] pub fn get_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, mode: fileproperties::ThumbnailMode, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn GetScaledImageAsThumbnailAsyncOverloadDefaultOptions(&self, mode: fileproperties::ThumbnailMode, requestedSize: u32, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn GetScaledImageAsThumbnailAsync(&self, mode: fileproperties::ThumbnailMode, requestedSize: u32, options: fileproperties::ThumbnailOptions, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + fn GetScaledImageAsThumbnailAsyncOverloadDefaultSizeDefaultOptions(&self, mode: fileproperties::ThumbnailMode, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetScaledImageAsThumbnailAsyncOverloadDefaultOptions(&self, mode: fileproperties::ThumbnailMode, requestedSize: u32, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetScaledImageAsThumbnailAsync(&self, mode: fileproperties::ThumbnailMode, requestedSize: u32, options: fileproperties::ThumbnailOptions, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IStorageItemProperties2 { - #[inline] pub unsafe fn get_scaled_image_as_thumbnail_async_overload_default_size_default_options(&self, mode: fileproperties::ThumbnailMode) -> Result>> { + #[inline] pub fn get_scaled_image_as_thumbnail_async_overload_default_size_default_options(&self, mode: fileproperties::ThumbnailMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetScaledImageAsThumbnailAsyncOverloadDefaultSizeDefaultOptions)(self as *const _ as *mut _, 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(&self, mode: fileproperties::ThumbnailMode, requestedSize: u32) -> Result>> { + }} + #[inline] pub fn get_scaled_image_as_thumbnail_async_overload_default_options(&self, mode: fileproperties::ThumbnailMode, requestedSize: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetScaledImageAsThumbnailAsyncOverloadDefaultOptions)(self as *const _ as *mut _, 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(&self, mode: fileproperties::ThumbnailMode, requestedSize: u32, options: fileproperties::ThumbnailOptions) -> Result>> { + }} + #[inline] pub fn get_scaled_image_as_thumbnail_async(&self, mode: fileproperties::ThumbnailMode, requestedSize: u32, options: fileproperties::ThumbnailOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetScaledImageAsThumbnailAsync)(self as *const _ as *mut _, 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(&self, out: *mut *mut StorageProvider) -> HRESULT }} impl IStorageItemPropertiesWithProvider { - #[inline] pub unsafe fn get_provider(&self) -> Result> { + #[inline] pub fn get_provider(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Provider)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum StorageItemTypes: u32 { None (StorageItemTypes_None) = 0, File (StorageItemTypes_File) = 1, Folder (StorageItemTypes_Folder) = 2, }} 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(&self, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn RequestRemoveFolderAsync(&self, folder: *mut StorageFolder, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn get_Folders(&self, out: *mut *mut super::foundation::collections::IObservableVector) -> HRESULT, + fn RequestAddFolderAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestRemoveFolderAsync(&self, folder: *mut StorageFolder, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn get_Folders(&self, out: *mut *mut foundation::collections::IObservableVector) -> HRESULT, fn get_SaveFolder(&self, out: *mut *mut StorageFolder) -> HRESULT, - fn add_DefinitionChanged(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DefinitionChanged(&self, eventCookie: super::foundation::EventRegistrationToken) -> HRESULT + fn add_DefinitionChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DefinitionChanged(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT }} impl IStorageLibrary { - #[inline] pub unsafe fn request_add_folder_async(&self) -> Result>> { + #[inline] pub fn request_add_folder_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAddFolderAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_remove_folder_async(&self, folder: &StorageFolder) -> Result>> { + }} + #[inline] pub fn request_remove_folder_async(&self, folder: &StorageFolder) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestRemoveFolderAsync)(self as *const _ as *mut _, folder as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_folders(&self) -> Result>> { + }} + #[inline] pub fn get_folders(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Folders)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_save_folder(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_save_folder(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SaveFolder)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_definition_changed(&self, handler: &super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_definition_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DefinitionChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_definition_changed(&self, eventCookie: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_definition_changed(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DefinitionChanged)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class StorageLibrary: IStorageLibrary} impl RtActivatable for StorageLibrary {} impl RtActivatable for StorageLibrary {} impl StorageLibrary { - #[inline] pub fn get_library_async(libraryId: KnownLibraryId) -> Result>> { unsafe { + #[inline] pub fn get_library_async(libraryId: KnownLibraryId) -> Result>> { >::get_activation_factory().get_library_async(libraryId) - }} - #[cfg(feature="windows-system")] #[inline] pub fn get_library_for_user_async(user: &super::system::User, libraryId: KnownLibraryId) -> Result>> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn get_library_for_user_async(user: &super::system::User, libraryId: KnownLibraryId) -> Result>> { >::get_activation_factory().get_library_for_user_async(user, libraryId) - }} + } } DEFINE_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]) [CLSID_StorageLibrary]); DEFINE_IID!(IID_IStorageLibrary2, 1527571272, 64691, 16433, 175, 176, 166, 141, 123, 212, 69, 52); @@ -1411,22 +1411,22 @@ RT_INTERFACE!{interface IStorageLibrary2(IStorageLibrary2Vtbl): IInspectable(IIn fn get_ChangeTracker(&self, out: *mut *mut StorageLibraryChangeTracker) -> HRESULT }} impl IStorageLibrary2 { - #[inline] pub unsafe fn get_change_tracker(&self) -> Result> { + #[inline] pub fn get_change_tracker(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ChangeTracker)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IStorageLibrary3, 2317882001, 8532, 16897, 129, 19, 210, 192, 92, 225, 173, 35); RT_INTERFACE!{interface IStorageLibrary3(IStorageLibrary3Vtbl): IInspectable(IInspectableVtbl) [IID_IStorageLibrary3] { - fn AreFolderSuggestionsAvailableAsync(&self, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + fn AreFolderSuggestionsAvailableAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IStorageLibrary3 { - #[inline] pub unsafe fn are_folder_suggestions_available_async(&self) -> Result>> { + #[inline] pub fn are_folder_suggestions_available_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AreFolderSuggestionsAvailableAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IStorageLibraryChange, 9964323, 11234, 18697, 170, 72, 21, 159, 82, 3, 165, 30); RT_INTERFACE!{interface IStorageLibraryChange(IStorageLibraryChangeVtbl): IInspectable(IInspectableVtbl) [IID_IStorageLibraryChange] { @@ -1434,52 +1434,52 @@ RT_INTERFACE!{interface IStorageLibraryChange(IStorageLibraryChangeVtbl): IInspe fn get_Path(&self, out: *mut HSTRING) -> HRESULT, fn get_PreviousPath(&self, out: *mut HSTRING) -> HRESULT, fn IsOfType(&self, type_: StorageItemTypes, out: *mut bool) -> HRESULT, - fn GetStorageItemAsync(&self, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + fn GetStorageItemAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IStorageLibraryChange { - #[inline] pub unsafe fn get_change_type(&self) -> Result { + #[inline] pub fn get_change_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ChangeType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_path(&self) -> Result { + }} + #[inline] pub fn get_path(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Path)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_previous_path(&self) -> Result { + }} + #[inline] pub fn get_previous_path(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PreviousPath)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn is_of_type(&self, type_: StorageItemTypes) -> Result { + }} + #[inline] pub fn is_of_type(&self, type_: StorageItemTypes) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsOfType)(self as *const _ as *mut _, type_, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_storage_item_async(&self) -> Result>> { + }} + #[inline] pub fn get_storage_item_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetStorageItemAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(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(&self, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, - fn AcceptChangesAsync(&self, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT + fn ReadBatchAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn AcceptChangesAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IStorageLibraryChangeReader { - #[inline] pub unsafe fn read_batch_async(&self) -> Result>>> { + #[inline] pub fn read_batch_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadBatchAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn accept_changes_async(&self) -> Result> { + }} + #[inline] pub fn accept_changes_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AcceptChangesAsync)(self as *const _ as *mut _, &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); @@ -1489,19 +1489,19 @@ RT_INTERFACE!{interface IStorageLibraryChangeTracker(IStorageLibraryChangeTracke fn Reset(&self) -> HRESULT }} impl IStorageLibraryChangeTracker { - #[inline] pub unsafe fn get_change_reader(&self) -> Result> { + #[inline] pub fn get_change_reader(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetChangeReader)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn enable(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn enable(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Enable)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn reset(&self) -> Result<()> { + }} + #[inline] pub fn reset(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Reset)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class StorageLibraryChangeTracker: IStorageLibraryChangeTracker} RT_ENUM! { enum StorageLibraryChangeType: i32 { @@ -1509,25 +1509,25 @@ RT_ENUM! { enum StorageLibraryChangeType: i32 { }} 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(&self, libraryId: KnownLibraryId, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + fn GetLibraryAsync(&self, libraryId: KnownLibraryId, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IStorageLibraryStatics { - #[inline] pub unsafe fn get_library_async(&self, libraryId: KnownLibraryId) -> Result>> { + #[inline] pub fn get_library_async(&self, libraryId: KnownLibraryId) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetLibraryAsync)(self as *const _ as *mut _, libraryId, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, user: *mut super::system::User, libraryId: KnownLibraryId, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-system")] fn GetLibraryForUserAsync(&self, user: *mut super::system::User, libraryId: KnownLibraryId, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IStorageLibraryStatics2 { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_library_for_user_async(&self, user: &super::system::User, libraryId: KnownLibraryId) -> Result>> { + #[cfg(feature="windows-system")] #[inline] pub fn get_library_for_user_async(&self, user: &super::system::User, libraryId: KnownLibraryId) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetLibraryForUserAsync)(self as *const _ as *mut _, user as *const _ as *mut _, libraryId, &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, AllowReadersAndWriters (StorageOpenOptions_AllowReadersAndWriters) = 2, @@ -1538,45 +1538,45 @@ RT_INTERFACE!{interface IStorageProvider(IStorageProviderVtbl): IInspectable(IIn fn get_DisplayName(&self, out: *mut HSTRING) -> HRESULT }} impl IStorageProvider { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class StorageProvider: IStorageProvider} DEFINE_IID!(IID_IStorageProvider2, 17635607, 13316, 16715, 159, 215, 205, 68, 71, 46, 170, 57); RT_INTERFACE!{interface IStorageProvider2(IStorageProvider2Vtbl): IInspectable(IInspectableVtbl) [IID_IStorageProvider2] { - fn IsPropertySupportedForPartialFileAsync(&self, propertyCanonicalName: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + fn IsPropertySupportedForPartialFileAsync(&self, propertyCanonicalName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IStorageProvider2 { - #[inline] pub unsafe fn is_property_supported_for_partial_file_async(&self, propertyCanonicalName: &HStringArg) -> Result>> { + #[inline] pub fn is_property_supported_for_partial_file_async(&self, propertyCanonicalName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).IsPropertySupportedForPartialFileAsync)(self as *const _ as *mut _, propertyCanonicalName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut streams::IRandomAccessStream) -> HRESULT, - fn CommitAsync(&self, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT + fn CommitAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IStorageStreamTransaction { - #[inline] pub unsafe fn get_stream(&self) -> Result> { + #[inline] pub fn get_stream(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Stream)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn commit_async(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn commit_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CommitAsync)(self 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_IStreamedFileDataRequest, 376700110, 55997, 19792, 190, 238, 24, 11, 138, 129, 145, 182); @@ -1584,10 +1584,10 @@ RT_INTERFACE!{interface IStreamedFileDataRequest(IStreamedFileDataRequestVtbl): fn FailAndClose(&self, failureMode: StreamedFileFailureMode) -> HRESULT }} impl IStreamedFileDataRequest { - #[inline] pub unsafe fn fail_and_close(&self, failureMode: StreamedFileFailureMode) -> Result<()> { + #[inline] pub fn fail_and_close(&self, failureMode: StreamedFileFailureMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).FailAndClose)(self as *const _ as *mut _, 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); @@ -1595,10 +1595,10 @@ RT_DELEGATE!{delegate StreamedFileDataRequestedHandler(StreamedFileDataRequested fn Invoke(&self, stream: *mut StreamedFileDataRequest) -> HRESULT }} impl StreamedFileDataRequestedHandler { - #[inline] pub unsafe fn invoke(&self, stream: &StreamedFileDataRequest) -> Result<()> { + #[inline] pub fn invoke(&self, stream: &StreamedFileDataRequest) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, stream as *const _ as *mut _); 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, @@ -1608,11 +1608,11 @@ RT_INTERFACE!{interface ISystemAudioProperties(ISystemAudioPropertiesVtbl): IIns fn get_EncodingBitrate(&self, out: *mut HSTRING) -> HRESULT }} impl ISystemAudioProperties { - #[inline] pub unsafe fn get_encoding_bitrate(&self) -> Result { + #[inline] pub fn get_encoding_bitrate(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EncodingBitrate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class SystemAudioProperties: ISystemAudioProperties} DEFINE_IID!(IID_ISystemDataPaths, 3811229552, 55546, 17900, 169, 66, 210, 226, 111, 182, 11, 165); @@ -1635,93 +1635,93 @@ RT_INTERFACE!{interface ISystemDataPaths(ISystemDataPathsVtbl): IInspectable(IIn fn get_Windows(&self, out: *mut HSTRING) -> HRESULT }} impl ISystemDataPaths { - #[inline] pub unsafe fn get_fonts(&self) -> Result { + #[inline] pub fn get_fonts(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Fonts)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_program_data(&self) -> Result { + }} + #[inline] pub fn get_program_data(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProgramData)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_public(&self) -> Result { + }} + #[inline] pub fn get_public(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Public)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_public_desktop(&self) -> Result { + }} + #[inline] pub fn get_public_desktop(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PublicDesktop)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_public_documents(&self) -> Result { + }} + #[inline] pub fn get_public_documents(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PublicDocuments)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_public_downloads(&self) -> Result { + }} + #[inline] pub fn get_public_downloads(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PublicDownloads)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_public_music(&self) -> Result { + }} + #[inline] pub fn get_public_music(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PublicMusic)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_public_pictures(&self) -> Result { + }} + #[inline] pub fn get_public_pictures(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PublicPictures)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_public_videos(&self) -> Result { + }} + #[inline] pub fn get_public_videos(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PublicVideos)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_system(&self) -> Result { + }} + #[inline] pub fn get_system(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_System)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_system_host(&self) -> Result { + }} + #[inline] pub fn get_system_host(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SystemHost)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_system_x86(&self) -> Result { + }} + #[inline] pub fn get_system_x86(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SystemX86)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_system_x64(&self) -> Result { + }} + #[inline] pub fn get_system_x64(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SystemX64)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_system_arm(&self) -> Result { + }} + #[inline] pub fn get_system_arm(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SystemArm)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_user_profiles(&self) -> Result { + }} + #[inline] pub fn get_user_profiles(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UserProfiles)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_windows(&self) -> Result { + }} + #[inline] pub fn get_windows(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Windows)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class SystemDataPaths: ISystemDataPaths} impl RtActivatable for SystemDataPaths {} impl SystemDataPaths { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} + } } DEFINE_CLSID!(SystemDataPaths(&[87,105,110,100,111,119,115,46,83,116,111,114,97,103,101,46,83,121,115,116,101,109,68,97,116,97,80,97,116,104,115,0]) [CLSID_SystemDataPaths]); DEFINE_IID!(IID_ISystemDataPathsStatics, 3774443472, 39200, 19402, 179, 121, 249, 111, 223, 124, 170, 216); @@ -1729,11 +1729,11 @@ RT_INTERFACE!{static interface ISystemDataPathsStatics(ISystemDataPathsStaticsVt fn GetDefault(&self, out: *mut *mut SystemDataPaths) -> HRESULT }} impl ISystemDataPathsStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); - let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_ISystemGPSProperties, 3237244596, 49524, 18458, 188, 37, 146, 25, 134, 246, 166, 243); RT_INTERFACE!{interface ISystemGPSProperties(ISystemGPSPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_ISystemGPSProperties] { @@ -1741,16 +1741,16 @@ RT_INTERFACE!{interface ISystemGPSProperties(ISystemGPSPropertiesVtbl): IInspect fn get_LongitudeDecimal(&self, out: *mut HSTRING) -> HRESULT }} impl ISystemGPSProperties { - #[inline] pub unsafe fn get_latitude_decimal(&self) -> Result { + #[inline] pub fn get_latitude_decimal(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LatitudeDecimal)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_longitude_decimal(&self) -> Result { + }} + #[inline] pub fn get_longitude_decimal(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LongitudeDecimal)(self as *const _ as *mut _, &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); @@ -1759,16 +1759,16 @@ RT_INTERFACE!{interface ISystemImageProperties(ISystemImagePropertiesVtbl): IIns fn get_VerticalSize(&self, out: *mut HSTRING) -> HRESULT }} impl ISystemImageProperties { - #[inline] pub unsafe fn get_horizontal_size(&self) -> Result { + #[inline] pub fn get_horizontal_size(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HorizontalSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_vertical_size(&self) -> Result { + }} + #[inline] pub fn get_vertical_size(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VerticalSize)(self as *const _ as *mut _, &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); @@ -1781,36 +1781,36 @@ RT_INTERFACE!{interface ISystemMediaProperties(ISystemMediaPropertiesVtbl): IIns fn get_Year(&self, out: *mut HSTRING) -> HRESULT }} impl ISystemMediaProperties { - #[inline] pub unsafe fn get_duration(&self) -> Result { + #[inline] pub fn get_duration(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Duration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_producer(&self) -> Result { + }} + #[inline] pub fn get_producer(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Producer)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_publisher(&self) -> Result { + }} + #[inline] pub fn get_publisher(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Publisher)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sub_title(&self) -> Result { + }} + #[inline] pub fn get_sub_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SubTitle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_writer(&self) -> Result { + }} + #[inline] pub fn get_writer(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Writer)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_year(&self) -> Result { + }} + #[inline] pub fn get_year(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Year)(self as *const _ as *mut _, &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); @@ -1825,46 +1825,46 @@ RT_INTERFACE!{interface ISystemMusicProperties(ISystemMusicPropertiesVtbl): IIns fn get_TrackNumber(&self, out: *mut HSTRING) -> HRESULT }} impl ISystemMusicProperties { - #[inline] pub unsafe fn get_album_artist(&self) -> Result { + #[inline] pub fn get_album_artist(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AlbumArtist)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_album_title(&self) -> Result { + }} + #[inline] pub fn get_album_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AlbumTitle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_artist(&self) -> Result { + }} + #[inline] pub fn get_artist(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Artist)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_composer(&self) -> Result { + }} + #[inline] pub fn get_composer(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Composer)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_conductor(&self) -> Result { + }} + #[inline] pub fn get_conductor(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Conductor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_artist(&self) -> Result { + }} + #[inline] pub fn get_display_artist(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayArtist)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_genre(&self) -> Result { + }} + #[inline] pub fn get_genre(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Genre)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_track_number(&self) -> Result { + }} + #[inline] pub fn get_track_number(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TrackNumber)(self as *const _ as *mut _, &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); @@ -1876,31 +1876,31 @@ RT_INTERFACE!{interface ISystemPhotoProperties(ISystemPhotoPropertiesVtbl): IIns fn get_PeopleNames(&self, out: *mut HSTRING) -> HRESULT }} impl ISystemPhotoProperties { - #[inline] pub unsafe fn get_camera_manufacturer(&self) -> Result { + #[inline] pub fn get_camera_manufacturer(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CameraManufacturer)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_camera_model(&self) -> Result { + }} + #[inline] pub fn get_camera_model(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CameraModel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_date_taken(&self) -> Result { + }} + #[inline] pub fn get_date_taken(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DateTaken)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_orientation(&self) -> Result { + }} + #[inline] pub fn get_orientation(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Orientation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_people_names(&self) -> Result { + }} + #[inline] pub fn get_people_names(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PeopleNames)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class SystemPhotoProperties: ISystemPhotoProperties} DEFINE_IID!(IID_ISystemProperties, 2440720833, 34291, 19921, 176, 1, 165, 11, 253, 33, 200, 210); @@ -1920,114 +1920,114 @@ RT_INTERFACE!{static interface ISystemProperties(ISystemPropertiesVtbl): IInspec fn get_Image(&self, out: *mut *mut SystemImageProperties) -> HRESULT }} impl ISystemProperties { - #[inline] pub unsafe fn get_author(&self) -> Result { + #[inline] pub fn get_author(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Author)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_comment(&self) -> Result { + }} + #[inline] pub fn get_comment(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Comment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_item_name_display(&self) -> Result { + }} + #[inline] pub fn get_item_name_display(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ItemNameDisplay)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_keywords(&self) -> Result { + }} + #[inline] pub fn get_keywords(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Keywords)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rating(&self) -> Result { + }} + #[inline] pub fn get_rating(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Rating)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_title(&self) -> Result { + }} + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_audio(&self) -> Result> { + }} + #[inline] pub fn get_audio(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Audio)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_gps(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_gps(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_GPS)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_media(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_media(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Media)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_music(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_music(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Music)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_photo(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_photo(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Photo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_video(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Video)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_image(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_image(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Image)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{static class SystemProperties} impl RtActivatable for SystemProperties {} impl SystemProperties { - #[inline] pub fn get_author() -> Result { unsafe { + #[inline] pub fn get_author() -> Result { >::get_activation_factory().get_author() - }} - #[inline] pub fn get_comment() -> Result { unsafe { + } + #[inline] pub fn get_comment() -> Result { >::get_activation_factory().get_comment() - }} - #[inline] pub fn get_item_name_display() -> Result { unsafe { + } + #[inline] pub fn get_item_name_display() -> Result { >::get_activation_factory().get_item_name_display() - }} - #[inline] pub fn get_keywords() -> Result { unsafe { + } + #[inline] pub fn get_keywords() -> Result { >::get_activation_factory().get_keywords() - }} - #[inline] pub fn get_rating() -> Result { unsafe { + } + #[inline] pub fn get_rating() -> Result { >::get_activation_factory().get_rating() - }} - #[inline] pub fn get_title() -> Result { unsafe { + } + #[inline] pub fn get_title() -> Result { >::get_activation_factory().get_title() - }} - #[inline] pub fn get_audio() -> Result> { unsafe { + } + #[inline] pub fn get_audio() -> Result>> { >::get_activation_factory().get_audio() - }} - #[inline] pub fn get_gps() -> Result> { unsafe { + } + #[inline] pub fn get_gps() -> Result>> { >::get_activation_factory().get_gps() - }} - #[inline] pub fn get_media() -> Result> { unsafe { + } + #[inline] pub fn get_media() -> Result>> { >::get_activation_factory().get_media() - }} - #[inline] pub fn get_music() -> Result> { unsafe { + } + #[inline] pub fn get_music() -> Result>> { >::get_activation_factory().get_music() - }} - #[inline] pub fn get_photo() -> Result> { unsafe { + } + #[inline] pub fn get_photo() -> Result>> { >::get_activation_factory().get_photo() - }} - #[inline] pub fn get_video() -> Result> { unsafe { + } + #[inline] pub fn get_video() -> Result>> { >::get_activation_factory().get_video() - }} - #[inline] pub fn get_image() -> Result> { unsafe { + } + #[inline] pub fn get_image() -> Result>> { >::get_activation_factory().get_image() - }} + } } DEFINE_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]) [CLSID_SystemProperties]); DEFINE_IID!(IID_ISystemVideoProperties, 541128469, 26616, 17186, 155, 128, 79, 169, 254, 251, 131, 232); @@ -2039,31 +2039,31 @@ RT_INTERFACE!{interface ISystemVideoProperties(ISystemVideoPropertiesVtbl): IIns fn get_TotalBitrate(&self, out: *mut HSTRING) -> HRESULT }} impl ISystemVideoProperties { - #[inline] pub unsafe fn get_director(&self) -> Result { + #[inline] pub fn get_director(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Director)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_frame_height(&self) -> Result { + }} + #[inline] pub fn get_frame_height(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FrameHeight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_frame_width(&self) -> Result { + }} + #[inline] pub fn get_frame_width(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FrameWidth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_orientation(&self) -> Result { + }} + #[inline] pub fn get_orientation(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Orientation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_total_bitrate(&self) -> Result { + }} + #[inline] pub fn get_total_bitrate(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TotalBitrate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class SystemVideoProperties: ISystemVideoProperties} DEFINE_IID!(IID_IUserDataPaths, 4190451986, 43972, 18175, 138, 43, 220, 157, 127, 166, 229, 47); @@ -2089,111 +2089,111 @@ RT_INTERFACE!{interface IUserDataPaths(IUserDataPathsVtbl): IInspectable(IInspec fn get_Videos(&self, out: *mut HSTRING) -> HRESULT }} impl IUserDataPaths { - #[inline] pub unsafe fn get_camera_roll(&self) -> Result { + #[inline] pub fn get_camera_roll(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CameraRoll)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_cookies(&self) -> Result { + }} + #[inline] pub fn get_cookies(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Cookies)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_desktop(&self) -> Result { + }} + #[inline] pub fn get_desktop(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Desktop)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_documents(&self) -> Result { + }} + #[inline] pub fn get_documents(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Documents)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_downloads(&self) -> Result { + }} + #[inline] pub fn get_downloads(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Downloads)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_favorites(&self) -> Result { + }} + #[inline] pub fn get_favorites(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Favorites)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_history(&self) -> Result { + }} + #[inline] pub fn get_history(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_History)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_internet_cache(&self) -> Result { + }} + #[inline] pub fn get_internet_cache(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InternetCache)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_local_app_data(&self) -> Result { + }} + #[inline] pub fn get_local_app_data(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LocalAppData)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_local_app_data_low(&self) -> Result { + }} + #[inline] pub fn get_local_app_data_low(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LocalAppDataLow)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_music(&self) -> Result { + }} + #[inline] pub fn get_music(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Music)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pictures(&self) -> Result { + }} + #[inline] pub fn get_pictures(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Pictures)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_profile(&self) -> Result { + }} + #[inline] pub fn get_profile(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Profile)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_recent(&self) -> Result { + }} + #[inline] pub fn get_recent(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Recent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_roaming_app_data(&self) -> Result { + }} + #[inline] pub fn get_roaming_app_data(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RoamingAppData)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_saved_pictures(&self) -> Result { + }} + #[inline] pub fn get_saved_pictures(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SavedPictures)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_screenshots(&self) -> Result { + }} + #[inline] pub fn get_screenshots(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Screenshots)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_templates(&self) -> Result { + }} + #[inline] pub fn get_templates(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Templates)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_videos(&self) -> Result { + }} + #[inline] pub fn get_videos(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Videos)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class UserDataPaths: IUserDataPaths} impl RtActivatable for UserDataPaths {} impl UserDataPaths { - #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::system::User) -> Result> { unsafe { + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::system::User) -> Result>> { >::get_activation_factory().get_for_user(user) - }} - #[inline] pub fn get_default() -> Result> { unsafe { + } + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} + } } DEFINE_CLSID!(UserDataPaths(&[87,105,110,100,111,119,115,46,83,116,111,114,97,103,101,46,85,115,101,114,68,97,116,97,80,97,116,104,115,0]) [CLSID_UserDataPaths]); DEFINE_IID!(IID_IUserDataPathsStatics, 28483055, 57442, 18593, 139, 12, 242, 199, 169, 202, 86, 192); @@ -2203,16 +2203,16 @@ RT_INTERFACE!{static interface IUserDataPathsStatics(IUserDataPathsStaticsVtbl): fn GetDefault(&self, out: *mut *mut UserDataPaths) -> HRESULT }} impl IUserDataPathsStatics { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_for_user(&self, user: &super::system::User) -> Result> { + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(&self, user: &super::system::User) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForUser)(self as *const _ as *mut _, user as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_default(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } pub mod streams { // Windows.Storage.Streams use ::prelude::*; @@ -2223,34 +2223,34 @@ RT_INTERFACE!{interface IBuffer(IBufferVtbl): IInspectable(IInspectableVtbl) [II fn put_Length(&self, value: u32) -> HRESULT }} impl IBuffer { - #[inline] pub unsafe fn get_capacity(&self) -> Result { + #[inline] pub fn get_capacity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Capacity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_length(&self) -> Result { + }} + #[inline] pub fn get_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Length)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_length(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_length(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Length)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Buffer: IBuffer} impl RtActivatable for Buffer {} impl RtActivatable for Buffer {} impl Buffer { - #[inline] pub fn create(capacity: u32) -> Result> { unsafe { + #[inline] pub fn create(capacity: u32) -> Result> { >::get_activation_factory().create(capacity) - }} - #[inline] pub fn create_copy_from_memory_buffer(input: &super::super::foundation::IMemoryBuffer) -> Result> { unsafe { + } + #[inline] pub fn create_copy_from_memory_buffer(input: &foundation::IMemoryBuffer) -> Result>> { >::get_activation_factory().create_copy_from_memory_buffer(input) - }} - #[inline] pub fn create_memory_buffer_over_ibuffer(input: &IBuffer) -> Result> { unsafe { + } + #[inline] pub fn create_memory_buffer_over_ibuffer(input: &IBuffer) -> Result>> { >::get_activation_factory().create_memory_buffer_over_ibuffer(input) - }} + } } DEFINE_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]) [CLSID_Buffer]); DEFINE_IID!(IID_IBufferFactory, 1907331405, 49423, 18507, 188, 80, 20, 188, 98, 59, 58, 39); @@ -2258,28 +2258,28 @@ RT_INTERFACE!{static interface IBufferFactory(IBufferFactoryVtbl): IInspectable( fn Create(&self, capacity: u32, out: *mut *mut Buffer) -> HRESULT }} impl IBufferFactory { - #[inline] pub unsafe fn create(&self, capacity: u32) -> Result> { + #[inline] pub fn create(&self, capacity: u32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, capacity, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } 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(&self, input: *mut super::super::foundation::IMemoryBuffer, out: *mut *mut Buffer) -> HRESULT, - fn CreateMemoryBufferOverIBuffer(&self, input: *mut IBuffer, out: *mut *mut super::super::foundation::MemoryBuffer) -> HRESULT + fn CreateCopyFromMemoryBuffer(&self, input: *mut foundation::IMemoryBuffer, out: *mut *mut Buffer) -> HRESULT, + fn CreateMemoryBufferOverIBuffer(&self, input: *mut IBuffer, out: *mut *mut foundation::MemoryBuffer) -> HRESULT }} impl IBufferStatics { - #[inline] pub unsafe fn create_copy_from_memory_buffer(&self, input: &super::super::foundation::IMemoryBuffer) -> Result> { + #[inline] pub fn create_copy_from_memory_buffer(&self, input: &foundation::IMemoryBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateCopyFromMemoryBuffer)(self as *const _ as *mut _, 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(&self, input: &IBuffer) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_memory_buffer_over_ibuffer(&self, input: &IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateMemoryBufferOverIBuffer)(self as *const _ as *mut _, input as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum ByteOrder: i32 { LittleEndian (ByteOrder_LittleEndian) = 0, BigEndian (ByteOrder_BigEndian) = 1, @@ -2289,11 +2289,11 @@ RT_INTERFACE!{interface IContentTypeProvider(IContentTypeProviderVtbl): IInspect fn get_ContentType(&self, out: *mut HSTRING) -> HRESULT }} impl IContentTypeProvider { - #[inline] pub unsafe fn get_content_type(&self) -> Result { + #[inline] pub fn get_content_type(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContentType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IDataReader, 3803512873, 46273, 17172, 164, 184, 251, 129, 58, 47, 39, 94); RT_INTERFACE!{interface IDataReader(IDataReaderVtbl): IInspectable(IInspectableVtbl) [IID_IDataReader] { @@ -2318,150 +2318,150 @@ RT_INTERFACE!{interface IDataReader(IDataReaderVtbl): IInspectable(IInspectableV fn ReadSingle(&self, out: *mut f32) -> HRESULT, fn ReadDouble(&self, out: *mut f64) -> HRESULT, fn ReadString(&self, codeUnitCount: u32, out: *mut HSTRING) -> HRESULT, - fn ReadDateTime(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn ReadTimeSpan(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn ReadDateTime(&self, out: *mut foundation::DateTime) -> HRESULT, + fn ReadTimeSpan(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn LoadAsync(&self, count: u32, out: *mut *mut DataReaderLoadOperation) -> HRESULT, fn DetachBuffer(&self, out: *mut *mut IBuffer) -> HRESULT, fn DetachStream(&self, out: *mut *mut IInputStream) -> HRESULT }} impl IDataReader { - #[inline] pub unsafe fn get_unconsumed_buffer_length(&self) -> Result { + #[inline] pub fn get_unconsumed_buffer_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UnconsumedBufferLength)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_unicode_encoding(&self) -> Result { + }} + #[inline] pub fn get_unicode_encoding(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UnicodeEncoding)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_unicode_encoding(&self, value: UnicodeEncoding) -> Result<()> { + }} + #[inline] pub fn set_unicode_encoding(&self, value: UnicodeEncoding) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_UnicodeEncoding)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_byte_order(&self) -> Result { + }} + #[inline] pub fn get_byte_order(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ByteOrder)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_byte_order(&self, value: ByteOrder) -> Result<()> { + }} + #[inline] pub fn set_byte_order(&self, value: ByteOrder) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ByteOrder)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_input_stream_options(&self) -> Result { + }} + #[inline] pub fn get_input_stream_options(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InputStreamOptions)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_input_stream_options(&self, value: InputStreamOptions) -> Result<()> { + }} + #[inline] pub fn set_input_stream_options(&self, value: InputStreamOptions) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InputStreamOptions)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn read_byte(&self) -> Result { + }} + #[inline] pub fn read_byte(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ReadByte)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn read_bytes(&self, value: &mut [u8]) -> Result<()> { + }} + #[inline] pub fn read_bytes(&self, value: &mut [u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReadBytes)(self as *const _ as *mut _, value.len() as u32, value.as_mut_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn read_buffer(&self, length: u32) -> Result> { + }} + #[inline] pub fn read_buffer(&self, length: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadBuffer)(self as *const _ as *mut _, length, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn read_boolean(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn read_boolean(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ReadBoolean)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn read_guid(&self) -> Result { + }} + #[inline] pub fn read_guid(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ReadGuid)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn read_int16(&self) -> Result { + }} + #[inline] pub fn read_int16(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ReadInt16)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn read_int32(&self) -> Result { + }} + #[inline] pub fn read_int32(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ReadInt32)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn read_int64(&self) -> Result { + }} + #[inline] pub fn read_int64(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ReadInt64)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn read_uint16(&self) -> Result { + }} + #[inline] pub fn read_uint16(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ReadUInt16)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn read_uint32(&self) -> Result { + }} + #[inline] pub fn read_uint32(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ReadUInt32)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn read_uint64(&self) -> Result { + }} + #[inline] pub fn read_uint64(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ReadUInt64)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn read_single(&self) -> Result { + }} + #[inline] pub fn read_single(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ReadSingle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn read_double(&self) -> Result { + }} + #[inline] pub fn read_double(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ReadDouble)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn read_string(&self, codeUnitCount: u32) -> Result { + }} + #[inline] pub fn read_string(&self, codeUnitCount: u32) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadString)(self as *const _ as *mut _, codeUnitCount, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn read_date_time(&self) -> Result { + }} + #[inline] pub fn read_date_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ReadDateTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn read_time_span(&self) -> Result { + }} + #[inline] pub fn read_time_span(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ReadTimeSpan)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn load_async(&self, count: u32) -> Result> { + }} + #[inline] pub fn load_async(&self, count: u32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LoadAsync)(self as *const _ as *mut _, count, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn detach_buffer(&self) -> Result> { + }} + #[inline] pub fn detach_buffer(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DetachBuffer)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn detach_stream(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn detach_stream(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DetachStream)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DataReader: IDataReader} impl RtActivatable for DataReader {} impl RtActivatable for DataReader {} impl DataReader { - #[inline] pub fn create_data_reader(inputStream: &IInputStream) -> Result> { unsafe { + #[inline] pub fn create_data_reader(inputStream: &IInputStream) -> Result> { >::get_activation_factory().create_data_reader(inputStream) - }} - #[inline] pub fn from_buffer(buffer: &IBuffer) -> Result> { unsafe { + } + #[inline] pub fn from_buffer(buffer: &IBuffer) -> Result>> { >::get_activation_factory().from_buffer(buffer) - }} + } } DEFINE_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]) [CLSID_DataReader]); DEFINE_IID!(IID_IDataReaderFactory, 3612506183, 22490, 19989, 145, 76, 6, 128, 102, 153, 160, 152); @@ -2469,23 +2469,23 @@ RT_INTERFACE!{static interface IDataReaderFactory(IDataReaderFactoryVtbl): IInsp fn CreateDataReader(&self, inputStream: *mut IInputStream, out: *mut *mut DataReader) -> HRESULT }} impl IDataReaderFactory { - #[inline] pub unsafe fn create_data_reader(&self, inputStream: &IInputStream) -> Result> { + #[inline] pub fn create_data_reader(&self, inputStream: &IInputStream) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDataReader)(self as *const _ as *mut _, inputStream as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } -RT_CLASS!{class DataReaderLoadOperation: super::super::foundation::IAsyncOperation} +RT_CLASS!{class DataReaderLoadOperation: foundation::IAsyncOperation} 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(&self, buffer: *mut IBuffer, out: *mut *mut DataReader) -> HRESULT }} impl IDataReaderStatics { - #[inline] pub unsafe fn from_buffer(&self, buffer: &IBuffer) -> Result> { + #[inline] pub fn from_buffer(&self, buffer: &IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FromBuffer)(self as *const _ as *mut _, buffer as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IDataWriter, 1689817701, 54081, 18722, 179, 138, 221, 74, 248, 128, 140, 78); RT_INTERFACE!{interface IDataWriter(IDataWriterVtbl): IInspectable(IInspectableVtbl) [IID_IDataWriter] { @@ -2508,141 +2508,141 @@ RT_INTERFACE!{interface IDataWriter(IDataWriterVtbl): IInspectable(IInspectableV fn WriteUInt64(&self, value: u64) -> HRESULT, fn WriteSingle(&self, value: f32) -> HRESULT, fn WriteDouble(&self, value: f64) -> HRESULT, - fn WriteDateTime(&self, value: super::super::foundation::DateTime) -> HRESULT, - fn WriteTimeSpan(&self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn WriteDateTime(&self, value: foundation::DateTime) -> HRESULT, + fn WriteTimeSpan(&self, value: foundation::TimeSpan) -> HRESULT, fn WriteString(&self, value: HSTRING, out: *mut u32) -> HRESULT, fn MeasureString(&self, value: HSTRING, out: *mut u32) -> HRESULT, fn StoreAsync(&self, out: *mut *mut DataWriterStoreOperation) -> HRESULT, - fn FlushAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FlushAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn DetachBuffer(&self, out: *mut *mut IBuffer) -> HRESULT, fn DetachStream(&self, out: *mut *mut IOutputStream) -> HRESULT }} impl IDataWriter { - #[inline] pub unsafe fn get_unstored_buffer_length(&self) -> Result { + #[inline] pub fn get_unstored_buffer_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UnstoredBufferLength)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_unicode_encoding(&self) -> Result { + }} + #[inline] pub fn get_unicode_encoding(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UnicodeEncoding)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_unicode_encoding(&self, value: UnicodeEncoding) -> Result<()> { + }} + #[inline] pub fn set_unicode_encoding(&self, value: UnicodeEncoding) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_UnicodeEncoding)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_byte_order(&self) -> Result { + }} + #[inline] pub fn get_byte_order(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ByteOrder)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_byte_order(&self, value: ByteOrder) -> Result<()> { + }} + #[inline] pub fn set_byte_order(&self, value: ByteOrder) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ByteOrder)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn write_byte(&self, value: u8) -> Result<()> { + }} + #[inline] pub fn write_byte(&self, value: u8) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).WriteByte)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn write_bytes(&self, value: &[u8]) -> Result<()> { + }} + #[inline] pub fn write_bytes(&self, value: &[u8]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).WriteBytes)(self as *const _ as *mut _, value.len() as u32, value.as_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn write_buffer(&self, buffer: &IBuffer) -> Result<()> { + }} + #[inline] pub fn write_buffer(&self, buffer: &IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).WriteBuffer)(self as *const _ as *mut _, buffer as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn write_buffer_range(&self, buffer: &IBuffer, start: u32, count: u32) -> Result<()> { + }} + #[inline] pub fn write_buffer_range(&self, buffer: &IBuffer, start: u32, count: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).WriteBufferRange)(self as *const _ as *mut _, buffer as *const _ as *mut _, start, count); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn write_boolean(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn write_boolean(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).WriteBoolean)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn write_guid(&self, value: Guid) -> Result<()> { + }} + #[inline] pub fn write_guid(&self, value: Guid) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).WriteGuid)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn write_int16(&self, value: i16) -> Result<()> { + }} + #[inline] pub fn write_int16(&self, value: i16) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).WriteInt16)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn write_int32(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn write_int32(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).WriteInt32)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn write_int64(&self, value: i64) -> Result<()> { + }} + #[inline] pub fn write_int64(&self, value: i64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).WriteInt64)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn write_uint16(&self, value: u16) -> Result<()> { + }} + #[inline] pub fn write_uint16(&self, value: u16) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).WriteUInt16)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn write_uint32(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn write_uint32(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).WriteUInt32)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn write_uint64(&self, value: u64) -> Result<()> { + }} + #[inline] pub fn write_uint64(&self, value: u64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).WriteUInt64)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn write_single(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn write_single(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).WriteSingle)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn write_double(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn write_double(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).WriteDouble)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn write_date_time(&self, value: super::super::foundation::DateTime) -> Result<()> { + }} + #[inline] pub fn write_date_time(&self, value: foundation::DateTime) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).WriteDateTime)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn write_time_span(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn write_time_span(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).WriteTimeSpan)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn write_string(&self, value: &HStringArg) -> Result { + }} + #[inline] pub fn write_string(&self, value: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).WriteString)(self as *const _ as *mut _, value.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn measure_string(&self, value: &HStringArg) -> Result { + }} + #[inline] pub fn measure_string(&self, value: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).MeasureString)(self as *const _ as *mut _, value.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn store_async(&self) -> Result> { + }} + #[inline] pub fn store_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StoreAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn flush_async(&self) -> Result>> { + }} + #[inline] pub fn flush_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FlushAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn detach_buffer(&self) -> Result> { + }} + #[inline] pub fn detach_buffer(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DetachBuffer)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn detach_stream(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn detach_stream(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DetachStream)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DataWriter: IDataWriter} impl RtActivatable for DataWriter {} impl RtActivatable for DataWriter {} impl DataWriter { - #[inline] pub fn create_data_writer(outputStream: &IOutputStream) -> Result> { unsafe { + #[inline] pub fn create_data_writer(outputStream: &IOutputStream) -> Result> { >::get_activation_factory().create_data_writer(outputStream) - }} + } } DEFINE_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]) [CLSID_DataWriter]); DEFINE_IID!(IID_IDataWriterFactory, 864839618, 35716, 19499, 156, 80, 123, 135, 103, 132, 122, 31); @@ -2650,13 +2650,13 @@ RT_INTERFACE!{static interface IDataWriterFactory(IDataWriterFactoryVtbl): IInsp fn CreateDataWriter(&self, outputStream: *mut IOutputStream, out: *mut *mut DataWriter) -> HRESULT }} impl IDataWriterFactory { - #[inline] pub unsafe fn create_data_writer(&self, outputStream: &IOutputStream) -> Result> { + #[inline] pub fn create_data_writer(&self, outputStream: &IOutputStream) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDataWriter)(self as *const _ as *mut _, outputStream 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} +RT_CLASS!{class DataWriterStoreOperation: foundation::IAsyncOperation} RT_CLASS!{class FileInputStream: IInputStream} RT_ENUM! { enum FileOpenDisposition: i32 { OpenExisting (FileOpenDisposition_OpenExisting) = 0, OpenAlways (FileOpenDisposition_OpenAlways) = 1, CreateNew (FileOpenDisposition_CreateNew) = 2, CreateAlways (FileOpenDisposition_CreateAlways) = 3, TruncateExisting (FileOpenDisposition_TruncateExisting) = 4, @@ -2665,98 +2665,98 @@ RT_CLASS!{class FileOutputStream: IOutputStream} RT_CLASS!{class FileRandomAccessStream: IRandomAccessStream} impl RtActivatable for FileRandomAccessStream {} impl FileRandomAccessStream { - #[inline] pub fn open_async(filePath: &HStringArg, accessMode: super::FileAccessMode) -> Result>> { unsafe { + #[inline] pub fn open_async(filePath: &HStringArg, accessMode: super::FileAccessMode) -> Result>> { >::get_activation_factory().open_async(filePath, accessMode) - }} - #[inline] pub fn open_with_options_async(filePath: &HStringArg, accessMode: super::FileAccessMode, sharingOptions: super::StorageOpenOptions, openDisposition: FileOpenDisposition) -> Result>> { unsafe { + } + #[inline] pub fn open_with_options_async(filePath: &HStringArg, accessMode: super::FileAccessMode, sharingOptions: super::StorageOpenOptions, openDisposition: FileOpenDisposition) -> Result>> { >::get_activation_factory().open_with_options_async(filePath, accessMode, sharingOptions, openDisposition) - }} - #[inline] pub fn open_transacted_write_async(filePath: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn open_transacted_write_async(filePath: &HStringArg) -> Result>> { >::get_activation_factory().open_transacted_write_async(filePath) - }} - #[inline] pub fn open_transacted_write_with_options_async(filePath: &HStringArg, openOptions: super::StorageOpenOptions, openDisposition: FileOpenDisposition) -> Result>> { unsafe { + } + #[inline] pub fn open_transacted_write_with_options_async(filePath: &HStringArg, openOptions: super::StorageOpenOptions, openDisposition: FileOpenDisposition) -> Result>> { >::get_activation_factory().open_transacted_write_with_options_async(filePath, openOptions, openDisposition) - }} - #[cfg(feature="windows-system")] #[inline] pub fn open_for_user_async(user: &super::super::system::User, filePath: &HStringArg, accessMode: super::FileAccessMode) -> Result>> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn open_for_user_async(user: &super::super::system::User, filePath: &HStringArg, accessMode: super::FileAccessMode) -> Result>> { >::get_activation_factory().open_for_user_async(user, filePath, accessMode) - }} - #[cfg(feature="windows-system")] #[inline] pub fn open_for_user_with_options_async(user: &super::super::system::User, filePath: &HStringArg, accessMode: super::FileAccessMode, sharingOptions: super::StorageOpenOptions, openDisposition: FileOpenDisposition) -> Result>> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn open_for_user_with_options_async(user: &super::super::system::User, filePath: &HStringArg, accessMode: super::FileAccessMode, sharingOptions: super::StorageOpenOptions, openDisposition: FileOpenDisposition) -> Result>> { >::get_activation_factory().open_for_user_with_options_async(user, filePath, accessMode, sharingOptions, openDisposition) - }} - #[cfg(feature="windows-system")] #[inline] pub fn open_transacted_write_for_user_async(user: &super::super::system::User, filePath: &HStringArg) -> Result>> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn open_transacted_write_for_user_async(user: &super::super::system::User, filePath: &HStringArg) -> Result>> { >::get_activation_factory().open_transacted_write_for_user_async(user, filePath) - }} - #[cfg(feature="windows-system")] #[inline] pub fn open_transacted_write_for_user_with_options_async(user: &super::super::system::User, filePath: &HStringArg, openOptions: super::StorageOpenOptions, openDisposition: FileOpenDisposition) -> Result>> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn open_transacted_write_for_user_with_options_async(user: &super::super::system::User, filePath: &HStringArg, openOptions: super::StorageOpenOptions, openDisposition: FileOpenDisposition) -> Result>> { >::get_activation_factory().open_transacted_write_for_user_with_options_async(user, filePath, openOptions, openDisposition) - }} + } } DEFINE_CLSID!(FileRandomAccessStream(&[87,105,110,100,111,119,115,46,83,116,111,114,97,103,101,46,83,116,114,101,97,109,115,46,70,105,108,101,82,97,110,100,111,109,65,99,99,101,115,115,83,116,114,101,97,109,0]) [CLSID_FileRandomAccessStream]); DEFINE_IID!(IID_IFileRandomAccessStreamStatics, 1934950663, 15191, 19293, 131, 69, 85, 77, 47, 198, 33, 240); RT_INTERFACE!{static interface IFileRandomAccessStreamStatics(IFileRandomAccessStreamStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IFileRandomAccessStreamStatics] { - fn OpenAsync(&self, filePath: HSTRING, accessMode: super::FileAccessMode, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn OpenWithOptionsAsync(&self, filePath: HSTRING, accessMode: super::FileAccessMode, sharingOptions: super::StorageOpenOptions, openDisposition: FileOpenDisposition, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn OpenTransactedWriteAsync(&self, filePath: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn OpenTransactedWriteWithOptionsAsync(&self, filePath: HSTRING, openOptions: super::StorageOpenOptions, openDisposition: FileOpenDisposition, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-system")] fn OpenForUserAsync(&self, user: *mut super::super::system::User, filePath: HSTRING, accessMode: super::FileAccessMode, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-system")] fn OpenForUserWithOptionsAsync(&self, user: *mut super::super::system::User, filePath: HSTRING, accessMode: super::FileAccessMode, sharingOptions: super::StorageOpenOptions, openDisposition: FileOpenDisposition, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-system")] fn OpenTransactedWriteForUserAsync(&self, user: *mut super::super::system::User, filePath: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-system")] fn OpenTransactedWriteForUserWithOptionsAsync(&self, user: *mut super::super::system::User, filePath: HSTRING, openOptions: super::StorageOpenOptions, openDisposition: FileOpenDisposition, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn OpenAsync(&self, filePath: HSTRING, accessMode: super::FileAccessMode, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn OpenWithOptionsAsync(&self, filePath: HSTRING, accessMode: super::FileAccessMode, sharingOptions: super::StorageOpenOptions, openDisposition: FileOpenDisposition, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn OpenTransactedWriteAsync(&self, filePath: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn OpenTransactedWriteWithOptionsAsync(&self, filePath: HSTRING, openOptions: super::StorageOpenOptions, openDisposition: FileOpenDisposition, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-system")] fn OpenForUserAsync(&self, user: *mut super::super::system::User, filePath: HSTRING, accessMode: super::FileAccessMode, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-system")] fn OpenForUserWithOptionsAsync(&self, user: *mut super::super::system::User, filePath: HSTRING, accessMode: super::FileAccessMode, sharingOptions: super::StorageOpenOptions, openDisposition: FileOpenDisposition, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-system")] fn OpenTransactedWriteForUserAsync(&self, user: *mut super::super::system::User, filePath: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-system")] fn OpenTransactedWriteForUserWithOptionsAsync(&self, user: *mut super::super::system::User, filePath: HSTRING, openOptions: super::StorageOpenOptions, openDisposition: FileOpenDisposition, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IFileRandomAccessStreamStatics { - #[inline] pub unsafe fn open_async(&self, filePath: &HStringArg, accessMode: super::FileAccessMode) -> Result>> { + #[inline] pub fn open_async(&self, filePath: &HStringArg, accessMode: super::FileAccessMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenAsync)(self as *const _ as *mut _, filePath.get(), accessMode, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn open_with_options_async(&self, filePath: &HStringArg, accessMode: super::FileAccessMode, sharingOptions: super::StorageOpenOptions, openDisposition: FileOpenDisposition) -> Result>> { + }} + #[inline] pub fn open_with_options_async(&self, filePath: &HStringArg, accessMode: super::FileAccessMode, sharingOptions: super::StorageOpenOptions, openDisposition: FileOpenDisposition) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenWithOptionsAsync)(self as *const _ as *mut _, filePath.get(), accessMode, sharingOptions, openDisposition, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn open_transacted_write_async(&self, filePath: &HStringArg) -> Result>> { + }} + #[inline] pub fn open_transacted_write_async(&self, filePath: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenTransactedWriteAsync)(self as *const _ as *mut _, filePath.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn open_transacted_write_with_options_async(&self, filePath: &HStringArg, openOptions: super::StorageOpenOptions, openDisposition: FileOpenDisposition) -> Result>> { + }} + #[inline] pub fn open_transacted_write_with_options_async(&self, filePath: &HStringArg, openOptions: super::StorageOpenOptions, openDisposition: FileOpenDisposition) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenTransactedWriteWithOptionsAsync)(self as *const _ as *mut _, filePath.get(), openOptions, openDisposition, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn open_for_user_async(&self, user: &super::super::system::User, filePath: &HStringArg, accessMode: super::FileAccessMode) -> Result>> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn open_for_user_async(&self, user: &super::super::system::User, filePath: &HStringArg, accessMode: super::FileAccessMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenForUserAsync)(self as *const _ as *mut _, user as *const _ as *mut _, filePath.get(), accessMode, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn open_for_user_with_options_async(&self, user: &super::super::system::User, filePath: &HStringArg, accessMode: super::FileAccessMode, sharingOptions: super::StorageOpenOptions, openDisposition: FileOpenDisposition) -> Result>> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn open_for_user_with_options_async(&self, user: &super::super::system::User, filePath: &HStringArg, accessMode: super::FileAccessMode, sharingOptions: super::StorageOpenOptions, openDisposition: FileOpenDisposition) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenForUserWithOptionsAsync)(self as *const _ as *mut _, user as *const _ as *mut _, filePath.get(), accessMode, sharingOptions, openDisposition, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn open_transacted_write_for_user_async(&self, user: &super::super::system::User, filePath: &HStringArg) -> Result>> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn open_transacted_write_for_user_async(&self, user: &super::super::system::User, filePath: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenTransactedWriteForUserAsync)(self as *const _ as *mut _, user as *const _ as *mut _, filePath.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn open_transacted_write_for_user_with_options_async(&self, user: &super::super::system::User, filePath: &HStringArg, openOptions: super::StorageOpenOptions, openDisposition: FileOpenDisposition) -> Result>> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn open_transacted_write_for_user_with_options_async(&self, user: &super::super::system::User, filePath: &HStringArg, openOptions: super::StorageOpenOptions, openDisposition: FileOpenDisposition) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenTransactedWriteForUserWithOptionsAsync)(self as *const _ as *mut _, user as *const _ as *mut _, filePath.get(), openOptions, openDisposition, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class InMemoryRandomAccessStream: IRandomAccessStream} impl RtActivatable for InMemoryRandomAccessStream {} DEFINE_CLSID!(InMemoryRandomAccessStream(&[87,105,110,100,111,119,115,46,83,116,111,114,97,103,101,46,83,116,114,101,97,109,115,46,73,110,77,101,109,111,114,121,82,97,110,100,111,109,65,99,99,101,115,115,83,116,114,101,97,109,0]) [CLSID_InMemoryRandomAccessStream]); 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(&self, buffer: *mut IBuffer, count: u32, options: InputStreamOptions, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT + fn ReadAsync(&self, buffer: *mut IBuffer, count: u32, options: InputStreamOptions, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT }} impl IInputStream { - #[inline] pub unsafe fn read_async(&self, buffer: &IBuffer, count: u32, options: InputStreamOptions) -> Result>> { + #[inline] pub fn read_async(&self, buffer: &IBuffer, count: u32, options: InputStreamOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadAsync)(self as *const _ as *mut _, buffer as *const _ as *mut _, count, options, &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, @@ -2764,31 +2764,31 @@ RT_ENUM! { enum InputStreamOptions: u32 { RT_CLASS!{class InputStreamOverStream: IInputStream} 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn OpenSequentialReadAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IInputStreamReference { - #[inline] pub unsafe fn open_sequential_read_async(&self) -> Result>> { + #[inline] pub fn open_sequential_read_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenSequentialReadAsync)(self as *const _ as *mut _, &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(&self, buffer: *mut IBuffer, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, - fn FlushAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn WriteAsync(&self, buffer: *mut IBuffer, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + fn FlushAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IOutputStream { - #[inline] pub unsafe fn write_async(&self, buffer: &IBuffer) -> Result>> { + #[inline] pub fn write_async(&self, buffer: &IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).WriteAsync)(self 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 flush_async(&self) -> Result>> { + }} + #[inline] pub fn flush_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FlushAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class OutputStreamOverStream: IOutputStream} DEFINE_IID!(IID_IRandomAccessStream, 2421821409, 48211, 4575, 140, 73, 0, 30, 79, 198, 134, 218); @@ -2804,135 +2804,135 @@ RT_INTERFACE!{interface IRandomAccessStream(IRandomAccessStreamVtbl): IInspectab fn get_CanWrite(&self, out: *mut bool) -> HRESULT }} impl IRandomAccessStream { - #[inline] pub unsafe fn get_size(&self) -> Result { + #[inline] pub fn get_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Size)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_size(&self, value: u64) -> Result<()> { + }} + #[inline] pub fn set_size(&self, value: u64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Size)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_input_stream_at(&self, position: u64) -> Result> { + }} + #[inline] pub fn get_input_stream_at(&self, position: u64) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetInputStreamAt)(self as *const _ as *mut _, position, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_output_stream_at(&self, position: u64) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_output_stream_at(&self, position: u64) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetOutputStreamAt)(self as *const _ as *mut _, position, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_position(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn seek(&self, position: u64) -> Result<()> { + }} + #[inline] pub fn seek(&self, position: u64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Seek)(self as *const _ as *mut _, position); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn clone_stream(&self) -> Result> { + }} + #[inline] pub fn clone_stream(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CloneStream)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_read(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_can_read(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanRead)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_write(&self) -> Result { + }} + #[inline] pub fn get_can_write(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanWrite)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{static class RandomAccessStream} impl RtActivatable for RandomAccessStream {} impl RandomAccessStream { - #[inline] pub fn copy_async(source: &IInputStream, destination: &IOutputStream) -> Result>> { unsafe { + #[inline] pub fn copy_async(source: &IInputStream, destination: &IOutputStream) -> Result>> { >::get_activation_factory().copy_async(source, destination) - }} - #[inline] pub fn copy_size_async(source: &IInputStream, destination: &IOutputStream, bytesToCopy: u64) -> Result>> { unsafe { + } + #[inline] pub fn copy_size_async(source: &IInputStream, destination: &IOutputStream, bytesToCopy: u64) -> Result>> { >::get_activation_factory().copy_size_async(source, destination, bytesToCopy) - }} - #[inline] pub fn copy_and_close_async(source: &IInputStream, destination: &IOutputStream) -> Result>> { unsafe { + } + #[inline] pub fn copy_and_close_async(source: &IInputStream, destination: &IOutputStream) -> Result>> { >::get_activation_factory().copy_and_close_async(source, destination) - }} + } } DEFINE_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]) [CLSID_RandomAccessStream]); RT_CLASS!{class RandomAccessStreamOverStream: IRandomAccessStream} 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn OpenReadAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IRandomAccessStreamReference { - #[inline] pub unsafe fn open_read_async(&self) -> Result>> { + #[inline] pub fn open_read_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OpenReadAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class RandomAccessStreamReference: IRandomAccessStreamReference} impl RtActivatable for RandomAccessStreamReference {} impl RandomAccessStreamReference { - #[inline] pub fn create_from_file(file: &super::IStorageFile) -> Result> { unsafe { + #[inline] pub fn create_from_file(file: &super::IStorageFile) -> Result>> { >::get_activation_factory().create_from_file(file) - }} - #[inline] pub fn create_from_uri(uri: &super::super::foundation::Uri) -> Result> { unsafe { + } + #[inline] pub fn create_from_uri(uri: &foundation::Uri) -> Result>> { >::get_activation_factory().create_from_uri(uri) - }} - #[inline] pub fn create_from_stream(stream: &IRandomAccessStream) -> Result> { unsafe { + } + #[inline] pub fn create_from_stream(stream: &IRandomAccessStream) -> Result>> { >::get_activation_factory().create_from_stream(stream) - }} + } } DEFINE_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]) [CLSID_RandomAccessStreamReference]); 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(&self, file: *mut super::IStorageFile, out: *mut *mut RandomAccessStreamReference) -> HRESULT, - fn CreateFromUri(&self, uri: *mut super::super::foundation::Uri, out: *mut *mut RandomAccessStreamReference) -> HRESULT, + fn CreateFromUri(&self, uri: *mut foundation::Uri, out: *mut *mut RandomAccessStreamReference) -> HRESULT, fn CreateFromStream(&self, stream: *mut IRandomAccessStream, out: *mut *mut RandomAccessStreamReference) -> HRESULT }} impl IRandomAccessStreamReferenceStatics { - #[inline] pub unsafe fn create_from_file(&self, file: &super::IStorageFile) -> Result> { + #[inline] pub fn create_from_file(&self, file: &super::IStorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromFile)(self as *const _ as *mut _, 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(&self, uri: &super::super::foundation::Uri) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_from_uri(&self, uri: &foundation::Uri) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromUri)(self 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 create_from_stream(&self, stream: &IRandomAccessStream) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_from_stream(&self, stream: &IRandomAccessStream) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromStream)(self as *const _ as *mut _, stream as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, source: *mut IInputStream, destination: *mut IOutputStream, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, - fn CopySizeAsync(&self, source: *mut IInputStream, destination: *mut IOutputStream, bytesToCopy: u64, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT, - fn CopyAndCloseAsync(&self, source: *mut IInputStream, destination: *mut IOutputStream, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT + fn CopyAsync(&self, source: *mut IInputStream, destination: *mut IOutputStream, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + fn CopySizeAsync(&self, source: *mut IInputStream, destination: *mut IOutputStream, bytesToCopy: u64, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + fn CopyAndCloseAsync(&self, source: *mut IInputStream, destination: *mut IOutputStream, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT }} impl IRandomAccessStreamStatics { - #[inline] pub unsafe fn copy_async(&self, source: &IInputStream, destination: &IOutputStream) -> Result>> { + #[inline] pub fn copy_async(&self, source: &IInputStream, destination: &IOutputStream) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CopyAsync)(self as *const _ as *mut _, 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(&self, source: &IInputStream, destination: &IOutputStream, bytesToCopy: u64) -> Result>> { + }} + #[inline] pub fn copy_size_async(&self, source: &IInputStream, destination: &IOutputStream, bytesToCopy: u64) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CopySizeAsync)(self as *const _ as *mut _, 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(&self, source: &IInputStream, destination: &IOutputStream) -> Result>> { + }} + #[inline] pub fn copy_and_close_async(&self, source: &IInputStream, destination: &IOutputStream) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CopyAndCloseAsync)(self as *const _ as *mut _, source as *const _ as *mut _, destination as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(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] { @@ -2949,30 +2949,30 @@ RT_ENUM! { enum CompressAlgorithm: i32 { }} 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn FinishAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn DetachStream(&self, out: *mut *mut super::streams::IOutputStream) -> HRESULT }} impl ICompressor { - #[inline] pub unsafe fn finish_async(&self) -> Result>> { + #[inline] pub fn finish_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FinishAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn detach_stream(&self) -> Result> { + }} + #[inline] pub fn detach_stream(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DetachStream)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class Compressor: ICompressor} impl RtActivatable for Compressor {} impl Compressor { - #[inline] pub fn create_compressor(underlyingStream: &super::streams::IOutputStream) -> Result> { unsafe { + #[inline] pub fn create_compressor(underlyingStream: &super::streams::IOutputStream) -> Result> { >::get_activation_factory().create_compressor(underlyingStream) - }} - #[inline] pub fn create_compressor_ex(underlyingStream: &super::streams::IOutputStream, algorithm: CompressAlgorithm, blockSize: u32) -> Result> { unsafe { + } + #[inline] pub fn create_compressor_ex(underlyingStream: &super::streams::IOutputStream, algorithm: CompressAlgorithm, blockSize: u32) -> Result> { >::get_activation_factory().create_compressor_ex(underlyingStream, algorithm, blockSize) - }} + } } DEFINE_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]) [CLSID_Compressor]); DEFINE_IID!(IID_ICompressorFactory, 1597871780, 11515, 17452, 168, 186, 215, 209, 27, 3, 157, 160); @@ -2981,34 +2981,34 @@ RT_INTERFACE!{static interface ICompressorFactory(ICompressorFactoryVtbl): IInsp fn CreateCompressorEx(&self, underlyingStream: *mut super::streams::IOutputStream, algorithm: CompressAlgorithm, blockSize: u32, out: *mut *mut Compressor) -> HRESULT }} impl ICompressorFactory { - #[inline] pub unsafe fn create_compressor(&self, underlyingStream: &super::streams::IOutputStream) -> Result> { + #[inline] pub fn create_compressor(&self, underlyingStream: &super::streams::IOutputStream) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateCompressor)(self as *const _ as *mut _, 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(&self, underlyingStream: &super::streams::IOutputStream, algorithm: CompressAlgorithm, blockSize: u32) -> Result> { + }} + #[inline] pub fn create_compressor_ex(&self, underlyingStream: &super::streams::IOutputStream, algorithm: CompressAlgorithm, blockSize: u32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateCompressorEx)(self as *const _ as *mut _, underlyingStream as *const _ as *mut _, algorithm, blockSize, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::streams::IInputStream) -> HRESULT }} impl IDecompressor { - #[inline] pub unsafe fn detach_stream(&self) -> Result> { + #[inline] pub fn detach_stream(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DetachStream)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class Decompressor: IDecompressor} impl RtActivatable for Decompressor {} impl Decompressor { - #[inline] pub fn create_decompressor(underlyingStream: &super::streams::IInputStream) -> Result> { unsafe { + #[inline] pub fn create_decompressor(underlyingStream: &super::streams::IInputStream) -> Result> { >::get_activation_factory().create_decompressor(underlyingStream) - }} + } } DEFINE_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]) [CLSID_Decompressor]); DEFINE_IID!(IID_IDecompressorFactory, 1396171346, 7586, 17121, 136, 52, 3, 121, 210, 141, 116, 47); @@ -3016,11 +3016,11 @@ RT_INTERFACE!{static interface IDecompressorFactory(IDecompressorFactoryVtbl): I fn CreateDecompressor(&self, underlyingStream: *mut super::streams::IInputStream, out: *mut *mut Decompressor) -> HRESULT }} impl IDecompressorFactory { - #[inline] pub unsafe fn create_decompressor(&self, underlyingStream: &super::streams::IInputStream) -> Result> { + #[inline] pub fn create_decompressor(&self, underlyingStream: &super::streams::IInputStream) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDecompressor)(self as *const _ as *mut _, underlyingStream as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } } // Windows.Storage.Compression pub mod search { // Windows.Storage.Search @@ -3033,126 +3033,126 @@ RT_ENUM! { enum CommonFolderQuery: i32 { }} 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(&self, indexableContent: *mut IIndexableContent, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn UpdateAsync(&self, indexableContent: *mut IIndexableContent, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn DeleteAsync(&self, contentId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn DeleteMultipleAsync(&self, contentIds: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn DeleteAllAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn RetrievePropertiesAsync(&self, contentId: HSTRING, propertiesToRetrieve: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn AddAsync(&self, indexableContent: *mut IIndexableContent, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn UpdateAsync(&self, indexableContent: *mut IIndexableContent, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn DeleteAsync(&self, contentId: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn DeleteMultipleAsync(&self, contentIds: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn DeleteAllAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn RetrievePropertiesAsync(&self, contentId: HSTRING, propertiesToRetrieve: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, fn get_Revision(&self, out: *mut u64) -> HRESULT }} impl IContentIndexer { - #[inline] pub unsafe fn add_async(&self, indexableContent: &IIndexableContent) -> Result> { + #[inline] pub fn add_async(&self, indexableContent: &IIndexableContent) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AddAsync)(self as *const _ as *mut _, indexableContent as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn update_async(&self, indexableContent: &IIndexableContent) -> Result> { + }} + #[inline] pub fn update_async(&self, indexableContent: &IIndexableContent) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UpdateAsync)(self as *const _ as *mut _, indexableContent as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete_async(&self, contentId: &HStringArg) -> Result> { + }} + #[inline] pub fn delete_async(&self, contentId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteAsync)(self as *const _ as *mut _, contentId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn delete_multiple_async(&self, contentIds: &super::super::foundation::collections::IIterable) -> Result> { + }} + #[inline] pub fn delete_multiple_async(&self, contentIds: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteMultipleAsync)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[inline] pub fn delete_all_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).DeleteAllAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn retrieve_properties_async(&self, contentId: &HStringArg, propertiesToRetrieve: &super::super::foundation::collections::IIterable) -> Result>>> { + }} + #[inline] pub fn retrieve_properties_async(&self, contentId: &HStringArg, propertiesToRetrieve: &foundation::collections::IIterable) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RetrievePropertiesAsync)(self as *const _ as *mut _, 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(&self) -> Result { + }} + #[inline] pub fn get_revision(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Revision)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ContentIndexer: IContentIndexer} impl RtActivatable for ContentIndexer {} impl ContentIndexer { - #[inline] pub fn get_indexer_with_name(indexName: &HStringArg) -> Result> { unsafe { + #[inline] pub fn get_indexer_with_name(indexName: &HStringArg) -> Result>> { >::get_activation_factory().get_indexer_with_name(indexName) - }} - #[inline] pub fn get_indexer() -> Result> { unsafe { + } + #[inline] pub fn get_indexer() -> Result>> { >::get_activation_factory().get_indexer() - }} + } } DEFINE_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]) [CLSID_ContentIndexer]); 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetPropertiesAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>>) -> HRESULT, - fn GetPropertiesRangeAsync(&self, startIndex: u32, maxItems: u32, out: *mut *mut super::super::foundation::IAsyncOperation>>) -> HRESULT, - fn GetAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetRangeAsync(&self, startIndex: u32, maxItems: u32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetCountAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetPropertiesAsync(&self, out: *mut *mut foundation::IAsyncOperation>>) -> HRESULT, + fn GetPropertiesRangeAsync(&self, startIndex: u32, maxItems: u32, out: *mut *mut foundation::IAsyncOperation>>) -> HRESULT, + fn GetAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetRangeAsync(&self, startIndex: u32, maxItems: u32, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, fn get_QueryFolder(&self, out: *mut *mut super::StorageFolder) -> HRESULT }} impl IContentIndexerQuery { - #[inline] pub unsafe fn get_count_async(&self) -> Result>> { + #[inline] pub fn get_count_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCountAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties_async(&self) -> Result>>>> { + }} + #[inline] pub fn get_properties_async(&self) -> Result>>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPropertiesAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties_range_async(&self, startIndex: u32, maxItems: u32) -> Result>>>> { + }} + #[inline] pub fn get_properties_range_async(&self, startIndex: u32, maxItems: u32) -> Result>>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPropertiesRangeAsync)(self as *const _ as *mut _, startIndex, maxItems, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_async(&self) -> Result>>> { + }} + #[inline] pub fn get_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_range_async(&self, startIndex: u32, maxItems: u32) -> Result>>> { + }} + #[inline] pub fn get_range_async(&self, startIndex: u32, maxItems: u32) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetRangeAsync)(self as *const _ as *mut _, startIndex, maxItems, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_query_folder(&self) -> Result> { + }} + #[inline] pub fn get_query_folder(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_QueryFolder)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ContentIndexerQuery: IContentIndexerQuery} 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(&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(&self, searchFilter: HSTRING, propertiesToRetrieve: *mut super::super::foundation::collections::IIterable, sortOrder: *mut super::super::foundation::collections::IIterable, out: *mut *mut ContentIndexerQuery) -> HRESULT, - fn CreateQuery(&self, searchFilter: HSTRING, propertiesToRetrieve: *mut super::super::foundation::collections::IIterable, out: *mut *mut ContentIndexerQuery) -> HRESULT + fn CreateQueryWithSortOrderAndLanguage(&self, searchFilter: HSTRING, propertiesToRetrieve: *mut foundation::collections::IIterable, sortOrder: *mut foundation::collections::IIterable, searchFilterLanguage: HSTRING, out: *mut *mut ContentIndexerQuery) -> HRESULT, + fn CreateQueryWithSortOrder(&self, searchFilter: HSTRING, propertiesToRetrieve: *mut foundation::collections::IIterable, sortOrder: *mut foundation::collections::IIterable, out: *mut *mut ContentIndexerQuery) -> HRESULT, + fn CreateQuery(&self, searchFilter: HSTRING, propertiesToRetrieve: *mut foundation::collections::IIterable, out: *mut *mut ContentIndexerQuery) -> HRESULT }} impl IContentIndexerQueryOperations { - #[inline] pub unsafe fn create_query_with_sort_order_and_language(&self, searchFilter: &HStringArg, propertiesToRetrieve: &super::super::foundation::collections::IIterable, sortOrder: &super::super::foundation::collections::IIterable, searchFilterLanguage: &HStringArg) -> Result> { + #[inline] pub fn create_query_with_sort_order_and_language(&self, searchFilter: &HStringArg, propertiesToRetrieve: &foundation::collections::IIterable, sortOrder: &foundation::collections::IIterable, searchFilterLanguage: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateQueryWithSortOrderAndLanguage)(self as *const _ as *mut _, 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(&self, searchFilter: &HStringArg, propertiesToRetrieve: &super::super::foundation::collections::IIterable, sortOrder: &super::super::foundation::collections::IIterable) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_query_with_sort_order(&self, searchFilter: &HStringArg, propertiesToRetrieve: &foundation::collections::IIterable, sortOrder: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateQueryWithSortOrder)(self as *const _ as *mut _, 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(&self, searchFilter: &HStringArg, propertiesToRetrieve: &super::super::foundation::collections::IIterable) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_query(&self, searchFilter: &HStringArg, propertiesToRetrieve: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateQuery)(self as *const _ as *mut _, searchFilter.get(), propertiesToRetrieve as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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] { @@ -3160,16 +3160,16 @@ RT_INTERFACE!{static interface IContentIndexerStatics(IContentIndexerStaticsVtbl fn GetIndexer(&self, out: *mut *mut ContentIndexer) -> HRESULT }} impl IContentIndexerStatics { - #[inline] pub unsafe fn get_indexer_with_name(&self, indexName: &HStringArg) -> Result> { + #[inline] pub fn get_indexer_with_name(&self, indexName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetIndexerWithName)(self as *const _ as *mut _, indexName.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_indexer(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_indexer(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetIndexer)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum DateStackOption: i32 { None (DateStackOption_None) = 0, Year (DateStackOption_Year) = 1, Month (DateStackOption_Month) = 2, @@ -3181,45 +3181,45 @@ DEFINE_IID!(IID_IIndexableContent, 3438387295, 54453, 18490, 176, 110, 224, 219, RT_INTERFACE!{interface IIndexableContent(IIndexableContentVtbl): IInspectable(IInspectableVtbl) [IID_IIndexableContent] { fn get_Id(&self, out: *mut HSTRING) -> HRESULT, fn put_Id(&self, value: HSTRING) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, + fn get_Properties(&self, out: *mut *mut foundation::collections::IMap) -> HRESULT, fn get_Stream(&self, out: *mut *mut super::streams::IRandomAccessStream) -> HRESULT, fn put_Stream(&self, value: *mut super::streams::IRandomAccessStream) -> HRESULT, fn get_StreamContentType(&self, out: *mut HSTRING) -> HRESULT, fn put_StreamContentType(&self, value: HSTRING) -> HRESULT }} impl IIndexableContent { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Id)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_stream(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_stream(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Stream)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_stream(&self, value: &super::streams::IRandomAccessStream) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_stream(&self, value: &super::streams::IRandomAccessStream) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Stream)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_stream_content_type(&self) -> Result { + }} + #[inline] pub fn get_stream_content_type(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StreamContentType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_stream_content_type(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_stream_content_type(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StreamContentType)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class IndexableContent: IIndexableContent} impl RtActivatable for IndexableContent {} @@ -3232,7 +3232,7 @@ RT_ENUM! { enum IndexerOption: i32 { }} 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_FileTypeFilter(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_FolderDepth(&self, out: *mut FolderDepth) -> HRESULT, fn put_FolderDepth(&self, value: FolderDepth) -> HRESULT, fn get_ApplicationSearchFilter(&self, out: *mut HSTRING) -> HRESULT, @@ -3243,174 +3243,174 @@ RT_INTERFACE!{interface IQueryOptions(IQueryOptionsVtbl): IInspectable(IInspecta fn put_Language(&self, value: HSTRING) -> HRESULT, fn get_IndexerOption(&self, out: *mut IndexerOption) -> HRESULT, fn put_IndexerOption(&self, value: IndexerOption) -> HRESULT, - fn get_SortOrder(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_SortOrder(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_GroupPropertyName(&self, out: *mut HSTRING) -> HRESULT, fn get_DateStackOption(&self, out: *mut DateStackOption) -> HRESULT, fn SaveToString(&self, out: *mut HSTRING) -> HRESULT, fn LoadFromString(&self, value: HSTRING) -> HRESULT, fn SetThumbnailPrefetch(&self, mode: super::fileproperties::ThumbnailMode, requestedSize: u32, options: super::fileproperties::ThumbnailOptions) -> HRESULT, - fn SetPropertyPrefetch(&self, options: super::fileproperties::PropertyPrefetchOptions, propertiesToRetrieve: *mut super::super::foundation::collections::IIterable) -> HRESULT + fn SetPropertyPrefetch(&self, options: super::fileproperties::PropertyPrefetchOptions, propertiesToRetrieve: *mut foundation::collections::IIterable) -> HRESULT }} impl IQueryOptions { - #[inline] pub unsafe fn get_file_type_filter(&self) -> Result>> { + #[inline] pub fn get_file_type_filter(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FileTypeFilter)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_folder_depth(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_folder_depth(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FolderDepth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_folder_depth(&self, value: FolderDepth) -> Result<()> { + }} + #[inline] pub fn set_folder_depth(&self, value: FolderDepth) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FolderDepth)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_application_search_filter(&self) -> Result { + }} + #[inline] pub fn get_application_search_filter(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ApplicationSearchFilter)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_application_search_filter(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_application_search_filter(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ApplicationSearchFilter)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_user_search_filter(&self) -> Result { + }} + #[inline] pub fn get_user_search_filter(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UserSearchFilter)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_user_search_filter(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_user_search_filter(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_UserSearchFilter)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_language(&self) -> Result { + }} + #[inline] pub fn get_language(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Language)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_language(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_language(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Language)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_indexer_option(&self) -> Result { + }} + #[inline] pub fn get_indexer_option(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IndexerOption)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_indexer_option(&self, value: IndexerOption) -> Result<()> { + }} + #[inline] pub fn set_indexer_option(&self, value: IndexerOption) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IndexerOption)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_sort_order(&self) -> Result>> { + }} + #[inline] pub fn get_sort_order(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SortOrder)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_group_property_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_group_property_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_GroupPropertyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_date_stack_option(&self) -> Result { + }} + #[inline] pub fn get_date_stack_option(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DateStackOption)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn save_to_string(&self) -> Result { + }} + #[inline] pub fn save_to_string(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveToString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn load_from_string(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn load_from_string(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).LoadFromString)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_thumbnail_prefetch(&self, mode: super::fileproperties::ThumbnailMode, requestedSize: u32, options: super::fileproperties::ThumbnailOptions) -> Result<()> { + }} + #[inline] pub fn set_thumbnail_prefetch(&self, mode: super::fileproperties::ThumbnailMode, requestedSize: u32, options: super::fileproperties::ThumbnailOptions) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetThumbnailPrefetch)(self as *const _ as *mut _, mode, requestedSize, options); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_property_prefetch(&self, options: super::fileproperties::PropertyPrefetchOptions, propertiesToRetrieve: &super::super::foundation::collections::IIterable) -> Result<()> { + }} + #[inline] pub fn set_property_prefetch(&self, options: super::fileproperties::PropertyPrefetchOptions, propertiesToRetrieve: &foundation::collections::IIterable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetPropertyPrefetch)(self as *const _ as *mut _, options, propertiesToRetrieve as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class QueryOptions: IQueryOptions} impl RtActivatable for QueryOptions {} impl RtActivatable for QueryOptions {} impl QueryOptions { - #[inline] pub fn create_common_file_query(query: CommonFileQuery, fileTypeFilter: &super::super::foundation::collections::IIterable) -> Result> { unsafe { + #[inline] pub fn create_common_file_query(query: CommonFileQuery, fileTypeFilter: &foundation::collections::IIterable) -> Result> { >::get_activation_factory().create_common_file_query(query, fileTypeFilter) - }} - #[inline] pub fn create_common_folder_query(query: CommonFolderQuery) -> Result> { unsafe { + } + #[inline] pub fn create_common_folder_query(query: CommonFolderQuery) -> Result> { >::get_activation_factory().create_common_folder_query(query) - }} + } } DEFINE_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]) [CLSID_QueryOptions]); 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(&self, query: CommonFileQuery, fileTypeFilter: *mut super::super::foundation::collections::IIterable, out: *mut *mut QueryOptions) -> HRESULT, + fn CreateCommonFileQuery(&self, query: CommonFileQuery, fileTypeFilter: *mut foundation::collections::IIterable, out: *mut *mut QueryOptions) -> HRESULT, fn CreateCommonFolderQuery(&self, query: CommonFolderQuery, out: *mut *mut QueryOptions) -> HRESULT }} impl IQueryOptionsFactory { - #[inline] pub unsafe fn create_common_file_query(&self, query: CommonFileQuery, fileTypeFilter: &super::super::foundation::collections::IIterable) -> Result> { + #[inline] pub fn create_common_file_query(&self, query: CommonFileQuery, fileTypeFilter: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateCommonFileQuery)(self as *const _ as *mut _, 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(&self, query: CommonFolderQuery) -> Result> { + }} + #[inline] pub fn create_common_folder_query(&self, query: CommonFolderQuery) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateCommonFolderQuery)(self as *const _ as *mut _, query, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_StorageProviderIdFilter(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IQueryOptionsWithProviderFilter { - #[inline] pub unsafe fn get_storage_provider_id_filter(&self) -> Result>> { + #[inline] pub fn get_storage_provider_id_filter(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StorageProviderIdFilter)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_STRUCT! { struct SortEntry { PropertyName: HSTRING, AscendingOrder: bool, }} -RT_CLASS!{class SortEntryVector: super::super::foundation::collections::IVector} +RT_CLASS!{class SortEntryVector: foundation::collections::IVector} 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(&self, startIndex: u32, maxNumberOfItems: u32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetFilesAsyncDefaultStartAndCount(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn GetFilesAsync(&self, startIndex: u32, maxNumberOfItems: u32, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetFilesAsyncDefaultStartAndCount(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IStorageFileQueryResult { - #[inline] pub unsafe fn get_files_async(&self, startIndex: u32, maxNumberOfItems: u32) -> Result>>> { + #[inline] pub fn get_files_async(&self, startIndex: u32, maxNumberOfItems: u32) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFilesAsync)(self as *const _ as *mut _, 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(&self) -> Result>>> { + }} + #[inline] pub fn get_files_async_default_start_and_count(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFilesAsyncDefaultStartAndCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class StorageFileQueryResult: IStorageFileQueryResult} 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(&self, file: *mut super::StorageFile, out: *mut *mut super::super::foundation::collections::IMap>) -> HRESULT + #[cfg(feature="windows-data")] fn GetMatchingPropertiesWithRanges(&self, file: *mut super::StorageFile, out: *mut *mut foundation::collections::IMap>) -> HRESULT }} impl IStorageFileQueryResult2 { - #[cfg(feature="windows-data")] #[inline] pub unsafe fn get_matching_properties_with_ranges(&self, file: &super::StorageFile) -> Result>>> { + #[cfg(feature="windows-data")] #[inline] pub fn get_matching_properties_with_ranges(&self, file: &super::StorageFile) -> Result>>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetMatchingPropertiesWithRanges)(self as *const _ as *mut _, file as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetIndexedStateAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn CreateFileQueryOverloadDefault(&self, out: *mut *mut StorageFileQueryResult) -> HRESULT, fn CreateFileQuery(&self, query: CommonFileQuery, out: *mut *mut StorageFileQueryResult) -> HRESULT, fn CreateFileQueryWithOptions(&self, queryOptions: *mut QueryOptions, out: *mut *mut StorageFileQueryResult) -> HRESULT, @@ -3419,211 +3419,211 @@ RT_INTERFACE!{interface IStorageFolderQueryOperations(IStorageFolderQueryOperati fn CreateFolderQueryWithOptions(&self, queryOptions: *mut QueryOptions, out: *mut *mut StorageFolderQueryResult) -> HRESULT, fn CreateItemQuery(&self, out: *mut *mut StorageItemQueryResult) -> HRESULT, fn CreateItemQueryWithOptions(&self, queryOptions: *mut QueryOptions, out: *mut *mut StorageItemQueryResult) -> HRESULT, - fn GetFilesAsync(&self, query: CommonFileQuery, startIndex: u32, maxItemsToRetrieve: u32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetFilesAsyncOverloadDefaultStartAndCount(&self, query: CommonFileQuery, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetFoldersAsync(&self, query: CommonFolderQuery, startIndex: u32, maxItemsToRetrieve: u32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetFoldersAsyncOverloadDefaultStartAndCount(&self, query: CommonFolderQuery, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetItemsAsync(&self, startIndex: u32, maxItemsToRetrieve: u32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetFilesAsync(&self, query: CommonFileQuery, startIndex: u32, maxItemsToRetrieve: u32, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetFilesAsyncOverloadDefaultStartAndCount(&self, query: CommonFileQuery, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetFoldersAsync(&self, query: CommonFolderQuery, startIndex: u32, maxItemsToRetrieve: u32, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetFoldersAsyncOverloadDefaultStartAndCount(&self, query: CommonFolderQuery, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetItemsAsync(&self, startIndex: u32, maxItemsToRetrieve: u32, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, fn AreQueryOptionsSupported(&self, queryOptions: *mut QueryOptions, out: *mut bool) -> HRESULT, fn IsCommonFolderQuerySupported(&self, query: CommonFolderQuery, out: *mut bool) -> HRESULT, fn IsCommonFileQuerySupported(&self, query: CommonFileQuery, out: *mut bool) -> HRESULT }} impl IStorageFolderQueryOperations { - #[inline] pub unsafe fn get_indexed_state_async(&self) -> Result>> { + #[inline] pub fn get_indexed_state_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetIndexedStateAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_file_query_overload_default(&self) -> Result> { + }} + #[inline] pub fn create_file_query_overload_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFileQueryOverloadDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_file_query(&self, query: CommonFileQuery) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_file_query(&self, query: CommonFileQuery) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFileQuery)(self as *const _ as *mut _, query, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_file_query_with_options(&self, queryOptions: &QueryOptions) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_file_query_with_options(&self, queryOptions: &QueryOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFileQueryWithOptions)(self as *const _ as *mut _, 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(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_folder_query_overload_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFolderQueryOverloadDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_folder_query(&self, query: CommonFolderQuery) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_folder_query(&self, query: CommonFolderQuery) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFolderQuery)(self as *const _ as *mut _, query, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_folder_query_with_options(&self, queryOptions: &QueryOptions) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_folder_query_with_options(&self, queryOptions: &QueryOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFolderQueryWithOptions)(self as *const _ as *mut _, 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(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_item_query(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateItemQuery)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_item_query_with_options(&self, queryOptions: &QueryOptions) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_item_query_with_options(&self, queryOptions: &QueryOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateItemQueryWithOptions)(self as *const _ as *mut _, 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(&self, query: CommonFileQuery, startIndex: u32, maxItemsToRetrieve: u32) -> Result>>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_files_async(&self, query: CommonFileQuery, startIndex: u32, maxItemsToRetrieve: u32) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFilesAsync)(self as *const _ as *mut _, 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(&self, query: CommonFileQuery) -> Result>>> { + }} + #[inline] pub fn get_files_async_overload_default_start_and_count(&self, query: CommonFileQuery) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFilesAsyncOverloadDefaultStartAndCount)(self as *const _ as *mut _, query, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_folders_async(&self, query: CommonFolderQuery, startIndex: u32, maxItemsToRetrieve: u32) -> Result>>> { + }} + #[inline] pub fn get_folders_async(&self, query: CommonFolderQuery, startIndex: u32, maxItemsToRetrieve: u32) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFoldersAsync)(self as *const _ as *mut _, 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(&self, query: CommonFolderQuery) -> Result>>> { + }} + #[inline] pub fn get_folders_async_overload_default_start_and_count(&self, query: CommonFolderQuery) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFoldersAsyncOverloadDefaultStartAndCount)(self as *const _ as *mut _, query, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_items_async(&self, startIndex: u32, maxItemsToRetrieve: u32) -> Result>>> { + }} + #[inline] pub fn get_items_async(&self, startIndex: u32, maxItemsToRetrieve: u32) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetItemsAsync)(self as *const _ as *mut _, startIndex, maxItemsToRetrieve, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn are_query_options_supported(&self, queryOptions: &QueryOptions) -> Result { + }} + #[inline] pub fn are_query_options_supported(&self, queryOptions: &QueryOptions) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).AreQueryOptionsSupported)(self as *const _ as *mut _, 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(&self, query: CommonFolderQuery) -> Result { + }} + #[inline] pub fn is_common_folder_query_supported(&self, query: CommonFolderQuery) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsCommonFolderQuerySupported)(self as *const _ as *mut _, query, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_common_file_query_supported(&self, query: CommonFileQuery) -> Result { + }} + #[inline] pub fn is_common_file_query_supported(&self, query: CommonFileQuery) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsCommonFileQuerySupported)(self as *const _ as *mut _, query, &mut out); if hr == S_OK { Ok(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(&self, startIndex: u32, maxNumberOfItems: u32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetFoldersAsyncDefaultStartAndCount(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn GetFoldersAsync(&self, startIndex: u32, maxNumberOfItems: u32, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetFoldersAsyncDefaultStartAndCount(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IStorageFolderQueryResult { - #[inline] pub unsafe fn get_folders_async(&self, startIndex: u32, maxNumberOfItems: u32) -> Result>>> { + #[inline] pub fn get_folders_async(&self, startIndex: u32, maxNumberOfItems: u32) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFoldersAsync)(self as *const _ as *mut _, 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(&self) -> Result>>> { + }} + #[inline] pub fn get_folders_async_default_start_and_count(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFoldersAsyncDefaultStartAndCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class StorageFolderQueryResult: IStorageFolderQueryResult} 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(&self, startIndex: u32, maxNumberOfItems: u32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetItemsAsyncDefaultStartAndCount(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn GetItemsAsync(&self, startIndex: u32, maxNumberOfItems: u32, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetItemsAsyncDefaultStartAndCount(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IStorageItemQueryResult { - #[inline] pub unsafe fn get_items_async(&self, startIndex: u32, maxNumberOfItems: u32) -> Result>>> { + #[inline] pub fn get_items_async(&self, startIndex: u32, maxNumberOfItems: u32) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetItemsAsync)(self as *const _ as *mut _, 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(&self) -> Result>>> { + }} + #[inline] pub fn get_items_async_default_start_and_count(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetItemsAsyncDefaultStartAndCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class StorageItemQueryResult: IStorageItemQueryResult} 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(&self, out: *mut *mut super::StorageFolder) -> HRESULT, - fn CreateModifiedSinceQuery(&self, lastQueryTime: super::super::foundation::DateTime, out: *mut *mut StorageItemQueryResult) -> HRESULT + fn CreateModifiedSinceQuery(&self, lastQueryTime: foundation::DateTime, out: *mut *mut StorageItemQueryResult) -> HRESULT }} impl IStorageLibraryContentChangedTriggerDetails { - #[inline] pub unsafe fn get_folder(&self) -> Result> { + #[inline] pub fn get_folder(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Folder)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_modified_since_query(&self, lastQueryTime: super::super::foundation::DateTime) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_modified_since_query(&self, lastQueryTime: foundation::DateTime) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateModifiedSinceQuery)(self as *const _ as *mut _, lastQueryTime, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class StorageLibraryContentChangedTriggerDetails: IStorageLibraryContentChangedTriggerDetails} 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetItemCountAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn get_Folder(&self, out: *mut *mut super::StorageFolder) -> HRESULT, - fn add_ContentsChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ContentsChanged(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_OptionsChanged(&self, changedHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_OptionsChanged(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn FindStartIndexAsync(&self, value: *mut IInspectable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn add_ContentsChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ContentsChanged(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_OptionsChanged(&self, changedHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_OptionsChanged(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT, + fn FindStartIndexAsync(&self, value: *mut IInspectable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetCurrentQueryOptions(&self, out: *mut *mut QueryOptions) -> HRESULT, fn ApplyNewQueryOptions(&self, newQueryOptions: *mut QueryOptions) -> HRESULT }} impl IStorageQueryResultBase { - #[inline] pub unsafe fn get_item_count_async(&self) -> Result>> { + #[inline] pub fn get_item_count_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetItemCountAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_folder(&self) -> Result> { + }} + #[inline] pub fn get_folder(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Folder)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_contents_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_contents_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ContentsChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_contents_changed(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_contents_changed(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ContentsChanged)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_options_changed(&self, changedHandler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_options_changed(&self, changedHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_OptionsChanged)(self as *const _ as *mut _, changedHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_options_changed(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_options_changed(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_OptionsChanged)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn find_start_index_async(&self, value: &IInspectable) -> Result>> { + }} + #[inline] pub fn find_start_index_async(&self, value: &IInspectable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindStartIndexAsync)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[inline] pub fn get_current_query_options(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentQueryOptions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn apply_new_query_options(&self, newQueryOptions: &QueryOptions) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn apply_new_query_options(&self, newQueryOptions: &QueryOptions) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ApplyNewQueryOptions)(self as *const _ as *mut _, newQueryOptions as *const _ as *mut _); if hr == S_OK { Ok(()) } 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] { @@ -3633,24 +3633,24 @@ RT_INTERFACE!{interface IValueAndLanguage(IValueAndLanguageVtbl): IInspectable(I fn put_Value(&self, value: *mut IInspectable) -> HRESULT }} impl IValueAndLanguage { - #[inline] pub unsafe fn get_language(&self) -> Result { + #[inline] pub fn get_language(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Language)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_language(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_language(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Language)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result> { + }} + #[inline] pub fn get_value(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_value(&self, value: &IInspectable) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_value(&self, value: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Value)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ValueAndLanguage: IValueAndLanguage} impl RtActivatable for ValueAndLanguage {} @@ -3658,7 +3658,7 @@ DEFINE_CLSID!(ValueAndLanguage(&[87,105,110,100,111,119,115,46,83,116,111,114,97 } // Windows.Storage.Search pub mod pickers { // Windows.Storage.Pickers use ::prelude::*; -RT_CLASS!{class FileExtensionVector: super::super::foundation::collections::IVector} +RT_CLASS!{class FileExtensionVector: 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(&self, out: *mut PickerViewMode) -> HRESULT, @@ -3669,117 +3669,117 @@ RT_INTERFACE!{interface IFileOpenPicker(IFileOpenPickerVtbl): IInspectable(IInsp fn put_SuggestedStartLocation(&self, value: PickerLocationId) -> HRESULT, fn get_CommitButtonText(&self, out: *mut HSTRING) -> HRESULT, fn put_CommitButtonText(&self, value: HSTRING) -> HRESULT, - fn get_FileTypeFilter(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn PickSingleFileAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn PickMultipleFilesAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn get_FileTypeFilter(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn PickSingleFileAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn PickMultipleFilesAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IFileOpenPicker { - #[inline] pub unsafe fn get_view_mode(&self) -> Result { + #[inline] pub fn get_view_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ViewMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_view_mode(&self, value: PickerViewMode) -> Result<()> { + }} + #[inline] pub fn set_view_mode(&self, value: PickerViewMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ViewMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_settings_identifier(&self) -> Result { + }} + #[inline] pub fn get_settings_identifier(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SettingsIdentifier)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_settings_identifier(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_settings_identifier(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SettingsIdentifier)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_suggested_start_location(&self) -> Result { + }} + #[inline] pub fn get_suggested_start_location(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SuggestedStartLocation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_suggested_start_location(&self, value: PickerLocationId) -> Result<()> { + }} + #[inline] pub fn set_suggested_start_location(&self, value: PickerLocationId) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SuggestedStartLocation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_commit_button_text(&self) -> Result { + }} + #[inline] pub fn get_commit_button_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CommitButtonText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_commit_button_text(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_commit_button_text(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CommitButtonText)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_file_type_filter(&self) -> Result>> { + }} + #[inline] pub fn get_file_type_filter(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FileTypeFilter)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn pick_single_file_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn pick_single_file_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PickSingleFileAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn pick_multiple_files_async(&self) -> Result>>> { + }} + #[inline] pub fn pick_multiple_files_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PickMultipleFilesAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class FileOpenPicker: IFileOpenPicker} impl RtActivatable for FileOpenPicker {} impl RtActivatable for FileOpenPicker {} impl FileOpenPicker { - #[inline] pub fn resume_pick_single_file_async() -> Result>> { unsafe { + #[inline] pub fn resume_pick_single_file_async() -> Result>> { >::get_activation_factory().resume_pick_single_file_async() - }} + } } DEFINE_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]) [CLSID_FileOpenPicker]); 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(&self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT, + fn get_ContinuationData(&self, out: *mut *mut foundation::collections::ValueSet) -> HRESULT, fn PickSingleFileAndContinue(&self) -> HRESULT, fn PickMultipleFilesAndContinue(&self) -> HRESULT }} impl IFileOpenPicker2 { - #[inline] pub unsafe fn get_continuation_data(&self) -> Result> { + #[inline] pub fn get_continuation_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContinuationData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn pick_single_file_and_continue(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn pick_single_file_and_continue(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).PickSingleFileAndContinue)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn pick_multiple_files_and_continue(&self) -> Result<()> { + }} + #[inline] pub fn pick_multiple_files_and_continue(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).PickMultipleFilesAndContinue)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn ResumePickSingleFileAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IFileOpenPickerStatics { - #[inline] pub unsafe fn resume_pick_single_file_async(&self) -> Result>> { + #[inline] pub fn resume_pick_single_file_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ResumePickSingleFileAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } 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(&self, pickerOperationId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn PickSingleFileAsync(&self, pickerOperationId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IFileOpenPickerWithOperationId { - #[inline] pub unsafe fn pick_single_file_async(&self, pickerOperationId: &HStringArg) -> Result>> { + #[inline] pub fn pick_single_file_async(&self, pickerOperationId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PickSingleFileAsync)(self as *const _ as *mut _, pickerOperationId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } -RT_CLASS!{class FilePickerFileTypesOrderedMap: super::super::foundation::collections::IMap>} -RT_CLASS!{class FilePickerSelectedFilesArray: super::super::foundation::collections::IVectorView} +RT_CLASS!{class FilePickerFileTypesOrderedMap: foundation::collections::IMap>} +RT_CLASS!{class FilePickerSelectedFilesArray: foundation::collections::IVectorView} 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(&self, out: *mut HSTRING) -> HRESULT, @@ -3788,99 +3788,99 @@ RT_INTERFACE!{interface IFileSavePicker(IFileSavePickerVtbl): IInspectable(IInsp fn put_SuggestedStartLocation(&self, value: PickerLocationId) -> HRESULT, fn get_CommitButtonText(&self, out: *mut HSTRING) -> HRESULT, fn put_CommitButtonText(&self, value: HSTRING) -> HRESULT, - fn get_FileTypeChoices(&self, out: *mut *mut super::super::foundation::collections::IMap>) -> HRESULT, + fn get_FileTypeChoices(&self, out: *mut *mut foundation::collections::IMap>) -> HRESULT, fn get_DefaultFileExtension(&self, out: *mut HSTRING) -> HRESULT, fn put_DefaultFileExtension(&self, value: HSTRING) -> HRESULT, fn get_SuggestedSaveFile(&self, out: *mut *mut super::StorageFile) -> HRESULT, fn put_SuggestedSaveFile(&self, value: *mut super::StorageFile) -> HRESULT, fn get_SuggestedFileName(&self, out: *mut HSTRING) -> HRESULT, fn put_SuggestedFileName(&self, value: HSTRING) -> HRESULT, - fn PickSaveFileAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn PickSaveFileAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IFileSavePicker { - #[inline] pub unsafe fn get_settings_identifier(&self) -> Result { + #[inline] pub fn get_settings_identifier(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SettingsIdentifier)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_settings_identifier(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_settings_identifier(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SettingsIdentifier)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_suggested_start_location(&self) -> Result { + }} + #[inline] pub fn get_suggested_start_location(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SuggestedStartLocation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_suggested_start_location(&self, value: PickerLocationId) -> Result<()> { + }} + #[inline] pub fn set_suggested_start_location(&self, value: PickerLocationId) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SuggestedStartLocation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_commit_button_text(&self) -> Result { + }} + #[inline] pub fn get_commit_button_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CommitButtonText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_commit_button_text(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_commit_button_text(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CommitButtonText)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_file_type_choices(&self) -> Result>>> { + }} + #[inline] pub fn get_file_type_choices(&self) -> Result>>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FileTypeChoices)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_file_extension(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_default_file_extension(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DefaultFileExtension)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_default_file_extension(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_default_file_extension(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DefaultFileExtension)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_suggested_save_file(&self) -> Result> { + }} + #[inline] pub fn get_suggested_save_file(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SuggestedSaveFile)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_suggested_save_file(&self, value: &super::StorageFile) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_suggested_save_file(&self, value: &super::StorageFile) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SuggestedSaveFile)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_suggested_file_name(&self) -> Result { + }} + #[inline] pub fn get_suggested_file_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SuggestedFileName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_suggested_file_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_suggested_file_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SuggestedFileName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn pick_save_file_async(&self) -> Result>> { + }} + #[inline] pub fn pick_save_file_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PickSaveFileAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class FileSavePicker: IFileSavePicker} impl RtActivatable for FileSavePicker {} DEFINE_CLSID!(FileSavePicker(&[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,83,97,118,101,80,105,99,107,101,114,0]) [CLSID_FileSavePicker]); 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(&self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT, + fn get_ContinuationData(&self, out: *mut *mut foundation::collections::ValueSet) -> HRESULT, fn PickSaveFileAndContinue(&self) -> HRESULT }} impl IFileSavePicker2 { - #[inline] pub unsafe fn get_continuation_data(&self) -> Result> { + #[inline] pub fn get_continuation_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContinuationData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn pick_save_file_and_continue(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn pick_save_file_and_continue(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).PickSaveFileAndContinue)(self as *const _ as *mut _); 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] { @@ -3888,15 +3888,15 @@ RT_INTERFACE!{interface IFileSavePicker3(IFileSavePicker3Vtbl): IInspectable(IIn fn put_EnterpriseId(&self, value: HSTRING) -> HRESULT }} impl IFileSavePicker3 { - #[inline] pub unsafe fn get_enterprise_id(&self) -> Result { + #[inline] pub fn get_enterprise_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EnterpriseId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_enterprise_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_enterprise_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_EnterpriseId)(self as *const _ as *mut _, 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] { @@ -3908,75 +3908,75 @@ RT_INTERFACE!{interface IFolderPicker(IFolderPickerVtbl): IInspectable(IInspecta fn put_SuggestedStartLocation(&self, value: PickerLocationId) -> HRESULT, fn get_CommitButtonText(&self, out: *mut HSTRING) -> HRESULT, fn put_CommitButtonText(&self, value: HSTRING) -> HRESULT, - fn get_FileTypeFilter(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn PickSingleFolderAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn get_FileTypeFilter(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn PickSingleFolderAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IFolderPicker { - #[inline] pub unsafe fn get_view_mode(&self) -> Result { + #[inline] pub fn get_view_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ViewMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_view_mode(&self, value: PickerViewMode) -> Result<()> { + }} + #[inline] pub fn set_view_mode(&self, value: PickerViewMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ViewMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_settings_identifier(&self) -> Result { + }} + #[inline] pub fn get_settings_identifier(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SettingsIdentifier)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_settings_identifier(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_settings_identifier(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SettingsIdentifier)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_suggested_start_location(&self) -> Result { + }} + #[inline] pub fn get_suggested_start_location(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SuggestedStartLocation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_suggested_start_location(&self, value: PickerLocationId) -> Result<()> { + }} + #[inline] pub fn set_suggested_start_location(&self, value: PickerLocationId) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SuggestedStartLocation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_commit_button_text(&self) -> Result { + }} + #[inline] pub fn get_commit_button_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CommitButtonText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_commit_button_text(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_commit_button_text(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CommitButtonText)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_file_type_filter(&self) -> Result>> { + }} + #[inline] pub fn get_file_type_filter(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FileTypeFilter)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn pick_single_folder_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn pick_single_folder_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PickSingleFolderAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class FolderPicker: IFolderPicker} impl RtActivatable for FolderPicker {} DEFINE_CLSID!(FolderPicker(&[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,111,108,100,101,114,80,105,99,107,101,114,0]) [CLSID_FolderPicker]); 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(&self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT, + fn get_ContinuationData(&self, out: *mut *mut foundation::collections::ValueSet) -> HRESULT, fn PickFolderAndContinue(&self) -> HRESULT }} impl IFolderPicker2 { - #[inline] pub unsafe fn get_continuation_data(&self) -> Result> { + #[inline] pub fn get_continuation_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContinuationData)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn pick_folder_and_continue(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn pick_folder_and_continue(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).PickFolderAndContinue)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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, @@ -3995,78 +3995,78 @@ RT_INTERFACE!{interface IFileOpenPickerUI(IFileOpenPickerUIVtbl): IInspectable(I fn RemoveFile(&self, id: HSTRING) -> HRESULT, fn ContainsFile(&self, id: HSTRING, out: *mut bool) -> HRESULT, fn CanAddFile(&self, file: *mut super::super::IStorageFile, out: *mut bool) -> HRESULT, - fn get_AllowedFileTypes(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_AllowedFileTypes(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_SelectionMode(&self, out: *mut FileSelectionMode) -> HRESULT, fn get_SettingsIdentifier(&self, out: *mut HSTRING) -> HRESULT, fn get_Title(&self, out: *mut HSTRING) -> HRESULT, fn put_Title(&self, value: HSTRING) -> HRESULT, - fn add_FileRemoved(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_FileRemoved(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_Closing(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Closing(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn add_FileRemoved(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_FileRemoved(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Closing(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Closing(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IFileOpenPickerUI { - #[inline] pub unsafe fn add_file(&self, id: &HStringArg, file: &super::super::IStorageFile) -> Result { + #[inline] pub fn add_file(&self, id: &HStringArg, file: &super::super::IStorageFile) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).AddFile)(self as *const _ as *mut _, id.get(), file as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_file(&self, id: &HStringArg) -> Result<()> { + }} + #[inline] pub fn remove_file(&self, id: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveFile)(self as *const _ as *mut _, id.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn contains_file(&self, id: &HStringArg) -> Result { + }} + #[inline] pub fn contains_file(&self, id: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ContainsFile)(self as *const _ as *mut _, id.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn can_add_file(&self, file: &super::super::IStorageFile) -> Result { + }} + #[inline] pub fn can_add_file(&self, file: &super::super::IStorageFile) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).CanAddFile)(self as *const _ as *mut _, file as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_allowed_file_types(&self) -> Result>> { + }} + #[inline] pub fn get_allowed_file_types(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AllowedFileTypes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_selection_mode(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_selection_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SelectionMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_settings_identifier(&self) -> Result { + }} + #[inline] pub fn get_settings_identifier(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SettingsIdentifier)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_title(&self) -> Result { + }} + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_title(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_title(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Title)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_file_removed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_file_removed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_FileRemoved)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_file_removed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_file_removed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_FileRemoved)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_closing(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_closing(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Closing)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_closing(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_closing(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Closing)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class FileOpenPickerUI: IFileOpenPickerUI} DEFINE_IID!(IID_IFileRemovedEventArgs, 319045031, 32714, 19499, 158, 202, 104, 144, 249, 240, 1, 133); @@ -4074,74 +4074,74 @@ RT_INTERFACE!{interface IFileRemovedEventArgs(IFileRemovedEventArgsVtbl): IInspe fn get_Id(&self, out: *mut HSTRING) -> HRESULT }} impl IFileRemovedEventArgs { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class FileRemovedEventArgs: IFileRemovedEventArgs} 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(&self, out: *mut HSTRING) -> HRESULT, fn put_Title(&self, value: HSTRING) -> HRESULT, - fn get_AllowedFileTypes(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_AllowedFileTypes(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_SettingsIdentifier(&self, out: *mut HSTRING) -> HRESULT, fn get_FileName(&self, out: *mut HSTRING) -> HRESULT, fn TrySetFileName(&self, value: HSTRING, out: *mut SetFileNameResult) -> HRESULT, - fn add_FileNameChanged(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_FileNameChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_TargetFileRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_TargetFileRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn add_FileNameChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_FileNameChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_TargetFileRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_TargetFileRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IFileSavePickerUI { - #[inline] pub unsafe fn get_title(&self) -> Result { + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_title(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_title(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Title)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_allowed_file_types(&self) -> Result>> { + }} + #[inline] pub fn get_allowed_file_types(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AllowedFileTypes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_settings_identifier(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_settings_identifier(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SettingsIdentifier)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_file_name(&self) -> Result { + }} + #[inline] pub fn get_file_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FileName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_set_file_name(&self, value: &HStringArg) -> Result { + }} + #[inline] pub fn try_set_file_name(&self, value: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TrySetFileName)(self as *const _ as *mut _, value.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_file_name_changed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_file_name_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_FileNameChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_file_name_changed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_file_name_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_FileNameChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_target_file_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_target_file_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_TargetFileRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_target_file_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_target_file_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_TargetFileRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class FileSavePickerUI: IFileSavePickerUI} RT_ENUM! { enum FileSelectionMode: i32 { @@ -4152,10 +4152,10 @@ RT_INTERFACE!{interface IPickerClosingDeferral(IPickerClosingDeferralVtbl): IIns fn Complete(&self) -> HRESULT }} impl IPickerClosingDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PickerClosingDeferral: IPickerClosingDeferral} DEFINE_IID!(IID_IPickerClosingEventArgs, 2119823908, 45874, 20242, 139, 159, 168, 194, 240, 107, 50, 205); @@ -4164,34 +4164,34 @@ RT_INTERFACE!{interface IPickerClosingEventArgs(IPickerClosingEventArgsVtbl): II fn get_IsCanceled(&self, out: *mut bool) -> HRESULT }} impl IPickerClosingEventArgs { - #[inline] pub unsafe fn get_closing_operation(&self) -> Result> { + #[inline] pub fn get_closing_operation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ClosingOperation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_canceled(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_canceled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCanceled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PickerClosingEventArgs: IPickerClosingEventArgs} 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(&self, out: *mut *mut PickerClosingDeferral) -> HRESULT, - fn get_Deadline(&self, out: *mut ::rt::gen::windows::foundation::DateTime) -> HRESULT + fn get_Deadline(&self, out: *mut foundation::DateTime) -> HRESULT }} impl IPickerClosingOperation { - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deadline(&self) -> Result<::rt::gen::windows::foundation::DateTime> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deadline(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Deadline)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PickerClosingOperation: IPickerClosingOperation} RT_ENUM! { enum SetFileNameResult: i32 { @@ -4204,20 +4204,20 @@ RT_INTERFACE!{interface ITargetFileRequest(ITargetFileRequestVtbl): IInspectable fn GetDeferral(&self, out: *mut *mut TargetFileRequestDeferral) -> HRESULT }} impl ITargetFileRequest { - #[inline] pub unsafe fn get_target_file(&self) -> Result> { + #[inline] pub fn get_target_file(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TargetFile)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_target_file(&self, value: &super::super::IStorageFile) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_target_file(&self, value: &super::super::IStorageFile) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TargetFile)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class TargetFileRequest: ITargetFileRequest} DEFINE_IID!(IID_ITargetFileRequestDeferral, 1257151889, 48917, 19881, 149, 246, 246, 183, 213, 88, 34, 91); @@ -4225,10 +4225,10 @@ RT_INTERFACE!{interface ITargetFileRequestDeferral(ITargetFileRequestDeferralVtb fn Complete(&self) -> HRESULT }} impl ITargetFileRequestDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class TargetFileRequestDeferral: ITargetFileRequestDeferral} DEFINE_IID!(IID_ITargetFileRequestedEventArgs, 2976111553, 6993, 19593, 165, 145, 15, 212, 11, 60, 87, 201); @@ -4236,11 +4236,11 @@ RT_INTERFACE!{interface ITargetFileRequestedEventArgs(ITargetFileRequestedEventA fn get_Request(&self, out: *mut *mut TargetFileRequest) -> HRESULT }} impl ITargetFileRequestedEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class TargetFileRequestedEventArgs: ITargetFileRequestedEventArgs} } // Windows.Storage.Pickers.Provider @@ -4256,9 +4256,9 @@ RT_ENUM! { enum CachedFileTarget: i32 { RT_CLASS!{static class CachedFileUpdater} impl RtActivatable for CachedFileUpdater {} impl CachedFileUpdater { - #[inline] pub fn set_update_information(file: &super::IStorageFile, contentId: &HStringArg, readMode: ReadActivationMode, writeMode: WriteActivationMode, options: CachedFileOptions) -> Result<()> { unsafe { + #[inline] pub fn set_update_information(file: &super::IStorageFile, contentId: &HStringArg, readMode: ReadActivationMode, writeMode: WriteActivationMode, options: CachedFileOptions) -> Result<()> { >::get_activation_factory().set_update_information(file, contentId, readMode, writeMode, options) - }} + } } DEFINE_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]) [CLSID_CachedFileUpdater]); DEFINE_IID!(IID_ICachedFileUpdaterStatics, 2680752416, 31695, 18568, 168, 30, 16, 45, 112, 52, 215, 206); @@ -4266,60 +4266,60 @@ RT_INTERFACE!{static interface ICachedFileUpdaterStatics(ICachedFileUpdaterStati fn SetUpdateInformation(&self, file: *mut super::IStorageFile, contentId: HSTRING, readMode: ReadActivationMode, writeMode: WriteActivationMode, options: CachedFileOptions) -> HRESULT }} impl ICachedFileUpdaterStatics { - #[inline] pub unsafe fn set_update_information(&self, file: &super::IStorageFile, contentId: &HStringArg, readMode: ReadActivationMode, writeMode: WriteActivationMode, options: CachedFileOptions) -> Result<()> { + #[inline] pub fn set_update_information(&self, file: &super::IStorageFile, contentId: &HStringArg, readMode: ReadActivationMode, writeMode: WriteActivationMode, options: CachedFileOptions) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetUpdateInformation)(self as *const _ as *mut _, file as *const _ as *mut _, contentId.get(), readMode, writeMode, options); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut HSTRING) -> HRESULT, fn put_Title(&self, value: HSTRING) -> HRESULT, fn get_UpdateTarget(&self, out: *mut CachedFileTarget) -> HRESULT, - fn add_FileUpdateRequested(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_FileUpdateRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_UIRequested(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_UIRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_FileUpdateRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_FileUpdateRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_UIRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_UIRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_UIStatus(&self, out: *mut UIStatus) -> HRESULT }} impl ICachedFileUpdaterUI { - #[inline] pub unsafe fn get_title(&self) -> Result { + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_title(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_title(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Title)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_update_target(&self) -> Result { + }} + #[inline] pub fn get_update_target(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UpdateTarget)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_file_update_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_file_update_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_FileUpdateRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_file_update_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_file_update_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_FileUpdateRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_uirequested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_uirequested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_UIRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_uirequested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_uirequested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_UIRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_uistatus(&self) -> Result { + }} + #[inline] pub fn get_uistatus(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UIStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class CachedFileUpdaterUI: ICachedFileUpdaterUI} DEFINE_IID!(IID_ICachedFileUpdaterUI2, 2287378972, 34457, 17216, 159, 73, 247, 202, 215, 254, 137, 145); @@ -4328,16 +4328,16 @@ RT_INTERFACE!{interface ICachedFileUpdaterUI2(ICachedFileUpdaterUI2Vtbl): IInspe fn GetDeferral(&self, out: *mut *mut FileUpdateRequestDeferral) -> HRESULT }} impl ICachedFileUpdaterUI2 { - #[inline] pub unsafe fn get_update_request(&self) -> Result> { + #[inline] pub fn get_update_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UpdateRequest)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IFileUpdateRequest, 1086858550, 49662, 19859, 167, 146, 30, 115, 107, 199, 8, 55); RT_INTERFACE!{interface IFileUpdateRequest(IFileUpdateRequestVtbl): IInspectable(IInspectableVtbl) [IID_IFileUpdateRequest] { @@ -4349,34 +4349,34 @@ RT_INTERFACE!{interface IFileUpdateRequest(IFileUpdateRequestVtbl): IInspectable fn UpdateLocalFile(&self, value: *mut super::IStorageFile) -> HRESULT }} impl IFileUpdateRequest { - #[inline] pub unsafe fn get_content_id(&self) -> Result { + #[inline] pub fn get_content_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContentId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_file(&self) -> Result> { + }} + #[inline] pub fn get_file(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_File)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_status(&self, value: FileUpdateStatus) -> Result<()> { + }} + #[inline] pub fn set_status(&self, value: FileUpdateStatus) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Status)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn update_local_file(&self, value: &super::IStorageFile) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn update_local_file(&self, value: &super::IStorageFile) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).UpdateLocalFile)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class FileUpdateRequest: IFileUpdateRequest} DEFINE_IID!(IID_IFileUpdateRequest2, 2185774664, 48574, 17531, 162, 238, 122, 254, 106, 3, 42, 148); @@ -4385,25 +4385,25 @@ RT_INTERFACE!{interface IFileUpdateRequest2(IFileUpdateRequest2Vtbl): IInspectab fn put_UserInputNeededMessage(&self, value: HSTRING) -> HRESULT }} impl IFileUpdateRequest2 { - #[inline] pub unsafe fn get_user_input_needed_message(&self) -> Result { + #[inline] pub fn get_user_input_needed_message(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UserInputNeededMessage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_user_input_needed_message(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_user_input_needed_message(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_UserInputNeededMessage)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self) -> HRESULT }} impl IFileUpdateRequestDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class FileUpdateRequestDeferral: IFileUpdateRequestDeferral} DEFINE_IID!(IID_IFileUpdateRequestedEventArgs, 2064290626, 14597, 17293, 170, 239, 120, 174, 38, 95, 141, 210); @@ -4411,11 +4411,11 @@ RT_INTERFACE!{interface IFileUpdateRequestedEventArgs(IFileUpdateRequestedEventA fn get_Request(&self, out: *mut *mut FileUpdateRequest) -> HRESULT }} impl IFileUpdateRequestedEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class FileUpdateRequestedEventArgs: IFileUpdateRequestedEventArgs} RT_ENUM! { enum FileUpdateStatus: i32 { @@ -4439,21 +4439,21 @@ RT_ENUM! { enum StorageProviderInSyncPolicy: u32 { RT_CLASS!{static class StorageProviderItemProperties} impl RtActivatable for StorageProviderItemProperties {} impl StorageProviderItemProperties { - #[inline] pub fn set_async(item: &super::IStorageItem, itemProperties: &super::super::foundation::collections::IIterable) -> Result> { unsafe { + #[inline] pub fn set_async(item: &super::IStorageItem, itemProperties: &foundation::collections::IIterable) -> Result> { >::get_activation_factory().set_async(item, itemProperties) - }} + } } DEFINE_CLSID!(StorageProviderItemProperties(&[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,83,116,111,114,97,103,101,80,114,111,118,105,100,101,114,73,116,101,109,80,114,111,112,101,114,116,105,101,115,0]) [CLSID_StorageProviderItemProperties]); DEFINE_IID!(IID_IStorageProviderItemPropertiesStatics, 757865623, 9988, 18217, 143, 169, 126, 107, 142, 21, 140, 47); RT_INTERFACE!{static interface IStorageProviderItemPropertiesStatics(IStorageProviderItemPropertiesStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IStorageProviderItemPropertiesStatics] { - fn SetAsync(&self, item: *mut super::IStorageItem, itemProperties: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn SetAsync(&self, item: *mut super::IStorageItem, itemProperties: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IStorageProviderItemPropertiesStatics { - #[inline] pub unsafe fn set_async(&self, item: &super::IStorageItem, itemProperties: &super::super::foundation::collections::IIterable) -> Result> { + #[inline] pub fn set_async(&self, item: &super::IStorageItem, itemProperties: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetAsync)(self as *const _ as *mut _, item as *const _ as *mut _, itemProperties as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IStorageProviderItemProperty, 1198306648, 29451, 16776, 183, 181, 99, 183, 22, 237, 71, 109); RT_INTERFACE!{interface IStorageProviderItemProperty(IStorageProviderItemPropertyVtbl): IInspectable(IInspectableVtbl) [IID_IStorageProviderItemProperty] { @@ -4465,33 +4465,33 @@ RT_INTERFACE!{interface IStorageProviderItemProperty(IStorageProviderItemPropert fn get_IconResource(&self, out: *mut HSTRING) -> HRESULT }} impl IStorageProviderItemProperty { - #[inline] pub unsafe fn set_id(&self, value: i32) -> Result<()> { + #[inline] pub fn set_id(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Id)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&self) -> Result { + }} + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_value(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_value(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Value)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result { + }} + #[inline] pub fn get_value(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_icon_resource(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_icon_resource(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IconResource)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_icon_resource(&self) -> Result { + }} + #[inline] pub fn get_icon_resource(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IconResource)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class StorageProviderItemProperty: IStorageProviderItemProperty} impl RtActivatable for StorageProviderItemProperty {} @@ -4504,38 +4504,38 @@ RT_INTERFACE!{interface IStorageProviderItemPropertyDefinition(IStorageProviderI fn put_DisplayNameResource(&self, value: HSTRING) -> HRESULT }} impl IStorageProviderItemPropertyDefinition { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_id(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_id(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Id)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name_resource(&self) -> Result { + }} + #[inline] pub fn get_display_name_resource(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayNameResource)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_name_resource(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_display_name_resource(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayNameResource)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class StorageProviderItemPropertyDefinition: IStorageProviderItemPropertyDefinition} impl RtActivatable for StorageProviderItemPropertyDefinition {} DEFINE_CLSID!(StorageProviderItemPropertyDefinition(&[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,83,116,111,114,97,103,101,80,114,111,118,105,100,101,114,73,116,101,109,80,114,111,112,101,114,116,121,68,101,102,105,110,105,116,105,111,110,0]) [CLSID_StorageProviderItemPropertyDefinition]); DEFINE_IID!(IID_IStorageProviderItemPropertySource, 2406456382, 63026, 19099, 141, 153, 210, 215, 161, 29, 245, 106); RT_INTERFACE!{interface IStorageProviderItemPropertySource(IStorageProviderItemPropertySourceVtbl): IInspectable(IInspectableVtbl) [IID_IStorageProviderItemPropertySource] { - fn GetItemProperties(&self, itemPath: HSTRING, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT + fn GetItemProperties(&self, itemPath: HSTRING, out: *mut *mut foundation::collections::IIterable) -> HRESULT }} impl IStorageProviderItemPropertySource { - #[inline] pub unsafe fn get_item_properties(&self, itemPath: &HStringArg) -> Result>> { + #[inline] pub fn get_item_properties(&self, itemPath: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetItemProperties)(self as *const _ as *mut _, itemPath.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum StorageProviderPopulationPolicy: i32 { Full (StorageProviderPopulationPolicy_Full) = 1, AlwaysFull (StorageProviderPopulationPolicy_AlwaysFull) = 2, @@ -4545,11 +4545,11 @@ RT_INTERFACE!{interface IStorageProviderPropertyCapabilities(IStorageProviderPro fn IsPropertySupported(&self, propertyCanonicalName: HSTRING, out: *mut bool) -> HRESULT }} impl IStorageProviderPropertyCapabilities { - #[inline] pub unsafe fn is_property_supported(&self, propertyCanonicalName: &HStringArg) -> Result { + #[inline] pub fn is_property_supported(&self, propertyCanonicalName: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsPropertySupported)(self as *const _ as *mut _, propertyCanonicalName.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum StorageProviderProtectionMode: i32 { Unknown (StorageProviderProtectionMode_Unknown) = 0, Personal (StorageProviderProtectionMode_Personal) = 1, @@ -4584,151 +4584,151 @@ RT_INTERFACE!{interface IStorageProviderSyncRootInfo(IStorageProviderSyncRootInf fn put_ProtectionMode(&self, value: StorageProviderProtectionMode) -> HRESULT, fn get_AllowPinning(&self, out: *mut bool) -> HRESULT, fn put_AllowPinning(&self, value: bool) -> HRESULT, - fn get_StorageProviderItemPropertyDefinitions(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_RecycleBinUri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_RecycleBinUri(&self, value: *mut super::super::foundation::Uri) -> HRESULT + fn get_StorageProviderItemPropertyDefinitions(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_RecycleBinUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_RecycleBinUri(&self, value: *mut foundation::Uri) -> HRESULT }} impl IStorageProviderSyncRootInfo { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Id)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_context(&self) -> Result> { + }} + #[inline] pub fn get_context(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Context)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_context(&self, value: &super::streams::IBuffer) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_context(&self, value: &super::streams::IBuffer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Context)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_path(&self) -> Result> { + }} + #[inline] pub fn get_path(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Path)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_path(&self, folder: &super::IStorageFolder) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_path(&self, folder: &super::IStorageFolder) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Path)(self as *const _ as *mut _, folder as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name_resource(&self) -> Result { + }} + #[inline] pub fn get_display_name_resource(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayNameResource)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_name_resource(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_display_name_resource(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayNameResource)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_icon_resource(&self) -> Result { + }} + #[inline] pub fn get_icon_resource(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IconResource)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_icon_resource(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_icon_resource(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IconResource)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_hydration_policy(&self) -> Result { + }} + #[inline] pub fn get_hydration_policy(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HydrationPolicy)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_hydration_policy(&self, value: StorageProviderHydrationPolicy) -> Result<()> { + }} + #[inline] pub fn set_hydration_policy(&self, value: StorageProviderHydrationPolicy) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_HydrationPolicy)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_hydration_policy_modifier(&self) -> Result { + }} + #[inline] pub fn get_hydration_policy_modifier(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HydrationPolicyModifier)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_hydration_policy_modifier(&self, value: StorageProviderHydrationPolicyModifier) -> Result<()> { + }} + #[inline] pub fn set_hydration_policy_modifier(&self, value: StorageProviderHydrationPolicyModifier) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_HydrationPolicyModifier)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_population_policy(&self) -> Result { + }} + #[inline] pub fn get_population_policy(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PopulationPolicy)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_population_policy(&self, value: StorageProviderPopulationPolicy) -> Result<()> { + }} + #[inline] pub fn set_population_policy(&self, value: StorageProviderPopulationPolicy) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PopulationPolicy)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_in_sync_policy(&self) -> Result { + }} + #[inline] pub fn get_in_sync_policy(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InSyncPolicy)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_in_sync_policy(&self, value: StorageProviderInSyncPolicy) -> Result<()> { + }} + #[inline] pub fn set_in_sync_policy(&self, value: StorageProviderInSyncPolicy) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InSyncPolicy)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_hardlink_policy(&self) -> Result { + }} + #[inline] pub fn get_hardlink_policy(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HardlinkPolicy)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_hardlink_policy(&self, value: StorageProviderHardlinkPolicy) -> Result<()> { + }} + #[inline] pub fn set_hardlink_policy(&self, value: StorageProviderHardlinkPolicy) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_HardlinkPolicy)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_show_siblings_as_group(&self) -> Result { + }} + #[inline] pub fn get_show_siblings_as_group(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ShowSiblingsAsGroup)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_show_siblings_as_group(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_show_siblings_as_group(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ShowSiblingsAsGroup)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_version(&self) -> Result { + }} + #[inline] pub fn get_version(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Version)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_version(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_version(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Version)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_protection_mode(&self) -> Result { + }} + #[inline] pub fn get_protection_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProtectionMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_protection_mode(&self, value: StorageProviderProtectionMode) -> Result<()> { + }} + #[inline] pub fn set_protection_mode(&self, value: StorageProviderProtectionMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ProtectionMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_allow_pinning(&self) -> Result { + }} + #[inline] pub fn get_allow_pinning(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AllowPinning)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_allow_pinning(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_allow_pinning(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AllowPinning)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_storage_provider_item_property_definitions(&self) -> Result>> { + }} + #[inline] pub fn get_storage_provider_item_property_definitions(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StorageProviderItemPropertyDefinitions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_recycle_bin_uri(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_recycle_bin_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RecycleBinUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_recycle_bin_uri(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_recycle_bin_uri(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RecycleBinUri)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class StorageProviderSyncRootInfo: IStorageProviderSyncRootInfo} impl RtActivatable for StorageProviderSyncRootInfo {} @@ -4736,21 +4736,21 @@ DEFINE_CLSID!(StorageProviderSyncRootInfo(&[87,105,110,100,111,119,115,46,83,116 RT_CLASS!{static class StorageProviderSyncRootManager} impl RtActivatable for StorageProviderSyncRootManager {} impl StorageProviderSyncRootManager { - #[inline] pub fn register(syncRootInformation: &StorageProviderSyncRootInfo) -> Result<()> { unsafe { + #[inline] pub fn register(syncRootInformation: &StorageProviderSyncRootInfo) -> Result<()> { >::get_activation_factory().register(syncRootInformation) - }} - #[inline] pub fn unregister(id: &HStringArg) -> Result<()> { unsafe { + } + #[inline] pub fn unregister(id: &HStringArg) -> Result<()> { >::get_activation_factory().unregister(id) - }} - #[inline] pub fn get_sync_root_information_for_folder(folder: &super::IStorageFolder) -> Result> { unsafe { + } + #[inline] pub fn get_sync_root_information_for_folder(folder: &super::IStorageFolder) -> Result>> { >::get_activation_factory().get_sync_root_information_for_folder(folder) - }} - #[inline] pub fn get_sync_root_information_for_id(id: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn get_sync_root_information_for_id(id: &HStringArg) -> Result>> { >::get_activation_factory().get_sync_root_information_for_id(id) - }} - #[inline] pub fn get_current_sync_roots() -> Result>> { unsafe { + } + #[inline] pub fn get_current_sync_roots() -> Result>>> { >::get_activation_factory().get_current_sync_roots() - }} + } } DEFINE_CLSID!(StorageProviderSyncRootManager(&[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,83,116,111,114,97,103,101,80,114,111,118,105,100,101,114,83,121,110,99,82,111,111,116,77,97,110,97,103,101,114,0]) [CLSID_StorageProviderSyncRootManager]); DEFINE_IID!(IID_IStorageProviderSyncRootManagerStatics, 1050278847, 36835, 19264, 171, 199, 246, 252, 61, 116, 201, 142); @@ -4759,32 +4759,32 @@ RT_INTERFACE!{static interface IStorageProviderSyncRootManagerStatics(IStoragePr fn Unregister(&self, id: HSTRING) -> HRESULT, fn GetSyncRootInformationForFolder(&self, folder: *mut super::IStorageFolder, out: *mut *mut StorageProviderSyncRootInfo) -> HRESULT, fn GetSyncRootInformationForId(&self, id: HSTRING, out: *mut *mut StorageProviderSyncRootInfo) -> HRESULT, - fn GetCurrentSyncRoots(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn GetCurrentSyncRoots(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IStorageProviderSyncRootManagerStatics { - #[inline] pub unsafe fn register(&self, syncRootInformation: &StorageProviderSyncRootInfo) -> Result<()> { + #[inline] pub fn register(&self, syncRootInformation: &StorageProviderSyncRootInfo) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Register)(self as *const _ as *mut _, syncRootInformation as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn unregister(&self, id: &HStringArg) -> Result<()> { + }} + #[inline] pub fn unregister(&self, id: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Unregister)(self as *const _ as *mut _, id.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_sync_root_information_for_folder(&self, folder: &super::IStorageFolder) -> Result> { + }} + #[inline] pub fn get_sync_root_information_for_folder(&self, folder: &super::IStorageFolder) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSyncRootInformationForFolder)(self as *const _ as *mut _, folder as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sync_root_information_for_id(&self, id: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_sync_root_information_for_id(&self, id: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSyncRootInformationForId)(self as *const _ as *mut _, id.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_sync_roots(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_current_sync_roots(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentSyncRoots)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum UIStatus: i32 { Unavailable (UIStatus_Unavailable) = 0, Hidden (UIStatus_Hidden) = 1, Visible (UIStatus_Visible) = 2, Complete (UIStatus_Complete) = 3, @@ -4798,205 +4798,205 @@ use ::prelude::*; 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(&self, out: *mut u64) -> HRESULT, - fn get_DateModified(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_ItemDate(&self, out: *mut super::super::foundation::DateTime) -> HRESULT + fn get_DateModified(&self, out: *mut foundation::DateTime) -> HRESULT, + fn get_ItemDate(&self, out: *mut foundation::DateTime) -> HRESULT }} impl IBasicProperties { - #[inline] pub unsafe fn get_size(&self) -> Result { + #[inline] pub fn get_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Size)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_date_modified(&self) -> Result { + }} + #[inline] pub fn get_date_modified(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DateModified)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_item_date(&self) -> Result { + }} + #[inline] pub fn get_item_date(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ItemDate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class BasicProperties: IBasicProperties} 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Author(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_Title(&self, out: *mut HSTRING) -> HRESULT, fn put_Title(&self, value: HSTRING) -> HRESULT, - fn get_Keywords(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Keywords(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_Comment(&self, out: *mut HSTRING) -> HRESULT, fn put_Comment(&self, value: HSTRING) -> HRESULT }} impl IDocumentProperties { - #[inline] pub unsafe fn get_author(&self) -> Result>> { + #[inline] pub fn get_author(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Author)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_title(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_title(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_title(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Title)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_keywords(&self) -> Result>> { + }} + #[inline] pub fn get_keywords(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Keywords)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_comment(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_comment(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Comment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_comment(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_comment(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Comment)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DocumentProperties: IDocumentProperties} RT_CLASS!{static class GeotagHelper} impl RtActivatable for GeotagHelper {} impl GeotagHelper { - #[cfg(feature="windows-devices")] #[inline] pub fn get_geotag_async(file: &super::IStorageFile) -> Result>> { unsafe { + #[cfg(feature="windows-devices")] #[inline] pub fn get_geotag_async(file: &super::IStorageFile) -> Result>> { >::get_activation_factory().get_geotag_async(file) - }} - #[cfg(feature="windows-devices")] #[inline] pub fn set_geotag_from_geolocator_async(file: &super::IStorageFile, geolocator: &super::super::devices::geolocation::Geolocator) -> Result> { unsafe { + } + #[cfg(feature="windows-devices")] #[inline] pub fn set_geotag_from_geolocator_async(file: &super::IStorageFile, geolocator: &super::super::devices::geolocation::Geolocator) -> Result> { >::get_activation_factory().set_geotag_from_geolocator_async(file, geolocator) - }} - #[cfg(feature="windows-devices")] #[inline] pub fn set_geotag_async(file: &super::IStorageFile, geopoint: &super::super::devices::geolocation::Geopoint) -> Result> { unsafe { + } + #[cfg(feature="windows-devices")] #[inline] pub fn set_geotag_async(file: &super::IStorageFile, geopoint: &super::super::devices::geolocation::Geopoint) -> Result> { >::get_activation_factory().set_geotag_async(file, geopoint) - }} + } } DEFINE_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]) [CLSID_GeotagHelper]); 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(&self, file: *mut super::IStorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-devices")] fn SetGeotagFromGeolocatorAsync(&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(&self, file: *mut super::IStorageFile, geopoint: *mut super::super::devices::geolocation::Geopoint, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + #[cfg(feature="windows-devices")] fn GetGeotagAsync(&self, file: *mut super::IStorageFile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-devices")] fn SetGeotagFromGeolocatorAsync(&self, file: *mut super::IStorageFile, geolocator: *mut super::super::devices::geolocation::Geolocator, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + #[cfg(feature="windows-devices")] fn SetGeotagAsync(&self, file: *mut super::IStorageFile, geopoint: *mut super::super::devices::geolocation::Geopoint, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IGeotagHelperStatics { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_geotag_async(&self, file: &super::IStorageFile) -> Result>> { + #[cfg(feature="windows-devices")] #[inline] pub fn get_geotag_async(&self, file: &super::IStorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetGeotagAsync)(self 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-devices")] #[inline] pub unsafe fn set_geotag_from_geolocator_async(&self, file: &super::IStorageFile, geolocator: &super::super::devices::geolocation::Geolocator) -> Result> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn set_geotag_from_geolocator_async(&self, file: &super::IStorageFile, geolocator: &super::super::devices::geolocation::Geolocator) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetGeotagFromGeolocatorAsync)(self as *const _ as *mut _, 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(&self, file: &super::IStorageFile, geopoint: &super::super::devices::geolocation::Geopoint) -> Result> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn set_geotag_async(&self, file: &super::IStorageFile, geopoint: &super::super::devices::geolocation::Geopoint) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetGeotagAsync)(self as *const _ as *mut _, file as *const _ as *mut _, geopoint as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } 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(&self, out: *mut u32) -> HRESULT, fn put_Rating(&self, value: u32) -> HRESULT, - fn get_Keywords(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_DateTaken(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn put_DateTaken(&self, value: super::super::foundation::DateTime) -> HRESULT, + fn get_Keywords(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_DateTaken(&self, out: *mut foundation::DateTime) -> HRESULT, + fn put_DateTaken(&self, value: foundation::DateTime) -> HRESULT, fn get_Width(&self, out: *mut u32) -> HRESULT, fn get_Height(&self, out: *mut u32) -> HRESULT, fn get_Title(&self, out: *mut HSTRING) -> HRESULT, fn put_Title(&self, value: HSTRING) -> HRESULT, - fn get_Latitude(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_Longitude(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_Latitude(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_Longitude(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn get_CameraManufacturer(&self, out: *mut HSTRING) -> HRESULT, fn put_CameraManufacturer(&self, value: HSTRING) -> HRESULT, fn get_CameraModel(&self, out: *mut HSTRING) -> HRESULT, fn put_CameraModel(&self, value: HSTRING) -> HRESULT, fn get_Orientation(&self, out: *mut PhotoOrientation) -> HRESULT, - fn get_PeopleNames(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_PeopleNames(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IImageProperties { - #[inline] pub unsafe fn get_rating(&self) -> Result { + #[inline] pub fn get_rating(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Rating)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_rating(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_rating(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Rating)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_keywords(&self) -> Result>> { + }} + #[inline] pub fn get_keywords(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Keywords)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_date_taken(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_date_taken(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DateTaken)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_date_taken(&self, value: super::super::foundation::DateTime) -> Result<()> { + }} + #[inline] pub fn set_date_taken(&self, value: foundation::DateTime) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DateTaken)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_width(&self) -> Result { + }} + #[inline] pub fn get_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Width)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_height(&self) -> Result { + }} + #[inline] pub fn get_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Height)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_title(&self) -> Result { + }} + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_title(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_title(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Title)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_latitude(&self) -> Result>> { + }} + #[inline] pub fn get_latitude(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Latitude)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_longitude(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_longitude(&self) -> Result>>> { unsafe { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Longitude)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_camera_manufacturer(&self) -> Result { + let hr = ((*self.lpVtbl).get_Longitude)(self as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_camera_manufacturer(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CameraManufacturer)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_camera_manufacturer(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_camera_manufacturer(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CameraManufacturer)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_camera_model(&self) -> Result { + }} + #[inline] pub fn get_camera_model(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CameraModel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_camera_model(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_camera_model(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CameraModel)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_orientation(&self) -> Result { + }} + #[inline] pub fn get_orientation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Orientation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_people_names(&self) -> Result>> { + }} + #[inline] pub fn get_people_names(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PeopleNames)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ImageProperties: IImageProperties} DEFINE_IID!(IID_IMusicProperties, 3163204450, 26348, 16794, 188, 93, 202, 101, 164, 203, 70, 218); @@ -5005,145 +5005,145 @@ RT_INTERFACE!{interface IMusicProperties(IMusicPropertiesVtbl): IInspectable(IIn fn put_Album(&self, value: HSTRING) -> HRESULT, fn get_Artist(&self, out: *mut HSTRING) -> HRESULT, fn put_Artist(&self, value: HSTRING) -> HRESULT, - fn get_Genre(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Genre(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_TrackNumber(&self, out: *mut u32) -> HRESULT, fn put_TrackNumber(&self, value: u32) -> HRESULT, fn get_Title(&self, out: *mut HSTRING) -> HRESULT, fn put_Title(&self, value: HSTRING) -> HRESULT, fn get_Rating(&self, out: *mut u32) -> HRESULT, fn put_Rating(&self, value: u32) -> HRESULT, - fn get_Duration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_Duration(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn get_Bitrate(&self, out: *mut u32) -> HRESULT, fn get_AlbumArtist(&self, out: *mut HSTRING) -> HRESULT, fn put_AlbumArtist(&self, value: HSTRING) -> HRESULT, - fn get_Composers(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_Conductors(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Composers(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_Conductors(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_Subtitle(&self, out: *mut HSTRING) -> HRESULT, fn put_Subtitle(&self, value: HSTRING) -> HRESULT, - fn get_Producers(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Producers(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_Publisher(&self, out: *mut HSTRING) -> HRESULT, fn put_Publisher(&self, value: HSTRING) -> HRESULT, - fn get_Writers(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Writers(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_Year(&self, out: *mut u32) -> HRESULT, fn put_Year(&self, value: u32) -> HRESULT }} impl IMusicProperties { - #[inline] pub unsafe fn get_album(&self) -> Result { + #[inline] pub fn get_album(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Album)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_album(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_album(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Album)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_artist(&self) -> Result { + }} + #[inline] pub fn get_artist(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Artist)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_artist(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_artist(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Artist)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_genre(&self) -> Result>> { + }} + #[inline] pub fn get_genre(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Genre)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_track_number(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_track_number(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TrackNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_track_number(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_track_number(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TrackNumber)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_title(&self) -> Result { + }} + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_title(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_title(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Title)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_rating(&self) -> Result { + }} + #[inline] pub fn get_rating(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Rating)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_rating(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_rating(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Rating)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_duration(&self) -> Result { + }} + #[inline] pub fn get_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Duration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_bitrate(&self) -> Result { + }} + #[inline] pub fn get_bitrate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Bitrate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_album_artist(&self) -> Result { + }} + #[inline] pub fn get_album_artist(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AlbumArtist)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_album_artist(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_album_artist(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AlbumArtist)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_composers(&self) -> Result>> { + }} + #[inline] pub fn get_composers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Composers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_conductors(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_conductors(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Conductors)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_subtitle(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_subtitle(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Subtitle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_subtitle(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_subtitle(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Subtitle)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_producers(&self) -> Result>> { + }} + #[inline] pub fn get_producers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Producers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_publisher(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_publisher(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Publisher)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_publisher(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_publisher(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Publisher)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_writers(&self) -> Result>> { + }} + #[inline] pub fn get_writers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Writers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_year(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_year(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Year)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_year(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_year(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Year)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MusicProperties: IMusicProperties} RT_ENUM! { enum PhotoOrientation: i32 { @@ -5154,56 +5154,56 @@ RT_ENUM! { enum PropertyPrefetchOptions: u32 { }} 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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetVideoPropertiesAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetImagePropertiesAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetDocumentPropertiesAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetMusicPropertiesAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetVideoPropertiesAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetImagePropertiesAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetDocumentPropertiesAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IStorageItemContentProperties { - #[inline] pub unsafe fn get_music_properties_async(&self) -> Result>> { + #[inline] pub fn get_music_properties_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetMusicPropertiesAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_properties_async(&self) -> Result>> { + }} + #[inline] pub fn get_video_properties_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetVideoPropertiesAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_image_properties_async(&self) -> Result>> { + }} + #[inline] pub fn get_image_properties_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetImagePropertiesAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_document_properties_async(&self) -> Result>> { + }} + #[inline] pub fn get_document_properties_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDocumentPropertiesAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class StorageItemContentProperties: IStorageItemContentProperties} 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(&self, propertiesToRetrieve: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn SavePropertiesAsync(&self, propertiesToSave: *mut super::super::foundation::collections::IIterable>, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn SavePropertiesAsyncOverloadDefault(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn RetrievePropertiesAsync(&self, propertiesToRetrieve: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn SavePropertiesAsync(&self, propertiesToSave: *mut foundation::collections::IIterable>, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn SavePropertiesAsyncOverloadDefault(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IStorageItemExtraProperties { - #[inline] pub unsafe fn retrieve_properties_async(&self, propertiesToRetrieve: &super::super::foundation::collections::IIterable) -> Result>>> { + #[inline] pub fn retrieve_properties_async(&self, propertiesToRetrieve: &foundation::collections::IIterable) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RetrievePropertiesAsync)(self as *const _ as *mut _, 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(&self, propertiesToSave: &super::super::foundation::collections::IIterable>) -> Result> { + }} + #[inline] pub fn save_properties_async(&self, propertiesToSave: &foundation::collections::IIterable>) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SavePropertiesAsync)(self as *const _ as *mut _, 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(&self) -> Result> { + }} + #[inline] pub fn save_properties_async_overload_default(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SavePropertiesAsyncOverloadDefault)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class StorageItemThumbnail: super::streams::IRandomAccessStreamWithContentType} RT_ENUM! { enum ThumbnailMode: i32 { @@ -5220,26 +5220,26 @@ RT_INTERFACE!{interface IThumbnailProperties(IThumbnailPropertiesVtbl): IInspect fn get_Type(&self, out: *mut ThumbnailType) -> HRESULT }} impl IThumbnailProperties { - #[inline] pub unsafe fn get_original_width(&self) -> Result { + #[inline] pub fn get_original_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OriginalWidth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_original_height(&self) -> Result { + }} + #[inline] pub fn get_original_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OriginalHeight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_returned_smaller_cached_size(&self) -> Result { + }} + #[inline] pub fn get_returned_smaller_cached_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReturnedSmallerCachedSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_type(&self) -> Result { + }} + #[inline] pub fn get_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Type)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum ThumbnailType: i32 { Image (ThumbnailType_Image) = 0, Icon (ThumbnailType_Icon) = 1, @@ -5251,127 +5251,127 @@ DEFINE_IID!(IID_IVideoProperties, 1905976583, 26846, 19896, 151, 222, 73, 153, 1 RT_INTERFACE!{interface IVideoProperties(IVideoPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_IVideoProperties] { fn get_Rating(&self, out: *mut u32) -> HRESULT, fn put_Rating(&self, value: u32) -> HRESULT, - fn get_Keywords(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Keywords(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_Width(&self, out: *mut u32) -> HRESULT, fn get_Height(&self, out: *mut u32) -> HRESULT, - fn get_Duration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn get_Latitude(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn get_Longitude(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_Duration(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_Latitude(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_Longitude(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn get_Title(&self, out: *mut HSTRING) -> HRESULT, fn put_Title(&self, value: HSTRING) -> HRESULT, fn get_Subtitle(&self, out: *mut HSTRING) -> HRESULT, fn put_Subtitle(&self, value: HSTRING) -> HRESULT, - fn get_Producers(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Producers(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_Publisher(&self, out: *mut HSTRING) -> HRESULT, fn put_Publisher(&self, value: HSTRING) -> HRESULT, - fn get_Writers(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Writers(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_Year(&self, out: *mut u32) -> HRESULT, fn put_Year(&self, value: u32) -> HRESULT, fn get_Bitrate(&self, out: *mut u32) -> HRESULT, - fn get_Directors(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Directors(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_Orientation(&self, out: *mut VideoOrientation) -> HRESULT }} impl IVideoProperties { - #[inline] pub unsafe fn get_rating(&self) -> Result { + #[inline] pub fn get_rating(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Rating)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_rating(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_rating(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Rating)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_keywords(&self) -> Result>> { + }} + #[inline] pub fn get_keywords(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Keywords)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_width(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Width)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_height(&self) -> Result { + }} + #[inline] pub fn get_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Height)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_duration(&self) -> Result { + }} + #[inline] pub fn get_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Duration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_latitude(&self) -> Result>> { + }} + #[inline] pub fn get_latitude(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Latitude)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_longitude(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_longitude(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Longitude)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_title(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_title(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_title(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Title)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_subtitle(&self) -> Result { + }} + #[inline] pub fn get_subtitle(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Subtitle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_subtitle(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_subtitle(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Subtitle)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_producers(&self) -> Result>> { + }} + #[inline] pub fn get_producers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Producers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_publisher(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_publisher(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Publisher)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_publisher(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_publisher(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Publisher)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_writers(&self) -> Result>> { + }} + #[inline] pub fn get_writers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Writers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_year(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_year(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Year)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_year(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_year(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Year)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_bitrate(&self) -> Result { + }} + #[inline] pub fn get_bitrate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Bitrate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_directors(&self) -> Result>> { + }} + #[inline] pub fn get_directors(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Directors)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_orientation(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_orientation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Orientation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class VideoProperties: IVideoProperties} } // Windows.Storage.FileProperties @@ -5383,17 +5383,17 @@ RT_ENUM! { enum AccessCacheOptions: u32 { RT_STRUCT! { struct AccessListEntry { Token: HSTRING, Metadata: HSTRING, }} -RT_CLASS!{class AccessListEntryView: super::super::foundation::collections::IVectorView} +RT_CLASS!{class AccessListEntryView: foundation::collections::IVectorView} 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(&self, out: *mut AccessListEntry) -> HRESULT }} impl IItemRemovedEventArgs { - #[inline] pub unsafe fn get_removed_entry(&self) -> Result { + #[inline] pub fn get_removed_entry(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RemovedEntry)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ItemRemovedEventArgs: IItemRemovedEventArgs} RT_ENUM! { enum RecentStorageItemVisibility: i32 { @@ -5402,12 +5402,12 @@ RT_ENUM! { enum RecentStorageItemVisibility: i32 { RT_CLASS!{static class StorageApplicationPermissions} impl RtActivatable for StorageApplicationPermissions {} impl StorageApplicationPermissions { - #[inline] pub fn get_future_access_list() -> Result> { unsafe { + #[inline] pub fn get_future_access_list() -> Result>> { >::get_activation_factory().get_future_access_list() - }} - #[inline] pub fn get_most_recently_used_list() -> Result> { unsafe { + } + #[inline] pub fn get_most_recently_used_list() -> Result>> { >::get_activation_factory().get_most_recently_used_list() - }} + } } DEFINE_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]) [CLSID_StorageApplicationPermissions]); DEFINE_IID!(IID_IStorageApplicationPermissionsStatics, 1133633450, 53299, 18681, 128, 96, 62, 200, 71, 210, 227, 241); @@ -5416,16 +5416,16 @@ RT_INTERFACE!{static interface IStorageApplicationPermissionsStatics(IStorageApp fn get_MostRecentlyUsedList(&self, out: *mut *mut StorageItemMostRecentlyUsedList) -> HRESULT }} impl IStorageApplicationPermissionsStatics { - #[inline] pub unsafe fn get_future_access_list(&self) -> Result> { + #[inline] pub fn get_future_access_list(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FutureAccessList)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_most_recently_used_list(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_most_recently_used_list(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MostRecentlyUsedList)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IStorageItemAccessList, 749729453, 56976, 18421, 178, 195, 221, 54, 201, 253, 212, 83); RT_INTERFACE!{interface IStorageItemAccessList(IStorageItemAccessListVtbl): IInspectable(IInspectableVtbl) [IID_IStorageItemAccessList] { @@ -5433,12 +5433,12 @@ RT_INTERFACE!{interface IStorageItemAccessList(IStorageItemAccessListVtbl): IIns fn Add(&self, file: *mut super::IStorageItem, metadata: HSTRING, out: *mut HSTRING) -> HRESULT, fn AddOrReplaceOverloadDefaultMetadata(&self, token: HSTRING, file: *mut super::IStorageItem) -> HRESULT, fn AddOrReplace(&self, token: HSTRING, file: *mut super::IStorageItem, metadata: HSTRING) -> HRESULT, - fn GetItemAsync(&self, token: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetFileAsync(&self, token: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetFolderAsync(&self, token: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetItemWithOptionsAsync(&self, token: HSTRING, options: AccessCacheOptions, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetFileWithOptionsAsync(&self, token: HSTRING, options: AccessCacheOptions, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetFolderWithOptionsAsync(&self, token: HSTRING, options: AccessCacheOptions, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetItemAsync(&self, token: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetFileAsync(&self, token: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetFolderAsync(&self, token: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetItemWithOptionsAsync(&self, token: HSTRING, options: AccessCacheOptions, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetFileWithOptionsAsync(&self, token: HSTRING, options: AccessCacheOptions, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetFolderWithOptionsAsync(&self, token: HSTRING, options: AccessCacheOptions, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn Remove(&self, token: HSTRING) -> HRESULT, fn ContainsItem(&self, token: HSTRING, out: *mut bool) -> HRESULT, fn Clear(&self) -> HRESULT, @@ -5447,99 +5447,99 @@ RT_INTERFACE!{interface IStorageItemAccessList(IStorageItemAccessListVtbl): IIns fn get_MaximumItemsAllowed(&self, out: *mut u32) -> HRESULT }} impl IStorageItemAccessList { - #[inline] pub unsafe fn add_overload_default_metadata(&self, file: &super::IStorageItem) -> Result { + #[inline] pub fn add_overload_default_metadata(&self, file: &super::IStorageItem) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AddOverloadDefaultMetadata)(self as *const _ as *mut _, file as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add(&self, file: &super::IStorageItem, metadata: &HStringArg) -> Result { + }} + #[inline] pub fn add(&self, file: &super::IStorageItem, metadata: &HStringArg) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Add)(self as *const _ as *mut _, 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(&self, token: &HStringArg, file: &super::IStorageItem) -> Result<()> { + }} + #[inline] pub fn add_or_replace_overload_default_metadata(&self, token: &HStringArg, file: &super::IStorageItem) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddOrReplaceOverloadDefaultMetadata)(self as *const _ as *mut _, token.get(), file as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_or_replace(&self, token: &HStringArg, file: &super::IStorageItem, metadata: &HStringArg) -> Result<()> { + }} + #[inline] pub fn add_or_replace(&self, token: &HStringArg, file: &super::IStorageItem, metadata: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddOrReplace)(self as *const _ as *mut _, token.get(), file as *const _ as *mut _, metadata.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_item_async(&self, token: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_item_async(&self, token: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetItemAsync)(self as *const _ as *mut _, token.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_file_async(&self, token: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_file_async(&self, token: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFileAsync)(self as *const _ as *mut _, token.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_folder_async(&self, token: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_folder_async(&self, token: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFolderAsync)(self as *const _ as *mut _, token.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_item_with_options_async(&self, token: &HStringArg, options: AccessCacheOptions) -> Result>> { + }} + #[inline] pub fn get_item_with_options_async(&self, token: &HStringArg, options: AccessCacheOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetItemWithOptionsAsync)(self as *const _ as *mut _, 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(&self, token: &HStringArg, options: AccessCacheOptions) -> Result>> { + }} + #[inline] pub fn get_file_with_options_async(&self, token: &HStringArg, options: AccessCacheOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFileWithOptionsAsync)(self as *const _ as *mut _, 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(&self, token: &HStringArg, options: AccessCacheOptions) -> Result>> { + }} + #[inline] pub fn get_folder_with_options_async(&self, token: &HStringArg, options: AccessCacheOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFolderWithOptionsAsync)(self as *const _ as *mut _, token.get(), options, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn remove(&self, token: &HStringArg) -> Result<()> { + }} + #[inline] pub fn remove(&self, token: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Remove)(self as *const _ as *mut _, token.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn contains_item(&self, token: &HStringArg) -> Result { + }} + #[inline] pub fn contains_item(&self, token: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ContainsItem)(self as *const _ as *mut _, token.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn clear(&self) -> Result<()> { + }} + #[inline] pub fn clear(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Clear)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn check_access(&self, file: &super::IStorageItem) -> Result { + }} + #[inline] pub fn check_access(&self, file: &super::IStorageItem) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).CheckAccess)(self as *const _ as *mut _, file as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_entries(&self) -> Result> { + }} + #[inline] pub fn get_entries(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Entries)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_maximum_items_allowed(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_maximum_items_allowed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaximumItemsAllowed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class StorageItemAccessList: IStorageItemAccessList} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ItemRemoved(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ItemRemoved(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ItemRemoved(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT }} impl IStorageItemMostRecentlyUsedList { - #[inline] pub unsafe fn add_item_removed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_item_removed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ItemRemoved)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_item_removed(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_item_removed(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ItemRemoved)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class StorageItemMostRecentlyUsedList: IStorageItemMostRecentlyUsedList} DEFINE_IID!(IID_IStorageItemMostRecentlyUsedList2, 3662159520, 60813, 18225, 161, 219, 228, 78, 226, 32, 64, 147); @@ -5548,15 +5548,15 @@ RT_INTERFACE!{interface IStorageItemMostRecentlyUsedList2(IStorageItemMostRecent fn AddOrReplaceWithMetadataAndVisibility(&self, token: HSTRING, file: *mut super::IStorageItem, metadata: HSTRING, visibility: RecentStorageItemVisibility) -> HRESULT }} impl IStorageItemMostRecentlyUsedList2 { - #[inline] pub unsafe fn add_with_metadata_and_visibility(&self, file: &super::IStorageItem, metadata: &HStringArg, visibility: RecentStorageItemVisibility) -> Result { + #[inline] pub fn add_with_metadata_and_visibility(&self, file: &super::IStorageItem, metadata: &HStringArg, visibility: RecentStorageItemVisibility) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AddWithMetadataAndVisibility)(self as *const _ as *mut _, 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(&self, token: &HStringArg, file: &super::IStorageItem, metadata: &HStringArg, visibility: RecentStorageItemVisibility) -> Result<()> { + }} + #[inline] pub fn add_or_replace_with_metadata_and_visibility(&self, token: &HStringArg, file: &super::IStorageItem, metadata: &HStringArg, visibility: RecentStorageItemVisibility) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddOrReplaceWithMetadataAndVisibility)(self as *const _ as *mut _, token.get(), file as *const _ as *mut _, metadata.get(), visibility); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } } // Windows.Storage.AccessCache pub mod bulkaccess { // Windows.Storage.BulkAccess @@ -5564,78 +5564,78 @@ use ::prelude::*; RT_CLASS!{class FileInformation: IStorageItemInformation} 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(&self, startIndex: u32, maxItemsToRetrieve: u32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetItemsAsyncDefaultStartAndCount(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetFilesAsync(&self, startIndex: u32, maxItemsToRetrieve: u32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetFilesAsyncDefaultStartAndCount(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetFoldersAsync(&self, startIndex: u32, maxItemsToRetrieve: u32, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetFoldersAsyncDefaultStartAndCount(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, + fn GetItemsAsync(&self, startIndex: u32, maxItemsToRetrieve: u32, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetItemsAsyncDefaultStartAndCount(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetFilesAsync(&self, startIndex: u32, maxItemsToRetrieve: u32, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetFilesAsyncDefaultStartAndCount(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetFoldersAsync(&self, startIndex: u32, maxItemsToRetrieve: u32, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetFoldersAsyncDefaultStartAndCount(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, fn GetVirtualizedItemsVector(&self, out: *mut *mut IInspectable) -> HRESULT, fn GetVirtualizedFilesVector(&self, out: *mut *mut IInspectable) -> HRESULT, fn GetVirtualizedFoldersVector(&self, out: *mut *mut IInspectable) -> HRESULT }} impl IFileInformationFactory { - #[inline] pub unsafe fn get_items_async(&self, startIndex: u32, maxItemsToRetrieve: u32) -> Result>>> { + #[inline] pub fn get_items_async(&self, startIndex: u32, maxItemsToRetrieve: u32) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetItemsAsync)(self as *const _ as *mut _, 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(&self) -> Result>>> { + }} + #[inline] pub fn get_items_async_default_start_and_count(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetItemsAsyncDefaultStartAndCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_files_async(&self, startIndex: u32, maxItemsToRetrieve: u32) -> Result>>> { + }} + #[inline] pub fn get_files_async(&self, startIndex: u32, maxItemsToRetrieve: u32) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFilesAsync)(self as *const _ as *mut _, 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(&self) -> Result>>> { + }} + #[inline] pub fn get_files_async_default_start_and_count(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFilesAsyncDefaultStartAndCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_folders_async(&self, startIndex: u32, maxItemsToRetrieve: u32) -> Result>>> { + }} + #[inline] pub fn get_folders_async(&self, startIndex: u32, maxItemsToRetrieve: u32) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFoldersAsync)(self as *const _ as *mut _, 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(&self) -> Result>>> { + }} + #[inline] pub fn get_folders_async_default_start_and_count(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFoldersAsyncDefaultStartAndCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_virtualized_items_vector(&self) -> Result> { + }} + #[inline] pub fn get_virtualized_items_vector(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetVirtualizedItemsVector)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_virtualized_files_vector(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_virtualized_files_vector(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetVirtualizedFilesVector)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_virtualized_folders_vector(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_virtualized_folders_vector(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetVirtualizedFoldersVector)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class FileInformationFactory: IFileInformationFactory} impl RtActivatable for FileInformationFactory {} impl FileInformationFactory { - #[inline] pub fn create_with_mode(queryResult: &super::search::IStorageQueryResultBase, mode: super::fileproperties::ThumbnailMode) -> Result> { unsafe { + #[inline] pub fn create_with_mode(queryResult: &super::search::IStorageQueryResultBase, mode: super::fileproperties::ThumbnailMode) -> Result> { >::get_activation_factory().create_with_mode(queryResult, mode) - }} - #[inline] pub fn create_with_mode_and_size(queryResult: &super::search::IStorageQueryResultBase, mode: super::fileproperties::ThumbnailMode, requestedThumbnailSize: u32) -> Result> { unsafe { + } + #[inline] pub fn create_with_mode_and_size(queryResult: &super::search::IStorageQueryResultBase, mode: super::fileproperties::ThumbnailMode, requestedThumbnailSize: u32) -> Result> { >::get_activation_factory().create_with_mode_and_size(queryResult, mode, requestedThumbnailSize) - }} - #[inline] pub fn create_with_mode_and_size_and_options(queryResult: &super::search::IStorageQueryResultBase, mode: super::fileproperties::ThumbnailMode, requestedThumbnailSize: u32, thumbnailOptions: super::fileproperties::ThumbnailOptions) -> Result> { unsafe { + } + #[inline] pub fn create_with_mode_and_size_and_options(queryResult: &super::search::IStorageQueryResultBase, mode: super::fileproperties::ThumbnailMode, requestedThumbnailSize: u32, thumbnailOptions: super::fileproperties::ThumbnailOptions) -> Result> { >::get_activation_factory().create_with_mode_and_size_and_options(queryResult, mode, requestedThumbnailSize, thumbnailOptions) - }} - #[inline] pub fn create_with_mode_and_size_and_options_and_flags(queryResult: &super::search::IStorageQueryResultBase, mode: super::fileproperties::ThumbnailMode, requestedThumbnailSize: u32, thumbnailOptions: super::fileproperties::ThumbnailOptions, delayLoad: bool) -> Result> { unsafe { + } + #[inline] pub fn create_with_mode_and_size_and_options_and_flags(queryResult: &super::search::IStorageQueryResultBase, mode: super::fileproperties::ThumbnailMode, requestedThumbnailSize: u32, thumbnailOptions: super::fileproperties::ThumbnailOptions, delayLoad: bool) -> Result> { >::get_activation_factory().create_with_mode_and_size_and_options_and_flags(queryResult, mode, requestedThumbnailSize, thumbnailOptions, delayLoad) - }} + } } DEFINE_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]) [CLSID_FileInformationFactory]); DEFINE_IID!(IID_IFileInformationFactoryFactory, 2229931645, 58530, 20224, 138, 250, 175, 94, 15, 130, 107, 213); @@ -5646,26 +5646,26 @@ RT_INTERFACE!{static interface IFileInformationFactoryFactory(IFileInformationFa fn CreateWithModeAndSizeAndOptionsAndFlags(&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(&self, queryResult: &super::search::IStorageQueryResultBase, mode: super::fileproperties::ThumbnailMode) -> Result> { + #[inline] pub fn create_with_mode(&self, queryResult: &super::search::IStorageQueryResultBase, mode: super::fileproperties::ThumbnailMode) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithMode)(self as *const _ as *mut _, 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(&self, queryResult: &super::search::IStorageQueryResultBase, mode: super::fileproperties::ThumbnailMode, requestedThumbnailSize: u32) -> Result> { + }} + #[inline] pub fn create_with_mode_and_size(&self, queryResult: &super::search::IStorageQueryResultBase, mode: super::fileproperties::ThumbnailMode, requestedThumbnailSize: u32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithModeAndSize)(self as *const _ as *mut _, 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(&self, queryResult: &super::search::IStorageQueryResultBase, mode: super::fileproperties::ThumbnailMode, requestedThumbnailSize: u32, thumbnailOptions: super::fileproperties::ThumbnailOptions) -> Result> { + }} + #[inline] pub fn create_with_mode_and_size_and_options(&self, queryResult: &super::search::IStorageQueryResultBase, mode: super::fileproperties::ThumbnailMode, requestedThumbnailSize: u32, thumbnailOptions: super::fileproperties::ThumbnailOptions) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithModeAndSizeAndOptions)(self as *const _ as *mut _, 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(&self, queryResult: &super::search::IStorageQueryResultBase, mode: super::fileproperties::ThumbnailMode, requestedThumbnailSize: u32, thumbnailOptions: super::fileproperties::ThumbnailOptions, delayLoad: bool) -> Result> { + }} + #[inline] pub fn create_with_mode_and_size_and_options_and_flags(&self, queryResult: &super::search::IStorageQueryResultBase, mode: super::fileproperties::ThumbnailMode, requestedThumbnailSize: u32, thumbnailOptions: super::fileproperties::ThumbnailOptions, delayLoad: bool) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithModeAndSizeAndOptionsAndFlags)(self as *const _ as *mut _, 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 FolderInformation: IStorageItemInformation} DEFINE_IID!(IID_IStorageItemInformation, 2275789707, 35186, 20288, 141, 224, 216, 111, 177, 121, 216, 250); @@ -5676,59 +5676,59 @@ RT_INTERFACE!{interface IStorageItemInformation(IStorageItemInformationVtbl): II fn get_DocumentProperties(&self, out: *mut *mut super::fileproperties::DocumentProperties) -> HRESULT, fn get_BasicProperties(&self, out: *mut *mut super::fileproperties::BasicProperties) -> HRESULT, fn get_Thumbnail(&self, out: *mut *mut super::fileproperties::StorageItemThumbnail) -> HRESULT, - fn add_ThumbnailUpdated(&self, changedHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ThumbnailUpdated(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PropertiesUpdated(&self, changedHandler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PropertiesUpdated(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ThumbnailUpdated(&self, changedHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ThumbnailUpdated(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PropertiesUpdated(&self, changedHandler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PropertiesUpdated(&self, eventCookie: foundation::EventRegistrationToken) -> HRESULT }} impl IStorageItemInformation { - #[inline] pub unsafe fn get_music_properties(&self) -> Result> { + #[inline] pub fn get_music_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MusicProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_video_properties(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_video_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VideoProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_image_properties(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_image_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ImageProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_document_properties(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_document_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DocumentProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_basic_properties(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_basic_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BasicProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_thumbnail(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_thumbnail(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Thumbnail)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_thumbnail_updated(&self, changedHandler: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_thumbnail_updated(&self, changedHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ThumbnailUpdated)(self as *const _ as *mut _, changedHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_thumbnail_updated(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_thumbnail_updated(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ThumbnailUpdated)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_properties_updated(&self, changedHandler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_properties_updated(&self, changedHandler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PropertiesUpdated)(self as *const _ as *mut _, changedHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_properties_updated(&self, eventCookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_properties_updated(&self, eventCookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PropertiesUpdated)(self as *const _ as *mut _, eventCookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } } // Windows.Storage.BulkAccess diff --git a/src/rt/gen/windows/system.rs b/src/rt/gen/windows/system.rs index bf01c05..d231df9 100644 --- a/src/rt/gen/windows/system.rs +++ b/src/rt/gen/windows/system.rs @@ -4,163 +4,163 @@ RT_INTERFACE!{interface IAppDiagnosticInfo(IAppDiagnosticInfoVtbl): IInspectable #[cfg(feature="windows-applicationmodel")] fn get_AppInfo(&self, out: *mut *mut super::applicationmodel::AppInfo) -> HRESULT }} impl IAppDiagnosticInfo { - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn get_app_info(&self) -> Result> { + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn get_app_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppDiagnosticInfo: IAppDiagnosticInfo} impl RtActivatable for AppDiagnosticInfo {} impl RtActivatable for AppDiagnosticInfo {} impl AppDiagnosticInfo { - #[inline] pub fn request_info_async() -> Result>>> { unsafe { + #[inline] pub fn request_info_async() -> Result>>> { >::get_activation_factory().request_info_async() - }} - #[inline] pub fn create_watcher() -> Result> { unsafe { + } + #[inline] pub fn create_watcher() -> Result>> { >::get_activation_factory().create_watcher() - }} - #[inline] pub fn request_access_async() -> Result>> { unsafe { + } + #[inline] pub fn request_access_async() -> Result>> { >::get_activation_factory().request_access_async() - }} - #[inline] pub fn request_info_for_package_async(packageFamilyName: &HStringArg) -> Result>>> { unsafe { + } + #[inline] pub fn request_info_for_package_async(packageFamilyName: &HStringArg) -> Result>>> { >::get_activation_factory().request_info_for_package_async(packageFamilyName) - }} - #[inline] pub fn request_info_for_app_async() -> Result>>> { unsafe { + } + #[inline] pub fn request_info_for_app_async() -> Result>>> { >::get_activation_factory().request_info_for_app_async() - }} - #[inline] pub fn request_info_for_app_user_model_id(appUserModelId: &HStringArg) -> Result>>> { unsafe { + } + #[inline] pub fn request_info_for_app_user_model_id(appUserModelId: &HStringArg) -> Result>>> { >::get_activation_factory().request_info_for_app_user_model_id(appUserModelId) - }} + } } DEFINE_CLSID!(AppDiagnosticInfo(&[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,65,112,112,68,105,97,103,110,111,115,116,105,99,73,110,102,111,0]) [CLSID_AppDiagnosticInfo]); DEFINE_IID!(IID_IAppDiagnosticInfo2, 3745971159, 6426, 17516, 148, 115, 143, 188, 35, 116, 163, 84); RT_INTERFACE!{interface IAppDiagnosticInfo2(IAppDiagnosticInfo2Vtbl): IInspectable(IInspectableVtbl) [IID_IAppDiagnosticInfo2] { - fn GetResourceGroups(&self, out: *mut *mut super::foundation::collections::IVector) -> HRESULT, + fn GetResourceGroups(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn CreateResourceGroupWatcher(&self, out: *mut *mut AppResourceGroupInfoWatcher) -> HRESULT }} impl IAppDiagnosticInfo2 { - #[inline] pub unsafe fn get_resource_groups(&self) -> Result>> { + #[inline] pub fn get_resource_groups(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetResourceGroups)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_resource_group_watcher(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_resource_group_watcher(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateResourceGroupWatcher)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IAppDiagnosticInfoStatics, 3462997439, 4298, 16584, 169, 202, 197, 201, 101, 1, 134, 110); RT_INTERFACE!{static interface IAppDiagnosticInfoStatics(IAppDiagnosticInfoStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAppDiagnosticInfoStatics] { - fn RequestInfoAsync(&self, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT + fn RequestInfoAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IAppDiagnosticInfoStatics { - #[inline] pub unsafe fn request_info_async(&self) -> Result>>> { + #[inline] pub fn request_info_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestInfoAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IAppDiagnosticInfoStatics2, 95570822, 4096, 19600, 187, 159, 114, 53, 7, 28, 80, 254); RT_INTERFACE!{static interface IAppDiagnosticInfoStatics2(IAppDiagnosticInfoStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IAppDiagnosticInfoStatics2] { fn CreateWatcher(&self, out: *mut *mut AppDiagnosticInfoWatcher) -> HRESULT, - fn RequestAccessAsync(&self, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn RequestInfoForPackageAsync(&self, packageFamilyName: HSTRING, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, - fn RequestInfoForAppAsync(&self, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, - fn RequestInfoForAppUserModelId(&self, appUserModelId: HSTRING, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT + fn RequestAccessAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestInfoForPackageAsync(&self, packageFamilyName: HSTRING, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn RequestInfoForAppAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn RequestInfoForAppUserModelId(&self, appUserModelId: HSTRING, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IAppDiagnosticInfoStatics2 { - #[inline] pub unsafe fn create_watcher(&self) -> Result> { + #[inline] pub fn create_watcher(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWatcher)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_access_async(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn request_access_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_info_for_package_async(&self, packageFamilyName: &HStringArg) -> Result>>> { + }} + #[inline] pub fn request_info_for_package_async(&self, packageFamilyName: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestInfoForPackageAsync)(self as *const _ as *mut _, packageFamilyName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_info_for_app_async(&self) -> Result>>> { + }} + #[inline] pub fn request_info_for_app_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestInfoForAppAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_info_for_app_user_model_id(&self, appUserModelId: &HStringArg) -> Result>>> { + }} + #[inline] pub fn request_info_for_app_user_model_id(&self, appUserModelId: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestInfoForAppUserModelId)(self as *const _ as *mut _, appUserModelId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IAppDiagnosticInfoWatcher, 1968656496, 467, 18586, 147, 37, 82, 249, 204, 110, 222, 10); RT_INTERFACE!{interface IAppDiagnosticInfoWatcher(IAppDiagnosticInfoWatcherVtbl): IInspectable(IInspectableVtbl) [IID_IAppDiagnosticInfoWatcher] { - fn add_Added(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Added(&self, token: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Removed(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Removed(&self, token: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_EnumerationCompleted(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_EnumerationCompleted(&self, token: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Stopped(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Stopped(&self, token: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Added(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Added(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Removed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Removed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_EnumerationCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnumerationCompleted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Stopped(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Stopped(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_Status(&self, out: *mut AppDiagnosticInfoWatcherStatus) -> HRESULT, fn Start(&self) -> HRESULT, fn Stop(&self) -> HRESULT }} impl IAppDiagnosticInfoWatcher { - #[inline] pub unsafe fn add_added(&self, handler: &super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_added(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Added)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_added(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_added(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Added)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_removed(&self, handler: &super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_removed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Removed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_removed(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_removed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Removed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_enumeration_completed(&self, handler: &super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_enumeration_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_EnumerationCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_enumeration_completed(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_enumeration_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_EnumerationCompleted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_stopped(&self, handler: &super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_stopped(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Stopped)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_stopped(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_stopped(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Stopped)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AppDiagnosticInfoWatcher: IAppDiagnosticInfoWatcher} DEFINE_IID!(IID_IAppDiagnosticInfoWatcherEventArgs, 1880606486, 57818, 19557, 153, 223, 4, 109, 255, 91, 231, 26); @@ -168,11 +168,11 @@ RT_INTERFACE!{interface IAppDiagnosticInfoWatcherEventArgs(IAppDiagnosticInfoWat fn get_AppDiagnosticInfo(&self, out: *mut *mut AppDiagnosticInfo) -> HRESULT }} impl IAppDiagnosticInfoWatcherEventArgs { - #[inline] pub unsafe fn get_app_diagnostic_info(&self) -> Result> { + #[inline] pub fn get_app_diagnostic_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppDiagnosticInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppDiagnosticInfoWatcherEventArgs: IAppDiagnosticInfoWatcherEventArgs} RT_ENUM! { enum AppDiagnosticInfoWatcherStatus: i32 { @@ -186,26 +186,26 @@ RT_INTERFACE!{interface IAppMemoryReport(IAppMemoryReportVtbl): IInspectable(IIn fn get_TotalCommitLimit(&self, out: *mut u64) -> HRESULT }} impl IAppMemoryReport { - #[inline] pub unsafe fn get_private_commit_usage(&self) -> Result { + #[inline] pub fn get_private_commit_usage(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PrivateCommitUsage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_peak_private_commit_usage(&self) -> Result { + }} + #[inline] pub fn get_peak_private_commit_usage(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PeakPrivateCommitUsage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_total_commit_usage(&self) -> Result { + }} + #[inline] pub fn get_total_commit_usage(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TotalCommitUsage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_total_commit_limit(&self) -> Result { + }} + #[inline] pub fn get_total_commit_limit(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TotalCommitLimit)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppMemoryReport: IAppMemoryReport} DEFINE_IID!(IID_IAppMemoryReport2, 1602172728, 20919, 17116, 183, 237, 121, 186, 70, 210, 136, 87); @@ -213,11 +213,11 @@ RT_INTERFACE!{interface IAppMemoryReport2(IAppMemoryReport2Vtbl): IInspectable(I fn get_ExpectedTotalCommitLimit(&self, out: *mut u64) -> HRESULT }} impl IAppMemoryReport2 { - #[inline] pub unsafe fn get_expected_total_commit_limit(&self) -> Result { + #[inline] pub fn get_expected_total_commit_limit(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExpectedTotalCommitLimit)(self as *const _ as *mut _, &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, @@ -228,16 +228,16 @@ RT_INTERFACE!{interface IAppMemoryUsageLimitChangingEventArgs(IAppMemoryUsageLim fn get_NewLimit(&self, out: *mut u64) -> HRESULT }} impl IAppMemoryUsageLimitChangingEventArgs { - #[inline] pub unsafe fn get_old_limit(&self) -> Result { + #[inline] pub fn get_old_limit(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OldLimit)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_new_limit(&self) -> Result { + }} + #[inline] pub fn get_new_limit(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NewLimit)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppMemoryUsageLimitChangingEventArgs: IAppMemoryUsageLimitChangingEventArgs} DEFINE_IID!(IID_IAppResourceGroupBackgroundTaskReport, 627500878, 45149, 16578, 157, 193, 26, 79, 3, 158, 161, 32); @@ -248,26 +248,26 @@ RT_INTERFACE!{interface IAppResourceGroupBackgroundTaskReport(IAppResourceGroupB fn get_EntryPoint(&self, out: *mut HSTRING) -> HRESULT }} impl IAppResourceGroupBackgroundTaskReport { - #[inline] pub unsafe fn get_task_id(&self) -> Result { + #[inline] pub fn get_task_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TaskId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_name(&self) -> Result { + }} + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_trigger(&self) -> Result { + }} + #[inline] pub fn get_trigger(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Trigger)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_entry_point(&self) -> Result { + }} + #[inline] pub fn get_entry_point(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_EntryPoint)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class AppResourceGroupBackgroundTaskReport: IAppResourceGroupBackgroundTaskReport} RT_ENUM! { enum AppResourceGroupEnergyQuotaState: i32 { @@ -280,155 +280,155 @@ DEFINE_IID!(IID_IAppResourceGroupInfo, 3105093498, 59399, 18932, 132, 94, 123, 1 RT_INTERFACE!{interface IAppResourceGroupInfo(IAppResourceGroupInfoVtbl): IInspectable(IInspectableVtbl) [IID_IAppResourceGroupInfo] { fn get_InstanceId(&self, out: *mut Guid) -> HRESULT, fn get_IsShared(&self, out: *mut bool) -> HRESULT, - fn GetBackgroundTaskReports(&self, out: *mut *mut super::foundation::collections::IVector) -> HRESULT, + fn GetBackgroundTaskReports(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn GetMemoryReport(&self, out: *mut *mut AppResourceGroupMemoryReport) -> HRESULT, - fn GetProcessDiagnosticInfos(&self, out: *mut *mut super::foundation::collections::IVector) -> HRESULT, + fn GetProcessDiagnosticInfos(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn GetStateReport(&self, out: *mut *mut AppResourceGroupStateReport) -> HRESULT }} impl IAppResourceGroupInfo { - #[inline] pub unsafe fn get_instance_id(&self) -> Result { + #[inline] pub fn get_instance_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InstanceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_shared(&self) -> Result { + }} + #[inline] pub fn get_is_shared(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsShared)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_background_task_reports(&self) -> Result>> { + }} + #[inline] pub fn get_background_task_reports(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetBackgroundTaskReports)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_memory_report(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_memory_report(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetMemoryReport)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_process_diagnostic_infos(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_process_diagnostic_infos(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetProcessDiagnosticInfos)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_state_report(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_state_report(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetStateReport)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppResourceGroupInfo: IAppResourceGroupInfo} DEFINE_IID!(IID_IAppResourceGroupInfoWatcher, 3652231421, 28250, 19570, 139, 23, 9, 254, 196, 162, 18, 189); RT_INTERFACE!{interface IAppResourceGroupInfoWatcher(IAppResourceGroupInfoWatcherVtbl): IInspectable(IInspectableVtbl) [IID_IAppResourceGroupInfoWatcher] { - fn add_Added(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Added(&self, token: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Removed(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Removed(&self, token: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_EnumerationCompleted(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_EnumerationCompleted(&self, token: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Stopped(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Stopped(&self, token: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ExecutionStateChanged(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ExecutionStateChanged(&self, token: super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Added(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Added(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Removed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Removed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_EnumerationCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnumerationCompleted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Stopped(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Stopped(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ExecutionStateChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ExecutionStateChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_Status(&self, out: *mut AppResourceGroupInfoWatcherStatus) -> HRESULT, fn Start(&self) -> HRESULT, fn Stop(&self) -> HRESULT }} impl IAppResourceGroupInfoWatcher { - #[inline] pub unsafe fn add_added(&self, handler: &super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_added(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Added)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_added(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_added(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Added)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_removed(&self, handler: &super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_removed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Removed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_removed(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_removed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Removed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_enumeration_completed(&self, handler: &super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_enumeration_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_EnumerationCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_enumeration_completed(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_enumeration_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_EnumerationCompleted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_stopped(&self, handler: &super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_stopped(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Stopped)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_stopped(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_stopped(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Stopped)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_execution_state_changed(&self, handler: &super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_execution_state_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ExecutionStateChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_execution_state_changed(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_execution_state_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ExecutionStateChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AppResourceGroupInfoWatcher: IAppResourceGroupInfoWatcher} DEFINE_IID!(IID_IAppResourceGroupInfoWatcherEventArgs, 2054714935, 25346, 19759, 191, 137, 28, 18, 208, 178, 166, 185); RT_INTERFACE!{interface IAppResourceGroupInfoWatcherEventArgs(IAppResourceGroupInfoWatcherEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAppResourceGroupInfoWatcherEventArgs] { - fn get_AppDiagnosticInfos(&self, out: *mut *mut super::foundation::collections::IVectorView) -> HRESULT, + fn get_AppDiagnosticInfos(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_AppResourceGroupInfo(&self, out: *mut *mut AppResourceGroupInfo) -> HRESULT }} impl IAppResourceGroupInfoWatcherEventArgs { - #[inline] pub unsafe fn get_app_diagnostic_infos(&self) -> Result>> { + #[inline] pub fn get_app_diagnostic_infos(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppDiagnosticInfos)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_resource_group_info(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_app_resource_group_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppResourceGroupInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppResourceGroupInfoWatcherEventArgs: IAppResourceGroupInfoWatcherEventArgs} DEFINE_IID!(IID_IAppResourceGroupInfoWatcherExecutionStateChangedEventArgs, 467398103, 65254, 20436, 152, 221, 233, 42, 44, 194, 153, 243); RT_INTERFACE!{interface IAppResourceGroupInfoWatcherExecutionStateChangedEventArgs(IAppResourceGroupInfoWatcherExecutionStateChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAppResourceGroupInfoWatcherExecutionStateChangedEventArgs] { - fn get_AppDiagnosticInfos(&self, out: *mut *mut super::foundation::collections::IVectorView) -> HRESULT, + fn get_AppDiagnosticInfos(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_AppResourceGroupInfo(&self, out: *mut *mut AppResourceGroupInfo) -> HRESULT }} impl IAppResourceGroupInfoWatcherExecutionStateChangedEventArgs { - #[inline] pub unsafe fn get_app_diagnostic_infos(&self) -> Result>> { + #[inline] pub fn get_app_diagnostic_infos(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppDiagnosticInfos)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_resource_group_info(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_app_resource_group_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppResourceGroupInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AppResourceGroupInfoWatcherExecutionStateChangedEventArgs: IAppResourceGroupInfoWatcherExecutionStateChangedEventArgs} RT_ENUM! { enum AppResourceGroupInfoWatcherStatus: i32 { @@ -442,26 +442,26 @@ RT_INTERFACE!{interface IAppResourceGroupMemoryReport(IAppResourceGroupMemoryRep fn get_TotalCommitUsage(&self, out: *mut u64) -> HRESULT }} impl IAppResourceGroupMemoryReport { - #[inline] pub unsafe fn get_commit_usage_limit(&self) -> Result { + #[inline] pub fn get_commit_usage_limit(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CommitUsageLimit)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_commit_usage_level(&self) -> Result { + }} + #[inline] pub fn get_commit_usage_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CommitUsageLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_private_commit_usage(&self) -> Result { + }} + #[inline] pub fn get_private_commit_usage(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PrivateCommitUsage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_total_commit_usage(&self) -> Result { + }} + #[inline] pub fn get_total_commit_usage(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TotalCommitUsage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppResourceGroupMemoryReport: IAppResourceGroupMemoryReport} DEFINE_IID!(IID_IAppResourceGroupStateReport, 1384423192, 12144, 16950, 171, 64, 208, 77, 176, 199, 185, 49); @@ -470,35 +470,35 @@ RT_INTERFACE!{interface IAppResourceGroupStateReport(IAppResourceGroupStateRepor fn get_EnergyQuotaState(&self, out: *mut AppResourceGroupEnergyQuotaState) -> HRESULT }} impl IAppResourceGroupStateReport { - #[inline] pub unsafe fn get_execution_state(&self) -> Result { + #[inline] pub fn get_execution_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExecutionState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_energy_quota_state(&self) -> Result { + }} + #[inline] pub fn get_energy_quota_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EnergyQuotaState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AppResourceGroupStateReport: IAppResourceGroupStateReport} RT_CLASS!{static class DateTimeSettings} impl RtActivatable for DateTimeSettings {} impl DateTimeSettings { - #[inline] pub fn set_system_date_time(utcDateTime: super::foundation::DateTime) -> Result<()> { unsafe { + #[inline] pub fn set_system_date_time(utcDateTime: foundation::DateTime) -> Result<()> { >::get_activation_factory().set_system_date_time(utcDateTime) - }} + } } DEFINE_CLSID!(DateTimeSettings(&[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,68,97,116,101,84,105,109,101,83,101,116,116,105,110,103,115,0]) [CLSID_DateTimeSettings]); DEFINE_IID!(IID_IDateTimeSettingsStatics, 1562464465, 18414, 18603, 165, 43, 159, 25, 84, 39, 141, 130); RT_INTERFACE!{static interface IDateTimeSettingsStatics(IDateTimeSettingsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IDateTimeSettingsStatics] { - fn SetSystemDateTime(&self, utcDateTime: super::foundation::DateTime) -> HRESULT + fn SetSystemDateTime(&self, utcDateTime: foundation::DateTime) -> HRESULT }} impl IDateTimeSettingsStatics { - #[inline] pub unsafe fn set_system_date_time(&self, utcDateTime: super::foundation::DateTime) -> Result<()> { + #[inline] pub fn set_system_date_time(&self, utcDateTime: foundation::DateTime) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetSystemDateTime)(self as *const _ as *mut _, utcDateTime); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum DiagnosticAccessStatus: i32 { Unspecified (DiagnosticAccessStatus_Unspecified) = 0, Denied (DiagnosticAccessStatus_Denied) = 1, Limited (DiagnosticAccessStatus_Limited) = 2, Allowed (DiagnosticAccessStatus_Allowed) = 3, @@ -508,77 +508,77 @@ RT_INTERFACE!{interface IDispatcherQueue(IDispatcherQueueVtbl): IInspectable(IIn fn CreateTimer(&self, out: *mut *mut DispatcherQueueTimer) -> HRESULT, fn TryEnqueue(&self, callback: *mut DispatcherQueueHandler, out: *mut bool) -> HRESULT, fn TryEnqueueWithPriority(&self, priority: DispatcherQueuePriority, callback: *mut DispatcherQueueHandler, out: *mut bool) -> HRESULT, - fn add_ShutdownStarting(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ShutdownStarting(&self, token: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ShutdownCompleted(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ShutdownCompleted(&self, token: super::foundation::EventRegistrationToken) -> HRESULT + fn add_ShutdownStarting(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ShutdownStarting(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ShutdownCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ShutdownCompleted(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IDispatcherQueue { - #[inline] pub unsafe fn create_timer(&self) -> Result> { + #[inline] pub fn create_timer(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateTimer)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_enqueue(&self, callback: &DispatcherQueueHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn try_enqueue(&self, callback: &DispatcherQueueHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TryEnqueue)(self as *const _ as *mut _, callback as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn try_enqueue_with_priority(&self, priority: DispatcherQueuePriority, callback: &DispatcherQueueHandler) -> Result { + }} + #[inline] pub fn try_enqueue_with_priority(&self, priority: DispatcherQueuePriority, callback: &DispatcherQueueHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TryEnqueueWithPriority)(self as *const _ as *mut _, priority, callback as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_shutdown_starting(&self, handler: &super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_shutdown_starting(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ShutdownStarting)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_shutdown_starting(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_shutdown_starting(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ShutdownStarting)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_shutdown_completed(&self, handler: &super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_shutdown_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ShutdownCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_shutdown_completed(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_shutdown_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ShutdownCompleted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DispatcherQueue: IDispatcherQueue} impl RtActivatable for DispatcherQueue {} impl DispatcherQueue { - #[inline] pub fn get_for_current_thread() -> Result> { unsafe { + #[inline] pub fn get_for_current_thread() -> Result>> { >::get_activation_factory().get_for_current_thread() - }} + } } DEFINE_CLSID!(DispatcherQueue(&[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,68,105,115,112,97,116,99,104,101,114,81,117,101,117,101,0]) [CLSID_DispatcherQueue]); DEFINE_IID!(IID_IDispatcherQueueController, 586370662, 20699, 20022, 169, 141, 97, 192, 27, 56, 77, 32); RT_INTERFACE!{interface IDispatcherQueueController(IDispatcherQueueControllerVtbl): IInspectable(IInspectableVtbl) [IID_IDispatcherQueueController] { fn get_DispatcherQueue(&self, out: *mut *mut DispatcherQueue) -> HRESULT, - fn ShutdownQueueAsync(&self, out: *mut *mut super::foundation::IAsyncAction) -> HRESULT + fn ShutdownQueueAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IDispatcherQueueController { - #[inline] pub unsafe fn get_dispatcher_queue(&self) -> Result> { + #[inline] pub fn get_dispatcher_queue(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DispatcherQueue)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn shutdown_queue_async(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn shutdown_queue_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShutdownQueueAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class DispatcherQueueController: IDispatcherQueueController} impl RtActivatable for DispatcherQueueController {} impl DispatcherQueueController { - #[inline] pub fn create_on_dedicated_thread() -> Result> { unsafe { + #[inline] pub fn create_on_dedicated_thread() -> Result>> { >::get_activation_factory().create_on_dedicated_thread() - }} + } } DEFINE_CLSID!(DispatcherQueueController(&[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,68,105,115,112,97,116,99,104,101,114,81,117,101,117,101,67,111,110,116,114,111,108,108,101,114,0]) [CLSID_DispatcherQueueController]); DEFINE_IID!(IID_IDispatcherQueueControllerStatics, 174889184, 20888, 18850, 163, 19, 63, 112, 209, 241, 60, 39); @@ -586,35 +586,35 @@ RT_INTERFACE!{static interface IDispatcherQueueControllerStatics(IDispatcherQueu fn CreateOnDedicatedThread(&self, out: *mut *mut DispatcherQueueController) -> HRESULT }} impl IDispatcherQueueControllerStatics { - #[inline] pub unsafe fn create_on_dedicated_thread(&self) -> Result> { + #[inline] pub fn create_on_dedicated_thread(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateOnDedicatedThread)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_DispatcherQueueHandler, 3751992476, 6701, 18711, 152, 242, 147, 154, 241, 214, 224, 200); RT_DELEGATE!{delegate DispatcherQueueHandler(DispatcherQueueHandlerVtbl, DispatcherQueueHandlerImpl) [IID_DispatcherQueueHandler] { fn Invoke(&self) -> HRESULT }} impl DispatcherQueueHandler { - #[inline] pub unsafe fn invoke(&self) -> Result<()> { + #[inline] pub fn invoke(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum DispatcherQueuePriority: i32 { Low (DispatcherQueuePriority_Low) = -10, Normal (DispatcherQueuePriority_Normal) = 0, High (DispatcherQueuePriority_High) = 10, }} DEFINE_IID!(IID_IDispatcherQueueShutdownStartingEventArgs, 3295824972, 65431, 16576, 162, 38, 204, 10, 170, 84, 94, 137); RT_INTERFACE!{interface IDispatcherQueueShutdownStartingEventArgs(IDispatcherQueueShutdownStartingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IDispatcherQueueShutdownStartingEventArgs] { - fn GetDeferral(&self, out: *mut *mut super::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IDispatcherQueueShutdownStartingEventArgs { - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DispatcherQueueShutdownStartingEventArgs: IDispatcherQueueShutdownStartingEventArgs} DEFINE_IID!(IID_IDispatcherQueueStatics, 2842526679, 37745, 17687, 146, 69, 208, 130, 74, 193, 44, 116); @@ -622,77 +622,77 @@ RT_INTERFACE!{static interface IDispatcherQueueStatics(IDispatcherQueueStaticsVt fn GetForCurrentThread(&self, out: *mut *mut DispatcherQueue) -> HRESULT }} impl IDispatcherQueueStatics { - #[inline] pub unsafe fn get_for_current_thread(&self) -> Result> { + #[inline] pub fn get_for_current_thread(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentThread)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IDispatcherQueueTimer, 1609218845, 41756, 18215, 177, 172, 55, 69, 70, 73, 213, 106); RT_INTERFACE!{interface IDispatcherQueueTimer(IDispatcherQueueTimerVtbl): IInspectable(IInspectableVtbl) [IID_IDispatcherQueueTimer] { - fn get_Interval(&self, out: *mut super::foundation::TimeSpan) -> HRESULT, - fn put_Interval(&self, value: super::foundation::TimeSpan) -> HRESULT, + fn get_Interval(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_Interval(&self, value: foundation::TimeSpan) -> HRESULT, fn get_IsRunning(&self, out: *mut bool) -> HRESULT, fn get_IsRepeating(&self, out: *mut bool) -> HRESULT, fn put_IsRepeating(&self, value: bool) -> HRESULT, fn Start(&self) -> HRESULT, fn Stop(&self) -> HRESULT, - fn add_Tick(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Tick(&self, token: super::foundation::EventRegistrationToken) -> HRESULT + fn add_Tick(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Tick(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IDispatcherQueueTimer { - #[inline] pub unsafe fn get_interval(&self) -> Result { + #[inline] pub fn get_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Interval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_interval(&self, value: super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_interval(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Interval)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_running(&self) -> Result { + }} + #[inline] pub fn get_is_running(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsRunning)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_repeating(&self) -> Result { + }} + #[inline] pub fn get_is_repeating(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsRepeating)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_repeating(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_repeating(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsRepeating)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_tick(&self, handler: &super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_tick(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Tick)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_tick(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_tick(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Tick)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DispatcherQueueTimer: IDispatcherQueueTimer} 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(&self, out: *mut *mut super::foundation::collections::IVector) -> HRESULT + #[cfg(feature="windows-storage")] fn get_ItemsToSelect(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IFolderLauncherOptions { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_items_to_select(&self) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_items_to_select(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ItemsToSelect)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class FolderLauncherOptions: IFolderLauncherOptions} impl RtActivatable for FolderLauncherOptions {} @@ -700,33 +700,33 @@ DEFINE_CLSID!(FolderLauncherOptions(&[87,105,110,100,111,119,115,46,83,121,115,1 RT_CLASS!{static class KnownUserProperties} impl RtActivatable for KnownUserProperties {} impl KnownUserProperties { - #[inline] pub fn get_display_name() -> Result { unsafe { + #[inline] pub fn get_display_name() -> Result { >::get_activation_factory().get_display_name() - }} - #[inline] pub fn get_first_name() -> Result { unsafe { + } + #[inline] pub fn get_first_name() -> Result { >::get_activation_factory().get_first_name() - }} - #[inline] pub fn get_last_name() -> Result { unsafe { + } + #[inline] pub fn get_last_name() -> Result { >::get_activation_factory().get_last_name() - }} - #[inline] pub fn get_provider_name() -> Result { unsafe { + } + #[inline] pub fn get_provider_name() -> Result { >::get_activation_factory().get_provider_name() - }} - #[inline] pub fn get_account_name() -> Result { unsafe { + } + #[inline] pub fn get_account_name() -> Result { >::get_activation_factory().get_account_name() - }} - #[inline] pub fn get_guest_host() -> Result { unsafe { + } + #[inline] pub fn get_guest_host() -> Result { >::get_activation_factory().get_guest_host() - }} - #[inline] pub fn get_principal_name() -> Result { unsafe { + } + #[inline] pub fn get_principal_name() -> Result { >::get_activation_factory().get_principal_name() - }} - #[inline] pub fn get_domain_name() -> Result { unsafe { + } + #[inline] pub fn get_domain_name() -> Result { >::get_activation_factory().get_domain_name() - }} - #[inline] pub fn get_session_initiation_protocol_uri() -> Result { unsafe { + } + #[inline] pub fn get_session_initiation_protocol_uri() -> Result { >::get_activation_factory().get_session_initiation_protocol_uri() - }} + } } DEFINE_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]) [CLSID_KnownUserProperties]); DEFINE_IID!(IID_IKnownUserPropertiesStatics, 2002096410, 28869, 18661, 182, 55, 91, 163, 68, 30, 78, 228); @@ -742,51 +742,51 @@ RT_INTERFACE!{static interface IKnownUserPropertiesStatics(IKnownUserPropertiesS fn get_SessionInitiationProtocolUri(&self, out: *mut HSTRING) -> HRESULT }} impl IKnownUserPropertiesStatics { - #[inline] pub unsafe fn get_display_name(&self) -> Result { + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_first_name(&self) -> Result { + }} + #[inline] pub fn get_first_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FirstName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_last_name(&self) -> Result { + }} + #[inline] pub fn get_last_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LastName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_provider_name(&self) -> Result { + }} + #[inline] pub fn get_provider_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProviderName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_account_name(&self) -> Result { + }} + #[inline] pub fn get_account_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AccountName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_guest_host(&self) -> Result { + }} + #[inline] pub fn get_guest_host(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_GuestHost)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_principal_name(&self) -> Result { + }} + #[inline] pub fn get_principal_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PrincipalName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_domain_name(&self) -> Result { + }} + #[inline] pub fn get_domain_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DomainName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_session_initiation_protocol_uri(&self) -> Result { + }} + #[inline] pub fn get_session_initiation_protocol_uri(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SessionInitiationProtocolUri)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class Launcher} impl RtActivatable for Launcher {} @@ -794,78 +794,78 @@ impl RtActivatable for Launcher {} impl RtActivatable for Launcher {} impl RtActivatable for Launcher {} impl Launcher { - #[cfg(feature="windows-storage")] #[inline] pub fn launch_file_async(file: &super::storage::IStorageFile) -> Result>> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn launch_file_async(file: &super::storage::IStorageFile) -> Result>> { >::get_activation_factory().launch_file_async(file) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn launch_file_with_options_async(file: &super::storage::IStorageFile, options: &LauncherOptions) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn launch_file_with_options_async(file: &super::storage::IStorageFile, options: &LauncherOptions) -> Result>> { >::get_activation_factory().launch_file_with_options_async(file, options) - }} - #[inline] pub fn launch_uri_async(uri: &super::foundation::Uri) -> Result>> { unsafe { + } + #[inline] pub fn launch_uri_async(uri: &foundation::Uri) -> Result>> { >::get_activation_factory().launch_uri_async(uri) - }} - #[inline] pub fn launch_uri_with_options_async(uri: &super::foundation::Uri, options: &LauncherOptions) -> Result>> { unsafe { + } + #[inline] pub fn launch_uri_with_options_async(uri: &foundation::Uri, options: &LauncherOptions) -> Result>> { >::get_activation_factory().launch_uri_with_options_async(uri, options) - }} - #[inline] pub fn launch_uri_for_results_async(uri: &super::foundation::Uri, options: &LauncherOptions) -> Result>> { unsafe { + } + #[inline] pub fn launch_uri_for_results_async(uri: &foundation::Uri, options: &LauncherOptions) -> Result>> { >::get_activation_factory().launch_uri_for_results_async(uri, options) - }} - #[inline] pub fn launch_uri_for_results_with_data_async(uri: &super::foundation::Uri, options: &LauncherOptions, inputData: &super::foundation::collections::ValueSet) -> Result>> { unsafe { + } + #[inline] pub fn launch_uri_for_results_with_data_async(uri: &foundation::Uri, options: &LauncherOptions, inputData: &foundation::collections::ValueSet) -> Result>> { >::get_activation_factory().launch_uri_for_results_with_data_async(uri, options, inputData) - }} - #[inline] pub fn launch_uri_with_data_async(uri: &super::foundation::Uri, options: &LauncherOptions, inputData: &super::foundation::collections::ValueSet) -> Result>> { unsafe { + } + #[inline] pub fn launch_uri_with_data_async(uri: &foundation::Uri, options: &LauncherOptions, inputData: &foundation::collections::ValueSet) -> Result>> { >::get_activation_factory().launch_uri_with_data_async(uri, options, inputData) - }} - #[inline] pub fn query_uri_support_async(uri: &super::foundation::Uri, launchQuerySupportType: LaunchQuerySupportType) -> Result>> { unsafe { + } + #[inline] pub fn query_uri_support_async(uri: &foundation::Uri, launchQuerySupportType: LaunchQuerySupportType) -> Result>> { >::get_activation_factory().query_uri_support_async(uri, launchQuerySupportType) - }} - #[inline] pub fn query_uri_support_with_package_family_name_async(uri: &super::foundation::Uri, launchQuerySupportType: LaunchQuerySupportType, packageFamilyName: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn query_uri_support_with_package_family_name_async(uri: &foundation::Uri, launchQuerySupportType: LaunchQuerySupportType, packageFamilyName: &HStringArg) -> Result>> { >::get_activation_factory().query_uri_support_with_package_family_name_async(uri, launchQuerySupportType, packageFamilyName) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn query_file_support_async(file: &super::storage::StorageFile) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn query_file_support_async(file: &super::storage::StorageFile) -> Result>> { >::get_activation_factory().query_file_support_async(file) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn query_file_support_with_package_family_name_async(file: &super::storage::StorageFile, packageFamilyName: &HStringArg) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn query_file_support_with_package_family_name_async(file: &super::storage::StorageFile, packageFamilyName: &HStringArg) -> Result>> { >::get_activation_factory().query_file_support_with_package_family_name_async(file, packageFamilyName) - }} - #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_uri_scheme_handlers_async(scheme: &HStringArg) -> Result>>> { unsafe { + } + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_uri_scheme_handlers_async(scheme: &HStringArg) -> Result>>> { >::get_activation_factory().find_uri_scheme_handlers_async(scheme) - }} - #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_uri_scheme_handlers_with_launch_uri_type_async(scheme: &HStringArg, launchQuerySupportType: LaunchQuerySupportType) -> Result>>> { unsafe { + } + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_uri_scheme_handlers_with_launch_uri_type_async(scheme: &HStringArg, launchQuerySupportType: LaunchQuerySupportType) -> Result>>> { >::get_activation_factory().find_uri_scheme_handlers_with_launch_uri_type_async(scheme, launchQuerySupportType) - }} - #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_file_handlers_async(extension: &HStringArg) -> Result>>> { unsafe { + } + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_file_handlers_async(extension: &HStringArg) -> Result>>> { >::get_activation_factory().find_file_handlers_async(extension) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn launch_folder_async(folder: &super::storage::IStorageFolder) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn launch_folder_async(folder: &super::storage::IStorageFolder) -> Result>> { >::get_activation_factory().launch_folder_async(folder) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn launch_folder_with_options_async(folder: &super::storage::IStorageFolder, options: &FolderLauncherOptions) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn launch_folder_with_options_async(folder: &super::storage::IStorageFolder, options: &FolderLauncherOptions) -> Result>> { >::get_activation_factory().launch_folder_with_options_async(folder, options) - }} - #[inline] pub fn query_app_uri_support_async(uri: &super::foundation::Uri) -> Result>> { unsafe { + } + #[inline] pub fn query_app_uri_support_async(uri: &foundation::Uri) -> Result>> { >::get_activation_factory().query_app_uri_support_async(uri) - }} - #[inline] pub fn query_app_uri_support_with_package_family_name_async(uri: &super::foundation::Uri, packageFamilyName: &HStringArg) -> Result>> { unsafe { + } + #[inline] pub fn query_app_uri_support_with_package_family_name_async(uri: &foundation::Uri, packageFamilyName: &HStringArg) -> Result>> { >::get_activation_factory().query_app_uri_support_with_package_family_name_async(uri, packageFamilyName) - }} - #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_app_uri_handlers_async(uri: &super::foundation::Uri) -> Result>>> { unsafe { + } + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_app_uri_handlers_async(uri: &foundation::Uri) -> Result>>> { >::get_activation_factory().find_app_uri_handlers_async(uri) - }} - #[inline] pub fn launch_uri_for_user_async(user: &User, uri: &super::foundation::Uri) -> Result>> { unsafe { + } + #[inline] pub fn launch_uri_for_user_async(user: &User, uri: &foundation::Uri) -> Result>> { >::get_activation_factory().launch_uri_for_user_async(user, uri) - }} - #[inline] pub fn launch_uri_with_options_for_user_async(user: &User, uri: &super::foundation::Uri, options: &LauncherOptions) -> Result>> { unsafe { + } + #[inline] pub fn launch_uri_with_options_for_user_async(user: &User, uri: &foundation::Uri, options: &LauncherOptions) -> Result>> { >::get_activation_factory().launch_uri_with_options_for_user_async(user, uri, options) - }} - #[inline] pub fn launch_uri_with_data_for_user_async(user: &User, uri: &super::foundation::Uri, options: &LauncherOptions, inputData: &super::foundation::collections::ValueSet) -> Result>> { unsafe { + } + #[inline] pub fn launch_uri_with_data_for_user_async(user: &User, uri: &foundation::Uri, options: &LauncherOptions, inputData: &foundation::collections::ValueSet) -> Result>> { >::get_activation_factory().launch_uri_with_data_for_user_async(user, uri, options, inputData) - }} - #[inline] pub fn launch_uri_for_results_for_user_async(user: &User, uri: &super::foundation::Uri, options: &LauncherOptions) -> Result>> { unsafe { + } + #[inline] pub fn launch_uri_for_results_for_user_async(user: &User, uri: &foundation::Uri, options: &LauncherOptions) -> Result>> { >::get_activation_factory().launch_uri_for_results_for_user_async(user, uri, options) - }} - #[inline] pub fn launch_uri_for_results_with_data_for_user_async(user: &User, uri: &super::foundation::Uri, options: &LauncherOptions, inputData: &super::foundation::collections::ValueSet) -> Result>> { unsafe { + } + #[inline] pub fn launch_uri_for_results_with_data_for_user_async(user: &User, uri: &foundation::Uri, options: &LauncherOptions, inputData: &foundation::collections::ValueSet) -> Result>> { >::get_activation_factory().launch_uri_for_results_with_data_for_user_async(user, uri, options, inputData) - }} + } } DEFINE_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]) [CLSID_Launcher]); DEFINE_IID!(IID_ILauncherOptions, 3136954840, 45169, 19672, 133, 62, 52, 18, 3, 229, 87, 211); @@ -879,71 +879,71 @@ RT_INTERFACE!{interface ILauncherOptions(ILauncherOptionsVtbl): IInspectable(IIn fn put_PreferredApplicationPackageFamilyName(&self, value: HSTRING) -> HRESULT, fn get_PreferredApplicationDisplayName(&self, out: *mut HSTRING) -> HRESULT, fn put_PreferredApplicationDisplayName(&self, value: HSTRING) -> HRESULT, - fn get_FallbackUri(&self, out: *mut *mut super::foundation::Uri) -> HRESULT, - fn put_FallbackUri(&self, value: *mut super::foundation::Uri) -> HRESULT, + fn get_FallbackUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_FallbackUri(&self, value: *mut foundation::Uri) -> HRESULT, fn get_ContentType(&self, out: *mut HSTRING) -> HRESULT, fn put_ContentType(&self, value: HSTRING) -> HRESULT }} impl ILauncherOptions { - #[inline] pub unsafe fn get_treat_as_untrusted(&self) -> Result { + #[inline] pub fn get_treat_as_untrusted(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TreatAsUntrusted)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_treat_as_untrusted(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_treat_as_untrusted(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TreatAsUntrusted)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_application_picker(&self) -> Result { + }} + #[inline] pub fn get_display_application_picker(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DisplayApplicationPicker)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_application_picker(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_display_application_picker(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayApplicationPicker)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_ui(&self) -> Result> { + }} + #[inline] pub fn get_ui(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UI)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_preferred_application_package_family_name(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_preferred_application_package_family_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PreferredApplicationPackageFamilyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_preferred_application_package_family_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_preferred_application_package_family_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PreferredApplicationPackageFamilyName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_preferred_application_display_name(&self) -> Result { + }} + #[inline] pub fn get_preferred_application_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PreferredApplicationDisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_preferred_application_display_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_preferred_application_display_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PreferredApplicationDisplayName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_fallback_uri(&self) -> Result> { + }} + #[inline] pub fn get_fallback_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FallbackUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_fallback_uri(&self, value: &super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_fallback_uri(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FallbackUri)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_content_type(&self) -> Result { + }} + #[inline] pub fn get_content_type(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContentType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_content_type(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_content_type(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ContentType)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class LauncherOptions: ILauncherOptions} impl RtActivatable for LauncherOptions {} @@ -956,24 +956,24 @@ RT_INTERFACE!{interface ILauncherOptions2(ILauncherOptions2Vtbl): IInspectable(I #[cfg(feature="windows-storage")] fn put_NeighboringFilesQuery(&self, value: *mut super::storage::search::StorageFileQueryResult) -> HRESULT }} impl ILauncherOptions2 { - #[inline] pub unsafe fn get_target_application_package_family_name(&self) -> Result { + #[inline] pub fn get_target_application_package_family_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TargetApplicationPackageFamilyName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_target_application_package_family_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_target_application_package_family_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TargetApplicationPackageFamilyName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_neighboring_files_query(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_neighboring_files_query(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NeighboringFilesQuery)(self 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_neighboring_files_query(&self, value: &super::storage::search::StorageFileQueryResult) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_neighboring_files_query(&self, value: &super::storage::search::StorageFileQueryResult) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_NeighboringFilesQuery)(self as *const _ as *mut _, 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] { @@ -981,15 +981,15 @@ RT_INTERFACE!{interface ILauncherOptions3(ILauncherOptions3Vtbl): IInspectable(I fn put_IgnoreAppUriHandlers(&self, value: bool) -> HRESULT }} impl ILauncherOptions3 { - #[inline] pub unsafe fn get_ignore_app_uri_handlers(&self) -> Result { + #[inline] pub fn get_ignore_app_uri_handlers(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IgnoreAppUriHandlers)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_ignore_app_uri_handlers(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_ignore_app_uri_handlers(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IgnoreAppUriHandlers)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ILauncherOptions4, 4017082638, 59131, 18452, 164, 78, 87, 232, 185, 217, 160, 27); RT_INTERFACE!{interface ILauncherOptions4(ILauncherOptions4Vtbl): IInspectable(IInspectableVtbl) [IID_ILauncherOptions4] { @@ -997,222 +997,222 @@ RT_INTERFACE!{interface ILauncherOptions4(ILauncherOptions4Vtbl): IInspectable(I fn put_LimitPickerToCurrentAppAndAppUriHandlers(&self, value: bool) -> HRESULT }} impl ILauncherOptions4 { - #[inline] pub unsafe fn get_limit_picker_to_current_app_and_app_uri_handlers(&self) -> Result { + #[inline] pub fn get_limit_picker_to_current_app_and_app_uri_handlers(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LimitPickerToCurrentAppAndAppUriHandlers)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_limit_picker_to_current_app_and_app_uri_handlers(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_limit_picker_to_current_app_and_app_uri_handlers(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LimitPickerToCurrentAppAndAppUriHandlers)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self) -> (), - #[cfg(feature="windows-storage")] fn LaunchFileAsync(&self, file: *mut super::storage::IStorageFile, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn LaunchFileAsync(&self, file: *mut super::storage::IStorageFile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy1(&self) -> (), - #[cfg(feature="windows-storage")] fn LaunchFileWithOptionsAsync(&self, file: *mut super::storage::IStorageFile, options: *mut LauncherOptions, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn LaunchUriAsync(&self, uri: *mut super::foundation::Uri, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn LaunchUriWithOptionsAsync(&self, uri: *mut super::foundation::Uri, options: *mut LauncherOptions, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn LaunchFileWithOptionsAsync(&self, file: *mut super::storage::IStorageFile, options: *mut LauncherOptions, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn LaunchUriAsync(&self, uri: *mut foundation::Uri, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn LaunchUriWithOptionsAsync(&self, uri: *mut foundation::Uri, options: *mut LauncherOptions, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ILauncherStatics { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn launch_file_async(&self, file: &super::storage::IStorageFile) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn launch_file_async(&self, file: &super::storage::IStorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LaunchFileAsync)(self 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 launch_file_with_options_async(&self, file: &super::storage::IStorageFile, options: &LauncherOptions) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn launch_file_with_options_async(&self, file: &super::storage::IStorageFile, options: &LauncherOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LaunchFileWithOptionsAsync)(self as *const _ as *mut _, 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(&self, uri: &super::foundation::Uri) -> Result>> { + }} + #[inline] pub fn launch_uri_async(&self, uri: &foundation::Uri) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LaunchUriAsync)(self 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(&self, uri: &super::foundation::Uri, options: &LauncherOptions) -> Result>> { + }} + #[inline] pub fn launch_uri_with_options_async(&self, uri: &foundation::Uri, options: &LauncherOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LaunchUriWithOptionsAsync)(self 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) } - } + }} } 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(&self, uri: *mut super::foundation::Uri, options: *mut LauncherOptions, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn LaunchUriForResultsWithDataAsync(&self, uri: *mut super::foundation::Uri, options: *mut LauncherOptions, inputData: *mut super::foundation::collections::ValueSet, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn LaunchUriWithDataAsync(&self, uri: *mut super::foundation::Uri, options: *mut LauncherOptions, inputData: *mut super::foundation::collections::ValueSet, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn QueryUriSupportAsync(&self, uri: *mut super::foundation::Uri, launchQuerySupportType: LaunchQuerySupportType, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn QueryUriSupportWithPackageFamilyNameAsync(&self, uri: *mut super::foundation::Uri, launchQuerySupportType: LaunchQuerySupportType, packageFamilyName: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn LaunchUriForResultsAsync(&self, uri: *mut foundation::Uri, options: *mut LauncherOptions, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn LaunchUriForResultsWithDataAsync(&self, uri: *mut foundation::Uri, options: *mut LauncherOptions, inputData: *mut foundation::collections::ValueSet, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn LaunchUriWithDataAsync(&self, uri: *mut foundation::Uri, options: *mut LauncherOptions, inputData: *mut foundation::collections::ValueSet, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn QueryUriSupportAsync(&self, uri: *mut foundation::Uri, launchQuerySupportType: LaunchQuerySupportType, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn QueryUriSupportWithPackageFamilyNameAsync(&self, uri: *mut foundation::Uri, launchQuerySupportType: LaunchQuerySupportType, packageFamilyName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy5(&self) -> (), - #[cfg(feature="windows-storage")] fn QueryFileSupportAsync(&self, file: *mut super::storage::StorageFile, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn QueryFileSupportAsync(&self, file: *mut super::storage::StorageFile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy6(&self) -> (), - #[cfg(feature="windows-storage")] fn QueryFileSupportWithPackageFamilyNameAsync(&self, file: *mut super::storage::StorageFile, packageFamilyName: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-applicationmodel")] fn FindUriSchemeHandlersAsync(&self, scheme: HSTRING, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, - #[cfg(feature="windows-applicationmodel")] fn FindUriSchemeHandlersWithLaunchUriTypeAsync(&self, scheme: HSTRING, launchQuerySupportType: LaunchQuerySupportType, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, - #[cfg(feature="windows-applicationmodel")] fn FindFileHandlersAsync(&self, extension: HSTRING, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT + #[cfg(feature="windows-storage")] fn QueryFileSupportWithPackageFamilyNameAsync(&self, file: *mut super::storage::StorageFile, packageFamilyName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-applicationmodel")] fn FindUriSchemeHandlersAsync(&self, scheme: HSTRING, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + #[cfg(feature="windows-applicationmodel")] fn FindUriSchemeHandlersWithLaunchUriTypeAsync(&self, scheme: HSTRING, launchQuerySupportType: LaunchQuerySupportType, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + #[cfg(feature="windows-applicationmodel")] fn FindFileHandlersAsync(&self, extension: HSTRING, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl ILauncherStatics2 { - #[inline] pub unsafe fn launch_uri_for_results_async(&self, uri: &super::foundation::Uri, options: &LauncherOptions) -> Result>> { + #[inline] pub fn launch_uri_for_results_async(&self, uri: &foundation::Uri, options: &LauncherOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LaunchUriForResultsAsync)(self 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_async(&self, uri: &super::foundation::Uri, options: &LauncherOptions, inputData: &super::foundation::collections::ValueSet) -> Result>> { + }} + #[inline] pub fn launch_uri_for_results_with_data_async(&self, uri: &foundation::Uri, options: &LauncherOptions, inputData: &foundation::collections::ValueSet) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LaunchUriForResultsWithDataAsync)(self 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_with_data_async(&self, uri: &super::foundation::Uri, options: &LauncherOptions, inputData: &super::foundation::collections::ValueSet) -> Result>> { + }} + #[inline] pub fn launch_uri_with_data_async(&self, uri: &foundation::Uri, options: &LauncherOptions, inputData: &foundation::collections::ValueSet) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LaunchUriWithDataAsync)(self 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 query_uri_support_async(&self, uri: &super::foundation::Uri, launchQuerySupportType: LaunchQuerySupportType) -> Result>> { + }} + #[inline] pub fn query_uri_support_async(&self, uri: &foundation::Uri, launchQuerySupportType: LaunchQuerySupportType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).QueryUriSupportAsync)(self as *const _ as *mut _, 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(&self, uri: &super::foundation::Uri, launchQuerySupportType: LaunchQuerySupportType, packageFamilyName: &HStringArg) -> Result>> { + }} + #[inline] pub fn query_uri_support_with_package_family_name_async(&self, uri: &foundation::Uri, launchQuerySupportType: LaunchQuerySupportType, packageFamilyName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).QueryUriSupportWithPackageFamilyNameAsync)(self as *const _ as *mut _, 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(&self, file: &super::storage::StorageFile) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn query_file_support_async(&self, file: &super::storage::StorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).QueryFileSupportAsync)(self 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 query_file_support_with_package_family_name_async(&self, file: &super::storage::StorageFile, packageFamilyName: &HStringArg) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn query_file_support_with_package_family_name_async(&self, file: &super::storage::StorageFile, packageFamilyName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).QueryFileSupportWithPackageFamilyNameAsync)(self as *const _ as *mut _, 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(&self, scheme: &HStringArg) -> Result>>> { + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_uri_scheme_handlers_async(&self, scheme: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindUriSchemeHandlersAsync)(self as *const _ as *mut _, 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(&self, scheme: &HStringArg, launchQuerySupportType: LaunchQuerySupportType) -> Result>>> { + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_uri_scheme_handlers_with_launch_uri_type_async(&self, scheme: &HStringArg, launchQuerySupportType: LaunchQuerySupportType) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindUriSchemeHandlersWithLaunchUriTypeAsync)(self as *const _ as *mut _, 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(&self, extension: &HStringArg) -> Result>>> { + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_file_handlers_async(&self, extension: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindFileHandlersAsync)(self as *const _ as *mut _, 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(&self, folder: *mut super::storage::IStorageFolder, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn LaunchFolderWithOptionsAsync(&self, folder: *mut super::storage::IStorageFolder, options: *mut FolderLauncherOptions, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn LaunchFolderAsync(&self, folder: *mut super::storage::IStorageFolder, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn LaunchFolderWithOptionsAsync(&self, folder: *mut super::storage::IStorageFolder, options: *mut FolderLauncherOptions, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ILauncherStatics3 { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn launch_folder_async(&self, folder: &super::storage::IStorageFolder) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn launch_folder_async(&self, folder: &super::storage::IStorageFolder) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LaunchFolderAsync)(self as *const _ as *mut _, 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(&self, folder: &super::storage::IStorageFolder, options: &FolderLauncherOptions) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn launch_folder_with_options_async(&self, folder: &super::storage::IStorageFolder, options: &FolderLauncherOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LaunchFolderWithOptionsAsync)(self as *const _ as *mut _, 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(&self, uri: *mut super::foundation::Uri, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn QueryAppUriSupportWithPackageFamilyNameAsync(&self, uri: *mut super::foundation::Uri, packageFamilyName: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, + fn QueryAppUriSupportAsync(&self, uri: *mut foundation::Uri, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn QueryAppUriSupportWithPackageFamilyNameAsync(&self, uri: *mut foundation::Uri, packageFamilyName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-applicationmodel"))] fn __Dummy2(&self) -> (), - #[cfg(feature="windows-applicationmodel")] fn FindAppUriHandlersAsync(&self, uri: *mut super::foundation::Uri, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, - fn LaunchUriForUserAsync(&self, user: *mut User, uri: *mut super::foundation::Uri, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn LaunchUriWithOptionsForUserAsync(&self, user: *mut User, uri: *mut super::foundation::Uri, options: *mut LauncherOptions, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn LaunchUriWithDataForUserAsync(&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(&self, user: *mut User, uri: *mut super::foundation::Uri, options: *mut LauncherOptions, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn LaunchUriForResultsWithDataForUserAsync(&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 + #[cfg(feature="windows-applicationmodel")] fn FindAppUriHandlersAsync(&self, uri: *mut foundation::Uri, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn LaunchUriForUserAsync(&self, user: *mut User, uri: *mut foundation::Uri, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn LaunchUriWithOptionsForUserAsync(&self, user: *mut User, uri: *mut foundation::Uri, options: *mut LauncherOptions, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn LaunchUriWithDataForUserAsync(&self, user: *mut User, uri: *mut foundation::Uri, options: *mut LauncherOptions, inputData: *mut foundation::collections::ValueSet, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn LaunchUriForResultsForUserAsync(&self, user: *mut User, uri: *mut foundation::Uri, options: *mut LauncherOptions, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn LaunchUriForResultsWithDataForUserAsync(&self, user: *mut User, uri: *mut foundation::Uri, options: *mut LauncherOptions, inputData: *mut foundation::collections::ValueSet, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ILauncherStatics4 { - #[inline] pub unsafe fn query_app_uri_support_async(&self, uri: &super::foundation::Uri) -> Result>> { + #[inline] pub fn query_app_uri_support_async(&self, uri: &foundation::Uri) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).QueryAppUriSupportAsync)(self 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 query_app_uri_support_with_package_family_name_async(&self, uri: &super::foundation::Uri, packageFamilyName: &HStringArg) -> Result>> { + }} + #[inline] pub fn query_app_uri_support_with_package_family_name_async(&self, uri: &foundation::Uri, packageFamilyName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).QueryAppUriSupportWithPackageFamilyNameAsync)(self as *const _ as *mut _, 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(&self, uri: &super::foundation::Uri) -> Result>>> { + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn find_app_uri_handlers_async(&self, uri: &foundation::Uri) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAppUriHandlersAsync)(self 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_for_user_async(&self, user: &User, uri: &super::foundation::Uri) -> Result>> { + }} + #[inline] pub fn launch_uri_for_user_async(&self, user: &User, uri: &foundation::Uri) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LaunchUriForUserAsync)(self as *const _ as *mut _, 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(&self, user: &User, uri: &super::foundation::Uri, options: &LauncherOptions) -> Result>> { + }} + #[inline] pub fn launch_uri_with_options_for_user_async(&self, user: &User, uri: &foundation::Uri, options: &LauncherOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LaunchUriWithOptionsForUserAsync)(self as *const _ as *mut _, 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(&self, user: &User, uri: &super::foundation::Uri, options: &LauncherOptions, inputData: &super::foundation::collections::ValueSet) -> Result>> { + }} + #[inline] pub fn launch_uri_with_data_for_user_async(&self, user: &User, uri: &foundation::Uri, options: &LauncherOptions, inputData: &foundation::collections::ValueSet) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LaunchUriWithDataForUserAsync)(self as *const _ as *mut _, 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(&self, user: &User, uri: &super::foundation::Uri, options: &LauncherOptions) -> Result>> { + }} + #[inline] pub fn launch_uri_for_results_for_user_async(&self, user: &User, uri: &foundation::Uri, options: &LauncherOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LaunchUriForResultsForUserAsync)(self as *const _ as *mut _, 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(&self, user: &User, uri: &super::foundation::Uri, options: &LauncherOptions, inputData: &super::foundation::collections::ValueSet) -> Result>> { + }} + #[inline] pub fn launch_uri_for_results_with_data_for_user_async(&self, user: &User, uri: &foundation::Uri, options: &LauncherOptions, inputData: &foundation::collections::ValueSet) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LaunchUriForResultsWithDataForUserAsync)(self as *const _ as *mut _, 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) } - } + }} } 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(&self, out: *mut *mut super::foundation::IReference) -> HRESULT, - fn put_InvocationPoint(&self, value: *mut super::foundation::IReference) -> HRESULT, - fn get_SelectionRect(&self, out: *mut *mut super::foundation::IReference) -> HRESULT, - fn put_SelectionRect(&self, value: *mut super::foundation::IReference) -> HRESULT, + fn get_InvocationPoint(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_InvocationPoint(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_SelectionRect(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_SelectionRect(&self, value: *mut foundation::IReference) -> HRESULT, #[cfg(feature="windows-ui")] fn get_PreferredPlacement(&self, out: *mut super::ui::popups::Placement) -> HRESULT, #[cfg(feature="windows-ui")] fn put_PreferredPlacement(&self, value: super::ui::popups::Placement) -> HRESULT }} impl ILauncherUIOptions { - #[inline] pub unsafe fn get_invocation_point(&self) -> Result>> { + #[inline] pub fn get_invocation_point(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InvocationPoint)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_invocation_point(&self, value: &super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_invocation_point(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InvocationPoint)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_selection_rect(&self) -> Result>> { + }} + #[inline] pub fn get_selection_rect(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SelectionRect)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_selection_rect(&self, value: &super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_selection_rect(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SelectionRect)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_preferred_placement(&self) -> Result { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_preferred_placement(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PreferredPlacement)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn set_preferred_placement(&self, value: super::ui::popups::Placement) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_preferred_placement(&self, value: super::ui::popups::Placement) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PreferredPlacement)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class LauncherUIOptions: ILauncherUIOptions} DEFINE_IID!(IID_ILauncherViewOptions, 2325424625, 31911, 18910, 155, 211, 60, 91, 113, 132, 246, 22); @@ -1221,15 +1221,15 @@ RT_INTERFACE!{interface ILauncherViewOptions(ILauncherViewOptionsVtbl): IInspect #[cfg(feature="windows-ui")] fn put_DesiredRemainingView(&self, value: super::ui::viewmanagement::ViewSizePreference) -> HRESULT }} impl ILauncherViewOptions { - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_desired_remaining_view(&self) -> Result { + #[cfg(feature="windows-ui")] #[inline] pub fn get_desired_remaining_view(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DesiredRemainingView)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn set_desired_remaining_view(&self, value: super::ui::viewmanagement::ViewSizePreference) -> Result<()> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn set_desired_remaining_view(&self, value: super::ui::viewmanagement::ViewSizePreference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DesiredRemainingView)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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, @@ -1243,19 +1243,19 @@ RT_ENUM! { enum LaunchQuerySupportType: i32 { 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(&self, out: *mut LaunchUriStatus) -> HRESULT, - fn get_Result(&self, out: *mut *mut super::foundation::collections::ValueSet) -> HRESULT + fn get_Result(&self, out: *mut *mut foundation::collections::ValueSet) -> HRESULT }} impl ILaunchUriResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_result(&self) -> Result> { + }} + #[inline] pub fn get_result(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Result)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class LaunchUriResult: ILaunchUriResult} RT_ENUM! { enum LaunchUriStatus: i32 { @@ -1267,45 +1267,45 @@ impl RtActivatable for MemoryManager {} impl RtActivatable for MemoryManager {} impl RtActivatable for MemoryManager {} impl MemoryManager { - #[inline] pub fn get_app_memory_usage() -> Result { unsafe { + #[inline] pub fn get_app_memory_usage() -> Result { >::get_activation_factory().get_app_memory_usage() - }} - #[inline] pub fn get_app_memory_usage_limit() -> Result { unsafe { + } + #[inline] pub fn get_app_memory_usage_limit() -> Result { >::get_activation_factory().get_app_memory_usage_limit() - }} - #[inline] pub fn get_app_memory_usage_level() -> Result { unsafe { + } + #[inline] pub fn get_app_memory_usage_level() -> Result { >::get_activation_factory().get_app_memory_usage_level() - }} - #[inline] pub fn add_app_memory_usage_increased(handler: &super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_app_memory_usage_increased(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_app_memory_usage_increased(handler) - }} - #[inline] pub fn remove_app_memory_usage_increased(token: super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_app_memory_usage_increased(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_app_memory_usage_increased(token) - }} - #[inline] pub fn add_app_memory_usage_decreased(handler: &super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_app_memory_usage_decreased(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_app_memory_usage_decreased(handler) - }} - #[inline] pub fn remove_app_memory_usage_decreased(token: super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_app_memory_usage_decreased(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_app_memory_usage_decreased(token) - }} - #[inline] pub fn add_app_memory_usage_limit_changing(handler: &super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_app_memory_usage_limit_changing(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_app_memory_usage_limit_changing(handler) - }} - #[inline] pub fn remove_app_memory_usage_limit_changing(token: super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_app_memory_usage_limit_changing(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_app_memory_usage_limit_changing(token) - }} - #[inline] pub fn get_app_memory_report() -> Result> { unsafe { + } + #[inline] pub fn get_app_memory_report() -> Result>> { >::get_activation_factory().get_app_memory_report() - }} - #[inline] pub fn get_process_memory_report() -> Result> { unsafe { + } + #[inline] pub fn get_process_memory_report() -> Result>> { >::get_activation_factory().get_process_memory_report() - }} - #[inline] pub fn try_set_app_memory_usage_limit(value: u64) -> Result { unsafe { + } + #[inline] pub fn try_set_app_memory_usage_limit(value: u64) -> Result { >::get_activation_factory().try_set_app_memory_usage_limit(value) - }} - #[inline] pub fn get_expected_app_memory_usage_limit() -> Result { unsafe { + } + #[inline] pub fn get_expected_app_memory_usage_limit() -> Result { >::get_activation_factory().get_expected_app_memory_usage_limit() - }} + } } DEFINE_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]) [CLSID_MemoryManager]); DEFINE_IID!(IID_IMemoryManagerStatics, 1550591900, 55242, 18297, 145, 136, 64, 87, 33, 156, 230, 76); @@ -1313,56 +1313,56 @@ RT_INTERFACE!{static interface IMemoryManagerStatics(IMemoryManagerStaticsVtbl): fn get_AppMemoryUsage(&self, out: *mut u64) -> HRESULT, fn get_AppMemoryUsageLimit(&self, out: *mut u64) -> HRESULT, fn get_AppMemoryUsageLevel(&self, out: *mut AppMemoryUsageLevel) -> HRESULT, - fn add_AppMemoryUsageIncreased(&self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AppMemoryUsageIncreased(&self, token: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_AppMemoryUsageDecreased(&self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AppMemoryUsageDecreased(&self, token: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_AppMemoryUsageLimitChanging(&self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AppMemoryUsageLimitChanging(&self, token: super::foundation::EventRegistrationToken) -> HRESULT + fn add_AppMemoryUsageIncreased(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AppMemoryUsageIncreased(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_AppMemoryUsageDecreased(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AppMemoryUsageDecreased(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_AppMemoryUsageLimitChanging(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AppMemoryUsageLimitChanging(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IMemoryManagerStatics { - #[inline] pub unsafe fn get_app_memory_usage(&self) -> Result { + #[inline] pub fn get_app_memory_usage(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AppMemoryUsage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_memory_usage_limit(&self) -> Result { + }} + #[inline] pub fn get_app_memory_usage_limit(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AppMemoryUsageLimit)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_memory_usage_level(&self) -> Result { + }} + #[inline] pub fn get_app_memory_usage_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AppMemoryUsageLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_app_memory_usage_increased(&self, handler: &super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_app_memory_usage_increased(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AppMemoryUsageIncreased)(self as *const _ as *mut _, 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(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_app_memory_usage_increased(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AppMemoryUsageIncreased)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_app_memory_usage_decreased(&self, handler: &super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_app_memory_usage_decreased(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AppMemoryUsageDecreased)(self as *const _ as *mut _, 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(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_app_memory_usage_decreased(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AppMemoryUsageDecreased)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_app_memory_usage_limit_changing(&self, handler: &super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_app_memory_usage_limit_changing(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AppMemoryUsageLimitChanging)(self as *const _ as *mut _, 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(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_app_memory_usage_limit_changing(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AppMemoryUsageLimitChanging)(self as *const _ as *mut _, 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] { @@ -1370,38 +1370,38 @@ RT_INTERFACE!{static interface IMemoryManagerStatics2(IMemoryManagerStatics2Vtbl fn GetProcessMemoryReport(&self, out: *mut *mut ProcessMemoryReport) -> HRESULT }} impl IMemoryManagerStatics2 { - #[inline] pub unsafe fn get_app_memory_report(&self) -> Result> { + #[inline] pub fn get_app_memory_report(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAppMemoryReport)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_process_memory_report(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_process_memory_report(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetProcessMemoryReport)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, value: u64, out: *mut bool) -> HRESULT }} impl IMemoryManagerStatics3 { - #[inline] pub unsafe fn try_set_app_memory_usage_limit(&self, value: u64) -> Result { + #[inline] pub fn try_set_app_memory_usage_limit(&self, value: u64) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TrySetAppMemoryUsageLimit)(self as *const _ as *mut _, value, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IMemoryManagerStatics4, 3316205608, 59470, 18566, 138, 13, 68, 179, 25, 14, 59, 114); RT_INTERFACE!{static interface IMemoryManagerStatics4(IMemoryManagerStatics4Vtbl): IInspectable(IInspectableVtbl) [IID_IMemoryManagerStatics4] { fn get_ExpectedAppMemoryUsageLimit(&self, out: *mut u64) -> HRESULT }} impl IMemoryManagerStatics4 { - #[inline] pub unsafe fn get_expected_app_memory_usage_limit(&self) -> Result { + #[inline] pub fn get_expected_app_memory_usage_limit(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExpectedAppMemoryUsageLimit)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum PowerState: i32 { ConnectedStandby (PowerState_ConnectedStandby) = 0, SleepS3 (PowerState_SleepS3) = 1, @@ -1409,12 +1409,12 @@ RT_ENUM! { enum PowerState: i32 { RT_CLASS!{static class ProcessLauncher} impl RtActivatable for ProcessLauncher {} impl ProcessLauncher { - #[inline] pub fn run_to_completion_async(fileName: &HStringArg, args: &HStringArg) -> Result>> { unsafe { + #[inline] pub fn run_to_completion_async(fileName: &HStringArg, args: &HStringArg) -> Result>> { >::get_activation_factory().run_to_completion_async(fileName, args) - }} - #[inline] pub fn run_to_completion_async_with_options(fileName: &HStringArg, args: &HStringArg, options: &ProcessLauncherOptions) -> Result>> { unsafe { + } + #[inline] pub fn run_to_completion_async_with_options(fileName: &HStringArg, args: &HStringArg, options: &ProcessLauncherOptions) -> Result>> { >::get_activation_factory().run_to_completion_async_with_options(fileName, args, options) - }} + } } DEFINE_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]) [CLSID_ProcessLauncher]); DEFINE_IID!(IID_IProcessLauncherOptions, 813742543, 62532, 19075, 190, 175, 165, 73, 160, 243, 34, 156); @@ -1435,42 +1435,42 @@ RT_INTERFACE!{interface IProcessLauncherOptions(IProcessLauncherOptionsVtbl): II fn put_WorkingDirectory(&self, value: HSTRING) -> HRESULT }} impl IProcessLauncherOptions { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_standard_input(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_standard_input(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StandardInput)(self 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_standard_input(&self, value: &super::storage::streams::IInputStream) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_standard_input(&self, value: &super::storage::streams::IInputStream) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StandardInput)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_standard_output(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_standard_output(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StandardOutput)(self 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_standard_output(&self, value: &super::storage::streams::IOutputStream) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_standard_output(&self, value: &super::storage::streams::IOutputStream) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StandardOutput)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_standard_error(&self) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_standard_error(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StandardError)(self 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_standard_error(&self, value: &super::storage::streams::IOutputStream) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_standard_error(&self, value: &super::storage::streams::IOutputStream) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StandardError)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_working_directory(&self) -> Result { + }} + #[inline] pub fn get_working_directory(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WorkingDirectory)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_working_directory(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_working_directory(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_WorkingDirectory)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ProcessLauncherOptions: IProcessLauncherOptions} impl RtActivatable for ProcessLauncherOptions {} @@ -1480,29 +1480,29 @@ RT_INTERFACE!{interface IProcessLauncherResult(IProcessLauncherResultVtbl): IIns fn get_ExitCode(&self, out: *mut u32) -> HRESULT }} impl IProcessLauncherResult { - #[inline] pub unsafe fn get_exit_code(&self) -> Result { + #[inline] pub fn get_exit_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExitCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ProcessLauncherResult: IProcessLauncherResult} 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(&self, fileName: HSTRING, args: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn RunToCompletionAsyncWithOptions(&self, fileName: HSTRING, args: HSTRING, options: *mut ProcessLauncherOptions, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + fn RunToCompletionAsync(&self, fileName: HSTRING, args: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RunToCompletionAsyncWithOptions(&self, fileName: HSTRING, args: HSTRING, options: *mut ProcessLauncherOptions, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IProcessLauncherStatics { - #[inline] pub unsafe fn run_to_completion_async(&self, fileName: &HStringArg, args: &HStringArg) -> Result>> { + #[inline] pub fn run_to_completion_async(&self, fileName: &HStringArg, args: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RunToCompletionAsync)(self as *const _ as *mut _, 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(&self, fileName: &HStringArg, args: &HStringArg, options: &ProcessLauncherOptions) -> Result>> { + }} + #[inline] pub fn run_to_completion_async_with_options(&self, fileName: &HStringArg, args: &HStringArg, options: &ProcessLauncherOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RunToCompletionAsyncWithOptions)(self as *const _ as *mut _, fileName.get(), args.get(), options as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(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] { @@ -1510,16 +1510,16 @@ RT_INTERFACE!{interface IProcessMemoryReport(IProcessMemoryReportVtbl): IInspect fn get_TotalWorkingSetUsage(&self, out: *mut u64) -> HRESULT }} impl IProcessMemoryReport { - #[inline] pub unsafe fn get_private_working_set_usage(&self) -> Result { + #[inline] pub fn get_private_working_set_usage(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PrivateWorkingSetUsage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_total_working_set_usage(&self) -> Result { + }} + #[inline] pub fn get_total_working_set_usage(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TotalWorkingSetUsage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ProcessMemoryReport: IProcessMemoryReport} RT_ENUM! { enum ProcessorArchitecture: i32 { @@ -1527,76 +1527,76 @@ RT_ENUM! { enum ProcessorArchitecture: i32 { }} 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(&self, data: *mut super::foundation::collections::ValueSet) -> HRESULT + fn ReportCompleted(&self, data: *mut foundation::collections::ValueSet) -> HRESULT }} impl IProtocolForResultsOperation { - #[inline] pub unsafe fn report_completed(&self, data: &super::foundation::collections::ValueSet) -> Result<()> { + #[inline] pub fn report_completed(&self, data: &foundation::collections::ValueSet) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReportCompleted)(self as *const _ as *mut _, data as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ProtocolForResultsOperation: IProtocolForResultsOperation} RT_CLASS!{static class RemoteLauncher} impl RtActivatable for RemoteLauncher {} impl RemoteLauncher { - #[inline] pub fn launch_uri_async(remoteSystemConnectionRequest: &remotesystems::RemoteSystemConnectionRequest, uri: &super::foundation::Uri) -> Result>> { unsafe { + #[inline] pub fn launch_uri_async(remoteSystemConnectionRequest: &remotesystems::RemoteSystemConnectionRequest, uri: &foundation::Uri) -> Result>> { >::get_activation_factory().launch_uri_async(remoteSystemConnectionRequest, uri) - }} - #[inline] pub fn launch_uri_with_options_async(remoteSystemConnectionRequest: &remotesystems::RemoteSystemConnectionRequest, uri: &super::foundation::Uri, options: &RemoteLauncherOptions) -> Result>> { unsafe { + } + #[inline] pub fn launch_uri_with_options_async(remoteSystemConnectionRequest: &remotesystems::RemoteSystemConnectionRequest, uri: &foundation::Uri, options: &RemoteLauncherOptions) -> Result>> { >::get_activation_factory().launch_uri_with_options_async(remoteSystemConnectionRequest, uri, options) - }} - #[inline] pub fn launch_uri_with_data_async(remoteSystemConnectionRequest: &remotesystems::RemoteSystemConnectionRequest, uri: &super::foundation::Uri, options: &RemoteLauncherOptions, inputData: &super::foundation::collections::ValueSet) -> Result>> { unsafe { + } + #[inline] pub fn launch_uri_with_data_async(remoteSystemConnectionRequest: &remotesystems::RemoteSystemConnectionRequest, uri: &foundation::Uri, options: &RemoteLauncherOptions, inputData: &foundation::collections::ValueSet) -> Result>> { >::get_activation_factory().launch_uri_with_data_async(remoteSystemConnectionRequest, uri, options, inputData) - }} + } } DEFINE_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]) [CLSID_RemoteLauncher]); 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(&self, out: *mut *mut super::foundation::Uri) -> HRESULT, - fn put_FallbackUri(&self, value: *mut super::foundation::Uri) -> HRESULT, - fn get_PreferredAppIds(&self, out: *mut *mut super::foundation::collections::IVector) -> HRESULT + fn get_FallbackUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_FallbackUri(&self, value: *mut foundation::Uri) -> HRESULT, + fn get_PreferredAppIds(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IRemoteLauncherOptions { - #[inline] pub unsafe fn get_fallback_uri(&self) -> Result> { + #[inline] pub fn get_fallback_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FallbackUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_fallback_uri(&self, value: &super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_fallback_uri(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FallbackUri)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_preferred_app_ids(&self) -> Result>> { + }} + #[inline] pub fn get_preferred_app_ids(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PreferredAppIds)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RemoteLauncherOptions: IRemoteLauncherOptions} impl RtActivatable for RemoteLauncherOptions {} DEFINE_CLSID!(RemoteLauncherOptions(&[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,79,112,116,105,111,110,115,0]) [CLSID_RemoteLauncherOptions]); 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(&self, remoteSystemConnectionRequest: *mut remotesystems::RemoteSystemConnectionRequest, uri: *mut super::foundation::Uri, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn LaunchUriWithOptionsAsync(&self, remoteSystemConnectionRequest: *mut remotesystems::RemoteSystemConnectionRequest, uri: *mut super::foundation::Uri, options: *mut RemoteLauncherOptions, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn LaunchUriWithDataAsync(&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 + fn LaunchUriAsync(&self, remoteSystemConnectionRequest: *mut remotesystems::RemoteSystemConnectionRequest, uri: *mut foundation::Uri, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn LaunchUriWithOptionsAsync(&self, remoteSystemConnectionRequest: *mut remotesystems::RemoteSystemConnectionRequest, uri: *mut foundation::Uri, options: *mut RemoteLauncherOptions, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn LaunchUriWithDataAsync(&self, remoteSystemConnectionRequest: *mut remotesystems::RemoteSystemConnectionRequest, uri: *mut foundation::Uri, options: *mut RemoteLauncherOptions, inputData: *mut foundation::collections::ValueSet, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IRemoteLauncherStatics { - #[inline] pub unsafe fn launch_uri_async(&self, remoteSystemConnectionRequest: &remotesystems::RemoteSystemConnectionRequest, uri: &super::foundation::Uri) -> Result>> { + #[inline] pub fn launch_uri_async(&self, remoteSystemConnectionRequest: &remotesystems::RemoteSystemConnectionRequest, uri: &foundation::Uri) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LaunchUriAsync)(self as *const _ as *mut _, 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(&self, remoteSystemConnectionRequest: &remotesystems::RemoteSystemConnectionRequest, uri: &super::foundation::Uri, options: &RemoteLauncherOptions) -> Result>> { + }} + #[inline] pub fn launch_uri_with_options_async(&self, remoteSystemConnectionRequest: &remotesystems::RemoteSystemConnectionRequest, uri: &foundation::Uri, options: &RemoteLauncherOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LaunchUriWithOptionsAsync)(self as *const _ as *mut _, 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(&self, remoteSystemConnectionRequest: &remotesystems::RemoteSystemConnectionRequest, uri: &super::foundation::Uri, options: &RemoteLauncherOptions, inputData: &super::foundation::collections::ValueSet) -> Result>> { + }} + #[inline] pub fn launch_uri_with_data_async(&self, remoteSystemConnectionRequest: &remotesystems::RemoteSystemConnectionRequest, uri: &foundation::Uri, options: &RemoteLauncherOptions, inputData: &foundation::collections::ValueSet) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LaunchUriWithDataAsync)(self as *const _ as *mut _, 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_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, @@ -1608,163 +1608,163 @@ RT_CLASS!{static class ShutdownManager} impl RtActivatable for ShutdownManager {} impl RtActivatable for ShutdownManager {} impl ShutdownManager { - #[inline] pub fn begin_shutdown(shutdownKind: ShutdownKind, timeout: super::foundation::TimeSpan) -> Result<()> { unsafe { + #[inline] pub fn begin_shutdown(shutdownKind: ShutdownKind, timeout: foundation::TimeSpan) -> Result<()> { >::get_activation_factory().begin_shutdown(shutdownKind, timeout) - }} - #[inline] pub fn cancel_shutdown() -> Result<()> { unsafe { + } + #[inline] pub fn cancel_shutdown() -> Result<()> { >::get_activation_factory().cancel_shutdown() - }} - #[inline] pub fn is_power_state_supported(powerState: PowerState) -> Result { unsafe { + } + #[inline] pub fn is_power_state_supported(powerState: PowerState) -> Result { >::get_activation_factory().is_power_state_supported(powerState) - }} - #[inline] pub fn enter_power_state(powerState: PowerState) -> Result<()> { unsafe { + } + #[inline] pub fn enter_power_state(powerState: PowerState) -> Result<()> { >::get_activation_factory().enter_power_state(powerState) - }} - #[inline] pub fn enter_power_state_with_time_span(powerState: PowerState, wakeUpAfter: super::foundation::TimeSpan) -> Result<()> { unsafe { + } + #[inline] pub fn enter_power_state_with_time_span(powerState: PowerState, wakeUpAfter: foundation::TimeSpan) -> Result<()> { >::get_activation_factory().enter_power_state_with_time_span(powerState, wakeUpAfter) - }} + } } DEFINE_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]) [CLSID_ShutdownManager]); 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(&self, shutdownKind: ShutdownKind, timeout: super::foundation::TimeSpan) -> HRESULT, + fn BeginShutdown(&self, shutdownKind: ShutdownKind, timeout: foundation::TimeSpan) -> HRESULT, fn CancelShutdown(&self) -> HRESULT }} impl IShutdownManagerStatics { - #[inline] pub unsafe fn begin_shutdown(&self, shutdownKind: ShutdownKind, timeout: super::foundation::TimeSpan) -> Result<()> { + #[inline] pub fn begin_shutdown(&self, shutdownKind: ShutdownKind, timeout: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).BeginShutdown)(self as *const _ as *mut _, shutdownKind, timeout); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn cancel_shutdown(&self) -> Result<()> { + }} + #[inline] pub fn cancel_shutdown(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).CancelShutdown)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IShutdownManagerStatics2, 258580527, 39988, 17351, 168, 195, 112, 179, 10, 127, 117, 4); RT_INTERFACE!{static interface IShutdownManagerStatics2(IShutdownManagerStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IShutdownManagerStatics2] { fn IsPowerStateSupported(&self, powerState: PowerState, out: *mut bool) -> HRESULT, fn EnterPowerState(&self, powerState: PowerState) -> HRESULT, - fn EnterPowerStateWithTimeSpan(&self, powerState: PowerState, wakeUpAfter: super::foundation::TimeSpan) -> HRESULT + fn EnterPowerStateWithTimeSpan(&self, powerState: PowerState, wakeUpAfter: foundation::TimeSpan) -> HRESULT }} impl IShutdownManagerStatics2 { - #[inline] pub unsafe fn is_power_state_supported(&self, powerState: PowerState) -> Result { + #[inline] pub fn is_power_state_supported(&self, powerState: PowerState) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsPowerStateSupported)(self as *const _ as *mut _, powerState, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn enter_power_state(&self, powerState: PowerState) -> Result<()> { + }} + #[inline] pub fn enter_power_state(&self, powerState: PowerState) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).EnterPowerState)(self as *const _ as *mut _, powerState); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn enter_power_state_with_time_span(&self, powerState: PowerState, wakeUpAfter: super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn enter_power_state_with_time_span(&self, powerState: PowerState, wakeUpAfter: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).EnterPowerStateWithTimeSpan)(self as *const _ as *mut _, powerState, wakeUpAfter); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{static class TimeZoneSettings} impl RtActivatable for TimeZoneSettings {} impl TimeZoneSettings { - #[inline] pub fn get_current_time_zone_display_name() -> Result { unsafe { + #[inline] pub fn get_current_time_zone_display_name() -> Result { >::get_activation_factory().get_current_time_zone_display_name() - }} - #[inline] pub fn get_supported_time_zone_display_names() -> Result>> { unsafe { + } + #[inline] pub fn get_supported_time_zone_display_names() -> Result>>> { >::get_activation_factory().get_supported_time_zone_display_names() - }} - #[inline] pub fn get_can_change_time_zone() -> Result { unsafe { + } + #[inline] pub fn get_can_change_time_zone() -> Result { >::get_activation_factory().get_can_change_time_zone() - }} - #[inline] pub fn change_time_zone_by_display_name(timeZoneDisplayName: &HStringArg) -> Result<()> { unsafe { + } + #[inline] pub fn change_time_zone_by_display_name(timeZoneDisplayName: &HStringArg) -> Result<()> { >::get_activation_factory().change_time_zone_by_display_name(timeZoneDisplayName) - }} + } } DEFINE_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]) [CLSID_TimeZoneSettings]); 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(&self, out: *mut HSTRING) -> HRESULT, - fn get_SupportedTimeZoneDisplayNames(&self, out: *mut *mut super::foundation::collections::IVectorView) -> HRESULT, + fn get_SupportedTimeZoneDisplayNames(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_CanChangeTimeZone(&self, out: *mut bool) -> HRESULT, fn ChangeTimeZoneByDisplayName(&self, timeZoneDisplayName: HSTRING) -> HRESULT }} impl ITimeZoneSettingsStatics { - #[inline] pub unsafe fn get_current_time_zone_display_name(&self) -> Result { + #[inline] pub fn get_current_time_zone_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CurrentTimeZoneDisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_supported_time_zone_display_names(&self) -> Result>> { + }} + #[inline] pub fn get_supported_time_zone_display_names(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportedTimeZoneDisplayNames)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_change_time_zone(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_can_change_time_zone(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanChangeTimeZone)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn change_time_zone_by_display_name(&self, timeZoneDisplayName: &HStringArg) -> Result<()> { + }} + #[inline] pub fn change_time_zone_by_display_name(&self, timeZoneDisplayName: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ChangeTimeZoneByDisplayName)(self as *const _ as *mut _, timeZoneDisplayName.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut HSTRING) -> HRESULT, fn get_AuthenticationStatus(&self, out: *mut UserAuthenticationStatus) -> HRESULT, fn get_Type(&self, out: *mut UserType) -> HRESULT, - fn GetPropertyAsync(&self, value: HSTRING, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - fn GetPropertiesAsync(&self, values: *mut super::foundation::collections::IVectorView, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn GetPictureAsync(&self, desiredSize: UserPictureSize, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + fn GetPropertyAsync(&self, value: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetPropertiesAsync(&self, values: *mut foundation::collections::IVectorView, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn GetPictureAsync(&self, desiredSize: UserPictureSize, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IUser { - #[inline] pub unsafe fn get_non_roamable_id(&self) -> Result { + #[inline] pub fn get_non_roamable_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NonRoamableId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_authentication_status(&self) -> Result { + }} + #[inline] pub fn get_authentication_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AuthenticationStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_type(&self) -> Result { + }} + #[inline] pub fn get_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Type)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_property_async(&self, value: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_property_async(&self, value: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPropertyAsync)(self as *const _ as *mut _, value.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties_async(&self, values: &super::foundation::collections::IVectorView) -> Result>> { + }} + #[inline] pub fn get_properties_async(&self, values: &foundation::collections::IVectorView) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPropertiesAsync)(self as *const _ as *mut _, 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(&self, desiredSize: UserPictureSize) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_picture_async(&self, desiredSize: UserPictureSize) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPictureAsync)(self as *const _ as *mut _, desiredSize, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class User: IUser} impl RtActivatable for User {} impl User { - #[inline] pub fn create_watcher() -> Result> { unsafe { + #[inline] pub fn create_watcher() -> Result>> { >::get_activation_factory().create_watcher() - }} - #[inline] pub fn find_all_async() -> Result>>> { unsafe { + } + #[inline] pub fn find_all_async() -> Result>>> { >::get_activation_factory().find_all_async() - }} - #[inline] pub fn find_all_async_by_type(type_: UserType) -> Result>>> { unsafe { + } + #[inline] pub fn find_all_async_by_type(type_: UserType) -> Result>>> { >::get_activation_factory().find_all_async_by_type(type_) - }} - #[inline] pub fn find_all_async_by_type_and_status(type_: UserType, status: UserAuthenticationStatus) -> Result>>> { unsafe { + } + #[inline] pub fn find_all_async_by_type_and_status(type_: UserType, status: UserAuthenticationStatus) -> Result>>> { >::get_activation_factory().find_all_async_by_type_and_status(type_, status) - }} - #[inline] pub fn get_from_id(nonRoamableId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn get_from_id(nonRoamableId: &HStringArg) -> Result>> { >::get_activation_factory().get_from_id(nonRoamableId) - }} + } } DEFINE_CLSID!(User(&[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,85,115,101,114,0]) [CLSID_User]); RT_ENUM! { enum UserAuthenticationStatus: i32 { @@ -1775,10 +1775,10 @@ RT_INTERFACE!{interface IUserAuthenticationStatusChangeDeferral(IUserAuthenticat fn Complete(&self) -> HRESULT }} impl IUserAuthenticationStatusChangeDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); 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); @@ -1789,26 +1789,26 @@ RT_INTERFACE!{interface IUserAuthenticationStatusChangingEventArgs(IUserAuthenti fn get_CurrentStatus(&self, out: *mut UserAuthenticationStatus) -> HRESULT }} impl IUserAuthenticationStatusChangingEventArgs { - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_user(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_User)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_new_status(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_new_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NewStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_status(&self) -> Result { + }} + #[inline] pub fn get_current_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CurrentStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class UserAuthenticationStatusChangingEventArgs: IUserAuthenticationStatusChangingEventArgs} DEFINE_IID!(IID_IUserChangedEventArgs, 140794332, 6342, 18651, 188, 153, 114, 79, 185, 32, 60, 204); @@ -1816,25 +1816,25 @@ RT_INTERFACE!{interface IUserChangedEventArgs(IUserChangedEventArgsVtbl): IInspe fn get_User(&self, out: *mut *mut User) -> HRESULT }} impl IUserChangedEventArgs { - #[inline] pub unsafe fn get_user(&self) -> Result> { + #[inline] pub fn get_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_User)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class UserChangedEventArgs: IUserChangedEventArgs} RT_CLASS!{static class UserDeviceAssociation} impl RtActivatable for UserDeviceAssociation {} impl UserDeviceAssociation { - #[inline] pub fn find_user_from_device_id(deviceId: &HStringArg) -> Result> { unsafe { + #[inline] pub fn find_user_from_device_id(deviceId: &HStringArg) -> Result>> { >::get_activation_factory().find_user_from_device_id(deviceId) - }} - #[inline] pub fn add_user_device_association_changed(handler: &super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_user_device_association_changed(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_user_device_association_changed(handler) - }} - #[inline] pub fn remove_user_device_association_changed(token: super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_user_device_association_changed(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_user_device_association_changed(token) - }} + } } DEFINE_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]) [CLSID_UserDeviceAssociation]); DEFINE_IID!(IID_IUserDeviceAssociationChangedEventArgs, 3172953964, 47965, 19835, 165, 240, 200, 205, 17, 163, 141, 66); @@ -1844,44 +1844,44 @@ RT_INTERFACE!{interface IUserDeviceAssociationChangedEventArgs(IUserDeviceAssoci fn get_OldUser(&self, out: *mut *mut User) -> HRESULT }} impl IUserDeviceAssociationChangedEventArgs { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_new_user(&self) -> Result> { + }} + #[inline] pub fn get_new_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NewUser)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_old_user(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_old_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OldUser)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class UserDeviceAssociationChangedEventArgs: IUserDeviceAssociationChangedEventArgs} 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(&self, deviceId: HSTRING, out: *mut *mut User) -> HRESULT, - fn add_UserDeviceAssociationChanged(&self, handler: *mut super::foundation::EventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_UserDeviceAssociationChanged(&self, token: super::foundation::EventRegistrationToken) -> HRESULT + fn add_UserDeviceAssociationChanged(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_UserDeviceAssociationChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IUserDeviceAssociationStatics { - #[inline] pub unsafe fn find_user_from_device_id(&self, deviceId: &HStringArg) -> Result> { + #[inline] pub fn find_user_from_device_id(&self, deviceId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindUserFromDeviceId)(self as *const _ as *mut _, deviceId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_user_device_association_changed(&self, handler: &super::foundation::EventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_user_device_association_changed(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_UserDeviceAssociationChanged)(self as *const _ as *mut _, 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(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_user_device_association_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_UserDeviceAssociationChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } 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] { @@ -1889,40 +1889,40 @@ RT_INTERFACE!{interface IUserPicker(IUserPickerVtbl): IInspectable(IInspectableV fn put_AllowGuestAccounts(&self, value: bool) -> HRESULT, fn get_SuggestedSelectedUser(&self, out: *mut *mut User) -> HRESULT, fn put_SuggestedSelectedUser(&self, value: *mut User) -> HRESULT, - fn PickSingleUserAsync(&self, out: *mut *mut super::foundation::IAsyncOperation) -> HRESULT + fn PickSingleUserAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IUserPicker { - #[inline] pub unsafe fn get_allow_guest_accounts(&self) -> Result { + #[inline] pub fn get_allow_guest_accounts(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AllowGuestAccounts)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_allow_guest_accounts(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_allow_guest_accounts(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AllowGuestAccounts)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_suggested_selected_user(&self) -> Result> { + }} + #[inline] pub fn get_suggested_selected_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SuggestedSelectedUser)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_suggested_selected_user(&self, value: &User) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_suggested_selected_user(&self, value: &User) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SuggestedSelectedUser)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn pick_single_user_async(&self) -> Result>> { + }} + #[inline] pub fn pick_single_user_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PickSingleUserAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class UserPicker: IUserPicker} impl RtActivatable for UserPicker {} impl RtActivatable for UserPicker {} impl UserPicker { - #[inline] pub fn is_supported() -> Result { unsafe { + #[inline] pub fn is_supported() -> Result { >::get_activation_factory().is_supported() - }} + } } DEFINE_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]) [CLSID_UserPicker]); DEFINE_IID!(IID_IUserPickerStatics, 3727855836, 32371, 19958, 161, 174, 77, 126, 202, 130, 180, 13); @@ -1930,11 +1930,11 @@ RT_INTERFACE!{static interface IUserPickerStatics(IUserPickerStaticsVtbl): IInsp fn IsSupported(&self, out: *mut bool) -> HRESULT }} impl IUserPickerStatics { - #[inline] pub unsafe fn is_supported(&self) -> Result { + #[inline] pub fn is_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum UserPictureSize: i32 { Size64x64 (UserPictureSize_Size64x64) = 0, Size208x208 (UserPictureSize_Size208x208) = 1, Size424x424 (UserPictureSize_Size424x424) = 2, Size1080x1080 (UserPictureSize_Size1080x1080) = 3, @@ -1942,37 +1942,37 @@ RT_ENUM! { enum UserPictureSize: i32 { 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(&self, out: *mut *mut UserWatcher) -> HRESULT, - fn FindAllAsync(&self, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, - fn FindAllAsyncByType(&self, type_: UserType, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, - fn FindAllAsyncByTypeAndStatus(&self, type_: UserType, status: UserAuthenticationStatus, out: *mut *mut super::foundation::IAsyncOperation>) -> HRESULT, + fn FindAllAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn FindAllAsyncByType(&self, type_: UserType, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn FindAllAsyncByTypeAndStatus(&self, type_: UserType, status: UserAuthenticationStatus, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, fn GetFromId(&self, nonRoamableId: HSTRING, out: *mut *mut User) -> HRESULT }} impl IUserStatics { - #[inline] pub unsafe fn create_watcher(&self) -> Result> { + #[inline] pub fn create_watcher(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWatcher)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_all_async(&self) -> Result>>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn find_all_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_all_async_by_type(&self, type_: UserType) -> Result>>> { + }} + #[inline] pub fn find_all_async_by_type(&self, type_: UserType) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllAsyncByType)(self as *const _ as *mut _, 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(&self, type_: UserType, status: UserAuthenticationStatus) -> Result>>> { + }} + #[inline] pub fn find_all_async_by_type_and_status(&self, type_: UserType, status: UserAuthenticationStatus) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllAsyncByTypeAndStatus)(self as *const _ as *mut _, type_, status, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_from_id(&self, nonRoamableId: &HStringArg) -> Result> { + }} + #[inline] pub fn get_from_id(&self, nonRoamableId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFromId)(self as *const _ as *mut _, nonRoamableId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum UserType: i32 { LocalUser (UserType_LocalUser) = 0, RemoteUser (UserType_RemoteUser) = 1, LocalGuest (UserType_LocalGuest) = 2, RemoteGuest (UserType_RemoteGuest) = 3, @@ -1982,98 +1982,98 @@ RT_INTERFACE!{interface IUserWatcher(IUserWatcherVtbl): IInspectable(IInspectabl fn get_Status(&self, out: *mut UserWatcherStatus) -> HRESULT, fn Start(&self) -> HRESULT, fn Stop(&self) -> HRESULT, - fn add_Added(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Added(&self, token: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Removed(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Removed(&self, token: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Updated(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Updated(&self, token: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_AuthenticationStatusChanged(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AuthenticationStatusChanged(&self, token: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_AuthenticationStatusChanging(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AuthenticationStatusChanging(&self, token: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_EnumerationCompleted(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_EnumerationCompleted(&self, token: super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Stopped(&self, handler: *mut super::foundation::TypedEventHandler, out: *mut super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Stopped(&self, token: super::foundation::EventRegistrationToken) -> HRESULT + fn add_Added(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Added(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Removed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Removed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Updated(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Updated(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_AuthenticationStatusChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AuthenticationStatusChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_AuthenticationStatusChanging(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AuthenticationStatusChanging(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_EnumerationCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnumerationCompleted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Stopped(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Stopped(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IUserWatcher { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_added(&self, handler: &super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_added(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Added)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_added(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_added(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Added)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_removed(&self, handler: &super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_removed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Removed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_removed(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_removed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Removed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_updated(&self, handler: &super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_updated(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Updated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_updated(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_updated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Updated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_authentication_status_changed(&self, handler: &super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_authentication_status_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AuthenticationStatusChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_authentication_status_changed(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_authentication_status_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AuthenticationStatusChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_authentication_status_changing(&self, handler: &super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_authentication_status_changing(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AuthenticationStatusChanging)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_authentication_status_changing(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_authentication_status_changing(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AuthenticationStatusChanging)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_enumeration_completed(&self, handler: &super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_enumeration_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_EnumerationCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_enumeration_completed(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_enumeration_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_EnumerationCompleted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_stopped(&self, handler: &super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_stopped(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Stopped)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_stopped(&self, token: super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_stopped(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Stopped)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class UserWatcher: IUserWatcher} RT_ENUM! { enum UserWatcherStatus: i32 { @@ -2094,12 +2094,12 @@ RT_CLASS!{static class AdvertisingManager} impl RtActivatable for AdvertisingManager {} impl RtActivatable for AdvertisingManager {} impl AdvertisingManager { - #[inline] pub fn get_advertising_id() -> Result { unsafe { + #[inline] pub fn get_advertising_id() -> Result { >::get_activation_factory().get_advertising_id() - }} - #[inline] pub fn get_for_user(user: &super::User) -> Result> { unsafe { + } + #[inline] pub fn get_for_user(user: &super::User) -> Result>> { >::get_activation_factory().get_for_user(user) - }} + } } DEFINE_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]) [CLSID_AdvertisingManager]); DEFINE_IID!(IID_IAdvertisingManagerForUser, 2458645456, 53116, 19120, 167, 220, 109, 197, 188, 212, 66, 82); @@ -2108,16 +2108,16 @@ RT_INTERFACE!{interface IAdvertisingManagerForUser(IAdvertisingManagerForUserVtb fn get_User(&self, out: *mut *mut super::User) -> HRESULT }} impl IAdvertisingManagerForUser { - #[inline] pub unsafe fn get_advertising_id(&self) -> Result { + #[inline] pub fn get_advertising_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AdvertisingId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_user(&self) -> Result> { + }} + #[inline] pub fn get_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_User)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AdvertisingManagerForUser: IAdvertisingManagerForUser} DEFINE_IID!(IID_IAdvertisingManagerStatics, 2916304524, 41587, 18635, 179, 70, 53, 68, 82, 45, 85, 129); @@ -2125,22 +2125,22 @@ RT_INTERFACE!{static interface IAdvertisingManagerStatics(IAdvertisingManagerSta fn get_AdvertisingId(&self, out: *mut HSTRING) -> HRESULT }} impl IAdvertisingManagerStatics { - #[inline] pub unsafe fn get_advertising_id(&self) -> Result { + #[inline] pub fn get_advertising_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AdvertisingId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::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(&self, user: *mut super::User, out: *mut *mut AdvertisingManagerForUser) -> HRESULT }} impl IAdvertisingManagerStatics2 { - #[inline] pub unsafe fn get_for_user(&self, user: &super::User) -> Result> { + #[inline] pub fn get_for_user(&self, user: &super::User) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForUser)(self as *const _ as *mut _, user as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IDiagnosticsSettings, 3857312973, 10001, 17632, 151, 60, 73, 29, 120, 4, 141, 36); RT_INTERFACE!{interface IDiagnosticsSettings(IDiagnosticsSettingsVtbl): IInspectable(IInspectableVtbl) [IID_IDiagnosticsSettings] { @@ -2148,26 +2148,26 @@ RT_INTERFACE!{interface IDiagnosticsSettings(IDiagnosticsSettingsVtbl): IInspect fn get_User(&self, out: *mut *mut super::User) -> HRESULT }} impl IDiagnosticsSettings { - #[inline] pub unsafe fn get_can_use_diagnostics_to_tailor_experiences(&self) -> Result { + #[inline] pub fn get_can_use_diagnostics_to_tailor_experiences(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanUseDiagnosticsToTailorExperiences)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_user(&self) -> Result> { + }} + #[inline] pub fn get_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_User)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DiagnosticsSettings: IDiagnosticsSettings} impl RtActivatable for DiagnosticsSettings {} impl DiagnosticsSettings { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} - #[inline] pub fn get_for_user(user: &super::User) -> Result> { unsafe { + } + #[inline] pub fn get_for_user(user: &super::User) -> Result>> { >::get_activation_factory().get_for_user(user) - }} + } } DEFINE_CLSID!(DiagnosticsSettings(&[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,68,105,97,103,110,111,115,116,105,99,115,83,101,116,116,105,110,103,115,0]) [CLSID_DiagnosticsSettings]); DEFINE_IID!(IID_IDiagnosticsSettingsStatics, 1926424591, 21392, 18323, 153, 11, 60, 204, 125, 106, 201, 200); @@ -2176,16 +2176,16 @@ RT_INTERFACE!{static interface IDiagnosticsSettingsStatics(IDiagnosticsSettingsS fn GetForUser(&self, user: *mut super::User, out: *mut *mut DiagnosticsSettings) -> HRESULT }} impl IDiagnosticsSettingsStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_for_user(&self, user: &super::User) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_for_user(&self, user: &super::User) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForUser)(self as *const _ as *mut _, user as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IFirstSignInSettings, 1049907539, 14942, 17710, 166, 1, 245, 186, 173, 42, 72, 112); RT_INTERFACE!{interface IFirstSignInSettings(IFirstSignInSettingsVtbl): IInspectable(IInspectableVtbl) [IID_IFirstSignInSettings] { @@ -2194,9 +2194,9 @@ RT_INTERFACE!{interface IFirstSignInSettings(IFirstSignInSettingsVtbl): IInspect RT_CLASS!{class FirstSignInSettings: IFirstSignInSettings} impl RtActivatable for FirstSignInSettings {} impl FirstSignInSettings { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} + } } DEFINE_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]) [CLSID_FirstSignInSettings]); DEFINE_IID!(IID_IFirstSignInSettingsStatics, 484544271, 7233, 20128, 183, 162, 111, 12, 28, 126, 132, 56); @@ -2204,169 +2204,169 @@ RT_INTERFACE!{static interface IFirstSignInSettingsStatics(IFirstSignInSettingsS fn GetDefault(&self, out: *mut *mut FirstSignInSettings) -> HRESULT }} impl IFirstSignInSettingsStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{static class GlobalizationPreferences} impl RtActivatable for GlobalizationPreferences {} impl RtActivatable for GlobalizationPreferences {} impl GlobalizationPreferences { - #[inline] pub fn get_calendars() -> Result>> { unsafe { + #[inline] pub fn get_calendars() -> Result>>> { >::get_activation_factory().get_calendars() - }} - #[inline] pub fn get_clocks() -> Result>> { unsafe { + } + #[inline] pub fn get_clocks() -> Result>>> { >::get_activation_factory().get_clocks() - }} - #[inline] pub fn get_currencies() -> Result>> { unsafe { + } + #[inline] pub fn get_currencies() -> Result>>> { >::get_activation_factory().get_currencies() - }} - #[inline] pub fn get_languages() -> Result>> { unsafe { + } + #[inline] pub fn get_languages() -> Result>>> { >::get_activation_factory().get_languages() - }} - #[inline] pub fn get_home_geographic_region() -> Result { unsafe { + } + #[inline] pub fn get_home_geographic_region() -> Result { >::get_activation_factory().get_home_geographic_region() - }} - #[cfg(feature="windows-globalization")] #[inline] pub fn get_week_starts_on() -> Result { unsafe { + } + #[cfg(feature="windows-globalization")] #[inline] pub fn get_week_starts_on() -> Result { >::get_activation_factory().get_week_starts_on() - }} - #[inline] pub fn try_set_home_geographic_region(region: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn try_set_home_geographic_region(region: &HStringArg) -> Result { >::get_activation_factory().try_set_home_geographic_region(region) - }} - #[inline] pub fn try_set_languages(languageTags: &super::super::foundation::collections::IIterable) -> Result { unsafe { + } + #[inline] pub fn try_set_languages(languageTags: &foundation::collections::IIterable) -> Result { >::get_activation_factory().try_set_languages(languageTags) - }} + } } DEFINE_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]) [CLSID_GlobalizationPreferences]); 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_Clocks(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_Currencies(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_Languages(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn get_Calendars(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_Clocks(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_Currencies(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_Languages(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_HomeGeographicRegion(&self, out: *mut HSTRING) -> HRESULT, #[cfg(feature="windows-globalization")] fn get_WeekStartsOn(&self, out: *mut super::super::globalization::DayOfWeek) -> HRESULT }} impl IGlobalizationPreferencesStatics { - #[inline] pub unsafe fn get_calendars(&self) -> Result>> { + #[inline] pub fn get_calendars(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Calendars)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_clocks(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_clocks(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Clocks)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_currencies(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_currencies(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Currencies)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_languages(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_languages(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Languages)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_home_geographic_region(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_home_geographic_region(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HomeGeographicRegion)(self as *const _ as *mut _, &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(&self) -> Result { + }} + #[cfg(feature="windows-globalization")] #[inline] pub fn get_week_starts_on(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_WeekStartsOn)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IGlobalizationPreferencesStatics2, 4241393137, 17152, 19664, 156, 172, 26, 142, 123, 126, 24, 244); RT_INTERFACE!{static interface IGlobalizationPreferencesStatics2(IGlobalizationPreferencesStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IGlobalizationPreferencesStatics2] { fn TrySetHomeGeographicRegion(&self, region: HSTRING, out: *mut bool) -> HRESULT, - fn TrySetLanguages(&self, languageTags: *mut super::super::foundation::collections::IIterable, out: *mut bool) -> HRESULT + fn TrySetLanguages(&self, languageTags: *mut foundation::collections::IIterable, out: *mut bool) -> HRESULT }} impl IGlobalizationPreferencesStatics2 { - #[inline] pub unsafe fn try_set_home_geographic_region(&self, region: &HStringArg) -> Result { + #[inline] pub fn try_set_home_geographic_region(&self, region: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TrySetHomeGeographicRegion)(self as *const _ as *mut _, region.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn try_set_languages(&self, languageTags: &super::super::foundation::collections::IIterable) -> Result { + }} + #[inline] pub fn try_set_languages(&self, languageTags: &foundation::collections::IIterable) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TrySetLanguages)(self as *const _ as *mut _, languageTags as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{static class LockScreen} impl RtActivatable for LockScreen {} impl RtActivatable for LockScreen {} impl LockScreen { - #[inline] pub fn request_set_image_feed_async(syndicationFeedUri: &super::super::foundation::Uri) -> Result>> { unsafe { + #[inline] pub fn request_set_image_feed_async(syndicationFeedUri: &foundation::Uri) -> Result>> { >::get_activation_factory().request_set_image_feed_async(syndicationFeedUri) - }} - #[inline] pub fn try_remove_image_feed() -> Result { unsafe { + } + #[inline] pub fn try_remove_image_feed() -> Result { >::get_activation_factory().try_remove_image_feed() - }} - #[inline] pub fn get_original_image_file() -> Result> { unsafe { + } + #[inline] pub fn get_original_image_file() -> Result>> { >::get_activation_factory().get_original_image_file() - }} - #[cfg(feature="windows-storage")] #[inline] pub fn get_image_stream() -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn get_image_stream() -> Result>> { >::get_activation_factory().get_image_stream() - }} - #[cfg(feature="windows-storage")] #[inline] pub fn set_image_file_async(value: &super::super::storage::IStorageFile) -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn set_image_file_async(value: &super::super::storage::IStorageFile) -> Result> { >::get_activation_factory().set_image_file_async(value) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn set_image_stream_async(value: &super::super::storage::streams::IRandomAccessStream) -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn set_image_stream_async(value: &super::super::storage::streams::IRandomAccessStream) -> Result> { >::get_activation_factory().set_image_stream_async(value) - }} + } } DEFINE_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]) [CLSID_LockScreen]); 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(&self, syndicationFeedUri: *mut super::super::foundation::Uri, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn RequestSetImageFeedAsync(&self, syndicationFeedUri: *mut foundation::Uri, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn TryRemoveImageFeed(&self, out: *mut bool) -> HRESULT }} impl ILockScreenImageFeedStatics { - #[inline] pub unsafe fn request_set_image_feed_async(&self, syndicationFeedUri: &super::super::foundation::Uri) -> Result>> { + #[inline] pub fn request_set_image_feed_async(&self, syndicationFeedUri: &foundation::Uri) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestSetImageFeedAsync)(self as *const _ as *mut _, 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(&self) -> Result { + }} + #[inline] pub fn try_remove_image_feed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TryRemoveImageFeed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn get_OriginalImageFile(&self, out: *mut *mut foundation::Uri) -> HRESULT, #[cfg(feature="windows-storage")] fn GetImageStream(&self, out: *mut *mut super::super::storage::streams::IRandomAccessStream) -> HRESULT, - #[cfg(feature="windows-storage")] fn SetImageFileAsync(&self, value: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - #[cfg(feature="windows-storage")] fn SetImageStreamAsync(&self, value: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + #[cfg(feature="windows-storage")] fn SetImageFileAsync(&self, value: *mut super::super::storage::IStorageFile, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + #[cfg(feature="windows-storage")] fn SetImageStreamAsync(&self, value: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl ILockScreenStatics { - #[inline] pub unsafe fn get_original_image_file(&self) -> Result> { + #[inline] pub fn get_original_image_file(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OriginalImageFile)(self 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_image_stream(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_image_stream(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetImageStream)(self 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_file_async(&self, value: &super::super::storage::IStorageFile) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_image_file_async(&self, value: &super::super::storage::IStorageFile) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetImageFileAsync)(self as *const _ as *mut _, 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(&self, value: &super::super::storage::streams::IRandomAccessStream) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_image_stream_async(&self, value: &super::super::storage::streams::IRandomAccessStream) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetImageStreamAsync)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -2377,51 +2377,51 @@ RT_ENUM! { enum SetImageFeedResult: i32 { RT_CLASS!{static class UserInformation} impl RtActivatable for UserInformation {} impl UserInformation { - #[inline] pub fn get_account_picture_change_enabled() -> Result { unsafe { + #[inline] pub fn get_account_picture_change_enabled() -> Result { >::get_activation_factory().get_account_picture_change_enabled() - }} - #[inline] pub fn get_name_access_allowed() -> Result { unsafe { + } + #[inline] pub fn get_name_access_allowed() -> Result { >::get_activation_factory().get_name_access_allowed() - }} - #[cfg(feature="windows-storage")] #[inline] pub fn get_account_picture(kind: AccountPictureKind) -> Result> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn get_account_picture(kind: AccountPictureKind) -> Result>> { >::get_activation_factory().get_account_picture(kind) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn set_account_picture_async(image: &super::super::storage::IStorageFile) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn set_account_picture_async(image: &super::super::storage::IStorageFile) -> Result>> { >::get_activation_factory().set_account_picture_async(image) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn set_account_pictures_async(smallImage: &super::super::storage::IStorageFile, largeImage: &super::super::storage::IStorageFile, video: &super::super::storage::IStorageFile) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn set_account_pictures_async(smallImage: &super::super::storage::IStorageFile, largeImage: &super::super::storage::IStorageFile, video: &super::super::storage::IStorageFile) -> Result>> { >::get_activation_factory().set_account_pictures_async(smallImage, largeImage, video) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn set_account_picture_from_stream_async(image: &super::super::storage::streams::IRandomAccessStream) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn set_account_picture_from_stream_async(image: &super::super::storage::streams::IRandomAccessStream) -> Result>> { >::get_activation_factory().set_account_picture_from_stream_async(image) - }} - #[cfg(feature="windows-storage")] #[inline] pub fn set_account_pictures_from_streams_async(smallImage: &super::super::storage::streams::IRandomAccessStream, largeImage: &super::super::storage::streams::IRandomAccessStream, video: &super::super::storage::streams::IRandomAccessStream) -> Result>> { unsafe { + } + #[cfg(feature="windows-storage")] #[inline] pub fn set_account_pictures_from_streams_async(smallImage: &super::super::storage::streams::IRandomAccessStream, largeImage: &super::super::storage::streams::IRandomAccessStream, video: &super::super::storage::streams::IRandomAccessStream) -> Result>> { >::get_activation_factory().set_account_pictures_from_streams_async(smallImage, largeImage, video) - }} - #[inline] pub fn add_account_picture_changed(changeHandler: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_account_picture_changed(changeHandler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_account_picture_changed(changeHandler) - }} - #[inline] pub fn remove_account_picture_changed(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_account_picture_changed(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_account_picture_changed(token) - }} - #[inline] pub fn get_display_name_async() -> Result>> { unsafe { + } + #[inline] pub fn get_display_name_async() -> Result>> { >::get_activation_factory().get_display_name_async() - }} - #[inline] pub fn get_first_name_async() -> Result>> { unsafe { + } + #[inline] pub fn get_first_name_async() -> Result>> { >::get_activation_factory().get_first_name_async() - }} - #[inline] pub fn get_last_name_async() -> Result>> { unsafe { + } + #[inline] pub fn get_last_name_async() -> Result>> { >::get_activation_factory().get_last_name_async() - }} - #[inline] pub fn get_principal_name_async() -> Result>> { unsafe { + } + #[inline] pub fn get_principal_name_async() -> Result>> { >::get_activation_factory().get_principal_name_async() - }} - #[inline] pub fn get_session_initiation_protocol_uri_async() -> Result>> { unsafe { + } + #[inline] pub fn get_session_initiation_protocol_uri_async() -> Result>> { >::get_activation_factory().get_session_initiation_protocol_uri_async() - }} - #[inline] pub fn get_domain_name_async() -> Result>> { unsafe { + } + #[inline] pub fn get_domain_name_async() -> Result>> { >::get_activation_factory().get_domain_name_async() - }} + } } DEFINE_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]) [CLSID_UserInformation]); DEFINE_IID!(IID_IUserInformationStatics, 2012457232, 18682, 18588, 147, 78, 42, 232, 91, 168, 247, 114); @@ -2431,124 +2431,124 @@ RT_INTERFACE!{static interface IUserInformationStatics(IUserInformationStaticsVt #[cfg(not(feature="windows-storage"))] fn __Dummy2(&self) -> (), #[cfg(feature="windows-storage")] fn GetAccountPicture(&self, kind: AccountPictureKind, out: *mut *mut super::super::storage::IStorageFile) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy3(&self) -> (), - #[cfg(feature="windows-storage")] fn SetAccountPictureAsync(&self, image: *mut super::super::storage::IStorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn SetAccountPictureAsync(&self, image: *mut super::super::storage::IStorageFile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy4(&self) -> (), - #[cfg(feature="windows-storage")] fn SetAccountPicturesAsync(&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(feature="windows-storage")] fn SetAccountPicturesAsync(&self, smallImage: *mut super::super::storage::IStorageFile, largeImage: *mut super::super::storage::IStorageFile, video: *mut super::super::storage::IStorageFile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy5(&self) -> (), - #[cfg(feature="windows-storage")] fn SetAccountPictureFromStreamAsync(&self, image: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn SetAccountPictureFromStreamAsync(&self, image: *mut super::super::storage::streams::IRandomAccessStream, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy6(&self) -> (), - #[cfg(feature="windows-storage")] fn SetAccountPicturesFromStreamsAsync(&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(&self, changeHandler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AccountPictureChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn GetDisplayNameAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetFirstNameAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetLastNameAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetPrincipalNameAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetSessionInitiationProtocolUriAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetDomainNameAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn SetAccountPicturesFromStreamsAsync(&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 foundation::IAsyncOperation) -> HRESULT, + fn add_AccountPictureChanged(&self, changeHandler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AccountPictureChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn GetDisplayNameAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetFirstNameAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetLastNameAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetPrincipalNameAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetSessionInitiationProtocolUriAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetDomainNameAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IUserInformationStatics { - #[inline] pub unsafe fn get_account_picture_change_enabled(&self) -> Result { + #[inline] pub fn get_account_picture_change_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AccountPictureChangeEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_name_access_allowed(&self) -> Result { + }} + #[inline] pub fn get_name_access_allowed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NameAccessAllowed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_account_picture(&self, kind: AccountPictureKind) -> Result> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_account_picture(&self, kind: AccountPictureKind) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAccountPicture)(self as *const _ as *mut _, 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(&self, image: &super::super::storage::IStorageFile) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_account_picture_async(&self, image: &super::super::storage::IStorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetAccountPictureAsync)(self as *const _ as *mut _, 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(&self, smallImage: &super::super::storage::IStorageFile, largeImage: &super::super::storage::IStorageFile, video: &super::super::storage::IStorageFile) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_account_pictures_async(&self, smallImage: &super::super::storage::IStorageFile, largeImage: &super::super::storage::IStorageFile, video: &super::super::storage::IStorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetAccountPicturesAsync)(self as *const _ as *mut _, 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(&self, image: &super::super::storage::streams::IRandomAccessStream) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_account_picture_from_stream_async(&self, image: &super::super::storage::streams::IRandomAccessStream) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetAccountPictureFromStreamAsync)(self as *const _ as *mut _, 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(&self, smallImage: &super::super::storage::streams::IRandomAccessStream, largeImage: &super::super::storage::streams::IRandomAccessStream, video: &super::super::storage::streams::IRandomAccessStream) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_account_pictures_from_streams_async(&self, smallImage: &super::super::storage::streams::IRandomAccessStream, largeImage: &super::super::storage::streams::IRandomAccessStream, video: &super::super::storage::streams::IRandomAccessStream) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SetAccountPicturesFromStreamsAsync)(self as *const _ as *mut _, 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(&self, changeHandler: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_account_picture_changed(&self, changeHandler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AccountPictureChanged)(self as *const _ as *mut _, changeHandler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_account_picture_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_account_picture_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AccountPictureChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name_async(&self) -> Result>> { + }} + #[inline] pub fn get_display_name_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDisplayNameAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_first_name_async(&self) -> Result>> { + }} + #[inline] pub fn get_first_name_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetFirstNameAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_last_name_async(&self) -> Result>> { + }} + #[inline] pub fn get_last_name_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetLastNameAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_principal_name_async(&self) -> Result>> { + }} + #[inline] pub fn get_principal_name_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPrincipalNameAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_session_initiation_protocol_uri_async(&self) -> Result>> { + }} + #[inline] pub fn get_session_initiation_protocol_uri_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSessionInitiationProtocolUriAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_domain_name_async(&self) -> Result>> { + }} + #[inline] pub fn get_domain_name_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDomainNameAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, imageFile: *mut super::super::storage::StorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-storage")] fn TrySetWallpaperImageAsync(&self, imageFile: *mut super::super::storage::StorageFile, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-storage")] fn TrySetLockScreenImageAsync(&self, imageFile: *mut super::super::storage::StorageFile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-storage")] fn TrySetWallpaperImageAsync(&self, imageFile: *mut super::super::storage::StorageFile, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IUserProfilePersonalizationSettings { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn try_set_lock_screen_image_async(&self, imageFile: &super::super::storage::StorageFile) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn try_set_lock_screen_image_async(&self, imageFile: &super::super::storage::StorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TrySetLockScreenImageAsync)(self as *const _ as *mut _, 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(&self, imageFile: &super::super::storage::StorageFile) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn try_set_wallpaper_image_async(&self, imageFile: &super::super::storage::StorageFile) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TrySetWallpaperImageAsync)(self as *const _ as *mut _, imageFile as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class UserProfilePersonalizationSettings: IUserProfilePersonalizationSettings} impl RtActivatable for UserProfilePersonalizationSettings {} impl UserProfilePersonalizationSettings { - #[inline] pub fn get_current() -> Result> { unsafe { + #[inline] pub fn get_current() -> Result>> { >::get_activation_factory().get_current() - }} - #[inline] pub fn is_supported() -> Result { unsafe { + } + #[inline] pub fn is_supported() -> Result { >::get_activation_factory().is_supported() - }} + } } DEFINE_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]) [CLSID_UserProfilePersonalizationSettings]); DEFINE_IID!(IID_IUserProfilePersonalizationSettingsStatics, 2444015681, 20535, 17739, 152, 131, 187, 119, 45, 8, 221, 22); @@ -2557,16 +2557,16 @@ RT_INTERFACE!{static interface IUserProfilePersonalizationSettingsStatics(IUserP fn IsSupported(&self, out: *mut bool) -> HRESULT }} impl IUserProfilePersonalizationSettingsStatics { - #[inline] pub unsafe fn get_current(&self) -> Result> { + #[inline] pub fn get_current(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Current)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn is_supported(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn is_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } } // Windows.System.UserProfile pub mod profile { // Windows.System.Profile @@ -2574,12 +2574,12 @@ use ::prelude::*; RT_CLASS!{static class AnalyticsInfo} impl RtActivatable for AnalyticsInfo {} impl AnalyticsInfo { - #[inline] pub fn get_version_info() -> Result> { unsafe { + #[inline] pub fn get_version_info() -> Result>> { >::get_activation_factory().get_version_info() - }} - #[inline] pub fn get_device_form() -> Result { unsafe { + } + #[inline] pub fn get_device_form() -> Result { >::get_activation_factory().get_device_form() - }} + } } DEFINE_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]) [CLSID_AnalyticsInfo]); DEFINE_IID!(IID_IAnalyticsInfoStatics, 492757094, 6285, 23465, 67, 135, 172, 174, 176, 231, 227, 5); @@ -2588,16 +2588,16 @@ RT_INTERFACE!{static interface IAnalyticsInfoStatics(IAnalyticsInfoStaticsVtbl): fn get_DeviceForm(&self, out: *mut HSTRING) -> HRESULT }} impl IAnalyticsInfoStatics { - #[inline] pub unsafe fn get_version_info(&self) -> Result> { + #[inline] pub fn get_version_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VersionInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_form(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_device_form(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceForm)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IAnalyticsVersionInfo, 2455843000, 39253, 19572, 189, 193, 124, 208, 222, 207, 155, 3); RT_INTERFACE!{interface IAnalyticsVersionInfo(IAnalyticsVersionInfoVtbl): IInspectable(IInspectableVtbl) [IID_IAnalyticsVersionInfo] { @@ -2605,24 +2605,24 @@ RT_INTERFACE!{interface IAnalyticsVersionInfo(IAnalyticsVersionInfoVtbl): IInspe fn get_DeviceFamilyVersion(&self, out: *mut HSTRING) -> HRESULT }} impl IAnalyticsVersionInfo { - #[inline] pub unsafe fn get_device_family(&self) -> Result { + #[inline] pub fn get_device_family(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceFamily)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_family_version(&self) -> Result { + }} + #[inline] pub fn get_device_family_version(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceFamilyVersion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class AnalyticsVersionInfo: IAnalyticsVersionInfo} RT_CLASS!{static class EducationSettings} impl RtActivatable for EducationSettings {} impl EducationSettings { - #[inline] pub fn get_is_education_environment() -> Result { unsafe { + #[inline] pub fn get_is_education_environment() -> Result { >::get_activation_factory().get_is_education_environment() - }} + } } DEFINE_CLSID!(EducationSettings(&[87,105,110,100,111,119,115,46,83,121,115,116,101,109,46,80,114,111,102,105,108,101,46,69,100,117,99,97,116,105,111,110,83,101,116,116,105,110,103,115,0]) [CLSID_EducationSettings]); DEFINE_IID!(IID_IEducationSettingsStatics, 4233359599, 19774, 19987, 155, 35, 80, 95, 77, 9, 30, 146); @@ -2630,18 +2630,18 @@ RT_INTERFACE!{static interface IEducationSettingsStatics(IEducationSettingsStati fn get_IsEducationEnvironment(&self, out: *mut bool) -> HRESULT }} impl IEducationSettingsStatics { - #[inline] pub unsafe fn get_is_education_environment(&self) -> Result { + #[inline] pub fn get_is_education_environment(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsEducationEnvironment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{static class HardwareIdentification} impl RtActivatable for HardwareIdentification {} impl HardwareIdentification { - #[cfg(feature="windows-storage")] #[inline] pub fn get_package_specific_token(nonce: &super::super::storage::streams::IBuffer) -> Result> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn get_package_specific_token(nonce: &super::super::storage::streams::IBuffer) -> Result>> { >::get_activation_factory().get_package_specific_token(nonce) - }} + } } DEFINE_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]) [CLSID_HardwareIdentification]); DEFINE_IID!(IID_IHardwareIdentificationStatics, 2534564064, 61808, 19010, 189, 85, 169, 0, 178, 18, 218, 226); @@ -2649,11 +2649,11 @@ RT_INTERFACE!{static interface IHardwareIdentificationStatics(IHardwareIdentific #[cfg(feature="windows-storage")] fn GetPackageSpecificToken(&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(&self, nonce: &super::super::storage::streams::IBuffer) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_package_specific_token(&self, nonce: &super::super::storage::streams::IBuffer) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetPackageSpecificToken)(self as *const _ as *mut _, nonce as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IHardwareToken, 687264960, 64274, 16548, 129, 103, 127, 78, 3, 210, 114, 76); RT_INTERFACE!{interface IHardwareToken(IHardwareTokenVtbl): IInspectable(IInspectableVtbl) [IID_IHardwareToken] { @@ -2662,92 +2662,92 @@ RT_INTERFACE!{interface IHardwareToken(IHardwareTokenVtbl): IInspectable(IInspec #[cfg(feature="windows-storage")] fn get_Certificate(&self, out: *mut *mut super::super::storage::streams::IBuffer) -> HRESULT }} impl IHardwareToken { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_id(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_id(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self 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_signature(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_signature(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Signature)(self 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_certificate(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_certificate(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Certificate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class HardwareToken: IHardwareToken} RT_CLASS!{static class KnownRetailInfoProperties} impl RtActivatable for KnownRetailInfoProperties {} impl KnownRetailInfoProperties { - #[inline] pub fn get_retail_access_code() -> Result { unsafe { + #[inline] pub fn get_retail_access_code() -> Result { >::get_activation_factory().get_retail_access_code() - }} - #[inline] pub fn get_manufacturer_name() -> Result { unsafe { + } + #[inline] pub fn get_manufacturer_name() -> Result { >::get_activation_factory().get_manufacturer_name() - }} - #[inline] pub fn get_model_name() -> Result { unsafe { + } + #[inline] pub fn get_model_name() -> Result { >::get_activation_factory().get_model_name() - }} - #[inline] pub fn get_display_model_name() -> Result { unsafe { + } + #[inline] pub fn get_display_model_name() -> Result { >::get_activation_factory().get_display_model_name() - }} - #[inline] pub fn get_price() -> Result { unsafe { + } + #[inline] pub fn get_price() -> Result { >::get_activation_factory().get_price() - }} - #[inline] pub fn get_is_featured() -> Result { unsafe { + } + #[inline] pub fn get_is_featured() -> Result { >::get_activation_factory().get_is_featured() - }} - #[inline] pub fn get_form_factor() -> Result { unsafe { + } + #[inline] pub fn get_form_factor() -> Result { >::get_activation_factory().get_form_factor() - }} - #[inline] pub fn get_screen_size() -> Result { unsafe { + } + #[inline] pub fn get_screen_size() -> Result { >::get_activation_factory().get_screen_size() - }} - #[inline] pub fn get_weight() -> Result { unsafe { + } + #[inline] pub fn get_weight() -> Result { >::get_activation_factory().get_weight() - }} - #[inline] pub fn get_display_description() -> Result { unsafe { + } + #[inline] pub fn get_display_description() -> Result { >::get_activation_factory().get_display_description() - }} - #[inline] pub fn get_battery_life_description() -> Result { unsafe { + } + #[inline] pub fn get_battery_life_description() -> Result { >::get_activation_factory().get_battery_life_description() - }} - #[inline] pub fn get_processor_description() -> Result { unsafe { + } + #[inline] pub fn get_processor_description() -> Result { >::get_activation_factory().get_processor_description() - }} - #[inline] pub fn get_memory() -> Result { unsafe { + } + #[inline] pub fn get_memory() -> Result { >::get_activation_factory().get_memory() - }} - #[inline] pub fn get_storage_description() -> Result { unsafe { + } + #[inline] pub fn get_storage_description() -> Result { >::get_activation_factory().get_storage_description() - }} - #[inline] pub fn get_graphics_description() -> Result { unsafe { + } + #[inline] pub fn get_graphics_description() -> Result { >::get_activation_factory().get_graphics_description() - }} - #[inline] pub fn get_front_camera_description() -> Result { unsafe { + } + #[inline] pub fn get_front_camera_description() -> Result { >::get_activation_factory().get_front_camera_description() - }} - #[inline] pub fn get_rear_camera_description() -> Result { unsafe { + } + #[inline] pub fn get_rear_camera_description() -> Result { >::get_activation_factory().get_rear_camera_description() - }} - #[inline] pub fn get_has_nfc() -> Result { unsafe { + } + #[inline] pub fn get_has_nfc() -> Result { >::get_activation_factory().get_has_nfc() - }} - #[inline] pub fn get_has_sd_slot() -> Result { unsafe { + } + #[inline] pub fn get_has_sd_slot() -> Result { >::get_activation_factory().get_has_sd_slot() - }} - #[inline] pub fn get_has_optical_drive() -> Result { unsafe { + } + #[inline] pub fn get_has_optical_drive() -> Result { >::get_activation_factory().get_has_optical_drive() - }} - #[inline] pub fn get_is_office_installed() -> Result { unsafe { + } + #[inline] pub fn get_is_office_installed() -> Result { >::get_activation_factory().get_is_office_installed() - }} - #[inline] pub fn get_windows_edition() -> Result { unsafe { + } + #[inline] pub fn get_windows_edition() -> Result { >::get_activation_factory().get_windows_edition() - }} + } } DEFINE_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]) [CLSID_KnownRetailInfoProperties]); DEFINE_IID!(IID_IKnownRetailInfoPropertiesStatics, 2572620152, 20495, 18558, 142, 117, 41, 229, 81, 114, 135, 18); @@ -2776,116 +2776,116 @@ RT_INTERFACE!{static interface IKnownRetailInfoPropertiesStatics(IKnownRetailInf fn get_WindowsEdition(&self, out: *mut HSTRING) -> HRESULT }} impl IKnownRetailInfoPropertiesStatics { - #[inline] pub unsafe fn get_retail_access_code(&self) -> Result { + #[inline] pub fn get_retail_access_code(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RetailAccessCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_manufacturer_name(&self) -> Result { + }} + #[inline] pub fn get_manufacturer_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ManufacturerName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_model_name(&self) -> Result { + }} + #[inline] pub fn get_model_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ModelName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_model_name(&self) -> Result { + }} + #[inline] pub fn get_display_model_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayModelName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_price(&self) -> Result { + }} + #[inline] pub fn get_price(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Price)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_featured(&self) -> Result { + }} + #[inline] pub fn get_is_featured(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsFeatured)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_form_factor(&self) -> Result { + }} + #[inline] pub fn get_form_factor(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FormFactor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_screen_size(&self) -> Result { + }} + #[inline] pub fn get_screen_size(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ScreenSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_weight(&self) -> Result { + }} + #[inline] pub fn get_weight(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Weight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_description(&self) -> Result { + }} + #[inline] pub fn get_display_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayDescription)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_battery_life_description(&self) -> Result { + }} + #[inline] pub fn get_battery_life_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BatteryLifeDescription)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_processor_description(&self) -> Result { + }} + #[inline] pub fn get_processor_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProcessorDescription)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_memory(&self) -> Result { + }} + #[inline] pub fn get_memory(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Memory)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_storage_description(&self) -> Result { + }} + #[inline] pub fn get_storage_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StorageDescription)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_graphics_description(&self) -> Result { + }} + #[inline] pub fn get_graphics_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_GraphicsDescription)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_front_camera_description(&self) -> Result { + }} + #[inline] pub fn get_front_camera_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FrontCameraDescription)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rear_camera_description(&self) -> Result { + }} + #[inline] pub fn get_rear_camera_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RearCameraDescription)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_nfc(&self) -> Result { + }} + #[inline] pub fn get_has_nfc(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HasNfc)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_sd_slot(&self) -> Result { + }} + #[inline] pub fn get_has_sd_slot(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HasSdSlot)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_optical_drive(&self) -> Result { + }} + #[inline] pub fn get_has_optical_drive(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HasOpticalDrive)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_office_installed(&self) -> Result { + }} + #[inline] pub fn get_is_office_installed(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsOfficeInstalled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_windows_edition(&self) -> Result { + }} + #[inline] pub fn get_windows_edition(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WindowsEdition)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum PlatformDataCollectionLevel: i32 { Security (PlatformDataCollectionLevel_Security) = 0, Basic (PlatformDataCollectionLevel_Basic) = 1, Enhanced (PlatformDataCollectionLevel_Enhanced) = 2, Full (PlatformDataCollectionLevel_Full) = 3, @@ -2893,86 +2893,86 @@ RT_ENUM! { enum PlatformDataCollectionLevel: i32 { RT_CLASS!{static class PlatformDiagnosticsAndUsageDataSettings} impl RtActivatable for PlatformDiagnosticsAndUsageDataSettings {} impl PlatformDiagnosticsAndUsageDataSettings { - #[inline] pub fn get_collection_level() -> Result { unsafe { + #[inline] pub fn get_collection_level() -> Result { >::get_activation_factory().get_collection_level() - }} - #[inline] pub fn add_collection_level_changed(handler: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_collection_level_changed(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_collection_level_changed(handler) - }} - #[inline] pub fn remove_collection_level_changed(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_collection_level_changed(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_collection_level_changed(token) - }} - #[inline] pub fn can_collect_diagnostics(level: PlatformDataCollectionLevel) -> Result { unsafe { + } + #[inline] pub fn can_collect_diagnostics(level: PlatformDataCollectionLevel) -> Result { >::get_activation_factory().can_collect_diagnostics(level) - }} + } } DEFINE_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]) [CLSID_PlatformDiagnosticsAndUsageDataSettings]); 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(&self, out: *mut PlatformDataCollectionLevel) -> HRESULT, - fn add_CollectionLevelChanged(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CollectionLevelChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_CollectionLevelChanged(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CollectionLevelChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn CanCollectDiagnostics(&self, level: PlatformDataCollectionLevel, out: *mut bool) -> HRESULT }} impl IPlatformDiagnosticsAndUsageDataSettingsStatics { - #[inline] pub unsafe fn get_collection_level(&self) -> Result { + #[inline] pub fn get_collection_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CollectionLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_collection_level_changed(&self, handler: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_collection_level_changed(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CollectionLevelChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_collection_level_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_collection_level_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CollectionLevelChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn can_collect_diagnostics(&self, level: PlatformDataCollectionLevel) -> Result { + }} + #[inline] pub fn can_collect_diagnostics(&self, level: PlatformDataCollectionLevel) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).CanCollectDiagnostics)(self as *const _ as *mut _, level, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{static class RetailInfo} impl RtActivatable for RetailInfo {} impl RetailInfo { - #[inline] pub fn get_is_demo_mode_enabled() -> Result { unsafe { + #[inline] pub fn get_is_demo_mode_enabled() -> Result { >::get_activation_factory().get_is_demo_mode_enabled() - }} - #[inline] pub fn get_properties() -> Result>> { unsafe { + } + #[inline] pub fn get_properties() -> Result>>> { >::get_activation_factory().get_properties() - }} + } } DEFINE_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]) [CLSID_RetailInfo]); 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(&self, out: *mut bool) -> HRESULT, - fn get_Properties(&self, out: *mut *mut super::super::foundation::collections::IMapView) -> HRESULT + fn get_Properties(&self, out: *mut *mut foundation::collections::IMapView) -> HRESULT }} impl IRetailInfoStatics { - #[inline] pub unsafe fn get_is_demo_mode_enabled(&self) -> Result { + #[inline] pub fn get_is_demo_mode_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDemoModeEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result>> { + }} + #[inline] pub fn get_properties(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{static class SharedModeSettings} impl RtActivatable for SharedModeSettings {} impl RtActivatable for SharedModeSettings {} impl SharedModeSettings { - #[inline] pub fn get_is_enabled() -> Result { unsafe { + #[inline] pub fn get_is_enabled() -> Result { >::get_activation_factory().get_is_enabled() - }} - #[inline] pub fn get_should_avoid_local_storage() -> Result { unsafe { + } + #[inline] pub fn get_should_avoid_local_storage() -> Result { >::get_activation_factory().get_should_avoid_local_storage() - }} + } } DEFINE_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]) [CLSID_SharedModeSettings]); DEFINE_IID!(IID_ISharedModeSettingsStatics, 2302538766, 51926, 19792, 140, 73, 111, 207, 192, 62, 219, 41); @@ -2980,32 +2980,32 @@ RT_INTERFACE!{static interface ISharedModeSettingsStatics(ISharedModeSettingsSta fn get_IsEnabled(&self, out: *mut bool) -> HRESULT }} impl ISharedModeSettingsStatics { - #[inline] pub unsafe fn get_is_enabled(&self) -> Result { + #[inline] pub fn get_is_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ISharedModeSettingsStatics2, 1619626148, 52465, 20200, 165, 226, 253, 106, 29, 12, 250, 200); RT_INTERFACE!{static interface ISharedModeSettingsStatics2(ISharedModeSettingsStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_ISharedModeSettingsStatics2] { fn get_ShouldAvoidLocalStorage(&self, out: *mut bool) -> HRESULT }} impl ISharedModeSettingsStatics2 { - #[inline] pub unsafe fn get_should_avoid_local_storage(&self) -> Result { + #[inline] pub fn get_should_avoid_local_storage(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ShouldAvoidLocalStorage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{static class SystemIdentification} impl RtActivatable for SystemIdentification {} impl SystemIdentification { - #[inline] pub fn get_system_id_for_publisher() -> Result> { unsafe { + #[inline] pub fn get_system_id_for_publisher() -> Result>> { >::get_activation_factory().get_system_id_for_publisher() - }} - #[inline] pub fn get_system_id_for_user(user: &super::User) -> Result> { unsafe { + } + #[inline] pub fn get_system_id_for_user(user: &super::User) -> Result>> { >::get_activation_factory().get_system_id_for_user(user) - }} + } } DEFINE_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]) [CLSID_SystemIdentification]); DEFINE_IID!(IID_ISystemIdentificationInfo, 207986301, 50114, 19763, 162, 223, 33, 188, 65, 145, 110, 179); @@ -3015,16 +3015,16 @@ RT_INTERFACE!{interface ISystemIdentificationInfo(ISystemIdentificationInfoVtbl) fn get_Source(&self, out: *mut SystemIdentificationSource) -> HRESULT }} impl ISystemIdentificationInfo { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn get_id(&self) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn get_id(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_source(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_source(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Source)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SystemIdentificationInfo: ISystemIdentificationInfo} RT_ENUM! { enum SystemIdentificationSource: i32 { @@ -3036,49 +3036,49 @@ RT_INTERFACE!{static interface ISystemIdentificationStatics(ISystemIdentificatio fn GetSystemIdForUser(&self, user: *mut super::User, out: *mut *mut SystemIdentificationInfo) -> HRESULT }} impl ISystemIdentificationStatics { - #[inline] pub unsafe fn get_system_id_for_publisher(&self) -> Result> { + #[inline] pub fn get_system_id_for_publisher(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSystemIdForPublisher)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_system_id_for_user(&self, user: &super::User) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_system_id_for_user(&self, user: &super::User) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSystemIdForUser)(self as *const _ as *mut _, user as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } pub mod systemmanufacturers { // Windows.System.Profile.SystemManufacturers use ::prelude::*; DEFINE_IID!(IID_IOemSupportInfo, 2368646741, 34799, 16998, 134, 208, 196, 175, 190, 178, 155, 185); RT_INTERFACE!{interface IOemSupportInfo(IOemSupportInfoVtbl): IInspectable(IInspectableVtbl) [IID_IOemSupportInfo] { - fn get_SupportLink(&self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, - fn get_SupportAppLink(&self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn get_SupportLink(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn get_SupportAppLink(&self, out: *mut *mut foundation::Uri) -> HRESULT, fn get_SupportProvider(&self, out: *mut HSTRING) -> HRESULT }} impl IOemSupportInfo { - #[inline] pub unsafe fn get_support_link(&self) -> Result> { + #[inline] pub fn get_support_link(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportLink)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_support_app_link(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_support_app_link(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportAppLink)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_support_provider(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_support_provider(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SupportProvider)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class OemSupportInfo: IOemSupportInfo} RT_CLASS!{static class SmbiosInformation} impl RtActivatable for SmbiosInformation {} impl SmbiosInformation { - #[inline] pub fn get_serial_number() -> Result { unsafe { + #[inline] pub fn get_serial_number() -> Result { >::get_activation_factory().get_serial_number() - }} + } } DEFINE_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]) [CLSID_SmbiosInformation]); DEFINE_IID!(IID_ISmbiosInformationStatics, 135055996, 25468, 18628, 183, 40, 249, 39, 56, 18, 219, 142); @@ -3086,21 +3086,21 @@ RT_INTERFACE!{static interface ISmbiosInformationStatics(ISmbiosInformationStati fn get_SerialNumber(&self, out: *mut HSTRING) -> HRESULT }} impl ISmbiosInformationStatics { - #[inline] pub unsafe fn get_serial_number(&self) -> Result { + #[inline] pub fn get_serial_number(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SerialNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class SystemSupportInfo} impl RtActivatable for SystemSupportInfo {} impl SystemSupportInfo { - #[inline] pub fn get_local_system_edition() -> Result { unsafe { + #[inline] pub fn get_local_system_edition() -> Result { >::get_activation_factory().get_local_system_edition() - }} - #[inline] pub fn get_oem_support_info() -> Result> { unsafe { + } + #[inline] pub fn get_oem_support_info() -> Result>> { >::get_activation_factory().get_oem_support_info() - }} + } } DEFINE_CLSID!(SystemSupportInfo(&[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,121,115,116,101,109,83,117,112,112,111,114,116,73,110,102,111,0]) [CLSID_SystemSupportInfo]); DEFINE_IID!(IID_ISystemSupportInfoStatics, 4017424756, 50210, 17879, 164, 77, 92, 28, 0, 67, 162, 179); @@ -3109,16 +3109,16 @@ RT_INTERFACE!{static interface ISystemSupportInfoStatics(ISystemSupportInfoStati fn get_OemSupportInfo(&self, out: *mut *mut OemSupportInfo) -> HRESULT }} impl ISystemSupportInfoStatics { - #[inline] pub unsafe fn get_local_system_edition(&self) -> Result { + #[inline] pub fn get_local_system_edition(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LocalSystemEdition)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_oem_support_info(&self) -> Result> { + }} + #[inline] pub fn get_oem_support_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OemSupportInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } } // Windows.System.Profile.SystemManufacturers } // Windows.System.Profile @@ -3127,9 +3127,9 @@ use ::prelude::*; RT_CLASS!{static class InteractiveSession} impl RtActivatable for InteractiveSession {} impl InteractiveSession { - #[inline] pub fn get_is_remote() -> Result { unsafe { + #[inline] pub fn get_is_remote() -> Result { >::get_activation_factory().get_is_remote() - }} + } } DEFINE_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]) [CLSID_InteractiveSession]); DEFINE_IID!(IID_IInteractiveSessionStatics, 1619543601, 56634, 17782, 156, 141, 232, 2, 118, 24, 189, 206); @@ -3137,11 +3137,11 @@ RT_INTERFACE!{static interface IInteractiveSessionStatics(IInteractiveSessionSta fn get_IsRemote(&self, out: *mut bool) -> HRESULT }} impl IInteractiveSessionStatics { - #[inline] pub unsafe fn get_is_remote(&self) -> Result { + #[inline] pub fn get_is_remote(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsRemote)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } } // Windows.System.RemoteDesktop pub mod power { // Windows.System.Power @@ -3149,42 +3149,42 @@ use ::prelude::*; RT_CLASS!{static class BackgroundEnergyManager} impl RtActivatable for BackgroundEnergyManager {} impl BackgroundEnergyManager { - #[inline] pub fn get_low_usage_level() -> Result { unsafe { + #[inline] pub fn get_low_usage_level() -> Result { >::get_activation_factory().get_low_usage_level() - }} - #[inline] pub fn get_near_max_acceptable_usage_level() -> Result { unsafe { + } + #[inline] pub fn get_near_max_acceptable_usage_level() -> Result { >::get_activation_factory().get_near_max_acceptable_usage_level() - }} - #[inline] pub fn get_max_acceptable_usage_level() -> Result { unsafe { + } + #[inline] pub fn get_max_acceptable_usage_level() -> Result { >::get_activation_factory().get_max_acceptable_usage_level() - }} - #[inline] pub fn get_excessive_usage_level() -> Result { unsafe { + } + #[inline] pub fn get_excessive_usage_level() -> Result { >::get_activation_factory().get_excessive_usage_level() - }} - #[inline] pub fn get_near_termination_usage_level() -> Result { unsafe { + } + #[inline] pub fn get_near_termination_usage_level() -> Result { >::get_activation_factory().get_near_termination_usage_level() - }} - #[inline] pub fn get_termination_usage_level() -> Result { unsafe { + } + #[inline] pub fn get_termination_usage_level() -> Result { >::get_activation_factory().get_termination_usage_level() - }} - #[inline] pub fn get_recent_energy_usage() -> Result { unsafe { + } + #[inline] pub fn get_recent_energy_usage() -> Result { >::get_activation_factory().get_recent_energy_usage() - }} - #[inline] pub fn get_recent_energy_usage_level() -> Result { unsafe { + } + #[inline] pub fn get_recent_energy_usage_level() -> Result { >::get_activation_factory().get_recent_energy_usage_level() - }} - #[inline] pub fn add_recent_energy_usage_increased(handler: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_recent_energy_usage_increased(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_recent_energy_usage_increased(handler) - }} - #[inline] pub fn remove_recent_energy_usage_increased(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_recent_energy_usage_increased(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_recent_energy_usage_increased(token) - }} - #[inline] pub fn add_recent_energy_usage_returned_to_low(handler: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_recent_energy_usage_returned_to_low(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_recent_energy_usage_returned_to_low(handler) - }} - #[inline] pub fn remove_recent_energy_usage_returned_to_low(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_recent_energy_usage_returned_to_low(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_recent_energy_usage_returned_to_low(token) - }} + } } DEFINE_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]) [CLSID_BackgroundEnergyManager]); DEFINE_IID!(IID_IBackgroundEnergyManagerStatics, 3004571029, 4480, 17270, 150, 225, 64, 149, 86, 129, 71, 206); @@ -3197,70 +3197,70 @@ RT_INTERFACE!{static interface IBackgroundEnergyManagerStatics(IBackgroundEnergy fn get_TerminationUsageLevel(&self, out: *mut u32) -> HRESULT, fn get_RecentEnergyUsage(&self, out: *mut u32) -> HRESULT, fn get_RecentEnergyUsageLevel(&self, out: *mut u32) -> HRESULT, - fn add_RecentEnergyUsageIncreased(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RecentEnergyUsageIncreased(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_RecentEnergyUsageReturnedToLow(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RecentEnergyUsageReturnedToLow(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_RecentEnergyUsageIncreased(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RecentEnergyUsageIncreased(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_RecentEnergyUsageReturnedToLow(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RecentEnergyUsageReturnedToLow(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IBackgroundEnergyManagerStatics { - #[inline] pub unsafe fn get_low_usage_level(&self) -> Result { + #[inline] pub fn get_low_usage_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LowUsageLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_near_max_acceptable_usage_level(&self) -> Result { + }} + #[inline] pub fn get_near_max_acceptable_usage_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NearMaxAcceptableUsageLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_acceptable_usage_level(&self) -> Result { + }} + #[inline] pub fn get_max_acceptable_usage_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxAcceptableUsageLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_excessive_usage_level(&self) -> Result { + }} + #[inline] pub fn get_excessive_usage_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExcessiveUsageLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_near_termination_usage_level(&self) -> Result { + }} + #[inline] pub fn get_near_termination_usage_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NearTerminationUsageLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_termination_usage_level(&self) -> Result { + }} + #[inline] pub fn get_termination_usage_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TerminationUsageLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_recent_energy_usage(&self) -> Result { + }} + #[inline] pub fn get_recent_energy_usage(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RecentEnergyUsage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_recent_energy_usage_level(&self) -> Result { + }} + #[inline] pub fn get_recent_energy_usage_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RecentEnergyUsageLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_recent_energy_usage_increased(&self, handler: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_recent_energy_usage_increased(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RecentEnergyUsageIncreased)(self as *const _ as *mut _, 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(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_recent_energy_usage_increased(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RecentEnergyUsageIncreased)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_recent_energy_usage_returned_to_low(&self, handler: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_recent_energy_usage_returned_to_low(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RecentEnergyUsageReturnedToLow)(self as *const _ as *mut _, 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(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_recent_energy_usage_returned_to_low(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RecentEnergyUsageReturnedToLow)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum BatteryStatus: i32 { NotPresent (BatteryStatus_NotPresent) = 0, Discharging (BatteryStatus_Discharging) = 1, Idle (BatteryStatus_Idle) = 2, Charging (BatteryStatus_Charging) = 3, @@ -3271,36 +3271,36 @@ RT_ENUM! { enum EnergySaverStatus: i32 { RT_CLASS!{static class ForegroundEnergyManager} impl RtActivatable for ForegroundEnergyManager {} impl ForegroundEnergyManager { - #[inline] pub fn get_low_usage_level() -> Result { unsafe { + #[inline] pub fn get_low_usage_level() -> Result { >::get_activation_factory().get_low_usage_level() - }} - #[inline] pub fn get_near_max_acceptable_usage_level() -> Result { unsafe { + } + #[inline] pub fn get_near_max_acceptable_usage_level() -> Result { >::get_activation_factory().get_near_max_acceptable_usage_level() - }} - #[inline] pub fn get_max_acceptable_usage_level() -> Result { unsafe { + } + #[inline] pub fn get_max_acceptable_usage_level() -> Result { >::get_activation_factory().get_max_acceptable_usage_level() - }} - #[inline] pub fn get_excessive_usage_level() -> Result { unsafe { + } + #[inline] pub fn get_excessive_usage_level() -> Result { >::get_activation_factory().get_excessive_usage_level() - }} - #[inline] pub fn get_recent_energy_usage() -> Result { unsafe { + } + #[inline] pub fn get_recent_energy_usage() -> Result { >::get_activation_factory().get_recent_energy_usage() - }} - #[inline] pub fn get_recent_energy_usage_level() -> Result { unsafe { + } + #[inline] pub fn get_recent_energy_usage_level() -> Result { >::get_activation_factory().get_recent_energy_usage_level() - }} - #[inline] pub fn add_recent_energy_usage_increased(handler: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_recent_energy_usage_increased(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_recent_energy_usage_increased(handler) - }} - #[inline] pub fn remove_recent_energy_usage_increased(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_recent_energy_usage_increased(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_recent_energy_usage_increased(token) - }} - #[inline] pub fn add_recent_energy_usage_returned_to_low(handler: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_recent_energy_usage_returned_to_low(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_recent_energy_usage_returned_to_low(handler) - }} - #[inline] pub fn remove_recent_energy_usage_returned_to_low(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_recent_energy_usage_returned_to_low(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_recent_energy_usage_returned_to_low(token) - }} + } } DEFINE_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]) [CLSID_ForegroundEnergyManager]); DEFINE_IID!(IID_IForegroundEnergyManagerStatics, 2683857010, 58999, 18452, 154, 32, 83, 55, 202, 115, 43, 152); @@ -3311,200 +3311,200 @@ RT_INTERFACE!{static interface IForegroundEnergyManagerStatics(IForegroundEnergy fn get_ExcessiveUsageLevel(&self, out: *mut u32) -> HRESULT, fn get_RecentEnergyUsage(&self, out: *mut u32) -> HRESULT, fn get_RecentEnergyUsageLevel(&self, out: *mut u32) -> HRESULT, - fn add_RecentEnergyUsageIncreased(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RecentEnergyUsageIncreased(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_RecentEnergyUsageReturnedToLow(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RecentEnergyUsageReturnedToLow(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_RecentEnergyUsageIncreased(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RecentEnergyUsageIncreased(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_RecentEnergyUsageReturnedToLow(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RecentEnergyUsageReturnedToLow(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IForegroundEnergyManagerStatics { - #[inline] pub unsafe fn get_low_usage_level(&self) -> Result { + #[inline] pub fn get_low_usage_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LowUsageLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_near_max_acceptable_usage_level(&self) -> Result { + }} + #[inline] pub fn get_near_max_acceptable_usage_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NearMaxAcceptableUsageLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_acceptable_usage_level(&self) -> Result { + }} + #[inline] pub fn get_max_acceptable_usage_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxAcceptableUsageLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_excessive_usage_level(&self) -> Result { + }} + #[inline] pub fn get_excessive_usage_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExcessiveUsageLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_recent_energy_usage(&self) -> Result { + }} + #[inline] pub fn get_recent_energy_usage(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RecentEnergyUsage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_recent_energy_usage_level(&self) -> Result { + }} + #[inline] pub fn get_recent_energy_usage_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RecentEnergyUsageLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_recent_energy_usage_increased(&self, handler: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_recent_energy_usage_increased(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RecentEnergyUsageIncreased)(self as *const _ as *mut _, 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(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_recent_energy_usage_increased(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RecentEnergyUsageIncreased)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_recent_energy_usage_returned_to_low(&self, handler: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_recent_energy_usage_returned_to_low(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RecentEnergyUsageReturnedToLow)(self as *const _ as *mut _, 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(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_recent_energy_usage_returned_to_low(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RecentEnergyUsageReturnedToLow)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{static class PowerManager} impl RtActivatable for PowerManager {} impl PowerManager { - #[inline] pub fn get_energy_saver_status() -> Result { unsafe { + #[inline] pub fn get_energy_saver_status() -> Result { >::get_activation_factory().get_energy_saver_status() - }} - #[inline] pub fn add_energy_saver_status_changed(handler: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_energy_saver_status_changed(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_energy_saver_status_changed(handler) - }} - #[inline] pub fn remove_energy_saver_status_changed(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_energy_saver_status_changed(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_energy_saver_status_changed(token) - }} - #[inline] pub fn get_battery_status() -> Result { unsafe { + } + #[inline] pub fn get_battery_status() -> Result { >::get_activation_factory().get_battery_status() - }} - #[inline] pub fn add_battery_status_changed(handler: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_battery_status_changed(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_battery_status_changed(handler) - }} - #[inline] pub fn remove_battery_status_changed(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_battery_status_changed(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_battery_status_changed(token) - }} - #[inline] pub fn get_power_supply_status() -> Result { unsafe { + } + #[inline] pub fn get_power_supply_status() -> Result { >::get_activation_factory().get_power_supply_status() - }} - #[inline] pub fn add_power_supply_status_changed(handler: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_power_supply_status_changed(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_power_supply_status_changed(handler) - }} - #[inline] pub fn remove_power_supply_status_changed(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_power_supply_status_changed(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_power_supply_status_changed(token) - }} - #[inline] pub fn get_remaining_charge_percent() -> Result { unsafe { + } + #[inline] pub fn get_remaining_charge_percent() -> Result { >::get_activation_factory().get_remaining_charge_percent() - }} - #[inline] pub fn add_remaining_charge_percent_changed(handler: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_remaining_charge_percent_changed(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_remaining_charge_percent_changed(handler) - }} - #[inline] pub fn remove_remaining_charge_percent_changed(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_remaining_charge_percent_changed(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_remaining_charge_percent_changed(token) - }} - #[inline] pub fn get_remaining_discharge_time() -> Result { unsafe { + } + #[inline] pub fn get_remaining_discharge_time() -> Result { >::get_activation_factory().get_remaining_discharge_time() - }} - #[inline] pub fn add_remaining_discharge_time_changed(handler: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_remaining_discharge_time_changed(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_remaining_discharge_time_changed(handler) - }} - #[inline] pub fn remove_remaining_discharge_time_changed(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_remaining_discharge_time_changed(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_remaining_discharge_time_changed(token) - }} + } } DEFINE_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]) [CLSID_PowerManager]); 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(&self, out: *mut EnergySaverStatus) -> HRESULT, - fn add_EnergySaverStatusChanged(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_EnergySaverStatusChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_EnergySaverStatusChanged(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnergySaverStatusChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_BatteryStatus(&self, out: *mut BatteryStatus) -> HRESULT, - fn add_BatteryStatusChanged(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_BatteryStatusChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_BatteryStatusChanged(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_BatteryStatusChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_PowerSupplyStatus(&self, out: *mut PowerSupplyStatus) -> HRESULT, - fn add_PowerSupplyStatusChanged(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PowerSupplyStatusChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_PowerSupplyStatusChanged(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PowerSupplyStatusChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn get_RemainingChargePercent(&self, out: *mut i32) -> HRESULT, - fn add_RemainingChargePercentChanged(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RemainingChargePercentChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_RemainingDischargeTime(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn add_RemainingDischargeTimeChanged(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RemainingDischargeTimeChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_RemainingChargePercentChanged(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RemainingChargePercentChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn get_RemainingDischargeTime(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn add_RemainingDischargeTimeChanged(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RemainingDischargeTimeChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IPowerManagerStatics { - #[inline] pub unsafe fn get_energy_saver_status(&self) -> Result { + #[inline] pub fn get_energy_saver_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EnergySaverStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_energy_saver_status_changed(&self, handler: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_energy_saver_status_changed(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_EnergySaverStatusChanged)(self as *const _ as *mut _, 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(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_energy_saver_status_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_EnergySaverStatusChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_battery_status(&self) -> Result { + }} + #[inline] pub fn get_battery_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BatteryStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_battery_status_changed(&self, handler: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_battery_status_changed(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_BatteryStatusChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_battery_status_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_battery_status_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_BatteryStatusChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_power_supply_status(&self) -> Result { + }} + #[inline] pub fn get_power_supply_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PowerSupplyStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_power_supply_status_changed(&self, handler: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_power_supply_status_changed(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PowerSupplyStatusChanged)(self as *const _ as *mut _, 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(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_power_supply_status_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PowerSupplyStatusChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_remaining_charge_percent(&self) -> Result { + }} + #[inline] pub fn get_remaining_charge_percent(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RemainingChargePercent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_remaining_charge_percent_changed(&self, handler: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_remaining_charge_percent_changed(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RemainingChargePercentChanged)(self as *const _ as *mut _, 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(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_remaining_charge_percent_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RemainingChargePercentChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_remaining_discharge_time(&self) -> Result { + }} + #[inline] pub fn get_remaining_discharge_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RemainingDischargeTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_remaining_discharge_time_changed(&self, handler: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_remaining_discharge_time_changed(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RemainingDischargeTimeChanged)(self as *const _ as *mut _, 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(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_remaining_discharge_time_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RemainingDischargeTimeChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum PowerSupplyStatus: i32 { NotPresent (PowerSupplyStatus_NotPresent) = 0, Inadequate (PowerSupplyStatus_Inadequate) = 1, Adequate (PowerSupplyStatus_Adequate) = 2, @@ -3514,15 +3514,15 @@ use ::prelude::*; RT_CLASS!{static class BackgroundEnergyDiagnostics} impl RtActivatable for BackgroundEnergyDiagnostics {} impl BackgroundEnergyDiagnostics { - #[inline] pub fn get_device_specific_conversion_factor() -> Result { unsafe { + #[inline] pub fn get_device_specific_conversion_factor() -> Result { >::get_activation_factory().get_device_specific_conversion_factor() - }} - #[inline] pub fn compute_total_energy_usage() -> Result { unsafe { + } + #[inline] pub fn compute_total_energy_usage() -> Result { >::get_activation_factory().compute_total_energy_usage() - }} - #[inline] pub fn reset_total_energy_usage() -> Result<()> { unsafe { + } + #[inline] pub fn reset_total_energy_usage() -> Result<()> { >::get_activation_factory().reset_total_energy_usage() - }} + } } DEFINE_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]) [CLSID_BackgroundEnergyDiagnostics]); DEFINE_IID!(IID_IBackgroundEnergyDiagnosticsStatics, 3613800194, 54182, 18144, 143, 155, 80, 185, 91, 180, 249, 197); @@ -3532,33 +3532,33 @@ RT_INTERFACE!{static interface IBackgroundEnergyDiagnosticsStatics(IBackgroundEn fn ResetTotalEnergyUsage(&self) -> HRESULT }} impl IBackgroundEnergyDiagnosticsStatics { - #[inline] pub unsafe fn get_device_specific_conversion_factor(&self) -> Result { + #[inline] pub fn get_device_specific_conversion_factor(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DeviceSpecificConversionFactor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn compute_total_energy_usage(&self) -> Result { + }} + #[inline] pub fn compute_total_energy_usage(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ComputeTotalEnergyUsage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn reset_total_energy_usage(&self) -> Result<()> { + }} + #[inline] pub fn reset_total_energy_usage(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ResetTotalEnergyUsage)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{static class ForegroundEnergyDiagnostics} impl RtActivatable for ForegroundEnergyDiagnostics {} impl ForegroundEnergyDiagnostics { - #[inline] pub fn get_device_specific_conversion_factor() -> Result { unsafe { + #[inline] pub fn get_device_specific_conversion_factor() -> Result { >::get_activation_factory().get_device_specific_conversion_factor() - }} - #[inline] pub fn compute_total_energy_usage() -> Result { unsafe { + } + #[inline] pub fn compute_total_energy_usage() -> Result { >::get_activation_factory().compute_total_energy_usage() - }} - #[inline] pub fn reset_total_energy_usage() -> Result<()> { unsafe { + } + #[inline] pub fn reset_total_energy_usage() -> Result<()> { >::get_activation_factory().reset_total_energy_usage() - }} + } } DEFINE_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]) [CLSID_ForegroundEnergyDiagnostics]); DEFINE_IID!(IID_IForegroundEnergyDiagnosticsStatics, 600443159, 52487, 17929, 190, 21, 143, 232, 148, 197, 228, 30); @@ -3568,20 +3568,20 @@ RT_INTERFACE!{static interface IForegroundEnergyDiagnosticsStatics(IForegroundEn fn ResetTotalEnergyUsage(&self) -> HRESULT }} impl IForegroundEnergyDiagnosticsStatics { - #[inline] pub unsafe fn get_device_specific_conversion_factor(&self) -> Result { + #[inline] pub fn get_device_specific_conversion_factor(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DeviceSpecificConversionFactor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn compute_total_energy_usage(&self) -> Result { + }} + #[inline] pub fn compute_total_energy_usage(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ComputeTotalEnergyUsage)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn reset_total_energy_usage(&self) -> Result<()> { + }} + #[inline] pub fn reset_total_energy_usage(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ResetTotalEnergyUsage)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } } // Windows.System.Power.Diagnostics } // Windows.System.Power @@ -3589,20 +3589,20 @@ pub mod diagnostics { // Windows.System.Diagnostics use ::prelude::*; DEFINE_IID!(IID_IDiagnosticActionResult, 3261440662, 59195, 16535, 178, 143, 52, 66, 240, 61, 216, 49); RT_INTERFACE!{interface IDiagnosticActionResult(IDiagnosticActionResultVtbl): IInspectable(IInspectableVtbl) [IID_IDiagnosticActionResult] { - fn get_ExtendedError(&self, out: *mut super::super::foundation::HResult) -> HRESULT, - fn get_Results(&self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT + fn get_ExtendedError(&self, out: *mut foundation::HResult) -> HRESULT, + fn get_Results(&self, out: *mut *mut foundation::collections::ValueSet) -> HRESULT }} impl IDiagnosticActionResult { - #[inline] pub unsafe fn get_extended_error(&self) -> Result { + #[inline] pub fn get_extended_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_results(&self) -> Result> { + }} + #[inline] pub fn get_results(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Results)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DiagnosticActionResult: IDiagnosticActionResult} RT_ENUM! { enum DiagnosticActionState: i32 { @@ -3610,27 +3610,27 @@ RT_ENUM! { enum DiagnosticActionState: i32 { }} DEFINE_IID!(IID_IDiagnosticInvoker, 410724106, 739, 20358, 132, 252, 253, 216, 146, 181, 148, 15); RT_INTERFACE!{interface IDiagnosticInvoker(IDiagnosticInvokerVtbl): IInspectable(IInspectableVtbl) [IID_IDiagnosticInvoker] { - #[cfg(feature="windows-data")] fn RunDiagnosticActionAsync(&self, context: *mut super::super::data::json::JsonObject, out: *mut *mut super::super::foundation::IAsyncOperationWithProgress) -> HRESULT + #[cfg(feature="windows-data")] fn RunDiagnosticActionAsync(&self, context: *mut super::super::data::json::JsonObject, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT }} impl IDiagnosticInvoker { - #[cfg(feature="windows-data")] #[inline] pub unsafe fn run_diagnostic_action_async(&self, context: &super::super::data::json::JsonObject) -> Result>> { + #[cfg(feature="windows-data")] #[inline] pub fn run_diagnostic_action_async(&self, context: &super::super::data::json::JsonObject) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RunDiagnosticActionAsync)(self as *const _ as *mut _, context as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class DiagnosticInvoker: IDiagnosticInvoker} impl RtActivatable for DiagnosticInvoker {} impl DiagnosticInvoker { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} - #[inline] pub fn get_for_user(user: &super::User) -> Result> { unsafe { + } + #[inline] pub fn get_for_user(user: &super::User) -> Result>> { >::get_activation_factory().get_for_user(user) - }} - #[inline] pub fn get_is_supported() -> Result { unsafe { + } + #[inline] pub fn get_is_supported() -> Result { >::get_activation_factory().get_is_supported() - }} + } } DEFINE_CLSID!(DiagnosticInvoker(&[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,68,105,97,103,110,111,115,116,105,99,73,110,118,111,107,101,114,0]) [CLSID_DiagnosticInvoker]); DEFINE_IID!(IID_IDiagnosticInvokerStatics, 1559943390, 61788, 17748, 168, 19, 193, 19, 195, 136, 27, 9); @@ -3640,50 +3640,50 @@ RT_INTERFACE!{static interface IDiagnosticInvokerStatics(IDiagnosticInvokerStati fn get_IsSupported(&self, out: *mut bool) -> HRESULT }} impl IDiagnosticInvokerStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_for_user(&self, user: &super::User) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_for_user(&self, user: &super::User) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForUser)(self as *const _ as *mut _, user as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_supported(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSupported)(self as *const _ as *mut _, &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(&self, out: *mut *mut ProcessCpuUsageReport) -> HRESULT }} impl IProcessCpuUsage { - #[inline] pub unsafe fn get_report(&self) -> Result> { + #[inline] pub fn get_report(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetReport)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ProcessCpuUsage: IProcessCpuUsage} 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(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn get_UserTime(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + fn get_KernelTime(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_UserTime(&self, out: *mut foundation::TimeSpan) -> HRESULT }} impl IProcessCpuUsageReport { - #[inline] pub unsafe fn get_kernel_time(&self) -> Result { + #[inline] pub fn get_kernel_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_KernelTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_user_time(&self) -> Result { + }} + #[inline] pub fn get_user_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UserTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ProcessCpuUsageReport: IProcessCpuUsageReport} DEFINE_IID!(IID_IProcessDiagnosticInfo, 3895504971, 12302, 20198, 160, 171, 91, 95, 82, 49, 180, 52); @@ -3691,118 +3691,118 @@ RT_INTERFACE!{interface IProcessDiagnosticInfo(IProcessDiagnosticInfoVtbl): IIns fn get_ProcessId(&self, out: *mut u32) -> HRESULT, fn get_ExecutableFileName(&self, out: *mut HSTRING) -> HRESULT, fn get_Parent(&self, out: *mut *mut ProcessDiagnosticInfo) -> HRESULT, - fn get_ProcessStartTime(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_ProcessStartTime(&self, out: *mut foundation::DateTime) -> HRESULT, fn get_DiskUsage(&self, out: *mut *mut ProcessDiskUsage) -> HRESULT, fn get_MemoryUsage(&self, out: *mut *mut ProcessMemoryUsage) -> HRESULT, fn get_CpuUsage(&self, out: *mut *mut ProcessCpuUsage) -> HRESULT }} impl IProcessDiagnosticInfo { - #[inline] pub unsafe fn get_process_id(&self) -> Result { + #[inline] pub fn get_process_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProcessId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_executable_file_name(&self) -> Result { + }} + #[inline] pub fn get_executable_file_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExecutableFileName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_parent(&self) -> Result> { + }} + #[inline] pub fn get_parent(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Parent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_process_start_time(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_process_start_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProcessStartTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_disk_usage(&self) -> Result> { + }} + #[inline] pub fn get_disk_usage(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DiskUsage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_memory_usage(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_memory_usage(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MemoryUsage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_cpu_usage(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_cpu_usage(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CpuUsage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ProcessDiagnosticInfo: IProcessDiagnosticInfo} impl RtActivatable for ProcessDiagnosticInfo {} impl RtActivatable for ProcessDiagnosticInfo {} impl ProcessDiagnosticInfo { - #[inline] pub fn get_for_processes() -> Result>> { unsafe { + #[inline] pub fn get_for_processes() -> Result>>> { >::get_activation_factory().get_for_processes() - }} - #[inline] pub fn get_for_current_process() -> Result> { unsafe { + } + #[inline] pub fn get_for_current_process() -> Result>> { >::get_activation_factory().get_for_current_process() - }} - #[inline] pub fn try_get_for_process_id(processId: u32) -> Result> { unsafe { + } + #[inline] pub fn try_get_for_process_id(processId: u32) -> Result>> { >::get_activation_factory().try_get_for_process_id(processId) - }} + } } DEFINE_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]) [CLSID_ProcessDiagnosticInfo]); DEFINE_IID!(IID_IProcessDiagnosticInfo2, 2505624346, 15627, 18924, 171, 112, 79, 122, 17, 40, 5, 222); RT_INTERFACE!{interface IProcessDiagnosticInfo2(IProcessDiagnosticInfo2Vtbl): IInspectable(IInspectableVtbl) [IID_IProcessDiagnosticInfo2] { - fn GetAppDiagnosticInfos(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn GetAppDiagnosticInfos(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_IsPackaged(&self, out: *mut bool) -> HRESULT }} impl IProcessDiagnosticInfo2 { - #[inline] pub unsafe fn get_app_diagnostic_infos(&self) -> Result>> { + #[inline] pub fn get_app_diagnostic_infos(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAppDiagnosticInfos)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_packaged(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_packaged(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPackaged)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, + fn GetForProcesses(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn GetForCurrentProcess(&self, out: *mut *mut ProcessDiagnosticInfo) -> HRESULT }} impl IProcessDiagnosticInfoStatics { - #[inline] pub unsafe fn get_for_processes(&self) -> Result>> { + #[inline] pub fn get_for_processes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForProcesses)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_for_current_process(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_for_current_process(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentProcess)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IProcessDiagnosticInfoStatics2, 1250334871, 39065, 19012, 162, 155, 9, 22, 99, 190, 9, 182); RT_INTERFACE!{static interface IProcessDiagnosticInfoStatics2(IProcessDiagnosticInfoStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IProcessDiagnosticInfoStatics2] { fn TryGetForProcessId(&self, processId: u32, out: *mut *mut ProcessDiagnosticInfo) -> HRESULT }} impl IProcessDiagnosticInfoStatics2 { - #[inline] pub unsafe fn try_get_for_process_id(&self, processId: u32) -> Result> { + #[inline] pub fn try_get_for_process_id(&self, processId: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetForProcessId)(self as *const _ as *mut _, processId, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut ProcessDiskUsageReport) -> HRESULT }} impl IProcessDiskUsage { - #[inline] pub unsafe fn get_report(&self) -> Result> { + #[inline] pub fn get_report(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetReport)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ProcessDiskUsage: IProcessDiskUsage} DEFINE_IID!(IID_IProcessDiskUsageReport, 1075193853, 21341, 19487, 129, 184, 218, 84, 225, 190, 99, 94); @@ -3815,36 +3815,36 @@ RT_INTERFACE!{interface IProcessDiskUsageReport(IProcessDiskUsageReportVtbl): II fn get_OtherBytesCount(&self, out: *mut i64) -> HRESULT }} impl IProcessDiskUsageReport { - #[inline] pub unsafe fn get_read_operation_count(&self) -> Result { + #[inline] pub fn get_read_operation_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReadOperationCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_write_operation_count(&self) -> Result { + }} + #[inline] pub fn get_write_operation_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_WriteOperationCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_other_operation_count(&self) -> Result { + }} + #[inline] pub fn get_other_operation_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OtherOperationCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_bytes_read_count(&self) -> Result { + }} + #[inline] pub fn get_bytes_read_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BytesReadCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_bytes_written_count(&self) -> Result { + }} + #[inline] pub fn get_bytes_written_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BytesWrittenCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_other_bytes_count(&self) -> Result { + }} + #[inline] pub fn get_other_bytes_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OtherBytesCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ProcessDiskUsageReport: IProcessDiskUsageReport} DEFINE_IID!(IID_IProcessMemoryUsage, 4111147675, 33404, 17079, 176, 124, 14, 50, 98, 126, 107, 62); @@ -3852,11 +3852,11 @@ RT_INTERFACE!{interface IProcessMemoryUsage(IProcessMemoryUsageVtbl): IInspectab fn GetReport(&self, out: *mut *mut ProcessMemoryUsageReport) -> HRESULT }} impl IProcessMemoryUsage { - #[inline] pub unsafe fn get_report(&self) -> Result> { + #[inline] pub fn get_report(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetReport)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ProcessMemoryUsage: IProcessMemoryUsage} DEFINE_IID!(IID_IProcessMemoryUsageReport, 3267853498, 6481, 18053, 133, 50, 126, 116, 158, 207, 142, 235); @@ -3875,66 +3875,66 @@ RT_INTERFACE!{interface IProcessMemoryUsageReport(IProcessMemoryUsageReportVtbl) fn get_WorkingSetSizeInBytes(&self, out: *mut u64) -> HRESULT }} impl IProcessMemoryUsageReport { - #[inline] pub unsafe fn get_non_paged_pool_size_in_bytes(&self) -> Result { + #[inline] pub fn get_non_paged_pool_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NonPagedPoolSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_page_fault_count(&self) -> Result { + }} + #[inline] pub fn get_page_fault_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PageFaultCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_page_file_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_page_file_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PageFileSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_paged_pool_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_paged_pool_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PagedPoolSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_peak_non_paged_pool_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_peak_non_paged_pool_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PeakNonPagedPoolSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_peak_page_file_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_peak_page_file_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PeakPageFileSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_peak_paged_pool_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_peak_paged_pool_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PeakPagedPoolSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_peak_virtual_memory_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_peak_virtual_memory_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PeakVirtualMemorySizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_peak_working_set_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_peak_working_set_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PeakWorkingSetSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_private_page_count(&self) -> Result { + }} + #[inline] pub fn get_private_page_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PrivatePageCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_virtual_memory_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_virtual_memory_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VirtualMemorySizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_working_set_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_working_set_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_WorkingSetSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ProcessMemoryUsageReport: IProcessMemoryUsageReport} DEFINE_IID!(IID_ISystemCpuUsage, 1614263212, 726, 16948, 131, 98, 127, 227, 173, 200, 31, 95); @@ -3942,35 +3942,35 @@ RT_INTERFACE!{interface ISystemCpuUsage(ISystemCpuUsageVtbl): IInspectable(IInsp fn GetReport(&self, out: *mut *mut SystemCpuUsageReport) -> HRESULT }} impl ISystemCpuUsage { - #[inline] pub unsafe fn get_report(&self) -> Result> { + #[inline] pub fn get_report(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetReport)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SystemCpuUsage: ISystemCpuUsage} DEFINE_IID!(IID_ISystemCpuUsageReport, 740741298, 38019, 20322, 171, 87, 130, 178, 157, 151, 25, 184); RT_INTERFACE!{interface ISystemCpuUsageReport(ISystemCpuUsageReportVtbl): IInspectable(IInspectableVtbl) [IID_ISystemCpuUsageReport] { - fn get_KernelTime(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn get_UserTime(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn get_IdleTime(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT + fn get_KernelTime(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_UserTime(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_IdleTime(&self, out: *mut foundation::TimeSpan) -> HRESULT }} impl ISystemCpuUsageReport { - #[inline] pub unsafe fn get_kernel_time(&self) -> Result { + #[inline] pub fn get_kernel_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_KernelTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_user_time(&self) -> Result { + }} + #[inline] pub fn get_user_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UserTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_idle_time(&self) -> Result { + }} + #[inline] pub fn get_idle_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IdleTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SystemCpuUsageReport: ISystemCpuUsageReport} DEFINE_IID!(IID_ISystemDiagnosticInfo, 2727411205, 57331, 16511, 154, 27, 11, 43, 49, 124, 168, 0); @@ -3979,23 +3979,23 @@ RT_INTERFACE!{interface ISystemDiagnosticInfo(ISystemDiagnosticInfoVtbl): IInspe fn get_CpuUsage(&self, out: *mut *mut SystemCpuUsage) -> HRESULT }} impl ISystemDiagnosticInfo { - #[inline] pub unsafe fn get_memory_usage(&self) -> Result> { + #[inline] pub fn get_memory_usage(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MemoryUsage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_cpu_usage(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_cpu_usage(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CpuUsage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SystemDiagnosticInfo: ISystemDiagnosticInfo} impl RtActivatable for SystemDiagnosticInfo {} impl SystemDiagnosticInfo { - #[inline] pub fn get_for_current_system() -> Result> { unsafe { + #[inline] pub fn get_for_current_system() -> Result>> { >::get_activation_factory().get_for_current_system() - }} + } } DEFINE_CLSID!(SystemDiagnosticInfo(&[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,83,121,115,116,101,109,68,105,97,103,110,111,115,116,105,99,73,110,102,111,0]) [CLSID_SystemDiagnosticInfo]); DEFINE_IID!(IID_ISystemDiagnosticInfoStatics, 3557076001, 64637, 17904, 154, 63, 57, 32, 58, 237, 159, 126); @@ -4003,22 +4003,22 @@ RT_INTERFACE!{static interface ISystemDiagnosticInfoStatics(ISystemDiagnosticInf fn GetForCurrentSystem(&self, out: *mut *mut SystemDiagnosticInfo) -> HRESULT }} impl ISystemDiagnosticInfoStatics { - #[inline] pub unsafe fn get_for_current_system(&self) -> Result> { + #[inline] pub fn get_for_current_system(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentSystem)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_ISystemMemoryUsage, 402638229, 5890, 18895, 170, 39, 47, 10, 50, 89, 20, 4); RT_INTERFACE!{interface ISystemMemoryUsage(ISystemMemoryUsageVtbl): IInspectable(IInspectableVtbl) [IID_ISystemMemoryUsage] { fn GetReport(&self, out: *mut *mut SystemMemoryUsageReport) -> HRESULT }} impl ISystemMemoryUsage { - #[inline] pub unsafe fn get_report(&self) -> Result> { + #[inline] pub fn get_report(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetReport)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SystemMemoryUsage: ISystemMemoryUsage} DEFINE_IID!(IID_ISystemMemoryUsageReport, 946224263, 10911, 16442, 189, 25, 44, 243, 232, 22, 149, 0); @@ -4028,21 +4028,21 @@ RT_INTERFACE!{interface ISystemMemoryUsageReport(ISystemMemoryUsageReportVtbl): fn get_CommittedSizeInBytes(&self, out: *mut u64) -> HRESULT }} impl ISystemMemoryUsageReport { - #[inline] pub unsafe fn get_total_physical_size_in_bytes(&self) -> Result { + #[inline] pub fn get_total_physical_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TotalPhysicalSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_available_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_available_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AvailableSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_committed_size_in_bytes(&self) -> Result { + }} + #[inline] pub fn get_committed_size_in_bytes(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CommittedSizeInBytes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SystemMemoryUsageReport: ISystemMemoryUsageReport} pub mod tracereporting { // Windows.System.Diagnostics.TraceReporting @@ -4050,84 +4050,84 @@ use ::prelude::*; RT_CLASS!{static class PlatformDiagnosticActions} impl RtActivatable for PlatformDiagnosticActions {} impl PlatformDiagnosticActions { - #[inline] pub fn is_scenario_enabled(scenarioId: Guid) -> Result { unsafe { + #[inline] pub fn is_scenario_enabled(scenarioId: Guid) -> Result { >::get_activation_factory().is_scenario_enabled(scenarioId) - }} - #[inline] pub fn try_escalate_scenario(scenarioId: Guid, escalationType: PlatformDiagnosticEscalationType, outputDirectory: &HStringArg, timestampOutputDirectory: bool, forceEscalationUpload: bool, triggers: &::rt::gen::windows::foundation::collections::IMapView) -> Result { unsafe { + } + #[inline] pub fn try_escalate_scenario(scenarioId: Guid, escalationType: PlatformDiagnosticEscalationType, outputDirectory: &HStringArg, timestampOutputDirectory: bool, forceEscalationUpload: bool, triggers: &foundation::collections::IMapView) -> Result { >::get_activation_factory().try_escalate_scenario(scenarioId, escalationType, outputDirectory, timestampOutputDirectory, forceEscalationUpload, triggers) - }} - #[inline] pub fn download_latest_settings_for_namespace(partner: &HStringArg, feature: &HStringArg, isScenarioNamespace: bool, downloadOverCostedNetwork: bool, downloadOverBattery: bool) -> Result { unsafe { + } + #[inline] pub fn download_latest_settings_for_namespace(partner: &HStringArg, feature: &HStringArg, isScenarioNamespace: bool, downloadOverCostedNetwork: bool, downloadOverBattery: bool) -> Result { >::get_activation_factory().download_latest_settings_for_namespace(partner, feature, isScenarioNamespace, downloadOverCostedNetwork, downloadOverBattery) - }} - #[inline] pub fn get_active_scenario_list() -> Result>> { unsafe { + } + #[inline] pub fn get_active_scenario_list() -> Result>>> { >::get_activation_factory().get_active_scenario_list() - }} - #[inline] pub fn force_upload(latency: PlatformDiagnosticEventBufferLatencies, uploadOverCostedNetwork: bool, uploadOverBattery: bool) -> Result { unsafe { + } + #[inline] pub fn force_upload(latency: PlatformDiagnosticEventBufferLatencies, uploadOverCostedNetwork: bool, uploadOverBattery: bool) -> Result { >::get_activation_factory().force_upload(latency, uploadOverCostedNetwork, uploadOverBattery) - }} - #[inline] pub fn is_trace_running(slotType: PlatformDiagnosticTraceSlotType, scenarioId: Guid, traceProfileHash: u64) -> Result { unsafe { + } + #[inline] pub fn is_trace_running(slotType: PlatformDiagnosticTraceSlotType, scenarioId: Guid, traceProfileHash: u64) -> Result { >::get_activation_factory().is_trace_running(slotType, scenarioId, traceProfileHash) - }} - #[inline] pub fn get_active_trace_runtime(slotType: PlatformDiagnosticTraceSlotType) -> Result> { unsafe { + } + #[inline] pub fn get_active_trace_runtime(slotType: PlatformDiagnosticTraceSlotType) -> Result>> { >::get_activation_factory().get_active_trace_runtime(slotType) - }} - #[inline] pub fn get_known_trace_list(slotType: PlatformDiagnosticTraceSlotType) -> Result>> { unsafe { + } + #[inline] pub fn get_known_trace_list(slotType: PlatformDiagnosticTraceSlotType) -> Result>>> { >::get_activation_factory().get_known_trace_list(slotType) - }} + } } DEFINE_CLSID!(PlatformDiagnosticActions(&[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,84,114,97,99,101,82,101,112,111,114,116,105,110,103,46,80,108,97,116,102,111,114,109,68,105,97,103,110,111,115,116,105,99,65,99,116,105,111,110,115,0]) [CLSID_PlatformDiagnosticActions]); DEFINE_IID!(IID_IPlatformDiagnosticActionsStatics, 3239337210, 37522, 16999, 137, 10, 158, 163, 237, 7, 35, 18); RT_INTERFACE!{static interface IPlatformDiagnosticActionsStatics(IPlatformDiagnosticActionsStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IPlatformDiagnosticActionsStatics] { fn IsScenarioEnabled(&self, scenarioId: Guid, out: *mut bool) -> HRESULT, - fn TryEscalateScenario(&self, scenarioId: Guid, escalationType: PlatformDiagnosticEscalationType, outputDirectory: HSTRING, timestampOutputDirectory: bool, forceEscalationUpload: bool, triggers: *mut ::rt::gen::windows::foundation::collections::IMapView, out: *mut bool) -> HRESULT, + fn TryEscalateScenario(&self, scenarioId: Guid, escalationType: PlatformDiagnosticEscalationType, outputDirectory: HSTRING, timestampOutputDirectory: bool, forceEscalationUpload: bool, triggers: *mut foundation::collections::IMapView, out: *mut bool) -> HRESULT, fn DownloadLatestSettingsForNamespace(&self, partner: HSTRING, feature: HSTRING, isScenarioNamespace: bool, downloadOverCostedNetwork: bool, downloadOverBattery: bool, out: *mut PlatformDiagnosticActionState) -> HRESULT, - fn GetActiveScenarioList(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn GetActiveScenarioList(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn ForceUpload(&self, latency: PlatformDiagnosticEventBufferLatencies, uploadOverCostedNetwork: bool, uploadOverBattery: bool, out: *mut PlatformDiagnosticActionState) -> HRESULT, fn IsTraceRunning(&self, slotType: PlatformDiagnosticTraceSlotType, scenarioId: Guid, traceProfileHash: u64, out: *mut PlatformDiagnosticTraceSlotState) -> HRESULT, fn GetActiveTraceRuntime(&self, slotType: PlatformDiagnosticTraceSlotType, out: *mut *mut PlatformDiagnosticTraceRuntimeInfo) -> HRESULT, - fn GetKnownTraceList(&self, slotType: PlatformDiagnosticTraceSlotType, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn GetKnownTraceList(&self, slotType: PlatformDiagnosticTraceSlotType, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IPlatformDiagnosticActionsStatics { - #[inline] pub unsafe fn is_scenario_enabled(&self, scenarioId: Guid) -> Result { + #[inline] pub fn is_scenario_enabled(&self, scenarioId: Guid) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsScenarioEnabled)(self as *const _ as *mut _, scenarioId, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn try_escalate_scenario(&self, scenarioId: Guid, escalationType: PlatformDiagnosticEscalationType, outputDirectory: &HStringArg, timestampOutputDirectory: bool, forceEscalationUpload: bool, triggers: &::rt::gen::windows::foundation::collections::IMapView) -> Result { + }} + #[inline] pub fn try_escalate_scenario(&self, scenarioId: Guid, escalationType: PlatformDiagnosticEscalationType, outputDirectory: &HStringArg, timestampOutputDirectory: bool, forceEscalationUpload: bool, triggers: &foundation::collections::IMapView) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TryEscalateScenario)(self as *const _ as *mut _, scenarioId, escalationType, outputDirectory.get(), timestampOutputDirectory, forceEscalationUpload, triggers as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn download_latest_settings_for_namespace(&self, partner: &HStringArg, feature: &HStringArg, isScenarioNamespace: bool, downloadOverCostedNetwork: bool, downloadOverBattery: bool) -> Result { + }} + #[inline] pub fn download_latest_settings_for_namespace(&self, partner: &HStringArg, feature: &HStringArg, isScenarioNamespace: bool, downloadOverCostedNetwork: bool, downloadOverBattery: bool) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).DownloadLatestSettingsForNamespace)(self as *const _ as *mut _, partner.get(), feature.get(), isScenarioNamespace, downloadOverCostedNetwork, downloadOverBattery, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_active_scenario_list(&self) -> Result>> { + }} + #[inline] pub fn get_active_scenario_list(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetActiveScenarioList)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn force_upload(&self, latency: PlatformDiagnosticEventBufferLatencies, uploadOverCostedNetwork: bool, uploadOverBattery: bool) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn force_upload(&self, latency: PlatformDiagnosticEventBufferLatencies, uploadOverCostedNetwork: bool, uploadOverBattery: bool) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ForceUpload)(self as *const _ as *mut _, latency, uploadOverCostedNetwork, uploadOverBattery, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_trace_running(&self, slotType: PlatformDiagnosticTraceSlotType, scenarioId: Guid, traceProfileHash: u64) -> Result { + }} + #[inline] pub fn is_trace_running(&self, slotType: PlatformDiagnosticTraceSlotType, scenarioId: Guid, traceProfileHash: u64) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsTraceRunning)(self as *const _ as *mut _, slotType, scenarioId, traceProfileHash, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_active_trace_runtime(&self, slotType: PlatformDiagnosticTraceSlotType) -> Result> { + }} + #[inline] pub fn get_active_trace_runtime(&self, slotType: PlatformDiagnosticTraceSlotType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetActiveTraceRuntime)(self as *const _ as *mut _, slotType, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_known_trace_list(&self, slotType: PlatformDiagnosticTraceSlotType) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_known_trace_list(&self, slotType: PlatformDiagnosticTraceSlotType) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetKnownTraceList)(self as *const _ as *mut _, slotType, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum PlatformDiagnosticActionState: i32 { Success (PlatformDiagnosticActionState_Success) = 0, FreeNetworkNotAvailable (PlatformDiagnosticActionState_FreeNetworkNotAvailable) = 1, ACPowerNotAvailable (PlatformDiagnosticActionState_ACPowerNotAvailable) = 2, @@ -4148,36 +4148,36 @@ RT_INTERFACE!{interface IPlatformDiagnosticTraceInfo(IPlatformDiagnosticTraceInf fn get_Priority(&self, out: *mut PlatformDiagnosticTracePriority) -> HRESULT }} impl IPlatformDiagnosticTraceInfo { - #[inline] pub unsafe fn get_scenario_id(&self) -> Result { + #[inline] pub fn get_scenario_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ScenarioId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_profile_hash(&self) -> Result { + }} + #[inline] pub fn get_profile_hash(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProfileHash)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_exclusive(&self) -> Result { + }} + #[inline] pub fn get_is_exclusive(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsExclusive)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_auto_logger(&self) -> Result { + }} + #[inline] pub fn get_is_auto_logger(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsAutoLogger)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_trace_duration_file_time(&self) -> Result { + }} + #[inline] pub fn get_max_trace_duration_file_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxTraceDurationFileTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_priority(&self) -> Result { + }} + #[inline] pub fn get_priority(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Priority)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PlatformDiagnosticTraceInfo: IPlatformDiagnosticTraceInfo} RT_ENUM! { enum PlatformDiagnosticTracePriority: i32 { @@ -4189,16 +4189,16 @@ RT_INTERFACE!{interface IPlatformDiagnosticTraceRuntimeInfo(IPlatformDiagnosticT fn get_EtwRuntimeFileTime(&self, out: *mut i64) -> HRESULT }} impl IPlatformDiagnosticTraceRuntimeInfo { - #[inline] pub unsafe fn get_runtime_file_time(&self) -> Result { + #[inline] pub fn get_runtime_file_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RuntimeFileTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_etw_runtime_file_time(&self) -> Result { + }} + #[inline] pub fn get_etw_runtime_file_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EtwRuntimeFileTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PlatformDiagnosticTraceRuntimeInfo: IPlatformDiagnosticTraceRuntimeInfo} RT_ENUM! { enum PlatformDiagnosticTraceSlotState: i32 { @@ -4213,12 +4213,12 @@ use ::prelude::*; RT_CLASS!{static class PlatformTelemetryClient} impl RtActivatable for PlatformTelemetryClient {} impl PlatformTelemetryClient { - #[inline] pub fn register(id: &HStringArg) -> Result> { unsafe { + #[inline] pub fn register(id: &HStringArg) -> Result>> { >::get_activation_factory().register(id) - }} - #[inline] pub fn register_with_settings(id: &HStringArg, settings: &PlatformTelemetryRegistrationSettings) -> Result> { unsafe { + } + #[inline] pub fn register_with_settings(id: &HStringArg, settings: &PlatformTelemetryRegistrationSettings) -> Result>> { >::get_activation_factory().register_with_settings(id, settings) - }} + } } DEFINE_CLSID!(PlatformTelemetryClient(&[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,84,101,108,101,109,101,116,114,121,46,80,108,97,116,102,111,114,109,84,101,108,101,109,101,116,114,121,67,108,105,101,110,116,0]) [CLSID_PlatformTelemetryClient]); DEFINE_IID!(IID_IPlatformTelemetryClientStatics, 2616455773, 54723, 20202, 141, 190, 156, 141, 187, 13, 157, 143); @@ -4227,27 +4227,27 @@ RT_INTERFACE!{static interface IPlatformTelemetryClientStatics(IPlatformTelemetr fn RegisterWithSettings(&self, id: HSTRING, settings: *mut PlatformTelemetryRegistrationSettings, out: *mut *mut PlatformTelemetryRegistrationResult) -> HRESULT }} impl IPlatformTelemetryClientStatics { - #[inline] pub unsafe fn register(&self, id: &HStringArg) -> Result> { + #[inline] pub fn register(&self, id: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Register)(self as *const _ as *mut _, id.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn register_with_settings(&self, id: &HStringArg, settings: &PlatformTelemetryRegistrationSettings) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn register_with_settings(&self, id: &HStringArg, settings: &PlatformTelemetryRegistrationSettings) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RegisterWithSettings)(self as *const _ as *mut _, id.get(), settings as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IPlatformTelemetryRegistrationResult, 1300568235, 8850, 18877, 161, 90, 61, 113, 210, 20, 81, 18); RT_INTERFACE!{interface IPlatformTelemetryRegistrationResult(IPlatformTelemetryRegistrationResultVtbl): IInspectable(IInspectableVtbl) [IID_IPlatformTelemetryRegistrationResult] { fn get_Status(&self, out: *mut PlatformTelemetryRegistrationStatus) -> HRESULT }} impl IPlatformTelemetryRegistrationResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PlatformTelemetryRegistrationResult: IPlatformTelemetryRegistrationResult} DEFINE_IID!(IID_IPlatformTelemetryRegistrationSettings, 2174387586, 51737, 16734, 187, 121, 156, 34, 75, 250, 58, 115); @@ -4258,24 +4258,24 @@ RT_INTERFACE!{interface IPlatformTelemetryRegistrationSettings(IPlatformTelemetr fn put_UploadQuotaSize(&self, value: u32) -> HRESULT }} impl IPlatformTelemetryRegistrationSettings { - #[inline] pub unsafe fn get_storage_size(&self) -> Result { + #[inline] pub fn get_storage_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StorageSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_storage_size(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_storage_size(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StorageSize)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_upload_quota_size(&self) -> Result { + }} + #[inline] pub fn get_upload_quota_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UploadQuotaSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_upload_quota_size(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_upload_quota_size(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_UploadQuotaSize)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PlatformTelemetryRegistrationSettings: IPlatformTelemetryRegistrationSettings} impl RtActivatable for PlatformTelemetryRegistrationSettings {} @@ -4288,37 +4288,37 @@ pub mod deviceportal { // Windows.System.Diagnostics.DevicePortal use ::prelude::*; DEFINE_IID!(IID_IDevicePortalConnection, 256147281, 4504, 19873, 141, 84, 189, 239, 57, 62, 9, 182); RT_INTERFACE!{interface IDevicePortalConnection(IDevicePortalConnectionVtbl): IInspectable(IInspectableVtbl) [IID_IDevicePortalConnection] { - fn add_Closed(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Closed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_RequestReceived(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RequestReceived(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn add_Closed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Closed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_RequestReceived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RequestReceived(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IDevicePortalConnection { - #[inline] pub unsafe fn add_closed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub fn add_closed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Closed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_closed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_closed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Closed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_request_received(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_request_received(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RequestReceived)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_request_received(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_request_received(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RequestReceived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DevicePortalConnection: IDevicePortalConnection} impl RtActivatable for DevicePortalConnection {} impl DevicePortalConnection { - #[cfg(feature="windows-applicationmodel")] #[inline] pub fn get_for_app_service_connection(appServiceConnection: &::rt::gen::windows::applicationmodel::appservice::AppServiceConnection) -> Result> { unsafe { + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn get_for_app_service_connection(appServiceConnection: &::rt::gen::windows::applicationmodel::appservice::AppServiceConnection) -> Result>> { >::get_activation_factory().get_for_app_service_connection(appServiceConnection) - }} + } } DEFINE_CLSID!(DevicePortalConnection(&[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,68,101,118,105,99,101,80,111,114,116,97,108,46,68,101,118,105,99,101,80,111,114,116,97,108,67,111,110,110,101,99,116,105,111,110,0]) [CLSID_DevicePortalConnection]); DEFINE_IID!(IID_IDevicePortalConnectionClosedEventArgs, 4244049464, 28722, 17036, 159, 80, 148, 92, 21, 169, 240, 203); @@ -4326,11 +4326,11 @@ RT_INTERFACE!{interface IDevicePortalConnectionClosedEventArgs(IDevicePortalConn fn get_Reason(&self, out: *mut DevicePortalConnectionClosedReason) -> HRESULT }} impl IDevicePortalConnectionClosedEventArgs { - #[inline] pub unsafe fn get_reason(&self) -> Result { + #[inline] pub fn get_reason(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Reason)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class DevicePortalConnectionClosedEventArgs: IDevicePortalConnectionClosedEventArgs} RT_ENUM! { enum DevicePortalConnectionClosedReason: i32 { @@ -4342,16 +4342,16 @@ RT_INTERFACE!{interface IDevicePortalConnectionRequestReceivedEventArgs(IDeviceP #[cfg(feature="windows-web")] fn get_ResponseMessage(&self, out: *mut *mut ::rt::gen::windows::web::http::HttpResponseMessage) -> HRESULT }} impl IDevicePortalConnectionRequestReceivedEventArgs { - #[cfg(feature="windows-web")] #[inline] pub unsafe fn get_request_message(&self) -> Result> { + #[cfg(feature="windows-web")] #[inline] pub fn get_request_message(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RequestMessage)(self 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 get_response_message(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-web")] #[inline] pub fn get_response_message(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ResponseMessage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DevicePortalConnectionRequestReceivedEventArgs: IDevicePortalConnectionRequestReceivedEventArgs} DEFINE_IID!(IID_IDevicePortalConnectionStatics, 1270755815, 59833, 17989, 143, 237, 165, 62, 234, 14, 219, 214); @@ -4359,11 +4359,11 @@ RT_INTERFACE!{static interface IDevicePortalConnectionStatics(IDevicePortalConne #[cfg(feature="windows-applicationmodel")] fn GetForAppServiceConnection(&self, appServiceConnection: *mut ::rt::gen::windows::applicationmodel::appservice::AppServiceConnection, out: *mut *mut DevicePortalConnection) -> HRESULT }} impl IDevicePortalConnectionStatics { - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn get_for_app_service_connection(&self, appServiceConnection: &::rt::gen::windows::applicationmodel::appservice::AppServiceConnection) -> Result> { + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn get_for_app_service_connection(&self, appServiceConnection: &::rt::gen::windows::applicationmodel::appservice::AppServiceConnection) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForAppServiceConnection)(self as *const _ as *mut _, appServiceConnection as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } } // Windows.System.Diagnostics.DevicePortal } // Windows.System.Diagnostics @@ -4372,18 +4372,18 @@ use ::prelude::*; RT_CLASS!{static class KnownRemoteSystemCapabilities} impl RtActivatable for KnownRemoteSystemCapabilities {} impl KnownRemoteSystemCapabilities { - #[inline] pub fn get_app_service() -> Result { unsafe { + #[inline] pub fn get_app_service() -> Result { >::get_activation_factory().get_app_service() - }} - #[inline] pub fn get_launch_uri() -> Result { unsafe { + } + #[inline] pub fn get_launch_uri() -> Result { >::get_activation_factory().get_launch_uri() - }} - #[inline] pub fn get_remote_session() -> Result { unsafe { + } + #[inline] pub fn get_remote_session() -> Result { >::get_activation_factory().get_remote_session() - }} - #[inline] pub fn get_spatial_entity() -> Result { unsafe { + } + #[inline] pub fn get_spatial_entity() -> Result { >::get_activation_factory().get_spatial_entity() - }} + } } DEFINE_CLSID!(KnownRemoteSystemCapabilities(&[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,75,110,111,119,110,82,101,109,111,116,101,83,121,115,116,101,109,67,97,112,97,98,105,108,105,116,105,101,115,0]) [CLSID_KnownRemoteSystemCapabilities]); DEFINE_IID!(IID_IKnownRemoteSystemCapabilitiesStatics, 2164843392, 32650, 17636, 146, 205, 3, 182, 70, 155, 148, 163); @@ -4394,26 +4394,26 @@ RT_INTERFACE!{static interface IKnownRemoteSystemCapabilitiesStatics(IKnownRemot fn get_SpatialEntity(&self, out: *mut HSTRING) -> HRESULT }} impl IKnownRemoteSystemCapabilitiesStatics { - #[inline] pub unsafe fn get_app_service(&self) -> Result { + #[inline] pub fn get_app_service(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppService)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_launch_uri(&self) -> Result { + }} + #[inline] pub fn get_launch_uri(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LaunchUri)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_session(&self) -> Result { + }} + #[inline] pub fn get_remote_session(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteSession)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_spatial_entity(&self) -> Result { + }} + #[inline] pub fn get_spatial_entity(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SpatialEntity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IRemoteSystem, 3981981901, 7696, 19084, 180, 166, 78, 95, 214, 249, 119, 33); RT_INTERFACE!{interface IRemoteSystem(IRemoteSystemVtbl): IInspectable(IInspectableVtbl) [IID_IRemoteSystem] { @@ -4424,69 +4424,69 @@ RT_INTERFACE!{interface IRemoteSystem(IRemoteSystemVtbl): IInspectable(IInspecta fn get_IsAvailableByProximity(&self, out: *mut bool) -> HRESULT }} impl IRemoteSystem { - #[inline] pub unsafe fn get_display_name(&self) -> Result { + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&self) -> Result { + }} + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_kind(&self) -> Result { + }} + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_available_by_proximity(&self) -> Result { + }} + #[inline] pub fn get_is_available_by_proximity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsAvailableByProximity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class RemoteSystem: IRemoteSystem} impl RtActivatable for RemoteSystem {} impl RtActivatable for RemoteSystem {} impl RemoteSystem { - #[cfg(feature="windows-networking")] #[inline] pub fn find_by_host_name_async(hostName: &super::super::networking::HostName) -> Result>> { unsafe { + #[cfg(feature="windows-networking")] #[inline] pub fn find_by_host_name_async(hostName: &super::super::networking::HostName) -> Result>> { >::get_activation_factory().find_by_host_name_async(hostName) - }} - #[inline] pub fn create_watcher() -> Result> { unsafe { + } + #[inline] pub fn create_watcher() -> Result>> { >::get_activation_factory().create_watcher() - }} - #[inline] pub fn create_watcher_with_filters(filters: &super::super::foundation::collections::IIterable) -> Result> { unsafe { + } + #[inline] pub fn create_watcher_with_filters(filters: &foundation::collections::IIterable) -> Result>> { >::get_activation_factory().create_watcher_with_filters(filters) - }} - #[inline] pub fn request_access_async() -> Result>> { unsafe { + } + #[inline] pub fn request_access_async() -> Result>> { >::get_activation_factory().request_access_async() - }} - #[inline] pub fn is_authorization_kind_enabled(kind: RemoteSystemAuthorizationKind) -> Result { unsafe { + } + #[inline] pub fn is_authorization_kind_enabled(kind: RemoteSystemAuthorizationKind) -> Result { >::get_activation_factory().is_authorization_kind_enabled(kind) - }} + } } DEFINE_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]) [CLSID_RemoteSystem]); DEFINE_IID!(IID_IRemoteSystem2, 165668076, 64395, 18952, 167, 88, 104, 118, 67, 93, 118, 158); RT_INTERFACE!{interface IRemoteSystem2(IRemoteSystem2Vtbl): IInspectable(IInspectableVtbl) [IID_IRemoteSystem2] { fn get_IsAvailableBySpatialProximity(&self, out: *mut bool) -> HRESULT, - fn GetCapabilitySupportedAsync(&self, capabilityName: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn GetCapabilitySupportedAsync(&self, capabilityName: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IRemoteSystem2 { - #[inline] pub unsafe fn get_is_available_by_spatial_proximity(&self) -> Result { + #[inline] pub fn get_is_available_by_spatial_proximity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsAvailableBySpatialProximity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_capability_supported_async(&self, capabilityName: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_capability_supported_async(&self, capabilityName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCapabilitySupportedAsync)(self as *const _ as *mut _, capabilityName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IRemoteSystem3, 1924445333, 47046, 16574, 131, 27, 115, 86, 47, 18, 255, 168); RT_INTERFACE!{interface IRemoteSystem3(IRemoteSystem3Vtbl): IInspectable(IInspectableVtbl) [IID_IRemoteSystem3] { @@ -4494,16 +4494,16 @@ RT_INTERFACE!{interface IRemoteSystem3(IRemoteSystem3Vtbl): IInspectable(IInspec fn get_ModelDisplayName(&self, out: *mut HSTRING) -> HRESULT }} impl IRemoteSystem3 { - #[inline] pub unsafe fn get_manufacturer_display_name(&self) -> Result { + #[inline] pub fn get_manufacturer_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ManufacturerDisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_model_display_name(&self) -> Result { + }} + #[inline] pub fn get_model_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ModelDisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum RemoteSystemAccessStatus: i32 { Unspecified (RemoteSystemAccessStatus_Unspecified) = 0, Allowed (RemoteSystemAccessStatus_Allowed) = 1, DeniedByUser (RemoteSystemAccessStatus_DeniedByUser) = 2, DeniedBySystem (RemoteSystemAccessStatus_DeniedBySystem) = 3, @@ -4513,11 +4513,11 @@ RT_INTERFACE!{interface IRemoteSystemAddedEventArgs(IRemoteSystemAddedEventArgsV fn get_RemoteSystem(&self, out: *mut *mut RemoteSystem) -> HRESULT }} impl IRemoteSystemAddedEventArgs { - #[inline] pub unsafe fn get_remote_system(&self) -> Result> { + #[inline] pub fn get_remote_system(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteSystem)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RemoteSystemAddedEventArgs: IRemoteSystemAddedEventArgs} RT_ENUM! { enum RemoteSystemAuthorizationKind: i32 { @@ -4528,18 +4528,18 @@ RT_INTERFACE!{interface IRemoteSystemAuthorizationKindFilter(IRemoteSystemAuthor fn get_RemoteSystemAuthorizationKind(&self, out: *mut RemoteSystemAuthorizationKind) -> HRESULT }} impl IRemoteSystemAuthorizationKindFilter { - #[inline] pub unsafe fn get_remote_system_authorization_kind(&self) -> Result { + #[inline] pub fn get_remote_system_authorization_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RemoteSystemAuthorizationKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class RemoteSystemAuthorizationKindFilter: IRemoteSystemAuthorizationKindFilter} impl RtActivatable for RemoteSystemAuthorizationKindFilter {} impl RemoteSystemAuthorizationKindFilter { - #[inline] pub fn create(remoteSystemAuthorizationKind: RemoteSystemAuthorizationKind) -> Result> { unsafe { + #[inline] pub fn create(remoteSystemAuthorizationKind: RemoteSystemAuthorizationKind) -> Result> { >::get_activation_factory().create(remoteSystemAuthorizationKind) - }} + } } DEFINE_CLSID!(RemoteSystemAuthorizationKindFilter(&[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,65,117,116,104,111,114,105,122,97,116,105,111,110,75,105,110,100,70,105,108,116,101,114,0]) [CLSID_RemoteSystemAuthorizationKindFilter]); DEFINE_IID!(IID_IRemoteSystemAuthorizationKindFilterFactory, 2909134669, 46698, 17828, 129, 119, 140, 174, 215, 93, 158, 90); @@ -4547,29 +4547,29 @@ RT_INTERFACE!{static interface IRemoteSystemAuthorizationKindFilterFactory(IRemo fn Create(&self, remoteSystemAuthorizationKind: RemoteSystemAuthorizationKind, out: *mut *mut RemoteSystemAuthorizationKindFilter) -> HRESULT }} impl IRemoteSystemAuthorizationKindFilterFactory { - #[inline] pub unsafe fn create(&self, remoteSystemAuthorizationKind: RemoteSystemAuthorizationKind) -> Result> { + #[inline] pub fn create(&self, remoteSystemAuthorizationKind: RemoteSystemAuthorizationKind) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, remoteSystemAuthorizationKind, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut RemoteSystem) -> HRESULT }} impl IRemoteSystemConnectionRequest { - #[inline] pub unsafe fn get_remote_system(&self) -> Result> { + #[inline] pub fn get_remote_system(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteSystem)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RemoteSystemConnectionRequest: IRemoteSystemConnectionRequest} impl RtActivatable for RemoteSystemConnectionRequest {} impl RemoteSystemConnectionRequest { - #[inline] pub fn create(remoteSystem: &RemoteSystem) -> Result> { unsafe { + #[inline] pub fn create(remoteSystem: &RemoteSystem) -> Result> { >::get_activation_factory().create(remoteSystem) - }} + } } DEFINE_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]) [CLSID_RemoteSystemConnectionRequest]); DEFINE_IID!(IID_IRemoteSystemConnectionRequestFactory, 2852784672, 47851, 17781, 181, 48, 129, 11, 185, 120, 99, 52); @@ -4577,11 +4577,11 @@ RT_INTERFACE!{static interface IRemoteSystemConnectionRequestFactory(IRemoteSyst fn Create(&self, remoteSystem: *mut RemoteSystem, out: *mut *mut RemoteSystemConnectionRequest) -> HRESULT }} impl IRemoteSystemConnectionRequestFactory { - #[inline] pub unsafe fn create(&self, remoteSystem: &RemoteSystem) -> Result> { + #[inline] pub fn create(&self, remoteSystem: &RemoteSystem) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, remoteSystem as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum RemoteSystemDiscoveryType: i32 { Any (RemoteSystemDiscoveryType_Any) = 0, Proximal (RemoteSystemDiscoveryType_Proximal) = 1, Cloud (RemoteSystemDiscoveryType_Cloud) = 2, SpatiallyProximal (RemoteSystemDiscoveryType_SpatiallyProximal) = 3, @@ -4591,18 +4591,18 @@ RT_INTERFACE!{interface IRemoteSystemDiscoveryTypeFilter(IRemoteSystemDiscoveryT fn get_RemoteSystemDiscoveryType(&self, out: *mut RemoteSystemDiscoveryType) -> HRESULT }} impl IRemoteSystemDiscoveryTypeFilter { - #[inline] pub unsafe fn get_remote_system_discovery_type(&self) -> Result { + #[inline] pub fn get_remote_system_discovery_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RemoteSystemDiscoveryType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class RemoteSystemDiscoveryTypeFilter: IRemoteSystemDiscoveryTypeFilter} impl RtActivatable for RemoteSystemDiscoveryTypeFilter {} impl RemoteSystemDiscoveryTypeFilter { - #[inline] pub fn create(discoveryType: RemoteSystemDiscoveryType) -> Result> { unsafe { + #[inline] pub fn create(discoveryType: RemoteSystemDiscoveryType) -> Result> { >::get_activation_factory().create(discoveryType) - }} + } } DEFINE_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]) [CLSID_RemoteSystemDiscoveryTypeFilter]); DEFINE_IID!(IID_IRemoteSystemDiscoveryTypeFilterFactory, 2677979539, 49760, 16737, 146, 242, 156, 2, 31, 35, 254, 93); @@ -4610,11 +4610,11 @@ RT_INTERFACE!{static interface IRemoteSystemDiscoveryTypeFilterFactory(IRemoteSy fn Create(&self, discoveryType: RemoteSystemDiscoveryType, out: *mut *mut RemoteSystemDiscoveryTypeFilter) -> HRESULT }} impl IRemoteSystemDiscoveryTypeFilterFactory { - #[inline] pub unsafe fn create(&self, discoveryType: RemoteSystemDiscoveryType) -> Result> { + #[inline] pub fn create(&self, discoveryType: RemoteSystemDiscoveryType) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, discoveryType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IRemoteSystemFilter, 1245424100, 39403, 17899, 186, 22, 3, 103, 114, 143, 243, 116); RT_INTERFACE!{interface IRemoteSystemFilter(IRemoteSystemFilterVtbl): IInspectable(IInspectableVtbl) [IID_IRemoteSystemFilter] { @@ -4622,62 +4622,62 @@ RT_INTERFACE!{interface IRemoteSystemFilter(IRemoteSystemFilterVtbl): IInspectab }} 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_RemoteSystemKinds(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IRemoteSystemKindFilter { - #[inline] pub unsafe fn get_remote_system_kinds(&self) -> Result>> { + #[inline] pub fn get_remote_system_kinds(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteSystemKinds)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RemoteSystemKindFilter: IRemoteSystemKindFilter} impl RtActivatable for RemoteSystemKindFilter {} impl RemoteSystemKindFilter { - #[inline] pub fn create(remoteSystemKinds: &super::super::foundation::collections::IIterable) -> Result> { unsafe { + #[inline] pub fn create(remoteSystemKinds: &foundation::collections::IIterable) -> Result> { >::get_activation_factory().create(remoteSystemKinds) - }} + } } DEFINE_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]) [CLSID_RemoteSystemKindFilter]); 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(&self, remoteSystemKinds: *mut super::super::foundation::collections::IIterable, out: *mut *mut RemoteSystemKindFilter) -> HRESULT + fn Create(&self, remoteSystemKinds: *mut foundation::collections::IIterable, out: *mut *mut RemoteSystemKindFilter) -> HRESULT }} impl IRemoteSystemKindFilterFactory { - #[inline] pub unsafe fn create(&self, remoteSystemKinds: &super::super::foundation::collections::IIterable) -> Result> { + #[inline] pub fn create(&self, remoteSystemKinds: &foundation::collections::IIterable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, remoteSystemKinds as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class RemoteSystemKinds} impl RtActivatable for RemoteSystemKinds {} impl RtActivatable for RemoteSystemKinds {} impl RemoteSystemKinds { - #[inline] pub fn get_phone() -> Result { unsafe { + #[inline] pub fn get_phone() -> Result { >::get_activation_factory().get_phone() - }} - #[inline] pub fn get_hub() -> Result { unsafe { + } + #[inline] pub fn get_hub() -> Result { >::get_activation_factory().get_hub() - }} - #[inline] pub fn get_holographic() -> Result { unsafe { + } + #[inline] pub fn get_holographic() -> Result { >::get_activation_factory().get_holographic() - }} - #[inline] pub fn get_desktop() -> Result { unsafe { + } + #[inline] pub fn get_desktop() -> Result { >::get_activation_factory().get_desktop() - }} - #[inline] pub fn get_xbox() -> Result { unsafe { + } + #[inline] pub fn get_xbox() -> Result { >::get_activation_factory().get_xbox() - }} - #[inline] pub fn get_iot() -> Result { unsafe { + } + #[inline] pub fn get_iot() -> Result { >::get_activation_factory().get_iot() - }} - #[inline] pub fn get_tablet() -> Result { unsafe { + } + #[inline] pub fn get_tablet() -> Result { >::get_activation_factory().get_tablet() - }} - #[inline] pub fn get_laptop() -> Result { unsafe { + } + #[inline] pub fn get_laptop() -> Result { >::get_activation_factory().get_laptop() - }} + } } DEFINE_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]) [CLSID_RemoteSystemKinds]); DEFINE_IID!(IID_IRemoteSystemKindStatics, 4130436659, 43796, 16848, 149, 83, 121, 106, 173, 184, 130, 219); @@ -4689,31 +4689,31 @@ RT_INTERFACE!{static interface IRemoteSystemKindStatics(IRemoteSystemKindStatics fn get_Xbox(&self, out: *mut HSTRING) -> HRESULT }} impl IRemoteSystemKindStatics { - #[inline] pub unsafe fn get_phone(&self) -> Result { + #[inline] pub fn get_phone(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Phone)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_hub(&self) -> Result { + }} + #[inline] pub fn get_hub(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Hub)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_holographic(&self) -> Result { + }} + #[inline] pub fn get_holographic(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Holographic)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_desktop(&self) -> Result { + }} + #[inline] pub fn get_desktop(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Desktop)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_xbox(&self) -> Result { + }} + #[inline] pub fn get_xbox(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Xbox)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IRemoteSystemKindStatics2, 3118703568, 1126, 18249, 145, 232, 101, 249, 209, 154, 150, 165); RT_INTERFACE!{static interface IRemoteSystemKindStatics2(IRemoteSystemKindStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IRemoteSystemKindStatics2] { @@ -4722,32 +4722,32 @@ RT_INTERFACE!{static interface IRemoteSystemKindStatics2(IRemoteSystemKindStatic fn get_Laptop(&self, out: *mut HSTRING) -> HRESULT }} impl IRemoteSystemKindStatics2 { - #[inline] pub unsafe fn get_iot(&self) -> Result { + #[inline] pub fn get_iot(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Iot)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_tablet(&self) -> Result { + }} + #[inline] pub fn get_tablet(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Tablet)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_laptop(&self) -> Result { + }} + #[inline] pub fn get_laptop(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Laptop)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::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(&self, out: *mut HSTRING) -> HRESULT }} impl IRemoteSystemRemovedEventArgs { - #[inline] pub unsafe fn get_remote_system_id(&self) -> Result { + #[inline] pub fn get_remote_system_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteSystemId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class RemoteSystemRemovedEventArgs: IRemoteSystemRemovedEventArgs} DEFINE_IID!(IID_IRemoteSystemSession, 1766287873, 39642, 18703, 149, 73, 211, 28, 177, 76, 158, 149); @@ -4755,53 +4755,53 @@ RT_INTERFACE!{interface IRemoteSystemSession(IRemoteSystemSessionVtbl): IInspect fn get_Id(&self, out: *mut HSTRING) -> HRESULT, fn get_DisplayName(&self, out: *mut HSTRING) -> HRESULT, fn get_ControllerDisplayName(&self, out: *mut HSTRING) -> HRESULT, - fn add_Disconnected(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Disconnected(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Disconnected(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Disconnected(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn CreateParticipantWatcher(&self, out: *mut *mut RemoteSystemSessionParticipantWatcher) -> HRESULT, - fn SendInvitationAsync(&self, invitee: *mut RemoteSystem, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn SendInvitationAsync(&self, invitee: *mut RemoteSystem, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IRemoteSystemSession { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_controller_display_name(&self) -> Result { + }} + #[inline] pub fn get_controller_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ControllerDisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_disconnected(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_disconnected(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Disconnected)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_disconnected(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_disconnected(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Disconnected)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn create_participant_watcher(&self) -> Result> { + }} + #[inline] pub fn create_participant_watcher(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateParticipantWatcher)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn send_invitation_async(&self, invitee: &RemoteSystem) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn send_invitation_async(&self, invitee: &RemoteSystem) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SendInvitationAsync)(self as *const _ as *mut _, invitee as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class RemoteSystemSession: IRemoteSystemSession} impl RtActivatable for RemoteSystemSession {} impl RemoteSystemSession { - #[inline] pub fn create_watcher() -> Result> { unsafe { + #[inline] pub fn create_watcher() -> Result>> { >::get_activation_factory().create_watcher() - }} + } } DEFINE_CLSID!(RemoteSystemSession(&[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,101,115,115,105,111,110,0]) [CLSID_RemoteSystemSession]); DEFINE_IID!(IID_IRemoteSystemSessionAddedEventArgs, 3582318420, 48279, 19513, 153, 180, 190, 202, 118, 224, 76, 63); @@ -4809,50 +4809,50 @@ RT_INTERFACE!{interface IRemoteSystemSessionAddedEventArgs(IRemoteSystemSessionA fn get_SessionInfo(&self, out: *mut *mut RemoteSystemSessionInfo) -> HRESULT }} impl IRemoteSystemSessionAddedEventArgs { - #[inline] pub unsafe fn get_session_info(&self) -> Result> { + #[inline] pub fn get_session_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SessionInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RemoteSystemSessionAddedEventArgs: IRemoteSystemSessionAddedEventArgs} DEFINE_IID!(IID_IRemoteSystemSessionController, 3834326482, 26656, 18535, 180, 37, 216, 156, 10, 62, 247, 186); RT_INTERFACE!{interface IRemoteSystemSessionController(IRemoteSystemSessionControllerVtbl): IInspectable(IInspectableVtbl) [IID_IRemoteSystemSessionController] { - fn add_JoinRequested(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_JoinRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn RemoveParticipantAsync(&self, pParticipant: *mut RemoteSystemSessionParticipant, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn CreateSessionAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn add_JoinRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_JoinRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn RemoveParticipantAsync(&self, pParticipant: *mut RemoteSystemSessionParticipant, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn CreateSessionAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IRemoteSystemSessionController { - #[inline] pub unsafe fn add_join_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_join_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_JoinRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_join_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_join_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_JoinRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove_participant_async(&self, pParticipant: &RemoteSystemSessionParticipant) -> Result>> { + }} + #[inline] pub fn remove_participant_async(&self, pParticipant: &RemoteSystemSessionParticipant) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RemoveParticipantAsync)(self as *const _ as *mut _, pParticipant as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_session_async(&self) -> Result>> { + }} + #[inline] pub fn create_session_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateSessionAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class RemoteSystemSessionController: IRemoteSystemSessionController} impl RtActivatable for RemoteSystemSessionController {} impl RemoteSystemSessionController { - #[inline] pub fn create_controller(displayName: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_controller(displayName: &HStringArg) -> Result> { >::get_activation_factory().create_controller(displayName) - }} - #[inline] pub fn create_controller_with_session_options(displayName: &HStringArg, options: &RemoteSystemSessionOptions) -> Result> { unsafe { + } + #[inline] pub fn create_controller_with_session_options(displayName: &HStringArg, options: &RemoteSystemSessionOptions) -> Result> { >::get_activation_factory().create_controller_with_session_options(displayName, options) - }} + } } DEFINE_CLSID!(RemoteSystemSessionController(&[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,101,115,115,105,111,110,67,111,110,116,114,111,108,108,101,114,0]) [CLSID_RemoteSystemSessionController]); DEFINE_IID!(IID_IRemoteSystemSessionControllerFactory, 3217829739, 44093, 16793, 130, 205, 102, 112, 167, 115, 239, 46); @@ -4861,16 +4861,16 @@ RT_INTERFACE!{static interface IRemoteSystemSessionControllerFactory(IRemoteSyst fn CreateControllerWithSessionOptions(&self, displayName: HSTRING, options: *mut RemoteSystemSessionOptions, out: *mut *mut RemoteSystemSessionController) -> HRESULT }} impl IRemoteSystemSessionControllerFactory { - #[inline] pub unsafe fn create_controller(&self, displayName: &HStringArg) -> Result> { + #[inline] pub fn create_controller(&self, displayName: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateController)(self as *const _ as *mut _, displayName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_controller_with_session_options(&self, displayName: &HStringArg, options: &RemoteSystemSessionOptions) -> Result> { + }} + #[inline] pub fn create_controller_with_session_options(&self, displayName: &HStringArg, options: &RemoteSystemSessionOptions) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateControllerWithSessionOptions)(self as *const _ as *mut _, displayName.get(), options as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IRemoteSystemSessionCreationResult, 2811761346, 14302, 17548, 139, 131, 163, 10, 163, 196, 234, 214); RT_INTERFACE!{interface IRemoteSystemSessionCreationResult(IRemoteSystemSessionCreationResultVtbl): IInspectable(IInspectableVtbl) [IID_IRemoteSystemSessionCreationResult] { @@ -4878,16 +4878,16 @@ RT_INTERFACE!{interface IRemoteSystemSessionCreationResult(IRemoteSystemSessionC fn get_Session(&self, out: *mut *mut RemoteSystemSession) -> HRESULT }} impl IRemoteSystemSessionCreationResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_session(&self) -> Result> { + }} + #[inline] pub fn get_session(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Session)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RemoteSystemSessionCreationResult: IRemoteSystemSessionCreationResult} RT_ENUM! { enum RemoteSystemSessionCreationStatus: i32 { @@ -4898,11 +4898,11 @@ RT_INTERFACE!{interface IRemoteSystemSessionDisconnectedEventArgs(IRemoteSystemS fn get_Reason(&self, out: *mut RemoteSystemSessionDisconnectedReason) -> HRESULT }} impl IRemoteSystemSessionDisconnectedEventArgs { - #[inline] pub unsafe fn get_reason(&self) -> Result { + #[inline] pub fn get_reason(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Reason)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class RemoteSystemSessionDisconnectedEventArgs: IRemoteSystemSessionDisconnectedEventArgs} RT_ENUM! { enum RemoteSystemSessionDisconnectedReason: i32 { @@ -4912,24 +4912,24 @@ DEFINE_IID!(IID_IRemoteSystemSessionInfo, 4283299400, 35594, 20122, 153, 5, 105, RT_INTERFACE!{interface IRemoteSystemSessionInfo(IRemoteSystemSessionInfoVtbl): IInspectable(IInspectableVtbl) [IID_IRemoteSystemSessionInfo] { fn get_DisplayName(&self, out: *mut HSTRING) -> HRESULT, fn get_ControllerDisplayName(&self, out: *mut HSTRING) -> HRESULT, - fn JoinAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn JoinAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IRemoteSystemSessionInfo { - #[inline] pub unsafe fn get_display_name(&self) -> Result { + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_controller_display_name(&self) -> Result { + }} + #[inline] pub fn get_controller_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ControllerDisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn join_async(&self) -> Result>> { + }} + #[inline] pub fn join_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).JoinAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class RemoteSystemSessionInfo: IRemoteSystemSessionInfo} DEFINE_IID!(IID_IRemoteSystemSessionInvitation, 1043516561, 20951, 18278, 161, 33, 37, 81, 108, 59, 130, 148); @@ -4938,33 +4938,33 @@ RT_INTERFACE!{interface IRemoteSystemSessionInvitation(IRemoteSystemSessionInvit fn get_SessionInfo(&self, out: *mut *mut RemoteSystemSessionInfo) -> HRESULT }} impl IRemoteSystemSessionInvitation { - #[inline] pub unsafe fn get_sender(&self) -> Result> { + #[inline] pub fn get_sender(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Sender)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_session_info(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_session_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SessionInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RemoteSystemSessionInvitation: IRemoteSystemSessionInvitation} DEFINE_IID!(IID_IRemoteSystemSessionInvitationListener, 150208575, 48241, 18913, 135, 74, 49, 221, 255, 154, 39, 185); RT_INTERFACE!{interface IRemoteSystemSessionInvitationListener(IRemoteSystemSessionInvitationListenerVtbl): IInspectable(IInspectableVtbl) [IID_IRemoteSystemSessionInvitationListener] { - fn add_InvitationReceived(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_InvitationReceived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_InvitationReceived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_InvitationReceived(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IRemoteSystemSessionInvitationListener { - #[inline] pub unsafe fn add_invitation_received(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_invitation_received(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_InvitationReceived)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_invitation_received(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_invitation_received(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_InvitationReceived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class RemoteSystemSessionInvitationListener: IRemoteSystemSessionInvitationListener} impl RtActivatable for RemoteSystemSessionInvitationListener {} @@ -4974,11 +4974,11 @@ RT_INTERFACE!{interface IRemoteSystemSessionInvitationReceivedEventArgs(IRemoteS fn get_Invitation(&self, out: *mut *mut RemoteSystemSessionInvitation) -> HRESULT }} impl IRemoteSystemSessionInvitationReceivedEventArgs { - #[inline] pub unsafe fn get_invitation(&self) -> Result> { + #[inline] pub fn get_invitation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Invitation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RemoteSystemSessionInvitationReceivedEventArgs: IRemoteSystemSessionInvitationReceivedEventArgs} DEFINE_IID!(IID_IRemoteSystemSessionJoinRequest, 543162472, 31124, 17201, 134, 209, 216, 157, 136, 37, 133, 238); @@ -4987,33 +4987,33 @@ RT_INTERFACE!{interface IRemoteSystemSessionJoinRequest(IRemoteSystemSessionJoin fn Accept(&self) -> HRESULT }} impl IRemoteSystemSessionJoinRequest { - #[inline] pub unsafe fn get_participant(&self) -> Result> { + #[inline] pub fn get_participant(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Participant)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn accept(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn accept(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Accept)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class RemoteSystemSessionJoinRequest: IRemoteSystemSessionJoinRequest} DEFINE_IID!(IID_IRemoteSystemSessionJoinRequestedEventArgs, 3687468995, 33465, 18454, 156, 36, 228, 14, 97, 119, 75, 216); RT_INTERFACE!{interface IRemoteSystemSessionJoinRequestedEventArgs(IRemoteSystemSessionJoinRequestedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IRemoteSystemSessionJoinRequestedEventArgs] { fn get_JoinRequest(&self, out: *mut *mut RemoteSystemSessionJoinRequest) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut super::super::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl IRemoteSystemSessionJoinRequestedEventArgs { - #[inline] pub unsafe fn get_join_request(&self) -> Result> { + #[inline] pub fn get_join_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_JoinRequest)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RemoteSystemSessionJoinRequestedEventArgs: IRemoteSystemSessionJoinRequestedEventArgs} DEFINE_IID!(IID_IRemoteSystemSessionJoinResult, 3464175364, 41022, 16804, 144, 11, 30, 121, 50, 140, 18, 103); @@ -5022,16 +5022,16 @@ RT_INTERFACE!{interface IRemoteSystemSessionJoinResult(IRemoteSystemSessionJoinR fn get_Session(&self, out: *mut *mut RemoteSystemSession) -> HRESULT }} impl IRemoteSystemSessionJoinResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_session(&self) -> Result> { + }} + #[inline] pub fn get_session(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Session)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RemoteSystemSessionJoinResult: IRemoteSystemSessionJoinResult} RT_ENUM! { enum RemoteSystemSessionJoinStatus: i32 { @@ -5040,52 +5040,52 @@ RT_ENUM! { enum RemoteSystemSessionJoinStatus: i32 { DEFINE_IID!(IID_IRemoteSystemSessionMessageChannel, 2502218026, 29657, 19472, 183, 81, 194, 103, 132, 67, 113, 39); RT_INTERFACE!{interface IRemoteSystemSessionMessageChannel(IRemoteSystemSessionMessageChannelVtbl): IInspectable(IInspectableVtbl) [IID_IRemoteSystemSessionMessageChannel] { fn get_Session(&self, out: *mut *mut RemoteSystemSession) -> HRESULT, - fn BroadcastValueSetAsync(&self, messageData: *mut super::super::foundation::collections::ValueSet, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn SendValueSetAsync(&self, messageData: *mut super::super::foundation::collections::ValueSet, participant: *mut RemoteSystemSessionParticipant, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn SendValueSetToParticipantsAsync(&self, messageData: *mut super::super::foundation::collections::ValueSet, participants: *mut super::super::foundation::collections::IIterable, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn add_ValueSetReceived(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ValueSetReceived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn BroadcastValueSetAsync(&self, messageData: *mut foundation::collections::ValueSet, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn SendValueSetAsync(&self, messageData: *mut foundation::collections::ValueSet, participant: *mut RemoteSystemSessionParticipant, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn SendValueSetToParticipantsAsync(&self, messageData: *mut foundation::collections::ValueSet, participants: *mut foundation::collections::IIterable, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn add_ValueSetReceived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ValueSetReceived(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IRemoteSystemSessionMessageChannel { - #[inline] pub unsafe fn get_session(&self) -> Result> { + #[inline] pub fn get_session(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Session)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn broadcast_value_set_async(&self, messageData: &super::super::foundation::collections::ValueSet) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn broadcast_value_set_async(&self, messageData: &foundation::collections::ValueSet) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).BroadcastValueSetAsync)(self as *const _ as *mut _, messageData as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn send_value_set_async(&self, messageData: &super::super::foundation::collections::ValueSet, participant: &RemoteSystemSessionParticipant) -> Result>> { + }} + #[inline] pub fn send_value_set_async(&self, messageData: &foundation::collections::ValueSet, participant: &RemoteSystemSessionParticipant) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SendValueSetAsync)(self as *const _ as *mut _, messageData as *const _ as *mut _, participant as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn send_value_set_to_participants_async(&self, messageData: &super::super::foundation::collections::ValueSet, participants: &super::super::foundation::collections::IIterable) -> Result>> { + }} + #[inline] pub fn send_value_set_to_participants_async(&self, messageData: &foundation::collections::ValueSet, participants: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SendValueSetToParticipantsAsync)(self as *const _ as *mut _, messageData as *const _ as *mut _, participants as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_value_set_received(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_value_set_received(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ValueSetReceived)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_value_set_received(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_value_set_received(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ValueSetReceived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class RemoteSystemSessionMessageChannel: IRemoteSystemSessionMessageChannel} impl RtActivatable for RemoteSystemSessionMessageChannel {} impl RemoteSystemSessionMessageChannel { - #[inline] pub fn create(session: &RemoteSystemSession, channelName: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(session: &RemoteSystemSession, channelName: &HStringArg) -> Result> { >::get_activation_factory().create(session, channelName) - }} - #[inline] pub fn create_with_reliability(session: &RemoteSystemSession, channelName: &HStringArg, reliability: RemoteSystemSessionMessageChannelReliability) -> Result> { unsafe { + } + #[inline] pub fn create_with_reliability(session: &RemoteSystemSession, channelName: &HStringArg, reliability: RemoteSystemSessionMessageChannelReliability) -> Result> { >::get_activation_factory().create_with_reliability(session, channelName, reliability) - }} + } } DEFINE_CLSID!(RemoteSystemSessionMessageChannel(&[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,101,115,115,105,111,110,77,101,115,115,97,103,101,67,104,97,110,110,101,108,0]) [CLSID_RemoteSystemSessionMessageChannel]); DEFINE_IID!(IID_IRemoteSystemSessionMessageChannelFactory, 694033482, 48406, 17048, 183, 206, 65, 84, 130, 176, 225, 29); @@ -5094,16 +5094,16 @@ RT_INTERFACE!{static interface IRemoteSystemSessionMessageChannelFactory(IRemote fn CreateWithReliability(&self, session: *mut RemoteSystemSession, channelName: HSTRING, reliability: RemoteSystemSessionMessageChannelReliability, out: *mut *mut RemoteSystemSessionMessageChannel) -> HRESULT }} impl IRemoteSystemSessionMessageChannelFactory { - #[inline] pub unsafe fn create(&self, session: &RemoteSystemSession, channelName: &HStringArg) -> Result> { + #[inline] pub fn create(&self, session: &RemoteSystemSession, channelName: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, session as *const _ as *mut _, channelName.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_reliability(&self, session: &RemoteSystemSession, channelName: &HStringArg, reliability: RemoteSystemSessionMessageChannelReliability) -> Result> { + }} + #[inline] pub fn create_with_reliability(&self, session: &RemoteSystemSession, channelName: &HStringArg, reliability: RemoteSystemSessionMessageChannelReliability) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithReliability)(self as *const _ as *mut _, session as *const _ as *mut _, channelName.get(), reliability, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum RemoteSystemSessionMessageChannelReliability: i32 { Reliable (RemoteSystemSessionMessageChannelReliability_Reliable) = 0, Unreliable (RemoteSystemSessionMessageChannelReliability_Unreliable) = 1, @@ -5114,15 +5114,15 @@ RT_INTERFACE!{interface IRemoteSystemSessionOptions(IRemoteSystemSessionOptionsV fn put_IsInviteOnly(&self, value: bool) -> HRESULT }} impl IRemoteSystemSessionOptions { - #[inline] pub unsafe fn get_is_invite_only(&self) -> Result { + #[inline] pub fn get_is_invite_only(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsInviteOnly)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_invite_only(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_invite_only(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsInviteOnly)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class RemoteSystemSessionOptions: IRemoteSystemSessionOptions} impl RtActivatable for RemoteSystemSessionOptions {} @@ -5130,19 +5130,19 @@ DEFINE_CLSID!(RemoteSystemSessionOptions(&[87,105,110,100,111,119,115,46,83,121, DEFINE_IID!(IID_IRemoteSystemSessionParticipant, 2123367820, 44281, 18217, 138, 23, 68, 231, 186, 237, 93, 204); RT_INTERFACE!{interface IRemoteSystemSessionParticipant(IRemoteSystemSessionParticipantVtbl): IInspectable(IInspectableVtbl) [IID_IRemoteSystemSessionParticipant] { fn get_RemoteSystem(&self, out: *mut *mut RemoteSystem) -> HRESULT, - #[cfg(feature="windows-networking")] fn GetHostNames(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + #[cfg(feature="windows-networking")] fn GetHostNames(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IRemoteSystemSessionParticipant { - #[inline] pub unsafe fn get_remote_system(&self) -> Result> { + #[inline] pub fn get_remote_system(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteSystem)(self 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 get_host_names(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-networking")] #[inline] pub fn get_host_names(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetHostNames)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RemoteSystemSessionParticipant: IRemoteSystemSessionParticipant} DEFINE_IID!(IID_IRemoteSystemSessionParticipantAddedEventArgs, 3545913304, 51617, 19383, 182, 176, 121, 187, 145, 173, 249, 61); @@ -5150,11 +5150,11 @@ RT_INTERFACE!{interface IRemoteSystemSessionParticipantAddedEventArgs(IRemoteSys fn get_Participant(&self, out: *mut *mut RemoteSystemSessionParticipant) -> HRESULT }} impl IRemoteSystemSessionParticipantAddedEventArgs { - #[inline] pub unsafe fn get_participant(&self) -> Result> { + #[inline] pub fn get_participant(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Participant)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RemoteSystemSessionParticipantAddedEventArgs: IRemoteSystemSessionParticipantAddedEventArgs} DEFINE_IID!(IID_IRemoteSystemSessionParticipantRemovedEventArgs, 2255417480, 56936, 19135, 136, 161, 249, 13, 22, 39, 65, 146); @@ -5162,11 +5162,11 @@ RT_INTERFACE!{interface IRemoteSystemSessionParticipantRemovedEventArgs(IRemoteS fn get_Participant(&self, out: *mut *mut RemoteSystemSessionParticipant) -> HRESULT }} impl IRemoteSystemSessionParticipantRemovedEventArgs { - #[inline] pub unsafe fn get_participant(&self) -> Result> { + #[inline] pub fn get_participant(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Participant)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RemoteSystemSessionParticipantRemovedEventArgs: IRemoteSystemSessionParticipantRemovedEventArgs} DEFINE_IID!(IID_IRemoteSystemSessionParticipantWatcher, 3705471692, 43655, 19833, 182, 204, 68, 89, 179, 233, 32, 117); @@ -5174,54 +5174,54 @@ RT_INTERFACE!{interface IRemoteSystemSessionParticipantWatcher(IRemoteSystemSess fn Start(&self) -> HRESULT, fn Stop(&self) -> HRESULT, fn get_Status(&self, out: *mut RemoteSystemSessionParticipantWatcherStatus) -> HRESULT, - fn add_Added(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Added(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Removed(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Removed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_EnumerationCompleted(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_EnumerationCompleted(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_Added(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Added(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Removed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Removed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_EnumerationCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnumerationCompleted(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IRemoteSystemSessionParticipantWatcher { - #[inline] pub unsafe fn start(&self) -> Result<()> { + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_added(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_added(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Added)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_added(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_added(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Added)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_removed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_removed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Removed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_removed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_removed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Removed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_enumeration_completed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_enumeration_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_EnumerationCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_enumeration_completed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_enumeration_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_EnumerationCompleted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class RemoteSystemSessionParticipantWatcher: IRemoteSystemSessionParticipantWatcher} RT_ENUM! { enum RemoteSystemSessionParticipantWatcherStatus: i32 { @@ -5232,11 +5232,11 @@ RT_INTERFACE!{interface IRemoteSystemSessionRemovedEventArgs(IRemoteSystemSessio fn get_SessionInfo(&self, out: *mut *mut RemoteSystemSessionInfo) -> HRESULT }} impl IRemoteSystemSessionRemovedEventArgs { - #[inline] pub unsafe fn get_session_info(&self) -> Result> { + #[inline] pub fn get_session_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SessionInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RemoteSystemSessionRemovedEventArgs: IRemoteSystemSessionRemovedEventArgs} DEFINE_IID!(IID_IRemoteSystemSessionStatics, 2233764255, 64800, 17635, 149, 101, 231, 90, 59, 20, 198, 110); @@ -5244,40 +5244,40 @@ RT_INTERFACE!{static interface IRemoteSystemSessionStatics(IRemoteSystemSessionS fn CreateWatcher(&self, out: *mut *mut RemoteSystemSessionWatcher) -> HRESULT }} impl IRemoteSystemSessionStatics { - #[inline] pub unsafe fn create_watcher(&self) -> Result> { + #[inline] pub fn create_watcher(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWatcher)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IRemoteSystemSessionUpdatedEventArgs, 377966697, 8990, 19601, 142, 200, 179, 163, 157, 158, 85, 163); RT_INTERFACE!{interface IRemoteSystemSessionUpdatedEventArgs(IRemoteSystemSessionUpdatedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IRemoteSystemSessionUpdatedEventArgs] { fn get_SessionInfo(&self, out: *mut *mut RemoteSystemSessionInfo) -> HRESULT }} impl IRemoteSystemSessionUpdatedEventArgs { - #[inline] pub unsafe fn get_session_info(&self) -> Result> { + #[inline] pub fn get_session_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SessionInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RemoteSystemSessionUpdatedEventArgs: IRemoteSystemSessionUpdatedEventArgs} DEFINE_IID!(IID_IRemoteSystemSessionValueSetReceivedEventArgs, 116594565, 11685, 20056, 167, 143, 158, 141, 7, 132, 238, 37); RT_INTERFACE!{interface IRemoteSystemSessionValueSetReceivedEventArgs(IRemoteSystemSessionValueSetReceivedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IRemoteSystemSessionValueSetReceivedEventArgs] { fn get_Sender(&self, out: *mut *mut RemoteSystemSessionParticipant) -> HRESULT, - fn get_Message(&self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT + fn get_Message(&self, out: *mut *mut foundation::collections::ValueSet) -> HRESULT }} impl IRemoteSystemSessionValueSetReceivedEventArgs { - #[inline] pub unsafe fn get_sender(&self) -> Result> { + #[inline] pub fn get_sender(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Sender)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_message(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_message(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Message)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RemoteSystemSessionValueSetReceivedEventArgs: IRemoteSystemSessionValueSetReceivedEventArgs} DEFINE_IID!(IID_IRemoteSystemSessionWatcher, 2147738432, 3137, 19042, 182, 215, 189, 190, 43, 25, 190, 45); @@ -5285,54 +5285,54 @@ RT_INTERFACE!{interface IRemoteSystemSessionWatcher(IRemoteSystemSessionWatcherV fn Start(&self) -> HRESULT, fn Stop(&self) -> HRESULT, fn get_Status(&self, out: *mut RemoteSystemSessionWatcherStatus) -> HRESULT, - fn add_Added(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Added(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Updated(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Updated(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Removed(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Removed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_Added(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Added(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Updated(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Updated(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Removed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Removed(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IRemoteSystemSessionWatcher { - #[inline] pub unsafe fn start(&self) -> Result<()> { + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_status(&self) -> Result { + }} + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_added(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_added(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Added)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_added(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_added(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Added)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_updated(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_updated(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Updated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_updated(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_updated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Updated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_removed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_removed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Removed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_removed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_removed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Removed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class RemoteSystemSessionWatcher: IRemoteSystemSessionWatcher} RT_ENUM! { enum RemoteSystemSessionWatcherStatus: i32 { @@ -5341,43 +5341,43 @@ RT_ENUM! { enum RemoteSystemSessionWatcherStatus: i32 { 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(&self) -> (), - #[cfg(feature="windows-networking")] fn FindByHostNameAsync(&self, hostName: *mut super::super::networking::HostName, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-networking")] fn FindByHostNameAsync(&self, hostName: *mut super::super::networking::HostName, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn CreateWatcher(&self, out: *mut *mut RemoteSystemWatcher) -> HRESULT, - fn CreateWatcherWithFilters(&self, filters: *mut super::super::foundation::collections::IIterable, out: *mut *mut RemoteSystemWatcher) -> HRESULT, - fn RequestAccessAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn CreateWatcherWithFilters(&self, filters: *mut foundation::collections::IIterable, out: *mut *mut RemoteSystemWatcher) -> HRESULT, + fn RequestAccessAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IRemoteSystemStatics { - #[cfg(feature="windows-networking")] #[inline] pub unsafe fn find_by_host_name_async(&self, hostName: &super::super::networking::HostName) -> Result>> { + #[cfg(feature="windows-networking")] #[inline] pub fn find_by_host_name_async(&self, hostName: &super::super::networking::HostName) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindByHostNameAsync)(self as *const _ as *mut _, hostName as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_watcher(&self) -> Result> { + }} + #[inline] pub fn create_watcher(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWatcher)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_watcher_with_filters(&self, filters: &super::super::foundation::collections::IIterable) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_watcher_with_filters(&self, filters: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWatcherWithFilters)(self as *const _ as *mut _, 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(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn request_access_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IRemoteSystemStatics2, 211348938, 28569, 19538, 162, 114, 234, 79, 54, 71, 23, 68); RT_INTERFACE!{static interface IRemoteSystemStatics2(IRemoteSystemStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IRemoteSystemStatics2] { fn IsAuthorizationKindEnabled(&self, kind: RemoteSystemAuthorizationKind, out: *mut bool) -> HRESULT }} impl IRemoteSystemStatics2 { - #[inline] pub unsafe fn is_authorization_kind_enabled(&self, kind: RemoteSystemAuthorizationKind) -> Result { + #[inline] pub fn is_authorization_kind_enabled(&self, kind: RemoteSystemAuthorizationKind) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsAuthorizationKindEnabled)(self as *const _ as *mut _, kind, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum RemoteSystemStatus: i32 { Unavailable (RemoteSystemStatus_Unavailable) = 0, DiscoveringAvailability (RemoteSystemStatus_DiscoveringAvailability) = 1, Available (RemoteSystemStatus_Available) = 2, Unknown (RemoteSystemStatus_Unknown) = 3, @@ -5390,18 +5390,18 @@ RT_INTERFACE!{interface IRemoteSystemStatusTypeFilter(IRemoteSystemStatusTypeFil fn get_RemoteSystemStatusType(&self, out: *mut RemoteSystemStatusType) -> HRESULT }} impl IRemoteSystemStatusTypeFilter { - #[inline] pub unsafe fn get_remote_system_status_type(&self) -> Result { + #[inline] pub fn get_remote_system_status_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RemoteSystemStatusType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class RemoteSystemStatusTypeFilter: IRemoteSystemStatusTypeFilter} impl RtActivatable for RemoteSystemStatusTypeFilter {} impl RemoteSystemStatusTypeFilter { - #[inline] pub fn create(remoteSystemStatusType: RemoteSystemStatusType) -> Result> { unsafe { + #[inline] pub fn create(remoteSystemStatusType: RemoteSystemStatusType) -> Result> { >::get_activation_factory().create(remoteSystemStatusType) - }} + } } DEFINE_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]) [CLSID_RemoteSystemStatusTypeFilter]); DEFINE_IID!(IID_IRemoteSystemStatusTypeFilterFactory, 869234938, 55076, 16677, 172, 122, 141, 40, 30, 68, 201, 73); @@ -5409,71 +5409,71 @@ RT_INTERFACE!{static interface IRemoteSystemStatusTypeFilterFactory(IRemoteSyste fn Create(&self, remoteSystemStatusType: RemoteSystemStatusType, out: *mut *mut RemoteSystemStatusTypeFilter) -> HRESULT }} impl IRemoteSystemStatusTypeFilterFactory { - #[inline] pub unsafe fn create(&self, remoteSystemStatusType: RemoteSystemStatusType) -> Result> { + #[inline] pub fn create(&self, remoteSystemStatusType: RemoteSystemStatusType) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, remoteSystemStatusType, &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(&self, out: *mut *mut RemoteSystem) -> HRESULT }} impl IRemoteSystemUpdatedEventArgs { - #[inline] pub unsafe fn get_remote_system(&self) -> Result> { + #[inline] pub fn get_remote_system(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteSystem)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RemoteSystemUpdatedEventArgs: IRemoteSystemUpdatedEventArgs} 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(&self) -> HRESULT, fn Stop(&self) -> HRESULT, - fn add_RemoteSystemAdded(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RemoteSystemAdded(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_RemoteSystemUpdated(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RemoteSystemUpdated(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_RemoteSystemRemoved(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RemoteSystemRemoved(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_RemoteSystemAdded(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RemoteSystemAdded(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_RemoteSystemUpdated(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RemoteSystemUpdated(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_RemoteSystemRemoved(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RemoteSystemRemoved(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IRemoteSystemWatcher { - #[inline] pub unsafe fn start(&self) -> Result<()> { + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_remote_system_added(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_remote_system_added(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RemoteSystemAdded)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_remote_system_added(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_remote_system_added(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RemoteSystemAdded)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_remote_system_updated(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_remote_system_updated(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RemoteSystemUpdated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_remote_system_updated(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_remote_system_updated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RemoteSystemUpdated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_remote_system_removed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_remote_system_removed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RemoteSystemRemoved)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_remote_system_removed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_remote_system_removed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RemoteSystemRemoved)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class RemoteSystemWatcher: IRemoteSystemWatcher} } // Windows.System.RemoteSystems @@ -5482,137 +5482,137 @@ use ::prelude::*; RT_CLASS!{static class ThreadPool} impl RtActivatable for ThreadPool {} impl ThreadPool { - #[inline] pub fn run_async(handler: &WorkItemHandler) -> Result> { unsafe { + #[inline] pub fn run_async(handler: &WorkItemHandler) -> Result> { >::get_activation_factory().run_async(handler) - }} - #[inline] pub fn run_with_priority_async(handler: &WorkItemHandler, priority: WorkItemPriority) -> Result> { unsafe { + } + #[inline] pub fn run_with_priority_async(handler: &WorkItemHandler, priority: WorkItemPriority) -> Result> { >::get_activation_factory().run_with_priority_async(handler, priority) - }} - #[inline] pub fn run_with_priority_and_options_async(handler: &WorkItemHandler, priority: WorkItemPriority, options: WorkItemOptions) -> Result> { unsafe { + } + #[inline] pub fn run_with_priority_and_options_async(handler: &WorkItemHandler, priority: WorkItemPriority, options: WorkItemOptions) -> Result> { >::get_activation_factory().run_with_priority_and_options_async(handler, priority, options) - }} + } } DEFINE_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]) [CLSID_ThreadPool]); 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(&self, handler: *mut WorkItemHandler, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn RunWithPriorityAsync(&self, handler: *mut WorkItemHandler, priority: WorkItemPriority, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn RunWithPriorityAndOptionsAsync(&self, handler: *mut WorkItemHandler, priority: WorkItemPriority, options: WorkItemOptions, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn RunAsync(&self, handler: *mut WorkItemHandler, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn RunWithPriorityAsync(&self, handler: *mut WorkItemHandler, priority: WorkItemPriority, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn RunWithPriorityAndOptionsAsync(&self, handler: *mut WorkItemHandler, priority: WorkItemPriority, options: WorkItemOptions, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IThreadPoolStatics { - #[inline] pub unsafe fn run_async(&self, handler: &WorkItemHandler) -> Result> { + #[inline] pub fn run_async(&self, handler: &WorkItemHandler) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RunAsync)(self as *const _ as *mut _, 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(&self, handler: &WorkItemHandler, priority: WorkItemPriority) -> Result> { + }} + #[inline] pub fn run_with_priority_async(&self, handler: &WorkItemHandler, priority: WorkItemPriority) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RunWithPriorityAsync)(self as *const _ as *mut _, 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(&self, handler: &WorkItemHandler, priority: WorkItemPriority, options: WorkItemOptions) -> Result> { + }} + #[inline] pub fn run_with_priority_and_options_async(&self, handler: &WorkItemHandler, priority: WorkItemPriority, options: WorkItemOptions) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RunWithPriorityAndOptionsAsync)(self as *const _ as *mut _, 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(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn get_Delay(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, + fn get_Period(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_Delay(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn Cancel(&self) -> HRESULT }} impl IThreadPoolTimer { - #[inline] pub unsafe fn get_period(&self) -> Result { + #[inline] pub fn get_period(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Period)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_delay(&self) -> Result { + }} + #[inline] pub fn get_delay(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Delay)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn cancel(&self) -> Result<()> { + }} + #[inline] pub fn cancel(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Cancel)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ThreadPoolTimer: IThreadPoolTimer} impl RtActivatable for ThreadPoolTimer {} impl ThreadPoolTimer { - #[inline] pub fn create_periodic_timer(handler: &TimerElapsedHandler, period: super::super::foundation::TimeSpan) -> Result> { unsafe { + #[inline] pub fn create_periodic_timer(handler: &TimerElapsedHandler, period: foundation::TimeSpan) -> Result>> { >::get_activation_factory().create_periodic_timer(handler, period) - }} - #[inline] pub fn create_timer(handler: &TimerElapsedHandler, delay: super::super::foundation::TimeSpan) -> Result> { unsafe { + } + #[inline] pub fn create_timer(handler: &TimerElapsedHandler, delay: foundation::TimeSpan) -> Result>> { >::get_activation_factory().create_timer(handler, delay) - }} - #[inline] pub fn create_periodic_timer_with_completion(handler: &TimerElapsedHandler, period: super::super::foundation::TimeSpan, destroyed: &TimerDestroyedHandler) -> Result> { unsafe { + } + #[inline] pub fn create_periodic_timer_with_completion(handler: &TimerElapsedHandler, period: foundation::TimeSpan, destroyed: &TimerDestroyedHandler) -> Result>> { >::get_activation_factory().create_periodic_timer_with_completion(handler, period, destroyed) - }} - #[inline] pub fn create_timer_with_completion(handler: &TimerElapsedHandler, delay: super::super::foundation::TimeSpan, destroyed: &TimerDestroyedHandler) -> Result> { unsafe { + } + #[inline] pub fn create_timer_with_completion(handler: &TimerElapsedHandler, delay: foundation::TimeSpan, destroyed: &TimerDestroyedHandler) -> Result>> { >::get_activation_factory().create_timer_with_completion(handler, delay, destroyed) - }} + } } DEFINE_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]) [CLSID_ThreadPoolTimer]); 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(&self, handler: *mut TimerElapsedHandler, period: super::super::foundation::TimeSpan, out: *mut *mut ThreadPoolTimer) -> HRESULT, - fn CreateTimer(&self, handler: *mut TimerElapsedHandler, delay: super::super::foundation::TimeSpan, out: *mut *mut ThreadPoolTimer) -> HRESULT, - fn CreatePeriodicTimerWithCompletion(&self, handler: *mut TimerElapsedHandler, period: super::super::foundation::TimeSpan, destroyed: *mut TimerDestroyedHandler, out: *mut *mut ThreadPoolTimer) -> HRESULT, - fn CreateTimerWithCompletion(&self, handler: *mut TimerElapsedHandler, delay: super::super::foundation::TimeSpan, destroyed: *mut TimerDestroyedHandler, out: *mut *mut ThreadPoolTimer) -> HRESULT + fn CreatePeriodicTimer(&self, handler: *mut TimerElapsedHandler, period: foundation::TimeSpan, out: *mut *mut ThreadPoolTimer) -> HRESULT, + fn CreateTimer(&self, handler: *mut TimerElapsedHandler, delay: foundation::TimeSpan, out: *mut *mut ThreadPoolTimer) -> HRESULT, + fn CreatePeriodicTimerWithCompletion(&self, handler: *mut TimerElapsedHandler, period: foundation::TimeSpan, destroyed: *mut TimerDestroyedHandler, out: *mut *mut ThreadPoolTimer) -> HRESULT, + fn CreateTimerWithCompletion(&self, handler: *mut TimerElapsedHandler, delay: foundation::TimeSpan, destroyed: *mut TimerDestroyedHandler, out: *mut *mut ThreadPoolTimer) -> HRESULT }} impl IThreadPoolTimerStatics { - #[inline] pub unsafe fn create_periodic_timer(&self, handler: &TimerElapsedHandler, period: super::super::foundation::TimeSpan) -> Result> { + #[inline] pub fn create_periodic_timer(&self, handler: &TimerElapsedHandler, period: foundation::TimeSpan) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreatePeriodicTimer)(self as *const _ as *mut _, 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(&self, handler: &TimerElapsedHandler, delay: super::super::foundation::TimeSpan) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_timer(&self, handler: &TimerElapsedHandler, delay: foundation::TimeSpan) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateTimer)(self as *const _ as *mut _, 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(&self, handler: &TimerElapsedHandler, period: super::super::foundation::TimeSpan, destroyed: &TimerDestroyedHandler) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_periodic_timer_with_completion(&self, handler: &TimerElapsedHandler, period: foundation::TimeSpan, destroyed: &TimerDestroyedHandler) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreatePeriodicTimerWithCompletion)(self as *const _ as *mut _, 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(&self, handler: &TimerElapsedHandler, delay: super::super::foundation::TimeSpan, destroyed: &TimerDestroyedHandler) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_timer_with_completion(&self, handler: &TimerElapsedHandler, delay: foundation::TimeSpan, destroyed: &TimerDestroyedHandler) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateTimerWithCompletion)(self as *const _ as *mut _, handler as *const _ as *mut _, delay, destroyed as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, timer: *mut ThreadPoolTimer) -> HRESULT }} impl TimerDestroyedHandler { - #[inline] pub unsafe fn invoke(&self, timer: &ThreadPoolTimer) -> Result<()> { + #[inline] pub fn invoke(&self, timer: &ThreadPoolTimer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, timer as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, timer: *mut ThreadPoolTimer) -> HRESULT }} impl TimerElapsedHandler { - #[inline] pub unsafe fn invoke(&self, timer: &ThreadPoolTimer) -> Result<()> { + #[inline] pub fn invoke(&self, timer: &ThreadPoolTimer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, 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(&self, operation: *mut super::super::foundation::IAsyncAction) -> HRESULT + fn Invoke(&self, operation: *mut foundation::IAsyncAction) -> HRESULT }} impl WorkItemHandler { - #[inline] pub unsafe fn invoke(&self, operation: &super::super::foundation::IAsyncAction) -> Result<()> { + #[inline] pub fn invoke(&self, operation: &foundation::IAsyncAction) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, operation as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum WorkItemOptions: u32 { None (WorkItemOptions_None) = 0, TimeSliced (WorkItemOptions_TimeSliced) = 1, @@ -5624,27 +5624,27 @@ pub mod core { // Windows.System.Threading.Core use ::prelude::*; 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(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncAction) -> HRESULT + fn RunAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IPreallocatedWorkItem { - #[inline] pub unsafe fn run_async(&self) -> Result> { + #[inline] pub fn run_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RunAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PreallocatedWorkItem: IPreallocatedWorkItem} impl RtActivatable for PreallocatedWorkItem {} impl PreallocatedWorkItem { - #[inline] pub fn create_work_item(handler: &super::WorkItemHandler) -> Result> { unsafe { + #[inline] pub fn create_work_item(handler: &super::WorkItemHandler) -> Result> { >::get_activation_factory().create_work_item(handler) - }} - #[inline] pub fn create_work_item_with_priority(handler: &super::WorkItemHandler, priority: super::WorkItemPriority) -> Result> { unsafe { + } + #[inline] pub fn create_work_item_with_priority(handler: &super::WorkItemHandler, priority: super::WorkItemPriority) -> Result> { >::get_activation_factory().create_work_item_with_priority(handler, priority) - }} - #[inline] pub fn create_work_item_with_priority_and_options(handler: &super::WorkItemHandler, priority: super::WorkItemPriority, options: super::WorkItemOptions) -> Result> { unsafe { + } + #[inline] pub fn create_work_item_with_priority_and_options(handler: &super::WorkItemHandler, priority: super::WorkItemPriority, options: super::WorkItemOptions) -> Result> { >::get_activation_factory().create_work_item_with_priority_and_options(handler, priority, options) - }} + } } DEFINE_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]) [CLSID_PreallocatedWorkItem]); DEFINE_IID!(IID_IPreallocatedWorkItemFactory, 3822267205, 57322, 18075, 130, 197, 246, 227, 206, 253, 234, 251); @@ -5654,31 +5654,31 @@ RT_INTERFACE!{static interface IPreallocatedWorkItemFactory(IPreallocatedWorkIte fn CreateWorkItemWithPriorityAndOptions(&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(&self, handler: &super::WorkItemHandler) -> Result> { + #[inline] pub fn create_work_item(&self, handler: &super::WorkItemHandler) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWorkItem)(self as *const _ as *mut _, 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(&self, handler: &super::WorkItemHandler, priority: super::WorkItemPriority) -> Result> { + }} + #[inline] pub fn create_work_item_with_priority(&self, handler: &super::WorkItemHandler, priority: super::WorkItemPriority) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWorkItemWithPriority)(self as *const _ as *mut _, 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(&self, handler: &super::WorkItemHandler, priority: super::WorkItemPriority, options: super::WorkItemOptions) -> Result> { + }} + #[inline] pub fn create_work_item_with_priority_and_options(&self, handler: &super::WorkItemHandler, priority: super::WorkItemPriority, options: super::WorkItemOptions) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWorkItemWithPriorityAndOptions)(self as *const _ as *mut _, handler as *const _ as *mut _, priority, options, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, signalNotifier: *mut SignalNotifier, timedOut: bool) -> HRESULT }} impl SignalHandler { - #[inline] pub unsafe fn invoke(&self, signalNotifier: &SignalNotifier, timedOut: bool) -> Result<()> { + #[inline] pub fn invoke(&self, signalNotifier: &SignalNotifier, timedOut: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, signalNotifier as *const _ as *mut _, timedOut); if hr == S_OK { Ok(()) } 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] { @@ -5686,60 +5686,60 @@ RT_INTERFACE!{interface ISignalNotifier(ISignalNotifierVtbl): IInspectable(IInsp fn Terminate(&self) -> HRESULT }} impl ISignalNotifier { - #[inline] pub unsafe fn enable(&self) -> Result<()> { + #[inline] pub fn enable(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Enable)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn terminate(&self) -> Result<()> { + }} + #[inline] pub fn terminate(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Terminate)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SignalNotifier: ISignalNotifier} impl RtActivatable for SignalNotifier {} impl SignalNotifier { - #[inline] pub fn attach_to_event(name: &HStringArg, handler: &SignalHandler) -> Result> { unsafe { + #[inline] pub fn attach_to_event(name: &HStringArg, handler: &SignalHandler) -> Result>> { >::get_activation_factory().attach_to_event(name, handler) - }} - #[inline] pub fn attach_to_event_with_timeout(name: &HStringArg, handler: &SignalHandler, timeout: ::rt::gen::windows::foundation::TimeSpan) -> Result> { unsafe { + } + #[inline] pub fn attach_to_event_with_timeout(name: &HStringArg, handler: &SignalHandler, timeout: foundation::TimeSpan) -> Result>> { >::get_activation_factory().attach_to_event_with_timeout(name, handler, timeout) - }} - #[inline] pub fn attach_to_semaphore(name: &HStringArg, handler: &SignalHandler) -> Result> { unsafe { + } + #[inline] pub fn attach_to_semaphore(name: &HStringArg, handler: &SignalHandler) -> Result>> { >::get_activation_factory().attach_to_semaphore(name, handler) - }} - #[inline] pub fn attach_to_semaphore_with_timeout(name: &HStringArg, handler: &SignalHandler, timeout: ::rt::gen::windows::foundation::TimeSpan) -> Result> { unsafe { + } + #[inline] pub fn attach_to_semaphore_with_timeout(name: &HStringArg, handler: &SignalHandler, timeout: foundation::TimeSpan) -> Result>> { >::get_activation_factory().attach_to_semaphore_with_timeout(name, handler, timeout) - }} + } } DEFINE_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]) [CLSID_SignalNotifier]); 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(&self, name: HSTRING, handler: *mut SignalHandler, out: *mut *mut SignalNotifier) -> HRESULT, - fn AttachToEventWithTimeout(&self, name: HSTRING, handler: *mut SignalHandler, timeout: ::rt::gen::windows::foundation::TimeSpan, out: *mut *mut SignalNotifier) -> HRESULT, + fn AttachToEventWithTimeout(&self, name: HSTRING, handler: *mut SignalHandler, timeout: foundation::TimeSpan, out: *mut *mut SignalNotifier) -> HRESULT, fn AttachToSemaphore(&self, name: HSTRING, handler: *mut SignalHandler, out: *mut *mut SignalNotifier) -> HRESULT, - fn AttachToSemaphoreWithTimeout(&self, name: HSTRING, handler: *mut SignalHandler, timeout: ::rt::gen::windows::foundation::TimeSpan, out: *mut *mut SignalNotifier) -> HRESULT + fn AttachToSemaphoreWithTimeout(&self, name: HSTRING, handler: *mut SignalHandler, timeout: foundation::TimeSpan, out: *mut *mut SignalNotifier) -> HRESULT }} impl ISignalNotifierStatics { - #[inline] pub unsafe fn attach_to_event(&self, name: &HStringArg, handler: &SignalHandler) -> Result> { + #[inline] pub fn attach_to_event(&self, name: &HStringArg, handler: &SignalHandler) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AttachToEvent)(self as *const _ as *mut _, 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(&self, name: &HStringArg, handler: &SignalHandler, timeout: ::rt::gen::windows::foundation::TimeSpan) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn attach_to_event_with_timeout(&self, name: &HStringArg, handler: &SignalHandler, timeout: foundation::TimeSpan) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AttachToEventWithTimeout)(self as *const _ as *mut _, 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(&self, name: &HStringArg, handler: &SignalHandler) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn attach_to_semaphore(&self, name: &HStringArg, handler: &SignalHandler) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AttachToSemaphore)(self as *const _ as *mut _, 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(&self, name: &HStringArg, handler: &SignalHandler, timeout: ::rt::gen::windows::foundation::TimeSpan) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn attach_to_semaphore_with_timeout(&self, name: &HStringArg, handler: &SignalHandler, timeout: foundation::TimeSpan) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AttachToSemaphoreWithTimeout)(self as *const _ as *mut _, name.get(), handler as *const _ as *mut _, timeout, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } } // Windows.System.Threading.Core } // Windows.System.Threading @@ -5751,14 +5751,14 @@ RT_INTERFACE!{interface IDisplayRequest(IDisplayRequestVtbl): IInspectable(IInsp fn RequestRelease(&self) -> HRESULT }} impl IDisplayRequest { - #[inline] pub unsafe fn request_active(&self) -> Result<()> { + #[inline] pub fn request_active(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RequestActive)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn request_release(&self) -> Result<()> { + }} + #[inline] pub fn request_release(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RequestRelease)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DisplayRequest: IDisplayRequest} impl RtActivatable for DisplayRequest {} diff --git a/src/rt/gen/windows/ui/mod.rs b/src/rt/gen/windows/ui/mod.rs index 4fbb505..490450f 100644 --- a/src/rt/gen/windows/ui/mod.rs +++ b/src/rt/gen/windows/ui/mod.rs @@ -10,12 +10,12 @@ RT_CLASS!{class ColorHelper: IColorHelper} impl RtActivatable for ColorHelper {} impl RtActivatable for ColorHelper {} impl ColorHelper { - #[inline] pub fn from_argb(a: u8, r: u8, g: u8, b: u8) -> Result { unsafe { + #[inline] pub fn from_argb(a: u8, r: u8, g: u8, b: u8) -> Result { >::get_activation_factory().from_argb(a, r, g, b) - }} - #[inline] pub fn to_display_name(color: Color) -> Result { unsafe { + } + #[inline] pub fn to_display_name(color: Color) -> Result { >::get_activation_factory().to_display_name(color) - }} + } } DEFINE_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]) [CLSID_ColorHelper]); DEFINE_IID!(IID_IColorHelperStatics, 2231688170, 64362, 16708, 166, 194, 51, 73, 156, 146, 132, 245); @@ -23,22 +23,22 @@ RT_INTERFACE!{static interface IColorHelperStatics(IColorHelperStaticsVtbl): IIn fn FromArgb(&self, a: u8, r: u8, g: u8, b: u8, out: *mut Color) -> HRESULT }} impl IColorHelperStatics { - #[inline] pub unsafe fn from_argb(&self, a: u8, r: u8, g: u8, b: u8) -> Result { + #[inline] pub fn from_argb(&self, a: u8, r: u8, g: u8, b: u8) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).FromArgb)(self as *const _ as *mut _, a, r, g, b, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IColorHelperStatics2, 618245890, 28336, 19348, 133, 92, 252, 240, 129, 141, 154, 22); RT_INTERFACE!{static interface IColorHelperStatics2(IColorHelperStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IColorHelperStatics2] { fn ToDisplayName(&self, color: Color, out: *mut HSTRING) -> HRESULT }} impl IColorHelperStatics2 { - #[inline] pub unsafe fn to_display_name(&self, color: Color) -> Result { + #[inline] pub fn to_display_name(&self, color: Color) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ToDisplayName)(self as *const _ as *mut _, color, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IColors, 2609681190, 19622, 19685, 137, 148, 158, 255, 101, 202, 189, 204); RT_INTERFACE!{interface IColors(IColorsVtbl): IInspectable(IInspectableVtbl) [IID_IColors] { @@ -47,429 +47,429 @@ RT_INTERFACE!{interface IColors(IColorsVtbl): IInspectable(IInspectableVtbl) [II RT_CLASS!{class Colors: IColors} impl RtActivatable for Colors {} impl Colors { - #[inline] pub fn get_alice_blue() -> Result { unsafe { + #[inline] pub fn get_alice_blue() -> Result { >::get_activation_factory().get_alice_blue() - }} - #[inline] pub fn get_antique_white() -> Result { unsafe { + } + #[inline] pub fn get_antique_white() -> Result { >::get_activation_factory().get_antique_white() - }} - #[inline] pub fn get_aqua() -> Result { unsafe { + } + #[inline] pub fn get_aqua() -> Result { >::get_activation_factory().get_aqua() - }} - #[inline] pub fn get_aquamarine() -> Result { unsafe { + } + #[inline] pub fn get_aquamarine() -> Result { >::get_activation_factory().get_aquamarine() - }} - #[inline] pub fn get_azure() -> Result { unsafe { + } + #[inline] pub fn get_azure() -> Result { >::get_activation_factory().get_azure() - }} - #[inline] pub fn get_beige() -> Result { unsafe { + } + #[inline] pub fn get_beige() -> Result { >::get_activation_factory().get_beige() - }} - #[inline] pub fn get_bisque() -> Result { unsafe { + } + #[inline] pub fn get_bisque() -> Result { >::get_activation_factory().get_bisque() - }} - #[inline] pub fn get_black() -> Result { unsafe { + } + #[inline] pub fn get_black() -> Result { >::get_activation_factory().get_black() - }} - #[inline] pub fn get_blanched_almond() -> Result { unsafe { + } + #[inline] pub fn get_blanched_almond() -> Result { >::get_activation_factory().get_blanched_almond() - }} - #[inline] pub fn get_blue() -> Result { unsafe { + } + #[inline] pub fn get_blue() -> Result { >::get_activation_factory().get_blue() - }} - #[inline] pub fn get_blue_violet() -> Result { unsafe { + } + #[inline] pub fn get_blue_violet() -> Result { >::get_activation_factory().get_blue_violet() - }} - #[inline] pub fn get_brown() -> Result { unsafe { + } + #[inline] pub fn get_brown() -> Result { >::get_activation_factory().get_brown() - }} - #[inline] pub fn get_burly_wood() -> Result { unsafe { + } + #[inline] pub fn get_burly_wood() -> Result { >::get_activation_factory().get_burly_wood() - }} - #[inline] pub fn get_cadet_blue() -> Result { unsafe { + } + #[inline] pub fn get_cadet_blue() -> Result { >::get_activation_factory().get_cadet_blue() - }} - #[inline] pub fn get_chartreuse() -> Result { unsafe { + } + #[inline] pub fn get_chartreuse() -> Result { >::get_activation_factory().get_chartreuse() - }} - #[inline] pub fn get_chocolate() -> Result { unsafe { + } + #[inline] pub fn get_chocolate() -> Result { >::get_activation_factory().get_chocolate() - }} - #[inline] pub fn get_coral() -> Result { unsafe { + } + #[inline] pub fn get_coral() -> Result { >::get_activation_factory().get_coral() - }} - #[inline] pub fn get_cornflower_blue() -> Result { unsafe { + } + #[inline] pub fn get_cornflower_blue() -> Result { >::get_activation_factory().get_cornflower_blue() - }} - #[inline] pub fn get_cornsilk() -> Result { unsafe { + } + #[inline] pub fn get_cornsilk() -> Result { >::get_activation_factory().get_cornsilk() - }} - #[inline] pub fn get_crimson() -> Result { unsafe { + } + #[inline] pub fn get_crimson() -> Result { >::get_activation_factory().get_crimson() - }} - #[inline] pub fn get_cyan() -> Result { unsafe { + } + #[inline] pub fn get_cyan() -> Result { >::get_activation_factory().get_cyan() - }} - #[inline] pub fn get_dark_blue() -> Result { unsafe { + } + #[inline] pub fn get_dark_blue() -> Result { >::get_activation_factory().get_dark_blue() - }} - #[inline] pub fn get_dark_cyan() -> Result { unsafe { + } + #[inline] pub fn get_dark_cyan() -> Result { >::get_activation_factory().get_dark_cyan() - }} - #[inline] pub fn get_dark_goldenrod() -> Result { unsafe { + } + #[inline] pub fn get_dark_goldenrod() -> Result { >::get_activation_factory().get_dark_goldenrod() - }} - #[inline] pub fn get_dark_gray() -> Result { unsafe { + } + #[inline] pub fn get_dark_gray() -> Result { >::get_activation_factory().get_dark_gray() - }} - #[inline] pub fn get_dark_green() -> Result { unsafe { + } + #[inline] pub fn get_dark_green() -> Result { >::get_activation_factory().get_dark_green() - }} - #[inline] pub fn get_dark_khaki() -> Result { unsafe { + } + #[inline] pub fn get_dark_khaki() -> Result { >::get_activation_factory().get_dark_khaki() - }} - #[inline] pub fn get_dark_magenta() -> Result { unsafe { + } + #[inline] pub fn get_dark_magenta() -> Result { >::get_activation_factory().get_dark_magenta() - }} - #[inline] pub fn get_dark_olive_green() -> Result { unsafe { + } + #[inline] pub fn get_dark_olive_green() -> Result { >::get_activation_factory().get_dark_olive_green() - }} - #[inline] pub fn get_dark_orange() -> Result { unsafe { + } + #[inline] pub fn get_dark_orange() -> Result { >::get_activation_factory().get_dark_orange() - }} - #[inline] pub fn get_dark_orchid() -> Result { unsafe { + } + #[inline] pub fn get_dark_orchid() -> Result { >::get_activation_factory().get_dark_orchid() - }} - #[inline] pub fn get_dark_red() -> Result { unsafe { + } + #[inline] pub fn get_dark_red() -> Result { >::get_activation_factory().get_dark_red() - }} - #[inline] pub fn get_dark_salmon() -> Result { unsafe { + } + #[inline] pub fn get_dark_salmon() -> Result { >::get_activation_factory().get_dark_salmon() - }} - #[inline] pub fn get_dark_sea_green() -> Result { unsafe { + } + #[inline] pub fn get_dark_sea_green() -> Result { >::get_activation_factory().get_dark_sea_green() - }} - #[inline] pub fn get_dark_slate_blue() -> Result { unsafe { + } + #[inline] pub fn get_dark_slate_blue() -> Result { >::get_activation_factory().get_dark_slate_blue() - }} - #[inline] pub fn get_dark_slate_gray() -> Result { unsafe { + } + #[inline] pub fn get_dark_slate_gray() -> Result { >::get_activation_factory().get_dark_slate_gray() - }} - #[inline] pub fn get_dark_turquoise() -> Result { unsafe { + } + #[inline] pub fn get_dark_turquoise() -> Result { >::get_activation_factory().get_dark_turquoise() - }} - #[inline] pub fn get_dark_violet() -> Result { unsafe { + } + #[inline] pub fn get_dark_violet() -> Result { >::get_activation_factory().get_dark_violet() - }} - #[inline] pub fn get_deep_pink() -> Result { unsafe { + } + #[inline] pub fn get_deep_pink() -> Result { >::get_activation_factory().get_deep_pink() - }} - #[inline] pub fn get_deep_sky_blue() -> Result { unsafe { + } + #[inline] pub fn get_deep_sky_blue() -> Result { >::get_activation_factory().get_deep_sky_blue() - }} - #[inline] pub fn get_dim_gray() -> Result { unsafe { + } + #[inline] pub fn get_dim_gray() -> Result { >::get_activation_factory().get_dim_gray() - }} - #[inline] pub fn get_dodger_blue() -> Result { unsafe { + } + #[inline] pub fn get_dodger_blue() -> Result { >::get_activation_factory().get_dodger_blue() - }} - #[inline] pub fn get_firebrick() -> Result { unsafe { + } + #[inline] pub fn get_firebrick() -> Result { >::get_activation_factory().get_firebrick() - }} - #[inline] pub fn get_floral_white() -> Result { unsafe { + } + #[inline] pub fn get_floral_white() -> Result { >::get_activation_factory().get_floral_white() - }} - #[inline] pub fn get_forest_green() -> Result { unsafe { + } + #[inline] pub fn get_forest_green() -> Result { >::get_activation_factory().get_forest_green() - }} - #[inline] pub fn get_fuchsia() -> Result { unsafe { + } + #[inline] pub fn get_fuchsia() -> Result { >::get_activation_factory().get_fuchsia() - }} - #[inline] pub fn get_gainsboro() -> Result { unsafe { + } + #[inline] pub fn get_gainsboro() -> Result { >::get_activation_factory().get_gainsboro() - }} - #[inline] pub fn get_ghost_white() -> Result { unsafe { + } + #[inline] pub fn get_ghost_white() -> Result { >::get_activation_factory().get_ghost_white() - }} - #[inline] pub fn get_gold() -> Result { unsafe { + } + #[inline] pub fn get_gold() -> Result { >::get_activation_factory().get_gold() - }} - #[inline] pub fn get_goldenrod() -> Result { unsafe { + } + #[inline] pub fn get_goldenrod() -> Result { >::get_activation_factory().get_goldenrod() - }} - #[inline] pub fn get_gray() -> Result { unsafe { + } + #[inline] pub fn get_gray() -> Result { >::get_activation_factory().get_gray() - }} - #[inline] pub fn get_green() -> Result { unsafe { + } + #[inline] pub fn get_green() -> Result { >::get_activation_factory().get_green() - }} - #[inline] pub fn get_green_yellow() -> Result { unsafe { + } + #[inline] pub fn get_green_yellow() -> Result { >::get_activation_factory().get_green_yellow() - }} - #[inline] pub fn get_honeydew() -> Result { unsafe { + } + #[inline] pub fn get_honeydew() -> Result { >::get_activation_factory().get_honeydew() - }} - #[inline] pub fn get_hot_pink() -> Result { unsafe { + } + #[inline] pub fn get_hot_pink() -> Result { >::get_activation_factory().get_hot_pink() - }} - #[inline] pub fn get_indian_red() -> Result { unsafe { + } + #[inline] pub fn get_indian_red() -> Result { >::get_activation_factory().get_indian_red() - }} - #[inline] pub fn get_indigo() -> Result { unsafe { + } + #[inline] pub fn get_indigo() -> Result { >::get_activation_factory().get_indigo() - }} - #[inline] pub fn get_ivory() -> Result { unsafe { + } + #[inline] pub fn get_ivory() -> Result { >::get_activation_factory().get_ivory() - }} - #[inline] pub fn get_khaki() -> Result { unsafe { + } + #[inline] pub fn get_khaki() -> Result { >::get_activation_factory().get_khaki() - }} - #[inline] pub fn get_lavender() -> Result { unsafe { + } + #[inline] pub fn get_lavender() -> Result { >::get_activation_factory().get_lavender() - }} - #[inline] pub fn get_lavender_blush() -> Result { unsafe { + } + #[inline] pub fn get_lavender_blush() -> Result { >::get_activation_factory().get_lavender_blush() - }} - #[inline] pub fn get_lawn_green() -> Result { unsafe { + } + #[inline] pub fn get_lawn_green() -> Result { >::get_activation_factory().get_lawn_green() - }} - #[inline] pub fn get_lemon_chiffon() -> Result { unsafe { + } + #[inline] pub fn get_lemon_chiffon() -> Result { >::get_activation_factory().get_lemon_chiffon() - }} - #[inline] pub fn get_light_blue() -> Result { unsafe { + } + #[inline] pub fn get_light_blue() -> Result { >::get_activation_factory().get_light_blue() - }} - #[inline] pub fn get_light_coral() -> Result { unsafe { + } + #[inline] pub fn get_light_coral() -> Result { >::get_activation_factory().get_light_coral() - }} - #[inline] pub fn get_light_cyan() -> Result { unsafe { + } + #[inline] pub fn get_light_cyan() -> Result { >::get_activation_factory().get_light_cyan() - }} - #[inline] pub fn get_light_goldenrod_yellow() -> Result { unsafe { + } + #[inline] pub fn get_light_goldenrod_yellow() -> Result { >::get_activation_factory().get_light_goldenrod_yellow() - }} - #[inline] pub fn get_light_green() -> Result { unsafe { + } + #[inline] pub fn get_light_green() -> Result { >::get_activation_factory().get_light_green() - }} - #[inline] pub fn get_light_gray() -> Result { unsafe { + } + #[inline] pub fn get_light_gray() -> Result { >::get_activation_factory().get_light_gray() - }} - #[inline] pub fn get_light_pink() -> Result { unsafe { + } + #[inline] pub fn get_light_pink() -> Result { >::get_activation_factory().get_light_pink() - }} - #[inline] pub fn get_light_salmon() -> Result { unsafe { + } + #[inline] pub fn get_light_salmon() -> Result { >::get_activation_factory().get_light_salmon() - }} - #[inline] pub fn get_light_sea_green() -> Result { unsafe { + } + #[inline] pub fn get_light_sea_green() -> Result { >::get_activation_factory().get_light_sea_green() - }} - #[inline] pub fn get_light_sky_blue() -> Result { unsafe { + } + #[inline] pub fn get_light_sky_blue() -> Result { >::get_activation_factory().get_light_sky_blue() - }} - #[inline] pub fn get_light_slate_gray() -> Result { unsafe { + } + #[inline] pub fn get_light_slate_gray() -> Result { >::get_activation_factory().get_light_slate_gray() - }} - #[inline] pub fn get_light_steel_blue() -> Result { unsafe { + } + #[inline] pub fn get_light_steel_blue() -> Result { >::get_activation_factory().get_light_steel_blue() - }} - #[inline] pub fn get_light_yellow() -> Result { unsafe { + } + #[inline] pub fn get_light_yellow() -> Result { >::get_activation_factory().get_light_yellow() - }} - #[inline] pub fn get_lime() -> Result { unsafe { + } + #[inline] pub fn get_lime() -> Result { >::get_activation_factory().get_lime() - }} - #[inline] pub fn get_lime_green() -> Result { unsafe { + } + #[inline] pub fn get_lime_green() -> Result { >::get_activation_factory().get_lime_green() - }} - #[inline] pub fn get_linen() -> Result { unsafe { + } + #[inline] pub fn get_linen() -> Result { >::get_activation_factory().get_linen() - }} - #[inline] pub fn get_magenta() -> Result { unsafe { + } + #[inline] pub fn get_magenta() -> Result { >::get_activation_factory().get_magenta() - }} - #[inline] pub fn get_maroon() -> Result { unsafe { + } + #[inline] pub fn get_maroon() -> Result { >::get_activation_factory().get_maroon() - }} - #[inline] pub fn get_medium_aquamarine() -> Result { unsafe { + } + #[inline] pub fn get_medium_aquamarine() -> Result { >::get_activation_factory().get_medium_aquamarine() - }} - #[inline] pub fn get_medium_blue() -> Result { unsafe { + } + #[inline] pub fn get_medium_blue() -> Result { >::get_activation_factory().get_medium_blue() - }} - #[inline] pub fn get_medium_orchid() -> Result { unsafe { + } + #[inline] pub fn get_medium_orchid() -> Result { >::get_activation_factory().get_medium_orchid() - }} - #[inline] pub fn get_medium_purple() -> Result { unsafe { + } + #[inline] pub fn get_medium_purple() -> Result { >::get_activation_factory().get_medium_purple() - }} - #[inline] pub fn get_medium_sea_green() -> Result { unsafe { + } + #[inline] pub fn get_medium_sea_green() -> Result { >::get_activation_factory().get_medium_sea_green() - }} - #[inline] pub fn get_medium_slate_blue() -> Result { unsafe { + } + #[inline] pub fn get_medium_slate_blue() -> Result { >::get_activation_factory().get_medium_slate_blue() - }} - #[inline] pub fn get_medium_spring_green() -> Result { unsafe { + } + #[inline] pub fn get_medium_spring_green() -> Result { >::get_activation_factory().get_medium_spring_green() - }} - #[inline] pub fn get_medium_turquoise() -> Result { unsafe { + } + #[inline] pub fn get_medium_turquoise() -> Result { >::get_activation_factory().get_medium_turquoise() - }} - #[inline] pub fn get_medium_violet_red() -> Result { unsafe { + } + #[inline] pub fn get_medium_violet_red() -> Result { >::get_activation_factory().get_medium_violet_red() - }} - #[inline] pub fn get_midnight_blue() -> Result { unsafe { + } + #[inline] pub fn get_midnight_blue() -> Result { >::get_activation_factory().get_midnight_blue() - }} - #[inline] pub fn get_mint_cream() -> Result { unsafe { + } + #[inline] pub fn get_mint_cream() -> Result { >::get_activation_factory().get_mint_cream() - }} - #[inline] pub fn get_misty_rose() -> Result { unsafe { + } + #[inline] pub fn get_misty_rose() -> Result { >::get_activation_factory().get_misty_rose() - }} - #[inline] pub fn get_moccasin() -> Result { unsafe { + } + #[inline] pub fn get_moccasin() -> Result { >::get_activation_factory().get_moccasin() - }} - #[inline] pub fn get_navajo_white() -> Result { unsafe { + } + #[inline] pub fn get_navajo_white() -> Result { >::get_activation_factory().get_navajo_white() - }} - #[inline] pub fn get_navy() -> Result { unsafe { + } + #[inline] pub fn get_navy() -> Result { >::get_activation_factory().get_navy() - }} - #[inline] pub fn get_old_lace() -> Result { unsafe { + } + #[inline] pub fn get_old_lace() -> Result { >::get_activation_factory().get_old_lace() - }} - #[inline] pub fn get_olive() -> Result { unsafe { + } + #[inline] pub fn get_olive() -> Result { >::get_activation_factory().get_olive() - }} - #[inline] pub fn get_olive_drab() -> Result { unsafe { + } + #[inline] pub fn get_olive_drab() -> Result { >::get_activation_factory().get_olive_drab() - }} - #[inline] pub fn get_orange() -> Result { unsafe { + } + #[inline] pub fn get_orange() -> Result { >::get_activation_factory().get_orange() - }} - #[inline] pub fn get_orange_red() -> Result { unsafe { + } + #[inline] pub fn get_orange_red() -> Result { >::get_activation_factory().get_orange_red() - }} - #[inline] pub fn get_orchid() -> Result { unsafe { + } + #[inline] pub fn get_orchid() -> Result { >::get_activation_factory().get_orchid() - }} - #[inline] pub fn get_pale_goldenrod() -> Result { unsafe { + } + #[inline] pub fn get_pale_goldenrod() -> Result { >::get_activation_factory().get_pale_goldenrod() - }} - #[inline] pub fn get_pale_green() -> Result { unsafe { + } + #[inline] pub fn get_pale_green() -> Result { >::get_activation_factory().get_pale_green() - }} - #[inline] pub fn get_pale_turquoise() -> Result { unsafe { + } + #[inline] pub fn get_pale_turquoise() -> Result { >::get_activation_factory().get_pale_turquoise() - }} - #[inline] pub fn get_pale_violet_red() -> Result { unsafe { + } + #[inline] pub fn get_pale_violet_red() -> Result { >::get_activation_factory().get_pale_violet_red() - }} - #[inline] pub fn get_papaya_whip() -> Result { unsafe { + } + #[inline] pub fn get_papaya_whip() -> Result { >::get_activation_factory().get_papaya_whip() - }} - #[inline] pub fn get_peach_puff() -> Result { unsafe { + } + #[inline] pub fn get_peach_puff() -> Result { >::get_activation_factory().get_peach_puff() - }} - #[inline] pub fn get_peru() -> Result { unsafe { + } + #[inline] pub fn get_peru() -> Result { >::get_activation_factory().get_peru() - }} - #[inline] pub fn get_pink() -> Result { unsafe { + } + #[inline] pub fn get_pink() -> Result { >::get_activation_factory().get_pink() - }} - #[inline] pub fn get_plum() -> Result { unsafe { + } + #[inline] pub fn get_plum() -> Result { >::get_activation_factory().get_plum() - }} - #[inline] pub fn get_powder_blue() -> Result { unsafe { + } + #[inline] pub fn get_powder_blue() -> Result { >::get_activation_factory().get_powder_blue() - }} - #[inline] pub fn get_purple() -> Result { unsafe { + } + #[inline] pub fn get_purple() -> Result { >::get_activation_factory().get_purple() - }} - #[inline] pub fn get_red() -> Result { unsafe { + } + #[inline] pub fn get_red() -> Result { >::get_activation_factory().get_red() - }} - #[inline] pub fn get_rosy_brown() -> Result { unsafe { + } + #[inline] pub fn get_rosy_brown() -> Result { >::get_activation_factory().get_rosy_brown() - }} - #[inline] pub fn get_royal_blue() -> Result { unsafe { + } + #[inline] pub fn get_royal_blue() -> Result { >::get_activation_factory().get_royal_blue() - }} - #[inline] pub fn get_saddle_brown() -> Result { unsafe { + } + #[inline] pub fn get_saddle_brown() -> Result { >::get_activation_factory().get_saddle_brown() - }} - #[inline] pub fn get_salmon() -> Result { unsafe { + } + #[inline] pub fn get_salmon() -> Result { >::get_activation_factory().get_salmon() - }} - #[inline] pub fn get_sandy_brown() -> Result { unsafe { + } + #[inline] pub fn get_sandy_brown() -> Result { >::get_activation_factory().get_sandy_brown() - }} - #[inline] pub fn get_sea_green() -> Result { unsafe { + } + #[inline] pub fn get_sea_green() -> Result { >::get_activation_factory().get_sea_green() - }} - #[inline] pub fn get_sea_shell() -> Result { unsafe { + } + #[inline] pub fn get_sea_shell() -> Result { >::get_activation_factory().get_sea_shell() - }} - #[inline] pub fn get_sienna() -> Result { unsafe { + } + #[inline] pub fn get_sienna() -> Result { >::get_activation_factory().get_sienna() - }} - #[inline] pub fn get_silver() -> Result { unsafe { + } + #[inline] pub fn get_silver() -> Result { >::get_activation_factory().get_silver() - }} - #[inline] pub fn get_sky_blue() -> Result { unsafe { + } + #[inline] pub fn get_sky_blue() -> Result { >::get_activation_factory().get_sky_blue() - }} - #[inline] pub fn get_slate_blue() -> Result { unsafe { + } + #[inline] pub fn get_slate_blue() -> Result { >::get_activation_factory().get_slate_blue() - }} - #[inline] pub fn get_slate_gray() -> Result { unsafe { + } + #[inline] pub fn get_slate_gray() -> Result { >::get_activation_factory().get_slate_gray() - }} - #[inline] pub fn get_snow() -> Result { unsafe { + } + #[inline] pub fn get_snow() -> Result { >::get_activation_factory().get_snow() - }} - #[inline] pub fn get_spring_green() -> Result { unsafe { + } + #[inline] pub fn get_spring_green() -> Result { >::get_activation_factory().get_spring_green() - }} - #[inline] pub fn get_steel_blue() -> Result { unsafe { + } + #[inline] pub fn get_steel_blue() -> Result { >::get_activation_factory().get_steel_blue() - }} - #[inline] pub fn get_tan() -> Result { unsafe { + } + #[inline] pub fn get_tan() -> Result { >::get_activation_factory().get_tan() - }} - #[inline] pub fn get_teal() -> Result { unsafe { + } + #[inline] pub fn get_teal() -> Result { >::get_activation_factory().get_teal() - }} - #[inline] pub fn get_thistle() -> Result { unsafe { + } + #[inline] pub fn get_thistle() -> Result { >::get_activation_factory().get_thistle() - }} - #[inline] pub fn get_tomato() -> Result { unsafe { + } + #[inline] pub fn get_tomato() -> Result { >::get_activation_factory().get_tomato() - }} - #[inline] pub fn get_transparent() -> Result { unsafe { + } + #[inline] pub fn get_transparent() -> Result { >::get_activation_factory().get_transparent() - }} - #[inline] pub fn get_turquoise() -> Result { unsafe { + } + #[inline] pub fn get_turquoise() -> Result { >::get_activation_factory().get_turquoise() - }} - #[inline] pub fn get_violet() -> Result { unsafe { + } + #[inline] pub fn get_violet() -> Result { >::get_activation_factory().get_violet() - }} - #[inline] pub fn get_wheat() -> Result { unsafe { + } + #[inline] pub fn get_wheat() -> Result { >::get_activation_factory().get_wheat() - }} - #[inline] pub fn get_white() -> Result { unsafe { + } + #[inline] pub fn get_white() -> Result { >::get_activation_factory().get_white() - }} - #[inline] pub fn get_white_smoke() -> Result { unsafe { + } + #[inline] pub fn get_white_smoke() -> Result { >::get_activation_factory().get_white_smoke() - }} - #[inline] pub fn get_yellow() -> Result { unsafe { + } + #[inline] pub fn get_yellow() -> Result { >::get_activation_factory().get_yellow() - }} - #[inline] pub fn get_yellow_green() -> Result { unsafe { + } + #[inline] pub fn get_yellow_green() -> Result { >::get_activation_factory().get_yellow_green() - }} + } } DEFINE_CLSID!(Colors(&[87,105,110,100,111,119,115,46,85,73,46,67,111,108,111,114,115,0]) [CLSID_Colors]); DEFINE_IID!(IID_IColorsStatics, 3488951812, 52390, 17940, 161, 126, 117, 73, 16, 200, 74, 153); @@ -617,711 +617,711 @@ RT_INTERFACE!{static interface IColorsStatics(IColorsStaticsVtbl): IInspectable( fn get_YellowGreen(&self, out: *mut Color) -> HRESULT }} impl IColorsStatics { - #[inline] pub unsafe fn get_alice_blue(&self) -> Result { + #[inline] pub fn get_alice_blue(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AliceBlue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_antique_white(&self) -> Result { + }} + #[inline] pub fn get_antique_white(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AntiqueWhite)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_aqua(&self) -> Result { + }} + #[inline] pub fn get_aqua(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Aqua)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_aquamarine(&self) -> Result { + }} + #[inline] pub fn get_aquamarine(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Aquamarine)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_azure(&self) -> Result { + }} + #[inline] pub fn get_azure(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Azure)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_beige(&self) -> Result { + }} + #[inline] pub fn get_beige(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Beige)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_bisque(&self) -> Result { + }} + #[inline] pub fn get_bisque(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Bisque)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_black(&self) -> Result { + }} + #[inline] pub fn get_black(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Black)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_blanched_almond(&self) -> Result { + }} + #[inline] pub fn get_blanched_almond(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BlanchedAlmond)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_blue(&self) -> Result { + }} + #[inline] pub fn get_blue(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Blue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_blue_violet(&self) -> Result { + }} + #[inline] pub fn get_blue_violet(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BlueViolet)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_brown(&self) -> Result { + }} + #[inline] pub fn get_brown(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Brown)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_burly_wood(&self) -> Result { + }} + #[inline] pub fn get_burly_wood(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BurlyWood)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_cadet_blue(&self) -> Result { + }} + #[inline] pub fn get_cadet_blue(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CadetBlue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_chartreuse(&self) -> Result { + }} + #[inline] pub fn get_chartreuse(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Chartreuse)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_chocolate(&self) -> Result { + }} + #[inline] pub fn get_chocolate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Chocolate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_coral(&self) -> Result { + }} + #[inline] pub fn get_coral(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Coral)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_cornflower_blue(&self) -> Result { + }} + #[inline] pub fn get_cornflower_blue(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CornflowerBlue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_cornsilk(&self) -> Result { + }} + #[inline] pub fn get_cornsilk(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Cornsilk)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_crimson(&self) -> Result { + }} + #[inline] pub fn get_crimson(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Crimson)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_cyan(&self) -> Result { + }} + #[inline] pub fn get_cyan(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Cyan)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_dark_blue(&self) -> Result { + }} + #[inline] pub fn get_dark_blue(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DarkBlue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_dark_cyan(&self) -> Result { + }} + #[inline] pub fn get_dark_cyan(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DarkCyan)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_dark_goldenrod(&self) -> Result { + }} + #[inline] pub fn get_dark_goldenrod(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DarkGoldenrod)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_dark_gray(&self) -> Result { + }} + #[inline] pub fn get_dark_gray(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DarkGray)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_dark_green(&self) -> Result { + }} + #[inline] pub fn get_dark_green(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DarkGreen)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_dark_khaki(&self) -> Result { + }} + #[inline] pub fn get_dark_khaki(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DarkKhaki)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_dark_magenta(&self) -> Result { + }} + #[inline] pub fn get_dark_magenta(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DarkMagenta)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_dark_olive_green(&self) -> Result { + }} + #[inline] pub fn get_dark_olive_green(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DarkOliveGreen)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_dark_orange(&self) -> Result { + }} + #[inline] pub fn get_dark_orange(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DarkOrange)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_dark_orchid(&self) -> Result { + }} + #[inline] pub fn get_dark_orchid(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DarkOrchid)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_dark_red(&self) -> Result { + }} + #[inline] pub fn get_dark_red(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DarkRed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_dark_salmon(&self) -> Result { + }} + #[inline] pub fn get_dark_salmon(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DarkSalmon)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_dark_sea_green(&self) -> Result { + }} + #[inline] pub fn get_dark_sea_green(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DarkSeaGreen)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_dark_slate_blue(&self) -> Result { + }} + #[inline] pub fn get_dark_slate_blue(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DarkSlateBlue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_dark_slate_gray(&self) -> Result { + }} + #[inline] pub fn get_dark_slate_gray(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DarkSlateGray)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_dark_turquoise(&self) -> Result { + }} + #[inline] pub fn get_dark_turquoise(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DarkTurquoise)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_dark_violet(&self) -> Result { + }} + #[inline] pub fn get_dark_violet(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DarkViolet)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_deep_pink(&self) -> Result { + }} + #[inline] pub fn get_deep_pink(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DeepPink)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_deep_sky_blue(&self) -> Result { + }} + #[inline] pub fn get_deep_sky_blue(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DeepSkyBlue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_dim_gray(&self) -> Result { + }} + #[inline] pub fn get_dim_gray(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DimGray)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_dodger_blue(&self) -> Result { + }} + #[inline] pub fn get_dodger_blue(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DodgerBlue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_firebrick(&self) -> Result { + }} + #[inline] pub fn get_firebrick(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Firebrick)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_floral_white(&self) -> Result { + }} + #[inline] pub fn get_floral_white(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FloralWhite)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_forest_green(&self) -> Result { + }} + #[inline] pub fn get_forest_green(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ForestGreen)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_fuchsia(&self) -> Result { + }} + #[inline] pub fn get_fuchsia(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Fuchsia)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_gainsboro(&self) -> Result { + }} + #[inline] pub fn get_gainsboro(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Gainsboro)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ghost_white(&self) -> Result { + }} + #[inline] pub fn get_ghost_white(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_GhostWhite)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_gold(&self) -> Result { + }} + #[inline] pub fn get_gold(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Gold)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_goldenrod(&self) -> Result { + }} + #[inline] pub fn get_goldenrod(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Goldenrod)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_gray(&self) -> Result { + }} + #[inline] pub fn get_gray(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Gray)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_green(&self) -> Result { + }} + #[inline] pub fn get_green(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Green)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_green_yellow(&self) -> Result { + }} + #[inline] pub fn get_green_yellow(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_GreenYellow)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_honeydew(&self) -> Result { + }} + #[inline] pub fn get_honeydew(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Honeydew)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_hot_pink(&self) -> Result { + }} + #[inline] pub fn get_hot_pink(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HotPink)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_indian_red(&self) -> Result { + }} + #[inline] pub fn get_indian_red(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IndianRed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_indigo(&self) -> Result { + }} + #[inline] pub fn get_indigo(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Indigo)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ivory(&self) -> Result { + }} + #[inline] pub fn get_ivory(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Ivory)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_khaki(&self) -> Result { + }} + #[inline] pub fn get_khaki(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Khaki)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_lavender(&self) -> Result { + }} + #[inline] pub fn get_lavender(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Lavender)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_lavender_blush(&self) -> Result { + }} + #[inline] pub fn get_lavender_blush(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LavenderBlush)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_lawn_green(&self) -> Result { + }} + #[inline] pub fn get_lawn_green(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LawnGreen)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_lemon_chiffon(&self) -> Result { + }} + #[inline] pub fn get_lemon_chiffon(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LemonChiffon)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_light_blue(&self) -> Result { + }} + #[inline] pub fn get_light_blue(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LightBlue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_light_coral(&self) -> Result { + }} + #[inline] pub fn get_light_coral(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LightCoral)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_light_cyan(&self) -> Result { + }} + #[inline] pub fn get_light_cyan(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LightCyan)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_light_goldenrod_yellow(&self) -> Result { + }} + #[inline] pub fn get_light_goldenrod_yellow(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LightGoldenrodYellow)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_light_green(&self) -> Result { + }} + #[inline] pub fn get_light_green(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LightGreen)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_light_gray(&self) -> Result { + }} + #[inline] pub fn get_light_gray(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LightGray)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_light_pink(&self) -> Result { + }} + #[inline] pub fn get_light_pink(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LightPink)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_light_salmon(&self) -> Result { + }} + #[inline] pub fn get_light_salmon(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LightSalmon)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_light_sea_green(&self) -> Result { + }} + #[inline] pub fn get_light_sea_green(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LightSeaGreen)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_light_sky_blue(&self) -> Result { + }} + #[inline] pub fn get_light_sky_blue(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LightSkyBlue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_light_slate_gray(&self) -> Result { + }} + #[inline] pub fn get_light_slate_gray(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LightSlateGray)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_light_steel_blue(&self) -> Result { + }} + #[inline] pub fn get_light_steel_blue(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LightSteelBlue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_light_yellow(&self) -> Result { + }} + #[inline] pub fn get_light_yellow(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LightYellow)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_lime(&self) -> Result { + }} + #[inline] pub fn get_lime(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Lime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_lime_green(&self) -> Result { + }} + #[inline] pub fn get_lime_green(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LimeGreen)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_linen(&self) -> Result { + }} + #[inline] pub fn get_linen(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Linen)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_magenta(&self) -> Result { + }} + #[inline] pub fn get_magenta(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Magenta)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_maroon(&self) -> Result { + }} + #[inline] pub fn get_maroon(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Maroon)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_medium_aquamarine(&self) -> Result { + }} + #[inline] pub fn get_medium_aquamarine(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MediumAquamarine)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_medium_blue(&self) -> Result { + }} + #[inline] pub fn get_medium_blue(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MediumBlue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_medium_orchid(&self) -> Result { + }} + #[inline] pub fn get_medium_orchid(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MediumOrchid)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_medium_purple(&self) -> Result { + }} + #[inline] pub fn get_medium_purple(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MediumPurple)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_medium_sea_green(&self) -> Result { + }} + #[inline] pub fn get_medium_sea_green(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MediumSeaGreen)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_medium_slate_blue(&self) -> Result { + }} + #[inline] pub fn get_medium_slate_blue(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MediumSlateBlue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_medium_spring_green(&self) -> Result { + }} + #[inline] pub fn get_medium_spring_green(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MediumSpringGreen)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_medium_turquoise(&self) -> Result { + }} + #[inline] pub fn get_medium_turquoise(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MediumTurquoise)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_medium_violet_red(&self) -> Result { + }} + #[inline] pub fn get_medium_violet_red(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MediumVioletRed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_midnight_blue(&self) -> Result { + }} + #[inline] pub fn get_midnight_blue(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MidnightBlue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_mint_cream(&self) -> Result { + }} + #[inline] pub fn get_mint_cream(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MintCream)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_misty_rose(&self) -> Result { + }} + #[inline] pub fn get_misty_rose(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MistyRose)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_moccasin(&self) -> Result { + }} + #[inline] pub fn get_moccasin(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Moccasin)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_navajo_white(&self) -> Result { + }} + #[inline] pub fn get_navajo_white(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NavajoWhite)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_navy(&self) -> Result { + }} + #[inline] pub fn get_navy(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Navy)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_old_lace(&self) -> Result { + }} + #[inline] pub fn get_old_lace(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OldLace)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_olive(&self) -> Result { + }} + #[inline] pub fn get_olive(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Olive)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_olive_drab(&self) -> Result { + }} + #[inline] pub fn get_olive_drab(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OliveDrab)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_orange(&self) -> Result { + }} + #[inline] pub fn get_orange(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Orange)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_orange_red(&self) -> Result { + }} + #[inline] pub fn get_orange_red(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OrangeRed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_orchid(&self) -> Result { + }} + #[inline] pub fn get_orchid(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Orchid)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pale_goldenrod(&self) -> Result { + }} + #[inline] pub fn get_pale_goldenrod(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PaleGoldenrod)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pale_green(&self) -> Result { + }} + #[inline] pub fn get_pale_green(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PaleGreen)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pale_turquoise(&self) -> Result { + }} + #[inline] pub fn get_pale_turquoise(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PaleTurquoise)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pale_violet_red(&self) -> Result { + }} + #[inline] pub fn get_pale_violet_red(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PaleVioletRed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_papaya_whip(&self) -> Result { + }} + #[inline] pub fn get_papaya_whip(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PapayaWhip)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_peach_puff(&self) -> Result { + }} + #[inline] pub fn get_peach_puff(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PeachPuff)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_peru(&self) -> Result { + }} + #[inline] pub fn get_peru(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Peru)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pink(&self) -> Result { + }} + #[inline] pub fn get_pink(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Pink)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_plum(&self) -> Result { + }} + #[inline] pub fn get_plum(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Plum)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_powder_blue(&self) -> Result { + }} + #[inline] pub fn get_powder_blue(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PowderBlue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_purple(&self) -> Result { + }} + #[inline] pub fn get_purple(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Purple)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_red(&self) -> Result { + }} + #[inline] pub fn get_red(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Red)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_rosy_brown(&self) -> Result { + }} + #[inline] pub fn get_rosy_brown(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RosyBrown)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_royal_blue(&self) -> Result { + }} + #[inline] pub fn get_royal_blue(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RoyalBlue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_saddle_brown(&self) -> Result { + }} + #[inline] pub fn get_saddle_brown(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SaddleBrown)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_salmon(&self) -> Result { + }} + #[inline] pub fn get_salmon(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Salmon)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sandy_brown(&self) -> Result { + }} + #[inline] pub fn get_sandy_brown(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SandyBrown)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sea_green(&self) -> Result { + }} + #[inline] pub fn get_sea_green(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SeaGreen)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sea_shell(&self) -> Result { + }} + #[inline] pub fn get_sea_shell(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SeaShell)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sienna(&self) -> Result { + }} + #[inline] pub fn get_sienna(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Sienna)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_silver(&self) -> Result { + }} + #[inline] pub fn get_silver(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Silver)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_sky_blue(&self) -> Result { + }} + #[inline] pub fn get_sky_blue(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SkyBlue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_slate_blue(&self) -> Result { + }} + #[inline] pub fn get_slate_blue(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SlateBlue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_slate_gray(&self) -> Result { + }} + #[inline] pub fn get_slate_gray(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SlateGray)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_snow(&self) -> Result { + }} + #[inline] pub fn get_snow(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Snow)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_spring_green(&self) -> Result { + }} + #[inline] pub fn get_spring_green(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SpringGreen)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_steel_blue(&self) -> Result { + }} + #[inline] pub fn get_steel_blue(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SteelBlue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_tan(&self) -> Result { + }} + #[inline] pub fn get_tan(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Tan)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_teal(&self) -> Result { + }} + #[inline] pub fn get_teal(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Teal)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_thistle(&self) -> Result { + }} + #[inline] pub fn get_thistle(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Thistle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_tomato(&self) -> Result { + }} + #[inline] pub fn get_tomato(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Tomato)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_transparent(&self) -> Result { + }} + #[inline] pub fn get_transparent(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Transparent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_turquoise(&self) -> Result { + }} + #[inline] pub fn get_turquoise(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Turquoise)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_violet(&self) -> Result { + }} + #[inline] pub fn get_violet(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Violet)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_wheat(&self) -> Result { + }} + #[inline] pub fn get_wheat(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Wheat)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_white(&self) -> Result { + }} + #[inline] pub fn get_white(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_White)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_white_smoke(&self) -> Result { + }} + #[inline] pub fn get_white_smoke(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_WhiteSmoke)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_yellow(&self) -> Result { + }} + #[inline] pub fn get_yellow(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Yellow)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_yellow_green(&self) -> Result { + }} + #[inline] pub fn get_yellow_green(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_YellowGreen)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } pub mod core { // Windows.UI.Core use ::prelude::*; @@ -1333,21 +1333,21 @@ RT_INTERFACE!{interface IAcceleratorKeyEventArgs(IAcceleratorKeyEventArgsVtbl): fn get_KeyStatus(&self, out: *mut CorePhysicalKeyStatus) -> HRESULT }} impl IAcceleratorKeyEventArgs { - #[inline] pub unsafe fn get_event_type(&self) -> Result { + #[inline] pub fn get_event_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EventType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_virtual_key(&self) -> Result { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_virtual_key(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VirtualKey)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_key_status(&self) -> Result { + }} + #[inline] pub fn get_key_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_KeyStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AcceleratorKeyEventArgs: IAcceleratorKeyEventArgs} DEFINE_IID!(IID_IAcceleratorKeyEventArgs2, 3540036086, 12158, 18547, 165, 85, 22, 110, 89, 110, 225, 197); @@ -1355,11 +1355,11 @@ RT_INTERFACE!{interface IAcceleratorKeyEventArgs2(IAcceleratorKeyEventArgs2Vtbl) fn get_DeviceId(&self, out: *mut HSTRING) -> HRESULT }} impl IAcceleratorKeyEventArgs2 { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum AppViewBackButtonVisibility: i32 { Visible (AppViewBackButtonVisibility_Visible) = 0, Collapsed (AppViewBackButtonVisibility_Collapsed) = 1, @@ -1370,15 +1370,15 @@ RT_INTERFACE!{interface IAutomationProviderRequestedEventArgs(IAutomationProvide fn put_AutomationProvider(&self, value: *mut IInspectable) -> HRESULT }} impl IAutomationProviderRequestedEventArgs { - #[inline] pub unsafe fn get_automation_provider(&self) -> Result> { + #[inline] pub fn get_automation_provider(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AutomationProvider)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_automation_provider(&self, value: &IInspectable) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_automation_provider(&self, value: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AutomationProvider)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AutomationProviderRequestedEventArgs: IAutomationProviderRequestedEventArgs} DEFINE_IID!(IID_IBackRequestedEventArgs, 3590574730, 58385, 19022, 186, 65, 106, 50, 122, 134, 117, 188); @@ -1387,15 +1387,15 @@ RT_INTERFACE!{interface IBackRequestedEventArgs(IBackRequestedEventArgsVtbl): II fn put_Handled(&self, value: bool) -> HRESULT }} impl IBackRequestedEventArgs { - #[inline] pub unsafe fn get_handled(&self) -> Result { + #[inline] pub fn get_handled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Handled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_handled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_handled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Handled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class BackRequestedEventArgs: IBackRequestedEventArgs} DEFINE_IID!(IID_ICharacterReceivedEventArgs, 3313788319, 39346, 19404, 189, 51, 4, 230, 63, 66, 144, 46); @@ -1404,45 +1404,45 @@ RT_INTERFACE!{interface ICharacterReceivedEventArgs(ICharacterReceivedEventArgsV fn get_KeyStatus(&self, out: *mut CorePhysicalKeyStatus) -> HRESULT }} impl ICharacterReceivedEventArgs { - #[inline] pub unsafe fn get_key_code(&self) -> Result { + #[inline] pub fn get_key_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_KeyCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_key_status(&self) -> Result { + }} + #[inline] pub fn get_key_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_KeyStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class CharacterReceivedEventArgs: ICharacterReceivedEventArgs} 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(&self, out: *mut super::super::foundation::Point) -> HRESULT, - fn get_SearchBounds(&self, out: *mut super::super::foundation::Rect) -> HRESULT, - fn get_ClosestInteractiveBounds(&self, out: *mut super::super::foundation::Rect) -> HRESULT, - fn put_ClosestInteractiveBounds(&self, value: super::super::foundation::Rect) -> HRESULT + fn get_PointerPosition(&self, out: *mut foundation::Point) -> HRESULT, + fn get_SearchBounds(&self, out: *mut foundation::Rect) -> HRESULT, + fn get_ClosestInteractiveBounds(&self, out: *mut foundation::Rect) -> HRESULT, + fn put_ClosestInteractiveBounds(&self, value: foundation::Rect) -> HRESULT }} impl IClosestInteractiveBoundsRequestedEventArgs { - #[inline] pub unsafe fn get_pointer_position(&self) -> Result { + #[inline] pub fn get_pointer_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PointerPosition)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_search_bounds(&self) -> Result { + }} + #[inline] pub fn get_search_bounds(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SearchBounds)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_closest_interactive_bounds(&self) -> Result { + }} + #[inline] pub fn get_closest_interactive_bounds(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ClosestInteractiveBounds)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_closest_interactive_bounds(&self, value: super::super::foundation::Rect) -> Result<()> { + }} + #[inline] pub fn set_closest_interactive_bounds(&self, value: foundation::Rect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ClosestInteractiveBounds)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ClosestInteractiveBoundsRequestedEventArgs: IClosestInteractiveBoundsRequestedEventArgs} RT_ENUM! { enum CoreAcceleratorKeyEventType: i32 { @@ -1450,69 +1450,69 @@ RT_ENUM! { enum CoreAcceleratorKeyEventType: i32 { }} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AcceleratorKeyActivated(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_AcceleratorKeyActivated(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AcceleratorKeyActivated(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl ICoreAcceleratorKeys { - #[inline] pub unsafe fn add_accelerator_key_activated(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_accelerator_key_activated(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AcceleratorKeyActivated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_accelerator_key_activated(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_accelerator_key_activated(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AcceleratorKeyActivated)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CoreAcceleratorKeys: ICoreAcceleratorKeys} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ClosestInteractiveBoundsRequested(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ClosestInteractiveBoundsRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ClosestInteractiveBoundsRequested(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl ICoreClosestInteractiveBoundsRequested { - #[inline] pub unsafe fn add_closest_interactive_bounds_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_closest_interactive_bounds_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ClosestInteractiveBoundsRequested)(self as *const _ as *mut _, 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(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_closest_interactive_bounds_requested(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ClosestInteractiveBoundsRequested)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } 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(&self, out: *mut bool) -> HRESULT, - fn add_GotFocus(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_GotFocus(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_LostFocus(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_LostFocus(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_GotFocus(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_GotFocus(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_LostFocus(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_LostFocus(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl ICoreComponentFocusable { - #[inline] pub unsafe fn get_has_focus(&self) -> Result { + #[inline] pub fn get_has_focus(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasFocus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_got_focus(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_got_focus(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_GotFocus)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_got_focus(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_got_focus(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_GotFocus)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_lost_focus(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_lost_focus(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_LostFocus)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_lost_focus(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_lost_focus(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_LostFocus)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CoreComponentInputSource: ICoreInputSourceBase} DEFINE_IID!(IID_ICoreCursor, 2525575887, 4381, 17452, 138, 119, 184, 121, 146, 248, 226, 214); @@ -1521,23 +1521,23 @@ RT_INTERFACE!{interface ICoreCursor(ICoreCursorVtbl): IInspectable(IInspectableV fn get_Type(&self, out: *mut CoreCursorType) -> HRESULT }} impl ICoreCursor { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_type(&self) -> Result { + }} + #[inline] pub fn get_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Type)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class CoreCursor: ICoreCursor} impl RtActivatable for CoreCursor {} impl CoreCursor { - #[inline] pub fn create_cursor(type_: CoreCursorType, id: u32) -> Result> { unsafe { + #[inline] pub fn create_cursor(type_: CoreCursorType, id: u32) -> Result> { >::get_activation_factory().create_cursor(type_, id) - }} + } } DEFINE_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]) [CLSID_CoreCursor]); DEFINE_IID!(IID_ICoreCursorFactory, 4130706977, 42909, 20179, 140, 50, 169, 239, 157, 107, 118, 164); @@ -1545,11 +1545,11 @@ RT_INTERFACE!{static interface ICoreCursorFactory(ICoreCursorFactoryVtbl): IInsp fn CreateCursor(&self, type_: CoreCursorType, id: u32, out: *mut *mut CoreCursor) -> HRESULT }} impl ICoreCursorFactory { - #[inline] pub unsafe fn create_cursor(&self, type_: CoreCursorType, id: u32) -> Result> { + #[inline] pub fn create_cursor(&self, type_: CoreCursorType, id: u32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateCursor)(self as *const _ as *mut _, type_, id, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, Pin (CoreCursorType_Pin) = 14, Person (CoreCursorType_Person) = 15, @@ -1558,47 +1558,47 @@ DEFINE_IID!(IID_ICoreDispatcher, 1624977320, 46853, 20446, 167, 214, 235, 187, 2 RT_INTERFACE!{interface ICoreDispatcher(ICoreDispatcherVtbl): IInspectable(IInspectableVtbl) [IID_ICoreDispatcher] { fn get_HasThreadAccess(&self, out: *mut bool) -> HRESULT, fn ProcessEvents(&self, options: CoreProcessEventsOption) -> HRESULT, - fn RunAsync(&self, priority: CoreDispatcherPriority, agileCallback: *mut DispatchedHandler, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn RunIdleAsync(&self, agileCallback: *mut IdleDispatchedHandler, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn RunAsync(&self, priority: CoreDispatcherPriority, agileCallback: *mut DispatchedHandler, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn RunIdleAsync(&self, agileCallback: *mut IdleDispatchedHandler, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl ICoreDispatcher { - #[inline] pub unsafe fn get_has_thread_access(&self) -> Result { + #[inline] pub fn get_has_thread_access(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasThreadAccess)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn process_events(&self, options: CoreProcessEventsOption) -> Result<()> { + }} + #[inline] pub fn process_events(&self, options: CoreProcessEventsOption) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ProcessEvents)(self as *const _ as *mut _, options); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn run_async(&self, priority: CoreDispatcherPriority, agileCallback: &DispatchedHandler) -> Result> { + }} + #[inline] pub fn run_async(&self, priority: CoreDispatcherPriority, agileCallback: &DispatchedHandler) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RunAsync)(self as *const _ as *mut _, 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(&self, agileCallback: &IdleDispatchedHandler) -> Result> { + }} + #[inline] pub fn run_idle_async(&self, agileCallback: &IdleDispatchedHandler) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RunIdleAsync)(self as *const _ as *mut _, agileCallback as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class CoreDispatcher: ICoreDispatcher} 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(&self, priority: CoreDispatcherPriority, agileCallback: *mut DispatchedHandler, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryRunIdleAsync(&self, agileCallback: *mut IdleDispatchedHandler, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn TryRunAsync(&self, priority: CoreDispatcherPriority, agileCallback: *mut DispatchedHandler, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryRunIdleAsync(&self, agileCallback: *mut IdleDispatchedHandler, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ICoreDispatcher2 { - #[inline] pub unsafe fn try_run_async(&self, priority: CoreDispatcherPriority, agileCallback: &DispatchedHandler) -> Result>> { + #[inline] pub fn try_run_async(&self, priority: CoreDispatcherPriority, agileCallback: &DispatchedHandler) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryRunAsync)(self as *const _ as *mut _, 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(&self, agileCallback: &IdleDispatchedHandler) -> Result>> { + }} + #[inline] pub fn try_run_idle_async(&self, agileCallback: &IdleDispatchedHandler) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryRunIdleAsync)(self as *const _ as *mut _, agileCallback as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum CoreDispatcherPriority: i32 { Idle (CoreDispatcherPriority_Idle) = -2, Low (CoreDispatcherPriority_Low) = -1, Normal (CoreDispatcherPriority_Normal) = 0, High (CoreDispatcherPriority_High) = 1, @@ -1612,29 +1612,29 @@ RT_INTERFACE!{interface ICoreDispatcherWithTaskPriority(ICoreDispatcherWithTaskP fn StopProcessEvents(&self) -> HRESULT }} impl ICoreDispatcherWithTaskPriority { - #[inline] pub unsafe fn get_current_priority(&self) -> Result { + #[inline] pub fn get_current_priority(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CurrentPriority)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_current_priority(&self, value: CoreDispatcherPriority) -> Result<()> { + }} + #[inline] pub fn set_current_priority(&self, value: CoreDispatcherPriority) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CurrentPriority)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn should_yield(&self) -> Result { + }} + #[inline] pub fn should_yield(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ShouldYield)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn should_yield_to_priority(&self, priority: CoreDispatcherPriority) -> Result { + }} + #[inline] pub fn should_yield_to_priority(&self, priority: CoreDispatcherPriority) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ShouldYieldToPriority)(self as *const _ as *mut _, priority, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn stop_process_events(&self) -> Result<()> { + }} + #[inline] pub fn stop_process_events(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StopProcessEvents)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CoreIndependentInputSource: ICoreInputSourceBase} RT_ENUM! { enum CoreInputDeviceTypes: u32 { @@ -1645,89 +1645,89 @@ RT_INTERFACE!{interface ICoreInputSourceBase(ICoreInputSourceBaseVtbl): IInspect fn get_Dispatcher(&self, out: *mut *mut CoreDispatcher) -> HRESULT, fn get_IsInputEnabled(&self, out: *mut bool) -> HRESULT, fn put_IsInputEnabled(&self, value: bool) -> HRESULT, - fn add_InputEnabled(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_InputEnabled(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_InputEnabled(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_InputEnabled(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl ICoreInputSourceBase { - #[inline] pub unsafe fn get_dispatcher(&self) -> Result> { + #[inline] pub fn get_dispatcher(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Dispatcher)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_input_enabled(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_input_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsInputEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_input_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_input_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsInputEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_input_enabled(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_input_enabled(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_InputEnabled)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_input_enabled(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_input_enabled(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_InputEnabled)(self as *const _ as *mut _, 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(&self) -> (), #[cfg(feature="windows-system")] fn GetCurrentKeyState(&self, virtualKey: super::super::system::VirtualKey, out: *mut CoreVirtualKeyStates) -> HRESULT, - fn add_CharacterReceived(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CharacterReceived(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_KeyDown(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_KeyDown(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_KeyUp(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_KeyUp(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_CharacterReceived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CharacterReceived(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_KeyDown(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_KeyDown(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_KeyUp(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_KeyUp(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl ICoreKeyboardInputSource { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_current_key_state(&self, virtualKey: super::super::system::VirtualKey) -> Result { + #[cfg(feature="windows-system")] #[inline] pub fn get_current_key_state(&self, virtualKey: super::super::system::VirtualKey) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetCurrentKeyState)(self as *const _ as *mut _, virtualKey, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_character_received(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_character_received(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CharacterReceived)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_character_received(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_character_received(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CharacterReceived)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_key_down(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_key_down(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_KeyDown)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_key_down(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_key_down(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_KeyDown)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_key_up(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_key_up(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_KeyUp)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_key_up(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_key_up(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_KeyUp)(self as *const _ as *mut _, 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(&self, out: *mut HSTRING) -> HRESULT }} impl ICoreKeyboardInputSource2 { - #[inline] pub unsafe fn get_current_key_event_device_id(&self) -> Result { + #[inline] pub fn get_current_key_event_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentKeyEventDeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_STRUCT! { struct CorePhysicalKeyStatus { RepeatCount: u32, ScanCode: u32, IsExtendedKey: bool, IsMenuKeyDown: bool, WasKeyDown: bool, IsKeyReleased: bool, @@ -1737,178 +1737,178 @@ RT_INTERFACE!{interface ICorePointerInputSource(ICorePointerInputSourceVtbl): II fn ReleasePointerCapture(&self) -> HRESULT, fn SetPointerCapture(&self) -> HRESULT, fn get_HasCapture(&self, out: *mut bool) -> HRESULT, - fn get_PointerPosition(&self, out: *mut super::super::foundation::Point) -> HRESULT, + fn get_PointerPosition(&self, out: *mut foundation::Point) -> HRESULT, fn get_PointerCursor(&self, out: *mut *mut CoreCursor) -> HRESULT, fn put_PointerCursor(&self, value: *mut CoreCursor) -> HRESULT, - fn add_PointerCaptureLost(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerCaptureLost(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerEntered(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerEntered(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerExited(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerExited(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerMoved(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerMoved(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerPressed(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerPressed(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerReleased(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerReleased(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerWheelChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerWheelChanged(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_PointerCaptureLost(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerCaptureLost(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerEntered(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerEntered(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerExited(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerExited(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerMoved(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerMoved(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerPressed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerPressed(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerReleased(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerReleased(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerWheelChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerWheelChanged(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl ICorePointerInputSource { - #[inline] pub unsafe fn release_pointer_capture(&self) -> Result<()> { + #[inline] pub fn release_pointer_capture(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReleasePointerCapture)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_pointer_capture(&self) -> Result<()> { + }} + #[inline] pub fn set_pointer_capture(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetPointerCapture)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_capture(&self) -> Result { + }} + #[inline] pub fn get_has_capture(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasCapture)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pointer_position(&self) -> Result { + }} + #[inline] pub fn get_pointer_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PointerPosition)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pointer_cursor(&self) -> Result> { + }} + #[inline] pub fn get_pointer_cursor(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PointerCursor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_pointer_cursor(&self, value: &CoreCursor) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_pointer_cursor(&self, value: &CoreCursor) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PointerCursor)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_capture_lost(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_pointer_capture_lost(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerCaptureLost)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_capture_lost(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_capture_lost(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerCaptureLost)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_entered(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_pointer_entered(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerEntered)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_entered(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_entered(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerEntered)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_exited(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_pointer_exited(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerExited)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_exited(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_exited(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerExited)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_moved(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_pointer_moved(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerMoved)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_moved(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_moved(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerMoved)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_pressed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_pointer_pressed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerPressed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_pressed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_pressed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerPressed)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_released(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_pointer_released(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerReleased)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_released(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_released(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerReleased)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_wheel_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_pointer_wheel_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerWheelChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_wheel_changed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_wheel_changed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerWheelChanged)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerRoutedAway(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerRoutedTo(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerRoutedTo(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerRoutedReleased(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerRoutedReleased(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_PointerRoutedAway(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerRoutedAway(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerRoutedTo(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerRoutedTo(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerRoutedReleased(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerRoutedReleased(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl ICorePointerRedirector { - #[inline] pub unsafe fn add_pointer_routed_away(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_pointer_routed_away(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerRoutedAway)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_routed_away(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_routed_away(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerRoutedAway)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_routed_to(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_pointer_routed_to(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerRoutedTo)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_routed_to(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_routed_to(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerRoutedTo)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_routed_released(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_pointer_routed_released(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerRoutedReleased)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_routed_released(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_routed_released(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerRoutedReleased)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum CoreProcessEventsOption: i32 { ProcessOneAndAllPending (CoreProcessEventsOption_ProcessOneAndAllPending) = 0, ProcessOneIfPresent (CoreProcessEventsOption_ProcessOneIfPresent) = 1, ProcessUntilQuit (CoreProcessEventsOption_ProcessUntilQuit) = 2, ProcessAllIfPresent (CoreProcessEventsOption_ProcessAllIfPresent) = 3, }} RT_STRUCT! { struct CoreProximityEvaluation { - Score: i32, AdjustedPoint: super::super::foundation::Point, + Score: i32, AdjustedPoint: foundation::Point, }} RT_ENUM! { enum CoreProximityEvaluationScore: i32 { Closest (CoreProximityEvaluationScore_Closest) = 0, Farthest (CoreProximityEvaluationScore_Farthest) = 2147483647, }} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_TouchHitTesting(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_TouchHitTesting(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_TouchHitTesting(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl ICoreTouchHitTesting { - #[inline] pub unsafe fn add_touch_hit_testing(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_touch_hit_testing(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_TouchHitTesting)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_touch_hit_testing(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_touch_hit_testing(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_TouchHitTesting)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum CoreVirtualKeyStates: u32 { None (CoreVirtualKeyStates_None) = 0, Down (CoreVirtualKeyStates_Down) = 1, Locked (CoreVirtualKeyStates_Locked) = 2, @@ -1916,8 +1916,8 @@ RT_ENUM! { enum CoreVirtualKeyStates: u32 { 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(&self, out: *mut *mut IInspectable) -> HRESULT, - fn get_Bounds(&self, out: *mut super::super::foundation::Rect) -> HRESULT, - fn get_CustomProperties(&self, out: *mut *mut super::super::foundation::collections::IPropertySet) -> HRESULT, + fn get_Bounds(&self, out: *mut foundation::Rect) -> HRESULT, + fn get_CustomProperties(&self, out: *mut *mut foundation::collections::IPropertySet) -> HRESULT, fn get_Dispatcher(&self, out: *mut *mut CoreDispatcher) -> HRESULT, fn get_FlowDirection(&self, out: *mut CoreWindowFlowDirection) -> HRESULT, fn put_FlowDirection(&self, value: CoreWindowFlowDirection) -> HRESULT, @@ -1925,7 +1925,7 @@ RT_INTERFACE!{interface ICoreWindow(ICoreWindowVtbl): IInspectable(IInspectableV fn put_IsInputEnabled(&self, value: bool) -> HRESULT, fn get_PointerCursor(&self, out: *mut *mut CoreCursor) -> HRESULT, fn put_PointerCursor(&self, value: *mut CoreCursor) -> HRESULT, - fn get_PointerPosition(&self, out: *mut super::super::foundation::Point) -> HRESULT, + fn get_PointerPosition(&self, out: *mut foundation::Point) -> HRESULT, fn get_Visible(&self, out: *mut bool) -> HRESULT, fn Activate(&self) -> HRESULT, fn Close(&self) -> HRESULT, @@ -1935,345 +1935,345 @@ RT_INTERFACE!{interface ICoreWindow(ICoreWindowVtbl): IInspectable(IInspectableV #[cfg(feature="windows-system")] fn GetKeyState(&self, virtualKey: super::super::system::VirtualKey, out: *mut CoreVirtualKeyStates) -> HRESULT, fn ReleasePointerCapture(&self) -> HRESULT, fn SetPointerCapture(&self) -> HRESULT, - fn add_Activated(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Activated(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_AutomationProviderRequested(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AutomationProviderRequested(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_CharacterReceived(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CharacterReceived(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Closed(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Closed(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_InputEnabled(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_InputEnabled(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_KeyDown(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_KeyDown(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_KeyUp(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_KeyUp(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerCaptureLost(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerCaptureLost(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerEntered(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerEntered(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerExited(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerExited(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerMoved(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerMoved(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerPressed(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerPressed(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerReleased(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerReleased(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_TouchHitTesting(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_TouchHitTesting(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerWheelChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerWheelChanged(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_SizeChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SizeChanged(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_VisibilityChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_VisibilityChanged(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_Activated(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Activated(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_AutomationProviderRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AutomationProviderRequested(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_CharacterReceived(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CharacterReceived(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_Closed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Closed(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_InputEnabled(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_InputEnabled(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_KeyDown(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_KeyDown(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_KeyUp(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_KeyUp(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerCaptureLost(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerCaptureLost(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerEntered(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerEntered(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerExited(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerExited(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerMoved(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerMoved(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerPressed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerPressed(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerReleased(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerReleased(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_TouchHitTesting(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_TouchHitTesting(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerWheelChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerWheelChanged(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_SizeChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SizeChanged(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_VisibilityChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_VisibilityChanged(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl ICoreWindow { - #[inline] pub unsafe fn get_automation_host_provider(&self) -> Result> { + #[inline] pub fn get_automation_host_provider(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AutomationHostProvider)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_bounds(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_bounds(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Bounds)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_custom_properties(&self) -> Result> { + }} + #[inline] pub fn get_custom_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CustomProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_dispatcher(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_dispatcher(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Dispatcher)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_flow_direction(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_flow_direction(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FlowDirection)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_flow_direction(&self, value: CoreWindowFlowDirection) -> Result<()> { + }} + #[inline] pub fn set_flow_direction(&self, value: CoreWindowFlowDirection) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FlowDirection)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_input_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_input_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsInputEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_input_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_input_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsInputEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_pointer_cursor(&self) -> Result> { + }} + #[inline] pub fn get_pointer_cursor(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PointerCursor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_pointer_cursor(&self, value: &CoreCursor) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_pointer_cursor(&self, value: &CoreCursor) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PointerCursor)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_pointer_position(&self) -> Result { + }} + #[inline] pub fn get_pointer_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PointerPosition)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_visible(&self) -> Result { + }} + #[inline] pub fn get_visible(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Visible)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn activate(&self) -> Result<()> { + }} + #[inline] pub fn activate(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Activate)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn close(&self) -> Result<()> { + }} + #[inline] pub fn close(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Close)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_async_key_state(&self, virtualKey: super::super::system::VirtualKey) -> Result { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_async_key_state(&self, virtualKey: super::super::system::VirtualKey) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetAsyncKeyState)(self as *const _ as *mut _, virtualKey, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_key_state(&self, virtualKey: super::super::system::VirtualKey) -> Result { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_key_state(&self, virtualKey: super::super::system::VirtualKey) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetKeyState)(self as *const _ as *mut _, virtualKey, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn release_pointer_capture(&self) -> Result<()> { + }} + #[inline] pub fn release_pointer_capture(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReleasePointerCapture)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_pointer_capture(&self) -> Result<()> { + }} + #[inline] pub fn set_pointer_capture(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetPointerCapture)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_activated(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_activated(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Activated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_activated(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_activated(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Activated)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_automation_provider_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_automation_provider_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AutomationProviderRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_automation_provider_requested(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_automation_provider_requested(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AutomationProviderRequested)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_character_received(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_character_received(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CharacterReceived)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_character_received(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_character_received(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CharacterReceived)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_closed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_closed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Closed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_closed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_closed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Closed)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_input_enabled(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_input_enabled(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_InputEnabled)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_input_enabled(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_input_enabled(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_InputEnabled)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_key_down(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_key_down(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_KeyDown)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_key_down(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_key_down(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_KeyDown)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_key_up(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_key_up(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_KeyUp)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_key_up(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_key_up(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_KeyUp)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_capture_lost(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_pointer_capture_lost(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerCaptureLost)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_capture_lost(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_capture_lost(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerCaptureLost)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_entered(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_pointer_entered(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerEntered)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_entered(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_entered(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerEntered)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_exited(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_pointer_exited(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerExited)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_exited(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_exited(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerExited)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_moved(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_pointer_moved(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerMoved)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_moved(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_moved(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerMoved)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_pressed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_pointer_pressed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerPressed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_pressed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_pressed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerPressed)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_released(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_pointer_released(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerReleased)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_released(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_released(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerReleased)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_touch_hit_testing(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_touch_hit_testing(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_TouchHitTesting)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_touch_hit_testing(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_touch_hit_testing(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_TouchHitTesting)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_wheel_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_pointer_wheel_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerWheelChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_wheel_changed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_wheel_changed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerWheelChanged)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_size_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_size_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SizeChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_size_changed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_size_changed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SizeChanged)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_visibility_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_visibility_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_VisibilityChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_visibility_changed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_visibility_changed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_VisibilityChanged)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CoreWindow: ICoreWindow} impl RtActivatable for CoreWindow {} impl CoreWindow { - #[inline] pub fn get_for_current_thread() -> Result> { unsafe { + #[inline] pub fn get_for_current_thread() -> Result>> { >::get_activation_factory().get_for_current_thread() - }} + } } DEFINE_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]) [CLSID_CoreWindow]); 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(&self, value: super::super::foundation::Point) -> HRESULT + fn put_PointerPosition(&self, value: foundation::Point) -> HRESULT }} impl ICoreWindow2 { - #[inline] pub unsafe fn set_pointer_position(&self, value: super::super::foundation::Point) -> Result<()> { + #[inline] pub fn set_pointer_position(&self, value: foundation::Point) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PointerPosition)(self as *const _ as *mut _, 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ClosestInteractiveBoundsRequested(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_ClosestInteractiveBoundsRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ClosestInteractiveBoundsRequested(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, fn GetCurrentKeyEventDeviceId(&self, out: *mut HSTRING) -> HRESULT }} impl ICoreWindow3 { - #[inline] pub unsafe fn add_closest_interactive_bounds_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_closest_interactive_bounds_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ClosestInteractiveBoundsRequested)(self as *const _ as *mut _, 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(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_closest_interactive_bounds_requested(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ClosestInteractiveBoundsRequested)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_key_event_device_id(&self) -> Result { + }} + #[inline] pub fn get_current_key_event_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentKeyEventDeviceId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ICoreWindow4, 902492368, 18416, 17260, 175, 151, 13, 216, 143, 111, 95, 2); RT_INTERFACE!{interface ICoreWindow4(ICoreWindow4Vtbl): IInspectable(IInspectableVtbl) [IID_ICoreWindow4] { - fn add_ResizeStarted(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ResizeStarted(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ResizeCompleted(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ResizeCompleted(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ResizeStarted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ResizeStarted(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_ResizeCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ResizeCompleted(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl ICoreWindow4 { - #[inline] pub unsafe fn add_resize_started(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_resize_started(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ResizeStarted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_resize_started(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_resize_started(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ResizeStarted)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_resize_completed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_resize_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ResizeCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_resize_completed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_resize_completed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ResizeCompleted)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ICoreWindow5, 1263198689, 11885, 20138, 189, 161, 28, 92, 193, 190, 225, 65); RT_INTERFACE!{interface ICoreWindow5(ICoreWindow5Vtbl): IInspectable(IInspectableVtbl) [IID_ICoreWindow5] { @@ -2282,16 +2282,16 @@ RT_INTERFACE!{interface ICoreWindow5(ICoreWindow5Vtbl): IInspectable(IInspectabl fn get_ActivationMode(&self, out: *mut CoreWindowActivationMode) -> HRESULT }} impl ICoreWindow5 { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_dispatcher_queue(&self) -> Result> { + #[cfg(feature="windows-system")] #[inline] pub fn get_dispatcher_queue(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DispatcherQueue)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_activation_mode(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_activation_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ActivationMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum CoreWindowActivationMode: i32 { None (CoreWindowActivationMode_None) = 0, Deactivated (CoreWindowActivationMode_Deactivated) = 1, ActivatedNotForeground (CoreWindowActivationMode_ActivatedNotForeground) = 2, ActivatedInForeground (CoreWindowActivationMode_ActivatedInForeground) = 3, @@ -2301,106 +2301,106 @@ RT_ENUM! { enum CoreWindowActivationState: i32 { }} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Showing(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_MaxSize(&self, out: *mut super::super::foundation::Size) -> HRESULT, - fn get_MinSize(&self, out: *mut super::super::foundation::Size) -> HRESULT, + fn add_Showing(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Showing(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn get_MaxSize(&self, out: *mut foundation::Size) -> HRESULT, + fn get_MinSize(&self, out: *mut foundation::Size) -> HRESULT, fn get_Title(&self, out: *mut HSTRING) -> HRESULT, fn put_Title(&self, value: HSTRING) -> HRESULT, fn get_IsInteractionDelayed(&self, out: *mut i32) -> HRESULT, fn put_IsInteractionDelayed(&self, value: i32) -> HRESULT, - fn get_Commands(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Commands(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_DefaultCommandIndex(&self, out: *mut u32) -> HRESULT, fn put_DefaultCommandIndex(&self, value: u32) -> HRESULT, fn get_CancelCommandIndex(&self, out: *mut u32) -> HRESULT, fn put_CancelCommandIndex(&self, value: u32) -> HRESULT, fn get_BackButtonCommand(&self, out: *mut *mut super::popups::UICommandInvokedHandler) -> HRESULT, fn put_BackButtonCommand(&self, value: *mut super::popups::UICommandInvokedHandler) -> HRESULT, - fn ShowAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn ShowAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ICoreWindowDialog { - #[inline] pub unsafe fn add_showing(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_showing(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Showing)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_showing(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_showing(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Showing)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_size(&self) -> Result { + }} + #[inline] pub fn get_max_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_size(&self) -> Result { + }} + #[inline] pub fn get_min_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_title(&self) -> Result { + }} + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_title(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_title(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Title)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_interaction_delayed(&self) -> Result { + }} + #[inline] pub fn get_is_interaction_delayed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsInteractionDelayed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_interaction_delayed(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_is_interaction_delayed(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsInteractionDelayed)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_commands(&self) -> Result>> { + }} + #[inline] pub fn get_commands(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Commands)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_command_index(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_default_command_index(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DefaultCommandIndex)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_default_command_index(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_default_command_index(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DefaultCommandIndex)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_cancel_command_index(&self) -> Result { + }} + #[inline] pub fn get_cancel_command_index(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CancelCommandIndex)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_cancel_command_index(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_cancel_command_index(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CancelCommandIndex)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_back_button_command(&self) -> Result> { + }} + #[inline] pub fn get_back_button_command(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BackButtonCommand)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_back_button_command(&self, value: &super::popups::UICommandInvokedHandler) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_back_button_command(&self, value: &super::popups::UICommandInvokedHandler) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BackButtonCommand)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn show_async(&self) -> Result>> { + }} + #[inline] pub fn show_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class CoreWindowDialog: ICoreWindowDialog} impl RtActivatable for CoreWindowDialog {} impl RtActivatable for CoreWindowDialog {} impl CoreWindowDialog { - #[inline] pub fn create_with_title(title: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_with_title(title: &HStringArg) -> Result> { >::get_activation_factory().create_with_title(title) - }} + } } DEFINE_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]) [CLSID_CoreWindowDialog]); DEFINE_IID!(IID_ICoreWindowDialogFactory, 3484592213, 7257, 19219, 177, 229, 22, 226, 152, 5, 247, 196); @@ -2408,11 +2408,11 @@ RT_INTERFACE!{static interface ICoreWindowDialogFactory(ICoreWindowDialogFactory fn CreateWithTitle(&self, title: HSTRING, out: *mut *mut CoreWindowDialog) -> HRESULT }} impl ICoreWindowDialogFactory { - #[inline] pub unsafe fn create_with_title(&self, title: &HStringArg) -> Result> { + #[inline] pub fn create_with_title(&self, title: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithTitle)(self as *const _ as *mut _, title.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ICoreWindowEventArgs, 657137395, 50739, 19877, 162, 108, 198, 208, 245, 107, 41, 218); RT_INTERFACE!{interface ICoreWindowEventArgs(ICoreWindowEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICoreWindowEventArgs] { @@ -2420,15 +2420,15 @@ RT_INTERFACE!{interface ICoreWindowEventArgs(ICoreWindowEventArgsVtbl): IInspect fn put_Handled(&self, value: bool) -> HRESULT }} impl ICoreWindowEventArgs { - #[inline] pub unsafe fn get_handled(&self) -> Result { + #[inline] pub fn get_handled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Handled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_handled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_handled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Handled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CoreWindowEventArgs: ICoreWindowEventArgs} RT_ENUM! { enum CoreWindowFlowDirection: i32 { @@ -2436,125 +2436,125 @@ RT_ENUM! { enum CoreWindowFlowDirection: i32 { }} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Showing(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_MaxSize(&self, out: *mut super::super::foundation::Size) -> HRESULT, - fn get_MinSize(&self, out: *mut super::super::foundation::Size) -> HRESULT, + fn add_Showing(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Showing(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn get_MaxSize(&self, out: *mut foundation::Size) -> HRESULT, + fn get_MinSize(&self, out: *mut foundation::Size) -> HRESULT, fn get_Title(&self, out: *mut HSTRING) -> HRESULT, fn put_Title(&self, value: HSTRING) -> HRESULT, fn get_IsInteractionDelayed(&self, out: *mut i32) -> HRESULT, fn put_IsInteractionDelayed(&self, value: i32) -> HRESULT, - fn get_Commands(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Commands(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_DefaultCommandIndex(&self, out: *mut u32) -> HRESULT, fn put_DefaultCommandIndex(&self, value: u32) -> HRESULT, fn get_BackButtonCommand(&self, out: *mut *mut super::popups::UICommandInvokedHandler) -> HRESULT, fn put_BackButtonCommand(&self, value: *mut super::popups::UICommandInvokedHandler) -> HRESULT, - fn ShowAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn ShowAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ICoreWindowFlyout { - #[inline] pub unsafe fn add_showing(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_showing(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Showing)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_showing(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_showing(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Showing)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_size(&self) -> Result { + }} + #[inline] pub fn get_max_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_size(&self) -> Result { + }} + #[inline] pub fn get_min_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_title(&self) -> Result { + }} + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_title(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_title(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Title)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_interaction_delayed(&self) -> Result { + }} + #[inline] pub fn get_is_interaction_delayed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsInteractionDelayed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_interaction_delayed(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_is_interaction_delayed(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsInteractionDelayed)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_commands(&self) -> Result>> { + }} + #[inline] pub fn get_commands(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Commands)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_command_index(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_default_command_index(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DefaultCommandIndex)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_default_command_index(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_default_command_index(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DefaultCommandIndex)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_back_button_command(&self) -> Result> { + }} + #[inline] pub fn get_back_button_command(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BackButtonCommand)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_back_button_command(&self, value: &super::popups::UICommandInvokedHandler) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_back_button_command(&self, value: &super::popups::UICommandInvokedHandler) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BackButtonCommand)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn show_async(&self) -> Result>> { + }} + #[inline] pub fn show_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class CoreWindowFlyout: ICoreWindowFlyout} impl RtActivatable for CoreWindowFlyout {} impl CoreWindowFlyout { - #[inline] pub fn create(position: super::super::foundation::Point) -> Result> { unsafe { + #[inline] pub fn create(position: foundation::Point) -> Result> { >::get_activation_factory().create(position) - }} - #[inline] pub fn create_with_title(position: super::super::foundation::Point, title: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_with_title(position: foundation::Point, title: &HStringArg) -> Result> { >::get_activation_factory().create_with_title(position, title) - }} + } } DEFINE_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]) [CLSID_CoreWindowFlyout]); 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(&self, position: super::super::foundation::Point, out: *mut *mut CoreWindowFlyout) -> HRESULT, - fn CreateWithTitle(&self, position: super::super::foundation::Point, title: HSTRING, out: *mut *mut CoreWindowFlyout) -> HRESULT + fn Create(&self, position: foundation::Point, out: *mut *mut CoreWindowFlyout) -> HRESULT, + fn CreateWithTitle(&self, position: foundation::Point, title: HSTRING, out: *mut *mut CoreWindowFlyout) -> HRESULT }} impl ICoreWindowFlyoutFactory { - #[inline] pub unsafe fn create(&self, position: super::super::foundation::Point) -> Result> { + #[inline] pub fn create(&self, position: foundation::Point) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, position, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_title(&self, position: super::super::foundation::Point, title: &HStringArg) -> Result> { + }} + #[inline] pub fn create_with_title(&self, position: foundation::Point, title: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithTitle)(self as *const _ as *mut _, position, title.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, value: super::super::foundation::Size) -> HRESULT + fn SetDesiredSize(&self, value: foundation::Size) -> HRESULT }} impl ICoreWindowPopupShowingEventArgs { - #[inline] pub unsafe fn set_desired_size(&self, value: super::super::foundation::Size) -> Result<()> { + #[inline] pub fn set_desired_size(&self, value: foundation::Size) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetDesiredSize)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CoreWindowPopupShowingEventArgs: ICoreWindowPopupShowingEventArgs} DEFINE_IID!(IID_ICoreWindowResizeManager, 3102783781, 45904, 18611, 161, 152, 92, 26, 132, 112, 2, 67); @@ -2562,17 +2562,17 @@ RT_INTERFACE!{interface ICoreWindowResizeManager(ICoreWindowResizeManagerVtbl): fn NotifyLayoutCompleted(&self) -> HRESULT }} impl ICoreWindowResizeManager { - #[inline] pub unsafe fn notify_layout_completed(&self) -> Result<()> { + #[inline] pub fn notify_layout_completed(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).NotifyLayoutCompleted)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CoreWindowResizeManager: ICoreWindowResizeManager} impl RtActivatable for CoreWindowResizeManager {} impl CoreWindowResizeManager { - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} + } } DEFINE_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]) [CLSID_CoreWindowResizeManager]); DEFINE_IID!(IID_ICoreWindowResizeManagerLayoutCapability, 3145003643, 42308, 17153, 128, 230, 10, 224, 51, 239, 69, 54); @@ -2581,68 +2581,68 @@ RT_INTERFACE!{interface ICoreWindowResizeManagerLayoutCapability(ICoreWindowResi fn get_ShouldWaitForLayoutCompletion(&self, out: *mut bool) -> HRESULT }} impl ICoreWindowResizeManagerLayoutCapability { - #[inline] pub unsafe fn set_should_wait_for_layout_completion(&self, value: bool) -> Result<()> { + #[inline] pub fn set_should_wait_for_layout_completion(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ShouldWaitForLayoutCompletion)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_should_wait_for_layout_completion(&self) -> Result { + }} + #[inline] pub fn get_should_wait_for_layout_completion(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ShouldWaitForLayoutCompletion)(self as *const _ as *mut _, &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(&self, out: *mut *mut CoreWindowResizeManager) -> HRESULT }} impl ICoreWindowResizeManagerStatics { - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut *mut CoreWindow) -> HRESULT }} impl ICoreWindowStatic { - #[inline] pub unsafe fn get_for_current_thread(&self) -> Result> { + #[inline] pub fn get_for_current_thread(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentThread)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self) -> HRESULT }} impl DispatchedHandler { - #[inline] pub unsafe fn invoke(&self) -> Result<()> { + #[inline] pub fn invoke(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _); 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(&self, e: *mut IdleDispatchedHandlerArgs) -> HRESULT }} impl IdleDispatchedHandler { - #[inline] pub unsafe fn invoke(&self, e: &IdleDispatchedHandlerArgs) -> Result<()> { + #[inline] pub fn invoke(&self, e: &IdleDispatchedHandlerArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, e as *const _ as *mut _); 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(&self, out: *mut bool) -> HRESULT }} impl IIdleDispatchedHandlerArgs { - #[inline] pub unsafe fn get_is_dispatcher_idle(&self) -> Result { + #[inline] pub fn get_is_dispatcher_idle(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDispatcherIdle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class IdleDispatchedHandlerArgs: IIdleDispatchedHandlerArgs} DEFINE_IID!(IID_IInitializeWithCoreWindow, 412033238, 39027, 17994, 172, 229, 87, 224, 16, 244, 101, 230); @@ -2650,21 +2650,21 @@ RT_INTERFACE!{interface IInitializeWithCoreWindow(IInitializeWithCoreWindowVtbl) fn Initialize(&self, window: *mut CoreWindow) -> HRESULT }} impl IInitializeWithCoreWindow { - #[inline] pub unsafe fn initialize(&self, window: &CoreWindow) -> Result<()> { + #[inline] pub fn initialize(&self, window: &CoreWindow) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Initialize)(self as *const _ as *mut _, window as *const _ as *mut _); if hr == S_OK { Ok(()) } 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(&self, out: *mut bool) -> HRESULT }} impl IInputEnabledEventArgs { - #[inline] pub unsafe fn get_input_enabled(&self) -> Result { + #[inline] pub fn get_input_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InputEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class InputEnabledEventArgs: IInputEnabledEventArgs} DEFINE_IID!(IID_IKeyEventArgs, 1609951536, 9540, 18967, 189, 120, 31, 47, 222, 187, 16, 107); @@ -2674,16 +2674,16 @@ RT_INTERFACE!{interface IKeyEventArgs(IKeyEventArgsVtbl): IInspectable(IInspecta fn get_KeyStatus(&self, out: *mut CorePhysicalKeyStatus) -> HRESULT }} impl IKeyEventArgs { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_virtual_key(&self) -> Result { + #[cfg(feature="windows-system")] #[inline] pub fn get_virtual_key(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VirtualKey)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_key_status(&self) -> Result { + }} + #[inline] pub fn get_key_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_KeyStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class KeyEventArgs: IKeyEventArgs} DEFINE_IID!(IID_IKeyEventArgs2, 1480252824, 1936, 17777, 155, 18, 100, 94, 249, 215, 158, 66); @@ -2691,59 +2691,59 @@ RT_INTERFACE!{interface IKeyEventArgs2(IKeyEventArgs2Vtbl): IInspectable(IInspec fn get_DeviceId(&self, out: *mut HSTRING) -> HRESULT }} impl IKeyEventArgs2 { - #[inline] pub unsafe fn get_device_id(&self) -> Result { + #[inline] pub fn get_device_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DeviceId)(self as *const _ as *mut _, &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(&self, out: *mut *mut super::input::PointerPoint) -> HRESULT, #[cfg(not(feature="windows-system"))] fn __Dummy1(&self) -> (), #[cfg(feature="windows-system")] fn get_KeyModifiers(&self, out: *mut super::super::system::VirtualKeyModifiers) -> HRESULT, - fn GetIntermediatePoints(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn GetIntermediatePoints(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IPointerEventArgs { - #[inline] pub unsafe fn get_current_point(&self) -> Result> { + #[inline] pub fn get_current_point(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CurrentPoint)(self 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 get_key_modifiers(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_key_modifiers(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_KeyModifiers)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_intermediate_points(&self) -> Result>> { + }} + #[inline] pub fn get_intermediate_points(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetIntermediatePoints)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PointerEventArgs: IPointerEventArgs} 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(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_BackRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_BackRequested(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_BackRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl ISystemNavigationManager { - #[inline] pub unsafe fn add_back_requested(&self, handler: &super::super::foundation::EventHandler) -> Result { + #[inline] pub fn add_back_requested(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_BackRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_back_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_back_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_BackRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SystemNavigationManager: ISystemNavigationManager} impl RtActivatable for SystemNavigationManager {} impl SystemNavigationManager { - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} + } } DEFINE_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]) [CLSID_SystemNavigationManager]); DEFINE_IID!(IID_ISystemNavigationManager2, 2354119681, 26558, 18862, 149, 9, 103, 28, 30, 84, 163, 137); @@ -2752,66 +2752,66 @@ RT_INTERFACE!{interface ISystemNavigationManager2(ISystemNavigationManager2Vtbl) fn put_AppViewBackButtonVisibility(&self, value: AppViewBackButtonVisibility) -> HRESULT }} impl ISystemNavigationManager2 { - #[inline] pub unsafe fn get_app_view_back_button_visibility(&self) -> Result { + #[inline] pub fn get_app_view_back_button_visibility(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AppViewBackButtonVisibility)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_app_view_back_button_visibility(&self, value: AppViewBackButtonVisibility) -> Result<()> { + }} + #[inline] pub fn set_app_view_back_button_visibility(&self, value: AppViewBackButtonVisibility) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AppViewBackButtonVisibility)(self as *const _ as *mut _, 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(&self, out: *mut *mut SystemNavigationManager) -> HRESULT }} impl ISystemNavigationManagerStatics { - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut CoreProximityEvaluation) -> HRESULT, fn put_ProximityEvaluation(&self, value: CoreProximityEvaluation) -> HRESULT, - fn get_Point(&self, out: *mut super::super::foundation::Point) -> HRESULT, - fn get_BoundingBox(&self, out: *mut super::super::foundation::Rect) -> HRESULT, - fn EvaluateProximityToRect(&self, controlBoundingBox: super::super::foundation::Rect, out: *mut CoreProximityEvaluation) -> HRESULT, - fn EvaluateProximityToPolygon(&self, controlVerticesSize: u32, controlVertices: *mut super::super::foundation::Point, out: *mut CoreProximityEvaluation) -> HRESULT + fn get_Point(&self, out: *mut foundation::Point) -> HRESULT, + fn get_BoundingBox(&self, out: *mut foundation::Rect) -> HRESULT, + fn EvaluateProximityToRect(&self, controlBoundingBox: foundation::Rect, out: *mut CoreProximityEvaluation) -> HRESULT, + fn EvaluateProximityToPolygon(&self, controlVerticesSize: u32, controlVertices: *mut foundation::Point, out: *mut CoreProximityEvaluation) -> HRESULT }} impl ITouchHitTestingEventArgs { - #[inline] pub unsafe fn get_proximity_evaluation(&self) -> Result { + #[inline] pub fn get_proximity_evaluation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProximityEvaluation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_proximity_evaluation(&self, value: CoreProximityEvaluation) -> Result<()> { + }} + #[inline] pub fn set_proximity_evaluation(&self, value: CoreProximityEvaluation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ProximityEvaluation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_point(&self) -> Result { + }} + #[inline] pub fn get_point(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Point)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_bounding_box(&self) -> Result { + }} + #[inline] pub fn get_bounding_box(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BoundingBox)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn evaluate_proximity_to_rect(&self, controlBoundingBox: super::super::foundation::Rect) -> Result { + }} + #[inline] pub fn evaluate_proximity_to_rect(&self, controlBoundingBox: foundation::Rect) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).EvaluateProximityToRect)(self as *const _ as *mut _, controlBoundingBox, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn evaluate_proximity_to_polygon(&self, controlVertices: &[super::super::foundation::Point]) -> Result { + }} + #[inline] pub fn evaluate_proximity_to_polygon(&self, controlVertices: &[foundation::Point]) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).EvaluateProximityToPolygon)(self as *const _ as *mut _, controlVertices.len() as u32, controlVertices.as_ptr() as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class TouchHitTestingEventArgs: ITouchHitTestingEventArgs} DEFINE_IID!(IID_IVisibilityChangedEventArgs, 3214481642, 55297, 17764, 164, 149, 177, 232, 79, 138, 208, 133); @@ -2819,11 +2819,11 @@ RT_INTERFACE!{interface IVisibilityChangedEventArgs(IVisibilityChangedEventArgsV fn get_Visible(&self, out: *mut bool) -> HRESULT }} impl IVisibilityChangedEventArgs { - #[inline] pub unsafe fn get_visible(&self) -> Result { + #[inline] pub fn get_visible(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Visible)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class VisibilityChangedEventArgs: IVisibilityChangedEventArgs} DEFINE_IID!(IID_IWindowActivatedEventArgs, 396191207, 18008, 19638, 170, 19, 65, 208, 148, 234, 37, 94); @@ -2831,23 +2831,23 @@ RT_INTERFACE!{interface IWindowActivatedEventArgs(IWindowActivatedEventArgsVtbl) fn get_WindowActivationState(&self, out: *mut CoreWindowActivationState) -> HRESULT }} impl IWindowActivatedEventArgs { - #[inline] pub unsafe fn get_window_activation_state(&self) -> Result { + #[inline] pub fn get_window_activation_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_WindowActivationState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class WindowActivatedEventArgs: IWindowActivatedEventArgs} 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(&self, out: *mut super::super::foundation::Size) -> HRESULT + fn get_Size(&self, out: *mut foundation::Size) -> HRESULT }} impl IWindowSizeChangedEventArgs { - #[inline] pub unsafe fn get_size(&self) -> Result { + #[inline] pub fn get_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Size)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class WindowSizeChangedEventArgs: IWindowSizeChangedEventArgs} pub mod preview { // Windows.UI.Core.Preview @@ -2856,47 +2856,47 @@ DEFINE_IID!(IID_ISystemNavigationCloseRequestedPreviewEventArgs, 2211450337, 521 RT_INTERFACE!{interface ISystemNavigationCloseRequestedPreviewEventArgs(ISystemNavigationCloseRequestedPreviewEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISystemNavigationCloseRequestedPreviewEventArgs] { fn get_Handled(&self, out: *mut bool) -> HRESULT, fn put_Handled(&self, value: bool) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl ISystemNavigationCloseRequestedPreviewEventArgs { - #[inline] pub unsafe fn get_handled(&self) -> Result { + #[inline] pub fn get_handled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Handled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_handled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_handled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Handled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SystemNavigationCloseRequestedPreviewEventArgs: ISystemNavigationCloseRequestedPreviewEventArgs} DEFINE_IID!(IID_ISystemNavigationManagerPreview, 3965650056, 25637, 18295, 165, 54, 203, 86, 52, 66, 127, 13); RT_INTERFACE!{interface ISystemNavigationManagerPreview(ISystemNavigationManagerPreviewVtbl): IInspectable(IInspectableVtbl) [IID_ISystemNavigationManagerPreview] { - fn add_CloseRequested(&self, handler: *mut ::rt::gen::windows::foundation::EventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CloseRequested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn add_CloseRequested(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CloseRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl ISystemNavigationManagerPreview { - #[inline] pub unsafe fn add_close_requested(&self, handler: &::rt::gen::windows::foundation::EventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub fn add_close_requested(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CloseRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_close_requested(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_close_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CloseRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SystemNavigationManagerPreview: ISystemNavigationManagerPreview} impl RtActivatable for SystemNavigationManagerPreview {} impl SystemNavigationManagerPreview { - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} + } } DEFINE_CLSID!(SystemNavigationManagerPreview(&[87,105,110,100,111,119,115,46,85,73,46,67,111,114,101,46,80,114,101,118,105,101,119,46,83,121,115,116,101,109,78,97,118,105,103,97,116,105,111,110,77,97,110,97,103,101,114,80,114,101,118,105,101,119,0]) [CLSID_SystemNavigationManagerPreview]); DEFINE_IID!(IID_ISystemNavigationManagerPreviewStatics, 244781920, 57204, 19406, 132, 203, 189, 17, 129, 172, 10, 113); @@ -2904,56 +2904,56 @@ RT_INTERFACE!{static interface ISystemNavigationManagerPreviewStatics(ISystemNav fn GetForCurrentView(&self, out: *mut *mut SystemNavigationManagerPreview) -> HRESULT }} impl ISystemNavigationManagerPreviewStatics { - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } } // Windows.UI.Core.Preview pub mod animationmetrics { // Windows.UI.Core.AnimationMetrics use ::prelude::*; 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(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn get_StaggerDelay(&self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_Animations(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_StaggerDelay(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn get_StaggerDelayFactor(&self, out: *mut f32) -> HRESULT, - fn get_DelayLimit(&self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, + fn get_DelayLimit(&self, out: *mut foundation::TimeSpan) -> HRESULT, fn get_ZOrder(&self, out: *mut i32) -> HRESULT }} impl IAnimationDescription { - #[inline] pub unsafe fn get_animations(&self) -> Result>> { + #[inline] pub fn get_animations(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Animations)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_stagger_delay(&self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_stagger_delay(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StaggerDelay)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_stagger_delay_factor(&self) -> Result { + }} + #[inline] pub fn get_stagger_delay_factor(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StaggerDelayFactor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_delay_limit(&self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + }} + #[inline] pub fn get_delay_limit(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DelayLimit)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_zorder(&self) -> Result { + }} + #[inline] pub fn get_zorder(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ZOrder)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AnimationDescription: IAnimationDescription} impl RtActivatable for AnimationDescription {} impl AnimationDescription { - #[inline] pub fn create_instance(effect: AnimationEffect, target: AnimationEffectTarget) -> Result> { unsafe { + #[inline] pub fn create_instance(effect: AnimationEffect, target: AnimationEffectTarget) -> Result> { >::get_activation_factory().create_instance(effect, target) - }} + } } DEFINE_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]) [CLSID_AnimationDescription]); DEFINE_IID!(IID_IAnimationDescriptionFactory, 3336731326, 49659, 18613, 146, 113, 236, 199, 10, 200, 110, 240); @@ -2961,11 +2961,11 @@ RT_INTERFACE!{static interface IAnimationDescriptionFactory(IAnimationDescriptio fn CreateInstance(&self, effect: AnimationEffect, target: AnimationEffectTarget, out: *mut *mut AnimationDescription) -> HRESULT }} impl IAnimationDescriptionFactory { - #[inline] pub unsafe fn create_instance(&self, effect: AnimationEffect, target: AnimationEffectTarget) -> Result> { + #[inline] pub fn create_instance(&self, effect: AnimationEffect, target: AnimationEffectTarget) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self as *const _ as *mut _, effect, target, &mut out); if hr == S_OK { Ok(ComPtr::wrap(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, @@ -2975,56 +2975,56 @@ RT_ENUM! { enum AnimationEffectTarget: i32 { }} 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(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_InitialOpacity(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn get_FinalOpacity(&self, out: *mut f32) -> HRESULT }} impl IOpacityAnimation { - #[inline] pub unsafe fn get_initial_opacity(&self) -> Result>> { + #[inline] pub fn get_initial_opacity(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InitialOpacity)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_final_opacity(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_final_opacity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FinalOpacity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class OpacityAnimation: IOpacityAnimation} 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(&self, out: *mut PropertyAnimationType) -> HRESULT, - fn get_Delay(&self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn get_Duration(&self, out: *mut ::rt::gen::windows::foundation::TimeSpan) -> HRESULT, - fn get_Control1(&self, out: *mut ::rt::gen::windows::foundation::Point) -> HRESULT, - fn get_Control2(&self, out: *mut ::rt::gen::windows::foundation::Point) -> HRESULT + fn get_Delay(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_Duration(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn get_Control1(&self, out: *mut foundation::Point) -> HRESULT, + fn get_Control2(&self, out: *mut foundation::Point) -> HRESULT }} impl IPropertyAnimation { - #[inline] pub unsafe fn get_type(&self) -> Result { + #[inline] pub fn get_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Type)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_delay(&self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + }} + #[inline] pub fn get_delay(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Delay)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_duration(&self) -> Result<::rt::gen::windows::foundation::TimeSpan> { + }} + #[inline] pub fn get_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Duration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_control1(&self) -> Result<::rt::gen::windows::foundation::Point> { + }} + #[inline] pub fn get_control1(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Control1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_control2(&self) -> Result<::rt::gen::windows::foundation::Point> { + }} + #[inline] pub fn get_control2(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Control2)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PropertyAnimation: IPropertyAnimation} RT_ENUM! { enum PropertyAnimationType: i32 { @@ -3032,38 +3032,38 @@ RT_ENUM! { enum PropertyAnimationType: i32 { }} 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(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn get_InitialScaleY(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_InitialScaleX(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_InitialScaleY(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn get_FinalScaleX(&self, out: *mut f32) -> HRESULT, fn get_FinalScaleY(&self, out: *mut f32) -> HRESULT, - fn get_NormalizedOrigin(&self, out: *mut ::rt::gen::windows::foundation::Point) -> HRESULT + fn get_NormalizedOrigin(&self, out: *mut foundation::Point) -> HRESULT }} impl IScaleAnimation { - #[inline] pub unsafe fn get_initial_scale_x(&self) -> Result>> { + #[inline] pub fn get_initial_scale_x(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InitialScaleX)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_initial_scale_y(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_initial_scale_y(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InitialScaleY)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_final_scale_x(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_final_scale_x(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FinalScaleX)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_final_scale_y(&self) -> Result { + }} + #[inline] pub fn get_final_scale_y(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FinalScaleY)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_normalized_origin(&self) -> Result<::rt::gen::windows::foundation::Point> { + }} + #[inline] pub fn get_normalized_origin(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NormalizedOrigin)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ScaleAnimation: IScaleAnimation} RT_CLASS!{class TranslationAnimation: IPropertyAnimation} @@ -3078,25 +3078,25 @@ DEFINE_IID!(IID_ICrossSlidingEventArgs, 3912714040, 28552, 16857, 135, 32, 120, RT_INTERFACE!{interface ICrossSlidingEventArgs(ICrossSlidingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICrossSlidingEventArgs] { #[cfg(not(feature="windows-devices"))] fn __Dummy0(&self) -> (), #[cfg(feature="windows-devices")] fn get_PointerDeviceType(&self, out: *mut super::super::devices::input::PointerDeviceType) -> HRESULT, - fn get_Position(&self, out: *mut super::super::foundation::Point) -> HRESULT, + fn get_Position(&self, out: *mut foundation::Point) -> HRESULT, fn get_CrossSlidingState(&self, out: *mut CrossSlidingState) -> HRESULT }} impl ICrossSlidingEventArgs { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_pointer_device_type(&self) -> Result { + #[cfg(feature="windows-devices")] #[inline] pub fn get_pointer_device_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PointerDeviceType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_position(&self) -> Result { + }} + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_cross_sliding_state(&self) -> Result { + }} + #[inline] pub fn get_cross_sliding_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CrossSlidingState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class CrossSlidingEventArgs: ICrossSlidingEventArgs} RT_ENUM! { enum CrossSlidingState: i32 { @@ -3106,25 +3106,25 @@ DEFINE_IID!(IID_IDraggingEventArgs, 479220612, 2108, 19411, 181, 89, 23, 156, 22 RT_INTERFACE!{interface IDraggingEventArgs(IDraggingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IDraggingEventArgs] { #[cfg(not(feature="windows-devices"))] fn __Dummy0(&self) -> (), #[cfg(feature="windows-devices")] fn get_PointerDeviceType(&self, out: *mut super::super::devices::input::PointerDeviceType) -> HRESULT, - fn get_Position(&self, out: *mut super::super::foundation::Point) -> HRESULT, + fn get_Position(&self, out: *mut foundation::Point) -> HRESULT, fn get_DraggingState(&self, out: *mut DraggingState) -> HRESULT }} impl IDraggingEventArgs { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_pointer_device_type(&self) -> Result { + #[cfg(feature="windows-devices")] #[inline] pub fn get_pointer_device_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PointerDeviceType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_position(&self) -> Result { + }} + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_dragging_state(&self) -> Result { + }} + #[inline] pub fn get_dragging_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DraggingState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class DraggingEventArgs: IDraggingEventArgs} RT_ENUM! { enum DraggingState: i32 { @@ -3132,48 +3132,48 @@ RT_ENUM! { enum DraggingState: i32 { }} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Starting(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Completed(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Completed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Canceled(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Canceled(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_Starting(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Starting(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Completed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Completed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Canceled(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Canceled(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IEdgeGesture { - #[inline] pub unsafe fn add_starting(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_starting(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Starting)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_starting(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_starting(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Starting)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_completed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Completed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_completed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Completed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_canceled(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_canceled(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Canceled)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_canceled(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_canceled(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Canceled)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class EdgeGesture: IEdgeGesture} impl RtActivatable for EdgeGesture {} impl EdgeGesture { - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} + } } DEFINE_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]) [CLSID_EdgeGesture]); DEFINE_IID!(IID_IEdgeGestureEventArgs, 1157253668, 11529, 17121, 139, 94, 54, 130, 8, 121, 106, 76); @@ -3181,11 +3181,11 @@ RT_INTERFACE!{interface IEdgeGestureEventArgs(IEdgeGestureEventArgsVtbl): IInspe fn get_Kind(&self, out: *mut EdgeGestureKind) -> HRESULT }} impl IEdgeGestureEventArgs { - #[inline] pub unsafe fn get_kind(&self) -> Result { + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class EdgeGestureEventArgs: IEdgeGestureEventArgs} RT_ENUM! { enum EdgeGestureKind: i32 { @@ -3196,11 +3196,11 @@ RT_INTERFACE!{static interface IEdgeGestureStatics(IEdgeGestureStaticsVtbl): IIn fn GetForCurrentView(&self, out: *mut *mut EdgeGesture) -> HRESULT }} impl IEdgeGestureStatics { - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } 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] { @@ -3210,8 +3210,8 @@ RT_INTERFACE!{interface IGestureRecognizer(IGestureRecognizerVtbl): IInspectable fn get_IsActive(&self, out: *mut bool) -> HRESULT, fn get_ShowGestureFeedback(&self, out: *mut bool) -> HRESULT, fn put_ShowGestureFeedback(&self, value: bool) -> HRESULT, - fn get_PivotCenter(&self, out: *mut super::super::foundation::Point) -> HRESULT, - fn put_PivotCenter(&self, value: super::super::foundation::Point) -> HRESULT, + fn get_PivotCenter(&self, out: *mut foundation::Point) -> HRESULT, + fn put_PivotCenter(&self, value: foundation::Point) -> HRESULT, fn get_PivotRadius(&self, out: *mut f32) -> HRESULT, fn put_PivotRadius(&self, value: f32) -> HRESULT, fn get_InertiaTranslationDeceleration(&self, out: *mut f32) -> HRESULT, @@ -3239,291 +3239,291 @@ RT_INTERFACE!{interface IGestureRecognizer(IGestureRecognizerVtbl): IInspectable fn get_MouseWheelParameters(&self, out: *mut *mut MouseWheelParameters) -> HRESULT, fn CanBeDoubleTap(&self, value: *mut PointerPoint, out: *mut bool) -> HRESULT, fn ProcessDownEvent(&self, value: *mut PointerPoint) -> HRESULT, - fn ProcessMoveEvents(&self, value: *mut super::super::foundation::collections::IVector) -> HRESULT, + fn ProcessMoveEvents(&self, value: *mut foundation::collections::IVector) -> HRESULT, fn ProcessUpEvent(&self, value: *mut PointerPoint) -> HRESULT, fn ProcessMouseWheelEvent(&self, value: *mut PointerPoint, isShiftKeyDown: bool, isControlKeyDown: bool) -> HRESULT, fn ProcessInertia(&self) -> HRESULT, fn CompleteGesture(&self) -> HRESULT, - fn add_Tapped(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Tapped(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_RightTapped(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RightTapped(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Holding(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Holding(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Dragging(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Dragging(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ManipulationStarted(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ManipulationStarted(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ManipulationUpdated(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ManipulationUpdated(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ManipulationInertiaStarting(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ManipulationInertiaStarting(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ManipulationCompleted(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ManipulationCompleted(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_CrossSliding(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CrossSliding(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_Tapped(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Tapped(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_RightTapped(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RightTapped(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_Holding(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Holding(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_Dragging(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Dragging(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_ManipulationStarted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ManipulationStarted(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_ManipulationUpdated(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ManipulationUpdated(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_ManipulationInertiaStarting(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ManipulationInertiaStarting(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_ManipulationCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ManipulationCompleted(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_CrossSliding(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CrossSliding(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl IGestureRecognizer { - #[inline] pub unsafe fn get_gesture_settings(&self) -> Result { + #[inline] pub fn get_gesture_settings(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_GestureSettings)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_gesture_settings(&self, value: GestureSettings) -> Result<()> { + }} + #[inline] pub fn set_gesture_settings(&self, value: GestureSettings) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_GestureSettings)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_inertial(&self) -> Result { + }} + #[inline] pub fn get_is_inertial(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsInertial)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_active(&self) -> Result { + }} + #[inline] pub fn get_is_active(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsActive)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_show_gesture_feedback(&self) -> Result { + }} + #[inline] pub fn get_show_gesture_feedback(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ShowGestureFeedback)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_show_gesture_feedback(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_show_gesture_feedback(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ShowGestureFeedback)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_pivot_center(&self) -> Result { + }} + #[inline] pub fn get_pivot_center(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PivotCenter)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_pivot_center(&self, value: super::super::foundation::Point) -> Result<()> { + }} + #[inline] pub fn set_pivot_center(&self, value: foundation::Point) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PivotCenter)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_pivot_radius(&self) -> Result { + }} + #[inline] pub fn get_pivot_radius(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PivotRadius)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_pivot_radius(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_pivot_radius(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PivotRadius)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_inertia_translation_deceleration(&self) -> Result { + }} + #[inline] pub fn get_inertia_translation_deceleration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InertiaTranslationDeceleration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_inertia_translation_deceleration(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_inertia_translation_deceleration(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InertiaTranslationDeceleration)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_inertia_rotation_deceleration(&self) -> Result { + }} + #[inline] pub fn get_inertia_rotation_deceleration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InertiaRotationDeceleration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_inertia_rotation_deceleration(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_inertia_rotation_deceleration(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InertiaRotationDeceleration)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_inertia_expansion_deceleration(&self) -> Result { + }} + #[inline] pub fn get_inertia_expansion_deceleration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InertiaExpansionDeceleration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_inertia_expansion_deceleration(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_inertia_expansion_deceleration(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InertiaExpansionDeceleration)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_inertia_translation_displacement(&self) -> Result { + }} + #[inline] pub fn get_inertia_translation_displacement(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InertiaTranslationDisplacement)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_inertia_translation_displacement(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_inertia_translation_displacement(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InertiaTranslationDisplacement)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_inertia_rotation_angle(&self) -> Result { + }} + #[inline] pub fn get_inertia_rotation_angle(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InertiaRotationAngle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_inertia_rotation_angle(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_inertia_rotation_angle(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InertiaRotationAngle)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_inertia_expansion(&self) -> Result { + }} + #[inline] pub fn get_inertia_expansion(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InertiaExpansion)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_inertia_expansion(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_inertia_expansion(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InertiaExpansion)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_manipulation_exact(&self) -> Result { + }} + #[inline] pub fn get_manipulation_exact(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ManipulationExact)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_manipulation_exact(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_manipulation_exact(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ManipulationExact)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_cross_slide_thresholds(&self) -> Result { + }} + #[inline] pub fn get_cross_slide_thresholds(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CrossSlideThresholds)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_cross_slide_thresholds(&self, value: CrossSlideThresholds) -> Result<()> { + }} + #[inline] pub fn set_cross_slide_thresholds(&self, value: CrossSlideThresholds) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CrossSlideThresholds)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_cross_slide_horizontally(&self) -> Result { + }} + #[inline] pub fn get_cross_slide_horizontally(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CrossSlideHorizontally)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_cross_slide_horizontally(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_cross_slide_horizontally(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CrossSlideHorizontally)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_cross_slide_exact(&self) -> Result { + }} + #[inline] pub fn get_cross_slide_exact(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CrossSlideExact)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_cross_slide_exact(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_cross_slide_exact(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CrossSlideExact)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_auto_process_inertia(&self) -> Result { + }} + #[inline] pub fn get_auto_process_inertia(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AutoProcessInertia)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_auto_process_inertia(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_auto_process_inertia(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AutoProcessInertia)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_mouse_wheel_parameters(&self) -> Result> { + }} + #[inline] pub fn get_mouse_wheel_parameters(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MouseWheelParameters)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn can_be_double_tap(&self, value: &PointerPoint) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn can_be_double_tap(&self, value: &PointerPoint) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).CanBeDoubleTap)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn process_down_event(&self, value: &PointerPoint) -> Result<()> { + }} + #[inline] pub fn process_down_event(&self, value: &PointerPoint) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ProcessDownEvent)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn process_move_events(&self, value: &super::super::foundation::collections::IVector) -> Result<()> { + }} + #[inline] pub fn process_move_events(&self, value: &foundation::collections::IVector) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ProcessMoveEvents)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn process_up_event(&self, value: &PointerPoint) -> Result<()> { + }} + #[inline] pub fn process_up_event(&self, value: &PointerPoint) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ProcessUpEvent)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn process_mouse_wheel_event(&self, value: &PointerPoint, isShiftKeyDown: bool, isControlKeyDown: bool) -> Result<()> { + }} + #[inline] pub fn process_mouse_wheel_event(&self, value: &PointerPoint, isShiftKeyDown: bool, isControlKeyDown: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ProcessMouseWheelEvent)(self as *const _ as *mut _, value as *const _ as *mut _, isShiftKeyDown, isControlKeyDown); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn process_inertia(&self) -> Result<()> { + }} + #[inline] pub fn process_inertia(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ProcessInertia)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn complete_gesture(&self) -> Result<()> { + }} + #[inline] pub fn complete_gesture(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).CompleteGesture)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_tapped(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_tapped(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Tapped)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_tapped(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_tapped(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Tapped)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_right_tapped(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_right_tapped(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RightTapped)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_right_tapped(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_right_tapped(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RightTapped)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_holding(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_holding(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Holding)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_holding(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_holding(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Holding)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_dragging(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_dragging(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Dragging)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_dragging(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_dragging(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Dragging)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_manipulation_started(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_manipulation_started(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ManipulationStarted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_manipulation_started(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_manipulation_started(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ManipulationStarted)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_manipulation_updated(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_manipulation_updated(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ManipulationUpdated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_manipulation_updated(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_manipulation_updated(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ManipulationUpdated)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_manipulation_inertia_starting(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_manipulation_inertia_starting(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ManipulationInertiaStarting)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_manipulation_inertia_starting(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_manipulation_inertia_starting(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ManipulationInertiaStarting)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_manipulation_completed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_manipulation_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ManipulationCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_manipulation_completed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_manipulation_completed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ManipulationCompleted)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_cross_sliding(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_cross_sliding(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CrossSliding)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_cross_sliding(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_cross_sliding(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CrossSliding)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class GestureRecognizer: IGestureRecognizer} impl RtActivatable for GestureRecognizer {} @@ -3535,25 +3535,25 @@ DEFINE_IID!(IID_IHoldingEventArgs, 737629637, 59289, 16820, 187, 64, 36, 47, 64, RT_INTERFACE!{interface IHoldingEventArgs(IHoldingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IHoldingEventArgs] { #[cfg(not(feature="windows-devices"))] fn __Dummy0(&self) -> (), #[cfg(feature="windows-devices")] fn get_PointerDeviceType(&self, out: *mut super::super::devices::input::PointerDeviceType) -> HRESULT, - fn get_Position(&self, out: *mut super::super::foundation::Point) -> HRESULT, + fn get_Position(&self, out: *mut foundation::Point) -> HRESULT, fn get_HoldingState(&self, out: *mut HoldingState) -> HRESULT }} impl IHoldingEventArgs { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_pointer_device_type(&self) -> Result { + #[cfg(feature="windows-devices")] #[inline] pub fn get_pointer_device_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PointerDeviceType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_position(&self) -> Result { + }} + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_holding_state(&self) -> Result { + }} + #[inline] pub fn get_holding_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HoldingState)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class HoldingEventArgs: IHoldingEventArgs} RT_ENUM! { enum HoldingState: i32 { @@ -3563,46 +3563,46 @@ DEFINE_IID!(IID_IKeyboardDeliveryInterceptor, 3032150120, 36681, 17516, 141, 181 RT_INTERFACE!{interface IKeyboardDeliveryInterceptor(IKeyboardDeliveryInterceptorVtbl): IInspectable(IInspectableVtbl) [IID_IKeyboardDeliveryInterceptor] { fn get_IsInterceptionEnabledWhenInForeground(&self, out: *mut bool) -> HRESULT, fn put_IsInterceptionEnabledWhenInForeground(&self, value: bool) -> HRESULT, - fn add_KeyDown(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_KeyDown(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_KeyUp(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_KeyUp(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_KeyDown(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_KeyDown(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_KeyUp(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_KeyUp(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IKeyboardDeliveryInterceptor { - #[inline] pub unsafe fn get_is_interception_enabled_when_in_foreground(&self) -> Result { + #[inline] pub fn get_is_interception_enabled_when_in_foreground(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsInterceptionEnabledWhenInForeground)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_interception_enabled_when_in_foreground(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_interception_enabled_when_in_foreground(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsInterceptionEnabledWhenInForeground)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_key_down(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_key_down(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_KeyDown)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_key_down(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_key_down(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_KeyDown)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_key_up(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_key_up(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_KeyUp)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_key_up(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_key_up(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_KeyUp)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class KeyboardDeliveryInterceptor: IKeyboardDeliveryInterceptor} impl RtActivatable for KeyboardDeliveryInterceptor {} impl KeyboardDeliveryInterceptor { - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} + } } DEFINE_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]) [CLSID_KeyboardDeliveryInterceptor]); DEFINE_IID!(IID_IKeyboardDeliveryInterceptorStatics, 4193663906, 52922, 18261, 138, 126, 20, 192, 255, 236, 210, 57); @@ -3610,204 +3610,204 @@ RT_INTERFACE!{static interface IKeyboardDeliveryInterceptorStatics(IKeyboardDeli fn GetForCurrentView(&self, out: *mut *mut KeyboardDeliveryInterceptor) -> HRESULT }} impl IKeyboardDeliveryInterceptorStatics { - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self) -> (), #[cfg(feature="windows-devices")] fn get_PointerDeviceType(&self, out: *mut super::super::devices::input::PointerDeviceType) -> HRESULT, - fn get_Position(&self, out: *mut super::super::foundation::Point) -> HRESULT, + fn get_Position(&self, out: *mut foundation::Point) -> HRESULT, fn get_Cumulative(&self, out: *mut ManipulationDelta) -> HRESULT, fn get_Velocities(&self, out: *mut ManipulationVelocities) -> HRESULT }} impl IManipulationCompletedEventArgs { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_pointer_device_type(&self) -> Result { + #[cfg(feature="windows-devices")] #[inline] pub fn get_pointer_device_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PointerDeviceType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_position(&self) -> Result { + }} + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_cumulative(&self) -> Result { + }} + #[inline] pub fn get_cumulative(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Cumulative)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_velocities(&self) -> Result { + }} + #[inline] pub fn get_velocities(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Velocities)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ManipulationCompletedEventArgs: IManipulationCompletedEventArgs} RT_STRUCT! { struct ManipulationDelta { - Translation: super::super::foundation::Point, Scale: f32, Rotation: f32, Expansion: f32, + Translation: foundation::Point, Scale: f32, Rotation: f32, Expansion: f32, }} 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(&self) -> (), #[cfg(feature="windows-devices")] fn get_PointerDeviceType(&self, out: *mut super::super::devices::input::PointerDeviceType) -> HRESULT, - fn get_Position(&self, out: *mut super::super::foundation::Point) -> HRESULT, + fn get_Position(&self, out: *mut foundation::Point) -> HRESULT, fn get_Delta(&self, out: *mut ManipulationDelta) -> HRESULT, fn get_Cumulative(&self, out: *mut ManipulationDelta) -> HRESULT, fn get_Velocities(&self, out: *mut ManipulationVelocities) -> HRESULT }} impl IManipulationInertiaStartingEventArgs { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_pointer_device_type(&self) -> Result { + #[cfg(feature="windows-devices")] #[inline] pub fn get_pointer_device_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PointerDeviceType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_position(&self) -> Result { + }} + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_delta(&self) -> Result { + }} + #[inline] pub fn get_delta(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Delta)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_cumulative(&self) -> Result { + }} + #[inline] pub fn get_cumulative(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Cumulative)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_velocities(&self) -> Result { + }} + #[inline] pub fn get_velocities(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Velocities)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ManipulationInertiaStartingEventArgs: IManipulationInertiaStartingEventArgs} 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(&self) -> (), #[cfg(feature="windows-devices")] fn get_PointerDeviceType(&self, out: *mut super::super::devices::input::PointerDeviceType) -> HRESULT, - fn get_Position(&self, out: *mut super::super::foundation::Point) -> HRESULT, + fn get_Position(&self, out: *mut foundation::Point) -> HRESULT, fn get_Cumulative(&self, out: *mut ManipulationDelta) -> HRESULT }} impl IManipulationStartedEventArgs { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_pointer_device_type(&self) -> Result { + #[cfg(feature="windows-devices")] #[inline] pub fn get_pointer_device_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PointerDeviceType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_position(&self) -> Result { + }} + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_cumulative(&self) -> Result { + }} + #[inline] pub fn get_cumulative(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Cumulative)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ManipulationStartedEventArgs: IManipulationStartedEventArgs} 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(&self) -> (), #[cfg(feature="windows-devices")] fn get_PointerDeviceType(&self, out: *mut super::super::devices::input::PointerDeviceType) -> HRESULT, - fn get_Position(&self, out: *mut super::super::foundation::Point) -> HRESULT, + fn get_Position(&self, out: *mut foundation::Point) -> HRESULT, fn get_Delta(&self, out: *mut ManipulationDelta) -> HRESULT, fn get_Cumulative(&self, out: *mut ManipulationDelta) -> HRESULT, fn get_Velocities(&self, out: *mut ManipulationVelocities) -> HRESULT }} impl IManipulationUpdatedEventArgs { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_pointer_device_type(&self) -> Result { + #[cfg(feature="windows-devices")] #[inline] pub fn get_pointer_device_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PointerDeviceType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_position(&self) -> Result { + }} + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_delta(&self) -> Result { + }} + #[inline] pub fn get_delta(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Delta)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_cumulative(&self) -> Result { + }} + #[inline] pub fn get_cumulative(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Cumulative)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_velocities(&self) -> Result { + }} + #[inline] pub fn get_velocities(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Velocities)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ManipulationUpdatedEventArgs: IManipulationUpdatedEventArgs} RT_STRUCT! { struct ManipulationVelocities { - Linear: super::super::foundation::Point, Angular: f32, Expansion: f32, + Linear: foundation::Point, Angular: f32, Expansion: f32, }} 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(&self, out: *mut super::super::foundation::Point) -> HRESULT, - fn put_CharTranslation(&self, value: super::super::foundation::Point) -> HRESULT, + fn get_CharTranslation(&self, out: *mut foundation::Point) -> HRESULT, + fn put_CharTranslation(&self, value: foundation::Point) -> HRESULT, fn get_DeltaScale(&self, out: *mut f32) -> HRESULT, fn put_DeltaScale(&self, value: f32) -> HRESULT, fn get_DeltaRotationAngle(&self, out: *mut f32) -> HRESULT, fn put_DeltaRotationAngle(&self, value: f32) -> HRESULT, - fn get_PageTranslation(&self, out: *mut super::super::foundation::Point) -> HRESULT, - fn put_PageTranslation(&self, value: super::super::foundation::Point) -> HRESULT + fn get_PageTranslation(&self, out: *mut foundation::Point) -> HRESULT, + fn put_PageTranslation(&self, value: foundation::Point) -> HRESULT }} impl IMouseWheelParameters { - #[inline] pub unsafe fn get_char_translation(&self) -> Result { + #[inline] pub fn get_char_translation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CharTranslation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_char_translation(&self, value: super::super::foundation::Point) -> Result<()> { + }} + #[inline] pub fn set_char_translation(&self, value: foundation::Point) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CharTranslation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_delta_scale(&self) -> Result { + }} + #[inline] pub fn get_delta_scale(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DeltaScale)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_delta_scale(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_delta_scale(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DeltaScale)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_delta_rotation_angle(&self) -> Result { + }} + #[inline] pub fn get_delta_rotation_angle(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DeltaRotationAngle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_delta_rotation_angle(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_delta_rotation_angle(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DeltaRotationAngle)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_page_translation(&self) -> Result { + }} + #[inline] pub fn get_page_translation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PageTranslation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_page_translation(&self, value: super::super::foundation::Point) -> Result<()> { + }} + #[inline] pub fn set_page_translation(&self, value: foundation::Point) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PageTranslation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MouseWheelParameters: IMouseWheelParameters} 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(&self) -> (), #[cfg(feature="windows-devices")] fn get_PointerDevice(&self, out: *mut *mut super::super::devices::input::PointerDevice) -> HRESULT, - fn get_Position(&self, out: *mut super::super::foundation::Point) -> HRESULT, - fn get_RawPosition(&self, out: *mut super::super::foundation::Point) -> HRESULT, + fn get_Position(&self, out: *mut foundation::Point) -> HRESULT, + fn get_RawPosition(&self, out: *mut foundation::Point) -> HRESULT, fn get_PointerId(&self, out: *mut u32) -> HRESULT, fn get_FrameId(&self, out: *mut u32) -> HRESULT, fn get_Timestamp(&self, out: *mut u64) -> HRESULT, @@ -3815,62 +3815,62 @@ RT_INTERFACE!{interface IPointerPoint(IPointerPointVtbl): IInspectable(IInspecta fn get_Properties(&self, out: *mut *mut PointerPointProperties) -> HRESULT }} impl IPointerPoint { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_pointer_device(&self) -> Result> { + #[cfg(feature="windows-devices")] #[inline] pub fn get_pointer_device(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PointerDevice)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_position(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_raw_position(&self) -> Result { + }} + #[inline] pub fn get_raw_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RawPosition)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pointer_id(&self) -> Result { + }} + #[inline] pub fn get_pointer_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PointerId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_frame_id(&self) -> Result { + }} + #[inline] pub fn get_frame_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FrameId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + }} + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_in_contact(&self) -> Result { + }} + #[inline] pub fn get_is_in_contact(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsInContact)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result> { + }} + #[inline] pub fn get_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PointerPoint: IPointerPoint} impl RtActivatable for PointerPoint {} impl PointerPoint { - #[inline] pub fn get_current_point(pointerId: u32) -> Result> { unsafe { + #[inline] pub fn get_current_point(pointerId: u32) -> Result>> { >::get_activation_factory().get_current_point(pointerId) - }} - #[inline] pub fn get_intermediate_points(pointerId: u32) -> Result>> { unsafe { + } + #[inline] pub fn get_intermediate_points(pointerId: u32) -> Result>>> { >::get_activation_factory().get_intermediate_points(pointerId) - }} - #[inline] pub fn get_current_point_transformed(pointerId: u32, transform: &IPointerPointTransform) -> Result> { unsafe { + } + #[inline] pub fn get_current_point_transformed(pointerId: u32, transform: &IPointerPointTransform) -> Result>> { >::get_activation_factory().get_current_point_transformed(pointerId, transform) - }} - #[inline] pub fn get_intermediate_points_transformed(pointerId: u32, transform: &IPointerPointTransform) -> Result>> { unsafe { + } + #[inline] pub fn get_intermediate_points_transformed(pointerId: u32, transform: &IPointerPointTransform) -> Result>>> { >::get_activation_factory().get_intermediate_points_transformed(pointerId, transform) - }} + } } DEFINE_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]) [CLSID_PointerPoint]); DEFINE_IID!(IID_IPointerPointProperties, 3348990539, 49507, 20199, 128, 63, 103, 206, 121, 249, 151, 45); @@ -3882,8 +3882,8 @@ RT_INTERFACE!{interface IPointerPointProperties(IPointerPointPropertiesVtbl): II fn get_XTilt(&self, out: *mut f32) -> HRESULT, fn get_YTilt(&self, out: *mut f32) -> HRESULT, fn get_Twist(&self, out: *mut f32) -> HRESULT, - fn get_ContactRect(&self, out: *mut super::super::foundation::Rect) -> HRESULT, - fn get_ContactRectRaw(&self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn get_ContactRect(&self, out: *mut foundation::Rect) -> HRESULT, + fn get_ContactRectRaw(&self, out: *mut foundation::Rect) -> HRESULT, fn get_TouchConfidence(&self, out: *mut bool) -> HRESULT, fn get_IsLeftButtonPressed(&self, out: *mut bool) -> HRESULT, fn get_IsRightButtonPressed(&self, out: *mut bool) -> HRESULT, @@ -3901,190 +3901,190 @@ RT_INTERFACE!{interface IPointerPointProperties(IPointerPointPropertiesVtbl): II fn GetUsageValue(&self, usagePage: u32, usageId: u32, out: *mut i32) -> HRESULT }} impl IPointerPointProperties { - #[inline] pub unsafe fn get_pressure(&self) -> Result { + #[inline] pub fn get_pressure(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Pressure)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_inverted(&self) -> Result { + }} + #[inline] pub fn get_is_inverted(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsInverted)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_eraser(&self) -> Result { + }} + #[inline] pub fn get_is_eraser(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsEraser)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_orientation(&self) -> Result { + }} + #[inline] pub fn get_orientation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Orientation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_xtilt(&self) -> Result { + }} + #[inline] pub fn get_xtilt(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_XTilt)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_ytilt(&self) -> Result { + }} + #[inline] pub fn get_ytilt(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_YTilt)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_twist(&self) -> Result { + }} + #[inline] pub fn get_twist(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Twist)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_contact_rect(&self) -> Result { + }} + #[inline] pub fn get_contact_rect(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ContactRect)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_contact_rect_raw(&self) -> Result { + }} + #[inline] pub fn get_contact_rect_raw(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ContactRectRaw)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_touch_confidence(&self) -> Result { + }} + #[inline] pub fn get_touch_confidence(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TouchConfidence)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_left_button_pressed(&self) -> Result { + }} + #[inline] pub fn get_is_left_button_pressed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsLeftButtonPressed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_right_button_pressed(&self) -> Result { + }} + #[inline] pub fn get_is_right_button_pressed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsRightButtonPressed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_middle_button_pressed(&self) -> Result { + }} + #[inline] pub fn get_is_middle_button_pressed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsMiddleButtonPressed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_mouse_wheel_delta(&self) -> Result { + }} + #[inline] pub fn get_mouse_wheel_delta(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MouseWheelDelta)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_horizontal_mouse_wheel(&self) -> Result { + }} + #[inline] pub fn get_is_horizontal_mouse_wheel(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsHorizontalMouseWheel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_primary(&self) -> Result { + }} + #[inline] pub fn get_is_primary(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPrimary)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_in_range(&self) -> Result { + }} + #[inline] pub fn get_is_in_range(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsInRange)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_canceled(&self) -> Result { + }} + #[inline] pub fn get_is_canceled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCanceled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_barrel_button_pressed(&self) -> Result { + }} + #[inline] pub fn get_is_barrel_button_pressed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsBarrelButtonPressed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_xbutton1_pressed(&self) -> Result { + }} + #[inline] pub fn get_is_xbutton1_pressed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsXButton1Pressed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_xbutton2_pressed(&self) -> Result { + }} + #[inline] pub fn get_is_xbutton2_pressed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsXButton2Pressed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pointer_update_kind(&self) -> Result { + }} + #[inline] pub fn get_pointer_update_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PointerUpdateKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn has_usage(&self, usagePage: u32, usageId: u32) -> Result { + }} + #[inline] pub fn has_usage(&self, usagePage: u32, usageId: u32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).HasUsage)(self as *const _ as *mut _, usagePage, usageId, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_usage_value(&self, usagePage: u32, usageId: u32) -> Result { + }} + #[inline] pub fn get_usage_value(&self, usagePage: u32, usageId: u32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetUsageValue)(self as *const _ as *mut _, usagePage, usageId, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PointerPointProperties: IPointerPointProperties} 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(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn get_ZDistance(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IPointerPointProperties2 { - #[inline] pub unsafe fn get_zdistance(&self) -> Result>> { + #[inline] pub fn get_zdistance(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ZDistance)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, pointerId: u32, out: *mut *mut PointerPoint) -> HRESULT, - fn GetIntermediatePoints(&self, pointerId: u32, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn GetIntermediatePoints(&self, pointerId: u32, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn GetCurrentPointTransformed(&self, pointerId: u32, transform: *mut IPointerPointTransform, out: *mut *mut PointerPoint) -> HRESULT, - fn GetIntermediatePointsTransformed(&self, pointerId: u32, transform: *mut IPointerPointTransform, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn GetIntermediatePointsTransformed(&self, pointerId: u32, transform: *mut IPointerPointTransform, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IPointerPointStatics { - #[inline] pub unsafe fn get_current_point(&self, pointerId: u32) -> Result> { + #[inline] pub fn get_current_point(&self, pointerId: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentPoint)(self as *const _ as *mut _, pointerId, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_intermediate_points(&self, pointerId: u32) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_intermediate_points(&self, pointerId: u32) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetIntermediatePoints)(self as *const _ as *mut _, pointerId, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_point_transformed(&self, pointerId: u32, transform: &IPointerPointTransform) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_current_point_transformed(&self, pointerId: u32, transform: &IPointerPointTransform) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCurrentPointTransformed)(self as *const _ as *mut _, 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(&self, pointerId: u32, transform: &IPointerPointTransform) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_intermediate_points_transformed(&self, pointerId: u32, transform: &IPointerPointTransform) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetIntermediatePointsTransformed)(self as *const _ as *mut _, pointerId, transform as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut *mut IPointerPointTransform) -> HRESULT, - fn TryTransform(&self, inPoint: super::super::foundation::Point, outPoint: *mut super::super::foundation::Point, out: *mut bool) -> HRESULT, - fn TransformBounds(&self, rect: super::super::foundation::Rect, out: *mut super::super::foundation::Rect) -> HRESULT + fn TryTransform(&self, inPoint: foundation::Point, outPoint: *mut foundation::Point, out: *mut bool) -> HRESULT, + fn TransformBounds(&self, rect: foundation::Rect, out: *mut foundation::Rect) -> HRESULT }} impl IPointerPointTransform { - #[inline] pub unsafe fn get_inverse(&self) -> Result> { + #[inline] pub fn get_inverse(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Inverse)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_transform(&self, inPoint: super::super::foundation::Point) -> Result<(super::super::foundation::Point, bool)> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn try_transform(&self, inPoint: foundation::Point) -> Result<(foundation::Point, bool)> { unsafe { let mut outPoint = zeroed(); let mut out = zeroed(); let hr = ((*self.lpVtbl).TryTransform)(self as *const _ as *mut _, inPoint, &mut outPoint, &mut out); if hr == S_OK { Ok((outPoint, out)) } else { err(hr) } - } - #[inline] pub unsafe fn transform_bounds(&self, rect: super::super::foundation::Rect) -> Result { + }} + #[inline] pub fn transform_bounds(&self, rect: foundation::Rect) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TransformBounds)(self as *const _ as *mut _, rect, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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, @@ -4097,31 +4097,31 @@ RT_INTERFACE!{interface IPointerVisualizationSettings(IPointerVisualizationSetti fn get_IsBarrelButtonFeedbackEnabled(&self, out: *mut bool) -> HRESULT }} impl IPointerVisualizationSettings { - #[inline] pub unsafe fn set_is_contact_feedback_enabled(&self, value: bool) -> Result<()> { + #[inline] pub fn set_is_contact_feedback_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsContactFeedbackEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_contact_feedback_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_contact_feedback_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsContactFeedbackEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_barrel_button_feedback_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_barrel_button_feedback_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsBarrelButtonFeedbackEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_barrel_button_feedback_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_barrel_button_feedback_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsBarrelButtonFeedbackEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class PointerVisualizationSettings: IPointerVisualizationSettings} impl RtActivatable for PointerVisualizationSettings {} impl PointerVisualizationSettings { - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} + } } DEFINE_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]) [CLSID_PointerVisualizationSettings]); DEFINE_IID!(IID_IPointerVisualizationSettingsStatics, 1753681627, 5723, 16916, 180, 243, 88, 78, 202, 140, 138, 105); @@ -4129,11 +4129,11 @@ RT_INTERFACE!{static interface IPointerVisualizationSettingsStatics(IPointerVisu fn GetForCurrentView(&self, out: *mut *mut PointerVisualizationSettings) -> HRESULT }} impl IPointerVisualizationSettingsStatics { - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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] { @@ -4142,168 +4142,168 @@ RT_INTERFACE!{interface IRadialController(IRadialControllerVtbl): IInspectable(I fn put_RotationResolutionInDegrees(&self, value: f64) -> HRESULT, fn get_UseAutomaticHapticFeedback(&self, out: *mut bool) -> HRESULT, fn put_UseAutomaticHapticFeedback(&self, value: bool) -> HRESULT, - fn add_ScreenContactStarted(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ScreenContactStarted(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ScreenContactEnded(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ScreenContactEnded(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ScreenContactContinued(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ScreenContactContinued(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ControlLost(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ControlLost(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_RotationChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RotationChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ButtonClicked(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ButtonClicked(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ControlAcquired(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ControlAcquired(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ScreenContactStarted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ScreenContactStarted(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_ScreenContactEnded(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ScreenContactEnded(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_ScreenContactContinued(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ScreenContactContinued(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_ControlLost(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ControlLost(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_RotationChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RotationChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ButtonClicked(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ButtonClicked(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ControlAcquired(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ControlAcquired(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl IRadialController { - #[inline] pub unsafe fn get_menu(&self) -> Result> { + #[inline] pub fn get_menu(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Menu)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rotation_resolution_in_degrees(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_rotation_resolution_in_degrees(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RotationResolutionInDegrees)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_rotation_resolution_in_degrees(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_rotation_resolution_in_degrees(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RotationResolutionInDegrees)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_use_automatic_haptic_feedback(&self) -> Result { + }} + #[inline] pub fn get_use_automatic_haptic_feedback(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UseAutomaticHapticFeedback)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_use_automatic_haptic_feedback(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_use_automatic_haptic_feedback(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_UseAutomaticHapticFeedback)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_screen_contact_started(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_screen_contact_started(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ScreenContactStarted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_screen_contact_started(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_screen_contact_started(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ScreenContactStarted)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_screen_contact_ended(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_screen_contact_ended(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ScreenContactEnded)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_screen_contact_ended(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_screen_contact_ended(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ScreenContactEnded)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_screen_contact_continued(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_screen_contact_continued(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ScreenContactContinued)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_screen_contact_continued(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_screen_contact_continued(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ScreenContactContinued)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_control_lost(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_control_lost(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ControlLost)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_control_lost(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_control_lost(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ControlLost)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_rotation_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_rotation_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RotationChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_rotation_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_rotation_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RotationChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_button_clicked(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_button_clicked(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ButtonClicked)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_button_clicked(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_button_clicked(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ButtonClicked)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_control_acquired(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_control_acquired(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ControlAcquired)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_control_acquired(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_control_acquired(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ControlAcquired)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class RadialController: IRadialController} impl RtActivatable for RadialController {} impl RadialController { - #[inline] pub fn is_supported() -> Result { unsafe { + #[inline] pub fn is_supported() -> Result { >::get_activation_factory().is_supported() - }} - #[inline] pub fn create_for_current_view() -> Result> { unsafe { + } + #[inline] pub fn create_for_current_view() -> Result>> { >::get_activation_factory().create_for_current_view() - }} + } } DEFINE_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]) [CLSID_RadialController]); DEFINE_IID!(IID_IRadialController2, 1029144319, 19694, 4582, 181, 53, 0, 27, 220, 6, 171, 59); RT_INTERFACE!{interface IRadialController2(IRadialController2Vtbl): IInspectable(IInspectableVtbl) [IID_IRadialController2] { - fn add_ButtonPressed(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ButtonPressed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ButtonHolding(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ButtonHolding(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ButtonReleased(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ButtonReleased(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ButtonPressed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ButtonPressed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ButtonHolding(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ButtonHolding(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ButtonReleased(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ButtonReleased(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IRadialController2 { - #[inline] pub unsafe fn add_button_pressed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_button_pressed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ButtonPressed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_button_pressed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_button_pressed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ButtonPressed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_button_holding(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_button_holding(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ButtonHolding)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_button_holding(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_button_holding(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ButtonHolding)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_button_released(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_button_released(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ButtonReleased)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_button_released(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_button_released(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ButtonReleased)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } 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(&self, out: *mut *mut RadialControllerScreenContact) -> HRESULT }} impl IRadialControllerButtonClickedEventArgs { - #[inline] pub unsafe fn get_contact(&self) -> Result> { + #[inline] pub fn get_contact(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Contact)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RadialControllerButtonClickedEventArgs: IRadialControllerButtonClickedEventArgs} DEFINE_IID!(IID_IRadialControllerButtonClickedEventArgs2, 1029144307, 15598, 4582, 181, 53, 0, 27, 220, 6, 171, 59); @@ -4311,11 +4311,11 @@ RT_INTERFACE!{interface IRadialControllerButtonClickedEventArgs2(IRadialControll #[cfg(feature="windows-devices")] fn get_SimpleHapticsController(&self, out: *mut *mut super::super::devices::haptics::SimpleHapticsController) -> HRESULT }} impl IRadialControllerButtonClickedEventArgs2 { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_simple_haptics_controller(&self) -> Result> { + #[cfg(feature="windows-devices")] #[inline] pub fn get_simple_haptics_controller(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SimpleHapticsController)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IRadialControllerButtonHoldingEventArgs, 1029144302, 15598, 4582, 181, 53, 0, 27, 220, 6, 171, 59); RT_INTERFACE!{interface IRadialControllerButtonHoldingEventArgs(IRadialControllerButtonHoldingEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IRadialControllerButtonHoldingEventArgs] { @@ -4323,16 +4323,16 @@ RT_INTERFACE!{interface IRadialControllerButtonHoldingEventArgs(IRadialControlle #[cfg(feature="windows-devices")] fn get_SimpleHapticsController(&self, out: *mut *mut super::super::devices::haptics::SimpleHapticsController) -> HRESULT }} impl IRadialControllerButtonHoldingEventArgs { - #[inline] pub unsafe fn get_contact(&self) -> Result> { + #[inline] pub fn get_contact(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Contact)(self 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_simple_haptics_controller(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_simple_haptics_controller(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SimpleHapticsController)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RadialControllerButtonHoldingEventArgs: IRadialControllerButtonHoldingEventArgs} DEFINE_IID!(IID_IRadialControllerButtonPressedEventArgs, 1029144301, 19694, 4582, 181, 53, 0, 27, 220, 6, 171, 59); @@ -4341,16 +4341,16 @@ RT_INTERFACE!{interface IRadialControllerButtonPressedEventArgs(IRadialControlle #[cfg(feature="windows-devices")] fn get_SimpleHapticsController(&self, out: *mut *mut super::super::devices::haptics::SimpleHapticsController) -> HRESULT }} impl IRadialControllerButtonPressedEventArgs { - #[inline] pub unsafe fn get_contact(&self) -> Result> { + #[inline] pub fn get_contact(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Contact)(self 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_simple_haptics_controller(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_simple_haptics_controller(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SimpleHapticsController)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RadialControllerButtonPressedEventArgs: IRadialControllerButtonPressedEventArgs} DEFINE_IID!(IID_IRadialControllerButtonReleasedEventArgs, 1029144303, 15598, 4582, 181, 53, 0, 27, 220, 6, 171, 59); @@ -4359,58 +4359,58 @@ RT_INTERFACE!{interface IRadialControllerButtonReleasedEventArgs(IRadialControll #[cfg(feature="windows-devices")] fn get_SimpleHapticsController(&self, out: *mut *mut super::super::devices::haptics::SimpleHapticsController) -> HRESULT }} impl IRadialControllerButtonReleasedEventArgs { - #[inline] pub unsafe fn get_contact(&self) -> Result> { + #[inline] pub fn get_contact(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Contact)(self 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_simple_haptics_controller(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_simple_haptics_controller(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SimpleHapticsController)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RadialControllerButtonReleasedEventArgs: IRadialControllerButtonReleasedEventArgs} 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(&self, buttons: *mut super::super::foundation::collections::IIterable) -> HRESULT, + fn SetDefaultMenuItems(&self, buttons: *mut foundation::collections::IIterable) -> HRESULT, fn ResetToDefaultMenuItems(&self) -> HRESULT, fn TrySelectDefaultMenuItem(&self, type_: RadialControllerSystemMenuItemKind, out: *mut bool) -> HRESULT }} impl IRadialControllerConfiguration { - #[inline] pub unsafe fn set_default_menu_items(&self, buttons: &super::super::foundation::collections::IIterable) -> Result<()> { + #[inline] pub fn set_default_menu_items(&self, buttons: &foundation::collections::IIterable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetDefaultMenuItems)(self as *const _ as *mut _, buttons as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn reset_to_default_menu_items(&self) -> Result<()> { + }} + #[inline] pub fn reset_to_default_menu_items(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ResetToDefaultMenuItems)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn try_select_default_menu_item(&self, type_: RadialControllerSystemMenuItemKind) -> Result { + }} + #[inline] pub fn try_select_default_menu_item(&self, type_: RadialControllerSystemMenuItemKind) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TrySelectDefaultMenuItem)(self as *const _ as *mut _, type_, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class RadialControllerConfiguration: IRadialControllerConfiguration} impl RtActivatable for RadialControllerConfiguration {} impl RtActivatable for RadialControllerConfiguration {} impl RadialControllerConfiguration { - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} - #[inline] pub fn set_app_controller(value: &RadialController) -> Result<()> { unsafe { + } + #[inline] pub fn set_app_controller(value: &RadialController) -> Result<()> { >::get_activation_factory().set_app_controller(value) - }} - #[inline] pub fn get_app_controller() -> Result> { unsafe { + } + #[inline] pub fn get_app_controller() -> Result>> { >::get_activation_factory().get_app_controller() - }} - #[inline] pub fn set_is_app_controller_enabled(value: bool) -> Result<()> { unsafe { + } + #[inline] pub fn set_is_app_controller_enabled(value: bool) -> Result<()> { >::get_activation_factory().set_is_app_controller_enabled(value) - }} - #[inline] pub fn get_is_app_controller_enabled() -> Result { unsafe { + } + #[inline] pub fn get_is_app_controller_enabled() -> Result { >::get_activation_factory().get_is_app_controller_enabled() - }} + } } DEFINE_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]) [CLSID_RadialControllerConfiguration]); DEFINE_IID!(IID_IRadialControllerConfiguration2, 1029144311, 15598, 4582, 181, 53, 0, 27, 220, 6, 171, 59); @@ -4421,35 +4421,35 @@ RT_INTERFACE!{interface IRadialControllerConfiguration2(IRadialControllerConfigu fn get_IsMenuSuppressed(&self, out: *mut bool) -> HRESULT }} impl IRadialControllerConfiguration2 { - #[inline] pub unsafe fn set_active_controller_when_menu_is_suppressed(&self, value: &RadialController) -> Result<()> { + #[inline] pub fn set_active_controller_when_menu_is_suppressed(&self, value: &RadialController) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ActiveControllerWhenMenuIsSuppressed)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_active_controller_when_menu_is_suppressed(&self) -> Result> { + }} + #[inline] pub fn get_active_controller_when_menu_is_suppressed(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ActiveControllerWhenMenuIsSuppressed)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_menu_suppressed(&self, value: bool) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_is_menu_suppressed(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsMenuSuppressed)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_menu_suppressed(&self) -> Result { + }} + #[inline] pub fn get_is_menu_suppressed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsMenuSuppressed)(self as *const _ as *mut _, &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(&self, out: *mut *mut RadialControllerConfiguration) -> HRESULT }} impl IRadialControllerConfigurationStatics { - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IRadialControllerConfigurationStatics2, 1407224599, 57861, 18643, 156, 175, 128, 255, 71, 196, 215, 199); RT_INTERFACE!{static interface IRadialControllerConfigurationStatics2(IRadialControllerConfigurationStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IRadialControllerConfigurationStatics2] { @@ -4459,35 +4459,35 @@ RT_INTERFACE!{static interface IRadialControllerConfigurationStatics2(IRadialCon fn get_IsAppControllerEnabled(&self, out: *mut bool) -> HRESULT }} impl IRadialControllerConfigurationStatics2 { - #[inline] pub unsafe fn set_app_controller(&self, value: &RadialController) -> Result<()> { + #[inline] pub fn set_app_controller(&self, value: &RadialController) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AppController)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_controller(&self) -> Result> { + }} + #[inline] pub fn get_app_controller(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppController)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_app_controller_enabled(&self, value: bool) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_is_app_controller_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsAppControllerEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_app_controller_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_app_controller_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsAppControllerEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(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(&self, out: *mut *mut RadialControllerScreenContact) -> HRESULT }} impl IRadialControllerControlAcquiredEventArgs { - #[inline] pub unsafe fn get_contact(&self) -> Result> { + #[inline] pub fn get_contact(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Contact)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RadialControllerControlAcquiredEventArgs: IRadialControllerControlAcquiredEventArgs} DEFINE_IID!(IID_IRadialControllerControlAcquiredEventArgs2, 1029144308, 15598, 4582, 181, 53, 0, 27, 220, 6, 171, 59); @@ -4496,20 +4496,20 @@ RT_INTERFACE!{interface IRadialControllerControlAcquiredEventArgs2(IRadialContro #[cfg(feature="windows-devices")] fn get_SimpleHapticsController(&self, out: *mut *mut super::super::devices::haptics::SimpleHapticsController) -> HRESULT }} impl IRadialControllerControlAcquiredEventArgs2 { - #[inline] pub unsafe fn get_is_button_pressed(&self) -> Result { + #[inline] pub fn get_is_button_pressed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsButtonPressed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_simple_haptics_controller(&self) -> Result> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_simple_haptics_controller(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SimpleHapticsController)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Items(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_IsEnabled(&self, out: *mut bool) -> HRESULT, fn put_IsEnabled(&self, value: bool) -> HRESULT, fn GetSelectedMenuItem(&self, out: *mut *mut RadialControllerMenuItem) -> HRESULT, @@ -4517,34 +4517,34 @@ RT_INTERFACE!{interface IRadialControllerMenu(IRadialControllerMenuVtbl): IInspe fn TrySelectPreviouslySelectedMenuItem(&self, out: *mut bool) -> HRESULT }} impl IRadialControllerMenu { - #[inline] pub unsafe fn get_items(&self) -> Result>> { + #[inline] pub fn get_items(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Items)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_enabled(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_selected_menu_item(&self) -> Result> { + }} + #[inline] pub fn get_selected_menu_item(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSelectedMenuItem)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn select_menu_item(&self, menuItem: &RadialControllerMenuItem) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn select_menu_item(&self, menuItem: &RadialControllerMenuItem) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SelectMenuItem)(self as *const _ as *mut _, menuItem as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn try_select_previously_selected_menu_item(&self) -> Result { + }} + #[inline] pub fn try_select_previously_selected_menu_item(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TrySelectPreviouslySelectedMenuItem)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class RadialControllerMenu: IRadialControllerMenu} DEFINE_IID!(IID_IRadialControllerMenuItem, 3356477837, 44299, 19612, 143, 47, 19, 106, 35, 115, 166, 186); @@ -4552,50 +4552,50 @@ RT_INTERFACE!{interface IRadialControllerMenuItem(IRadialControllerMenuItemVtbl) fn get_DisplayText(&self, out: *mut HSTRING) -> HRESULT, fn get_Tag(&self, out: *mut *mut IInspectable) -> HRESULT, fn put_Tag(&self, value: *mut IInspectable) -> HRESULT, - fn add_Invoked(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Invoked(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_Invoked(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Invoked(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IRadialControllerMenuItem { - #[inline] pub unsafe fn get_display_text(&self) -> Result { + #[inline] pub fn get_display_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_tag(&self) -> Result> { + }} + #[inline] pub fn get_tag(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Tag)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_tag(&self, value: &IInspectable) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_tag(&self, value: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Tag)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_invoked(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_invoked(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Invoked)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_invoked(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_invoked(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Invoked)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class RadialControllerMenuItem: IRadialControllerMenuItem} impl RtActivatable for RadialControllerMenuItem {} impl RtActivatable for RadialControllerMenuItem {} impl RadialControllerMenuItem { - #[cfg(feature="windows-storage")] #[inline] pub fn create_from_icon(displayText: &HStringArg, icon: &super::super::storage::streams::RandomAccessStreamReference) -> Result> { unsafe { + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_icon(displayText: &HStringArg, icon: &super::super::storage::streams::RandomAccessStreamReference) -> Result>> { >::get_activation_factory().create_from_icon(displayText, icon) - }} - #[inline] pub fn create_from_known_icon(displayText: &HStringArg, value: RadialControllerMenuKnownIcon) -> Result> { unsafe { + } + #[inline] pub fn create_from_known_icon(displayText: &HStringArg, value: RadialControllerMenuKnownIcon) -> Result>> { >::get_activation_factory().create_from_known_icon(displayText, value) - }} - #[inline] pub fn create_from_font_glyph(displayText: &HStringArg, glyph: &HStringArg, fontFamily: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_from_font_glyph(displayText: &HStringArg, glyph: &HStringArg, fontFamily: &HStringArg) -> Result>> { >::get_activation_factory().create_from_font_glyph(displayText, glyph, fontFamily) - }} - #[inline] pub fn create_from_font_glyph_with_uri(displayText: &HStringArg, glyph: &HStringArg, fontFamily: &HStringArg, fontUri: &super::super::foundation::Uri) -> Result> { unsafe { + } + #[inline] pub fn create_from_font_glyph_with_uri(displayText: &HStringArg, glyph: &HStringArg, fontFamily: &HStringArg, fontUri: &foundation::Uri) -> Result>> { >::get_activation_factory().create_from_font_glyph_with_uri(displayText, glyph, fontFamily, fontUri) - }} + } } DEFINE_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]) [CLSID_RadialControllerMenuItem]); DEFINE_IID!(IID_IRadialControllerMenuItemStatics, 614336647, 55362, 17700, 157, 248, 224, 214, 71, 237, 200, 135); @@ -4605,33 +4605,33 @@ RT_INTERFACE!{static interface IRadialControllerMenuItemStatics(IRadialControlle fn CreateFromKnownIcon(&self, displayText: HSTRING, value: RadialControllerMenuKnownIcon, out: *mut *mut RadialControllerMenuItem) -> HRESULT }} impl IRadialControllerMenuItemStatics { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn create_from_icon(&self, displayText: &HStringArg, icon: &super::super::storage::streams::RandomAccessStreamReference) -> Result> { + #[cfg(feature="windows-storage")] #[inline] pub fn create_from_icon(&self, displayText: &HStringArg, icon: &super::super::storage::streams::RandomAccessStreamReference) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromIcon)(self as *const _ as *mut _, 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(&self, displayText: &HStringArg, value: RadialControllerMenuKnownIcon) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_from_known_icon(&self, displayText: &HStringArg, value: RadialControllerMenuKnownIcon) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromKnownIcon)(self as *const _ as *mut _, displayText.get(), value, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IRadialControllerMenuItemStatics2, 213610686, 32318, 18621, 190, 4, 44, 127, 202, 169, 193, 255); RT_INTERFACE!{static interface IRadialControllerMenuItemStatics2(IRadialControllerMenuItemStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IRadialControllerMenuItemStatics2] { fn CreateFromFontGlyph(&self, displayText: HSTRING, glyph: HSTRING, fontFamily: HSTRING, out: *mut *mut RadialControllerMenuItem) -> HRESULT, - fn CreateFromFontGlyphWithUri(&self, displayText: HSTRING, glyph: HSTRING, fontFamily: HSTRING, fontUri: *mut super::super::foundation::Uri, out: *mut *mut RadialControllerMenuItem) -> HRESULT + fn CreateFromFontGlyphWithUri(&self, displayText: HSTRING, glyph: HSTRING, fontFamily: HSTRING, fontUri: *mut foundation::Uri, out: *mut *mut RadialControllerMenuItem) -> HRESULT }} impl IRadialControllerMenuItemStatics2 { - #[inline] pub unsafe fn create_from_font_glyph(&self, displayText: &HStringArg, glyph: &HStringArg, fontFamily: &HStringArg) -> Result> { + #[inline] pub fn create_from_font_glyph(&self, displayText: &HStringArg, glyph: &HStringArg, fontFamily: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromFontGlyph)(self as *const _ as *mut _, displayText.get(), glyph.get(), fontFamily.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_from_font_glyph_with_uri(&self, displayText: &HStringArg, glyph: &HStringArg, fontFamily: &HStringArg, fontUri: &super::super::foundation::Uri) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_from_font_glyph_with_uri(&self, displayText: &HStringArg, glyph: &HStringArg, fontFamily: &HStringArg, fontUri: &foundation::Uri) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateFromFontGlyphWithUri)(self as *const _ as *mut _, displayText.get(), glyph.get(), fontFamily.get(), fontUri as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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, @@ -4642,16 +4642,16 @@ RT_INTERFACE!{interface IRadialControllerRotationChangedEventArgs(IRadialControl fn get_Contact(&self, out: *mut *mut RadialControllerScreenContact) -> HRESULT }} impl IRadialControllerRotationChangedEventArgs { - #[inline] pub unsafe fn get_rotation_delta_in_degrees(&self) -> Result { + #[inline] pub fn get_rotation_delta_in_degrees(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RotationDeltaInDegrees)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_contact(&self) -> Result> { + }} + #[inline] pub fn get_contact(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Contact)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RadialControllerRotationChangedEventArgs: IRadialControllerRotationChangedEventArgs} DEFINE_IID!(IID_IRadialControllerRotationChangedEventArgs2, 1029144300, 19694, 4582, 181, 53, 0, 27, 220, 6, 171, 59); @@ -4660,33 +4660,33 @@ RT_INTERFACE!{interface IRadialControllerRotationChangedEventArgs2(IRadialContro #[cfg(feature="windows-devices")] fn get_SimpleHapticsController(&self, out: *mut *mut super::super::devices::haptics::SimpleHapticsController) -> HRESULT }} impl IRadialControllerRotationChangedEventArgs2 { - #[inline] pub unsafe fn get_is_button_pressed(&self) -> Result { + #[inline] pub fn get_is_button_pressed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsButtonPressed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_simple_haptics_controller(&self) -> Result> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_simple_haptics_controller(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SimpleHapticsController)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut super::super::foundation::Rect) -> HRESULT, - fn get_Position(&self, out: *mut super::super::foundation::Point) -> HRESULT + fn get_Bounds(&self, out: *mut foundation::Rect) -> HRESULT, + fn get_Position(&self, out: *mut foundation::Point) -> HRESULT }} impl IRadialControllerScreenContact { - #[inline] pub unsafe fn get_bounds(&self) -> Result { + #[inline] pub fn get_bounds(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Bounds)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_position(&self) -> Result { + }} + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class RadialControllerScreenContact: IRadialControllerScreenContact} DEFINE_IID!(IID_IRadialControllerScreenContactContinuedEventArgs, 543859767, 58961, 4581, 191, 98, 44, 39, 215, 64, 78, 133); @@ -4694,11 +4694,11 @@ RT_INTERFACE!{interface IRadialControllerScreenContactContinuedEventArgs(IRadial fn get_Contact(&self, out: *mut *mut RadialControllerScreenContact) -> HRESULT }} impl IRadialControllerScreenContactContinuedEventArgs { - #[inline] pub unsafe fn get_contact(&self) -> Result> { + #[inline] pub fn get_contact(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Contact)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RadialControllerScreenContactContinuedEventArgs: IRadialControllerScreenContactContinuedEventArgs} DEFINE_IID!(IID_IRadialControllerScreenContactContinuedEventArgs2, 1029144305, 15598, 4582, 181, 53, 0, 27, 220, 6, 171, 59); @@ -4707,16 +4707,16 @@ RT_INTERFACE!{interface IRadialControllerScreenContactContinuedEventArgs2(IRadia #[cfg(feature="windows-devices")] fn get_SimpleHapticsController(&self, out: *mut *mut super::super::devices::haptics::SimpleHapticsController) -> HRESULT }} impl IRadialControllerScreenContactContinuedEventArgs2 { - #[inline] pub unsafe fn get_is_button_pressed(&self) -> Result { + #[inline] pub fn get_is_button_pressed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsButtonPressed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_simple_haptics_controller(&self) -> Result> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_simple_haptics_controller(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SimpleHapticsController)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IRadialControllerScreenContactEndedEventArgs, 1029144306, 15598, 4582, 181, 53, 0, 27, 220, 6, 171, 59); RT_INTERFACE!{interface IRadialControllerScreenContactEndedEventArgs(IRadialControllerScreenContactEndedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IRadialControllerScreenContactEndedEventArgs] { @@ -4724,16 +4724,16 @@ RT_INTERFACE!{interface IRadialControllerScreenContactEndedEventArgs(IRadialCont #[cfg(feature="windows-devices")] fn get_SimpleHapticsController(&self, out: *mut *mut super::super::devices::haptics::SimpleHapticsController) -> HRESULT }} impl IRadialControllerScreenContactEndedEventArgs { - #[inline] pub unsafe fn get_is_button_pressed(&self) -> Result { + #[inline] pub fn get_is_button_pressed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsButtonPressed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_simple_haptics_controller(&self) -> Result> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_simple_haptics_controller(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SimpleHapticsController)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RadialControllerScreenContactEndedEventArgs: IRadialControllerScreenContactEndedEventArgs} DEFINE_IID!(IID_IRadialControllerScreenContactStartedEventArgs, 543859766, 58961, 4581, 191, 98, 44, 39, 215, 64, 78, 133); @@ -4741,11 +4741,11 @@ RT_INTERFACE!{interface IRadialControllerScreenContactStartedEventArgs(IRadialCo fn get_Contact(&self, out: *mut *mut RadialControllerScreenContact) -> HRESULT }} impl IRadialControllerScreenContactStartedEventArgs { - #[inline] pub unsafe fn get_contact(&self) -> Result> { + #[inline] pub fn get_contact(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Contact)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RadialControllerScreenContactStartedEventArgs: IRadialControllerScreenContactStartedEventArgs} DEFINE_IID!(IID_IRadialControllerScreenContactStartedEventArgs2, 1029144304, 15598, 4582, 181, 53, 0, 27, 220, 6, 171, 59); @@ -4754,16 +4754,16 @@ RT_INTERFACE!{interface IRadialControllerScreenContactStartedEventArgs2(IRadialC #[cfg(feature="windows-devices")] fn get_SimpleHapticsController(&self, out: *mut *mut super::super::devices::haptics::SimpleHapticsController) -> HRESULT }} impl IRadialControllerScreenContactStartedEventArgs2 { - #[inline] pub unsafe fn get_is_button_pressed(&self) -> Result { + #[inline] pub fn get_is_button_pressed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsButtonPressed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_simple_haptics_controller(&self) -> Result> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_simple_haptics_controller(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SimpleHapticsController)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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] { @@ -4771,16 +4771,16 @@ RT_INTERFACE!{static interface IRadialControllerStatics(IRadialControllerStatics fn CreateForCurrentView(&self, out: *mut *mut RadialController) -> HRESULT }} impl IRadialControllerStatics { - #[inline] pub unsafe fn is_supported(&self) -> Result { + #[inline] pub fn is_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn create_for_current_view(&self) -> Result> { + }} + #[inline] pub fn create_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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, @@ -4789,44 +4789,44 @@ DEFINE_IID!(IID_IRightTappedEventArgs, 1287602365, 44922, 18998, 148, 118, 177, RT_INTERFACE!{interface IRightTappedEventArgs(IRightTappedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IRightTappedEventArgs] { #[cfg(not(feature="windows-devices"))] fn __Dummy0(&self) -> (), #[cfg(feature="windows-devices")] fn get_PointerDeviceType(&self, out: *mut super::super::devices::input::PointerDeviceType) -> HRESULT, - fn get_Position(&self, out: *mut super::super::foundation::Point) -> HRESULT + fn get_Position(&self, out: *mut foundation::Point) -> HRESULT }} impl IRightTappedEventArgs { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_pointer_device_type(&self) -> Result { + #[cfg(feature="windows-devices")] #[inline] pub fn get_pointer_device_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PointerDeviceType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_position(&self) -> Result { + }} + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class RightTappedEventArgs: IRightTappedEventArgs} 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(&self) -> (), #[cfg(feature="windows-devices")] fn get_PointerDeviceType(&self, out: *mut super::super::devices::input::PointerDeviceType) -> HRESULT, - fn get_Position(&self, out: *mut super::super::foundation::Point) -> HRESULT, + fn get_Position(&self, out: *mut foundation::Point) -> HRESULT, fn get_TapCount(&self, out: *mut u32) -> HRESULT }} impl ITappedEventArgs { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_pointer_device_type(&self) -> Result { + #[cfg(feature="windows-devices")] #[inline] pub fn get_pointer_device_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PointerDeviceType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_position(&self) -> Result { + }} + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_tap_count(&self) -> Result { + }} + #[inline] pub fn get_tap_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TapCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class TappedEventArgs: ITappedEventArgs} pub mod preview { // Windows.UI.Input.Preview @@ -4855,77 +4855,77 @@ RT_INTERFACE!{interface IInjectedInputGamepadInfo(IInjectedInputGamepadInfoVtbl) fn put_RightTrigger(&self, value: f64) -> HRESULT }} impl IInjectedInputGamepadInfo { - #[cfg(feature="windows-gaming")] #[inline] pub unsafe fn get_buttons(&self) -> Result<::rt::gen::windows::gaming::input::GamepadButtons> { + #[cfg(feature="windows-gaming")] #[inline] pub fn get_buttons(&self) -> Result<::rt::gen::windows::gaming::input::GamepadButtons> { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Buttons)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-gaming")] #[inline] pub unsafe fn set_buttons(&self, value: ::rt::gen::windows::gaming::input::GamepadButtons) -> Result<()> { + }} + #[cfg(feature="windows-gaming")] #[inline] pub fn set_buttons(&self, value: ::rt::gen::windows::gaming::input::GamepadButtons) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Buttons)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_left_thumbstick_x(&self) -> Result { + }} + #[inline] pub fn get_left_thumbstick_x(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LeftThumbstickX)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_left_thumbstick_x(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_left_thumbstick_x(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LeftThumbstickX)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_left_thumbstick_y(&self) -> Result { + }} + #[inline] pub fn get_left_thumbstick_y(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LeftThumbstickY)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_left_thumbstick_y(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_left_thumbstick_y(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LeftThumbstickY)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_left_trigger(&self) -> Result { + }} + #[inline] pub fn get_left_trigger(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LeftTrigger)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_left_trigger(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_left_trigger(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LeftTrigger)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_right_thumbstick_x(&self) -> Result { + }} + #[inline] pub fn get_right_thumbstick_x(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RightThumbstickX)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_right_thumbstick_x(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_right_thumbstick_x(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RightThumbstickX)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_right_thumbstick_y(&self) -> Result { + }} + #[inline] pub fn get_right_thumbstick_y(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RightThumbstickY)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_right_thumbstick_y(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_right_thumbstick_y(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RightThumbstickY)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_right_trigger(&self) -> Result { + }} + #[inline] pub fn get_right_trigger(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RightTrigger)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_right_trigger(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_right_trigger(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RightTrigger)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class InjectedInputGamepadInfo: IInjectedInputGamepadInfo} impl RtActivatable for InjectedInputGamepadInfo {} impl RtActivatable for InjectedInputGamepadInfo {} impl InjectedInputGamepadInfo { - #[cfg(feature="windows-gaming")] #[inline] pub fn create_instance_from_gamepad_reading(reading: ::rt::gen::windows::gaming::input::GamepadReading) -> Result> { unsafe { + #[cfg(feature="windows-gaming")] #[inline] pub fn create_instance_from_gamepad_reading(reading: ::rt::gen::windows::gaming::input::GamepadReading) -> Result> { >::get_activation_factory().create_instance_from_gamepad_reading(reading) - }} + } } DEFINE_CLSID!(InjectedInputGamepadInfo(&[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,106,101,99,116,101,100,73,110,112,117,116,71,97,109,101,112,97,100,73,110,102,111,0]) [CLSID_InjectedInputGamepadInfo]); DEFINE_IID!(IID_IInjectedInputGamepadInfoFactory, 1499031670, 27705, 20164, 139, 42, 41, 239, 125, 225, 138, 202); @@ -4933,11 +4933,11 @@ RT_INTERFACE!{static interface IInjectedInputGamepadInfoFactory(IInjectedInputGa #[cfg(feature="windows-gaming")] fn CreateInstanceFromGamepadReading(&self, reading: ::rt::gen::windows::gaming::input::GamepadReading, out: *mut *mut InjectedInputGamepadInfo) -> HRESULT }} impl IInjectedInputGamepadInfoFactory { - #[cfg(feature="windows-gaming")] #[inline] pub unsafe fn create_instance_from_gamepad_reading(&self, reading: ::rt::gen::windows::gaming::input::GamepadReading) -> Result> { + #[cfg(feature="windows-gaming")] #[inline] pub fn create_instance_from_gamepad_reading(&self, reading: ::rt::gen::windows::gaming::input::GamepadReading) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstanceFromGamepadReading)(self as *const _ as *mut _, reading, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } 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] { @@ -4949,33 +4949,33 @@ RT_INTERFACE!{interface IInjectedInputKeyboardInfo(IInjectedInputKeyboardInfoVtb fn put_VirtualKey(&self, value: u16) -> HRESULT }} impl IInjectedInputKeyboardInfo { - #[inline] pub unsafe fn get_key_options(&self) -> Result { + #[inline] pub fn get_key_options(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_KeyOptions)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_key_options(&self, value: InjectedInputKeyOptions) -> Result<()> { + }} + #[inline] pub fn set_key_options(&self, value: InjectedInputKeyOptions) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_KeyOptions)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_scan_code(&self) -> Result { + }} + #[inline] pub fn get_scan_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ScanCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_scan_code(&self, value: u16) -> Result<()> { + }} + #[inline] pub fn set_scan_code(&self, value: u16) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ScanCode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_virtual_key(&self) -> Result { + }} + #[inline] pub fn get_virtual_key(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VirtualKey)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_virtual_key(&self, value: u16) -> Result<()> { + }} + #[inline] pub fn set_virtual_key(&self, value: u16) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_VirtualKey)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class InjectedInputKeyboardInfo: IInjectedInputKeyboardInfo} impl RtActivatable for InjectedInputKeyboardInfo {} @@ -4997,51 +4997,51 @@ RT_INTERFACE!{interface IInjectedInputMouseInfo(IInjectedInputMouseInfoVtbl): II fn put_TimeOffsetInMilliseconds(&self, value: u32) -> HRESULT }} impl IInjectedInputMouseInfo { - #[inline] pub unsafe fn get_mouse_options(&self) -> Result { + #[inline] pub fn get_mouse_options(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MouseOptions)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_mouse_options(&self, value: InjectedInputMouseOptions) -> Result<()> { + }} + #[inline] pub fn set_mouse_options(&self, value: InjectedInputMouseOptions) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MouseOptions)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_mouse_data(&self) -> Result { + }} + #[inline] pub fn get_mouse_data(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MouseData)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_mouse_data(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_mouse_data(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MouseData)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_delta_y(&self) -> Result { + }} + #[inline] pub fn get_delta_y(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DeltaY)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_delta_y(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_delta_y(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DeltaY)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_delta_x(&self) -> Result { + }} + #[inline] pub fn get_delta_x(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DeltaX)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_delta_x(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_delta_x(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DeltaX)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_time_offset_in_milliseconds(&self) -> Result { + }} + #[inline] pub fn get_time_offset_in_milliseconds(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TimeOffsetInMilliseconds)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_time_offset_in_milliseconds(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_time_offset_in_milliseconds(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TimeOffsetInMilliseconds)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class InjectedInputMouseInfo: IInjectedInputMouseInfo} impl RtActivatable for InjectedInputMouseInfo {} @@ -5070,69 +5070,69 @@ RT_INTERFACE!{interface IInjectedInputPenInfo(IInjectedInputPenInfoVtbl): IInspe fn put_TiltY(&self, value: i32) -> HRESULT }} impl IInjectedInputPenInfo { - #[inline] pub unsafe fn get_pointer_info(&self) -> Result { + #[inline] pub fn get_pointer_info(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PointerInfo)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_pointer_info(&self, value: InjectedInputPointerInfo) -> Result<()> { + }} + #[inline] pub fn set_pointer_info(&self, value: InjectedInputPointerInfo) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PointerInfo)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_pen_buttons(&self) -> Result { + }} + #[inline] pub fn get_pen_buttons(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PenButtons)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_pen_buttons(&self, value: InjectedInputPenButtons) -> Result<()> { + }} + #[inline] pub fn set_pen_buttons(&self, value: InjectedInputPenButtons) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PenButtons)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_pen_parameters(&self) -> Result { + }} + #[inline] pub fn get_pen_parameters(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PenParameters)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_pen_parameters(&self, value: InjectedInputPenParameters) -> Result<()> { + }} + #[inline] pub fn set_pen_parameters(&self, value: InjectedInputPenParameters) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PenParameters)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_pressure(&self) -> Result { + }} + #[inline] pub fn get_pressure(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Pressure)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_pressure(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_pressure(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Pressure)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_rotation(&self) -> Result { + }} + #[inline] pub fn get_rotation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Rotation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_rotation(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_rotation(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Rotation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_tilt_x(&self) -> Result { + }} + #[inline] pub fn get_tilt_x(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TiltX)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_tilt_x(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_tilt_x(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TiltX)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_tilt_y(&self) -> Result { + }} + #[inline] pub fn get_tilt_y(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TiltY)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_tilt_y(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_tilt_y(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TiltY)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class InjectedInputPenInfo: IInjectedInputPenInfo} impl RtActivatable for InjectedInputPenInfo {} @@ -5169,51 +5169,51 @@ RT_INTERFACE!{interface IInjectedInputTouchInfo(IInjectedInputTouchInfoVtbl): II fn put_TouchParameters(&self, value: InjectedInputTouchParameters) -> HRESULT }} impl IInjectedInputTouchInfo { - #[inline] pub unsafe fn get_contact(&self) -> Result { + #[inline] pub fn get_contact(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Contact)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_contact(&self, value: InjectedInputRectangle) -> Result<()> { + }} + #[inline] pub fn set_contact(&self, value: InjectedInputRectangle) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Contact)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_orientation(&self) -> Result { + }} + #[inline] pub fn get_orientation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Orientation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_orientation(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_orientation(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Orientation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_pointer_info(&self) -> Result { + }} + #[inline] pub fn get_pointer_info(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PointerInfo)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_pointer_info(&self, value: InjectedInputPointerInfo) -> Result<()> { + }} + #[inline] pub fn set_pointer_info(&self, value: InjectedInputPointerInfo) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PointerInfo)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_pressure(&self) -> Result { + }} + #[inline] pub fn get_pressure(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Pressure)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_pressure(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_pressure(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Pressure)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_touch_parameters(&self) -> Result { + }} + #[inline] pub fn get_touch_parameters(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TouchParameters)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_touch_parameters(&self, value: InjectedInputTouchParameters) -> Result<()> { + }} + #[inline] pub fn set_touch_parameters(&self, value: InjectedInputTouchParameters) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TouchParameters)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class InjectedInputTouchInfo: IInjectedInputTouchInfo} impl RtActivatable for InjectedInputTouchInfo {} @@ -5226,10 +5226,10 @@ RT_ENUM! { enum InjectedInputVisualizationMode: i32 { }} 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(&self, input: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT, - fn InjectMouseInput(&self, input: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT, + fn InjectKeyboardInput(&self, input: *mut foundation::collections::IIterable) -> HRESULT, + fn InjectMouseInput(&self, input: *mut foundation::collections::IIterable) -> HRESULT, fn InitializeTouchInjection(&self, visualMode: InjectedInputVisualizationMode) -> HRESULT, - fn InjectTouchInput(&self, input: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT, + fn InjectTouchInput(&self, input: *mut foundation::collections::IIterable) -> HRESULT, fn UninitializeTouchInjection(&self) -> HRESULT, fn InitializePenInjection(&self, visualMode: InjectedInputVisualizationMode) -> HRESULT, fn InjectPenInput(&self, input: *mut InjectedInputPenInfo) -> HRESULT, @@ -5237,53 +5237,53 @@ RT_INTERFACE!{interface IInputInjector(IInputInjectorVtbl): IInspectable(IInspec fn InjectShortcut(&self, shortcut: InjectedInputShortcut) -> HRESULT }} impl IInputInjector { - #[inline] pub unsafe fn inject_keyboard_input(&self, input: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + #[inline] pub fn inject_keyboard_input(&self, input: &foundation::collections::IIterable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InjectKeyboardInput)(self as *const _ as *mut _, input as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn inject_mouse_input(&self, input: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + }} + #[inline] pub fn inject_mouse_input(&self, input: &foundation::collections::IIterable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InjectMouseInput)(self as *const _ as *mut _, input as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn initialize_touch_injection(&self, visualMode: InjectedInputVisualizationMode) -> Result<()> { + }} + #[inline] pub fn initialize_touch_injection(&self, visualMode: InjectedInputVisualizationMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InitializeTouchInjection)(self as *const _ as *mut _, visualMode); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn inject_touch_input(&self, input: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + }} + #[inline] pub fn inject_touch_input(&self, input: &foundation::collections::IIterable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InjectTouchInput)(self as *const _ as *mut _, input as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn uninitialize_touch_injection(&self) -> Result<()> { + }} + #[inline] pub fn uninitialize_touch_injection(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).UninitializeTouchInjection)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn initialize_pen_injection(&self, visualMode: InjectedInputVisualizationMode) -> Result<()> { + }} + #[inline] pub fn initialize_pen_injection(&self, visualMode: InjectedInputVisualizationMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InitializePenInjection)(self as *const _ as *mut _, visualMode); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn inject_pen_input(&self, input: &InjectedInputPenInfo) -> Result<()> { + }} + #[inline] pub fn inject_pen_input(&self, input: &InjectedInputPenInfo) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InjectPenInput)(self as *const _ as *mut _, input as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn uninitialize_pen_injection(&self) -> Result<()> { + }} + #[inline] pub fn uninitialize_pen_injection(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).UninitializePenInjection)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn inject_shortcut(&self, shortcut: InjectedInputShortcut) -> Result<()> { + }} + #[inline] pub fn inject_shortcut(&self, shortcut: InjectedInputShortcut) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InjectShortcut)(self as *const _ as *mut _, shortcut); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class InputInjector: IInputInjector} impl RtActivatable for InputInjector {} impl RtActivatable for InputInjector {} impl InputInjector { - #[inline] pub fn try_create() -> Result> { unsafe { + #[inline] pub fn try_create() -> Result>> { >::get_activation_factory().try_create() - }} - #[inline] pub fn try_create_for_app_broadcast_only() -> Result> { unsafe { + } + #[inline] pub fn try_create_for_app_broadcast_only() -> Result>> { >::get_activation_factory().try_create_for_app_broadcast_only() - }} + } } DEFINE_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]) [CLSID_InputInjector]); DEFINE_IID!(IID_IInputInjector2, 2390397021, 5203, 17319, 155, 203, 6, 214, 215, 179, 5, 247); @@ -5293,40 +5293,40 @@ RT_INTERFACE!{interface IInputInjector2(IInputInjector2Vtbl): IInspectable(IInsp fn UninitializeGamepadInjection(&self) -> HRESULT }} impl IInputInjector2 { - #[inline] pub unsafe fn initialize_gamepad_injection(&self) -> Result<()> { + #[inline] pub fn initialize_gamepad_injection(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InitializeGamepadInjection)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn inject_gamepad_input(&self, input: &InjectedInputGamepadInfo) -> Result<()> { + }} + #[inline] pub fn inject_gamepad_input(&self, input: &InjectedInputGamepadInfo) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InjectGamepadInput)(self as *const _ as *mut _, input as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn uninitialize_gamepad_injection(&self) -> Result<()> { + }} + #[inline] pub fn uninitialize_gamepad_injection(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).UninitializeGamepadInjection)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut InputInjector) -> HRESULT }} impl IInputInjectorStatics { - #[inline] pub unsafe fn try_create(&self) -> Result> { + #[inline] pub fn try_create(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryCreate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IInputInjectorStatics2, 2765830395, 56716, 16719, 149, 234, 248, 126, 244, 192, 174, 108); RT_INTERFACE!{static interface IInputInjectorStatics2(IInputInjectorStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IInputInjectorStatics2] { fn TryCreateForAppBroadcastOnly(&self, out: *mut *mut InputInjector) -> HRESULT }} impl IInputInjectorStatics2 { - #[inline] pub unsafe fn try_create_for_app_broadcast_only(&self) -> Result> { + #[inline] pub fn try_create_for_app_broadcast_only(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryCreateForAppBroadcastOnly)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } } // Windows.UI.Input.Preview.Injection } // Windows.UI.Input.Preview @@ -5334,191 +5334,191 @@ pub mod spatial { // Windows.UI.Input.Spatial use ::prelude::*; 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(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RecognitionStarted(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_RecognitionEnded(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RecognitionEnded(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_Tapped(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Tapped(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_HoldStarted(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_HoldStarted(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_HoldCompleted(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_HoldCompleted(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_HoldCanceled(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_HoldCanceled(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_ManipulationStarted(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ManipulationStarted(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_ManipulationUpdated(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ManipulationUpdated(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_ManipulationCompleted(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ManipulationCompleted(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_ManipulationCanceled(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ManipulationCanceled(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_NavigationStarted(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_NavigationStarted(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_NavigationUpdated(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_NavigationUpdated(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_NavigationCompleted(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_NavigationCompleted(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_NavigationCanceled(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_NavigationCanceled(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_RecognitionStarted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RecognitionStarted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_RecognitionEnded(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RecognitionEnded(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Tapped(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Tapped(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_HoldStarted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_HoldStarted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_HoldCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_HoldCompleted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_HoldCanceled(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_HoldCanceled(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ManipulationStarted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ManipulationStarted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ManipulationUpdated(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ManipulationUpdated(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ManipulationCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ManipulationCompleted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ManipulationCanceled(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ManipulationCanceled(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_NavigationStarted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_NavigationStarted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_NavigationUpdated(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_NavigationUpdated(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_NavigationCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_NavigationCompleted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_NavigationCanceled(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_NavigationCanceled(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn CaptureInteraction(&self, interaction: *mut SpatialInteraction) -> HRESULT, fn CancelPendingGestures(&self) -> HRESULT, fn TrySetGestureSettings(&self, settings: SpatialGestureSettings, out: *mut bool) -> HRESULT, fn get_GestureSettings(&self, out: *mut SpatialGestureSettings) -> HRESULT }} impl ISpatialGestureRecognizer { - #[inline] pub unsafe fn add_recognition_started(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub fn add_recognition_started(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RecognitionStarted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_recognition_started(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_recognition_started(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RecognitionStarted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_recognition_ended(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_recognition_ended(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RecognitionEnded)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_recognition_ended(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_recognition_ended(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RecognitionEnded)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_tapped(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_tapped(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Tapped)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_tapped(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_tapped(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Tapped)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_hold_started(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_hold_started(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_HoldStarted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_hold_started(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_hold_started(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_HoldStarted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_hold_completed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_hold_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_HoldCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_hold_completed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_hold_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_HoldCompleted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_hold_canceled(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_hold_canceled(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_HoldCanceled)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_hold_canceled(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_hold_canceled(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_HoldCanceled)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_manipulation_started(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_manipulation_started(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ManipulationStarted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_manipulation_started(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_manipulation_started(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ManipulationStarted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_manipulation_updated(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_manipulation_updated(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ManipulationUpdated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_manipulation_updated(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_manipulation_updated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ManipulationUpdated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_manipulation_completed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_manipulation_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ManipulationCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_manipulation_completed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_manipulation_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ManipulationCompleted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_manipulation_canceled(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_manipulation_canceled(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ManipulationCanceled)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_manipulation_canceled(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_manipulation_canceled(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ManipulationCanceled)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_navigation_started(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_navigation_started(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_NavigationStarted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_navigation_started(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_navigation_started(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_NavigationStarted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_navigation_updated(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_navigation_updated(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_NavigationUpdated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_navigation_updated(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_navigation_updated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_NavigationUpdated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_navigation_completed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_navigation_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_NavigationCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_navigation_completed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_navigation_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_NavigationCompleted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_navigation_canceled(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_navigation_canceled(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_NavigationCanceled)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_navigation_canceled(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_navigation_canceled(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_NavigationCanceled)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn capture_interaction(&self, interaction: &SpatialInteraction) -> Result<()> { + }} + #[inline] pub fn capture_interaction(&self, interaction: &SpatialInteraction) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).CaptureInteraction)(self as *const _ as *mut _, interaction as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn cancel_pending_gestures(&self) -> Result<()> { + }} + #[inline] pub fn cancel_pending_gestures(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).CancelPendingGestures)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn try_set_gesture_settings(&self, settings: SpatialGestureSettings) -> Result { + }} + #[inline] pub fn try_set_gesture_settings(&self, settings: SpatialGestureSettings) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TrySetGestureSettings)(self as *const _ as *mut _, settings, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_gesture_settings(&self) -> Result { + }} + #[inline] pub fn get_gesture_settings(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_GestureSettings)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SpatialGestureRecognizer: ISpatialGestureRecognizer} impl RtActivatable for SpatialGestureRecognizer {} impl SpatialGestureRecognizer { - #[inline] pub fn create(settings: SpatialGestureSettings) -> Result> { unsafe { + #[inline] pub fn create(settings: SpatialGestureSettings) -> Result> { >::get_activation_factory().create(settings) - }} + } } DEFINE_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]) [CLSID_SpatialGestureRecognizer]); DEFINE_IID!(IID_ISpatialGestureRecognizerFactory, 1998668166, 22457, 12624, 131, 130, 105, 139, 36, 226, 100, 208); @@ -5526,11 +5526,11 @@ RT_INTERFACE!{static interface ISpatialGestureRecognizerFactory(ISpatialGestureR fn Create(&self, settings: SpatialGestureSettings, out: *mut *mut SpatialGestureRecognizer) -> HRESULT }} impl ISpatialGestureRecognizerFactory { - #[inline] pub unsafe fn create(&self, settings: SpatialGestureSettings) -> Result> { + #[inline] pub fn create(&self, settings: SpatialGestureSettings) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, settings, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -5540,11 +5540,11 @@ RT_INTERFACE!{interface ISpatialHoldCanceledEventArgs(ISpatialHoldCanceledEventA fn get_InteractionSourceKind(&self, out: *mut SpatialInteractionSourceKind) -> HRESULT }} impl ISpatialHoldCanceledEventArgs { - #[inline] pub unsafe fn get_interaction_source_kind(&self) -> Result { + #[inline] pub fn get_interaction_source_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InteractionSourceKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SpatialHoldCanceledEventArgs: ISpatialHoldCanceledEventArgs} DEFINE_IID!(IID_ISpatialHoldCompletedEventArgs, 1063536395, 19709, 17370, 141, 196, 230, 69, 82, 23, 57, 113); @@ -5552,11 +5552,11 @@ RT_INTERFACE!{interface ISpatialHoldCompletedEventArgs(ISpatialHoldCompletedEven fn get_InteractionSourceKind(&self, out: *mut SpatialInteractionSourceKind) -> HRESULT }} impl ISpatialHoldCompletedEventArgs { - #[inline] pub unsafe fn get_interaction_source_kind(&self) -> Result { + #[inline] pub fn get_interaction_source_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InteractionSourceKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SpatialHoldCompletedEventArgs: ISpatialHoldCompletedEventArgs} DEFINE_IID!(IID_ISpatialHoldStartedEventArgs, 2385788281, 44214, 16708, 134, 21, 44, 251, 168, 163, 203, 63); @@ -5565,16 +5565,16 @@ RT_INTERFACE!{interface ISpatialHoldStartedEventArgs(ISpatialHoldStartedEventArg #[cfg(feature="windows-perception")] fn TryGetPointerPose(&self, coordinateSystem: *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, out: *mut *mut SpatialPointerPose) -> HRESULT }} impl ISpatialHoldStartedEventArgs { - #[inline] pub unsafe fn get_interaction_source_kind(&self) -> Result { + #[inline] pub fn get_interaction_source_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InteractionSourceKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-perception")] #[inline] pub unsafe fn try_get_pointer_pose(&self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result> { + }} + #[cfg(feature="windows-perception")] #[inline] pub fn try_get_pointer_pose(&self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetPointerPose)(self as *const _ as *mut _, coordinateSystem as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SpatialHoldStartedEventArgs: ISpatialHoldStartedEventArgs} DEFINE_IID!(IID_ISpatialInteraction, 4237719097, 35046, 17990, 145, 18, 67, 68, 170, 236, 157, 250); @@ -5582,11 +5582,11 @@ RT_INTERFACE!{interface ISpatialInteraction(ISpatialInteractionVtbl): IInspectab fn get_SourceState(&self, out: *mut *mut SpatialInteractionSourceState) -> HRESULT }} impl ISpatialInteraction { - #[inline] pub unsafe fn get_source_state(&self) -> Result> { + #[inline] pub fn get_source_state(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SourceState)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SpatialInteraction: ISpatialInteraction} DEFINE_IID!(IID_ISpatialInteractionController, 1594776483, 2388, 20119, 134, 197, 231, 243, 11, 17, 77, 253); @@ -5600,48 +5600,48 @@ RT_INTERFACE!{interface ISpatialInteractionController(ISpatialInteractionControl fn get_Version(&self, out: *mut u16) -> HRESULT }} impl ISpatialInteractionController { - #[inline] pub unsafe fn get_has_touchpad(&self) -> Result { + #[inline] pub fn get_has_touchpad(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasTouchpad)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_thumbstick(&self) -> Result { + }} + #[inline] pub fn get_has_thumbstick(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HasThumbstick)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn get_simple_haptics_controller(&self) -> Result> { + }} + #[cfg(feature="windows-devices")] #[inline] pub fn get_simple_haptics_controller(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SimpleHapticsController)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_vendor_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_vendor_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VendorId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_product_id(&self) -> Result { + }} + #[inline] pub fn get_product_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProductId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_version(&self) -> Result { + }} + #[inline] pub fn get_version(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Version)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SpatialInteractionController: ISpatialInteractionController} DEFINE_IID!(IID_ISpatialInteractionController2, 901175588, 51106, 18871, 183, 46, 84, 54, 178, 251, 143, 156); RT_INTERFACE!{interface ISpatialInteractionController2(ISpatialInteractionController2Vtbl): IInspectable(IInspectableVtbl) [IID_ISpatialInteractionController2] { - #[cfg(feature="windows-storage")] fn TryGetRenderableModelAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::storage::streams::IRandomAccessStreamWithContentType>) -> HRESULT + #[cfg(feature="windows-storage")] fn TryGetRenderableModelAsync(&self, out: *mut *mut foundation::IAsyncOperation<::rt::gen::windows::storage::streams::IRandomAccessStreamWithContentType>) -> HRESULT }} impl ISpatialInteractionController2 { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn try_get_renderable_model_async(&self) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn try_get_renderable_model_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetRenderableModelAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ISpatialInteractionControllerProperties, 1627746225, 31657, 20021, 185, 63, 146, 114, 203, 169, 178, 139); RT_INTERFACE!{interface ISpatialInteractionControllerProperties(ISpatialInteractionControllerPropertiesVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialInteractionControllerProperties] { @@ -5654,41 +5654,41 @@ RT_INTERFACE!{interface ISpatialInteractionControllerProperties(ISpatialInteract fn get_TouchpadY(&self, out: *mut f64) -> HRESULT }} impl ISpatialInteractionControllerProperties { - #[inline] pub unsafe fn get_is_touchpad_touched(&self) -> Result { + #[inline] pub fn get_is_touchpad_touched(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsTouchpadTouched)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_touchpad_pressed(&self) -> Result { + }} + #[inline] pub fn get_is_touchpad_pressed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsTouchpadPressed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_thumbstick_pressed(&self) -> Result { + }} + #[inline] pub fn get_is_thumbstick_pressed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsThumbstickPressed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_thumbstick_x(&self) -> Result { + }} + #[inline] pub fn get_thumbstick_x(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ThumbstickX)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_thumbstick_y(&self) -> Result { + }} + #[inline] pub fn get_thumbstick_y(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ThumbstickY)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_touchpad_x(&self) -> Result { + }} + #[inline] pub fn get_touchpad_x(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TouchpadX)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_touchpad_y(&self) -> Result { + }} + #[inline] pub fn get_touchpad_y(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TouchpadY)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SpatialInteractionControllerProperties: ISpatialInteractionControllerProperties} DEFINE_IID!(IID_ISpatialInteractionDetectedEventArgs, 123238628, 22881, 15169, 157, 251, 206, 165, 216, 156, 195, 138); @@ -5699,21 +5699,21 @@ RT_INTERFACE!{interface ISpatialInteractionDetectedEventArgs(ISpatialInteraction fn get_Interaction(&self, out: *mut *mut SpatialInteraction) -> HRESULT }} impl ISpatialInteractionDetectedEventArgs { - #[inline] pub unsafe fn get_interaction_source_kind(&self) -> Result { + #[inline] pub fn get_interaction_source_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InteractionSourceKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-perception")] #[inline] pub unsafe fn try_get_pointer_pose(&self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result> { + }} + #[cfg(feature="windows-perception")] #[inline] pub fn try_get_pointer_pose(&self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetPointerPose)(self 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 get_interaction(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_interaction(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Interaction)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SpatialInteractionDetectedEventArgs: ISpatialInteractionDetectedEventArgs} DEFINE_IID!(IID_ISpatialInteractionDetectedEventArgs2, 2066103955, 24339, 16796, 151, 213, 131, 70, 120, 38, 106, 166); @@ -5721,95 +5721,95 @@ RT_INTERFACE!{interface ISpatialInteractionDetectedEventArgs2(ISpatialInteractio fn get_InteractionSource(&self, out: *mut *mut SpatialInteractionSource) -> HRESULT }} impl ISpatialInteractionDetectedEventArgs2 { - #[inline] pub unsafe fn get_interaction_source(&self) -> Result> { + #[inline] pub fn get_interaction_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InteractionSource)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SourceDetected(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_SourceLost(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SourceLost(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_SourceUpdated(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SourceUpdated(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_SourcePressed(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SourcePressed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_SourceReleased(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SourceReleased(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_InteractionDetected(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_InteractionDetected(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - #[cfg(feature="windows-perception")] fn GetDetectedSourcesAtTimestamp(&self, timeStamp: *mut ::rt::gen::windows::perception::PerceptionTimestamp, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn add_SourceDetected(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceDetected(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_SourceLost(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceLost(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_SourceUpdated(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceUpdated(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_SourcePressed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourcePressed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_SourceReleased(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SourceReleased(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_InteractionDetected(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_InteractionDetected(&self, token: foundation::EventRegistrationToken) -> HRESULT, + #[cfg(feature="windows-perception")] fn GetDetectedSourcesAtTimestamp(&self, timeStamp: *mut ::rt::gen::windows::perception::PerceptionTimestamp, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl ISpatialInteractionManager { - #[inline] pub unsafe fn add_source_detected(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub fn add_source_detected(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SourceDetected)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_source_detected(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_source_detected(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SourceDetected)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_source_lost(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_source_lost(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SourceLost)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_source_lost(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_source_lost(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SourceLost)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_source_updated(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_source_updated(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SourceUpdated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_source_updated(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_source_updated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SourceUpdated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_source_pressed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_source_pressed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SourcePressed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_source_pressed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_source_pressed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SourcePressed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_source_released(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_source_released(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SourceReleased)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_source_released(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_source_released(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SourceReleased)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_interaction_detected(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_interaction_detected(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_InteractionDetected)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_interaction_detected(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_interaction_detected(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_InteractionDetected)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-perception")] #[inline] pub unsafe fn get_detected_sources_at_timestamp(&self, timeStamp: &::rt::gen::windows::perception::PerceptionTimestamp) -> Result>> { + }} + #[cfg(feature="windows-perception")] #[inline] pub fn get_detected_sources_at_timestamp(&self, timeStamp: &::rt::gen::windows::perception::PerceptionTimestamp) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDetectedSourcesAtTimestamp)(self as *const _ as *mut _, timeStamp as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SpatialInteractionManager: ISpatialInteractionManager} impl RtActivatable for SpatialInteractionManager {} impl SpatialInteractionManager { - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} + } } DEFINE_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]) [CLSID_SpatialInteractionManager]); DEFINE_IID!(IID_ISpatialInteractionManagerStatics, 14884774, 36002, 12479, 145, 254, 217, 203, 74, 0, 137, 144); @@ -5817,11 +5817,11 @@ RT_INTERFACE!{static interface ISpatialInteractionManagerStatics(ISpatialInterac fn GetForCurrentView(&self, out: *mut *mut SpatialInteractionManager) -> HRESULT }} impl ISpatialInteractionManagerStatics { - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum SpatialInteractionPressKind: i32 { None (SpatialInteractionPressKind_None) = 0, Select (SpatialInteractionPressKind_Select) = 1, Menu (SpatialInteractionPressKind_Menu) = 2, Grasp (SpatialInteractionPressKind_Grasp) = 3, Touchpad (SpatialInteractionPressKind_Touchpad) = 4, Thumbstick (SpatialInteractionPressKind_Thumbstick) = 5, @@ -5832,16 +5832,16 @@ RT_INTERFACE!{interface ISpatialInteractionSource(ISpatialInteractionSourceVtbl) fn get_Kind(&self, out: *mut SpatialInteractionSourceKind) -> HRESULT }} impl ISpatialInteractionSource { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_kind(&self) -> Result { + }} + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SpatialInteractionSource: ISpatialInteractionSource} DEFINE_IID!(IID_ISpatialInteractionSource2, 3838162700, 1136, 16424, 136, 192, 160, 235, 68, 211, 78, 254); @@ -5853,53 +5853,53 @@ RT_INTERFACE!{interface ISpatialInteractionSource2(ISpatialInteractionSource2Vtb #[cfg(feature="windows-perception")] fn TryGetStateAtTimestamp(&self, timestamp: *mut ::rt::gen::windows::perception::PerceptionTimestamp, out: *mut *mut SpatialInteractionSourceState) -> HRESULT }} impl ISpatialInteractionSource2 { - #[inline] pub unsafe fn get_is_pointing_supported(&self) -> Result { + #[inline] pub fn get_is_pointing_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPointingSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_menu_supported(&self) -> Result { + }} + #[inline] pub fn get_is_menu_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsMenuSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_grasp_supported(&self) -> Result { + }} + #[inline] pub fn get_is_grasp_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsGraspSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_controller(&self) -> Result> { + }} + #[inline] pub fn get_controller(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Controller)(self 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_state_at_timestamp(&self, timestamp: &::rt::gen::windows::perception::PerceptionTimestamp) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-perception")] #[inline] pub fn try_get_state_at_timestamp(&self, timestamp: &::rt::gen::windows::perception::PerceptionTimestamp) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetStateAtTimestamp)(self as *const _ as *mut _, timestamp as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_ISpatialInteractionSource3, 67557881, 39677, 17657, 133, 220, 112, 0, 35, 169, 98, 227); RT_INTERFACE!{interface ISpatialInteractionSource3(ISpatialInteractionSource3Vtbl): IInspectable(IInspectableVtbl) [IID_ISpatialInteractionSource3] { fn get_Handedness(&self, out: *mut SpatialInteractionSourceHandedness) -> HRESULT }} impl ISpatialInteractionSource3 { - #[inline] pub unsafe fn get_handedness(&self) -> Result { + #[inline] pub fn get_handedness(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Handedness)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(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(&self, out: *mut *mut SpatialInteractionSourceState) -> HRESULT }} impl ISpatialInteractionSourceEventArgs { - #[inline] pub unsafe fn get_state(&self) -> Result> { + #[inline] pub fn get_state(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SpatialInteractionSourceEventArgs: ISpatialInteractionSourceEventArgs} DEFINE_IID!(IID_ISpatialInteractionSourceEventArgs2, 3635721319, 58952, 19794, 171, 73, 224, 210, 39, 25, 159, 99); @@ -5907,11 +5907,11 @@ RT_INTERFACE!{interface ISpatialInteractionSourceEventArgs2(ISpatialInteractionS fn get_PressKind(&self, out: *mut SpatialInteractionPressKind) -> HRESULT }} impl ISpatialInteractionSourceEventArgs2 { - #[inline] pub unsafe fn get_press_kind(&self) -> Result { + #[inline] pub fn get_press_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PressKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum SpatialInteractionSourceHandedness: i32 { Unspecified (SpatialInteractionSourceHandedness_Unspecified) = 0, Left (SpatialInteractionSourceHandedness_Left) = 1, Right (SpatialInteractionSourceHandedness_Right) = 2, @@ -5921,81 +5921,81 @@ RT_ENUM! { enum SpatialInteractionSourceKind: i32 { }} 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(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::numerics::Vector3>) -> HRESULT, - fn get_Velocity(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::numerics::Vector3>) -> HRESULT + fn get_Position(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_Velocity(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl ISpatialInteractionSourceLocation { - #[inline] pub unsafe fn get_position(&self) -> Result>> { + #[inline] pub fn get_position(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_velocity(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_velocity(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Velocity)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SpatialInteractionSourceLocation: ISpatialInteractionSourceLocation} 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(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::numerics::Quaternion>) -> HRESULT + fn get_Orientation(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl ISpatialInteractionSourceLocation2 { - #[inline] pub unsafe fn get_orientation(&self) -> Result>> { + #[inline] pub fn get_orientation(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Orientation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_ISpatialInteractionSourceLocation3, 1728243294, 59669, 19707, 156, 27, 5, 56, 239, 200, 102, 135); RT_INTERFACE!{interface ISpatialInteractionSourceLocation3(ISpatialInteractionSourceLocation3Vtbl): IInspectable(IInspectableVtbl) [IID_ISpatialInteractionSourceLocation3] { fn get_PositionAccuracy(&self, out: *mut SpatialInteractionSourcePositionAccuracy) -> HRESULT, - fn get_AngularVelocity(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::numerics::Vector3>) -> HRESULT, + fn get_AngularVelocity(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn get_SourcePointerPose(&self, out: *mut *mut SpatialPointerInteractionSourcePose) -> HRESULT }} impl ISpatialInteractionSourceLocation3 { - #[inline] pub unsafe fn get_position_accuracy(&self) -> Result { + #[inline] pub fn get_position_accuracy(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PositionAccuracy)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_angular_velocity(&self) -> Result>> { + }} + #[inline] pub fn get_angular_velocity(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AngularVelocity)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_source_pointer_pose(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_source_pointer_pose(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SourcePointerPose)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum SpatialInteractionSourcePositionAccuracy: i32 { High (SpatialInteractionSourcePositionAccuracy_High) = 0, Approximate (SpatialInteractionSourcePositionAccuracy_Approximate) = 1, }} 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(&self, coordinateSystem: *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::numerics::Vector3>) -> HRESULT, + #[cfg(feature="windows-perception")] fn TryGetSourceLossMitigationDirection(&self, coordinateSystem: *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, out: *mut *mut foundation::IReference) -> HRESULT, fn get_SourceLossRisk(&self, out: *mut f64) -> HRESULT, #[cfg(feature="windows-perception")] fn TryGetLocation(&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(&self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result>> { + #[cfg(feature="windows-perception")] #[inline] pub fn try_get_source_loss_mitigation_direction(&self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetSourceLossMitigationDirection)(self 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 get_source_loss_risk(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_source_loss_risk(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SourceLossRisk)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-perception")] #[inline] pub unsafe fn try_get_location(&self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result> { + }} + #[cfg(feature="windows-perception")] #[inline] pub fn try_get_location(&self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetLocation)(self as *const _ as *mut _, coordinateSystem as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SpatialInteractionSourceProperties: ISpatialInteractionSourceProperties} DEFINE_IID!(IID_ISpatialInteractionSourceState, 3586422255, 19299, 14316, 152, 185, 159, 198, 82, 185, 210, 242); @@ -6007,31 +6007,31 @@ RT_INTERFACE!{interface ISpatialInteractionSourceState(ISpatialInteractionSource #[cfg(feature="windows-perception")] fn TryGetPointerPose(&self, coordinateSystem: *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, out: *mut *mut SpatialPointerPose) -> HRESULT }} impl ISpatialInteractionSourceState { - #[inline] pub unsafe fn get_source(&self) -> Result> { + #[inline] pub fn get_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Source)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_pressed(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_pressed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPressed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-perception")] #[inline] pub unsafe fn get_timestamp(&self) -> Result> { + }} + #[cfg(feature="windows-perception")] #[inline] pub fn get_timestamp(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Timestamp)(self 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_pointer_pose(&self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-perception")] #[inline] pub fn try_get_pointer_pose(&self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetPointerPose)(self as *const _ as *mut _, coordinateSystem as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SpatialInteractionSourceState: ISpatialInteractionSourceState} DEFINE_IID!(IID_ISpatialInteractionSourceState2, 1173803197, 6003, 18734, 155, 163, 138, 193, 203, 231, 124, 8); @@ -6043,42 +6043,42 @@ RT_INTERFACE!{interface ISpatialInteractionSourceState2(ISpatialInteractionSourc fn get_ControllerProperties(&self, out: *mut *mut SpatialInteractionControllerProperties) -> HRESULT }} impl ISpatialInteractionSourceState2 { - #[inline] pub unsafe fn get_is_select_pressed(&self) -> Result { + #[inline] pub fn get_is_select_pressed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSelectPressed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_menu_pressed(&self) -> Result { + }} + #[inline] pub fn get_is_menu_pressed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsMenuPressed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_grasped(&self) -> Result { + }} + #[inline] pub fn get_is_grasped(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsGrasped)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_select_pressed_value(&self) -> Result { + }} + #[inline] pub fn get_select_pressed_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SelectPressedValue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_controller_properties(&self) -> Result> { + }} + #[inline] pub fn get_controller_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ControllerProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut SpatialInteractionSourceKind) -> HRESULT }} impl ISpatialManipulationCanceledEventArgs { - #[inline] pub unsafe fn get_interaction_source_kind(&self) -> Result { + #[inline] pub fn get_interaction_source_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InteractionSourceKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SpatialManipulationCanceledEventArgs: ISpatialManipulationCanceledEventArgs} DEFINE_IID!(IID_ISpatialManipulationCompletedEventArgs, 84436994, 62209, 17219, 146, 80, 47, 186, 165, 248, 122, 55); @@ -6087,28 +6087,28 @@ RT_INTERFACE!{interface ISpatialManipulationCompletedEventArgs(ISpatialManipulat #[cfg(feature="windows-perception")] fn TryGetCumulativeDelta(&self, coordinateSystem: *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, out: *mut *mut SpatialManipulationDelta) -> HRESULT }} impl ISpatialManipulationCompletedEventArgs { - #[inline] pub unsafe fn get_interaction_source_kind(&self) -> Result { + #[inline] pub fn get_interaction_source_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InteractionSourceKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-perception")] #[inline] pub unsafe fn try_get_cumulative_delta(&self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result> { + }} + #[cfg(feature="windows-perception")] #[inline] pub fn try_get_cumulative_delta(&self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetCumulativeDelta)(self as *const _ as *mut _, coordinateSystem as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SpatialManipulationCompletedEventArgs: ISpatialManipulationCompletedEventArgs} 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(&self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT + fn get_Translation(&self, out: *mut foundation::numerics::Vector3) -> HRESULT }} impl ISpatialManipulationDelta { - #[inline] pub unsafe fn get_translation(&self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + #[inline] pub fn get_translation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Translation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SpatialManipulationDelta: ISpatialManipulationDelta} DEFINE_IID!(IID_ISpatialManipulationStartedEventArgs, 2715204558, 17061, 14203, 173, 166, 210, 142, 61, 56, 71, 55); @@ -6117,16 +6117,16 @@ RT_INTERFACE!{interface ISpatialManipulationStartedEventArgs(ISpatialManipulatio #[cfg(feature="windows-perception")] fn TryGetPointerPose(&self, coordinateSystem: *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, out: *mut *mut SpatialPointerPose) -> HRESULT }} impl ISpatialManipulationStartedEventArgs { - #[inline] pub unsafe fn get_interaction_source_kind(&self) -> Result { + #[inline] pub fn get_interaction_source_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InteractionSourceKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-perception")] #[inline] pub unsafe fn try_get_pointer_pose(&self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result> { + }} + #[cfg(feature="windows-perception")] #[inline] pub fn try_get_pointer_pose(&self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetPointerPose)(self as *const _ as *mut _, coordinateSystem as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SpatialManipulationStartedEventArgs: ISpatialManipulationStartedEventArgs} DEFINE_IID!(IID_ISpatialManipulationUpdatedEventArgs, 1596132251, 24774, 19910, 189, 201, 159, 74, 111, 21, 254, 73); @@ -6135,16 +6135,16 @@ RT_INTERFACE!{interface ISpatialManipulationUpdatedEventArgs(ISpatialManipulatio #[cfg(feature="windows-perception")] fn TryGetCumulativeDelta(&self, coordinateSystem: *mut ::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, out: *mut *mut SpatialManipulationDelta) -> HRESULT }} impl ISpatialManipulationUpdatedEventArgs { - #[inline] pub unsafe fn get_interaction_source_kind(&self) -> Result { + #[inline] pub fn get_interaction_source_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InteractionSourceKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-perception")] #[inline] pub unsafe fn try_get_cumulative_delta(&self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result> { + }} + #[cfg(feature="windows-perception")] #[inline] pub fn try_get_cumulative_delta(&self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetCumulativeDelta)(self as *const _ as *mut _, coordinateSystem as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SpatialManipulationUpdatedEventArgs: ISpatialManipulationUpdatedEventArgs} DEFINE_IID!(IID_ISpatialNavigationCanceledEventArgs, 3461365468, 59557, 18160, 146, 212, 60, 18, 43, 53, 17, 42); @@ -6152,29 +6152,29 @@ RT_INTERFACE!{interface ISpatialNavigationCanceledEventArgs(ISpatialNavigationCa fn get_InteractionSourceKind(&self, out: *mut SpatialInteractionSourceKind) -> HRESULT }} impl ISpatialNavigationCanceledEventArgs { - #[inline] pub unsafe fn get_interaction_source_kind(&self) -> Result { + #[inline] pub fn get_interaction_source_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InteractionSourceKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SpatialNavigationCanceledEventArgs: ISpatialNavigationCanceledEventArgs} 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(&self, out: *mut SpatialInteractionSourceKind) -> HRESULT, - fn get_NormalizedOffset(&self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT + fn get_NormalizedOffset(&self, out: *mut foundation::numerics::Vector3) -> HRESULT }} impl ISpatialNavigationCompletedEventArgs { - #[inline] pub unsafe fn get_interaction_source_kind(&self) -> Result { + #[inline] pub fn get_interaction_source_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InteractionSourceKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_normalized_offset(&self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + }} + #[inline] pub fn get_normalized_offset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NormalizedOffset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SpatialNavigationCompletedEventArgs: ISpatialNavigationCompletedEventArgs} DEFINE_IID!(IID_ISpatialNavigationStartedEventArgs, 1967797386, 64356, 18006, 142, 189, 157, 238, 202, 175, 228, 117); @@ -6187,91 +6187,91 @@ RT_INTERFACE!{interface ISpatialNavigationStartedEventArgs(ISpatialNavigationSta fn get_IsNavigatingZ(&self, out: *mut bool) -> HRESULT }} impl ISpatialNavigationStartedEventArgs { - #[inline] pub unsafe fn get_interaction_source_kind(&self) -> Result { + #[inline] pub fn get_interaction_source_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InteractionSourceKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-perception")] #[inline] pub unsafe fn try_get_pointer_pose(&self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result> { + }} + #[cfg(feature="windows-perception")] #[inline] pub fn try_get_pointer_pose(&self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetPointerPose)(self 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 get_is_navigating_x(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_navigating_x(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsNavigatingX)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_navigating_y(&self) -> Result { + }} + #[inline] pub fn get_is_navigating_y(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsNavigatingY)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_navigating_z(&self) -> Result { + }} + #[inline] pub fn get_is_navigating_z(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsNavigatingZ)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SpatialNavigationStartedEventArgs: ISpatialNavigationStartedEventArgs} 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(&self, out: *mut SpatialInteractionSourceKind) -> HRESULT, - fn get_NormalizedOffset(&self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT + fn get_NormalizedOffset(&self, out: *mut foundation::numerics::Vector3) -> HRESULT }} impl ISpatialNavigationUpdatedEventArgs { - #[inline] pub unsafe fn get_interaction_source_kind(&self) -> Result { + #[inline] pub fn get_interaction_source_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InteractionSourceKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_normalized_offset(&self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + }} + #[inline] pub fn get_normalized_offset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NormalizedOffset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SpatialNavigationUpdatedEventArgs: ISpatialNavigationUpdatedEventArgs} DEFINE_IID!(IID_ISpatialPointerInteractionSourcePose, 2802860807, 11307, 19770, 146, 167, 128, 206, 215, 196, 160, 208); RT_INTERFACE!{interface ISpatialPointerInteractionSourcePose(ISpatialPointerInteractionSourcePoseVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialPointerInteractionSourcePose] { - fn get_Position(&self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, - fn get_ForwardDirection(&self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, - fn get_UpDirection(&self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT + fn get_Position(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, + fn get_ForwardDirection(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, + fn get_UpDirection(&self, out: *mut foundation::numerics::Vector3) -> HRESULT }} impl ISpatialPointerInteractionSourcePose { - #[inline] pub unsafe fn get_position(&self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_forward_direction(&self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + }} + #[inline] pub fn get_forward_direction(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ForwardDirection)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_up_direction(&self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + }} + #[inline] pub fn get_up_direction(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UpDirection)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SpatialPointerInteractionSourcePose: ISpatialPointerInteractionSourcePose} DEFINE_IID!(IID_ISpatialPointerInteractionSourcePose2, 3972892344, 21211, 18079, 158, 63, 128, 196, 127, 116, 188, 233); RT_INTERFACE!{interface ISpatialPointerInteractionSourcePose2(ISpatialPointerInteractionSourcePose2Vtbl): IInspectable(IInspectableVtbl) [IID_ISpatialPointerInteractionSourcePose2] { - fn get_Orientation(&self, out: *mut ::rt::gen::windows::foundation::numerics::Quaternion) -> HRESULT, + fn get_Orientation(&self, out: *mut foundation::numerics::Quaternion) -> HRESULT, fn get_PositionAccuracy(&self, out: *mut SpatialInteractionSourcePositionAccuracy) -> HRESULT }} impl ISpatialPointerInteractionSourcePose2 { - #[inline] pub unsafe fn get_orientation(&self) -> Result<::rt::gen::windows::foundation::numerics::Quaternion> { + #[inline] pub fn get_orientation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Orientation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_position_accuracy(&self) -> Result { + }} + #[inline] pub fn get_position_accuracy(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PositionAccuracy)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ISpatialPointerPose, 1767089198, 49534, 13693, 151, 161, 114, 105, 208, 237, 45, 16); RT_INTERFACE!{interface ISpatialPointerPose(ISpatialPointerPoseVtbl): IInspectable(IInspectableVtbl) [IID_ISpatialPointerPose] { @@ -6279,23 +6279,23 @@ RT_INTERFACE!{interface ISpatialPointerPose(ISpatialPointerPoseVtbl): IInspectab #[cfg(feature="windows-perception")] fn get_Head(&self, out: *mut *mut ::rt::gen::windows::perception::people::HeadPose) -> HRESULT }} impl ISpatialPointerPose { - #[cfg(feature="windows-perception")] #[inline] pub unsafe fn get_timestamp(&self) -> Result> { + #[cfg(feature="windows-perception")] #[inline] pub fn get_timestamp(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Timestamp)(self 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 get_head(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-perception")] #[inline] pub fn get_head(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Head)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SpatialPointerPose: ISpatialPointerPose} impl RtActivatable for SpatialPointerPose {} impl SpatialPointerPose { - #[cfg(feature="windows-perception")] #[inline] pub fn try_get_at_timestamp(coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, timestamp: &::rt::gen::windows::perception::PerceptionTimestamp) -> Result> { unsafe { + #[cfg(feature="windows-perception")] #[inline] pub fn try_get_at_timestamp(coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, timestamp: &::rt::gen::windows::perception::PerceptionTimestamp) -> Result>> { >::get_activation_factory().try_get_at_timestamp(coordinateSystem, timestamp) - }} + } } DEFINE_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]) [CLSID_SpatialPointerPose]); DEFINE_IID!(IID_ISpatialPointerPose2, 2636131095, 38222, 19980, 150, 209, 182, 121, 11, 111, 194, 253); @@ -6303,33 +6303,33 @@ RT_INTERFACE!{interface ISpatialPointerPose2(ISpatialPointerPose2Vtbl): IInspect fn TryGetInteractionSourcePose(&self, source: *mut SpatialInteractionSource, out: *mut *mut SpatialPointerInteractionSourcePose) -> HRESULT }} impl ISpatialPointerPose2 { - #[inline] pub unsafe fn try_get_interaction_source_pose(&self, source: &SpatialInteractionSource) -> Result> { + #[inline] pub fn try_get_interaction_source_pose(&self, source: &SpatialInteractionSource) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetInteractionSourcePose)(self as *const _ as *mut _, source as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&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(&self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, timestamp: &::rt::gen::windows::perception::PerceptionTimestamp) -> Result> { + #[cfg(feature="windows-perception")] #[inline] pub fn try_get_at_timestamp(&self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem, timestamp: &::rt::gen::windows::perception::PerceptionTimestamp) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetAtTimestamp)(self as *const _ as *mut _, coordinateSystem as *const _ as *mut _, timestamp as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut SpatialInteractionSourceKind) -> HRESULT }} impl ISpatialRecognitionEndedEventArgs { - #[inline] pub unsafe fn get_interaction_source_kind(&self) -> Result { + #[inline] pub fn get_interaction_source_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InteractionSourceKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SpatialRecognitionEndedEventArgs: ISpatialRecognitionEndedEventArgs} DEFINE_IID!(IID_ISpatialRecognitionStartedEventArgs, 618271375, 8, 19053, 170, 80, 42, 118, 249, 207, 178, 100); @@ -6340,21 +6340,21 @@ RT_INTERFACE!{interface ISpatialRecognitionStartedEventArgs(ISpatialRecognitionS fn IsGesturePossible(&self, gesture: SpatialGestureSettings, out: *mut bool) -> HRESULT }} impl ISpatialRecognitionStartedEventArgs { - #[inline] pub unsafe fn get_interaction_source_kind(&self) -> Result { + #[inline] pub fn get_interaction_source_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InteractionSourceKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-perception")] #[inline] pub unsafe fn try_get_pointer_pose(&self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result> { + }} + #[cfg(feature="windows-perception")] #[inline] pub fn try_get_pointer_pose(&self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetPointerPose)(self 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 is_gesture_possible(&self, gesture: SpatialGestureSettings) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn is_gesture_possible(&self, gesture: SpatialGestureSettings) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsGesturePossible)(self as *const _ as *mut _, gesture, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SpatialRecognitionStartedEventArgs: ISpatialRecognitionStartedEventArgs} DEFINE_IID!(IID_ISpatialTappedEventArgs, 695043038, 62532, 19105, 178, 191, 157, 200, 141, 86, 125, 166); @@ -6365,21 +6365,21 @@ RT_INTERFACE!{interface ISpatialTappedEventArgs(ISpatialTappedEventArgsVtbl): II fn get_TapCount(&self, out: *mut u32) -> HRESULT }} impl ISpatialTappedEventArgs { - #[inline] pub unsafe fn get_interaction_source_kind(&self) -> Result { + #[inline] pub fn get_interaction_source_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InteractionSourceKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-perception")] #[inline] pub unsafe fn try_get_pointer_pose(&self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result> { + }} + #[cfg(feature="windows-perception")] #[inline] pub fn try_get_pointer_pose(&self, coordinateSystem: &::rt::gen::windows::perception::spatial::SpatialCoordinateSystem) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryGetPointerPose)(self 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 get_tap_count(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_tap_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TapCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SpatialTappedEventArgs: ISpatialTappedEventArgs} } // Windows.UI.Input.Spatial @@ -6391,23 +6391,23 @@ RT_INTERFACE!{interface IRadialControllerIndependentInputSource(IRadialControlle fn get_Dispatcher(&self, out: *mut *mut super::super::core::CoreDispatcher) -> HRESULT }} impl IRadialControllerIndependentInputSource { - #[inline] pub unsafe fn get_controller(&self) -> Result> { + #[inline] pub fn get_controller(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Controller)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_dispatcher(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_dispatcher(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Dispatcher)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RadialControllerIndependentInputSource: IRadialControllerIndependentInputSource} impl RtActivatable for RadialControllerIndependentInputSource {} impl RadialControllerIndependentInputSource { - #[cfg(feature="windows-applicationmodel")] #[inline] pub fn create_for_view(view: &::rt::gen::windows::applicationmodel::core::CoreApplicationView) -> Result> { unsafe { + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn create_for_view(view: &::rt::gen::windows::applicationmodel::core::CoreApplicationView) -> Result>> { >::get_activation_factory().create_for_view(view) - }} + } } DEFINE_CLSID!(RadialControllerIndependentInputSource(&[87,105,110,100,111,119,115,46,85,73,46,73,110,112,117,116,46,67,111,114,101,46,82,97,100,105,97,108,67,111,110,116,114,111,108,108,101,114,73,110,100,101,112,101,110,100,101,110,116,73,110,112,117,116,83,111,117,114,99,101,0]) [CLSID_RadialControllerIndependentInputSource]); DEFINE_IID!(IID_IRadialControllerIndependentInputSourceStatics, 1029144309, 19694, 4582, 181, 53, 0, 27, 220, 6, 171, 59); @@ -6415,11 +6415,11 @@ RT_INTERFACE!{static interface IRadialControllerIndependentInputSourceStatics(IR #[cfg(feature="windows-applicationmodel")] fn CreateForView(&self, view: *mut ::rt::gen::windows::applicationmodel::core::CoreApplicationView, out: *mut *mut RadialControllerIndependentInputSource) -> HRESULT }} impl IRadialControllerIndependentInputSourceStatics { - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn create_for_view(&self, view: &::rt::gen::windows::applicationmodel::core::CoreApplicationView) -> Result> { + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn create_for_view(&self, view: &::rt::gen::windows::applicationmodel::core::CoreApplicationView) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateForView)(self as *const _ as *mut _, view as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } } // Windows.UI.Input.Core pub mod inking { // Windows.UI.Input.Inking @@ -6430,95 +6430,95 @@ RT_INTERFACE!{interface IInkDrawingAttributes(IInkDrawingAttributesVtbl): IInspe fn put_Color(&self, value: super::super::Color) -> HRESULT, fn get_PenTip(&self, out: *mut PenTipShape) -> HRESULT, fn put_PenTip(&self, value: PenTipShape) -> HRESULT, - fn get_Size(&self, out: *mut ::rt::gen::windows::foundation::Size) -> HRESULT, - fn put_Size(&self, value: ::rt::gen::windows::foundation::Size) -> HRESULT, + fn get_Size(&self, out: *mut foundation::Size) -> HRESULT, + fn put_Size(&self, value: foundation::Size) -> HRESULT, fn get_IgnorePressure(&self, out: *mut bool) -> HRESULT, fn put_IgnorePressure(&self, value: bool) -> HRESULT, fn get_FitToCurve(&self, out: *mut bool) -> HRESULT, fn put_FitToCurve(&self, value: bool) -> HRESULT }} impl IInkDrawingAttributes { - #[inline] pub unsafe fn get_color(&self) -> Result { + #[inline] pub fn get_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Color)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_color(&self, value: super::super::Color) -> Result<()> { + }} + #[inline] pub fn set_color(&self, value: super::super::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Color)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_pen_tip(&self) -> Result { + }} + #[inline] pub fn get_pen_tip(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PenTip)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_pen_tip(&self, value: PenTipShape) -> Result<()> { + }} + #[inline] pub fn set_pen_tip(&self, value: PenTipShape) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PenTip)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_size(&self) -> Result<::rt::gen::windows::foundation::Size> { + }} + #[inline] pub fn get_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Size)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_size(&self, value: ::rt::gen::windows::foundation::Size) -> Result<()> { + }} + #[inline] pub fn set_size(&self, value: foundation::Size) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Size)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_ignore_pressure(&self) -> Result { + }} + #[inline] pub fn get_ignore_pressure(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IgnorePressure)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_ignore_pressure(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_ignore_pressure(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IgnorePressure)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_fit_to_curve(&self) -> Result { + }} + #[inline] pub fn get_fit_to_curve(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FitToCurve)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_fit_to_curve(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_fit_to_curve(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FitToCurve)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class InkDrawingAttributes: IInkDrawingAttributes} impl RtActivatable for InkDrawingAttributes {} impl RtActivatable for InkDrawingAttributes {} impl InkDrawingAttributes { - #[inline] pub fn create_for_pencil() -> Result> { unsafe { + #[inline] pub fn create_for_pencil() -> Result>> { >::get_activation_factory().create_for_pencil() - }} + } } DEFINE_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]) [CLSID_InkDrawingAttributes]); 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(&self, out: *mut ::rt::gen::windows::foundation::numerics::Matrix3x2) -> HRESULT, - fn put_PenTipTransform(&self, value: ::rt::gen::windows::foundation::numerics::Matrix3x2) -> HRESULT, + fn get_PenTipTransform(&self, out: *mut foundation::numerics::Matrix3x2) -> HRESULT, + fn put_PenTipTransform(&self, value: foundation::numerics::Matrix3x2) -> HRESULT, fn get_DrawAsHighlighter(&self, out: *mut bool) -> HRESULT, fn put_DrawAsHighlighter(&self, value: bool) -> HRESULT }} impl IInkDrawingAttributes2 { - #[inline] pub unsafe fn get_pen_tip_transform(&self) -> Result<::rt::gen::windows::foundation::numerics::Matrix3x2> { + #[inline] pub fn get_pen_tip_transform(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PenTipTransform)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_pen_tip_transform(&self, value: ::rt::gen::windows::foundation::numerics::Matrix3x2) -> Result<()> { + }} + #[inline] pub fn set_pen_tip_transform(&self, value: foundation::numerics::Matrix3x2) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PenTipTransform)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_draw_as_highlighter(&self) -> Result { + }} + #[inline] pub fn get_draw_as_highlighter(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DrawAsHighlighter)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_draw_as_highlighter(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_draw_as_highlighter(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DrawAsHighlighter)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IInkDrawingAttributes3, 1912733698, 32091, 18064, 138, 244, 230, 100, 203, 226, 183, 79); RT_INTERFACE!{interface IInkDrawingAttributes3(IInkDrawingAttributes3Vtbl): IInspectable(IInspectableVtbl) [IID_IInkDrawingAttributes3] { @@ -6526,16 +6526,16 @@ RT_INTERFACE!{interface IInkDrawingAttributes3(IInkDrawingAttributes3Vtbl): IIns fn get_PencilProperties(&self, out: *mut *mut InkDrawingAttributesPencilProperties) -> HRESULT }} impl IInkDrawingAttributes3 { - #[inline] pub unsafe fn get_kind(&self) -> Result { + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pencil_properties(&self) -> Result> { + }} + #[inline] pub fn get_pencil_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PencilProperties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IInkDrawingAttributes4, 4016430117, 40729, 17773, 145, 163, 188, 58, 61, 145, 197, 251); RT_INTERFACE!{interface IInkDrawingAttributes4(IInkDrawingAttributes4Vtbl): IInspectable(IInspectableVtbl) [IID_IInkDrawingAttributes4] { @@ -6543,15 +6543,15 @@ RT_INTERFACE!{interface IInkDrawingAttributes4(IInkDrawingAttributes4Vtbl): IIns fn put_IgnoreTilt(&self, value: bool) -> HRESULT }} impl IInkDrawingAttributes4 { - #[inline] pub unsafe fn get_ignore_tilt(&self) -> Result { + #[inline] pub fn get_ignore_tilt(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IgnoreTilt)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_ignore_tilt(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_ignore_tilt(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IgnoreTilt)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum InkDrawingAttributesKind: i32 { Default (InkDrawingAttributesKind_Default) = 0, Pencil (InkDrawingAttributesKind_Pencil) = 1, @@ -6562,15 +6562,15 @@ RT_INTERFACE!{interface IInkDrawingAttributesPencilProperties(IInkDrawingAttribu fn put_Opacity(&self, value: f64) -> HRESULT }} impl IInkDrawingAttributesPencilProperties { - #[inline] pub unsafe fn get_opacity(&self) -> Result { + #[inline] pub fn get_opacity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Opacity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_opacity(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_opacity(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Opacity)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class InkDrawingAttributesPencilProperties: IInkDrawingAttributesPencilProperties} DEFINE_IID!(IID_IInkDrawingAttributesStatics, 4147241023, 6757, 18530, 150, 203, 110, 22, 101, 225, 127, 109); @@ -6578,11 +6578,11 @@ RT_INTERFACE!{static interface IInkDrawingAttributesStatics(IInkDrawingAttribute fn CreateForPencil(&self, out: *mut *mut InkDrawingAttributes) -> HRESULT }} impl IInkDrawingAttributesStatics { - #[inline] pub unsafe fn create_for_pencil(&self) -> Result> { + #[inline] pub fn create_for_pencil(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateForPencil)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum InkHighContrastAdjustment: i32 { UseSystemColorsWhenNecessary (InkHighContrastAdjustment_UseSystemColorsWhenNecessary) = 0, UseSystemColors (InkHighContrastAdjustment_UseSystemColors) = 1, UseOriginalColors (InkHighContrastAdjustment_UseOriginalColors) = 2, @@ -6595,24 +6595,24 @@ RT_INTERFACE!{interface IInkInputProcessingConfiguration(IInkInputProcessingConf fn put_RightDragAction(&self, value: InkInputRightDragAction) -> HRESULT }} impl IInkInputProcessingConfiguration { - #[inline] pub unsafe fn get_mode(&self) -> Result { + #[inline] pub fn get_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Mode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_mode(&self, value: InkInputProcessingMode) -> Result<()> { + }} + #[inline] pub fn set_mode(&self, value: InkInputProcessingMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Mode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_right_drag_action(&self) -> Result { + }} + #[inline] pub fn get_right_drag_action(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RightDragAction)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_right_drag_action(&self, value: InkInputRightDragAction) -> Result<()> { + }} + #[inline] pub fn set_right_drag_action(&self, value: InkInputRightDragAction) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RightDragAction)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class InkInputProcessingConfiguration: IInkInputProcessingConfiguration} RT_ENUM! { enum InkInputProcessingMode: i32 { @@ -6627,43 +6627,43 @@ RT_INTERFACE!{interface IInkManager(IInkManagerVtbl): IInspectable(IInspectableV fn put_Mode(&self, value: InkManipulationMode) -> HRESULT, fn ProcessPointerDown(&self, pointerPoint: *mut super::PointerPoint) -> HRESULT, fn ProcessPointerUpdate(&self, pointerPoint: *mut super::PointerPoint, out: *mut *mut IInspectable) -> HRESULT, - fn ProcessPointerUp(&self, pointerPoint: *mut super::PointerPoint, out: *mut ::rt::gen::windows::foundation::Rect) -> HRESULT, + fn ProcessPointerUp(&self, pointerPoint: *mut super::PointerPoint, out: *mut foundation::Rect) -> HRESULT, fn SetDefaultDrawingAttributes(&self, drawingAttributes: *mut InkDrawingAttributes) -> HRESULT, - fn RecognizeAsync2(&self, recognitionTarget: InkRecognitionTarget, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT + fn RecognizeAsync2(&self, recognitionTarget: InkRecognitionTarget, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl IInkManager { - #[inline] pub unsafe fn get_mode(&self) -> Result { + #[inline] pub fn get_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Mode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_mode(&self, value: InkManipulationMode) -> Result<()> { + }} + #[inline] pub fn set_mode(&self, value: InkManipulationMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Mode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn process_pointer_down(&self, pointerPoint: &super::PointerPoint) -> Result<()> { + }} + #[inline] pub fn process_pointer_down(&self, pointerPoint: &super::PointerPoint) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ProcessPointerDown)(self as *const _ as *mut _, pointerPoint as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn process_pointer_update(&self, pointerPoint: &super::PointerPoint) -> Result> { + }} + #[inline] pub fn process_pointer_update(&self, pointerPoint: &super::PointerPoint) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ProcessPointerUpdate)(self as *const _ as *mut _, 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(&self, pointerPoint: &super::PointerPoint) -> Result<::rt::gen::windows::foundation::Rect> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn process_pointer_up(&self, pointerPoint: &super::PointerPoint) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ProcessPointerUp)(self as *const _ as *mut _, pointerPoint as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_default_drawing_attributes(&self, drawingAttributes: &InkDrawingAttributes) -> Result<()> { + }} + #[inline] pub fn set_default_drawing_attributes(&self, drawingAttributes: &InkDrawingAttributes) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetDefaultDrawingAttributes)(self as *const _ as *mut _, drawingAttributes as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn recognize_async2(&self, recognitionTarget: InkRecognitionTarget) -> Result>>> { + }} + #[inline] pub fn recognize_async2(&self, recognitionTarget: InkRecognitionTarget) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RecognizeAsync2)(self as *const _ as *mut _, recognitionTarget, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class InkManager: IInkManager} impl RtActivatable for InkManager {} @@ -6676,31 +6676,31 @@ RT_ENUM! { enum InkPersistenceFormat: i32 { }} 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(&self, out: *mut ::rt::gen::windows::foundation::Point) -> HRESULT, + fn get_Position(&self, out: *mut foundation::Point) -> HRESULT, fn get_Pressure(&self, out: *mut f32) -> HRESULT }} impl IInkPoint { - #[inline] pub unsafe fn get_position(&self) -> Result<::rt::gen::windows::foundation::Point> { + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pressure(&self) -> Result { + }} + #[inline] pub fn get_pressure(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Pressure)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class InkPoint: IInkPoint} impl RtActivatable for InkPoint {} impl RtActivatable for InkPoint {} impl InkPoint { - #[inline] pub fn create_ink_point(position: ::rt::gen::windows::foundation::Point, pressure: f32) -> Result> { unsafe { + #[inline] pub fn create_ink_point(position: foundation::Point, pressure: f32) -> Result> { >::get_activation_factory().create_ink_point(position, pressure) - }} - #[inline] pub fn create_ink_point_with_tilt_and_timestamp(position: ::rt::gen::windows::foundation::Point, pressure: f32, tiltX: f32, tiltY: f32, timestamp: u64) -> Result> { unsafe { + } + #[inline] pub fn create_ink_point_with_tilt_and_timestamp(position: foundation::Point, pressure: f32, tiltX: f32, tiltY: f32, timestamp: u64) -> Result> { >::get_activation_factory().create_ink_point_with_tilt_and_timestamp(position, pressure, tiltX, tiltY, timestamp) - }} + } } DEFINE_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]) [CLSID_InkPoint]); DEFINE_IID!(IID_IInkPoint2, 4222206967, 44630, 19804, 189, 47, 10, 196, 95, 94, 74, 249); @@ -6710,43 +6710,43 @@ RT_INTERFACE!{interface IInkPoint2(IInkPoint2Vtbl): IInspectable(IInspectableVtb fn get_Timestamp(&self, out: *mut u64) -> HRESULT }} impl IInkPoint2 { - #[inline] pub unsafe fn get_tilt_x(&self) -> Result { + #[inline] pub fn get_tilt_x(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TiltX)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_tilt_y(&self) -> Result { + }} + #[inline] pub fn get_tilt_y(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TiltY)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_timestamp(&self) -> Result { + }} + #[inline] pub fn get_timestamp(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Timestamp)(self as *const _ as *mut _, &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(&self, position: ::rt::gen::windows::foundation::Point, pressure: f32, out: *mut *mut InkPoint) -> HRESULT + fn CreateInkPoint(&self, position: foundation::Point, pressure: f32, out: *mut *mut InkPoint) -> HRESULT }} impl IInkPointFactory { - #[inline] pub unsafe fn create_ink_point(&self, position: ::rt::gen::windows::foundation::Point, pressure: f32) -> Result> { + #[inline] pub fn create_ink_point(&self, position: foundation::Point, pressure: f32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInkPoint)(self as *const _ as *mut _, position, pressure, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IInkPointFactory2, 3759431301, 56063, 17906, 173, 105, 5, 13, 130, 86, 162, 9); RT_INTERFACE!{static interface IInkPointFactory2(IInkPointFactory2Vtbl): IInspectable(IInspectableVtbl) [IID_IInkPointFactory2] { - fn CreateInkPointWithTiltAndTimestamp(&self, position: ::rt::gen::windows::foundation::Point, pressure: f32, tiltX: f32, tiltY: f32, timestamp: u64, out: *mut *mut InkPoint) -> HRESULT + fn CreateInkPointWithTiltAndTimestamp(&self, position: foundation::Point, pressure: f32, tiltX: f32, tiltY: f32, timestamp: u64, out: *mut *mut InkPoint) -> HRESULT }} impl IInkPointFactory2 { - #[inline] pub unsafe fn create_ink_point_with_tilt_and_timestamp(&self, position: ::rt::gen::windows::foundation::Point, pressure: f32, tiltX: f32, tiltY: f32, timestamp: u64) -> Result> { + #[inline] pub fn create_ink_point_with_tilt_and_timestamp(&self, position: foundation::Point, pressure: f32, tiltX: f32, tiltY: f32, timestamp: u64) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInkPointWithTiltAndTimestamp)(self as *const _ as *mut _, position, pressure, tiltX, tiltY, timestamp, &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] { @@ -6763,90 +6763,90 @@ RT_INTERFACE!{interface IInkPresenter(IInkPresenterVtbl): IInspectable(IInspecta fn UpdateDefaultDrawingAttributes(&self, value: *mut InkDrawingAttributes) -> HRESULT, fn ActivateCustomDrying(&self, out: *mut *mut InkSynchronizer) -> HRESULT, fn SetPredefinedConfiguration(&self, value: InkPresenterPredefinedConfiguration) -> HRESULT, - fn add_StrokesCollected(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StrokesCollected(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_StrokesErased(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StrokesErased(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn add_StrokesCollected(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StrokesCollected(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_StrokesErased(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StrokesErased(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl IInkPresenter { - #[inline] pub unsafe fn get_is_input_enabled(&self) -> Result { + #[inline] pub fn get_is_input_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsInputEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_input_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_input_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsInputEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_input_device_types(&self) -> Result { + }} + #[inline] pub fn get_input_device_types(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InputDeviceTypes)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_input_device_types(&self, value: super::super::core::CoreInputDeviceTypes) -> Result<()> { + }} + #[inline] pub fn set_input_device_types(&self, value: super::super::core::CoreInputDeviceTypes) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InputDeviceTypes)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_unprocessed_input(&self) -> Result> { + }} + #[inline] pub fn get_unprocessed_input(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UnprocessedInput)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_stroke_input(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_stroke_input(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StrokeInput)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_input_processing_configuration(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_input_processing_configuration(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InputProcessingConfiguration)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_stroke_container(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_stroke_container(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StrokeContainer)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_stroke_container(&self, value: &InkStrokeContainer) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_stroke_container(&self, value: &InkStrokeContainer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StrokeContainer)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn copy_default_drawing_attributes(&self) -> Result> { + }} + #[inline] pub fn copy_default_drawing_attributes(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CopyDefaultDrawingAttributes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn update_default_drawing_attributes(&self, value: &InkDrawingAttributes) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn update_default_drawing_attributes(&self, value: &InkDrawingAttributes) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).UpdateDefaultDrawingAttributes)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn activate_custom_drying(&self) -> Result> { + }} + #[inline] pub fn activate_custom_drying(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ActivateCustomDrying)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_predefined_configuration(&self, value: InkPresenterPredefinedConfiguration) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_predefined_configuration(&self, value: InkPresenterPredefinedConfiguration) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetPredefinedConfiguration)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_strokes_collected(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_strokes_collected(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StrokesCollected)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_strokes_collected(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_strokes_collected(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StrokesCollected)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_strokes_erased(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_strokes_erased(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StrokesErased)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_strokes_erased(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_strokes_erased(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StrokesErased)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class InkPresenter: IInkPresenter} DEFINE_IID!(IID_IInkPresenter2, 3478382098, 39476, 4582, 159, 51, 162, 79, 192, 217, 100, 156); @@ -6855,15 +6855,15 @@ RT_INTERFACE!{interface IInkPresenter2(IInkPresenter2Vtbl): IInspectable(IInspec fn put_HighContrastAdjustment(&self, value: InkHighContrastAdjustment) -> HRESULT }} impl IInkPresenter2 { - #[inline] pub unsafe fn get_high_contrast_adjustment(&self) -> Result { + #[inline] pub fn get_high_contrast_adjustment(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HighContrastAdjustment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_high_contrast_adjustment(&self, value: InkHighContrastAdjustment) -> Result<()> { + }} + #[inline] pub fn set_high_contrast_adjustment(&self, value: InkHighContrastAdjustment) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_HighContrastAdjustment)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum InkPresenterPredefinedConfiguration: i32 { SimpleSinglePointer (InkPresenterPredefinedConfiguration_SimpleSinglePointer) = 0, SimpleMultiplePointer (InkPresenterPredefinedConfiguration_SimpleMultiplePointer) = 1, @@ -6886,76 +6886,76 @@ RT_INTERFACE!{interface IInkPresenterProtractor(IInkPresenterProtractorVtbl): II fn put_AccentColor(&self, value: super::super::Color) -> HRESULT }} impl IInkPresenterProtractor { - #[inline] pub unsafe fn get_are_tick_marks_visible(&self) -> Result { + #[inline] pub fn get_are_tick_marks_visible(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AreTickMarksVisible)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_are_tick_marks_visible(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_are_tick_marks_visible(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AreTickMarksVisible)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_are_rays_visible(&self) -> Result { + }} + #[inline] pub fn get_are_rays_visible(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AreRaysVisible)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_are_rays_visible(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_are_rays_visible(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AreRaysVisible)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_center_marker_visible(&self) -> Result { + }} + #[inline] pub fn get_is_center_marker_visible(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCenterMarkerVisible)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_center_marker_visible(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_center_marker_visible(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsCenterMarkerVisible)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_angle_readout_visible(&self) -> Result { + }} + #[inline] pub fn get_is_angle_readout_visible(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsAngleReadoutVisible)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_angle_readout_visible(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_angle_readout_visible(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsAngleReadoutVisible)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_resizable(&self) -> Result { + }} + #[inline] pub fn get_is_resizable(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsResizable)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_resizable(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_resizable(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsResizable)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_radius(&self) -> Result { + }} + #[inline] pub fn get_radius(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Radius)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_radius(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_radius(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Radius)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_accent_color(&self) -> Result { + }} + #[inline] pub fn get_accent_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AccentColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_accent_color(&self, value: super::super::Color) -> Result<()> { + }} + #[inline] pub fn set_accent_color(&self, value: super::super::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AccentColor)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class InkPresenterProtractor: IInkPresenterProtractor} impl RtActivatable for InkPresenterProtractor {} impl InkPresenterProtractor { - #[inline] pub fn create(inkPresenter: &InkPresenter) -> Result> { unsafe { + #[inline] pub fn create(inkPresenter: &InkPresenter) -> Result> { >::get_activation_factory().create(inkPresenter) - }} + } } DEFINE_CLSID!(InkPresenterProtractor(&[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,80,114,111,116,114,97,99,116,111,114,0]) [CLSID_InkPresenterProtractor]); DEFINE_IID!(IID_IInkPresenterProtractorFactory, 838927305, 26874, 18409, 129, 39, 131, 112, 113, 31, 196, 108); @@ -6963,11 +6963,11 @@ RT_INTERFACE!{static interface IInkPresenterProtractorFactory(IInkPresenterProtr fn Create(&self, inkPresenter: *mut InkPresenter, out: *mut *mut InkPresenterProtractor) -> HRESULT }} impl IInkPresenterProtractorFactory { - #[inline] pub unsafe fn create(&self, inkPresenter: &InkPresenter) -> Result> { + #[inline] pub fn create(&self, inkPresenter: &InkPresenter) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, inkPresenter as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } 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] { @@ -6977,31 +6977,31 @@ RT_INTERFACE!{interface IInkPresenterRuler(IInkPresenterRulerVtbl): IInspectable fn put_Width(&self, value: f64) -> HRESULT }} impl IInkPresenterRuler { - #[inline] pub unsafe fn get_length(&self) -> Result { + #[inline] pub fn get_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Length)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_length(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_length(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Length)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_width(&self) -> Result { + }} + #[inline] pub fn get_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Width)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_width(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_width(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Width)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class InkPresenterRuler: IInkPresenterRuler} impl RtActivatable for InkPresenterRuler {} impl InkPresenterRuler { - #[inline] pub fn create(inkPresenter: &InkPresenter) -> Result> { unsafe { + #[inline] pub fn create(inkPresenter: &InkPresenter) -> Result> { >::get_activation_factory().create(inkPresenter) - }} + } } DEFINE_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]) [CLSID_InkPresenterRuler]); DEFINE_IID!(IID_IInkPresenterRuler2, 1158876609, 48225, 17620, 164, 35, 84, 113, 42, 230, 113, 196); @@ -7012,35 +7012,35 @@ RT_INTERFACE!{interface IInkPresenterRuler2(IInkPresenterRuler2Vtbl): IInspectab fn put_IsCompassVisible(&self, value: bool) -> HRESULT }} impl IInkPresenterRuler2 { - #[inline] pub unsafe fn get_are_tick_marks_visible(&self) -> Result { + #[inline] pub fn get_are_tick_marks_visible(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AreTickMarksVisible)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_are_tick_marks_visible(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_are_tick_marks_visible(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AreTickMarksVisible)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_compass_visible(&self) -> Result { + }} + #[inline] pub fn get_is_compass_visible(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCompassVisible)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_compass_visible(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_compass_visible(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsCompassVisible)(self as *const _ as *mut _, 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(&self, inkPresenter: *mut InkPresenter, out: *mut *mut InkPresenterRuler) -> HRESULT }} impl IInkPresenterRulerFactory { - #[inline] pub unsafe fn create(&self, inkPresenter: &InkPresenter) -> Result> { + #[inline] pub fn create(&self, inkPresenter: &InkPresenter) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, inkPresenter as *const _ as *mut _, &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] { @@ -7051,77 +7051,77 @@ RT_INTERFACE!{interface IInkPresenterStencil(IInkPresenterStencilVtbl): IInspect fn put_BackgroundColor(&self, value: super::super::Color) -> HRESULT, fn get_ForegroundColor(&self, out: *mut super::super::Color) -> HRESULT, fn put_ForegroundColor(&self, value: super::super::Color) -> HRESULT, - fn get_Transform(&self, out: *mut ::rt::gen::windows::foundation::numerics::Matrix3x2) -> HRESULT, - fn put_Transform(&self, value: ::rt::gen::windows::foundation::numerics::Matrix3x2) -> HRESULT + fn get_Transform(&self, out: *mut foundation::numerics::Matrix3x2) -> HRESULT, + fn put_Transform(&self, value: foundation::numerics::Matrix3x2) -> HRESULT }} impl IInkPresenterStencil { - #[inline] pub unsafe fn get_kind(&self) -> Result { + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_visible(&self) -> Result { + }} + #[inline] pub fn get_is_visible(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsVisible)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_visible(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_visible(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsVisible)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_background_color(&self) -> Result { + }} + #[inline] pub fn get_background_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BackgroundColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_background_color(&self, value: super::super::Color) -> Result<()> { + }} + #[inline] pub fn set_background_color(&self, value: super::super::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BackgroundColor)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_foreground_color(&self) -> Result { + }} + #[inline] pub fn get_foreground_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ForegroundColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_foreground_color(&self, value: super::super::Color) -> Result<()> { + }} + #[inline] pub fn set_foreground_color(&self, value: super::super::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ForegroundColor)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_transform(&self) -> Result<::rt::gen::windows::foundation::numerics::Matrix3x2> { + }} + #[inline] pub fn get_transform(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Transform)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_transform(&self, value: ::rt::gen::windows::foundation::numerics::Matrix3x2) -> Result<()> { + }} + #[inline] pub fn set_transform(&self, value: foundation::numerics::Matrix3x2) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Transform)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum InkPresenterStencilKind: i32 { Other (InkPresenterStencilKind_Other) = 0, Ruler (InkPresenterStencilKind_Ruler) = 1, Protractor (InkPresenterStencilKind_Protractor) = 2, }} 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(&self, out: *mut ::rt::gen::windows::foundation::Rect) -> HRESULT, - fn GetTextCandidates(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn GetStrokes(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn get_BoundingRect(&self, out: *mut foundation::Rect) -> HRESULT, + fn GetTextCandidates(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn GetStrokes(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IInkRecognitionResult { - #[inline] pub unsafe fn get_bounding_rect(&self) -> Result<::rt::gen::windows::foundation::Rect> { + #[inline] pub fn get_bounding_rect(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BoundingRect)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_text_candidates(&self) -> Result>> { + }} + #[inline] pub fn get_text_candidates(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetTextCandidates)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_strokes(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_strokes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetStrokes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class InkRecognitionResult: IInkRecognitionResult} RT_ENUM! { enum InkRecognitionTarget: i32 { @@ -7132,34 +7132,34 @@ RT_INTERFACE!{interface IInkRecognizer(IInkRecognizerVtbl): IInspectable(IInspec fn get_Name(&self, out: *mut HSTRING) -> HRESULT }} impl IInkRecognizer { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &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(&self, recognizer: *mut InkRecognizer) -> HRESULT, - fn RecognizeAsync(&self, strokeCollection: *mut InkStrokeContainer, recognitionTarget: InkRecognitionTarget, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, - fn GetRecognizers(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn RecognizeAsync(&self, strokeCollection: *mut InkStrokeContainer, recognitionTarget: InkRecognitionTarget, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetRecognizers(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IInkRecognizerContainer { - #[inline] pub unsafe fn set_default_recognizer(&self, recognizer: &InkRecognizer) -> Result<()> { + #[inline] pub fn set_default_recognizer(&self, recognizer: &InkRecognizer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetDefaultRecognizer)(self as *const _ as *mut _, recognizer as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn recognize_async(&self, strokeCollection: &InkStrokeContainer, recognitionTarget: InkRecognitionTarget) -> Result>>> { + }} + #[inline] pub fn recognize_async(&self, strokeCollection: &InkStrokeContainer, recognitionTarget: InkRecognitionTarget) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RecognizeAsync)(self as *const _ as *mut _, 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(&self) -> Result>> { + }} + #[inline] pub fn get_recognizers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetRecognizers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class InkRecognizerContainer: IInkRecognizerContainer} impl RtActivatable for InkRecognizerContainer {} @@ -7168,523 +7168,523 @@ DEFINE_IID!(IID_IInkStroke, 353652064, 52451, 20431, 157, 82, 17, 81, 138, 182, RT_INTERFACE!{interface IInkStroke(IInkStrokeVtbl): IInspectable(IInspectableVtbl) [IID_IInkStroke] { fn get_DrawingAttributes(&self, out: *mut *mut InkDrawingAttributes) -> HRESULT, fn put_DrawingAttributes(&self, value: *mut InkDrawingAttributes) -> HRESULT, - fn get_BoundingRect(&self, out: *mut ::rt::gen::windows::foundation::Rect) -> HRESULT, + fn get_BoundingRect(&self, out: *mut foundation::Rect) -> HRESULT, fn get_Selected(&self, out: *mut bool) -> HRESULT, fn put_Selected(&self, value: bool) -> HRESULT, fn get_Recognized(&self, out: *mut bool) -> HRESULT, - fn GetRenderingSegments(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn GetRenderingSegments(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn Clone(&self, out: *mut *mut InkStroke) -> HRESULT }} impl IInkStroke { - #[inline] pub unsafe fn get_drawing_attributes(&self) -> Result> { + #[inline] pub fn get_drawing_attributes(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DrawingAttributes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_drawing_attributes(&self, value: &InkDrawingAttributes) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_drawing_attributes(&self, value: &InkDrawingAttributes) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DrawingAttributes)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_bounding_rect(&self) -> Result<::rt::gen::windows::foundation::Rect> { + }} + #[inline] pub fn get_bounding_rect(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BoundingRect)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_selected(&self) -> Result { + }} + #[inline] pub fn get_selected(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Selected)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_selected(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_selected(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Selected)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_recognized(&self) -> Result { + }} + #[inline] pub fn get_recognized(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Recognized)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_rendering_segments(&self) -> Result>> { + }} + #[inline] pub fn get_rendering_segments(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetRenderingSegments)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn clone(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn clone(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Clone)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut ::rt::gen::windows::foundation::numerics::Matrix3x2) -> HRESULT, - fn put_PointTransform(&self, value: ::rt::gen::windows::foundation::numerics::Matrix3x2) -> HRESULT, - fn GetInkPoints(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn get_PointTransform(&self, out: *mut foundation::numerics::Matrix3x2) -> HRESULT, + fn put_PointTransform(&self, value: foundation::numerics::Matrix3x2) -> HRESULT, + fn GetInkPoints(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IInkStroke2 { - #[inline] pub unsafe fn get_point_transform(&self) -> Result<::rt::gen::windows::foundation::numerics::Matrix3x2> { + #[inline] pub fn get_point_transform(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PointTransform)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_point_transform(&self, value: ::rt::gen::windows::foundation::numerics::Matrix3x2) -> Result<()> { + }} + #[inline] pub fn set_point_transform(&self, value: foundation::numerics::Matrix3x2) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PointTransform)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_ink_points(&self) -> Result>> { + }} + #[inline] pub fn get_ink_points(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetInkPoints)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IInkStroke3, 1249932148, 38041, 16669, 161, 196, 104, 133, 93, 3, 214, 95); RT_INTERFACE!{interface IInkStroke3(IInkStroke3Vtbl): IInspectable(IInspectableVtbl) [IID_IInkStroke3] { fn get_Id(&self, out: *mut u32) -> HRESULT, - fn get_StrokeStartedTime(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::DateTime>) -> HRESULT, - fn put_StrokeStartedTime(&self, value: *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::DateTime>) -> HRESULT, - fn get_StrokeDuration(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::TimeSpan>) -> HRESULT, - fn put_StrokeDuration(&self, value: *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::TimeSpan>) -> HRESULT + fn get_StrokeStartedTime(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_StrokeStartedTime(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_StrokeDuration(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_StrokeDuration(&self, value: *mut foundation::IReference) -> HRESULT }} impl IInkStroke3 { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_stroke_started_time(&self) -> Result>> { + }} + #[inline] pub fn get_stroke_started_time(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StrokeStartedTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_stroke_started_time(&self, value: &::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::DateTime>) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_stroke_started_time(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StrokeStartedTime)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_stroke_duration(&self) -> Result>> { + }} + #[inline] pub fn get_stroke_duration(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StrokeDuration)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_stroke_duration(&self, value: &::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::TimeSpan>) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_stroke_duration(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StrokeDuration)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } 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(&self, pointerPoint: *mut super::PointerPoint) -> HRESULT, fn AppendToStroke(&self, pointerPoint: *mut super::PointerPoint, out: *mut *mut super::PointerPoint) -> HRESULT, fn EndStroke(&self, pointerPoint: *mut super::PointerPoint, out: *mut *mut InkStroke) -> HRESULT, - fn CreateStroke(&self, points: *mut ::rt::gen::windows::foundation::collections::IIterable<::rt::gen::windows::foundation::Point>, out: *mut *mut InkStroke) -> HRESULT, + fn CreateStroke(&self, points: *mut foundation::collections::IIterable, out: *mut *mut InkStroke) -> HRESULT, fn SetDefaultDrawingAttributes(&self, drawingAttributes: *mut InkDrawingAttributes) -> HRESULT }} impl IInkStrokeBuilder { - #[inline] pub unsafe fn begin_stroke(&self, pointerPoint: &super::PointerPoint) -> Result<()> { + #[inline] pub fn begin_stroke(&self, pointerPoint: &super::PointerPoint) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).BeginStroke)(self as *const _ as *mut _, pointerPoint as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn append_to_stroke(&self, pointerPoint: &super::PointerPoint) -> Result> { + }} + #[inline] pub fn append_to_stroke(&self, pointerPoint: &super::PointerPoint) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AppendToStroke)(self as *const _ as *mut _, pointerPoint as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn end_stroke(&self, pointerPoint: &super::PointerPoint) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn end_stroke(&self, pointerPoint: &super::PointerPoint) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).EndStroke)(self as *const _ as *mut _, pointerPoint as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_stroke(&self, points: &::rt::gen::windows::foundation::collections::IIterable<::rt::gen::windows::foundation::Point>) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_stroke(&self, points: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateStroke)(self as *const _ as *mut _, 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(&self, drawingAttributes: &InkDrawingAttributes) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_default_drawing_attributes(&self, drawingAttributes: &InkDrawingAttributes) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetDefaultDrawingAttributes)(self as *const _ as *mut _, drawingAttributes as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class InkStrokeBuilder: IInkStrokeBuilder} impl RtActivatable for InkStrokeBuilder {} DEFINE_CLSID!(InkStrokeBuilder(&[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,83,116,114,111,107,101,66,117,105,108,100,101,114,0]) [CLSID_InkStrokeBuilder]); 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(&self, inkPoints: *mut ::rt::gen::windows::foundation::collections::IIterable, transform: ::rt::gen::windows::foundation::numerics::Matrix3x2, out: *mut *mut InkStroke) -> HRESULT + fn CreateStrokeFromInkPoints(&self, inkPoints: *mut foundation::collections::IIterable, transform: foundation::numerics::Matrix3x2, out: *mut *mut InkStroke) -> HRESULT }} impl IInkStrokeBuilder2 { - #[inline] pub unsafe fn create_stroke_from_ink_points(&self, inkPoints: &::rt::gen::windows::foundation::collections::IIterable, transform: ::rt::gen::windows::foundation::numerics::Matrix3x2) -> Result> { + #[inline] pub fn create_stroke_from_ink_points(&self, inkPoints: &foundation::collections::IIterable, transform: foundation::numerics::Matrix3x2) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateStrokeFromInkPoints)(self as *const _ as *mut _, inkPoints as *const _ as *mut _, transform, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IInkStrokeBuilder3, 2999394253, 21618, 18097, 168, 29, 195, 122, 61, 22, 148, 65); RT_INTERFACE!{interface IInkStrokeBuilder3(IInkStrokeBuilder3Vtbl): IInspectable(IInspectableVtbl) [IID_IInkStrokeBuilder3] { - fn CreateStrokeFromInkPoints(&self, inkPoints: *mut ::rt::gen::windows::foundation::collections::IIterable, transform: ::rt::gen::windows::foundation::numerics::Matrix3x2, strokeStartedTime: *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::DateTime>, strokeDuration: *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::TimeSpan>, out: *mut *mut InkStroke) -> HRESULT + fn CreateStrokeFromInkPoints(&self, inkPoints: *mut foundation::collections::IIterable, transform: foundation::numerics::Matrix3x2, strokeStartedTime: *mut foundation::IReference, strokeDuration: *mut foundation::IReference, out: *mut *mut InkStroke) -> HRESULT }} impl IInkStrokeBuilder3 { - #[inline] pub unsafe fn create_stroke_from_ink_points(&self, inkPoints: &::rt::gen::windows::foundation::collections::IIterable, transform: ::rt::gen::windows::foundation::numerics::Matrix3x2, strokeStartedTime: &::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::DateTime>, strokeDuration: &::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::TimeSpan>) -> Result> { + #[inline] pub fn create_stroke_from_ink_points(&self, inkPoints: &foundation::collections::IIterable, transform: foundation::numerics::Matrix3x2, strokeStartedTime: &foundation::IReference, strokeDuration: &foundation::IReference) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateStrokeFromInkPoints)(self as *const _ as *mut _, inkPoints as *const _ as *mut _, transform, strokeStartedTime as *const _ as *mut _, strokeDuration as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut ::rt::gen::windows::foundation::Rect) -> HRESULT, + fn get_BoundingRect(&self, out: *mut foundation::Rect) -> HRESULT, fn AddStroke(&self, stroke: *mut InkStroke) -> HRESULT, - fn DeleteSelected(&self, out: *mut ::rt::gen::windows::foundation::Rect) -> HRESULT, - fn MoveSelected(&self, translation: ::rt::gen::windows::foundation::Point, out: *mut ::rt::gen::windows::foundation::Rect) -> HRESULT, - fn SelectWithPolyLine(&self, polyline: *mut ::rt::gen::windows::foundation::collections::IIterable<::rt::gen::windows::foundation::Point>, out: *mut ::rt::gen::windows::foundation::Rect) -> HRESULT, - fn SelectWithLine(&self, from: ::rt::gen::windows::foundation::Point, to: ::rt::gen::windows::foundation::Point, out: *mut ::rt::gen::windows::foundation::Rect) -> HRESULT, + fn DeleteSelected(&self, out: *mut foundation::Rect) -> HRESULT, + fn MoveSelected(&self, translation: foundation::Point, out: *mut foundation::Rect) -> HRESULT, + fn SelectWithPolyLine(&self, polyline: *mut foundation::collections::IIterable, out: *mut foundation::Rect) -> HRESULT, + fn SelectWithLine(&self, from: foundation::Point, to: foundation::Point, out: *mut foundation::Rect) -> HRESULT, fn CopySelectedToClipboard(&self) -> HRESULT, - fn PasteFromClipboard(&self, position: ::rt::gen::windows::foundation::Point, out: *mut ::rt::gen::windows::foundation::Rect) -> HRESULT, + fn PasteFromClipboard(&self, position: foundation::Point, out: *mut foundation::Rect) -> HRESULT, fn CanPasteFromClipboard(&self, out: *mut bool) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy9(&self) -> (), - #[cfg(feature="windows-storage")] fn LoadAsync(&self, inputStream: *mut ::rt::gen::windows::storage::streams::IInputStream, out: *mut *mut ::rt::gen::windows::foundation::IAsyncActionWithProgress) -> HRESULT, + #[cfg(feature="windows-storage")] fn LoadAsync(&self, inputStream: *mut ::rt::gen::windows::storage::streams::IInputStream, out: *mut *mut foundation::IAsyncActionWithProgress) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy10(&self) -> (), - #[cfg(feature="windows-storage")] fn SaveAsync(&self, outputStream: *mut ::rt::gen::windows::storage::streams::IOutputStream, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperationWithProgress) -> HRESULT, - fn UpdateRecognitionResults(&self, recognitionResults: *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn GetStrokes(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn GetRecognitionResults(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + #[cfg(feature="windows-storage")] fn SaveAsync(&self, outputStream: *mut ::rt::gen::windows::storage::streams::IOutputStream, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, + fn UpdateRecognitionResults(&self, recognitionResults: *mut foundation::collections::IVectorView) -> HRESULT, + fn GetStrokes(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn GetRecognitionResults(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IInkStrokeContainer { - #[inline] pub unsafe fn get_bounding_rect(&self) -> Result<::rt::gen::windows::foundation::Rect> { + #[inline] pub fn get_bounding_rect(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BoundingRect)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_stroke(&self, stroke: &InkStroke) -> Result<()> { + }} + #[inline] pub fn add_stroke(&self, stroke: &InkStroke) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddStroke)(self as *const _ as *mut _, stroke as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn delete_selected(&self) -> Result<::rt::gen::windows::foundation::Rect> { + }} + #[inline] pub fn delete_selected(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).DeleteSelected)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn move_selected(&self, translation: ::rt::gen::windows::foundation::Point) -> Result<::rt::gen::windows::foundation::Rect> { + }} + #[inline] pub fn move_selected(&self, translation: foundation::Point) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).MoveSelected)(self as *const _ as *mut _, translation, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn select_with_poly_line(&self, polyline: &::rt::gen::windows::foundation::collections::IIterable<::rt::gen::windows::foundation::Point>) -> Result<::rt::gen::windows::foundation::Rect> { + }} + #[inline] pub fn select_with_poly_line(&self, polyline: &foundation::collections::IIterable) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).SelectWithPolyLine)(self as *const _ as *mut _, polyline as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn select_with_line(&self, from: ::rt::gen::windows::foundation::Point, to: ::rt::gen::windows::foundation::Point) -> Result<::rt::gen::windows::foundation::Rect> { + }} + #[inline] pub fn select_with_line(&self, from: foundation::Point, to: foundation::Point) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).SelectWithLine)(self as *const _ as *mut _, from, to, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn copy_selected_to_clipboard(&self) -> Result<()> { + }} + #[inline] pub fn copy_selected_to_clipboard(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).CopySelectedToClipboard)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn paste_from_clipboard(&self, position: ::rt::gen::windows::foundation::Point) -> Result<::rt::gen::windows::foundation::Rect> { + }} + #[inline] pub fn paste_from_clipboard(&self, position: foundation::Point) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).PasteFromClipboard)(self as *const _ as *mut _, position, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn can_paste_from_clipboard(&self) -> Result { + }} + #[inline] pub fn can_paste_from_clipboard(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).CanPasteFromClipboard)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn load_async(&self, inputStream: &::rt::gen::windows::storage::streams::IInputStream) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn load_async(&self, inputStream: &::rt::gen::windows::storage::streams::IInputStream) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LoadAsync)(self as *const _ as *mut _, 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(&self, outputStream: &::rt::gen::windows::storage::streams::IOutputStream) -> Result>> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn save_async(&self, outputStream: &::rt::gen::windows::storage::streams::IOutputStream) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveAsync)(self as *const _ as *mut _, 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(&self, recognitionResults: &::rt::gen::windows::foundation::collections::IVectorView) -> Result<()> { + }} + #[inline] pub fn update_recognition_results(&self, recognitionResults: &foundation::collections::IVectorView) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).UpdateRecognitionResults)(self as *const _ as *mut _, recognitionResults as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_strokes(&self) -> Result>> { + }} + #[inline] pub fn get_strokes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetStrokes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_recognition_results(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_recognition_results(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetRecognitionResults)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class InkStrokeContainer: IInkStrokeContainer} impl RtActivatable for InkStrokeContainer {} DEFINE_CLSID!(InkStrokeContainer(&[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,83,116,114,111,107,101,67,111,110,116,97,105,110,101,114,0]) [CLSID_InkStrokeContainer]); 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(&self, strokes: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT, + fn AddStrokes(&self, strokes: *mut foundation::collections::IIterable) -> HRESULT, fn Clear(&self) -> HRESULT }} impl IInkStrokeContainer2 { - #[inline] pub unsafe fn add_strokes(&self, strokes: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + #[inline] pub fn add_strokes(&self, strokes: &foundation::collections::IIterable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddStrokes)(self as *const _ as *mut _, strokes as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn clear(&self) -> Result<()> { + }} + #[inline] pub fn clear(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Clear)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IInkStrokeContainer3, 1023917733, 47850, 19586, 167, 25, 123, 131, 218, 16, 103, 210); RT_INTERFACE!{interface IInkStrokeContainer3(IInkStrokeContainer3Vtbl): IInspectable(IInspectableVtbl) [IID_IInkStrokeContainer3] { #[cfg(not(feature="windows-storage"))] fn __Dummy0(&self) -> (), - #[cfg(feature="windows-storage")] fn SaveWithFormatAsync(&self, outputStream: *mut ::rt::gen::windows::storage::streams::IOutputStream, inkPersistenceFormat: InkPersistenceFormat, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperationWithProgress) -> HRESULT, + #[cfg(feature="windows-storage")] fn SaveWithFormatAsync(&self, outputStream: *mut ::rt::gen::windows::storage::streams::IOutputStream, inkPersistenceFormat: InkPersistenceFormat, out: *mut *mut foundation::IAsyncOperationWithProgress) -> HRESULT, fn GetStrokeById(&self, id: u32, out: *mut *mut InkStroke) -> HRESULT }} impl IInkStrokeContainer3 { - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn save_with_format_async(&self, outputStream: &::rt::gen::windows::storage::streams::IOutputStream, inkPersistenceFormat: InkPersistenceFormat) -> Result>> { + #[cfg(feature="windows-storage")] #[inline] pub fn save_with_format_async(&self, outputStream: &::rt::gen::windows::storage::streams::IOutputStream, inkPersistenceFormat: InkPersistenceFormat) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveWithFormatAsync)(self as *const _ as *mut _, outputStream as *const _ as *mut _, inkPersistenceFormat, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_stroke_by_id(&self, id: u32) -> Result> { + }} + #[inline] pub fn get_stroke_by_id(&self, id: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetStrokeById)(self as *const _ as *mut _, id, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StrokeStarted(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_StrokeContinued(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StrokeContinued(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_StrokeEnded(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StrokeEnded(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_StrokeCanceled(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_StrokeCanceled(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_StrokeStarted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StrokeStarted(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_StrokeContinued(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StrokeContinued(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_StrokeEnded(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StrokeEnded(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_StrokeCanceled(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_StrokeCanceled(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, fn get_InkPresenter(&self, out: *mut *mut InkPresenter) -> HRESULT }} impl IInkStrokeInput { - #[inline] pub unsafe fn add_stroke_started(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub fn add_stroke_started(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StrokeStarted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_stroke_started(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_stroke_started(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StrokeStarted)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_stroke_continued(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_stroke_continued(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StrokeContinued)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_stroke_continued(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_stroke_continued(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StrokeContinued)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_stroke_ended(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_stroke_ended(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StrokeEnded)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_stroke_ended(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_stroke_ended(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StrokeEnded)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_stroke_canceled(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_stroke_canceled(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_StrokeCanceled)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_stroke_canceled(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_stroke_canceled(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_StrokeCanceled)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_ink_presenter(&self) -> Result> { + }} + #[inline] pub fn get_ink_presenter(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InkPresenter)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class InkStrokeInput: IInkStrokeInput} 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(&self, out: *mut ::rt::gen::windows::foundation::Point) -> HRESULT, - fn get_BezierControlPoint1(&self, out: *mut ::rt::gen::windows::foundation::Point) -> HRESULT, - fn get_BezierControlPoint2(&self, out: *mut ::rt::gen::windows::foundation::Point) -> HRESULT, + fn get_Position(&self, out: *mut foundation::Point) -> HRESULT, + fn get_BezierControlPoint1(&self, out: *mut foundation::Point) -> HRESULT, + fn get_BezierControlPoint2(&self, out: *mut foundation::Point) -> HRESULT, fn get_Pressure(&self, out: *mut f32) -> HRESULT, fn get_TiltX(&self, out: *mut f32) -> HRESULT, fn get_TiltY(&self, out: *mut f32) -> HRESULT, fn get_Twist(&self, out: *mut f32) -> HRESULT }} impl IInkStrokeRenderingSegment { - #[inline] pub unsafe fn get_position(&self) -> Result<::rt::gen::windows::foundation::Point> { + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_bezier_control_point1(&self) -> Result<::rt::gen::windows::foundation::Point> { + }} + #[inline] pub fn get_bezier_control_point1(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BezierControlPoint1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_bezier_control_point2(&self) -> Result<::rt::gen::windows::foundation::Point> { + }} + #[inline] pub fn get_bezier_control_point2(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BezierControlPoint2)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_pressure(&self) -> Result { + }} + #[inline] pub fn get_pressure(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Pressure)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_tilt_x(&self) -> Result { + }} + #[inline] pub fn get_tilt_x(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TiltX)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_tilt_y(&self) -> Result { + }} + #[inline] pub fn get_tilt_y(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TiltY)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_twist(&self) -> Result { + }} + #[inline] pub fn get_twist(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Twist)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class InkStrokeRenderingSegment: IInkStrokeRenderingSegment} 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(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn get_Strokes(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IInkStrokesCollectedEventArgs { - #[inline] pub unsafe fn get_strokes(&self) -> Result>> { + #[inline] pub fn get_strokes(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Strokes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class InkStrokesCollectedEventArgs: IInkStrokesCollectedEventArgs} 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(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn get_Strokes(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IInkStrokesErasedEventArgs { - #[inline] pub unsafe fn get_strokes(&self) -> Result>> { + #[inline] pub fn get_strokes(&self) -> Result>>> { unsafe { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Strokes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + let hr = ((*self.lpVtbl).get_Strokes)(self as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class InkStrokesErasedEventArgs: IInkStrokesErasedEventArgs} 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(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn BeginDry(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn EndDry(&self) -> HRESULT }} impl IInkSynchronizer { - #[inline] pub unsafe fn begin_dry(&self) -> Result>> { + #[inline] pub fn begin_dry(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).BeginDry)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn end_dry(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn end_dry(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).EndDry)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class InkSynchronizer: IInkSynchronizer} 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(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerEntered(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerHovered(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerHovered(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerExited(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerExited(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerPressed(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerPressed(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerMoved(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerMoved(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerReleased(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerReleased(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerLost(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerLost(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerEntered(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerEntered(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerHovered(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerHovered(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerExited(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerExited(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerPressed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerPressed(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerMoved(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerMoved(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerReleased(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerReleased(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerLost(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerLost(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, fn get_InkPresenter(&self, out: *mut *mut InkPresenter) -> HRESULT }} impl IInkUnprocessedInput { - #[inline] pub unsafe fn add_pointer_entered(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub fn add_pointer_entered(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerEntered)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_entered(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_entered(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerEntered)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_hovered(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_pointer_hovered(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerHovered)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_hovered(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_hovered(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerHovered)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_exited(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_pointer_exited(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerExited)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_exited(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_exited(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerExited)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_pressed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_pointer_pressed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerPressed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_pressed(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_pressed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerPressed)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_moved(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_pointer_moved(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerMoved)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_moved(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_moved(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerMoved)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_released(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_pointer_released(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerReleased)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_released(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_released(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerReleased)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_lost(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_pointer_lost(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerLost)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_lost(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_lost(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerLost)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_ink_presenter(&self) -> Result> { + }} + #[inline] pub fn get_ink_presenter(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InkPresenter)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class InkUnprocessedInput: IInkUnprocessedInput} RT_ENUM! { enum PenTipShape: i32 { @@ -7700,53 +7700,53 @@ RT_INTERFACE!{interface IInkAnalysisInkBullet(IInkAnalysisInkBulletVtbl): IInspe fn get_RecognizedText(&self, out: *mut HSTRING) -> HRESULT }} impl IInkAnalysisInkBullet { - #[inline] pub unsafe fn get_recognized_text(&self) -> Result { + #[inline] pub fn get_recognized_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RecognizedText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class InkAnalysisInkBullet: IInkAnalysisInkBullet} DEFINE_IID!(IID_IInkAnalysisInkDrawing, 1787161887, 8164, 19989, 137, 140, 142, 17, 35, 119, 224, 33); RT_INTERFACE!{interface IInkAnalysisInkDrawing(IInkAnalysisInkDrawingVtbl): IInspectable(IInspectableVtbl) [IID_IInkAnalysisInkDrawing] { fn get_DrawingKind(&self, out: *mut InkAnalysisDrawingKind) -> HRESULT, - fn get_Center(&self, out: *mut ::rt::gen::windows::foundation::Point) -> HRESULT, - fn get_Points(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView<::rt::gen::windows::foundation::Point>) -> HRESULT + fn get_Center(&self, out: *mut foundation::Point) -> HRESULT, + fn get_Points(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IInkAnalysisInkDrawing { - #[inline] pub unsafe fn get_drawing_kind(&self) -> Result { + #[inline] pub fn get_drawing_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DrawingKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_center(&self) -> Result<::rt::gen::windows::foundation::Point> { + }} + #[inline] pub fn get_center(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Center)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_points(&self) -> Result>> { + }} + #[inline] pub fn get_points(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Points)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class InkAnalysisInkDrawing: IInkAnalysisInkDrawing} DEFINE_IID!(IID_IInkAnalysisInkWord, 1272064173, 33711, 16436, 143, 59, 248, 104, 125, 255, 244, 54); RT_INTERFACE!{interface IInkAnalysisInkWord(IInkAnalysisInkWordVtbl): IInspectable(IInspectableVtbl) [IID_IInkAnalysisInkWord] { fn get_RecognizedText(&self, out: *mut HSTRING) -> HRESULT, - fn get_TextAlternates(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn get_TextAlternates(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IInkAnalysisInkWord { - #[inline] pub unsafe fn get_recognized_text(&self) -> Result { + #[inline] pub fn get_recognized_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RecognizedText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_text_alternates(&self) -> Result>> { + }} + #[inline] pub fn get_text_alternates(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TextAlternates)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class InkAnalysisInkWord: IInkAnalysisInkWord} DEFINE_IID!(IID_IInkAnalysisLine, 2691499149, 11149, 18260, 173, 90, 208, 135, 17, 147, 169, 86); @@ -7755,16 +7755,16 @@ RT_INTERFACE!{interface IInkAnalysisLine(IInkAnalysisLineVtbl): IInspectable(IIn fn get_IndentLevel(&self, out: *mut i32) -> HRESULT }} impl IInkAnalysisLine { - #[inline] pub unsafe fn get_recognized_text(&self) -> Result { + #[inline] pub fn get_recognized_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RecognizedText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_indent_level(&self) -> Result { + }} + #[inline] pub fn get_indent_level(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IndentLevel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class InkAnalysisLine: IInkAnalysisLine} DEFINE_IID!(IID_IInkAnalysisListItem, 3034825279, 50371, 19514, 161, 166, 157, 133, 84, 126, 229, 134); @@ -7772,59 +7772,59 @@ RT_INTERFACE!{interface IInkAnalysisListItem(IInkAnalysisListItemVtbl): IInspect fn get_RecognizedText(&self, out: *mut HSTRING) -> HRESULT }} impl IInkAnalysisListItem { - #[inline] pub unsafe fn get_recognized_text(&self) -> Result { + #[inline] pub fn get_recognized_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RecognizedText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class InkAnalysisListItem: IInkAnalysisListItem} DEFINE_IID!(IID_IInkAnalysisNode, 813899525, 24420, 18988, 186, 55, 79, 72, 135, 135, 149, 116); RT_INTERFACE!{interface IInkAnalysisNode(IInkAnalysisNodeVtbl): IInspectable(IInspectableVtbl) [IID_IInkAnalysisNode] { fn get_Id(&self, out: *mut u32) -> HRESULT, fn get_Kind(&self, out: *mut InkAnalysisNodeKind) -> HRESULT, - fn get_BoundingRect(&self, out: *mut ::rt::gen::windows::foundation::Rect) -> HRESULT, - fn get_RotatedBoundingRect(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView<::rt::gen::windows::foundation::Point>) -> HRESULT, - fn get_Children(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_BoundingRect(&self, out: *mut foundation::Rect) -> HRESULT, + fn get_RotatedBoundingRect(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_Children(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_Parent(&self, out: *mut *mut IInkAnalysisNode) -> HRESULT, - fn GetStrokeIds(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn GetStrokeIds(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IInkAnalysisNode { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_kind(&self) -> Result { + }} + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_bounding_rect(&self) -> Result<::rt::gen::windows::foundation::Rect> { + }} + #[inline] pub fn get_bounding_rect(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BoundingRect)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_rotated_bounding_rect(&self) -> Result>> { + }} + #[inline] pub fn get_rotated_bounding_rect(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RotatedBoundingRect)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_children(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_children(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Children)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_parent(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_parent(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Parent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_stroke_ids(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_stroke_ids(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetStrokeIds)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class InkAnalysisNode: IInkAnalysisNode} RT_ENUM! { enum InkAnalysisNodeKind: i32 { @@ -7835,11 +7835,11 @@ RT_INTERFACE!{interface IInkAnalysisParagraph(IInkAnalysisParagraphVtbl): IInspe fn get_RecognizedText(&self, out: *mut HSTRING) -> HRESULT }} impl IInkAnalysisParagraph { - #[inline] pub unsafe fn get_recognized_text(&self) -> Result { + #[inline] pub fn get_recognized_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RecognizedText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class InkAnalysisParagraph: IInkAnalysisParagraph} DEFINE_IID!(IID_IInkAnalysisResult, 2303244921, 41539, 19107, 162, 148, 31, 152, 189, 15, 245, 128); @@ -7847,29 +7847,29 @@ RT_INTERFACE!{interface IInkAnalysisResult(IInkAnalysisResultVtbl): IInspectable fn get_Status(&self, out: *mut InkAnalysisStatus) -> HRESULT }} impl IInkAnalysisResult { - #[inline] pub unsafe fn get_status(&self) -> Result { + #[inline] pub fn get_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Status)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class InkAnalysisResult: IInkAnalysisResult} DEFINE_IID!(IID_IInkAnalysisRoot, 1068934084, 12254, 16481, 133, 2, 169, 15, 50, 84, 91, 132); RT_INTERFACE!{interface IInkAnalysisRoot(IInkAnalysisRootVtbl): IInspectable(IInspectableVtbl) [IID_IInkAnalysisRoot] { fn get_RecognizedText(&self, out: *mut HSTRING) -> HRESULT, - fn FindNodes(&self, nodeKind: InkAnalysisNodeKind, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT + fn FindNodes(&self, nodeKind: InkAnalysisNodeKind, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IInkAnalysisRoot { - #[inline] pub unsafe fn get_recognized_text(&self) -> Result { + #[inline] pub fn get_recognized_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RecognizedText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_nodes(&self, nodeKind: InkAnalysisNodeKind) -> Result>> { + }} + #[inline] pub fn find_nodes(&self, nodeKind: InkAnalysisNodeKind) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindNodes)(self as *const _ as *mut _, nodeKind, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class InkAnalysisRoot: IInkAnalysisRoot} RT_ENUM! { enum InkAnalysisStatus: i32 { @@ -7883,11 +7883,11 @@ RT_INTERFACE!{interface IInkAnalysisWritingRegion(IInkAnalysisWritingRegionVtbl) fn get_RecognizedText(&self, out: *mut HSTRING) -> HRESULT }} impl IInkAnalysisWritingRegion { - #[inline] pub unsafe fn get_recognized_text(&self) -> Result { + #[inline] pub fn get_recognized_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RecognizedText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class InkAnalysisWritingRegion: IInkAnalysisWritingRegion} DEFINE_IID!(IID_IInkAnalyzer, 4046163861, 2150, 19909, 140, 119, 248, 134, 20, 223, 227, 140); @@ -7895,58 +7895,58 @@ RT_INTERFACE!{interface IInkAnalyzer(IInkAnalyzerVtbl): IInspectable(IInspectabl fn get_AnalysisRoot(&self, out: *mut *mut InkAnalysisRoot) -> HRESULT, fn get_IsAnalyzing(&self, out: *mut bool) -> HRESULT, fn AddDataForStroke(&self, stroke: *mut super::InkStroke) -> HRESULT, - fn AddDataForStrokes(&self, strokes: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT, + fn AddDataForStrokes(&self, strokes: *mut foundation::collections::IIterable) -> HRESULT, fn ClearDataForAllStrokes(&self) -> HRESULT, fn RemoveDataForStroke(&self, strokeId: u32) -> HRESULT, - fn RemoveDataForStrokes(&self, strokeIds: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT, + fn RemoveDataForStrokes(&self, strokeIds: *mut foundation::collections::IIterable) -> HRESULT, fn ReplaceDataForStroke(&self, stroke: *mut super::InkStroke) -> HRESULT, fn SetStrokeDataKind(&self, strokeId: u32, strokeKind: InkAnalysisStrokeKind) -> HRESULT, - fn AnalyzeAsync(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT + fn AnalyzeAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IInkAnalyzer { - #[inline] pub unsafe fn get_analysis_root(&self) -> Result> { + #[inline] pub fn get_analysis_root(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AnalysisRoot)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_analyzing(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_analyzing(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsAnalyzing)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_data_for_stroke(&self, stroke: &super::InkStroke) -> Result<()> { + }} + #[inline] pub fn add_data_for_stroke(&self, stroke: &super::InkStroke) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddDataForStroke)(self as *const _ as *mut _, stroke as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_data_for_strokes(&self, strokes: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + }} + #[inline] pub fn add_data_for_strokes(&self, strokes: &foundation::collections::IIterable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddDataForStrokes)(self as *const _ as *mut _, strokes as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn clear_data_for_all_strokes(&self) -> Result<()> { + }} + #[inline] pub fn clear_data_for_all_strokes(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ClearDataForAllStrokes)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove_data_for_stroke(&self, strokeId: u32) -> Result<()> { + }} + #[inline] pub fn remove_data_for_stroke(&self, strokeId: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveDataForStroke)(self as *const _ as *mut _, strokeId); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove_data_for_strokes(&self, strokeIds: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + }} + #[inline] pub fn remove_data_for_strokes(&self, strokeIds: &foundation::collections::IIterable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveDataForStrokes)(self as *const _ as *mut _, strokeIds as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn replace_data_for_stroke(&self, stroke: &super::InkStroke) -> Result<()> { + }} + #[inline] pub fn replace_data_for_stroke(&self, stroke: &super::InkStroke) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReplaceDataForStroke)(self as *const _ as *mut _, stroke as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_stroke_data_kind(&self, strokeId: u32, strokeKind: InkAnalysisStrokeKind) -> Result<()> { + }} + #[inline] pub fn set_stroke_data_kind(&self, strokeId: u32, strokeKind: InkAnalysisStrokeKind) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetStrokeDataKind)(self as *const _ as *mut _, strokeId, strokeKind); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn analyze_async(&self) -> Result>> { + }} + #[inline] pub fn analyze_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).AnalyzeAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class InkAnalyzer: IInkAnalyzer} impl RtActivatable for InkAnalyzer {} @@ -7956,163 +7956,163 @@ RT_INTERFACE!{interface IInkAnalyzerFactory(IInkAnalyzerFactoryVtbl): IInspectab fn CreateAnalyzer(&self, out: *mut *mut InkAnalyzer) -> HRESULT }} impl IInkAnalyzerFactory { - #[inline] pub unsafe fn create_analyzer(&self) -> Result> { + #[inline] pub fn create_analyzer(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAnalyzer)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } } // Windows.UI.Input.Inking.Analysis pub mod core { // Windows.UI.Input.Inking.Core use ::prelude::*; DEFINE_IID!(IID_ICoreIncrementalInkStroke, 4255126995, 40294, 20349, 165, 127, 204, 112, 185, 207, 170, 118); RT_INTERFACE!{interface ICoreIncrementalInkStroke(ICoreIncrementalInkStrokeVtbl): IInspectable(IInspectableVtbl) [IID_ICoreIncrementalInkStroke] { - fn AppendInkPoints(&self, inkPoints: *mut ::rt::gen::windows::foundation::collections::IIterable, out: *mut ::rt::gen::windows::foundation::Rect) -> HRESULT, + fn AppendInkPoints(&self, inkPoints: *mut foundation::collections::IIterable, out: *mut foundation::Rect) -> HRESULT, fn CreateInkStroke(&self, out: *mut *mut super::InkStroke) -> HRESULT, fn get_DrawingAttributes(&self, out: *mut *mut super::InkDrawingAttributes) -> HRESULT, - fn get_PointTransform(&self, out: *mut ::rt::gen::windows::foundation::numerics::Matrix3x2) -> HRESULT, - fn get_BoundingRect(&self, out: *mut ::rt::gen::windows::foundation::Rect) -> HRESULT + fn get_PointTransform(&self, out: *mut foundation::numerics::Matrix3x2) -> HRESULT, + fn get_BoundingRect(&self, out: *mut foundation::Rect) -> HRESULT }} impl ICoreIncrementalInkStroke { - #[inline] pub unsafe fn append_ink_points(&self, inkPoints: &::rt::gen::windows::foundation::collections::IIterable) -> Result<::rt::gen::windows::foundation::Rect> { + #[inline] pub fn append_ink_points(&self, inkPoints: &foundation::collections::IIterable) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).AppendInkPoints)(self as *const _ as *mut _, inkPoints as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn create_ink_stroke(&self) -> Result> { + }} + #[inline] pub fn create_ink_stroke(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInkStroke)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_drawing_attributes(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_drawing_attributes(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DrawingAttributes)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_point_transform(&self) -> Result<::rt::gen::windows::foundation::numerics::Matrix3x2> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_point_transform(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PointTransform)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_bounding_rect(&self) -> Result<::rt::gen::windows::foundation::Rect> { + }} + #[inline] pub fn get_bounding_rect(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BoundingRect)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class CoreIncrementalInkStroke: ICoreIncrementalInkStroke} impl RtActivatable for CoreIncrementalInkStroke {} impl CoreIncrementalInkStroke { - #[inline] pub fn create(drawingAttributes: &super::InkDrawingAttributes, pointTransform: ::rt::gen::windows::foundation::numerics::Matrix3x2) -> Result> { unsafe { + #[inline] pub fn create(drawingAttributes: &super::InkDrawingAttributes, pointTransform: foundation::numerics::Matrix3x2) -> Result> { >::get_activation_factory().create(drawingAttributes, pointTransform) - }} + } } DEFINE_CLSID!(CoreIncrementalInkStroke(&[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,99,114,101,109,101,110,116,97,108,73,110,107,83,116,114,111,107,101,0]) [CLSID_CoreIncrementalInkStroke]); DEFINE_IID!(IID_ICoreIncrementalInkStrokeFactory, 3620052806, 36264, 20336, 151, 81, 229, 59, 182, 223, 69, 150); RT_INTERFACE!{static interface ICoreIncrementalInkStrokeFactory(ICoreIncrementalInkStrokeFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ICoreIncrementalInkStrokeFactory] { - fn Create(&self, drawingAttributes: *mut super::InkDrawingAttributes, pointTransform: ::rt::gen::windows::foundation::numerics::Matrix3x2, out: *mut *mut CoreIncrementalInkStroke) -> HRESULT + fn Create(&self, drawingAttributes: *mut super::InkDrawingAttributes, pointTransform: foundation::numerics::Matrix3x2, out: *mut *mut CoreIncrementalInkStroke) -> HRESULT }} impl ICoreIncrementalInkStrokeFactory { - #[inline] pub unsafe fn create(&self, drawingAttributes: &super::InkDrawingAttributes, pointTransform: ::rt::gen::windows::foundation::numerics::Matrix3x2) -> Result> { + #[inline] pub fn create(&self, drawingAttributes: &super::InkDrawingAttributes, pointTransform: foundation::numerics::Matrix3x2) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, drawingAttributes as *const _ as *mut _, pointTransform, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerEntering(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerHovering(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerHovering(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerExiting(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerExiting(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerPressing(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerPressing(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerMoving(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerMoving(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerReleasing(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerReleasing(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerLost(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerLost(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerEntering(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerEntering(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerHovering(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerHovering(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerExiting(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerExiting(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerPressing(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerPressing(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerMoving(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerMoving(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerReleasing(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerReleasing(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerLost(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerLost(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, fn get_InkPresenter(&self, out: *mut *mut super::InkPresenter) -> HRESULT }} impl ICoreInkIndependentInputSource { - #[inline] pub unsafe fn add_pointer_entering(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub fn add_pointer_entering(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerEntering)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_entering(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_entering(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerEntering)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_hovering(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_pointer_hovering(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerHovering)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_hovering(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_hovering(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerHovering)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_exiting(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_pointer_exiting(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerExiting)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_exiting(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_exiting(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerExiting)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_pressing(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_pointer_pressing(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerPressing)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_pressing(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_pressing(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerPressing)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_moving(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_pointer_moving(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerMoving)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_moving(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_moving(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerMoving)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_releasing(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_pointer_releasing(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerReleasing)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_releasing(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_releasing(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerReleasing)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_lost(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_pointer_lost(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerLost)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_lost(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_lost(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerLost)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_ink_presenter(&self) -> Result> { + }} + #[inline] pub fn get_ink_presenter(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InkPresenter)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CoreInkIndependentInputSource: ICoreInkIndependentInputSource} impl RtActivatable for CoreInkIndependentInputSource {} impl CoreInkIndependentInputSource { - #[inline] pub fn create(inkPresenter: &super::InkPresenter) -> Result> { unsafe { + #[inline] pub fn create(inkPresenter: &super::InkPresenter) -> Result>> { >::get_activation_factory().create(inkPresenter) - }} + } } DEFINE_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]) [CLSID_CoreInkIndependentInputSource]); DEFINE_IID!(IID_ICoreInkIndependentInputSourceStatics, 1944453403, 32960, 19963, 155, 102, 16, 186, 127, 63, 156, 132); @@ -8120,11 +8120,11 @@ RT_INTERFACE!{static interface ICoreInkIndependentInputSourceStatics(ICoreInkInd fn Create(&self, inkPresenter: *mut super::InkPresenter, out: *mut *mut CoreInkIndependentInputSource) -> HRESULT }} impl ICoreInkIndependentInputSourceStatics { - #[inline] pub unsafe fn create(&self, inkPresenter: &super::InkPresenter) -> Result> { + #[inline] pub fn create(&self, inkPresenter: &super::InkPresenter) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, inkPresenter as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_ICoreInkPresenterHost, 963545574, 32085, 17943, 158, 88, 104, 199, 12, 145, 105, 185); RT_INTERFACE!{interface ICoreInkPresenterHost(ICoreInkPresenterHostVtbl): IInspectable(IInspectableVtbl) [IID_ICoreInkPresenterHost] { @@ -8133,20 +8133,20 @@ RT_INTERFACE!{interface ICoreInkPresenterHost(ICoreInkPresenterHostVtbl): IInspe fn put_RootVisual(&self, value: *mut super::super::super::composition::ContainerVisual) -> HRESULT }} impl ICoreInkPresenterHost { - #[inline] pub unsafe fn get_ink_presenter(&self) -> Result> { + #[inline] pub fn get_ink_presenter(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InkPresenter)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_root_visual(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_root_visual(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RootVisual)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_root_visual(&self, value: &super::super::super::composition::ContainerVisual) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_root_visual(&self, value: &super::super::super::composition::ContainerVisual) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RootVisual)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CoreInkPresenterHost: ICoreInkPresenterHost} impl RtActivatable for CoreInkPresenterHost {} @@ -8156,105 +8156,105 @@ RT_ENUM! { enum CoreWetStrokeDisposition: i32 { }} 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(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVector) -> HRESULT, + fn get_NewInkPoints(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_PointerId(&self, out: *mut u32) -> HRESULT, fn get_Disposition(&self, out: *mut CoreWetStrokeDisposition) -> HRESULT, fn put_Disposition(&self, value: CoreWetStrokeDisposition) -> HRESULT }} impl ICoreWetStrokeUpdateEventArgs { - #[inline] pub unsafe fn get_new_ink_points(&self) -> Result>> { + #[inline] pub fn get_new_ink_points(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NewInkPoints)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pointer_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_pointer_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PointerId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_disposition(&self) -> Result { + }} + #[inline] pub fn get_disposition(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Disposition)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_disposition(&self, value: CoreWetStrokeDisposition) -> Result<()> { + }} + #[inline] pub fn set_disposition(&self, value: CoreWetStrokeDisposition) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Disposition)(self as *const _ as *mut _, 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(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_WetStrokeStarting(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_WetStrokeContinuing(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_WetStrokeContinuing(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_WetStrokeStopping(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_WetStrokeStopping(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_WetStrokeCompleted(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_WetStrokeCompleted(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_WetStrokeCanceled(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_WetStrokeCanceled(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_WetStrokeStarting(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_WetStrokeStarting(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_WetStrokeContinuing(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_WetStrokeContinuing(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_WetStrokeStopping(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_WetStrokeStopping(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_WetStrokeCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_WetStrokeCompleted(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_WetStrokeCanceled(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_WetStrokeCanceled(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, fn get_InkPresenter(&self, out: *mut *mut super::InkPresenter) -> HRESULT }} impl ICoreWetStrokeUpdateSource { - #[inline] pub unsafe fn add_wet_stroke_starting(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub fn add_wet_stroke_starting(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_WetStrokeStarting)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_wet_stroke_starting(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_wet_stroke_starting(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_WetStrokeStarting)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_wet_stroke_continuing(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_wet_stroke_continuing(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_WetStrokeContinuing)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_wet_stroke_continuing(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_wet_stroke_continuing(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_WetStrokeContinuing)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_wet_stroke_stopping(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_wet_stroke_stopping(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_WetStrokeStopping)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_wet_stroke_stopping(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_wet_stroke_stopping(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_WetStrokeStopping)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_wet_stroke_completed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_wet_stroke_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_WetStrokeCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_wet_stroke_completed(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_wet_stroke_completed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_WetStrokeCompleted)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_wet_stroke_canceled(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_wet_stroke_canceled(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_WetStrokeCanceled)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_wet_stroke_canceled(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_wet_stroke_canceled(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_WetStrokeCanceled)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_ink_presenter(&self) -> Result> { + }} + #[inline] pub fn get_ink_presenter(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InkPresenter)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CoreWetStrokeUpdateSource: ICoreWetStrokeUpdateSource} impl RtActivatable for CoreWetStrokeUpdateSource {} impl CoreWetStrokeUpdateSource { - #[inline] pub fn create(inkPresenter: &super::InkPresenter) -> Result> { unsafe { + #[inline] pub fn create(inkPresenter: &super::InkPresenter) -> Result>> { >::get_activation_factory().create(inkPresenter) - }} + } } DEFINE_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]) [CLSID_CoreWetStrokeUpdateSource]); DEFINE_IID!(IID_ICoreWetStrokeUpdateSourceStatics, 1034788026, 7485, 18094, 171, 157, 134, 71, 72, 108, 111, 144); @@ -8262,11 +8262,11 @@ RT_INTERFACE!{static interface ICoreWetStrokeUpdateSourceStatics(ICoreWetStrokeU fn Create(&self, inkPresenter: *mut super::InkPresenter, out: *mut *mut CoreWetStrokeUpdateSource) -> HRESULT }} impl ICoreWetStrokeUpdateSourceStatics { - #[inline] pub unsafe fn create(&self, inkPresenter: &super::InkPresenter) -> Result> { + #[inline] pub fn create(&self, inkPresenter: &super::InkPresenter) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, inkPresenter as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } } // Windows.UI.Input.Inking.Core } // Windows.UI.Input.Inking @@ -8295,39 +8295,39 @@ RT_INTERFACE!{interface IFontWeights(IFontWeightsVtbl): IInspectable(IInspectabl RT_CLASS!{class FontWeights: IFontWeights} impl RtActivatable for FontWeights {} impl FontWeights { - #[inline] pub fn get_black() -> Result { unsafe { + #[inline] pub fn get_black() -> Result { >::get_activation_factory().get_black() - }} - #[inline] pub fn get_bold() -> Result { unsafe { + } + #[inline] pub fn get_bold() -> Result { >::get_activation_factory().get_bold() - }} - #[inline] pub fn get_extra_black() -> Result { unsafe { + } + #[inline] pub fn get_extra_black() -> Result { >::get_activation_factory().get_extra_black() - }} - #[inline] pub fn get_extra_bold() -> Result { unsafe { + } + #[inline] pub fn get_extra_bold() -> Result { >::get_activation_factory().get_extra_bold() - }} - #[inline] pub fn get_extra_light() -> Result { unsafe { + } + #[inline] pub fn get_extra_light() -> Result { >::get_activation_factory().get_extra_light() - }} - #[inline] pub fn get_light() -> Result { unsafe { + } + #[inline] pub fn get_light() -> Result { >::get_activation_factory().get_light() - }} - #[inline] pub fn get_medium() -> Result { unsafe { + } + #[inline] pub fn get_medium() -> Result { >::get_activation_factory().get_medium() - }} - #[inline] pub fn get_normal() -> Result { unsafe { + } + #[inline] pub fn get_normal() -> Result { >::get_activation_factory().get_normal() - }} - #[inline] pub fn get_semi_bold() -> Result { unsafe { + } + #[inline] pub fn get_semi_bold() -> Result { >::get_activation_factory().get_semi_bold() - }} - #[inline] pub fn get_semi_light() -> Result { unsafe { + } + #[inline] pub fn get_semi_light() -> Result { >::get_activation_factory().get_semi_light() - }} - #[inline] pub fn get_thin() -> Result { unsafe { + } + #[inline] pub fn get_thin() -> Result { >::get_activation_factory().get_thin() - }} + } } DEFINE_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]) [CLSID_FontWeights]); DEFINE_IID!(IID_IFontWeightsStatics, 3015014869, 7081, 18667, 157, 173, 192, 149, 232, 194, 59, 163); @@ -8345,61 +8345,61 @@ RT_INTERFACE!{static interface IFontWeightsStatics(IFontWeightsStaticsVtbl): IIn fn get_Thin(&self, out: *mut FontWeight) -> HRESULT }} impl IFontWeightsStatics { - #[inline] pub unsafe fn get_black(&self) -> Result { + #[inline] pub fn get_black(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Black)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_bold(&self) -> Result { + }} + #[inline] pub fn get_bold(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Bold)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_extra_black(&self) -> Result { + }} + #[inline] pub fn get_extra_black(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtraBlack)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_extra_bold(&self) -> Result { + }} + #[inline] pub fn get_extra_bold(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtraBold)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_extra_light(&self) -> Result { + }} + #[inline] pub fn get_extra_light(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtraLight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_light(&self) -> Result { + }} + #[inline] pub fn get_light(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Light)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_medium(&self) -> Result { + }} + #[inline] pub fn get_medium(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Medium)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_normal(&self) -> Result { + }} + #[inline] pub fn get_normal(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Normal)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_semi_bold(&self) -> Result { + }} + #[inline] pub fn get_semi_bold(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SemiBold)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_semi_light(&self) -> Result { + }} + #[inline] pub fn get_semi_light(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SemiLight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_thin(&self) -> Result { + }} + #[inline] pub fn get_thin(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Thin)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum FormatEffect: i32 { Off (FormatEffect_Off) = 0, On (FormatEffect_On) = 1, Toggle (FormatEffect_Toggle) = 2, Undefined (FormatEffect_Undefined) = 3, @@ -8504,260 +8504,260 @@ RT_INTERFACE!{interface ITextCharacterFormat(ITextCharacterFormatVtbl): IInspect fn IsEqual(&self, format: *mut ITextCharacterFormat, out: *mut bool) -> HRESULT }} impl ITextCharacterFormat { - #[inline] pub unsafe fn get_all_caps(&self) -> Result { + #[inline] pub fn get_all_caps(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AllCaps)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_all_caps(&self, value: FormatEffect) -> Result<()> { + }} + #[inline] pub fn set_all_caps(&self, value: FormatEffect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AllCaps)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_background_color(&self) -> Result { + }} + #[inline] pub fn get_background_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BackgroundColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_background_color(&self, value: super::Color) -> Result<()> { + }} + #[inline] pub fn set_background_color(&self, value: super::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BackgroundColor)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_bold(&self) -> Result { + }} + #[inline] pub fn get_bold(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Bold)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_bold(&self, value: FormatEffect) -> Result<()> { + }} + #[inline] pub fn set_bold(&self, value: FormatEffect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Bold)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_font_stretch(&self) -> Result { + }} + #[inline] pub fn get_font_stretch(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FontStretch)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_font_stretch(&self, value: FontStretch) -> Result<()> { + }} + #[inline] pub fn set_font_stretch(&self, value: FontStretch) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FontStretch)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_font_style(&self) -> Result { + }} + #[inline] pub fn get_font_style(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FontStyle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_font_style(&self, value: FontStyle) -> Result<()> { + }} + #[inline] pub fn set_font_style(&self, value: FontStyle) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FontStyle)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_foreground_color(&self) -> Result { + }} + #[inline] pub fn get_foreground_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ForegroundColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_foreground_color(&self, value: super::Color) -> Result<()> { + }} + #[inline] pub fn set_foreground_color(&self, value: super::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ForegroundColor)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_hidden(&self) -> Result { + }} + #[inline] pub fn get_hidden(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Hidden)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_hidden(&self, value: FormatEffect) -> Result<()> { + }} + #[inline] pub fn set_hidden(&self, value: FormatEffect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Hidden)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_italic(&self) -> Result { + }} + #[inline] pub fn get_italic(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Italic)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_italic(&self, value: FormatEffect) -> Result<()> { + }} + #[inline] pub fn set_italic(&self, value: FormatEffect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Italic)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_kerning(&self) -> Result { + }} + #[inline] pub fn get_kerning(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kerning)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_kerning(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_kerning(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Kerning)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_language_tag(&self) -> Result { + }} + #[inline] pub fn get_language_tag(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LanguageTag)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_language_tag(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_language_tag(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LanguageTag)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_link_type(&self) -> Result { + }} + #[inline] pub fn get_link_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LinkType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_name(&self) -> Result { + }} + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Name)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_outline(&self) -> Result { + }} + #[inline] pub fn get_outline(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Outline)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_outline(&self, value: FormatEffect) -> Result<()> { + }} + #[inline] pub fn set_outline(&self, value: FormatEffect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Outline)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_position(&self) -> Result { + }} + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_position(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_position(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Position)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_protected_text(&self) -> Result { + }} + #[inline] pub fn get_protected_text(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProtectedText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_protected_text(&self, value: FormatEffect) -> Result<()> { + }} + #[inline] pub fn set_protected_text(&self, value: FormatEffect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ProtectedText)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_size(&self) -> Result { + }} + #[inline] pub fn get_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Size)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_size(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_size(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Size)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_small_caps(&self) -> Result { + }} + #[inline] pub fn get_small_caps(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SmallCaps)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_small_caps(&self, value: FormatEffect) -> Result<()> { + }} + #[inline] pub fn set_small_caps(&self, value: FormatEffect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SmallCaps)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_spacing(&self) -> Result { + }} + #[inline] pub fn get_spacing(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Spacing)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_spacing(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_spacing(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Spacing)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_strikethrough(&self) -> Result { + }} + #[inline] pub fn get_strikethrough(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Strikethrough)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_strikethrough(&self, value: FormatEffect) -> Result<()> { + }} + #[inline] pub fn set_strikethrough(&self, value: FormatEffect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Strikethrough)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_subscript(&self) -> Result { + }} + #[inline] pub fn get_subscript(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Subscript)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_subscript(&self, value: FormatEffect) -> Result<()> { + }} + #[inline] pub fn set_subscript(&self, value: FormatEffect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Subscript)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_superscript(&self) -> Result { + }} + #[inline] pub fn get_superscript(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Superscript)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_superscript(&self, value: FormatEffect) -> Result<()> { + }} + #[inline] pub fn set_superscript(&self, value: FormatEffect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Superscript)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_text_script(&self) -> Result { + }} + #[inline] pub fn get_text_script(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TextScript)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_text_script(&self, value: TextScript) -> Result<()> { + }} + #[inline] pub fn set_text_script(&self, value: TextScript) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TextScript)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_underline(&self) -> Result { + }} + #[inline] pub fn get_underline(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Underline)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_underline(&self, value: UnderlineType) -> Result<()> { + }} + #[inline] pub fn set_underline(&self, value: UnderlineType) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Underline)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_weight(&self) -> Result { + }} + #[inline] pub fn get_weight(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Weight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_weight(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_weight(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Weight)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_clone(&self, value: &ITextCharacterFormat) -> Result<()> { + }} + #[inline] pub fn set_clone(&self, value: &ITextCharacterFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetClone)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_clone(&self) -> Result> { + }} + #[inline] pub fn get_clone(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetClone)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn is_equal(&self, format: &ITextCharacterFormat) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn is_equal(&self, format: &ITextCharacterFormat) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsEqual)(self as *const _ as *mut _, format as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{static class TextConstants} impl RtActivatable for TextConstants {} impl TextConstants { - #[inline] pub fn get_auto_color() -> Result { unsafe { + #[inline] pub fn get_auto_color() -> Result { >::get_activation_factory().get_auto_color() - }} - #[inline] pub fn get_min_unit_count() -> Result { unsafe { + } + #[inline] pub fn get_min_unit_count() -> Result { >::get_activation_factory().get_min_unit_count() - }} - #[inline] pub fn get_max_unit_count() -> Result { unsafe { + } + #[inline] pub fn get_max_unit_count() -> Result { >::get_activation_factory().get_max_unit_count() - }} - #[inline] pub fn get_undefined_color() -> Result { unsafe { + } + #[inline] pub fn get_undefined_color() -> Result { >::get_activation_factory().get_undefined_color() - }} - #[inline] pub fn get_undefined_float_value() -> Result { unsafe { + } + #[inline] pub fn get_undefined_float_value() -> Result { >::get_activation_factory().get_undefined_float_value() - }} - #[inline] pub fn get_undefined_int32_value() -> Result { unsafe { + } + #[inline] pub fn get_undefined_int32_value() -> Result { >::get_activation_factory().get_undefined_int32_value() - }} - #[inline] pub fn get_undefined_font_stretch() -> Result { unsafe { + } + #[inline] pub fn get_undefined_font_stretch() -> Result { >::get_activation_factory().get_undefined_font_stretch() - }} - #[inline] pub fn get_undefined_font_style() -> Result { unsafe { + } + #[inline] pub fn get_undefined_font_style() -> Result { >::get_activation_factory().get_undefined_font_style() - }} + } } DEFINE_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]) [CLSID_TextConstants]); DEFINE_IID!(IID_ITextConstantsStatics, 2006875187, 6301, 19450, 151, 200, 16, 219, 19, 93, 151, 110); @@ -8772,46 +8772,46 @@ RT_INTERFACE!{static interface ITextConstantsStatics(ITextConstantsStaticsVtbl): fn get_UndefinedFontStyle(&self, out: *mut FontStyle) -> HRESULT }} impl ITextConstantsStatics { - #[inline] pub unsafe fn get_auto_color(&self) -> Result { + #[inline] pub fn get_auto_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AutoColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_unit_count(&self) -> Result { + }} + #[inline] pub fn get_min_unit_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinUnitCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_unit_count(&self) -> Result { + }} + #[inline] pub fn get_max_unit_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxUnitCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_undefined_color(&self) -> Result { + }} + #[inline] pub fn get_undefined_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UndefinedColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_undefined_float_value(&self) -> Result { + }} + #[inline] pub fn get_undefined_float_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UndefinedFloatValue)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_undefined_int32_value(&self) -> Result { + }} + #[inline] pub fn get_undefined_int32_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UndefinedInt32Value)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_undefined_font_stretch(&self) -> Result { + }} + #[inline] pub fn get_undefined_font_stretch(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UndefinedFontStretch)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_undefined_font_style(&self) -> Result { + }} + #[inline] pub fn get_undefined_font_style(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UndefinedFontStyle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum TextDecorations: u32 { None (TextDecorations_None) = 0, Underline (TextDecorations_Underline) = 1, Strikethrough (TextDecorations_Strikethrough) = 2, @@ -8836,7 +8836,7 @@ RT_INTERFACE!{interface ITextDocument(ITextDocumentVtbl): IInspectable(IInspecta fn GetDefaultCharacterFormat(&self, out: *mut *mut ITextCharacterFormat) -> HRESULT, fn GetDefaultParagraphFormat(&self, out: *mut *mut ITextParagraphFormat) -> HRESULT, fn GetRange(&self, startPosition: i32, endPosition: i32, out: *mut *mut ITextRange) -> HRESULT, - fn GetRangeFromPoint(&self, point: super::super::foundation::Point, options: PointOptions, out: *mut *mut ITextRange) -> HRESULT, + fn GetRangeFromPoint(&self, point: foundation::Point, options: PointOptions, out: *mut *mut ITextRange) -> HRESULT, fn GetText(&self, options: TextGetOptions, value: *mut HSTRING) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy20(&self) -> (), #[cfg(feature="windows-storage")] fn LoadFromStream(&self, options: TextSetOptions, value: *mut super::super::storage::streams::IRandomAccessStream) -> HRESULT, @@ -8849,129 +8849,129 @@ RT_INTERFACE!{interface ITextDocument(ITextDocumentVtbl): IInspectable(IInspecta fn Undo(&self) -> HRESULT }} impl ITextDocument { - #[inline] pub unsafe fn get_caret_type(&self) -> Result { + #[inline] pub fn get_caret_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CaretType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_caret_type(&self, value: CaretType) -> Result<()> { + }} + #[inline] pub fn set_caret_type(&self, value: CaretType) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CaretType)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_tab_stop(&self) -> Result { + }} + #[inline] pub fn get_default_tab_stop(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DefaultTabStop)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_default_tab_stop(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_default_tab_stop(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DefaultTabStop)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_selection(&self) -> Result> { + }} + #[inline] pub fn get_selection(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Selection)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_undo_limit(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_undo_limit(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UndoLimit)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_undo_limit(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_undo_limit(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_UndoLimit)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn can_copy(&self) -> Result { + }} + #[inline] pub fn can_copy(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).CanCopy)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn can_paste(&self) -> Result { + }} + #[inline] pub fn can_paste(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).CanPaste)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn can_redo(&self) -> Result { + }} + #[inline] pub fn can_redo(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).CanRedo)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn can_undo(&self) -> Result { + }} + #[inline] pub fn can_undo(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).CanUndo)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn apply_display_updates(&self) -> Result { + }} + #[inline] pub fn apply_display_updates(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ApplyDisplayUpdates)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn batch_display_updates(&self) -> Result { + }} + #[inline] pub fn batch_display_updates(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).BatchDisplayUpdates)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn begin_undo_group(&self) -> Result<()> { + }} + #[inline] pub fn begin_undo_group(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).BeginUndoGroup)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn end_undo_group(&self) -> Result<()> { + }} + #[inline] pub fn end_undo_group(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).EndUndoGroup)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_character_format(&self) -> Result> { + }} + #[inline] pub fn get_default_character_format(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefaultCharacterFormat)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_paragraph_format(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_default_paragraph_format(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefaultParagraphFormat)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_range(&self, startPosition: i32, endPosition: i32) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_range(&self, startPosition: i32, endPosition: i32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetRange)(self as *const _ as *mut _, startPosition, endPosition, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_range_from_point(&self, point: super::super::foundation::Point, options: PointOptions) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_range_from_point(&self, point: foundation::Point, options: PointOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetRangeFromPoint)(self as *const _ as *mut _, point, options, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_text(&self, options: TextGetOptions) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_text(&self, options: TextGetOptions) -> Result { unsafe { let mut value = null_mut(); let hr = ((*self.lpVtbl).GetText)(self as *const _ as *mut _, 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(&self, options: TextSetOptions, value: &super::super::storage::streams::IRandomAccessStream) -> Result<()> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn load_from_stream(&self, options: TextSetOptions, value: &super::super::storage::streams::IRandomAccessStream) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).LoadFromStream)(self as *const _ as *mut _, options, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn redo(&self) -> Result<()> { + }} + #[inline] pub fn redo(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Redo)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn save_to_stream(&self, options: TextGetOptions, value: &super::super::storage::streams::IRandomAccessStream) -> Result<()> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn save_to_stream(&self, options: TextGetOptions, value: &super::super::storage::streams::IRandomAccessStream) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SaveToStream)(self as *const _ as *mut _, options, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_default_character_format(&self, value: &ITextCharacterFormat) -> Result<()> { + }} + #[inline] pub fn set_default_character_format(&self, value: &ITextCharacterFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetDefaultCharacterFormat)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_default_paragraph_format(&self, value: &ITextParagraphFormat) -> Result<()> { + }} + #[inline] pub fn set_default_paragraph_format(&self, value: &ITextParagraphFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetDefaultParagraphFormat)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_text(&self, options: TextSetOptions, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_text(&self, options: TextSetOptions, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetText)(self as *const _ as *mut _, options, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn undo(&self) -> Result<()> { + }} + #[inline] pub fn undo(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Undo)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ITextDocument2, 4063301906, 35977, 18889, 145, 24, 240, 87, 203, 184, 20, 238); RT_INTERFACE!{interface ITextDocument2(ITextDocument2Vtbl): IInspectable(IInspectableVtbl) [IID_ITextDocument2] { @@ -8981,24 +8981,24 @@ RT_INTERFACE!{interface ITextDocument2(ITextDocument2Vtbl): IInspectable(IInspec fn put_IgnoreTrailingCharacterSpacing(&self, value: bool) -> HRESULT }} impl ITextDocument2 { - #[inline] pub unsafe fn get_alignment_includes_trailing_whitespace(&self) -> Result { + #[inline] pub fn get_alignment_includes_trailing_whitespace(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AlignmentIncludesTrailingWhitespace)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_alignment_includes_trailing_whitespace(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_alignment_includes_trailing_whitespace(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AlignmentIncludesTrailingWhitespace)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_ignore_trailing_character_spacing(&self) -> Result { + }} + #[inline] pub fn get_ignore_trailing_character_spacing(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IgnoreTrailingCharacterSpacing)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_ignore_trailing_character_spacing(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_ignore_trailing_character_spacing(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IgnoreTrailingCharacterSpacing)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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, UseLf (TextGetOptions_UseLf) = 16777216, @@ -9055,223 +9055,223 @@ RT_INTERFACE!{interface ITextParagraphFormat(ITextParagraphFormatVtbl): IInspect fn SetLineSpacing(&self, rule: LineSpacingRule, spacing: f32) -> HRESULT }} impl ITextParagraphFormat { - #[inline] pub unsafe fn get_alignment(&self) -> Result { + #[inline] pub fn get_alignment(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Alignment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_alignment(&self, value: ParagraphAlignment) -> Result<()> { + }} + #[inline] pub fn set_alignment(&self, value: ParagraphAlignment) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Alignment)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_first_line_indent(&self) -> Result { + }} + #[inline] pub fn get_first_line_indent(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FirstLineIndent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_keep_together(&self) -> Result { + }} + #[inline] pub fn get_keep_together(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_KeepTogether)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_keep_together(&self, value: FormatEffect) -> Result<()> { + }} + #[inline] pub fn set_keep_together(&self, value: FormatEffect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_KeepTogether)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_keep_with_next(&self) -> Result { + }} + #[inline] pub fn get_keep_with_next(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_KeepWithNext)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_keep_with_next(&self, value: FormatEffect) -> Result<()> { + }} + #[inline] pub fn set_keep_with_next(&self, value: FormatEffect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_KeepWithNext)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_left_indent(&self) -> Result { + }} + #[inline] pub fn get_left_indent(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LeftIndent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_line_spacing(&self) -> Result { + }} + #[inline] pub fn get_line_spacing(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LineSpacing)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_line_spacing_rule(&self) -> Result { + }} + #[inline] pub fn get_line_spacing_rule(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LineSpacingRule)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_list_alignment(&self) -> Result { + }} + #[inline] pub fn get_list_alignment(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ListAlignment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_list_alignment(&self, value: MarkerAlignment) -> Result<()> { + }} + #[inline] pub fn set_list_alignment(&self, value: MarkerAlignment) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ListAlignment)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_list_level_index(&self) -> Result { + }} + #[inline] pub fn get_list_level_index(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ListLevelIndex)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_list_level_index(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_list_level_index(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ListLevelIndex)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_list_start(&self) -> Result { + }} + #[inline] pub fn get_list_start(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ListStart)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_list_start(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_list_start(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ListStart)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_list_style(&self) -> Result { + }} + #[inline] pub fn get_list_style(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ListStyle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_list_style(&self, value: MarkerStyle) -> Result<()> { + }} + #[inline] pub fn set_list_style(&self, value: MarkerStyle) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ListStyle)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_list_tab(&self) -> Result { + }} + #[inline] pub fn get_list_tab(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ListTab)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_list_tab(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_list_tab(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ListTab)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_list_type(&self) -> Result { + }} + #[inline] pub fn get_list_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ListType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_list_type(&self, value: MarkerType) -> Result<()> { + }} + #[inline] pub fn set_list_type(&self, value: MarkerType) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ListType)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_no_line_number(&self) -> Result { + }} + #[inline] pub fn get_no_line_number(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NoLineNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_no_line_number(&self, value: FormatEffect) -> Result<()> { + }} + #[inline] pub fn set_no_line_number(&self, value: FormatEffect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_NoLineNumber)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_page_break_before(&self) -> Result { + }} + #[inline] pub fn get_page_break_before(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PageBreakBefore)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_page_break_before(&self, value: FormatEffect) -> Result<()> { + }} + #[inline] pub fn set_page_break_before(&self, value: FormatEffect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PageBreakBefore)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_right_indent(&self) -> Result { + }} + #[inline] pub fn get_right_indent(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RightIndent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_right_indent(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_right_indent(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RightIndent)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_right_to_left(&self) -> Result { + }} + #[inline] pub fn get_right_to_left(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RightToLeft)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_right_to_left(&self, value: FormatEffect) -> Result<()> { + }} + #[inline] pub fn set_right_to_left(&self, value: FormatEffect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RightToLeft)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_style(&self) -> Result { + }} + #[inline] pub fn get_style(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Style)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_style(&self, value: ParagraphStyle) -> Result<()> { + }} + #[inline] pub fn set_style(&self, value: ParagraphStyle) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Style)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_space_after(&self) -> Result { + }} + #[inline] pub fn get_space_after(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SpaceAfter)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_space_after(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_space_after(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SpaceAfter)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_space_before(&self) -> Result { + }} + #[inline] pub fn get_space_before(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SpaceBefore)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_space_before(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_space_before(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SpaceBefore)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_widow_control(&self) -> Result { + }} + #[inline] pub fn get_widow_control(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_WidowControl)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_widow_control(&self, value: FormatEffect) -> Result<()> { + }} + #[inline] pub fn set_widow_control(&self, value: FormatEffect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_WidowControl)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_tab_count(&self) -> Result { + }} + #[inline] pub fn get_tab_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TabCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_tab(&self, position: f32, align: TabAlignment, leader: TabLeader) -> Result<()> { + }} + #[inline] pub fn add_tab(&self, position: f32, align: TabAlignment, leader: TabLeader) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddTab)(self as *const _ as *mut _, position, align, leader); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn clear_all_tabs(&self) -> Result<()> { + }} + #[inline] pub fn clear_all_tabs(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ClearAllTabs)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn delete_tab(&self, position: f32) -> Result<()> { + }} + #[inline] pub fn delete_tab(&self, position: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).DeleteTab)(self as *const _ as *mut _, position); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_clone(&self) -> Result> { + }} + #[inline] pub fn get_clone(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetClone)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_tab(&self, index: i32) -> Result<(f32, TabAlignment, TabLeader)> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_tab(&self, index: i32) -> Result<(f32, TabAlignment, TabLeader)> { unsafe { let mut position = zeroed(); let mut align = zeroed(); let mut leader = zeroed(); let hr = ((*self.lpVtbl).GetTab)(self as *const _ as *mut _, index, &mut position, &mut align, &mut leader); if hr == S_OK { Ok((position, align, leader)) } else { err(hr) } - } - #[inline] pub unsafe fn is_equal(&self, format: &ITextParagraphFormat) -> Result { + }} + #[inline] pub fn is_equal(&self, format: &ITextParagraphFormat) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsEqual)(self as *const _ as *mut _, format as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_clone(&self, format: &ITextParagraphFormat) -> Result<()> { + }} + #[inline] pub fn set_clone(&self, format: &ITextParagraphFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetClone)(self as *const _ as *mut _, format as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_indents(&self, start: f32, left: f32, right: f32) -> Result<()> { + }} + #[inline] pub fn set_indents(&self, start: f32, left: f32, right: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetIndents)(self as *const _ as *mut _, start, left, right); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_line_spacing(&self, rule: LineSpacingRule, spacing: f32) -> Result<()> { + }} + #[inline] pub fn set_line_spacing(&self, rule: LineSpacingRule, spacing: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetLineSpacing)(self as *const _ as *mut _, rule, spacing); 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] { @@ -9307,8 +9307,8 @@ RT_INTERFACE!{interface ITextRange(ITextRangeVtbl): IInspectable(IInspectableVtb fn GetCharacterUtf32(&self, value: *mut u32, offset: i32) -> HRESULT, fn GetClone(&self, out: *mut *mut ITextRange) -> HRESULT, fn GetIndex(&self, unit: TextRangeUnit, out: *mut i32) -> HRESULT, - fn GetPoint(&self, horizontalAlign: HorizontalCharacterAlignment, verticalAlign: VerticalCharacterAlignment, options: PointOptions, point: *mut super::super::foundation::Point) -> HRESULT, - fn GetRect(&self, options: PointOptions, rect: *mut super::super::foundation::Rect, hit: *mut i32) -> HRESULT, + fn GetPoint(&self, horizontalAlign: HorizontalCharacterAlignment, verticalAlign: VerticalCharacterAlignment, options: PointOptions, point: *mut foundation::Point) -> HRESULT, + fn GetRect(&self, options: PointOptions, rect: *mut foundation::Rect, hit: *mut i32) -> HRESULT, fn GetText(&self, options: TextGetOptions, value: *mut HSTRING) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy35(&self) -> (), #[cfg(feature="windows-storage")] fn GetTextViaStream(&self, options: TextGetOptions, value: *mut super::super::storage::streams::IRandomAccessStream) -> HRESULT, @@ -9324,7 +9324,7 @@ RT_INTERFACE!{interface ITextRange(ITextRangeVtbl): IInspectable(IInspectableVtb fn ScrollIntoView(&self, value: PointOptions) -> HRESULT, fn MatchSelection(&self) -> HRESULT, fn SetIndex(&self, unit: TextRangeUnit, index: i32, extend: bool) -> HRESULT, - fn SetPoint(&self, point: super::super::foundation::Point, options: PointOptions, extend: bool) -> HRESULT, + fn SetPoint(&self, point: foundation::Point, options: PointOptions, extend: bool) -> HRESULT, fn SetRange(&self, startPosition: i32, endPosition: i32) -> HRESULT, fn SetText(&self, options: TextSetOptions, value: HSTRING) -> HRESULT, #[cfg(not(feature="windows-storage"))] fn __Dummy50(&self) -> (), @@ -9332,243 +9332,243 @@ RT_INTERFACE!{interface ITextRange(ITextRangeVtbl): IInspectable(IInspectableVtb fn StartOf(&self, unit: TextRangeUnit, extend: bool, out: *mut i32) -> HRESULT }} impl ITextRange { - #[inline] pub unsafe fn get_character(&self) -> Result { + #[inline] pub fn get_character(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Character)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_character(&self, value: Char) -> Result<()> { + }} + #[inline] pub fn set_character(&self, value: Char) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Character)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_character_format(&self) -> Result> { + }} + #[inline] pub fn get_character_format(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CharacterFormat)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_character_format(&self, value: &ITextCharacterFormat) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_character_format(&self, value: &ITextCharacterFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CharacterFormat)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_formatted_text(&self) -> Result> { + }} + #[inline] pub fn get_formatted_text(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FormattedText)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_formatted_text(&self, value: &ITextRange) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_formatted_text(&self, value: &ITextRange) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FormattedText)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_end_position(&self) -> Result { + }} + #[inline] pub fn get_end_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EndPosition)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_end_position(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_end_position(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_EndPosition)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_gravity(&self) -> Result { + }} + #[inline] pub fn get_gravity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Gravity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_gravity(&self, value: RangeGravity) -> Result<()> { + }} + #[inline] pub fn set_gravity(&self, value: RangeGravity) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Gravity)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_length(&self) -> Result { + }} + #[inline] pub fn get_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Length)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_link(&self) -> Result { + }} + #[inline] pub fn get_link(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Link)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_link(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_link(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Link)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_paragraph_format(&self) -> Result> { + }} + #[inline] pub fn get_paragraph_format(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ParagraphFormat)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_paragraph_format(&self, value: &ITextParagraphFormat) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_paragraph_format(&self, value: &ITextParagraphFormat) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ParagraphFormat)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_start_position(&self) -> Result { + }} + #[inline] pub fn get_start_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StartPosition)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_start_position(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_start_position(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StartPosition)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_story_length(&self) -> Result { + }} + #[inline] pub fn get_story_length(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StoryLength)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_text_(&self) -> Result { + }} + #[inline] pub fn get_text_(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Text)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_text_(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_text_(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Text)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn can_paste(&self, format: i32) -> Result { + }} + #[inline] pub fn can_paste(&self, format: i32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).CanPaste)(self as *const _ as *mut _, format, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn change_case(&self, value: LetterCase) -> Result<()> { + }} + #[inline] pub fn change_case(&self, value: LetterCase) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ChangeCase)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn collapse(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn collapse(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Collapse)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn copy(&self) -> Result<()> { + }} + #[inline] pub fn copy(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Copy)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn cut(&self) -> Result<()> { + }} + #[inline] pub fn cut(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Cut)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn delete(&self, unit: TextRangeUnit, count: i32) -> Result { + }} + #[inline] pub fn delete(&self, unit: TextRangeUnit, count: i32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).Delete)(self as *const _ as *mut _, unit, count, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn end_of(&self, unit: TextRangeUnit, extend: bool) -> Result { + }} + #[inline] pub fn end_of(&self, unit: TextRangeUnit, extend: bool) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).EndOf)(self as *const _ as *mut _, unit, extend, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn expand(&self, unit: TextRangeUnit) -> Result { + }} + #[inline] pub fn expand(&self, unit: TextRangeUnit) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).Expand)(self as *const _ as *mut _, unit, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn find_text(&self, value: &HStringArg, scanLength: i32, options: FindOptions) -> Result { + }} + #[inline] pub fn find_text(&self, value: &HStringArg, scanLength: i32, options: FindOptions) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).FindText)(self as *const _ as *mut _, value.get(), scanLength, options, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_character_utf32(&self, offset: i32) -> Result { + }} + #[inline] pub fn get_character_utf32(&self, offset: i32) -> Result { unsafe { let mut value = zeroed(); let hr = ((*self.lpVtbl).GetCharacterUtf32)(self as *const _ as *mut _, &mut value, offset); if hr == S_OK { Ok(value) } else { err(hr) } - } - #[inline] pub unsafe fn get_clone(&self) -> Result> { + }} + #[inline] pub fn get_clone(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetClone)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_index(&self, unit: TextRangeUnit) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_index(&self, unit: TextRangeUnit) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetIndex)(self as *const _ as *mut _, unit, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_point(&self, horizontalAlign: HorizontalCharacterAlignment, verticalAlign: VerticalCharacterAlignment, options: PointOptions) -> Result { + }} + #[inline] pub fn get_point(&self, horizontalAlign: HorizontalCharacterAlignment, verticalAlign: VerticalCharacterAlignment, options: PointOptions) -> Result { unsafe { let mut point = zeroed(); let hr = ((*self.lpVtbl).GetPoint)(self as *const _ as *mut _, horizontalAlign, verticalAlign, options, &mut point); if hr == S_OK { Ok(point) } else { err(hr) } - } - #[inline] pub unsafe fn get_rect(&self, options: PointOptions) -> Result<(super::super::foundation::Rect, i32)> { + }} + #[inline] pub fn get_rect(&self, options: PointOptions) -> Result<(foundation::Rect, i32)> { unsafe { let mut rect = zeroed(); let mut hit = zeroed(); let hr = ((*self.lpVtbl).GetRect)(self as *const _ as *mut _, options, &mut rect, &mut hit); if hr == S_OK { Ok((rect, hit)) } else { err(hr) } - } - #[inline] pub unsafe fn get_text(&self, options: TextGetOptions) -> Result { + }} + #[inline] pub fn get_text(&self, options: TextGetOptions) -> Result { unsafe { let mut value = null_mut(); let hr = ((*self.lpVtbl).GetText)(self as *const _ as *mut _, 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(&self, options: TextGetOptions, value: &super::super::storage::streams::IRandomAccessStream) -> Result<()> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn get_text_via_stream(&self, options: TextGetOptions, value: &super::super::storage::streams::IRandomAccessStream) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).GetTextViaStream)(self as *const _ as *mut _, options, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn in_range(&self, range: &ITextRange) -> Result { + }} + #[inline] pub fn in_range(&self, range: &ITextRange) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).InRange)(self as *const _ as *mut _, 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(&self, width: i32, height: i32, ascent: i32, verticalAlign: VerticalCharacterAlignment, alternateText: &HStringArg, value: &super::super::storage::streams::IRandomAccessStream) -> Result<()> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn insert_image(&self, width: i32, height: i32, ascent: i32, verticalAlign: VerticalCharacterAlignment, alternateText: &HStringArg, value: &super::super::storage::streams::IRandomAccessStream) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InsertImage)(self as *const _ as *mut _, 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(&self, range: &ITextRange) -> Result { + }} + #[inline] pub fn in_story(&self, range: &ITextRange) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).InStory)(self as *const _ as *mut _, range as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_equal(&self, range: &ITextRange) -> Result { + }} + #[inline] pub fn is_equal(&self, range: &ITextRange) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsEqual)(self as *const _ as *mut _, range as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn move_(&self, unit: TextRangeUnit, count: i32) -> Result { + }} + #[inline] pub fn move_(&self, unit: TextRangeUnit, count: i32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).Move)(self as *const _ as *mut _, unit, count, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn move_end(&self, unit: TextRangeUnit, count: i32) -> Result { + }} + #[inline] pub fn move_end(&self, unit: TextRangeUnit, count: i32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).MoveEnd)(self as *const _ as *mut _, unit, count, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn move_start(&self, unit: TextRangeUnit, count: i32) -> Result { + }} + #[inline] pub fn move_start(&self, unit: TextRangeUnit, count: i32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).MoveStart)(self as *const _ as *mut _, unit, count, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn paste(&self, format: i32) -> Result<()> { + }} + #[inline] pub fn paste(&self, format: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Paste)(self as *const _ as *mut _, format); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn scroll_into_view(&self, value: PointOptions) -> Result<()> { + }} + #[inline] pub fn scroll_into_view(&self, value: PointOptions) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ScrollIntoView)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn match_selection(&self) -> Result<()> { + }} + #[inline] pub fn match_selection(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).MatchSelection)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_index(&self, unit: TextRangeUnit, index: i32, extend: bool) -> Result<()> { + }} + #[inline] pub fn set_index(&self, unit: TextRangeUnit, index: i32, extend: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetIndex)(self as *const _ as *mut _, unit, index, extend); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_point(&self, point: super::super::foundation::Point, options: PointOptions, extend: bool) -> Result<()> { + }} + #[inline] pub fn set_point(&self, point: foundation::Point, options: PointOptions, extend: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetPoint)(self as *const _ as *mut _, point, options, extend); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_range(&self, startPosition: i32, endPosition: i32) -> Result<()> { + }} + #[inline] pub fn set_range(&self, startPosition: i32, endPosition: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetRange)(self as *const _ as *mut _, startPosition, endPosition); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_text(&self, options: TextSetOptions, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_text(&self, options: TextSetOptions, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetText)(self as *const _ as *mut _, options, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-storage")] #[inline] pub unsafe fn set_text_via_stream(&self, options: TextSetOptions, value: &super::super::storage::streams::IRandomAccessStream) -> Result<()> { + }} + #[cfg(feature="windows-storage")] #[inline] pub fn set_text_via_stream(&self, options: TextSetOptions, value: &super::super::storage::streams::IRandomAccessStream) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetTextViaStream)(self as *const _ as *mut _, options, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start_of(&self, unit: TextRangeUnit, extend: bool) -> Result { + }} + #[inline] pub fn start_of(&self, unit: TextRangeUnit, extend: bool) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).StartOf)(self as *const _ as *mut _, unit, extend, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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, @@ -9590,54 +9590,54 @@ RT_INTERFACE!{interface ITextSelection(ITextSelectionVtbl): IInspectable(IInspec fn TypeText(&self, value: HSTRING) -> HRESULT }} impl ITextSelection { - #[inline] pub unsafe fn get_options(&self) -> Result { + #[inline] pub fn get_options(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Options)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_options(&self, value: SelectionOptions) -> Result<()> { + }} + #[inline] pub fn set_options(&self, value: SelectionOptions) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Options)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_type(&self) -> Result { + }} + #[inline] pub fn get_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Type)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn end_key(&self, unit: TextRangeUnit, extend: bool) -> Result { + }} + #[inline] pub fn end_key(&self, unit: TextRangeUnit, extend: bool) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).EndKey)(self as *const _ as *mut _, unit, extend, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn home_key(&self, unit: TextRangeUnit, extend: bool) -> Result { + }} + #[inline] pub fn home_key(&self, unit: TextRangeUnit, extend: bool) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).HomeKey)(self as *const _ as *mut _, unit, extend, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn move_down(&self, unit: TextRangeUnit, count: i32, extend: bool) -> Result { + }} + #[inline] pub fn move_down(&self, unit: TextRangeUnit, count: i32, extend: bool) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).MoveDown)(self as *const _ as *mut _, unit, count, extend, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn move_left(&self, unit: TextRangeUnit, count: i32, extend: bool) -> Result { + }} + #[inline] pub fn move_left(&self, unit: TextRangeUnit, count: i32, extend: bool) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).MoveLeft)(self as *const _ as *mut _, unit, count, extend, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn move_right(&self, unit: TextRangeUnit, count: i32, extend: bool) -> Result { + }} + #[inline] pub fn move_right(&self, unit: TextRangeUnit, count: i32, extend: bool) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).MoveRight)(self as *const _ as *mut _, unit, count, extend, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn move_up(&self, unit: TextRangeUnit, count: i32, extend: bool) -> Result { + }} + #[inline] pub fn move_up(&self, unit: TextRangeUnit, count: i32, extend: bool) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).MoveUp)(self as *const _ as *mut _, unit, count, extend, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn type_text(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn type_text(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).TypeText)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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, @@ -9653,25 +9653,25 @@ use ::prelude::*; 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(&self, out: *mut bool) -> HRESULT, - fn get_CompositionSegments(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn get_CompositionSegments(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl ICoreTextCompositionCompletedEventArgs { - #[inline] pub unsafe fn get_is_canceled(&self) -> Result { + #[inline] pub fn get_is_canceled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCanceled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_composition_segments(&self) -> Result>> { + }} + #[inline] pub fn get_composition_segments(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CompositionSegments)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CoreTextCompositionCompletedEventArgs: ICoreTextCompositionCompletedEventArgs} DEFINE_IID!(IID_ICoreTextCompositionSegment, 2003594201, 20141, 19879, 143, 71, 58, 136, 181, 35, 204, 52); @@ -9680,34 +9680,34 @@ RT_INTERFACE!{interface ICoreTextCompositionSegment(ICoreTextCompositionSegmentV fn get_Range(&self, out: *mut CoreTextRange) -> HRESULT }} impl ICoreTextCompositionSegment { - #[inline] pub unsafe fn get_preconversion_string(&self) -> Result { + #[inline] pub fn get_preconversion_string(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PreconversionString)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_range(&self) -> Result { + }} + #[inline] pub fn get_range(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Range)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class CoreTextCompositionSegment: ICoreTextCompositionSegment} 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(&self, out: *mut bool) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl ICoreTextCompositionStartedEventArgs { - #[inline] pub unsafe fn get_is_canceled(&self) -> Result { + #[inline] pub fn get_is_canceled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCanceled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CoreTextCompositionStartedEventArgs: ICoreTextCompositionStartedEventArgs} DEFINE_IID!(IID_ICoreTextEditContext, 3211135151, 16449, 18371, 178, 99, 169, 24, 235, 94, 174, 242); @@ -9720,24 +9720,24 @@ RT_INTERFACE!{interface ICoreTextEditContext(ICoreTextEditContextVtbl): IInspect fn put_IsReadOnly(&self, value: bool) -> HRESULT, fn get_InputPaneDisplayPolicy(&self, out: *mut CoreTextInputPaneDisplayPolicy) -> HRESULT, fn put_InputPaneDisplayPolicy(&self, value: CoreTextInputPaneDisplayPolicy) -> HRESULT, - fn add_TextRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_TextRequested(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_SelectionRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SelectionRequested(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_LayoutRequested(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_LayoutRequested(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_TextUpdating(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_TextUpdating(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_SelectionUpdating(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SelectionUpdating(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_FormatUpdating(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_FormatUpdating(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_CompositionStarted(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CompositionStarted(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_CompositionCompleted(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CompositionCompleted(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_FocusRemoved(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_FocusRemoved(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_TextRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_TextRequested(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_SelectionRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SelectionRequested(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_LayoutRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_LayoutRequested(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_TextUpdating(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_TextUpdating(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_SelectionUpdating(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SelectionUpdating(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_FormatUpdating(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_FormatUpdating(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_CompositionStarted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CompositionStarted(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_CompositionCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CompositionCompleted(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_FocusRemoved(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_FocusRemoved(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, fn NotifyFocusEnter(&self) -> HRESULT, fn NotifyFocusLeave(&self) -> HRESULT, fn NotifyTextChanged(&self, modifiedRange: CoreTextRange, newLength: i32, newSelection: CoreTextRange) -> HRESULT, @@ -9745,224 +9745,224 @@ RT_INTERFACE!{interface ICoreTextEditContext(ICoreTextEditContextVtbl): IInspect fn NotifyLayoutChanged(&self) -> HRESULT }} impl ICoreTextEditContext { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Name)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_input_scope(&self) -> Result { + }} + #[inline] pub fn get_input_scope(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InputScope)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_input_scope(&self, value: CoreTextInputScope) -> Result<()> { + }} + #[inline] pub fn set_input_scope(&self, value: CoreTextInputScope) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InputScope)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_read_only(&self) -> Result { + }} + #[inline] pub fn get_is_read_only(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsReadOnly)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_read_only(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_read_only(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsReadOnly)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_input_pane_display_policy(&self) -> Result { + }} + #[inline] pub fn get_input_pane_display_policy(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InputPaneDisplayPolicy)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_input_pane_display_policy(&self, value: CoreTextInputPaneDisplayPolicy) -> Result<()> { + }} + #[inline] pub fn set_input_pane_display_policy(&self, value: CoreTextInputPaneDisplayPolicy) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InputPaneDisplayPolicy)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_text_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_text_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_TextRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_text_requested(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_text_requested(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_TextRequested)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_selection_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_selection_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SelectionRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_selection_requested(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_selection_requested(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SelectionRequested)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_layout_requested(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_layout_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_LayoutRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_layout_requested(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_layout_requested(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_LayoutRequested)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_text_updating(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_text_updating(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_TextUpdating)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_text_updating(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_text_updating(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_TextUpdating)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_selection_updating(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_selection_updating(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SelectionUpdating)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_selection_updating(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_selection_updating(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SelectionUpdating)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_format_updating(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_format_updating(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_FormatUpdating)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_format_updating(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_format_updating(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_FormatUpdating)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_composition_started(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_composition_started(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CompositionStarted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_composition_started(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_composition_started(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CompositionStarted)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_composition_completed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_composition_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CompositionCompleted)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_composition_completed(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_composition_completed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CompositionCompleted)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_focus_removed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_focus_removed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_FocusRemoved)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_focus_removed(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_focus_removed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_FocusRemoved)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn notify_focus_enter(&self) -> Result<()> { + }} + #[inline] pub fn notify_focus_enter(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).NotifyFocusEnter)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn notify_focus_leave(&self) -> Result<()> { + }} + #[inline] pub fn notify_focus_leave(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).NotifyFocusLeave)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn notify_text_changed(&self, modifiedRange: CoreTextRange, newLength: i32, newSelection: CoreTextRange) -> Result<()> { + }} + #[inline] pub fn notify_text_changed(&self, modifiedRange: CoreTextRange, newLength: i32, newSelection: CoreTextRange) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).NotifyTextChanged)(self as *const _ as *mut _, modifiedRange, newLength, newSelection); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn notify_selection_changed(&self, selection: CoreTextRange) -> Result<()> { + }} + #[inline] pub fn notify_selection_changed(&self, selection: CoreTextRange) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).NotifySelectionChanged)(self as *const _ as *mut _, selection); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn notify_layout_changed(&self) -> Result<()> { + }} + #[inline] pub fn notify_layout_changed(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).NotifyLayoutChanged)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CoreTextEditContext: ICoreTextEditContext} 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(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_NotifyFocusLeaveCompleted(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn add_NotifyFocusLeaveCompleted(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_NotifyFocusLeaveCompleted(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl ICoreTextEditContext2 { - #[inline] pub unsafe fn add_notify_focus_leave_completed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub fn add_notify_focus_leave_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_NotifyFocusLeaveCompleted)(self as *const _ as *mut _, 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(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_notify_focus_leave_completed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_NotifyFocusLeaveCompleted)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } 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(&self, out: *mut CoreTextRange) -> HRESULT, - fn get_TextColor(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn get_BackgroundColor(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn get_UnderlineColor(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn get_UnderlineType(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_TextColor(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_BackgroundColor(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_UnderlineColor(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_UnderlineType(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn get_Reason(&self, out: *mut CoreTextFormatUpdatingReason) -> HRESULT, fn get_Result(&self, out: *mut CoreTextFormatUpdatingResult) -> HRESULT, fn put_Result(&self, value: CoreTextFormatUpdatingResult) -> HRESULT, fn get_IsCanceled(&self, out: *mut bool) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl ICoreTextFormatUpdatingEventArgs { - #[inline] pub unsafe fn get_range(&self) -> Result { + #[inline] pub fn get_range(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Range)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_text_color(&self) -> Result>> { + }} + #[inline] pub fn get_text_color(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TextColor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_background_color(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_background_color(&self) -> Result>>> { unsafe { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_BackgroundColor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_underline_color(&self) -> Result>> { + let hr = ((*self.lpVtbl).get_BackgroundColor)(self as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_underline_color(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UnderlineColor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_underline_type(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_underline_type(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UnderlineType)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_reason(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_reason(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Reason)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_result(&self) -> Result { + }} + #[inline] pub fn get_result(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Result)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_result(&self, value: CoreTextFormatUpdatingResult) -> Result<()> { + }} + #[inline] pub fn set_result(&self, value: CoreTextFormatUpdatingResult) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Result)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_canceled(&self) -> Result { + }} + #[inline] pub fn get_is_canceled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCanceled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CoreTextFormatUpdatingEventArgs: ICoreTextFormatUpdatingEventArgs} RT_ENUM! { enum CoreTextFormatUpdatingReason: i32 { @@ -9979,30 +9979,30 @@ RT_ENUM! { enum CoreTextInputScope: i32 { }} 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(&self, out: *mut ::rt::gen::windows::foundation::Rect) -> HRESULT, - fn put_TextBounds(&self, value: ::rt::gen::windows::foundation::Rect) -> HRESULT, - fn get_ControlBounds(&self, out: *mut ::rt::gen::windows::foundation::Rect) -> HRESULT, - fn put_ControlBounds(&self, value: ::rt::gen::windows::foundation::Rect) -> HRESULT + fn get_TextBounds(&self, out: *mut foundation::Rect) -> HRESULT, + fn put_TextBounds(&self, value: foundation::Rect) -> HRESULT, + fn get_ControlBounds(&self, out: *mut foundation::Rect) -> HRESULT, + fn put_ControlBounds(&self, value: foundation::Rect) -> HRESULT }} impl ICoreTextLayoutBounds { - #[inline] pub unsafe fn get_text_bounds(&self) -> Result<::rt::gen::windows::foundation::Rect> { + #[inline] pub fn get_text_bounds(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TextBounds)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_text_bounds(&self, value: ::rt::gen::windows::foundation::Rect) -> Result<()> { + }} + #[inline] pub fn set_text_bounds(&self, value: foundation::Rect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TextBounds)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_control_bounds(&self) -> Result<::rt::gen::windows::foundation::Rect> { + }} + #[inline] pub fn get_control_bounds(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ControlBounds)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_control_bounds(&self, value: ::rt::gen::windows::foundation::Rect) -> Result<()> { + }} + #[inline] pub fn set_control_bounds(&self, value: foundation::Rect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ControlBounds)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CoreTextLayoutBounds: ICoreTextLayoutBounds} DEFINE_IID!(IID_ICoreTextLayoutRequest, 626370764, 20989, 20227, 152, 191, 172, 120, 23, 77, 104, 224); @@ -10010,29 +10010,29 @@ RT_INTERFACE!{interface ICoreTextLayoutRequest(ICoreTextLayoutRequestVtbl): IIns fn get_Range(&self, out: *mut CoreTextRange) -> HRESULT, fn get_LayoutBounds(&self, out: *mut *mut CoreTextLayoutBounds) -> HRESULT, fn get_IsCanceled(&self, out: *mut bool) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl ICoreTextLayoutRequest { - #[inline] pub unsafe fn get_range(&self) -> Result { + #[inline] pub fn get_range(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Range)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_layout_bounds(&self) -> Result> { + }} + #[inline] pub fn get_layout_bounds(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LayoutBounds)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_canceled(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_canceled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCanceled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CoreTextLayoutRequest: ICoreTextLayoutRequest} DEFINE_IID!(IID_ICoreTextLayoutRequestedEventArgs, 2984012512, 39547, 20126, 165, 102, 74, 107, 95, 138, 214, 118); @@ -10040,11 +10040,11 @@ RT_INTERFACE!{interface ICoreTextLayoutRequestedEventArgs(ICoreTextLayoutRequest fn get_Request(&self, out: *mut *mut CoreTextLayoutRequest) -> HRESULT }} impl ICoreTextLayoutRequestedEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CoreTextLayoutRequestedEventArgs: ICoreTextLayoutRequestedEventArgs} RT_STRUCT! { struct CoreTextRange { @@ -10055,28 +10055,28 @@ RT_INTERFACE!{interface ICoreTextSelectionRequest(ICoreTextSelectionRequestVtbl) fn get_Selection(&self, out: *mut CoreTextRange) -> HRESULT, fn put_Selection(&self, value: CoreTextRange) -> HRESULT, fn get_IsCanceled(&self, out: *mut bool) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl ICoreTextSelectionRequest { - #[inline] pub unsafe fn get_selection(&self) -> Result { + #[inline] pub fn get_selection(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Selection)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_selection(&self, value: CoreTextRange) -> Result<()> { + }} + #[inline] pub fn set_selection(&self, value: CoreTextRange) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Selection)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_canceled(&self) -> Result { + }} + #[inline] pub fn get_is_canceled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCanceled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CoreTextSelectionRequest: ICoreTextSelectionRequest} DEFINE_IID!(IID_ICoreTextSelectionRequestedEventArgs, 331769899, 62996, 16922, 143, 75, 158, 200, 165, 163, 127, 205); @@ -10084,11 +10084,11 @@ RT_INTERFACE!{interface ICoreTextSelectionRequestedEventArgs(ICoreTextSelectionR fn get_Request(&self, out: *mut *mut CoreTextSelectionRequest) -> HRESULT }} impl ICoreTextSelectionRequestedEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CoreTextSelectionRequestedEventArgs: ICoreTextSelectionRequestedEventArgs} DEFINE_IID!(IID_ICoreTextSelectionUpdatingEventArgs, 3561325471, 65151, 19413, 138, 38, 9, 34, 193, 179, 230, 57); @@ -10097,33 +10097,33 @@ RT_INTERFACE!{interface ICoreTextSelectionUpdatingEventArgs(ICoreTextSelectionUp fn get_Result(&self, out: *mut CoreTextSelectionUpdatingResult) -> HRESULT, fn put_Result(&self, value: CoreTextSelectionUpdatingResult) -> HRESULT, fn get_IsCanceled(&self, out: *mut bool) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl ICoreTextSelectionUpdatingEventArgs { - #[inline] pub unsafe fn get_selection(&self) -> Result { + #[inline] pub fn get_selection(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Selection)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_result(&self) -> Result { + }} + #[inline] pub fn get_result(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Result)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_result(&self, value: CoreTextSelectionUpdatingResult) -> Result<()> { + }} + #[inline] pub fn set_result(&self, value: CoreTextSelectionUpdatingResult) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Result)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_canceled(&self) -> Result { + }} + #[inline] pub fn get_is_canceled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCanceled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CoreTextSelectionUpdatingEventArgs: ICoreTextSelectionUpdatingEventArgs} RT_ENUM! { enum CoreTextSelectionUpdatingResult: i32 { @@ -10132,46 +10132,46 @@ RT_ENUM! { enum CoreTextSelectionUpdatingResult: i32 { RT_CLASS!{static class CoreTextServicesConstants} impl RtActivatable for CoreTextServicesConstants {} impl CoreTextServicesConstants { - #[inline] pub fn get_hidden_character() -> Result { unsafe { + #[inline] pub fn get_hidden_character() -> Result { >::get_activation_factory().get_hidden_character() - }} + } } DEFINE_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]) [CLSID_CoreTextServicesConstants]); 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(&self) -> (), #[cfg(feature="windows-globalization")] fn get_InputLanguage(&self, out: *mut *mut ::rt::gen::windows::globalization::Language) -> HRESULT, - fn add_InputLanguageChanged(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_InputLanguageChanged(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, + fn add_InputLanguageChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_InputLanguageChanged(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, fn CreateEditContext(&self, out: *mut *mut CoreTextEditContext) -> HRESULT }} impl ICoreTextServicesManager { - #[cfg(feature="windows-globalization")] #[inline] pub unsafe fn get_input_language(&self) -> Result> { + #[cfg(feature="windows-globalization")] #[inline] pub fn get_input_language(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InputLanguage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_input_language_changed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_input_language_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_InputLanguageChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_input_language_changed(&self, cookie: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_input_language_changed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_InputLanguageChanged)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn create_edit_context(&self) -> Result> { + }} + #[inline] pub fn create_edit_context(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateEditContext)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CoreTextServicesManager: ICoreTextServicesManager} impl RtActivatable for CoreTextServicesManager {} impl CoreTextServicesManager { - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} + } } DEFINE_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]) [CLSID_CoreTextServicesManager]); DEFINE_IID!(IID_ICoreTextServicesManagerStatics, 354460552, 58063, 19813, 174, 185, 179, 45, 134, 254, 57, 185); @@ -10179,22 +10179,22 @@ RT_INTERFACE!{static interface ICoreTextServicesManagerStatics(ICoreTextServices fn GetForCurrentView(&self, out: *mut *mut CoreTextServicesManager) -> HRESULT }} impl ICoreTextServicesManagerStatics { - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut Char) -> HRESULT }} impl ICoreTextServicesStatics { - #[inline] pub unsafe fn get_hidden_character(&self) -> Result { + #[inline] pub fn get_hidden_character(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HiddenCharacter)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ICoreTextTextRequest, 1356419241, 62750, 19649, 140, 161, 230, 52, 109, 26, 97, 190); RT_INTERFACE!{interface ICoreTextTextRequest(ICoreTextTextRequestVtbl): IInspectable(IInspectableVtbl) [IID_ICoreTextTextRequest] { @@ -10202,33 +10202,33 @@ RT_INTERFACE!{interface ICoreTextTextRequest(ICoreTextTextRequestVtbl): IInspect fn get_Text(&self, out: *mut HSTRING) -> HRESULT, fn put_Text(&self, value: HSTRING) -> HRESULT, fn get_IsCanceled(&self, out: *mut bool) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl ICoreTextTextRequest { - #[inline] pub unsafe fn get_range(&self) -> Result { + #[inline] pub fn get_range(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Range)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_text(&self) -> Result { + }} + #[inline] pub fn get_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Text)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_text(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_text(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Text)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_canceled(&self) -> Result { + }} + #[inline] pub fn get_is_canceled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCanceled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CoreTextTextRequest: ICoreTextTextRequest} DEFINE_IID!(IID_ICoreTextTextRequestedEventArgs, 4036403920, 16838, 19458, 139, 26, 217, 83, 176, 12, 171, 179); @@ -10236,11 +10236,11 @@ RT_INTERFACE!{interface ICoreTextTextRequestedEventArgs(ICoreTextTextRequestedEv fn get_Request(&self, out: *mut *mut CoreTextTextRequest) -> HRESULT }} impl ICoreTextTextRequestedEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CoreTextTextRequestedEventArgs: ICoreTextTextRequestedEventArgs} DEFINE_IID!(IID_ICoreTextTextUpdatingEventArgs, 4003959181, 52267, 20227, 143, 246, 2, 253, 33, 125, 180, 80); @@ -10253,48 +10253,48 @@ RT_INTERFACE!{interface ICoreTextTextUpdatingEventArgs(ICoreTextTextUpdatingEven fn get_Result(&self, out: *mut CoreTextTextUpdatingResult) -> HRESULT, fn put_Result(&self, value: CoreTextTextUpdatingResult) -> HRESULT, fn get_IsCanceled(&self, out: *mut bool) -> HRESULT, - fn GetDeferral(&self, out: *mut *mut ::rt::gen::windows::foundation::Deferral) -> HRESULT + fn GetDeferral(&self, out: *mut *mut foundation::Deferral) -> HRESULT }} impl ICoreTextTextUpdatingEventArgs { - #[inline] pub unsafe fn get_range(&self) -> Result { + #[inline] pub fn get_range(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Range)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_text(&self) -> Result { + }} + #[inline] pub fn get_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Text)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_new_selection(&self) -> Result { + }} + #[inline] pub fn get_new_selection(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NewSelection)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-globalization")] #[inline] pub unsafe fn get_input_language(&self) -> Result> { + }} + #[cfg(feature="windows-globalization")] #[inline] pub fn get_input_language(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InputLanguage)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_result(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_result(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Result)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_result(&self, value: CoreTextTextUpdatingResult) -> Result<()> { + }} + #[inline] pub fn set_result(&self, value: CoreTextTextUpdatingResult) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Result)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_canceled(&self) -> Result { + }} + #[inline] pub fn get_is_canceled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCanceled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CoreTextTextUpdatingEventArgs: ICoreTextTextUpdatingEventArgs} RT_ENUM! { enum CoreTextTextUpdatingResult: i32 { @@ -10308,55 +10308,55 @@ DEFINE_IID!(IID_IAccessibilitySettings, 4262363463, 50368, 17762, 185, 98, 19, 3 RT_INTERFACE!{interface IAccessibilitySettings(IAccessibilitySettingsVtbl): IInspectable(IInspectableVtbl) [IID_IAccessibilitySettings] { fn get_HighContrast(&self, out: *mut bool) -> HRESULT, fn get_HighContrastScheme(&self, out: *mut HSTRING) -> HRESULT, - fn add_HighContrastChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_HighContrastChanged(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_HighContrastChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_HighContrastChanged(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl IAccessibilitySettings { - #[inline] pub unsafe fn get_high_contrast(&self) -> Result { + #[inline] pub fn get_high_contrast(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HighContrast)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_high_contrast_scheme(&self) -> Result { + }} + #[inline] pub fn get_high_contrast_scheme(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HighContrastScheme)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_high_contrast_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_high_contrast_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_HighContrastChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_high_contrast_changed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_high_contrast_changed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_HighContrastChanged)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AccessibilitySettings: IAccessibilitySettings} impl RtActivatable for AccessibilitySettings {} DEFINE_CLSID!(AccessibilitySettings(&[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,99,99,101,115,115,105,98,105,108,105,116,121,83,101,116,116,105,110,103,115,0]) [CLSID_AccessibilitySettings]); 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(&self, viewId: i32, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn ShowAsStandaloneWithSizePreferenceAsync(&self, viewId: i32, sizePreference: ViewSizePreference, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn ShowAsStandaloneAsync(&self, viewId: i32, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ShowAsStandaloneWithSizePreferenceAsync(&self, viewId: i32, sizePreference: ViewSizePreference, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn IsViewPresentedOnActivationVirtualDesktop(&self, viewId: i32, out: *mut bool) -> HRESULT }} impl IActivationViewSwitcher { - #[inline] pub unsafe fn show_as_standalone_async(&self, viewId: i32) -> Result> { + #[inline] pub fn show_as_standalone_async(&self, viewId: i32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowAsStandaloneAsync)(self as *const _ as *mut _, 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(&self, viewId: i32, sizePreference: ViewSizePreference) -> Result> { + }} + #[inline] pub fn show_as_standalone_with_size_preference_async(&self, viewId: i32, sizePreference: ViewSizePreference) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowAsStandaloneWithSizePreferenceAsync)(self as *const _ as *mut _, 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(&self, viewId: i32) -> Result { + }} + #[inline] pub fn is_view_presented_on_activation_virtual_desktop(&self, viewId: i32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsViewPresentedOnActivationVirtualDesktop)(self as *const _ as *mut _, viewId, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ActivationViewSwitcher: IActivationViewSwitcher} DEFINE_IID!(IID_IApplicationView, 3525498137, 17249, 17694, 150, 196, 96, 244, 249, 116, 45, 176); @@ -10371,67 +10371,67 @@ RT_INTERFACE!{interface IApplicationView(IApplicationViewVtbl): IInspectable(IIn fn put_Title(&self, value: HSTRING) -> HRESULT, fn get_Title(&self, out: *mut HSTRING) -> HRESULT, fn get_Id(&self, out: *mut i32) -> HRESULT, - fn add_Consolidated(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Consolidated(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_Consolidated(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Consolidated(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IApplicationView { - #[inline] pub unsafe fn get_orientation(&self) -> Result { + #[inline] pub fn get_orientation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Orientation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_adjacent_to_left_display_edge(&self) -> Result { + }} + #[inline] pub fn get_adjacent_to_left_display_edge(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AdjacentToLeftDisplayEdge)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_adjacent_to_right_display_edge(&self) -> Result { + }} + #[inline] pub fn get_adjacent_to_right_display_edge(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AdjacentToRightDisplayEdge)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_full_screen(&self) -> Result { + }} + #[inline] pub fn get_is_full_screen(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsFullScreen)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_on_lock_screen(&self) -> Result { + }} + #[inline] pub fn get_is_on_lock_screen(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsOnLockScreen)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_screen_capture_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_screen_capture_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsScreenCaptureEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_screen_capture_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_screen_capture_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsScreenCaptureEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_title(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_title(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Title)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_title(&self) -> Result { + }} + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&self) -> Result { + }} + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_consolidated(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_consolidated(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Consolidated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_consolidated(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_consolidated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Consolidated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ApplicationView: IApplicationView} impl RtActivatable for ApplicationView {} @@ -10440,85 +10440,85 @@ impl RtActivatable for ApplicationView {} impl RtActivatable for ApplicationView {} impl RtActivatable for ApplicationView {} impl ApplicationView { - #[inline] pub fn try_unsnap_to_fullscreen() -> Result { unsafe { + #[inline] pub fn try_unsnap_to_fullscreen() -> Result { >::get_activation_factory().try_unsnap_to_fullscreen() - }} - #[inline] pub fn get_application_view_id_for_window(window: &super::core::ICoreWindow) -> Result { unsafe { + } + #[inline] pub fn get_application_view_id_for_window(window: &super::core::ICoreWindow) -> Result { >::get_activation_factory().get_application_view_id_for_window(window) - }} - #[inline] pub fn get_value() -> Result { unsafe { + } + #[inline] pub fn get_value() -> Result { >::get_activation_factory().get_value() - }} - #[inline] pub fn try_unsnap() -> Result { unsafe { + } + #[inline] pub fn try_unsnap() -> Result { >::get_activation_factory().try_unsnap() - }} - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + } + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} - #[inline] pub fn get_terminate_app_on_final_view_close() -> Result { unsafe { + } + #[inline] pub fn get_terminate_app_on_final_view_close() -> Result { >::get_activation_factory().get_terminate_app_on_final_view_close() - }} - #[inline] pub fn set_terminate_app_on_final_view_close(value: bool) -> Result<()> { unsafe { + } + #[inline] pub fn set_terminate_app_on_final_view_close(value: bool) -> Result<()> { >::get_activation_factory().set_terminate_app_on_final_view_close(value) - }} - #[inline] pub fn get_preferred_launch_windowing_mode() -> Result { unsafe { + } + #[inline] pub fn get_preferred_launch_windowing_mode() -> Result { >::get_activation_factory().get_preferred_launch_windowing_mode() - }} - #[inline] pub fn set_preferred_launch_windowing_mode(value: ApplicationViewWindowingMode) -> Result<()> { unsafe { + } + #[inline] pub fn set_preferred_launch_windowing_mode(value: ApplicationViewWindowingMode) -> Result<()> { >::get_activation_factory().set_preferred_launch_windowing_mode(value) - }} - #[inline] pub fn get_preferred_launch_view_size() -> Result { unsafe { + } + #[inline] pub fn get_preferred_launch_view_size() -> Result { >::get_activation_factory().get_preferred_launch_view_size() - }} - #[inline] pub fn set_preferred_launch_view_size(value: super::super::foundation::Size) -> Result<()> { unsafe { + } + #[inline] pub fn set_preferred_launch_view_size(value: foundation::Size) -> Result<()> { >::get_activation_factory().set_preferred_launch_view_size(value) - }} + } } DEFINE_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]) [CLSID_ApplicationView]); 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(&self, out: *mut bool) -> HRESULT, fn put_SuppressSystemOverlays(&self, value: bool) -> HRESULT, - fn get_VisibleBounds(&self, out: *mut super::super::foundation::Rect) -> HRESULT, - fn add_VisibleBoundsChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_VisibleBoundsChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_VisibleBounds(&self, out: *mut foundation::Rect) -> HRESULT, + fn add_VisibleBoundsChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_VisibleBoundsChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn SetDesiredBoundsMode(&self, boundsMode: ApplicationViewBoundsMode, out: *mut bool) -> HRESULT, fn get_DesiredBoundsMode(&self, out: *mut ApplicationViewBoundsMode) -> HRESULT }} impl IApplicationView2 { - #[inline] pub unsafe fn get_suppress_system_overlays(&self) -> Result { + #[inline] pub fn get_suppress_system_overlays(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SuppressSystemOverlays)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_suppress_system_overlays(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_suppress_system_overlays(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SuppressSystemOverlays)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_visible_bounds(&self) -> Result { + }} + #[inline] pub fn get_visible_bounds(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VisibleBounds)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_visible_bounds_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_visible_bounds_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_VisibleBoundsChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_visible_bounds_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_visible_bounds_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_VisibleBoundsChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_desired_bounds_mode(&self, boundsMode: ApplicationViewBoundsMode) -> Result { + }} + #[inline] pub fn set_desired_bounds_mode(&self, boundsMode: ApplicationViewBoundsMode) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).SetDesiredBoundsMode)(self as *const _ as *mut _, boundsMode, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_desired_bounds_mode(&self) -> Result { + }} + #[inline] pub fn get_desired_bounds_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DesiredBoundsMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IApplicationView3, 2419891429, 31034, 20447, 162, 178, 175, 26, 194, 30, 49, 8); RT_INTERFACE!{interface IApplicationView3(IApplicationView3Vtbl): IInspectable(IInspectableVtbl) [IID_IApplicationView3] { @@ -10529,86 +10529,86 @@ RT_INTERFACE!{interface IApplicationView3(IApplicationView3Vtbl): IInspectable(I fn TryEnterFullScreenMode(&self, out: *mut bool) -> HRESULT, fn ExitFullScreenMode(&self) -> HRESULT, fn ShowStandardSystemOverlays(&self) -> HRESULT, - fn TryResizeView(&self, value: super::super::foundation::Size, out: *mut bool) -> HRESULT, - fn SetPreferredMinSize(&self, minSize: super::super::foundation::Size) -> HRESULT + fn TryResizeView(&self, value: foundation::Size, out: *mut bool) -> HRESULT, + fn SetPreferredMinSize(&self, minSize: foundation::Size) -> HRESULT }} impl IApplicationView3 { - #[inline] pub unsafe fn get_title_bar(&self) -> Result> { + #[inline] pub fn get_title_bar(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TitleBar)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_full_screen_system_overlay_mode(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_full_screen_system_overlay_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FullScreenSystemOverlayMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_full_screen_system_overlay_mode(&self, value: FullScreenSystemOverlayMode) -> Result<()> { + }} + #[inline] pub fn set_full_screen_system_overlay_mode(&self, value: FullScreenSystemOverlayMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FullScreenSystemOverlayMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_full_screen_mode(&self) -> Result { + }} + #[inline] pub fn get_is_full_screen_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsFullScreenMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn try_enter_full_screen_mode(&self) -> Result { + }} + #[inline] pub fn try_enter_full_screen_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TryEnterFullScreenMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn exit_full_screen_mode(&self) -> Result<()> { + }} + #[inline] pub fn exit_full_screen_mode(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ExitFullScreenMode)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn show_standard_system_overlays(&self) -> Result<()> { + }} + #[inline] pub fn show_standard_system_overlays(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ShowStandardSystemOverlays)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn try_resize_view(&self, value: super::super::foundation::Size) -> Result { + }} + #[inline] pub fn try_resize_view(&self, value: foundation::Size) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TryResizeView)(self as *const _ as *mut _, value, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_preferred_min_size(&self, minSize: super::super::foundation::Size) -> Result<()> { + }} + #[inline] pub fn set_preferred_min_size(&self, minSize: foundation::Size) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetPreferredMinSize)(self as *const _ as *mut _, minSize); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IApplicationView4, 367381484, 40463, 18101, 188, 63, 155, 246, 83, 231, 75, 94); RT_INTERFACE!{interface IApplicationView4(IApplicationView4Vtbl): IInspectable(IInspectableVtbl) [IID_IApplicationView4] { fn get_ViewMode(&self, out: *mut ApplicationViewMode) -> HRESULT, fn IsViewModeSupported(&self, viewMode: ApplicationViewMode, out: *mut bool) -> HRESULT, - fn TryEnterViewModeAsync(&self, viewMode: ApplicationViewMode, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryEnterViewModeWithPreferencesAsync(&self, viewMode: ApplicationViewMode, viewModePreferences: *mut ViewModePreferences, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryConsolidateAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn TryEnterViewModeAsync(&self, viewMode: ApplicationViewMode, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryEnterViewModeWithPreferencesAsync(&self, viewMode: ApplicationViewMode, viewModePreferences: *mut ViewModePreferences, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryConsolidateAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IApplicationView4 { - #[inline] pub unsafe fn get_view_mode(&self) -> Result { + #[inline] pub fn get_view_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ViewMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_view_mode_supported(&self, viewMode: ApplicationViewMode) -> Result { + }} + #[inline] pub fn is_view_mode_supported(&self, viewMode: ApplicationViewMode) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsViewModeSupported)(self as *const _ as *mut _, viewMode, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn try_enter_view_mode_async(&self, viewMode: ApplicationViewMode) -> Result>> { + }} + #[inline] pub fn try_enter_view_mode_async(&self, viewMode: ApplicationViewMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryEnterViewModeAsync)(self as *const _ as *mut _, viewMode, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_enter_view_mode_with_preferences_async(&self, viewMode: ApplicationViewMode, viewModePreferences: &ViewModePreferences) -> Result>> { + }} + #[inline] pub fn try_enter_view_mode_with_preferences_async(&self, viewMode: ApplicationViewMode, viewModePreferences: &ViewModePreferences) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryEnterViewModeWithPreferencesAsync)(self as *const _ as *mut _, viewMode, viewModePreferences as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_consolidate_async(&self) -> Result>> { + }} + #[inline] pub fn try_consolidate_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryConsolidateAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum ApplicationViewBoundsMode: i32 { UseVisible (ApplicationViewBoundsMode_UseVisible) = 0, UseCoreWindow (ApplicationViewBoundsMode_UseCoreWindow) = 1, @@ -10618,11 +10618,11 @@ RT_INTERFACE!{interface IApplicationViewConsolidatedEventArgs(IApplicationViewCo fn get_IsUserInitiated(&self, out: *mut bool) -> HRESULT }} impl IApplicationViewConsolidatedEventArgs { - #[inline] pub unsafe fn get_is_user_initiated(&self) -> Result { + #[inline] pub fn get_is_user_initiated(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsUserInitiated)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ApplicationViewConsolidatedEventArgs: IApplicationViewConsolidatedEventArgs} DEFINE_IID!(IID_IApplicationViewConsolidatedEventArgs2, 471441100, 28097, 16628, 175, 238, 7, 217, 234, 41, 100, 48); @@ -10630,33 +10630,33 @@ RT_INTERFACE!{interface IApplicationViewConsolidatedEventArgs2(IApplicationViewC fn get_IsAppInitiated(&self, out: *mut bool) -> HRESULT }} impl IApplicationViewConsolidatedEventArgs2 { - #[inline] pub unsafe fn get_is_app_initiated(&self) -> Result { + #[inline] pub fn get_is_app_initiated(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsAppInitiated)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } 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(&self, out: *mut bool) -> HRESULT }} impl IApplicationViewFullscreenStatics { - #[inline] pub unsafe fn try_unsnap_to_fullscreen(&self) -> Result { + #[inline] pub fn try_unsnap_to_fullscreen(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TryUnsnapToFullscreen)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } 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(&self, window: *mut super::core::ICoreWindow, out: *mut i32) -> HRESULT }} impl IApplicationViewInteropStatics { - #[inline] pub unsafe fn get_application_view_id_for_window(&self, window: &super::core::ICoreWindow) -> Result { + #[inline] pub fn get_application_view_id_for_window(&self, window: &super::core::ICoreWindow) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetApplicationViewIdForWindow)(self as *const _ as *mut _, window as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum ApplicationViewMode: i32 { Default (ApplicationViewMode_Default) = 0, CompactOverlay (ApplicationViewMode_CompactOverlay) = 1, @@ -10671,12 +10671,12 @@ RT_INTERFACE!{interface IApplicationViewScaling(IApplicationViewScalingVtbl): II RT_CLASS!{class ApplicationViewScaling: IApplicationViewScaling} impl RtActivatable for ApplicationViewScaling {} impl ApplicationViewScaling { - #[inline] pub fn get_disable_layout_scaling() -> Result { unsafe { + #[inline] pub fn get_disable_layout_scaling() -> Result { >::get_activation_factory().get_disable_layout_scaling() - }} - #[inline] pub fn try_set_disable_layout_scaling(disableLayoutScaling: bool) -> Result { unsafe { + } + #[inline] pub fn try_set_disable_layout_scaling(disableLayoutScaling: bool) -> Result { >::get_activation_factory().try_set_disable_layout_scaling(disableLayoutScaling) - }} + } } DEFINE_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]) [CLSID_ApplicationViewScaling]); DEFINE_IID!(IID_IApplicationViewScalingStatics, 2962222320, 47430, 17864, 165, 227, 113, 245, 170, 120, 248, 97); @@ -10685,16 +10685,16 @@ RT_INTERFACE!{static interface IApplicationViewScalingStatics(IApplicationViewSc fn TrySetDisableLayoutScaling(&self, disableLayoutScaling: bool, out: *mut bool) -> HRESULT }} impl IApplicationViewScalingStatics { - #[inline] pub unsafe fn get_disable_layout_scaling(&self) -> Result { + #[inline] pub fn get_disable_layout_scaling(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DisableLayoutScaling)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn try_set_disable_layout_scaling(&self, disableLayoutScaling: bool) -> Result { + }} + #[inline] pub fn try_set_disable_layout_scaling(&self, disableLayoutScaling: bool) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TrySetDisableLayoutScaling)(self as *const _ as *mut _, disableLayoutScaling, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum ApplicationViewState: i32 { FullScreenLandscape (ApplicationViewState_FullScreenLandscape) = 0, Filled (ApplicationViewState_Filled) = 1, Snapped (ApplicationViewState_Snapped) = 2, FullScreenPortrait (ApplicationViewState_FullScreenPortrait) = 3, @@ -10705,16 +10705,16 @@ RT_INTERFACE!{static interface IApplicationViewStatics(IApplicationViewStaticsVt fn TryUnsnap(&self, out: *mut bool) -> HRESULT }} impl IApplicationViewStatics { - #[inline] pub unsafe fn get_value(&self) -> Result { + #[inline] pub fn get_value(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn try_unsnap(&self) -> Result { + }} + #[inline] pub fn try_unsnap(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TryUnsnap)(self as *const _ as *mut _, &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] { @@ -10723,306 +10723,306 @@ RT_INTERFACE!{static interface IApplicationViewStatics2(IApplicationViewStatics2 fn put_TerminateAppOnFinalViewClose(&self, value: bool) -> HRESULT }} impl IApplicationViewStatics2 { - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_terminate_app_on_final_view_close(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_terminate_app_on_final_view_close(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TerminateAppOnFinalViewClose)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_terminate_app_on_final_view_close(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_terminate_app_on_final_view_close(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TerminateAppOnFinalViewClose)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut ApplicationViewWindowingMode) -> HRESULT, fn put_PreferredLaunchWindowingMode(&self, value: ApplicationViewWindowingMode) -> HRESULT, - fn get_PreferredLaunchViewSize(&self, out: *mut super::super::foundation::Size) -> HRESULT, - fn put_PreferredLaunchViewSize(&self, value: super::super::foundation::Size) -> HRESULT + fn get_PreferredLaunchViewSize(&self, out: *mut foundation::Size) -> HRESULT, + fn put_PreferredLaunchViewSize(&self, value: foundation::Size) -> HRESULT }} impl IApplicationViewStatics3 { - #[inline] pub unsafe fn get_preferred_launch_windowing_mode(&self) -> Result { + #[inline] pub fn get_preferred_launch_windowing_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PreferredLaunchWindowingMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_preferred_launch_windowing_mode(&self, value: ApplicationViewWindowingMode) -> Result<()> { + }} + #[inline] pub fn set_preferred_launch_windowing_mode(&self, value: ApplicationViewWindowingMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PreferredLaunchWindowingMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_preferred_launch_view_size(&self) -> Result { + }} + #[inline] pub fn get_preferred_launch_view_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PreferredLaunchViewSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_preferred_launch_view_size(&self, value: super::super::foundation::Size) -> Result<()> { + }} + #[inline] pub fn set_preferred_launch_view_size(&self, value: foundation::Size) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PreferredLaunchViewSize)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{static class ApplicationViewSwitcher} impl RtActivatable for ApplicationViewSwitcher {} impl RtActivatable for ApplicationViewSwitcher {} impl RtActivatable for ApplicationViewSwitcher {} impl ApplicationViewSwitcher { - #[inline] pub fn disable_showing_main_view_on_activation() -> Result<()> { unsafe { + #[inline] pub fn disable_showing_main_view_on_activation() -> Result<()> { >::get_activation_factory().disable_showing_main_view_on_activation() - }} - #[inline] pub fn try_show_as_standalone_async(viewId: i32) -> Result>> { unsafe { + } + #[inline] pub fn try_show_as_standalone_async(viewId: i32) -> Result>> { >::get_activation_factory().try_show_as_standalone_async(viewId) - }} - #[inline] pub fn try_show_as_standalone_with_size_preference_async(viewId: i32, sizePreference: ViewSizePreference) -> Result>> { unsafe { + } + #[inline] pub fn try_show_as_standalone_with_size_preference_async(viewId: i32, sizePreference: ViewSizePreference) -> Result>> { >::get_activation_factory().try_show_as_standalone_with_size_preference_async(viewId, sizePreference) - }} - #[inline] pub fn try_show_as_standalone_with_anchor_view_and_size_preference_async(viewId: i32, sizePreference: ViewSizePreference, anchorViewId: i32, anchorSizePreference: ViewSizePreference) -> Result>> { unsafe { + } + #[inline] pub fn try_show_as_standalone_with_anchor_view_and_size_preference_async(viewId: i32, sizePreference: ViewSizePreference, anchorViewId: i32, anchorSizePreference: ViewSizePreference) -> Result>> { >::get_activation_factory().try_show_as_standalone_with_anchor_view_and_size_preference_async(viewId, sizePreference, anchorViewId, anchorSizePreference) - }} - #[inline] pub fn switch_async(viewId: i32) -> Result> { unsafe { + } + #[inline] pub fn switch_async(viewId: i32) -> Result> { >::get_activation_factory().switch_async(viewId) - }} - #[inline] pub fn switch_from_view_async(toViewId: i32, fromViewId: i32) -> Result> { unsafe { + } + #[inline] pub fn switch_from_view_async(toViewId: i32, fromViewId: i32) -> Result> { >::get_activation_factory().switch_from_view_async(toViewId, fromViewId) - }} - #[inline] pub fn switch_from_view_with_options_async(toViewId: i32, fromViewId: i32, options: ApplicationViewSwitchingOptions) -> Result> { unsafe { + } + #[inline] pub fn switch_from_view_with_options_async(toViewId: i32, fromViewId: i32, options: ApplicationViewSwitchingOptions) -> Result> { >::get_activation_factory().switch_from_view_with_options_async(toViewId, fromViewId, options) - }} - #[inline] pub fn prepare_for_custom_animated_switch_async(toViewId: i32, fromViewId: i32, options: ApplicationViewSwitchingOptions) -> Result>> { unsafe { + } + #[inline] pub fn prepare_for_custom_animated_switch_async(toViewId: i32, fromViewId: i32, options: ApplicationViewSwitchingOptions) -> Result>> { >::get_activation_factory().prepare_for_custom_animated_switch_async(toViewId, fromViewId, options) - }} - #[inline] pub fn disable_system_view_activation_policy() -> Result<()> { unsafe { + } + #[inline] pub fn disable_system_view_activation_policy() -> Result<()> { >::get_activation_factory().disable_system_view_activation_policy() - }} - #[inline] pub fn try_show_as_view_mode_async(viewId: i32, viewMode: ApplicationViewMode) -> Result>> { unsafe { + } + #[inline] pub fn try_show_as_view_mode_async(viewId: i32, viewMode: ApplicationViewMode) -> Result>> { >::get_activation_factory().try_show_as_view_mode_async(viewId, viewMode) - }} - #[inline] pub fn try_show_as_view_mode_with_preferences_async(viewId: i32, viewMode: ApplicationViewMode, viewModePreferences: &ViewModePreferences) -> Result>> { unsafe { + } + #[inline] pub fn try_show_as_view_mode_with_preferences_async(viewId: i32, viewMode: ApplicationViewMode, viewModePreferences: &ViewModePreferences) -> Result>> { >::get_activation_factory().try_show_as_view_mode_with_preferences_async(viewId, viewMode, viewModePreferences) - }} + } } DEFINE_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]) [CLSID_ApplicationViewSwitcher]); 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(&self) -> HRESULT, - fn TryShowAsStandaloneAsync(&self, viewId: i32, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryShowAsStandaloneWithSizePreferenceAsync(&self, viewId: i32, sizePreference: ViewSizePreference, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryShowAsStandaloneWithAnchorViewAndSizePreferenceAsync(&self, viewId: i32, sizePreference: ViewSizePreference, anchorViewId: i32, anchorSizePreference: ViewSizePreference, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn SwitchAsync(&self, viewId: i32, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn SwitchFromViewAsync(&self, toViewId: i32, fromViewId: i32, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn SwitchFromViewWithOptionsAsync(&self, toViewId: i32, fromViewId: i32, options: ApplicationViewSwitchingOptions, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn PrepareForCustomAnimatedSwitchAsync(&self, toViewId: i32, fromViewId: i32, options: ApplicationViewSwitchingOptions, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn TryShowAsStandaloneAsync(&self, viewId: i32, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryShowAsStandaloneWithSizePreferenceAsync(&self, viewId: i32, sizePreference: ViewSizePreference, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryShowAsStandaloneWithAnchorViewAndSizePreferenceAsync(&self, viewId: i32, sizePreference: ViewSizePreference, anchorViewId: i32, anchorSizePreference: ViewSizePreference, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn SwitchAsync(&self, viewId: i32, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn SwitchFromViewAsync(&self, toViewId: i32, fromViewId: i32, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn SwitchFromViewWithOptionsAsync(&self, toViewId: i32, fromViewId: i32, options: ApplicationViewSwitchingOptions, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn PrepareForCustomAnimatedSwitchAsync(&self, toViewId: i32, fromViewId: i32, options: ApplicationViewSwitchingOptions, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IApplicationViewSwitcherStatics { - #[inline] pub unsafe fn disable_showing_main_view_on_activation(&self) -> Result<()> { + #[inline] pub fn disable_showing_main_view_on_activation(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).DisableShowingMainViewOnActivation)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn try_show_as_standalone_async(&self, viewId: i32) -> Result>> { + }} + #[inline] pub fn try_show_as_standalone_async(&self, viewId: i32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryShowAsStandaloneAsync)(self as *const _ as *mut _, 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(&self, viewId: i32, sizePreference: ViewSizePreference) -> Result>> { + }} + #[inline] pub fn try_show_as_standalone_with_size_preference_async(&self, viewId: i32, sizePreference: ViewSizePreference) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryShowAsStandaloneWithSizePreferenceAsync)(self as *const _ as *mut _, 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(&self, viewId: i32, sizePreference: ViewSizePreference, anchorViewId: i32, anchorSizePreference: ViewSizePreference) -> Result>> { + }} + #[inline] pub fn try_show_as_standalone_with_anchor_view_and_size_preference_async(&self, viewId: i32, sizePreference: ViewSizePreference, anchorViewId: i32, anchorSizePreference: ViewSizePreference) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryShowAsStandaloneWithAnchorViewAndSizePreferenceAsync)(self as *const _ as *mut _, viewId, sizePreference, anchorViewId, anchorSizePreference, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn switch_async(&self, viewId: i32) -> Result> { + }} + #[inline] pub fn switch_async(&self, viewId: i32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SwitchAsync)(self as *const _ as *mut _, viewId, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn switch_from_view_async(&self, toViewId: i32, fromViewId: i32) -> Result> { + }} + #[inline] pub fn switch_from_view_async(&self, toViewId: i32, fromViewId: i32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SwitchFromViewAsync)(self as *const _ as *mut _, 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(&self, toViewId: i32, fromViewId: i32, options: ApplicationViewSwitchingOptions) -> Result> { + }} + #[inline] pub fn switch_from_view_with_options_async(&self, toViewId: i32, fromViewId: i32, options: ApplicationViewSwitchingOptions) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SwitchFromViewWithOptionsAsync)(self as *const _ as *mut _, 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(&self, toViewId: i32, fromViewId: i32, options: ApplicationViewSwitchingOptions) -> Result>> { + }} + #[inline] pub fn prepare_for_custom_animated_switch_async(&self, toViewId: i32, fromViewId: i32, options: ApplicationViewSwitchingOptions) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).PrepareForCustomAnimatedSwitchAsync)(self as *const _ as *mut _, 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(&self) -> HRESULT }} impl IApplicationViewSwitcherStatics2 { - #[inline] pub unsafe fn disable_system_view_activation_policy(&self) -> Result<()> { + #[inline] pub fn disable_system_view_activation_policy(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).DisableSystemViewActivationPolicy)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IApplicationViewSwitcherStatics3, 2449839136, 32935, 18541, 178, 31, 199, 164, 162, 66, 163, 131); RT_INTERFACE!{static interface IApplicationViewSwitcherStatics3(IApplicationViewSwitcherStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IApplicationViewSwitcherStatics3] { - fn TryShowAsViewModeAsync(&self, viewId: i32, viewMode: ApplicationViewMode, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn TryShowAsViewModeWithPreferencesAsync(&self, viewId: i32, viewMode: ApplicationViewMode, viewModePreferences: *mut ViewModePreferences, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn TryShowAsViewModeAsync(&self, viewId: i32, viewMode: ApplicationViewMode, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn TryShowAsViewModeWithPreferencesAsync(&self, viewId: i32, viewMode: ApplicationViewMode, viewModePreferences: *mut ViewModePreferences, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IApplicationViewSwitcherStatics3 { - #[inline] pub unsafe fn try_show_as_view_mode_async(&self, viewId: i32, viewMode: ApplicationViewMode) -> Result>> { + #[inline] pub fn try_show_as_view_mode_async(&self, viewId: i32, viewMode: ApplicationViewMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryShowAsViewModeAsync)(self as *const _ as *mut _, viewId, viewMode, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_show_as_view_mode_with_preferences_async(&self, viewId: i32, viewMode: ApplicationViewMode, viewModePreferences: &ViewModePreferences) -> Result>> { + }} + #[inline] pub fn try_show_as_view_mode_with_preferences_async(&self, viewId: i32, viewMode: ApplicationViewMode, viewModePreferences: &ViewModePreferences) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TryShowAsViewModeWithPreferencesAsync)(self as *const _ as *mut _, viewId, viewMode, viewModePreferences as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum ApplicationViewSwitchingOptions: u32 { Default (ApplicationViewSwitchingOptions_Default) = 0, SkipAnimation (ApplicationViewSwitchingOptions_SkipAnimation) = 1, ConsolidateViews (ApplicationViewSwitchingOptions_ConsolidateViews) = 2, }} 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(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_ForegroundColor(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_BackgroundColor(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_BackgroundColor(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_ButtonForegroundColor(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_ButtonForegroundColor(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_ButtonBackgroundColor(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_ButtonBackgroundColor(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_ButtonHoverForegroundColor(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_ButtonHoverForegroundColor(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_ButtonHoverBackgroundColor(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_ButtonHoverBackgroundColor(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_ButtonPressedForegroundColor(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_ButtonPressedForegroundColor(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_ButtonPressedBackgroundColor(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_ButtonPressedBackgroundColor(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_InactiveForegroundColor(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_InactiveForegroundColor(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_InactiveBackgroundColor(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_InactiveBackgroundColor(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_ButtonInactiveForegroundColor(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_ButtonInactiveForegroundColor(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_ButtonInactiveBackgroundColor(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_ButtonInactiveBackgroundColor(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn put_ForegroundColor(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_ForegroundColor(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_BackgroundColor(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_BackgroundColor(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_ButtonForegroundColor(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_ButtonForegroundColor(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_ButtonBackgroundColor(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_ButtonBackgroundColor(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_ButtonHoverForegroundColor(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_ButtonHoverForegroundColor(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_ButtonHoverBackgroundColor(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_ButtonHoverBackgroundColor(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_ButtonPressedForegroundColor(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_ButtonPressedForegroundColor(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_ButtonPressedBackgroundColor(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_ButtonPressedBackgroundColor(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_InactiveForegroundColor(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_InactiveForegroundColor(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_InactiveBackgroundColor(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_InactiveBackgroundColor(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_ButtonInactiveForegroundColor(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_ButtonInactiveForegroundColor(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_ButtonInactiveBackgroundColor(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_ButtonInactiveBackgroundColor(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IApplicationViewTitleBar { - #[inline] pub unsafe fn set_foreground_color(&self, value: &super::super::foundation::IReference) -> Result<()> { + #[inline] pub fn set_foreground_color(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ForegroundColor)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_foreground_color(&self) -> Result>> { + }} + #[inline] pub fn get_foreground_color(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ForegroundColor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_background_color(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_background_color(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BackgroundColor)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_background_color(&self) -> Result>> { + }} + #[inline] pub fn get_background_color(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BackgroundColor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_button_foreground_color(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_button_foreground_color(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ButtonForegroundColor)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_button_foreground_color(&self) -> Result>> { + }} + #[inline] pub fn get_button_foreground_color(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ButtonForegroundColor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_button_background_color(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_button_background_color(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ButtonBackgroundColor)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_button_background_color(&self) -> Result>> { + }} + #[inline] pub fn get_button_background_color(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ButtonBackgroundColor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_button_hover_foreground_color(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_button_hover_foreground_color(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ButtonHoverForegroundColor)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_button_hover_foreground_color(&self) -> Result>> { + }} + #[inline] pub fn get_button_hover_foreground_color(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ButtonHoverForegroundColor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_button_hover_background_color(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_button_hover_background_color(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ButtonHoverBackgroundColor)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_button_hover_background_color(&self) -> Result>> { + }} + #[inline] pub fn get_button_hover_background_color(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ButtonHoverBackgroundColor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_button_pressed_foreground_color(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_button_pressed_foreground_color(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ButtonPressedForegroundColor)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_button_pressed_foreground_color(&self) -> Result>> { + }} + #[inline] pub fn get_button_pressed_foreground_color(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ButtonPressedForegroundColor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_button_pressed_background_color(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_button_pressed_background_color(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ButtonPressedBackgroundColor)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_button_pressed_background_color(&self) -> Result>> { + }} + #[inline] pub fn get_button_pressed_background_color(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ButtonPressedBackgroundColor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_inactive_foreground_color(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_inactive_foreground_color(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InactiveForegroundColor)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_inactive_foreground_color(&self) -> Result>> { + }} + #[inline] pub fn get_inactive_foreground_color(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InactiveForegroundColor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_inactive_background_color(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_inactive_background_color(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InactiveBackgroundColor)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_inactive_background_color(&self) -> Result>> { + }} + #[inline] pub fn get_inactive_background_color(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InactiveBackgroundColor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_button_inactive_foreground_color(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_button_inactive_foreground_color(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ButtonInactiveForegroundColor)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_button_inactive_foreground_color(&self) -> Result>> { + }} + #[inline] pub fn get_button_inactive_foreground_color(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ButtonInactiveForegroundColor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_button_inactive_background_color(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_button_inactive_background_color(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ButtonInactiveBackgroundColor)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_button_inactive_background_color(&self) -> Result>> { + }} + #[inline] pub fn get_button_inactive_background_color(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ButtonInactiveBackgroundColor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ApplicationViewTitleBar: IApplicationViewTitleBar} DEFINE_IID!(IID_IApplicationViewTransferContext, 2239020131, 15383, 16526, 148, 8, 138, 26, 158, 168, 27, 250); @@ -11031,23 +11031,23 @@ RT_INTERFACE!{interface IApplicationViewTransferContext(IApplicationViewTransfer fn put_ViewId(&self, value: i32) -> HRESULT }} impl IApplicationViewTransferContext { - #[inline] pub unsafe fn get_view_id(&self) -> Result { + #[inline] pub fn get_view_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ViewId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_view_id(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_view_id(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ViewId)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ApplicationViewTransferContext: IApplicationViewTransferContext} impl RtActivatable for ApplicationViewTransferContext {} impl RtActivatable for ApplicationViewTransferContext {} impl ApplicationViewTransferContext { - #[inline] pub fn get_data_package_format_id() -> Result { unsafe { + #[inline] pub fn get_data_package_format_id() -> Result { >::get_activation_factory().get_data_package_format_id() - }} + } } DEFINE_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]) [CLSID_ApplicationViewTransferContext]); DEFINE_IID!(IID_IApplicationViewTransferContextStatics, 363371922, 56697, 19211, 188, 71, 213, 241, 149, 241, 70, 97); @@ -11055,11 +11055,11 @@ RT_INTERFACE!{static interface IApplicationViewTransferContextStatics(IApplicati fn get_DataPackageFormatId(&self, out: *mut HSTRING) -> HRESULT }} impl IApplicationViewTransferContextStatics { - #[inline] pub unsafe fn get_data_package_format_id(&self) -> Result { + #[inline] pub fn get_data_package_format_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DataPackageFormatId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum ApplicationViewWindowingMode: i32 { Auto (ApplicationViewWindowingMode_Auto) = 0, PreferredLaunchViewSize (ApplicationViewWindowingMode_PreferredLaunchViewSize) = 1, FullScreen (ApplicationViewWindowingMode_FullScreen) = 2, @@ -11072,43 +11072,43 @@ RT_ENUM! { enum HandPreference: i32 { }} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Showing(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Hiding(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Hiding(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn get_OccludedRect(&self, out: *mut super::super::foundation::Rect) -> HRESULT + fn add_Showing(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Showing(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Hiding(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Hiding(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn get_OccludedRect(&self, out: *mut foundation::Rect) -> HRESULT }} impl IInputPane { - #[inline] pub unsafe fn add_showing(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_showing(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Showing)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_showing(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_showing(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Showing)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_hiding(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_hiding(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Hiding)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_hiding(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_hiding(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Hiding)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_occluded_rect(&self) -> Result { + }} + #[inline] pub fn get_occluded_rect(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OccludedRect)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class InputPane: IInputPane} impl RtActivatable for InputPane {} impl InputPane { - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} + } } DEFINE_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]) [CLSID_InputPane]); DEFINE_IID!(IID_IInputPane2, 2322284326, 28816, 18323, 148, 76, 195, 242, 205, 226, 98, 118); @@ -11117,16 +11117,16 @@ RT_INTERFACE!{interface IInputPane2(IInputPane2Vtbl): IInspectable(IInspectableV fn TryHide(&self, out: *mut bool) -> HRESULT }} impl IInputPane2 { - #[inline] pub unsafe fn try_show(&self) -> Result { + #[inline] pub fn try_show(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TryShow)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn try_hide(&self) -> Result { + }} + #[inline] pub fn try_hide(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TryHide)(self as *const _ as *mut _, &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] { @@ -11134,155 +11134,155 @@ RT_INTERFACE!{interface IInputPaneControl(IInputPaneControlVtbl): IInspectable(I fn put_Visible(&self, value: bool) -> HRESULT }} impl IInputPaneControl { - #[inline] pub unsafe fn get_visible(&self) -> Result { + #[inline] pub fn get_visible(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Visible)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_visible(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_visible(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Visible)(self as *const _ as *mut _, 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(&self, out: *mut *mut InputPane) -> HRESULT }} impl IInputPaneStatics { - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn get_OccludedRect(&self, out: *mut foundation::Rect) -> HRESULT, fn put_EnsuredFocusedElementInView(&self, value: bool) -> HRESULT, fn get_EnsuredFocusedElementInView(&self, out: *mut bool) -> HRESULT }} impl IInputPaneVisibilityEventArgs { - #[inline] pub unsafe fn get_occluded_rect(&self) -> Result { + #[inline] pub fn get_occluded_rect(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OccludedRect)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_ensured_focused_element_in_view(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_ensured_focused_element_in_view(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_EnsuredFocusedElementInView)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_ensured_focused_element_in_view(&self) -> Result { + }} + #[inline] pub fn get_ensured_focused_element_in_view(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EnsuredFocusedElementInView)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class InputPaneVisibilityEventArgs: IInputPaneVisibilityEventArgs} RT_CLASS!{static class ProjectionManager} impl RtActivatable for ProjectionManager {} impl RtActivatable for ProjectionManager {} impl ProjectionManager { - #[inline] pub fn start_projecting_async(projectionViewId: i32, anchorViewId: i32) -> Result> { unsafe { + #[inline] pub fn start_projecting_async(projectionViewId: i32, anchorViewId: i32) -> Result> { >::get_activation_factory().start_projecting_async(projectionViewId, anchorViewId) - }} - #[inline] pub fn swap_displays_for_views_async(projectionViewId: i32, anchorViewId: i32) -> Result> { unsafe { + } + #[inline] pub fn swap_displays_for_views_async(projectionViewId: i32, anchorViewId: i32) -> Result> { >::get_activation_factory().swap_displays_for_views_async(projectionViewId, anchorViewId) - }} - #[inline] pub fn stop_projecting_async(projectionViewId: i32, anchorViewId: i32) -> Result> { unsafe { + } + #[inline] pub fn stop_projecting_async(projectionViewId: i32, anchorViewId: i32) -> Result> { >::get_activation_factory().stop_projecting_async(projectionViewId, anchorViewId) - }} - #[inline] pub fn get_projection_display_available() -> Result { unsafe { + } + #[inline] pub fn get_projection_display_available() -> Result { >::get_activation_factory().get_projection_display_available() - }} - #[inline] pub fn add_projection_display_available_changed(handler: &super::super::foundation::EventHandler) -> Result { unsafe { + } + #[inline] pub fn add_projection_display_available_changed(handler: &foundation::EventHandler) -> Result { >::get_activation_factory().add_projection_display_available_changed(handler) - }} - #[inline] pub fn remove_projection_display_available_changed(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_projection_display_available_changed(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_projection_display_available_changed(token) - }} - #[cfg(feature="windows-devices")] #[inline] pub fn start_projecting_with_device_info_async(projectionViewId: i32, anchorViewId: i32, displayDeviceInfo: &super::super::devices::enumeration::DeviceInformation) -> Result> { unsafe { + } + #[cfg(feature="windows-devices")] #[inline] pub fn start_projecting_with_device_info_async(projectionViewId: i32, anchorViewId: i32, displayDeviceInfo: &super::super::devices::enumeration::DeviceInformation) -> Result> { >::get_activation_factory().start_projecting_with_device_info_async(projectionViewId, anchorViewId, displayDeviceInfo) - }} - #[inline] pub fn request_start_projecting_async(projectionViewId: i32, anchorViewId: i32, selection: super::super::foundation::Rect) -> Result>> { unsafe { + } + #[inline] pub fn request_start_projecting_async(projectionViewId: i32, anchorViewId: i32, selection: foundation::Rect) -> Result>> { >::get_activation_factory().request_start_projecting_async(projectionViewId, anchorViewId, selection) - }} - #[inline] pub fn request_start_projecting_with_placement_async(projectionViewId: i32, anchorViewId: i32, selection: super::super::foundation::Rect, prefferedPlacement: super::popups::Placement) -> Result>> { unsafe { + } + #[inline] pub fn request_start_projecting_with_placement_async(projectionViewId: i32, anchorViewId: i32, selection: foundation::Rect, prefferedPlacement: super::popups::Placement) -> Result>> { >::get_activation_factory().request_start_projecting_with_placement_async(projectionViewId, anchorViewId, selection, prefferedPlacement) - }} - #[inline] pub fn get_device_selector() -> Result { unsafe { + } + #[inline] pub fn get_device_selector() -> Result { >::get_activation_factory().get_device_selector() - }} + } } DEFINE_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]) [CLSID_ProjectionManager]); 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(&self, projectionViewId: i32, anchorViewId: i32, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn SwapDisplaysForViewsAsync(&self, projectionViewId: i32, anchorViewId: i32, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn StopProjectingAsync(&self, projectionViewId: i32, anchorViewId: i32, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn StartProjectingAsync(&self, projectionViewId: i32, anchorViewId: i32, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn SwapDisplaysForViewsAsync(&self, projectionViewId: i32, anchorViewId: i32, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn StopProjectingAsync(&self, projectionViewId: i32, anchorViewId: i32, out: *mut *mut foundation::IAsyncAction) -> HRESULT, fn get_ProjectionDisplayAvailable(&self, out: *mut bool) -> HRESULT, - fn add_ProjectionDisplayAvailableChanged(&self, handler: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ProjectionDisplayAvailableChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ProjectionDisplayAvailableChanged(&self, handler: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ProjectionDisplayAvailableChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IProjectionManagerStatics { - #[inline] pub unsafe fn start_projecting_async(&self, projectionViewId: i32, anchorViewId: i32) -> Result> { + #[inline] pub fn start_projecting_async(&self, projectionViewId: i32, anchorViewId: i32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartProjectingAsync)(self as *const _ as *mut _, projectionViewId, anchorViewId, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn swap_displays_for_views_async(&self, projectionViewId: i32, anchorViewId: i32) -> Result> { + }} + #[inline] pub fn swap_displays_for_views_async(&self, projectionViewId: i32, anchorViewId: i32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SwapDisplaysForViewsAsync)(self as *const _ as *mut _, projectionViewId, anchorViewId, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn stop_projecting_async(&self, projectionViewId: i32, anchorViewId: i32) -> Result> { + }} + #[inline] pub fn stop_projecting_async(&self, projectionViewId: i32, anchorViewId: i32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StopProjectingAsync)(self as *const _ as *mut _, projectionViewId, anchorViewId, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_projection_display_available(&self) -> Result { + }} + #[inline] pub fn get_projection_display_available(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ProjectionDisplayAvailable)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_projection_display_available_changed(&self, handler: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_projection_display_available_changed(&self, handler: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ProjectionDisplayAvailableChanged)(self as *const _ as *mut _, 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(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_projection_display_available_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ProjectionDisplayAvailableChanged)(self as *const _ as *mut _, 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(&self) -> (), - #[cfg(feature="windows-devices")] fn StartProjectingWithDeviceInfoAsync(&self, projectionViewId: i32, anchorViewId: i32, displayDeviceInfo: *mut super::super::devices::enumeration::DeviceInformation, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn RequestStartProjectingAsync(&self, projectionViewId: i32, anchorViewId: i32, selection: super::super::foundation::Rect, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestStartProjectingWithPlacementAsync(&self, projectionViewId: i32, anchorViewId: i32, selection: super::super::foundation::Rect, prefferedPlacement: super::popups::Placement, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-devices")] fn StartProjectingWithDeviceInfoAsync(&self, projectionViewId: i32, anchorViewId: i32, displayDeviceInfo: *mut super::super::devices::enumeration::DeviceInformation, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn RequestStartProjectingAsync(&self, projectionViewId: i32, anchorViewId: i32, selection: foundation::Rect, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestStartProjectingWithPlacementAsync(&self, projectionViewId: i32, anchorViewId: i32, selection: foundation::Rect, prefferedPlacement: super::popups::Placement, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetDeviceSelector(&self, out: *mut HSTRING) -> HRESULT }} impl IProjectionManagerStatics2 { - #[cfg(feature="windows-devices")] #[inline] pub unsafe fn start_projecting_with_device_info_async(&self, projectionViewId: i32, anchorViewId: i32, displayDeviceInfo: &super::super::devices::enumeration::DeviceInformation) -> Result> { + #[cfg(feature="windows-devices")] #[inline] pub fn start_projecting_with_device_info_async(&self, projectionViewId: i32, anchorViewId: i32, displayDeviceInfo: &super::super::devices::enumeration::DeviceInformation) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartProjectingWithDeviceInfoAsync)(self as *const _ as *mut _, 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(&self, projectionViewId: i32, anchorViewId: i32, selection: super::super::foundation::Rect) -> Result>> { + }} + #[inline] pub fn request_start_projecting_async(&self, projectionViewId: i32, anchorViewId: i32, selection: foundation::Rect) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestStartProjectingAsync)(self as *const _ as *mut _, 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(&self, projectionViewId: i32, anchorViewId: i32, selection: super::super::foundation::Rect, prefferedPlacement: super::popups::Placement) -> Result>> { + }} + #[inline] pub fn request_start_projecting_with_placement_async(&self, projectionViewId: i32, anchorViewId: i32, selection: foundation::Rect, prefferedPlacement: super::popups::Placement) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestStartProjectingWithPlacementAsync)(self as *const _ as *mut _, projectionViewId, anchorViewId, selection, prefferedPlacement, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_device_selector(&self) -> Result { + }} + #[inline] pub fn get_device_selector(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeviceSelector)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -11293,10 +11293,10 @@ RT_ENUM! { enum UIElementType: i32 { 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(&self, out: *mut HandPreference) -> HRESULT, - fn get_CursorSize(&self, out: *mut super::super::foundation::Size) -> HRESULT, - fn get_ScrollBarSize(&self, out: *mut super::super::foundation::Size) -> HRESULT, - fn get_ScrollBarArrowSize(&self, out: *mut super::super::foundation::Size) -> HRESULT, - fn get_ScrollBarThumbBoxSize(&self, out: *mut super::super::foundation::Size) -> HRESULT, + fn get_CursorSize(&self, out: *mut foundation::Size) -> HRESULT, + fn get_ScrollBarSize(&self, out: *mut foundation::Size) -> HRESULT, + fn get_ScrollBarArrowSize(&self, out: *mut foundation::Size) -> HRESULT, + fn get_ScrollBarThumbBoxSize(&self, out: *mut foundation::Size) -> HRESULT, fn get_MessageDuration(&self, out: *mut u32) -> HRESULT, fn get_AnimationsEnabled(&self, out: *mut bool) -> HRESULT, fn get_CaretBrowsingEnabled(&self, out: *mut bool) -> HRESULT, @@ -11307,71 +11307,71 @@ RT_INTERFACE!{interface IUISettings(IUISettingsVtbl): IInspectable(IInspectableV fn UIElementColor(&self, desiredElement: UIElementType, out: *mut super::Color) -> HRESULT }} impl IUISettings { - #[inline] pub unsafe fn get_hand_preference(&self) -> Result { + #[inline] pub fn get_hand_preference(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HandPreference)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_cursor_size(&self) -> Result { + }} + #[inline] pub fn get_cursor_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CursorSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_scroll_bar_size(&self) -> Result { + }} + #[inline] pub fn get_scroll_bar_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ScrollBarSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_scroll_bar_arrow_size(&self) -> Result { + }} + #[inline] pub fn get_scroll_bar_arrow_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ScrollBarArrowSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_scroll_bar_thumb_box_size(&self) -> Result { + }} + #[inline] pub fn get_scroll_bar_thumb_box_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ScrollBarThumbBoxSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_message_duration(&self) -> Result { + }} + #[inline] pub fn get_message_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MessageDuration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_animations_enabled(&self) -> Result { + }} + #[inline] pub fn get_animations_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AnimationsEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_caret_browsing_enabled(&self) -> Result { + }} + #[inline] pub fn get_caret_browsing_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CaretBrowsingEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_caret_blink_rate(&self) -> Result { + }} + #[inline] pub fn get_caret_blink_rate(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CaretBlinkRate)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_caret_width(&self) -> Result { + }} + #[inline] pub fn get_caret_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CaretWidth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_double_click_time(&self) -> Result { + }} + #[inline] pub fn get_double_click_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DoubleClickTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_mouse_hover_time(&self) -> Result { + }} + #[inline] pub fn get_mouse_hover_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MouseHoverTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn uielement_color(&self, desiredElement: UIElementType) -> Result { + }} + #[inline] pub fn uielement_color(&self, desiredElement: UIElementType) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).UIElementColor)(self as *const _ as *mut _, desiredElement, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class UISettings: IUISettings} impl RtActivatable for UISettings {} @@ -11379,86 +11379,86 @@ DEFINE_CLSID!(UISettings(&[87,105,110,100,111,119,115,46,85,73,46,86,105,101,119 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(&self, out: *mut f64) -> HRESULT, - fn add_TextScaleFactorChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_TextScaleFactorChanged(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_TextScaleFactorChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_TextScaleFactorChanged(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl IUISettings2 { - #[inline] pub unsafe fn get_text_scale_factor(&self) -> Result { + #[inline] pub fn get_text_scale_factor(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TextScaleFactor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_text_scale_factor_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_text_scale_factor_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_TextScaleFactorChanged)(self as *const _ as *mut _, 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(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_text_scale_factor_changed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_TextScaleFactorChanged)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, desiredColor: UIColorType, out: *mut super::Color) -> HRESULT, - fn add_ColorValuesChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ColorValuesChanged(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ColorValuesChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ColorValuesChanged(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl IUISettings3 { - #[inline] pub unsafe fn get_color_value(&self, desiredColor: UIColorType) -> Result { + #[inline] pub fn get_color_value(&self, desiredColor: UIColorType) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetColorValue)(self as *const _ as *mut _, desiredColor, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_color_values_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_color_values_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ColorValuesChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_color_values_changed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_color_values_changed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ColorValuesChanged)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IUISettings4, 1387999234, 37275, 19819, 155, 120, 141, 214, 111, 244, 185, 59); RT_INTERFACE!{interface IUISettings4(IUISettings4Vtbl): IInspectable(IInspectableVtbl) [IID_IUISettings4] { fn get_AdvancedEffectsEnabled(&self, out: *mut bool) -> HRESULT, - fn add_AdvancedEffectsEnabledChanged(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AdvancedEffectsEnabledChanged(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_AdvancedEffectsEnabledChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AdvancedEffectsEnabledChanged(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl IUISettings4 { - #[inline] pub unsafe fn get_advanced_effects_enabled(&self) -> Result { + #[inline] pub fn get_advanced_effects_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AdvancedEffectsEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_advanced_effects_enabled_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_advanced_effects_enabled_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AdvancedEffectsEnabledChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_advanced_effects_enabled_changed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_advanced_effects_enabled_changed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AdvancedEffectsEnabledChanged)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut UserInteractionMode) -> HRESULT }} impl IUIViewSettings { - #[inline] pub unsafe fn get_user_interaction_mode(&self) -> Result { + #[inline] pub fn get_user_interaction_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UserInteractionMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class UIViewSettings: IUIViewSettings} impl RtActivatable for UIViewSettings {} impl UIViewSettings { - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} + } } DEFINE_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]) [CLSID_UIViewSettings]); DEFINE_IID!(IID_IUIViewSettingsStatics, 1499240357, 63734, 16847, 176, 251, 170, 205, 184, 31, 213, 246); @@ -11466,11 +11466,11 @@ RT_INTERFACE!{static interface IUIViewSettingsStatics(IUIViewSettingsStaticsVtbl fn GetForCurrentView(&self, out: *mut *mut UIViewSettings) -> HRESULT }} impl IUIViewSettingsStatics { - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum UserInteractionMode: i32 { Mouse (UserInteractionMode_Mouse) = 0, Touch (UserInteractionMode_Touch) = 1, @@ -11479,35 +11479,35 @@ DEFINE_IID!(IID_IViewModePreferences, 2274348346, 2969, 17097, 132, 208, 211, 24 RT_INTERFACE!{interface IViewModePreferences(IViewModePreferencesVtbl): IInspectable(IInspectableVtbl) [IID_IViewModePreferences] { fn get_ViewSizePreference(&self, out: *mut ViewSizePreference) -> HRESULT, fn put_ViewSizePreference(&self, value: ViewSizePreference) -> HRESULT, - fn get_CustomSize(&self, out: *mut super::super::foundation::Size) -> HRESULT, - fn put_CustomSize(&self, value: super::super::foundation::Size) -> HRESULT + fn get_CustomSize(&self, out: *mut foundation::Size) -> HRESULT, + fn put_CustomSize(&self, value: foundation::Size) -> HRESULT }} impl IViewModePreferences { - #[inline] pub unsafe fn get_view_size_preference(&self) -> Result { + #[inline] pub fn get_view_size_preference(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ViewSizePreference)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_view_size_preference(&self, value: ViewSizePreference) -> Result<()> { + }} + #[inline] pub fn set_view_size_preference(&self, value: ViewSizePreference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ViewSizePreference)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_custom_size(&self) -> Result { + }} + #[inline] pub fn get_custom_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CustomSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_custom_size(&self, value: super::super::foundation::Size) -> Result<()> { + }} + #[inline] pub fn set_custom_size(&self, value: foundation::Size) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CustomSize)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ViewModePreferences: IViewModePreferences} impl RtActivatable for ViewModePreferences {} impl ViewModePreferences { - #[inline] pub fn create_default(mode: ApplicationViewMode) -> Result> { unsafe { + #[inline] pub fn create_default(mode: ApplicationViewMode) -> Result>> { >::get_activation_factory().create_default(mode) - }} + } } DEFINE_CLSID!(ViewModePreferences(&[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,86,105,101,119,77,111,100,101,80,114,101,102,101,114,101,110,99,101,115,0]) [CLSID_ViewModePreferences]); DEFINE_IID!(IID_IViewModePreferencesStatics, 1773537893, 24037, 16600, 131, 6, 56, 51, 223, 122, 34, 116); @@ -11515,11 +11515,11 @@ RT_INTERFACE!{static interface IViewModePreferencesStatics(IViewModePreferencesS fn CreateDefault(&self, mode: ApplicationViewMode, out: *mut *mut ViewModePreferences) -> HRESULT }} impl IViewModePreferencesStatics { - #[inline] pub unsafe fn create_default(&self, mode: ApplicationViewMode) -> Result> { + #[inline] pub fn create_default(&self, mode: ApplicationViewMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDefault)(self as *const _ as *mut _, mode, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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, Custom (ViewSizePreference_Custom) = 6, @@ -11528,62 +11528,62 @@ pub mod core { // Windows.UI.ViewManagement.Core use ::prelude::*; DEFINE_IID!(IID_ICoreInputView, 3346058618, 28673, 19506, 191, 148, 37, 193, 245, 84, 203, 241); RT_INTERFACE!{interface ICoreInputView(ICoreInputViewVtbl): IInspectable(IInspectableVtbl) [IID_ICoreInputView] { - fn add_OcclusionsChanged(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_OcclusionsChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn GetCoreInputViewOcclusions(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn add_OcclusionsChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_OcclusionsChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn GetCoreInputViewOcclusions(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn TryShowPrimaryView(&self, out: *mut bool) -> HRESULT, fn TryHidePrimaryView(&self, out: *mut bool) -> HRESULT }} impl ICoreInputView { - #[inline] pub unsafe fn add_occlusions_changed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + #[inline] pub fn add_occlusions_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_OcclusionsChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_occlusions_changed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_occlusions_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_OcclusionsChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_core_input_view_occlusions(&self) -> Result>> { + }} + #[inline] pub fn get_core_input_view_occlusions(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCoreInputViewOcclusions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_show_primary_view(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn try_show_primary_view(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TryShowPrimaryView)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn try_hide_primary_view(&self) -> Result { + }} + #[inline] pub fn try_hide_primary_view(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TryHidePrimaryView)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class CoreInputView: ICoreInputView} impl RtActivatable for CoreInputView {} impl CoreInputView { - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} + } } DEFINE_CLSID!(CoreInputView(&[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,67,111,114,101,46,67,111,114,101,73,110,112,117,116,86,105,101,119,0]) [CLSID_CoreInputView]); DEFINE_IID!(IID_ICoreInputViewOcclusion, 3426143750, 14437, 16759, 181, 245, 139, 101, 224, 185, 206, 132); RT_INTERFACE!{interface ICoreInputViewOcclusion(ICoreInputViewOcclusionVtbl): IInspectable(IInspectableVtbl) [IID_ICoreInputViewOcclusion] { - fn get_OccludingRect(&self, out: *mut ::rt::gen::windows::foundation::Rect) -> HRESULT, + fn get_OccludingRect(&self, out: *mut foundation::Rect) -> HRESULT, fn get_OcclusionKind(&self, out: *mut CoreInputViewOcclusionKind) -> HRESULT }} impl ICoreInputViewOcclusion { - #[inline] pub unsafe fn get_occluding_rect(&self) -> Result<::rt::gen::windows::foundation::Rect> { + #[inline] pub fn get_occluding_rect(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OccludingRect)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_occlusion_kind(&self) -> Result { + }} + #[inline] pub fn get_occlusion_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OcclusionKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class CoreInputViewOcclusion: ICoreInputViewOcclusion} RT_ENUM! { enum CoreInputViewOcclusionKind: i32 { @@ -11591,25 +11591,25 @@ RT_ENUM! { enum CoreInputViewOcclusionKind: i32 { }} DEFINE_IID!(IID_ICoreInputViewOcclusionsChangedEventArgs, 3188729832, 46062, 19959, 149, 84, 137, 205, 198, 96, 130, 194); RT_INTERFACE!{interface ICoreInputViewOcclusionsChangedEventArgs(ICoreInputViewOcclusionsChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ICoreInputViewOcclusionsChangedEventArgs] { - fn get_Occlusions(&self, out: *mut *mut ::rt::gen::windows::foundation::collections::IVectorView) -> HRESULT, + fn get_Occlusions(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, fn get_Handled(&self, out: *mut bool) -> HRESULT, fn put_Handled(&self, value: bool) -> HRESULT }} impl ICoreInputViewOcclusionsChangedEventArgs { - #[inline] pub unsafe fn get_occlusions(&self) -> Result>> { + #[inline] pub fn get_occlusions(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Occlusions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_handled(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_handled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Handled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_handled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_handled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Handled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CoreInputViewOcclusionsChangedEventArgs: ICoreInputViewOcclusionsChangedEventArgs} DEFINE_IID!(IID_ICoreInputViewStatics, 2107348941, 60862, 18895, 165, 79, 51, 125, 224, 82, 144, 127); @@ -11617,11 +11617,11 @@ RT_INTERFACE!{static interface ICoreInputViewStatics(ICoreInputViewStaticsVtbl): fn GetForCurrentView(&self, out: *mut *mut CoreInputView) -> HRESULT }} impl ICoreInputViewStatics { - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } } // Windows.UI.ViewManagement.Core } // Windows.UI.ViewManagement @@ -11629,83 +11629,83 @@ pub mod applicationsettings { // Windows.UI.ApplicationSettings use ::prelude::*; 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AccountCommandsRequested(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_AccountCommandsRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AccountCommandsRequested(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl IAccountsSettingsPane { - #[inline] pub unsafe fn add_account_commands_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_account_commands_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AccountCommandsRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_account_commands_requested(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_account_commands_requested(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AccountCommandsRequested)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AccountsSettingsPane: IAccountsSettingsPane} impl RtActivatable for AccountsSettingsPane {} impl RtActivatable for AccountsSettingsPane {} impl AccountsSettingsPane { - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} - #[inline] pub fn show() -> Result<()> { unsafe { + } + #[inline] pub fn show() -> Result<()> { >::get_activation_factory().show() - }} - #[inline] pub fn show_manage_accounts_async() -> Result> { unsafe { + } + #[inline] pub fn show_manage_accounts_async() -> Result> { >::get_activation_factory().show_manage_accounts_async() - }} - #[inline] pub fn show_add_account_async() -> Result> { unsafe { + } + #[inline] pub fn show_add_account_async() -> Result> { >::get_activation_factory().show_add_account_async() - }} + } } DEFINE_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]) [CLSID_AccountsSettingsPane]); 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_WebAccountCommands(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_CredentialCommands(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_Commands(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_WebAccountProviderCommands(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_WebAccountCommands(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_CredentialCommands(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_Commands(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_HeaderText(&self, out: *mut HSTRING) -> HRESULT, fn put_HeaderText(&self, value: HSTRING) -> HRESULT, fn GetDeferral(&self, out: *mut *mut AccountsSettingsPaneEventDeferral) -> HRESULT }} impl IAccountsSettingsPaneCommandsRequestedEventArgs { - #[inline] pub unsafe fn get_web_account_provider_commands(&self) -> Result>> { + #[inline] pub fn get_web_account_provider_commands(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WebAccountProviderCommands)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_web_account_commands(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_web_account_commands(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WebAccountCommands)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_credential_commands(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_credential_commands(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CredentialCommands)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_commands(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_commands(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Commands)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_header_text(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_header_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HeaderText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_header_text(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_header_text(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_HeaderText)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AccountsSettingsPaneCommandsRequestedEventArgs: IAccountsSettingsPaneCommandsRequestedEventArgs} DEFINE_IID!(IID_IAccountsSettingsPaneEventDeferral, 3421658431, 58810, 16623, 147, 218, 101, 224, 150, 229, 251, 4); @@ -11713,10 +11713,10 @@ RT_INTERFACE!{interface IAccountsSettingsPaneEventDeferral(IAccountsSettingsPane fn Complete(&self) -> HRESULT }} impl IAccountsSettingsPaneEventDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AccountsSettingsPaneEventDeferral: IAccountsSettingsPaneEventDeferral} DEFINE_IID!(IID_IAccountsSettingsPaneStatics, 1444907872, 45292, 16720, 168, 220, 32, 142, 228, 75, 6, 138); @@ -11725,32 +11725,32 @@ RT_INTERFACE!{static interface IAccountsSettingsPaneStatics(IAccountsSettingsPan fn Show(&self) -> HRESULT }} impl IAccountsSettingsPaneStatics { - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn show(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn show(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Show)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn ShowAddAccountAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn ShowManageAccountsAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn ShowAddAccountAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IAccountsSettingsPaneStatics2 { - #[inline] pub unsafe fn show_manage_accounts_async(&self) -> Result> { + #[inline] pub fn show_manage_accounts_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowManageAccountsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn show_add_account_async(&self) -> Result> { + }} + #[inline] pub fn show_add_account_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowAddAccountAsync)(self 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] { @@ -11759,26 +11759,26 @@ RT_INTERFACE!{interface ICredentialCommand(ICredentialCommandVtbl): IInspectable fn get_CredentialDeleted(&self, out: *mut *mut CredentialCommandCredentialDeletedHandler) -> HRESULT }} impl ICredentialCommand { - #[cfg(feature="windows-security")] #[inline] pub unsafe fn get_password_credential(&self) -> Result> { + #[cfg(feature="windows-security")] #[inline] pub fn get_password_credential(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PasswordCredential)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_credential_deleted(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_credential_deleted(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CredentialDeleted)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CredentialCommand: ICredentialCommand} impl RtActivatable for CredentialCommand {} impl CredentialCommand { - #[cfg(feature="windows-security")] #[inline] pub fn create_credential_command(passwordCredential: &super::super::security::credentials::PasswordCredential) -> Result> { unsafe { + #[cfg(feature="windows-security")] #[inline] pub fn create_credential_command(passwordCredential: &super::super::security::credentials::PasswordCredential) -> Result> { >::get_activation_factory().create_credential_command(passwordCredential) - }} - #[cfg(feature="windows-security")] #[inline] pub fn create_credential_command_with_handler(passwordCredential: &super::super::security::credentials::PasswordCredential, deleted: &CredentialCommandCredentialDeletedHandler) -> Result> { unsafe { + } + #[cfg(feature="windows-security")] #[inline] pub fn create_credential_command_with_handler(passwordCredential: &super::super::security::credentials::PasswordCredential, deleted: &CredentialCommandCredentialDeletedHandler) -> Result> { >::get_activation_factory().create_credential_command_with_handler(passwordCredential, deleted) - }} + } } DEFINE_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]) [CLSID_CredentialCommand]); DEFINE_IID!(IID_CredentialCommandCredentialDeletedHandler, 1640030597, 2423, 18040, 180, 226, 152, 114, 122, 251, 238, 217); @@ -11786,10 +11786,10 @@ RT_DELEGATE!{delegate CredentialCommandCredentialDeletedHandler(CredentialComman fn Invoke(&self, command: *mut CredentialCommand) -> HRESULT }} impl CredentialCommandCredentialDeletedHandler { - #[inline] pub unsafe fn invoke(&self, command: &CredentialCommand) -> Result<()> { + #[inline] pub fn invoke(&self, command: &CredentialCommand) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, command as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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] { @@ -11797,27 +11797,27 @@ RT_INTERFACE!{static interface ICredentialCommandFactory(ICredentialCommandFacto #[cfg(feature="windows-security")] fn CreateCredentialCommandWithHandler(&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(&self, passwordCredential: &super::super::security::credentials::PasswordCredential) -> Result> { + #[cfg(feature="windows-security")] #[inline] pub fn create_credential_command(&self, passwordCredential: &super::super::security::credentials::PasswordCredential) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateCredentialCommand)(self as *const _ as *mut _, 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(&self, passwordCredential: &super::super::security::credentials::PasswordCredential, deleted: &CredentialCommandCredentialDeletedHandler) -> Result> { + }} + #[cfg(feature="windows-security")] #[inline] pub fn create_credential_command_with_handler(&self, passwordCredential: &super::super::security::credentials::PasswordCredential, deleted: &CredentialCommandCredentialDeletedHandler) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateCredentialCommandWithHandler)(self as *const _ as *mut _, passwordCredential as *const _ as *mut _, deleted as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class SettingsCommand: super::popups::IUICommand} impl RtActivatable for SettingsCommand {} impl RtActivatable for SettingsCommand {} impl SettingsCommand { - #[inline] pub fn create_settings_command(settingsCommandId: &IInspectable, label: &HStringArg, handler: &super::popups::UICommandInvokedHandler) -> Result> { unsafe { + #[inline] pub fn create_settings_command(settingsCommandId: &IInspectable, label: &HStringArg, handler: &super::popups::UICommandInvokedHandler) -> Result> { >::get_activation_factory().create_settings_command(settingsCommandId, label, handler) - }} - #[inline] pub fn get_accounts_command() -> Result> { unsafe { + } + #[inline] pub fn get_accounts_command() -> Result>> { >::get_activation_factory().get_accounts_command() - }} + } } DEFINE_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]) [CLSID_SettingsCommand]); DEFINE_IID!(IID_ISettingsCommandFactory, 1759599411, 7299, 17210, 170, 90, 206, 238, 165, 189, 71, 100); @@ -11825,66 +11825,66 @@ RT_INTERFACE!{static interface ISettingsCommandFactory(ISettingsCommandFactoryVt fn CreateSettingsCommand(&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(&self, settingsCommandId: &IInspectable, label: &HStringArg, handler: &super::popups::UICommandInvokedHandler) -> Result> { + #[inline] pub fn create_settings_command(&self, settingsCommandId: &IInspectable, label: &HStringArg, handler: &super::popups::UICommandInvokedHandler) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateSettingsCommand)(self as *const _ as *mut _, 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) } - } + }} } 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(&self, out: *mut *mut SettingsCommand) -> HRESULT }} impl ISettingsCommandStatics { - #[inline] pub unsafe fn get_accounts_command(&self) -> Result> { + #[inline] pub fn get_accounts_command(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AccountsCommand)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum SettingsEdgeLocation: i32 { Right (SettingsEdgeLocation_Right) = 0, Left (SettingsEdgeLocation_Left) = 1, }} 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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CommandsRequested(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_CommandsRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CommandsRequested(&self, cookie: foundation::EventRegistrationToken) -> HRESULT }} impl ISettingsPane { - #[inline] pub unsafe fn add_commands_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_commands_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CommandsRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_commands_requested(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_commands_requested(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CommandsRequested)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SettingsPane: ISettingsPane} impl RtActivatable for SettingsPane {} impl SettingsPane { - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} - #[inline] pub fn show() -> Result<()> { unsafe { + } + #[inline] pub fn show() -> Result<()> { >::get_activation_factory().show() - }} - #[inline] pub fn get_edge() -> Result { unsafe { + } + #[inline] pub fn get_edge() -> Result { >::get_activation_factory().get_edge() - }} + } } DEFINE_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]) [CLSID_SettingsPane]); 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_ApplicationCommands(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl ISettingsPaneCommandsRequest { - #[inline] pub unsafe fn get_application_commands(&self) -> Result>> { + #[inline] pub fn get_application_commands(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ApplicationCommands)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SettingsPaneCommandsRequest: ISettingsPaneCommandsRequest} DEFINE_IID!(IID_ISettingsPaneCommandsRequestedEventArgs, 543120676, 6984, 17961, 166, 202, 47, 223, 237, 175, 183, 93); @@ -11892,11 +11892,11 @@ RT_INTERFACE!{interface ISettingsPaneCommandsRequestedEventArgs(ISettingsPaneCom fn get_Request(&self, out: *mut *mut SettingsPaneCommandsRequest) -> HRESULT }} impl ISettingsPaneCommandsRequestedEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class SettingsPaneCommandsRequestedEventArgs: ISettingsPaneCommandsRequestedEventArgs} DEFINE_IID!(IID_ISettingsPaneStatics, 476730053, 65305, 18203, 186, 107, 248, 243, 86, 148, 173, 154); @@ -11906,20 +11906,20 @@ RT_INTERFACE!{static interface ISettingsPaneStatics(ISettingsPaneStaticsVtbl): I fn get_Edge(&self, out: *mut SettingsEdgeLocation) -> HRESULT }} impl ISettingsPaneStatics { - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn show(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn show(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Show)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_edge(&self) -> Result { + }} + #[inline] pub fn get_edge(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Edge)(self as *const _ as *mut _, &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, @@ -11935,28 +11935,28 @@ RT_INTERFACE!{interface IWebAccountCommand(IWebAccountCommandVtbl): IInspectable fn get_Actions(&self, out: *mut SupportedWebAccountActions) -> HRESULT }} impl IWebAccountCommand { - #[cfg(feature="windows-security")] #[inline] pub unsafe fn get_web_account(&self) -> Result> { + #[cfg(feature="windows-security")] #[inline] pub fn get_web_account(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WebAccount)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_invoked(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_invoked(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Invoked)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_actions(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_actions(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Actions)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class WebAccountCommand: IWebAccountCommand} impl RtActivatable for WebAccountCommand {} impl WebAccountCommand { - #[cfg(feature="windows-security")] #[inline] pub fn create_web_account_command(webAccount: &super::super::security::credentials::WebAccount, invoked: &WebAccountCommandInvokedHandler, actions: SupportedWebAccountActions) -> Result> { unsafe { + #[cfg(feature="windows-security")] #[inline] pub fn create_web_account_command(webAccount: &super::super::security::credentials::WebAccount, invoked: &WebAccountCommandInvokedHandler, actions: SupportedWebAccountActions) -> Result> { >::get_activation_factory().create_web_account_command(webAccount, invoked, actions) - }} + } } DEFINE_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]) [CLSID_WebAccountCommand]); DEFINE_IID!(IID_IWebAccountCommandFactory, 3215379967, 12077, 17141, 129, 222, 29, 86, 186, 252, 73, 109); @@ -11964,32 +11964,32 @@ RT_INTERFACE!{static interface IWebAccountCommandFactory(IWebAccountCommandFacto #[cfg(feature="windows-security")] fn CreateWebAccountCommand(&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(&self, webAccount: &super::super::security::credentials::WebAccount, invoked: &WebAccountCommandInvokedHandler, actions: SupportedWebAccountActions) -> Result> { + #[cfg(feature="windows-security")] #[inline] pub fn create_web_account_command(&self, webAccount: &super::super::security::credentials::WebAccount, invoked: &WebAccountCommandInvokedHandler, actions: SupportedWebAccountActions) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWebAccountCommand)(self as *const _ as *mut _, 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_WebAccountCommandInvokedHandler, 518448217, 5893, 19098, 181, 153, 160, 195, 214, 146, 25, 115); RT_DELEGATE!{delegate WebAccountCommandInvokedHandler(WebAccountCommandInvokedHandlerVtbl, WebAccountCommandInvokedHandlerImpl) [IID_WebAccountCommandInvokedHandler] { fn Invoke(&self, command: *mut WebAccountCommand, args: *mut WebAccountInvokedArgs) -> HRESULT }} impl WebAccountCommandInvokedHandler { - #[inline] pub unsafe fn invoke(&self, command: &WebAccountCommand, args: &WebAccountInvokedArgs) -> Result<()> { + #[inline] pub fn invoke(&self, command: &WebAccountCommand, args: &WebAccountInvokedArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, command as *const _ as *mut _, args as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut WebAccountAction) -> HRESULT }} impl IWebAccountInvokedArgs { - #[inline] pub unsafe fn get_action(&self) -> Result { + #[inline] pub fn get_action(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Action)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class WebAccountInvokedArgs: IWebAccountInvokedArgs} DEFINE_IID!(IID_IWebAccountProviderCommand, 3600539034, 41126, 20123, 136, 220, 199, 30, 117, 122, 53, 1); @@ -11999,23 +11999,23 @@ RT_INTERFACE!{interface IWebAccountProviderCommand(IWebAccountProviderCommandVtb fn get_Invoked(&self, out: *mut *mut WebAccountProviderCommandInvokedHandler) -> HRESULT }} impl IWebAccountProviderCommand { - #[cfg(feature="windows-security")] #[inline] pub unsafe fn get_web_account_provider(&self) -> Result> { + #[cfg(feature="windows-security")] #[inline] pub fn get_web_account_provider(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WebAccountProvider)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_invoked(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_invoked(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Invoked)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class WebAccountProviderCommand: IWebAccountProviderCommand} impl RtActivatable for WebAccountProviderCommand {} impl WebAccountProviderCommand { - #[cfg(feature="windows-security")] #[inline] pub fn create_web_account_provider_command(webAccountProvider: &super::super::security::credentials::WebAccountProvider, invoked: &WebAccountProviderCommandInvokedHandler) -> Result> { unsafe { + #[cfg(feature="windows-security")] #[inline] pub fn create_web_account_provider_command(webAccountProvider: &super::super::security::credentials::WebAccountProvider, invoked: &WebAccountProviderCommandInvokedHandler) -> Result> { >::get_activation_factory().create_web_account_provider_command(webAccountProvider, invoked) - }} + } } DEFINE_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]) [CLSID_WebAccountProviderCommand]); DEFINE_IID!(IID_IWebAccountProviderCommandFactory, 3580201499, 45430, 18294, 132, 105, 169, 211, 255, 11, 63, 89); @@ -12023,21 +12023,21 @@ RT_INTERFACE!{static interface IWebAccountProviderCommandFactory(IWebAccountProv #[cfg(feature="windows-security")] fn CreateWebAccountProviderCommand(&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(&self, webAccountProvider: &super::super::security::credentials::WebAccountProvider, invoked: &WebAccountProviderCommandInvokedHandler) -> Result> { + #[cfg(feature="windows-security")] #[inline] pub fn create_web_account_provider_command(&self, webAccountProvider: &super::super::security::credentials::WebAccountProvider, invoked: &WebAccountProviderCommandInvokedHandler) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWebAccountProviderCommand)(self as *const _ as *mut _, 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_WebAccountProviderCommandInvokedHandler, 3084801319, 19599, 17117, 132, 218, 94, 196, 147, 171, 219, 154); RT_DELEGATE!{delegate WebAccountProviderCommandInvokedHandler(WebAccountProviderCommandInvokedHandlerVtbl, WebAccountProviderCommandInvokedHandlerImpl) [IID_WebAccountProviderCommandInvokedHandler] { fn Invoke(&self, command: *mut WebAccountProviderCommand) -> HRESULT }} impl WebAccountProviderCommandInvokedHandler { - #[inline] pub unsafe fn invoke(&self, command: &WebAccountProviderCommand) -> Result<()> { + #[inline] pub fn invoke(&self, command: &WebAccountProviderCommand) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, command as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } } // Windows.UI.ApplicationSettings pub mod webui { // Windows.UI.WebUI @@ -12047,10 +12047,10 @@ RT_INTERFACE!{interface IActivatedDeferral(IActivatedDeferralVtbl): IInspectable fn Complete(&self) -> HRESULT }} impl IActivatedDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ActivatedDeferral: IActivatedDeferral} DEFINE_IID!(IID_IActivatedEventArgsDeferral, 3396165492, 25538, 17574, 185, 123, 217, 160, 60, 32, 188, 155); @@ -12058,32 +12058,32 @@ RT_INTERFACE!{interface IActivatedEventArgsDeferral(IActivatedEventArgsDeferralV fn get_ActivatedOperation(&self, out: *mut *mut ActivatedOperation) -> HRESULT }} impl IActivatedEventArgsDeferral { - #[inline] pub unsafe fn get_activated_operation(&self) -> Result> { + #[inline] pub fn get_activated_operation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ActivatedOperation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, sender: *mut IInspectable, eventArgs: *mut super::super::applicationmodel::activation::IActivatedEventArgs) -> HRESULT }} impl ActivatedEventHandler { - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn invoke(&self, sender: &IInspectable, eventArgs: &super::super::applicationmodel::activation::IActivatedEventArgs) -> Result<()> { + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn invoke(&self, sender: &IInspectable, eventArgs: &super::super::applicationmodel::activation::IActivatedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, eventArgs as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut ActivatedDeferral) -> HRESULT }} impl IActivatedOperation { - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ActivatedOperation: IActivatedOperation} #[cfg(feature="windows-applicationmodel")] RT_CLASS!{class EnteredBackgroundEventArgs: super::super::applicationmodel::IEnteredBackgroundEventArgs} @@ -12093,10 +12093,10 @@ RT_DELEGATE!{delegate EnteredBackgroundEventHandler(EnteredBackgroundEventHandle #[cfg(feature="windows-applicationmodel")] fn Invoke(&self, sender: *mut IInspectable, e: *mut super::super::applicationmodel::IEnteredBackgroundEventArgs) -> HRESULT }} impl EnteredBackgroundEventHandler { - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn invoke(&self, sender: &IInspectable, e: &super::super::applicationmodel::IEnteredBackgroundEventArgs) -> Result<()> { + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn invoke(&self, sender: &IInspectable, e: &super::super::applicationmodel::IEnteredBackgroundEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, e as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IHtmlPrintDocumentSource, 3467003546, 3589, 18042, 171, 201, 54, 236, 29, 76, 220, 182); RT_INTERFACE!{interface IHtmlPrintDocumentSource(IHtmlPrintDocumentSourceVtbl): IInspectable(IInspectableVtbl) [IID_IHtmlPrintDocumentSource] { @@ -12120,88 +12120,88 @@ RT_INTERFACE!{interface IHtmlPrintDocumentSource(IHtmlPrintDocumentSourceVtbl): fn TrySetPageRange(&self, strPageRange: HSTRING, out: *mut bool) -> HRESULT }} impl IHtmlPrintDocumentSource { - #[inline] pub unsafe fn get_content(&self) -> Result { + #[inline] pub fn get_content(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Content)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_content(&self, value: PrintContent) -> Result<()> { + }} + #[inline] pub fn set_content(&self, value: PrintContent) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Content)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_left_margin(&self) -> Result { + }} + #[inline] pub fn get_left_margin(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LeftMargin)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_left_margin(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_left_margin(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LeftMargin)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_top_margin(&self) -> Result { + }} + #[inline] pub fn get_top_margin(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TopMargin)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_top_margin(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_top_margin(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TopMargin)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_right_margin(&self) -> Result { + }} + #[inline] pub fn get_right_margin(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RightMargin)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_right_margin(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_right_margin(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RightMargin)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_bottom_margin(&self) -> Result { + }} + #[inline] pub fn get_bottom_margin(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BottomMargin)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_bottom_margin(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_bottom_margin(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BottomMargin)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_enable_header_footer(&self) -> Result { + }} + #[inline] pub fn get_enable_header_footer(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EnableHeaderFooter)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_enable_header_footer(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_enable_header_footer(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_EnableHeaderFooter)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_shrink_to_fit(&self) -> Result { + }} + #[inline] pub fn get_shrink_to_fit(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ShrinkToFit)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_shrink_to_fit(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_shrink_to_fit(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ShrinkToFit)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_percent_scale(&self) -> Result { + }} + #[inline] pub fn get_percent_scale(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PercentScale)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_percent_scale(&self, scalePercent: f32) -> Result<()> { + }} + #[inline] pub fn set_percent_scale(&self, scalePercent: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PercentScale)(self as *const _ as *mut _, scalePercent); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_page_range(&self) -> Result { + }} + #[inline] pub fn get_page_range(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PageRange)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_set_page_range(&self, strPageRange: &HStringArg) -> Result { + }} + #[inline] pub fn try_set_page_range(&self, strPageRange: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TrySetPageRange)(self as *const _ as *mut _, 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 LeavingBackgroundEventArgs: super::super::applicationmodel::ILeavingBackgroundEventArgs} @@ -12211,20 +12211,20 @@ RT_DELEGATE!{delegate LeavingBackgroundEventHandler(LeavingBackgroundEventHandle #[cfg(feature="windows-applicationmodel")] fn Invoke(&self, sender: *mut IInspectable, e: *mut super::super::applicationmodel::ILeavingBackgroundEventArgs) -> HRESULT }} impl LeavingBackgroundEventHandler { - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn invoke(&self, sender: &IInspectable, e: &super::super::applicationmodel::ILeavingBackgroundEventArgs) -> Result<()> { + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn invoke(&self, sender: &IInspectable, e: &super::super::applicationmodel::ILeavingBackgroundEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, 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(&self, sender: *mut IInspectable, e: *mut IWebUINavigatedEventArgs) -> HRESULT }} impl NavigatedEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &IInspectable, e: &IWebUINavigatedEventArgs) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &IInspectable, e: &IWebUINavigatedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, e as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum PrintContent: i32 { AllPages (PrintContent_AllPages) = 0, CurrentPage (PrintContent_CurrentPage) = 1, CustomPageRange (PrintContent_CustomPageRange) = 2, CurrentSelection (PrintContent_CurrentSelection) = 3, @@ -12234,10 +12234,10 @@ RT_DELEGATE!{delegate ResumingEventHandler(ResumingEventHandlerVtbl, ResumingEve fn Invoke(&self, sender: *mut IInspectable) -> HRESULT }} impl ResumingEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &IInspectable) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } #[cfg(feature="windows-applicationmodel")] RT_CLASS!{class SuspendingDeferral: super::super::applicationmodel::ISuspendingDeferral} #[cfg(not(feature="windows-applicationmodel"))] RT_CLASS!{class SuspendingDeferral: IInspectable} @@ -12248,162 +12248,162 @@ RT_DELEGATE!{delegate SuspendingEventHandler(SuspendingEventHandlerVtbl, Suspend #[cfg(feature="windows-applicationmodel")] fn Invoke(&self, sender: *mut IInspectable, e: *mut super::super::applicationmodel::ISuspendingEventArgs) -> HRESULT }} impl SuspendingEventHandler { - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn invoke(&self, sender: &IInspectable, e: &super::super::applicationmodel::ISuspendingEventArgs) -> Result<()> { + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn invoke(&self, sender: &IInspectable, e: &super::super::applicationmodel::ISuspendingEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, e as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } #[cfg(feature="windows-applicationmodel")] RT_CLASS!{class SuspendingOperation: super::super::applicationmodel::ISuspendingOperation} #[cfg(not(feature="windows-applicationmodel"))] RT_CLASS!{class SuspendingOperation: IInspectable} 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(&self, handler: *mut ActivatedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Activated(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Suspending(&self, handler: *mut SuspendingEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Suspending(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Resuming(&self, handler: *mut ResumingEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Resuming(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Navigated(&self, handler: *mut NavigatedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Navigated(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_Activated(&self, handler: *mut ActivatedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Activated(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Suspending(&self, handler: *mut SuspendingEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Suspending(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Resuming(&self, handler: *mut ResumingEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Resuming(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Navigated(&self, handler: *mut NavigatedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Navigated(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IWebUIActivationStatics { - #[inline] pub unsafe fn add_activated(&self, handler: &ActivatedEventHandler) -> Result { + #[inline] pub fn add_activated(&self, handler: &ActivatedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Activated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_activated(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_activated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Activated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_suspending(&self, handler: &SuspendingEventHandler) -> Result { + }} + #[inline] pub fn add_suspending(&self, handler: &SuspendingEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Suspending)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_suspending(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_suspending(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Suspending)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_resuming(&self, handler: &ResumingEventHandler) -> Result { + }} + #[inline] pub fn add_resuming(&self, handler: &ResumingEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Resuming)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_resuming(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_resuming(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Resuming)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_navigated(&self, handler: &NavigatedEventHandler) -> Result { + }} + #[inline] pub fn add_navigated(&self, handler: &NavigatedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Navigated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_navigated(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_navigated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Navigated)(self as *const _ as *mut _, 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(&self, handler: *mut LeavingBackgroundEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_LeavingBackground(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_EnteredBackground(&self, handler: *mut EnteredBackgroundEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_EnteredBackground(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_LeavingBackground(&self, handler: *mut LeavingBackgroundEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_LeavingBackground(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_EnteredBackground(&self, handler: *mut EnteredBackgroundEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnteredBackground(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn EnablePrelaunch(&self, value: bool) -> HRESULT }} impl IWebUIActivationStatics2 { - #[inline] pub unsafe fn add_leaving_background(&self, handler: &LeavingBackgroundEventHandler) -> Result { + #[inline] pub fn add_leaving_background(&self, handler: &LeavingBackgroundEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_LeavingBackground)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_leaving_background(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_leaving_background(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_LeavingBackground)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_entered_background(&self, handler: &EnteredBackgroundEventHandler) -> Result { + }} + #[inline] pub fn add_entered_background(&self, handler: &EnteredBackgroundEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_EnteredBackground)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_entered_background(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_entered_background(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_EnteredBackground)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn enable_prelaunch(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn enable_prelaunch(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).EnablePrelaunch)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IWebUIActivationStatics3, 2443949702, 6901, 17477, 180, 159, 148, 89, 244, 15, 200, 222); RT_INTERFACE!{static interface IWebUIActivationStatics3(IWebUIActivationStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IWebUIActivationStatics3] { #[cfg(not(feature="windows-applicationmodel"))] fn __Dummy0(&self) -> (), - #[cfg(feature="windows-applicationmodel")] fn RequestRestartAsync(&self, launchArguments: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(all(feature="windows-applicationmodel",feature="windows-system"))] fn RequestRestartForUserAsync(&self, user: *mut super::super::system::User, launchArguments: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-applicationmodel")] fn RequestRestartAsync(&self, launchArguments: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(all(feature="windows-applicationmodel",feature="windows-system"))] fn RequestRestartForUserAsync(&self, user: *mut super::super::system::User, launchArguments: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IWebUIActivationStatics3 { - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn request_restart_async(&self, launchArguments: &HStringArg) -> Result>> { + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn request_restart_async(&self, launchArguments: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestRestartAsync)(self as *const _ as *mut _, launchArguments.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(all(feature="windows-applicationmodel",feature="windows-system"))] #[inline] pub unsafe fn request_restart_for_user_async(&self, user: &super::super::system::User, launchArguments: &HStringArg) -> Result>> { + }} + #[cfg(all(feature="windows-applicationmodel",feature="windows-system"))] #[inline] pub fn request_restart_for_user_async(&self, user: &super::super::system::User, launchArguments: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestRestartForUserAsync)(self as *const _ as *mut _, user as *const _ as *mut _, launchArguments.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class WebUIApplication} impl RtActivatable for WebUIApplication {} impl RtActivatable for WebUIApplication {} impl RtActivatable for WebUIApplication {} impl WebUIApplication { - #[inline] pub fn add_activated(handler: &ActivatedEventHandler) -> Result { unsafe { + #[inline] pub fn add_activated(handler: &ActivatedEventHandler) -> Result { >::get_activation_factory().add_activated(handler) - }} - #[inline] pub fn remove_activated(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_activated(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_activated(token) - }} - #[inline] pub fn add_suspending(handler: &SuspendingEventHandler) -> Result { unsafe { + } + #[inline] pub fn add_suspending(handler: &SuspendingEventHandler) -> Result { >::get_activation_factory().add_suspending(handler) - }} - #[inline] pub fn remove_suspending(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_suspending(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_suspending(token) - }} - #[inline] pub fn add_resuming(handler: &ResumingEventHandler) -> Result { unsafe { + } + #[inline] pub fn add_resuming(handler: &ResumingEventHandler) -> Result { >::get_activation_factory().add_resuming(handler) - }} - #[inline] pub fn remove_resuming(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_resuming(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_resuming(token) - }} - #[inline] pub fn add_navigated(handler: &NavigatedEventHandler) -> Result { unsafe { + } + #[inline] pub fn add_navigated(handler: &NavigatedEventHandler) -> Result { >::get_activation_factory().add_navigated(handler) - }} - #[inline] pub fn remove_navigated(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_navigated(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_navigated(token) - }} - #[inline] pub fn add_leaving_background(handler: &LeavingBackgroundEventHandler) -> Result { unsafe { + } + #[inline] pub fn add_leaving_background(handler: &LeavingBackgroundEventHandler) -> Result { >::get_activation_factory().add_leaving_background(handler) - }} - #[inline] pub fn remove_leaving_background(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_leaving_background(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_leaving_background(token) - }} - #[inline] pub fn add_entered_background(handler: &EnteredBackgroundEventHandler) -> Result { unsafe { + } + #[inline] pub fn add_entered_background(handler: &EnteredBackgroundEventHandler) -> Result { >::get_activation_factory().add_entered_background(handler) - }} - #[inline] pub fn remove_entered_background(token: super::super::foundation::EventRegistrationToken) -> Result<()> { unsafe { + } + #[inline] pub fn remove_entered_background(token: foundation::EventRegistrationToken) -> Result<()> { >::get_activation_factory().remove_entered_background(token) - }} - #[inline] pub fn enable_prelaunch(value: bool) -> Result<()> { unsafe { + } + #[inline] pub fn enable_prelaunch(value: bool) -> Result<()> { >::get_activation_factory().enable_prelaunch(value) - }} - #[cfg(feature="windows-applicationmodel")] #[inline] pub fn request_restart_async(launchArguments: &HStringArg) -> Result>> { unsafe { + } + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn request_restart_async(launchArguments: &HStringArg) -> Result>> { >::get_activation_factory().request_restart_async(launchArguments) - }} - #[cfg(all(feature="windows-applicationmodel",feature="windows-system"))] #[inline] pub fn request_restart_for_user_async(user: &super::super::system::User, launchArguments: &HStringArg) -> Result>> { unsafe { + } + #[cfg(all(feature="windows-applicationmodel",feature="windows-system"))] #[inline] pub fn request_restart_for_user_async(user: &super::super::system::User, launchArguments: &HStringArg) -> Result>> { >::get_activation_factory().request_restart_for_user_async(user, launchArguments) - }} + } } DEFINE_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]) [CLSID_WebUIApplication]); #[cfg(feature="windows-applicationmodel")] RT_CLASS!{class WebUIAppointmentsProviderAddAppointmentActivatedEventArgs: super::super::applicationmodel::activation::IAppointmentsProviderAddAppointmentActivatedEventArgs} @@ -12422,22 +12422,22 @@ RT_INTERFACE!{interface IWebUIBackgroundTaskInstance(IWebUIBackgroundTaskInstanc fn put_Succeeded(&self, succeeded: bool) -> HRESULT }} impl IWebUIBackgroundTaskInstance { - #[inline] pub unsafe fn get_succeeded(&self) -> Result { + #[inline] pub fn get_succeeded(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Succeeded)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_succeeded(&self, succeeded: bool) -> Result<()> { + }} + #[inline] pub fn set_succeeded(&self, succeeded: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Succeeded)(self as *const _ as *mut _, succeeded); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{static class WebUIBackgroundTaskInstance} impl RtActivatable for WebUIBackgroundTaskInstance {} impl WebUIBackgroundTaskInstance { - #[inline] pub fn get_current() -> Result> { unsafe { + #[inline] pub fn get_current() -> Result>> { >::get_activation_factory().get_current() - }} + } } DEFINE_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]) [CLSID_WebUIBackgroundTaskInstance]); RT_CLASS!{class WebUIBackgroundTaskInstanceRuntimeClass: IWebUIBackgroundTaskInstance} @@ -12446,11 +12446,11 @@ RT_INTERFACE!{static interface IWebUIBackgroundTaskInstanceStatics(IWebUIBackgro fn get_Current(&self, out: *mut *mut IWebUIBackgroundTaskInstance) -> HRESULT }} impl IWebUIBackgroundTaskInstanceStatics { - #[inline] pub unsafe fn get_current(&self) -> Result> { + #[inline] pub fn get_current(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Current)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } #[cfg(feature="windows-applicationmodel")] RT_CLASS!{class WebUICachedFileUpdaterActivatedEventArgs: super::super::applicationmodel::activation::ICachedFileUpdaterActivatedEventArgs} #[cfg(not(feature="windows-applicationmodel"))] RT_CLASS!{class WebUICachedFileUpdaterActivatedEventArgs: IInspectable} @@ -12503,10 +12503,10 @@ RT_INTERFACE!{interface IWebUINavigatedDeferral(IWebUINavigatedDeferralVtbl): II fn Complete(&self) -> HRESULT }} impl IWebUINavigatedDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class WebUINavigatedDeferral: IWebUINavigatedDeferral} DEFINE_IID!(IID_IWebUINavigatedEventArgs, 2807579064, 9369, 16432, 166, 157, 21, 210, 217, 207, 229, 36); @@ -12514,11 +12514,11 @@ RT_INTERFACE!{interface IWebUINavigatedEventArgs(IWebUINavigatedEventArgsVtbl): fn get_NavigatedOperation(&self, out: *mut *mut WebUINavigatedOperation) -> HRESULT }} impl IWebUINavigatedEventArgs { - #[inline] pub unsafe fn get_navigated_operation(&self) -> Result> { + #[inline] pub fn get_navigated_operation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NavigatedOperation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class WebUINavigatedEventArgs: IWebUINavigatedEventArgs} DEFINE_IID!(IID_IWebUINavigatedOperation, 2056675080, 33154, 19081, 171, 103, 132, 146, 232, 117, 13, 75); @@ -12526,11 +12526,11 @@ RT_INTERFACE!{interface IWebUINavigatedOperation(IWebUINavigatedOperationVtbl): fn GetDeferral(&self, out: *mut *mut WebUINavigatedDeferral) -> HRESULT }} impl IWebUINavigatedOperation { - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class WebUINavigatedOperation: IWebUINavigatedOperation} #[cfg(feature="windows-applicationmodel")] RT_CLASS!{class WebUIPrint3DWorkflowActivatedEventArgs: super::super::applicationmodel::activation::IPrint3DWorkflowActivatedEventArgs} @@ -12571,18 +12571,18 @@ RT_INTERFACE!{interface IAdaptiveCard(IAdaptiveCardVtbl): IInspectable(IInspecta fn ToJson(&self, out: *mut HSTRING) -> HRESULT }} impl IAdaptiveCard { - #[inline] pub unsafe fn to_json(&self) -> Result { + #[inline] pub fn to_json(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ToJson)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class AdaptiveCardBuilder} impl RtActivatable for AdaptiveCardBuilder {} impl AdaptiveCardBuilder { - #[inline] pub fn create_adaptive_card_from_json(value: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_adaptive_card_from_json(value: &HStringArg) -> Result>> { >::get_activation_factory().create_adaptive_card_from_json(value) - }} + } } DEFINE_CLSID!(AdaptiveCardBuilder(&[87,105,110,100,111,119,115,46,85,73,46,83,104,101,108,108,46,65,100,97,112,116,105,118,101,67,97,114,100,66,117,105,108,100,101,114,0]) [CLSID_AdaptiveCardBuilder]); DEFINE_IID!(IID_IAdaptiveCardBuilderStatics, 1986891528, 54270, 17223, 160, 188, 185, 234, 154, 109, 194, 142); @@ -12590,59 +12590,59 @@ RT_INTERFACE!{static interface IAdaptiveCardBuilderStatics(IAdaptiveCardBuilderS fn CreateAdaptiveCardFromJson(&self, value: HSTRING, out: *mut *mut IAdaptiveCard) -> HRESULT }} impl IAdaptiveCardBuilderStatics { - #[inline] pub unsafe fn create_adaptive_card_from_json(&self, value: &HStringArg) -> Result> { + #[inline] pub fn create_adaptive_card_from_json(&self, value: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAdaptiveCardFromJson)(self as *const _ as *mut _, value.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_ITaskbarManager, 2269710873, 6873, 18932, 178, 232, 134, 115, 141, 197, 172, 64); RT_INTERFACE!{interface ITaskbarManager(ITaskbarManagerVtbl): IInspectable(IInspectableVtbl) [IID_ITaskbarManager] { fn get_IsSupported(&self, out: *mut bool) -> HRESULT, fn get_IsPinningAllowed(&self, out: *mut bool) -> HRESULT, - fn IsCurrentAppPinnedAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-applicationmodel")] fn IsAppListEntryPinnedAsync(&self, appListEntry: *mut super::super::applicationmodel::core::AppListEntry, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestPinCurrentAppAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-applicationmodel")] fn RequestPinAppListEntryAsync(&self, appListEntry: *mut super::super::applicationmodel::core::AppListEntry, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn IsCurrentAppPinnedAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-applicationmodel")] fn IsAppListEntryPinnedAsync(&self, appListEntry: *mut super::super::applicationmodel::core::AppListEntry, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestPinCurrentAppAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-applicationmodel")] fn RequestPinAppListEntryAsync(&self, appListEntry: *mut super::super::applicationmodel::core::AppListEntry, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ITaskbarManager { - #[inline] pub unsafe fn get_is_supported(&self) -> Result { + #[inline] pub fn get_is_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_pinning_allowed(&self) -> Result { + }} + #[inline] pub fn get_is_pinning_allowed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPinningAllowed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn is_current_app_pinned_async(&self) -> Result>> { + }} + #[inline] pub fn is_current_app_pinned_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).IsCurrentAppPinnedAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn is_app_list_entry_pinned_async(&self, appListEntry: &super::super::applicationmodel::core::AppListEntry) -> Result>> { + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn is_app_list_entry_pinned_async(&self, appListEntry: &super::super::applicationmodel::core::AppListEntry) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).IsAppListEntryPinnedAsync)(self as *const _ as *mut _, appListEntry as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_pin_current_app_async(&self) -> Result>> { + }} + #[inline] pub fn request_pin_current_app_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestPinCurrentAppAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn request_pin_app_list_entry_async(&self, appListEntry: &super::super::applicationmodel::core::AppListEntry) -> Result>> { + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn request_pin_app_list_entry_async(&self, appListEntry: &super::super::applicationmodel::core::AppListEntry) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestPinAppListEntryAsync)(self as *const _ as *mut _, appListEntry as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class TaskbarManager: ITaskbarManager} impl RtActivatable for TaskbarManager {} impl TaskbarManager { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} + } } DEFINE_CLSID!(TaskbarManager(&[87,105,110,100,111,119,115,46,85,73,46,83,104,101,108,108,46,84,97,115,107,98,97,114,77,97,110,97,103,101,114,0]) [CLSID_TaskbarManager]); DEFINE_IID!(IID_ITaskbarManagerStatics, 3677530996, 56914, 20454, 183, 182, 149, 255, 159, 131, 149, 223); @@ -12650,11 +12650,11 @@ RT_INTERFACE!{static interface ITaskbarManagerStatics(ITaskbarManagerStaticsVtbl fn GetDefault(&self, out: *mut *mut TaskbarManager) -> HRESULT }} impl ITaskbarManagerStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } } // Windows.UI.Shell pub mod startscreen { // Windows.UI.StartScreen @@ -12664,41 +12664,41 @@ RT_ENUM! { enum ForegroundText: i32 { }} 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Items(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_SystemGroupKind(&self, out: *mut JumpListSystemGroupKind) -> HRESULT, fn put_SystemGroupKind(&self, value: JumpListSystemGroupKind) -> HRESULT, - fn SaveAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT + fn SaveAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT }} impl IJumpList { - #[inline] pub unsafe fn get_items(&self) -> Result>> { + #[inline] pub fn get_items(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Items)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_system_group_kind(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_system_group_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SystemGroupKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_system_group_kind(&self, value: JumpListSystemGroupKind) -> Result<()> { + }} + #[inline] pub fn set_system_group_kind(&self, value: JumpListSystemGroupKind) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SystemGroupKind)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn save_async(&self) -> Result> { + }} + #[inline] pub fn save_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class JumpList: IJumpList} impl RtActivatable for JumpList {} impl JumpList { - #[inline] pub fn load_current_async() -> Result>> { unsafe { + #[inline] pub fn load_current_async() -> Result>> { >::get_activation_factory().load_current_async() - }} - #[inline] pub fn is_supported() -> Result { unsafe { + } + #[inline] pub fn is_supported() -> Result { >::get_activation_factory().is_supported() - }} + } } DEFINE_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]) [CLSID_JumpList]); DEFINE_IID!(IID_IJumpListItem, 2061199127, 35677, 18464, 153, 91, 155, 65, 141, 190, 72, 176); @@ -12712,71 +12712,71 @@ RT_INTERFACE!{interface IJumpListItem(IJumpListItemVtbl): IInspectable(IInspecta fn put_DisplayName(&self, value: HSTRING) -> HRESULT, fn get_GroupName(&self, out: *mut HSTRING) -> HRESULT, fn put_GroupName(&self, value: HSTRING) -> HRESULT, - fn get_Logo(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_Logo(&self, value: *mut super::super::foundation::Uri) -> HRESULT + fn get_Logo(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_Logo(&self, value: *mut foundation::Uri) -> HRESULT }} impl IJumpListItem { - #[inline] pub unsafe fn get_kind(&self) -> Result { + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_arguments(&self) -> Result { + }} + #[inline] pub fn get_arguments(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Arguments)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_removed_by_user(&self) -> Result { + }} + #[inline] pub fn get_removed_by_user(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RemovedByUser)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_description(&self) -> Result { + }} + #[inline] pub fn get_description(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Description)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_description(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_description(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Description)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_display_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_group_name(&self) -> Result { + }} + #[inline] pub fn get_group_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_GroupName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_group_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_group_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_GroupName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_logo(&self) -> Result> { + }} + #[inline] pub fn get_logo(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Logo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_logo(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_logo(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Logo)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class JumpListItem: IJumpListItem} impl RtActivatable for JumpListItem {} impl JumpListItem { - #[inline] pub fn create_with_arguments(arguments: &HStringArg, displayName: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_with_arguments(arguments: &HStringArg, displayName: &HStringArg) -> Result>> { >::get_activation_factory().create_with_arguments(arguments, displayName) - }} - #[inline] pub fn create_separator() -> Result> { unsafe { + } + #[inline] pub fn create_separator() -> Result>> { >::get_activation_factory().create_separator() - }} + } } DEFINE_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]) [CLSID_JumpListItem]); RT_ENUM! { enum JumpListItemKind: i32 { @@ -12788,33 +12788,33 @@ RT_INTERFACE!{static interface IJumpListItemStatics(IJumpListItemStaticsVtbl): I fn CreateSeparator(&self, out: *mut *mut JumpListItem) -> HRESULT }} impl IJumpListItemStatics { - #[inline] pub unsafe fn create_with_arguments(&self, arguments: &HStringArg, displayName: &HStringArg) -> Result> { + #[inline] pub fn create_with_arguments(&self, arguments: &HStringArg, displayName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithArguments)(self as *const _ as *mut _, arguments.get(), displayName.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_separator(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_separator(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateSeparator)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn LoadCurrentAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn IsSupported(&self, out: *mut bool) -> HRESULT }} impl IJumpListStatics { - #[inline] pub unsafe fn load_current_async(&self) -> Result>> { + #[inline] pub fn load_current_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LoadCurrentAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn is_supported(&self) -> Result { + }} + #[inline] pub fn is_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).IsSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum JumpListSystemGroupKind: i32 { None (JumpListSystemGroupKind_None) = 0, Frequent (JumpListSystemGroupKind_Frequent) = 1, Recent (JumpListSystemGroupKind_Recent) = 2, @@ -12829,14 +12829,14 @@ RT_INTERFACE!{interface ISecondaryTile(ISecondaryTileVtbl): IInspectable(IInspec fn get_ShortName(&self, out: *mut HSTRING) -> HRESULT, fn put_DisplayName(&self, value: HSTRING) -> HRESULT, fn get_DisplayName(&self, out: *mut HSTRING) -> HRESULT, - fn put_Logo(&self, value: *mut super::super::foundation::Uri) -> HRESULT, - fn get_Logo(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_SmallLogo(&self, value: *mut super::super::foundation::Uri) -> HRESULT, - fn get_SmallLogo(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_WideLogo(&self, value: *mut super::super::foundation::Uri) -> HRESULT, - fn get_WideLogo(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_LockScreenBadgeLogo(&self, value: *mut super::super::foundation::Uri) -> HRESULT, - fn get_LockScreenBadgeLogo(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn put_Logo(&self, value: *mut foundation::Uri) -> HRESULT, + fn get_Logo(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_SmallLogo(&self, value: *mut foundation::Uri) -> HRESULT, + fn get_SmallLogo(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_WideLogo(&self, value: *mut foundation::Uri) -> HRESULT, + fn get_WideLogo(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_LockScreenBadgeLogo(&self, value: *mut foundation::Uri) -> HRESULT, + fn get_LockScreenBadgeLogo(&self, out: *mut *mut foundation::Uri) -> HRESULT, fn put_LockScreenDisplayBadgeAndTileText(&self, value: bool) -> HRESULT, fn get_LockScreenDisplayBadgeAndTileText(&self, out: *mut bool) -> HRESULT, fn put_TileOptions(&self, value: TileOptions) -> HRESULT, @@ -12845,170 +12845,170 @@ RT_INTERFACE!{interface ISecondaryTile(ISecondaryTileVtbl): IInspectable(IInspec fn get_ForegroundText(&self, out: *mut ForegroundText) -> HRESULT, fn put_BackgroundColor(&self, value: super::Color) -> HRESULT, fn get_BackgroundColor(&self, out: *mut super::Color) -> HRESULT, - fn RequestCreateAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestCreateAsyncWithPoint(&self, invocationPoint: super::super::foundation::Point, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestCreateAsyncWithRect(&self, selection: super::super::foundation::Rect, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestCreateAsyncWithRectAndPlacement(&self, selection: super::super::foundation::Rect, preferredPlacement: super::popups::Placement, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestDeleteAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestDeleteAsyncWithPoint(&self, invocationPoint: super::super::foundation::Point, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestDeleteAsyncWithRect(&self, selection: super::super::foundation::Rect, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RequestDeleteAsyncWithRectAndPlacement(&self, selection: super::super::foundation::Rect, preferredPlacement: super::popups::Placement, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn UpdateAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn RequestCreateAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestCreateAsyncWithPoint(&self, invocationPoint: foundation::Point, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestCreateAsyncWithRect(&self, selection: foundation::Rect, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestCreateAsyncWithRectAndPlacement(&self, selection: foundation::Rect, preferredPlacement: super::popups::Placement, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestDeleteAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestDeleteAsyncWithPoint(&self, invocationPoint: foundation::Point, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestDeleteAsyncWithRect(&self, selection: foundation::Rect, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RequestDeleteAsyncWithRectAndPlacement(&self, selection: foundation::Rect, preferredPlacement: super::popups::Placement, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn UpdateAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl ISecondaryTile { - #[inline] pub unsafe fn set_tile_id(&self, value: &HStringArg) -> Result<()> { + #[inline] pub fn set_tile_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TileId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_tile_id(&self) -> Result { + }} + #[inline] pub fn get_tile_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TileId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_arguments(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_arguments(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Arguments)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_arguments(&self) -> Result { + }} + #[inline] pub fn get_arguments(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Arguments)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_short_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_short_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ShortName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_short_name(&self) -> Result { + }} + #[inline] pub fn get_short_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ShortName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_display_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_logo(&self, value: &super::super::foundation::Uri) -> Result<()> { + }} + #[inline] pub fn set_logo(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Logo)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_logo(&self) -> Result> { + }} + #[inline] pub fn get_logo(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Logo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_small_logo(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_small_logo(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SmallLogo)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_small_logo(&self) -> Result> { + }} + #[inline] pub fn get_small_logo(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SmallLogo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_wide_logo(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_wide_logo(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_WideLogo)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_wide_logo(&self) -> Result> { + }} + #[inline] pub fn get_wide_logo(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WideLogo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_lock_screen_badge_logo(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_lock_screen_badge_logo(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LockScreenBadgeLogo)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_lock_screen_badge_logo(&self) -> Result> { + }} + #[inline] pub fn get_lock_screen_badge_logo(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LockScreenBadgeLogo)(self as *const _ as *mut _, &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(&self, value: bool) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_lock_screen_display_badge_and_tile_text(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LockScreenDisplayBadgeAndTileText)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_lock_screen_display_badge_and_tile_text(&self) -> Result { + }} + #[inline] pub fn get_lock_screen_display_badge_and_tile_text(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LockScreenDisplayBadgeAndTileText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_tile_options(&self, value: TileOptions) -> Result<()> { + }} + #[inline] pub fn set_tile_options(&self, value: TileOptions) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TileOptions)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_tile_options(&self) -> Result { + }} + #[inline] pub fn get_tile_options(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TileOptions)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_foreground_text(&self, value: ForegroundText) -> Result<()> { + }} + #[inline] pub fn set_foreground_text(&self, value: ForegroundText) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ForegroundText)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_foreground_text(&self) -> Result { + }} + #[inline] pub fn get_foreground_text(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ForegroundText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_background_color(&self, value: super::Color) -> Result<()> { + }} + #[inline] pub fn set_background_color(&self, value: super::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BackgroundColor)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_background_color(&self) -> Result { + }} + #[inline] pub fn get_background_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BackgroundColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn request_create_async(&self) -> Result>> { + }} + #[inline] pub fn request_create_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestCreateAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_create_async_with_point(&self, invocationPoint: super::super::foundation::Point) -> Result>> { + }} + #[inline] pub fn request_create_async_with_point(&self, invocationPoint: foundation::Point) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestCreateAsyncWithPoint)(self as *const _ as *mut _, invocationPoint, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_create_async_with_rect(&self, selection: super::super::foundation::Rect) -> Result>> { + }} + #[inline] pub fn request_create_async_with_rect(&self, selection: foundation::Rect) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestCreateAsyncWithRect)(self as *const _ as *mut _, 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(&self, selection: super::super::foundation::Rect, preferredPlacement: super::popups::Placement) -> Result>> { + }} + #[inline] pub fn request_create_async_with_rect_and_placement(&self, selection: foundation::Rect, preferredPlacement: super::popups::Placement) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestCreateAsyncWithRectAndPlacement)(self as *const _ as *mut _, selection, preferredPlacement, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_delete_async(&self) -> Result>> { + }} + #[inline] pub fn request_delete_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestDeleteAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_delete_async_with_point(&self, invocationPoint: super::super::foundation::Point) -> Result>> { + }} + #[inline] pub fn request_delete_async_with_point(&self, invocationPoint: foundation::Point) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestDeleteAsyncWithPoint)(self as *const _ as *mut _, invocationPoint, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn request_delete_async_with_rect(&self, selection: super::super::foundation::Rect) -> Result>> { + }} + #[inline] pub fn request_delete_async_with_rect(&self, selection: foundation::Rect) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestDeleteAsyncWithRect)(self as *const _ as *mut _, 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(&self, selection: super::super::foundation::Rect, preferredPlacement: super::popups::Placement) -> Result>> { + }} + #[inline] pub fn request_delete_async_with_rect_and_placement(&self, selection: foundation::Rect, preferredPlacement: super::popups::Placement) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestDeleteAsyncWithRectAndPlacement)(self as *const _ as *mut _, selection, preferredPlacement, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn update_async(&self) -> Result>> { + }} + #[inline] pub fn update_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).UpdateAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class SecondaryTile: ISecondaryTile} impl RtActivatable for SecondaryTile {} @@ -13016,30 +13016,30 @@ impl RtActivatable for SecondaryTile {} impl RtActivatable for SecondaryTile {} impl RtActivatable for SecondaryTile {} impl SecondaryTile { - #[inline] pub fn create_tile(tileId: &HStringArg, shortName: &HStringArg, displayName: &HStringArg, arguments: &HStringArg, tileOptions: TileOptions, logoReference: &super::super::foundation::Uri) -> Result> { unsafe { + #[inline] pub fn create_tile(tileId: &HStringArg, shortName: &HStringArg, displayName: &HStringArg, arguments: &HStringArg, tileOptions: TileOptions, logoReference: &foundation::Uri) -> Result> { >::get_activation_factory().create_tile(tileId, shortName, displayName, arguments, tileOptions, logoReference) - }} - #[inline] pub fn create_wide_tile(tileId: &HStringArg, shortName: &HStringArg, displayName: &HStringArg, arguments: &HStringArg, tileOptions: TileOptions, logoReference: &super::super::foundation::Uri, wideLogoReference: &super::super::foundation::Uri) -> Result> { unsafe { + } + #[inline] pub fn create_wide_tile(tileId: &HStringArg, shortName: &HStringArg, displayName: &HStringArg, arguments: &HStringArg, tileOptions: TileOptions, logoReference: &foundation::Uri, wideLogoReference: &foundation::Uri) -> Result> { >::get_activation_factory().create_wide_tile(tileId, shortName, displayName, arguments, tileOptions, logoReference, wideLogoReference) - }} - #[inline] pub fn create_with_id(tileId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_with_id(tileId: &HStringArg) -> Result> { >::get_activation_factory().create_with_id(tileId) - }} - #[inline] pub fn create_minimal_tile(tileId: &HStringArg, displayName: &HStringArg, arguments: &HStringArg, square150x150Logo: &super::super::foundation::Uri, desiredSize: TileSize) -> Result> { unsafe { + } + #[inline] pub fn create_minimal_tile(tileId: &HStringArg, displayName: &HStringArg, arguments: &HStringArg, square150x150Logo: &foundation::Uri, desiredSize: TileSize) -> Result> { >::get_activation_factory().create_minimal_tile(tileId, displayName, arguments, square150x150Logo, desiredSize) - }} - #[inline] pub fn exists(tileId: &HStringArg) -> Result { unsafe { + } + #[inline] pub fn exists(tileId: &HStringArg) -> Result { >::get_activation_factory().exists(tileId) - }} - #[inline] pub fn find_all_async() -> Result>>> { unsafe { + } + #[inline] pub fn find_all_async() -> Result>>> { >::get_activation_factory().find_all_async() - }} - #[inline] pub fn find_all_for_application_async(applicationId: &HStringArg) -> Result>>> { unsafe { + } + #[inline] pub fn find_all_for_application_async(applicationId: &HStringArg) -> Result>>> { >::get_activation_factory().find_all_for_application_async(applicationId) - }} - #[inline] pub fn find_all_for_package_async() -> Result>>> { unsafe { + } + #[inline] pub fn find_all_for_package_async() -> Result>>> { >::get_activation_factory().find_all_for_package_async() - }} + } } DEFINE_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]) [CLSID_SecondaryTile]); DEFINE_IID!(IID_ISecondaryTile2, 3002518581, 12880, 18832, 146, 60, 41, 74, 180, 182, 148, 221); @@ -13049,118 +13049,118 @@ RT_INTERFACE!{interface ISecondaryTile2(ISecondaryTile2Vtbl): IInspectable(IInsp fn get_VisualElements(&self, out: *mut *mut SecondaryTileVisualElements) -> HRESULT, fn put_RoamingEnabled(&self, value: bool) -> HRESULT, fn get_RoamingEnabled(&self, out: *mut bool) -> HRESULT, - fn add_VisualElementsRequested(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_VisualElementsRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_VisualElementsRequested(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_VisualElementsRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl ISecondaryTile2 { - #[inline] pub unsafe fn set_phonetic_name(&self, value: &HStringArg) -> Result<()> { + #[inline] pub fn set_phonetic_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PhoneticName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_phonetic_name(&self) -> Result { + }} + #[inline] pub fn get_phonetic_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PhoneticName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_visual_elements(&self) -> Result> { + }} + #[inline] pub fn get_visual_elements(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VisualElements)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_roaming_enabled(&self, value: bool) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_roaming_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RoamingEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_roaming_enabled(&self) -> Result { + }} + #[inline] pub fn get_roaming_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RoamingEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_visual_elements_requested(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_visual_elements_requested(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_VisualElementsRequested)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_visual_elements_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_visual_elements_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_VisualElementsRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } 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(&self, tileId: HSTRING, shortName: HSTRING, displayName: HSTRING, arguments: HSTRING, tileOptions: TileOptions, logoReference: *mut super::super::foundation::Uri, out: *mut *mut SecondaryTile) -> HRESULT, - fn CreateWideTile(&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 CreateTile(&self, tileId: HSTRING, shortName: HSTRING, displayName: HSTRING, arguments: HSTRING, tileOptions: TileOptions, logoReference: *mut foundation::Uri, out: *mut *mut SecondaryTile) -> HRESULT, + fn CreateWideTile(&self, tileId: HSTRING, shortName: HSTRING, displayName: HSTRING, arguments: HSTRING, tileOptions: TileOptions, logoReference: *mut foundation::Uri, wideLogoReference: *mut foundation::Uri, out: *mut *mut SecondaryTile) -> HRESULT, fn CreateWithId(&self, tileId: HSTRING, out: *mut *mut SecondaryTile) -> HRESULT }} impl ISecondaryTileFactory { - #[inline] pub unsafe fn create_tile(&self, tileId: &HStringArg, shortName: &HStringArg, displayName: &HStringArg, arguments: &HStringArg, tileOptions: TileOptions, logoReference: &super::super::foundation::Uri) -> Result> { + #[inline] pub fn create_tile(&self, tileId: &HStringArg, shortName: &HStringArg, displayName: &HStringArg, arguments: &HStringArg, tileOptions: TileOptions, logoReference: &foundation::Uri) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateTile)(self as *const _ as *mut _, 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(&self, tileId: &HStringArg, shortName: &HStringArg, displayName: &HStringArg, arguments: &HStringArg, tileOptions: TileOptions, logoReference: &super::super::foundation::Uri, wideLogoReference: &super::super::foundation::Uri) -> Result> { + }} + #[inline] pub fn create_wide_tile(&self, tileId: &HStringArg, shortName: &HStringArg, displayName: &HStringArg, arguments: &HStringArg, tileOptions: TileOptions, logoReference: &foundation::Uri, wideLogoReference: &foundation::Uri) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWideTile)(self as *const _ as *mut _, 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(&self, tileId: &HStringArg) -> Result> { + }} + #[inline] pub fn create_with_id(&self, tileId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithId)(self as *const _ as *mut _, 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!{static interface ISecondaryTileFactory2(ISecondaryTileFactory2Vtbl): IInspectable(IInspectableVtbl) [IID_ISecondaryTileFactory2] { - fn CreateMinimalTile(&self, tileId: HSTRING, displayName: HSTRING, arguments: HSTRING, square150x150Logo: *mut super::super::foundation::Uri, desiredSize: TileSize, out: *mut *mut SecondaryTile) -> HRESULT + fn CreateMinimalTile(&self, tileId: HSTRING, displayName: HSTRING, arguments: HSTRING, square150x150Logo: *mut foundation::Uri, desiredSize: TileSize, out: *mut *mut SecondaryTile) -> HRESULT }} impl ISecondaryTileFactory2 { - #[inline] pub unsafe fn create_minimal_tile(&self, tileId: &HStringArg, displayName: &HStringArg, arguments: &HStringArg, square150x150Logo: &super::super::foundation::Uri, desiredSize: TileSize) -> Result> { + #[inline] pub fn create_minimal_tile(&self, tileId: &HStringArg, displayName: &HStringArg, arguments: &HStringArg, square150x150Logo: &foundation::Uri, desiredSize: TileSize) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateMinimalTile)(self as *const _ as *mut _, 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(&self, tileId: HSTRING, out: *mut bool) -> HRESULT, - fn FindAllAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn FindAllForApplicationAsync(&self, applicationId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn FindAllForPackageAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT + fn FindAllAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn FindAllForApplicationAsync(&self, applicationId: HSTRING, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn FindAllForPackageAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT }} impl ISecondaryTileStatics { - #[inline] pub unsafe fn exists(&self, tileId: &HStringArg) -> Result { + #[inline] pub fn exists(&self, tileId: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).Exists)(self as *const _ as *mut _, tileId.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn find_all_async(&self) -> Result>>> { + }} + #[inline] pub fn find_all_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_all_for_application_async(&self, applicationId: &HStringArg) -> Result>>> { + }} + #[inline] pub fn find_all_for_application_async(&self, applicationId: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllForApplicationAsync)(self as *const _ as *mut _, applicationId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_all_for_package_async(&self) -> Result>>> { + }} + #[inline] pub fn find_all_for_package_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllForPackageAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, value: *mut super::super::foundation::Uri) -> HRESULT, - fn get_Square30x30Logo(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_Square70x70Logo(&self, value: *mut super::super::foundation::Uri) -> HRESULT, - fn get_Square70x70Logo(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_Square150x150Logo(&self, value: *mut super::super::foundation::Uri) -> HRESULT, - fn get_Square150x150Logo(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_Wide310x150Logo(&self, value: *mut super::super::foundation::Uri) -> HRESULT, - fn get_Wide310x150Logo(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_Square310x310Logo(&self, value: *mut super::super::foundation::Uri) -> HRESULT, - fn get_Square310x310Logo(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn put_Square30x30Logo(&self, value: *mut foundation::Uri) -> HRESULT, + fn get_Square30x30Logo(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_Square70x70Logo(&self, value: *mut foundation::Uri) -> HRESULT, + fn get_Square70x70Logo(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_Square150x150Logo(&self, value: *mut foundation::Uri) -> HRESULT, + fn get_Square150x150Logo(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_Wide310x150Logo(&self, value: *mut foundation::Uri) -> HRESULT, + fn get_Wide310x150Logo(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_Square310x310Logo(&self, value: *mut foundation::Uri) -> HRESULT, + fn get_Square310x310Logo(&self, out: *mut *mut foundation::Uri) -> HRESULT, fn put_ForegroundText(&self, value: ForegroundText) -> HRESULT, fn get_ForegroundText(&self, out: *mut ForegroundText) -> HRESULT, fn put_BackgroundColor(&self, value: super::Color) -> HRESULT, @@ -13173,180 +13173,180 @@ RT_INTERFACE!{interface ISecondaryTileVisualElements(ISecondaryTileVisualElement fn get_ShowNameOnSquare310x310Logo(&self, out: *mut bool) -> HRESULT }} impl ISecondaryTileVisualElements { - #[inline] pub unsafe fn set_square30x30_logo(&self, value: &super::super::foundation::Uri) -> Result<()> { + #[inline] pub fn set_square30x30_logo(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Square30x30Logo)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_square30x30_logo(&self) -> Result> { + }} + #[inline] pub fn get_square30x30_logo(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Square30x30Logo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_square70x70_logo(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_square70x70_logo(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Square70x70Logo)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_square70x70_logo(&self) -> Result> { + }} + #[inline] pub fn get_square70x70_logo(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Square70x70Logo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_square150x150_logo(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_square150x150_logo(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Square150x150Logo)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_square150x150_logo(&self) -> Result> { + }} + #[inline] pub fn get_square150x150_logo(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Square150x150Logo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_wide310x150_logo(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_wide310x150_logo(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Wide310x150Logo)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_wide310x150_logo(&self) -> Result> { + }} + #[inline] pub fn get_wide310x150_logo(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Wide310x150Logo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_square310x310_logo(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_square310x310_logo(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Square310x310Logo)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_square310x310_logo(&self) -> Result> { + }} + #[inline] pub fn get_square310x310_logo(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Square310x310Logo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_foreground_text(&self, value: ForegroundText) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_foreground_text(&self, value: ForegroundText) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ForegroundText)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_foreground_text(&self) -> Result { + }} + #[inline] pub fn get_foreground_text(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ForegroundText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_background_color(&self, value: super::Color) -> Result<()> { + }} + #[inline] pub fn set_background_color(&self, value: super::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BackgroundColor)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_background_color(&self) -> Result { + }} + #[inline] pub fn get_background_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BackgroundColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_show_name_on_square150x150_logo(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_show_name_on_square150x150_logo(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ShowNameOnSquare150x150Logo)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_show_name_on_square150x150_logo(&self) -> Result { + }} + #[inline] pub fn get_show_name_on_square150x150_logo(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ShowNameOnSquare150x150Logo)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_show_name_on_wide310x150_logo(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_show_name_on_wide310x150_logo(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ShowNameOnWide310x150Logo)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_show_name_on_wide310x150_logo(&self) -> Result { + }} + #[inline] pub fn get_show_name_on_wide310x150_logo(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ShowNameOnWide310x150Logo)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_show_name_on_square310x310_logo(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_show_name_on_square310x310_logo(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ShowNameOnSquare310x310Logo)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_show_name_on_square310x310_logo(&self) -> Result { + }} + #[inline] pub fn get_show_name_on_square310x310_logo(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ShowNameOnSquare310x310Logo)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SecondaryTileVisualElements: ISecondaryTileVisualElements} 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(&self, value: *mut super::super::foundation::Uri) -> HRESULT, - fn get_Square71x71Logo(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT + fn put_Square71x71Logo(&self, value: *mut foundation::Uri) -> HRESULT, + fn get_Square71x71Logo(&self, out: *mut *mut foundation::Uri) -> HRESULT }} impl ISecondaryTileVisualElements2 { - #[inline] pub unsafe fn set_square71x71_logo(&self, value: &super::super::foundation::Uri) -> Result<()> { + #[inline] pub fn set_square71x71_logo(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Square71x71Logo)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_square71x71_logo(&self) -> Result> { + }} + #[inline] pub fn get_square71x71_logo(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Square71x71Logo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, value: *mut super::super::foundation::Uri) -> HRESULT, - fn get_Square44x44Logo(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT + fn put_Square44x44Logo(&self, value: *mut foundation::Uri) -> HRESULT, + fn get_Square44x44Logo(&self, out: *mut *mut foundation::Uri) -> HRESULT }} impl ISecondaryTileVisualElements3 { - #[inline] pub unsafe fn set_square44x44_logo(&self, value: &super::super::foundation::Uri) -> Result<()> { + #[inline] pub fn set_square44x44_logo(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Square44x44Logo)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_square44x44_logo(&self) -> Result> { + }} + #[inline] pub fn get_square44x44_logo(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Square44x44Logo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_ISecondaryTileVisualElements4, 1716936983, 46404, 16594, 141, 18, 116, 212, 236, 36, 208, 76); RT_INTERFACE!{interface ISecondaryTileVisualElements4(ISecondaryTileVisualElements4Vtbl): IInspectable(IInspectableVtbl) [IID_ISecondaryTileVisualElements4] { fn get_MixedRealityModel(&self, out: *mut *mut TileMixedRealityModel) -> HRESULT }} impl ISecondaryTileVisualElements4 { - #[inline] pub unsafe fn get_mixed_reality_model(&self) -> Result> { + #[inline] pub fn get_mixed_reality_model(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MixedRealityModel)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IStartScreenManager, 1243466699, 9961, 20148, 137, 51, 133, 158, 182, 236, 219, 41); RT_INTERFACE!{interface IStartScreenManager(IStartScreenManagerVtbl): IInspectable(IInspectableVtbl) [IID_IStartScreenManager] { #[cfg(not(feature="windows-system"))] fn __Dummy0(&self) -> (), #[cfg(feature="windows-system")] fn get_User(&self, out: *mut *mut super::super::system::User) -> HRESULT, #[cfg(feature="windows-applicationmodel")] fn SupportsAppListEntry(&self, appListEntry: *mut super::super::applicationmodel::core::AppListEntry, out: *mut bool) -> HRESULT, - #[cfg(feature="windows-applicationmodel")] fn ContainsAppListEntryAsync(&self, appListEntry: *mut super::super::applicationmodel::core::AppListEntry, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - #[cfg(feature="windows-applicationmodel")] fn RequestAddAppListEntryAsync(&self, appListEntry: *mut super::super::applicationmodel::core::AppListEntry, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + #[cfg(feature="windows-applicationmodel")] fn ContainsAppListEntryAsync(&self, appListEntry: *mut super::super::applicationmodel::core::AppListEntry, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + #[cfg(feature="windows-applicationmodel")] fn RequestAddAppListEntryAsync(&self, appListEntry: *mut super::super::applicationmodel::core::AppListEntry, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IStartScreenManager { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_user(&self) -> Result> { + #[cfg(feature="windows-system")] #[inline] pub fn get_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_User)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn supports_app_list_entry(&self, appListEntry: &super::super::applicationmodel::core::AppListEntry) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn supports_app_list_entry(&self, appListEntry: &super::super::applicationmodel::core::AppListEntry) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).SupportsAppListEntry)(self as *const _ as *mut _, appListEntry as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn contains_app_list_entry_async(&self, appListEntry: &super::super::applicationmodel::core::AppListEntry) -> Result>> { + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn contains_app_list_entry_async(&self, appListEntry: &super::super::applicationmodel::core::AppListEntry) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ContainsAppListEntryAsync)(self as *const _ as *mut _, appListEntry as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn request_add_app_list_entry_async(&self, appListEntry: &super::super::applicationmodel::core::AppListEntry) -> Result>> { + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn request_add_app_list_entry_async(&self, appListEntry: &super::super::applicationmodel::core::AppListEntry) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAddAppListEntryAsync)(self as *const _ as *mut _, appListEntry as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class StartScreenManager: IStartScreenManager} impl RtActivatable for StartScreenManager {} impl StartScreenManager { - #[inline] pub fn get_default() -> Result> { unsafe { + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} - #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::super::system::User) -> Result> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::super::system::User) -> Result>> { >::get_activation_factory().get_for_user(user) - }} + } } DEFINE_CLSID!(StartScreenManager(&[87,105,110,100,111,119,115,46,85,73,46,83,116,97,114,116,83,99,114,101,101,110,46,83,116,97,114,116,83,99,114,101,101,110,77,97,110,97,103,101,114,0]) [CLSID_StartScreenManager]); DEFINE_IID!(IID_IStartScreenManagerStatics, 2019946255, 46469, 17998, 137, 147, 52, 232, 248, 115, 141, 72); @@ -13355,43 +13355,43 @@ RT_INTERFACE!{static interface IStartScreenManagerStatics(IStartScreenManagerSta #[cfg(feature="windows-system")] fn GetForUser(&self, user: *mut super::super::system::User, out: *mut *mut StartScreenManager) -> HRESULT }} impl IStartScreenManagerStatics { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self 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 get_for_user(&self, user: &super::super::system::User) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(&self, user: &super::super::system::User) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForUser)(self as *const _ as *mut _, user as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_ITileMixedRealityModel, 2960543323, 34941, 16962, 154, 25, 61, 10, 78, 167, 128, 49); RT_INTERFACE!{interface ITileMixedRealityModel(ITileMixedRealityModelVtbl): IInspectable(IInspectableVtbl) [IID_ITileMixedRealityModel] { - fn put_Uri(&self, value: *mut super::super::foundation::Uri) -> HRESULT, - fn get_Uri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - #[cfg(feature="windows-perception")] fn put_BoundingBox(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - #[cfg(feature="windows-perception")] fn get_BoundingBox(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn put_Uri(&self, value: *mut foundation::Uri) -> HRESULT, + fn get_Uri(&self, out: *mut *mut foundation::Uri) -> HRESULT, + #[cfg(feature="windows-perception")] fn put_BoundingBox(&self, value: *mut foundation::IReference) -> HRESULT, + #[cfg(feature="windows-perception")] fn get_BoundingBox(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl ITileMixedRealityModel { - #[inline] pub unsafe fn set_uri(&self, value: &super::super::foundation::Uri) -> Result<()> { + #[inline] pub fn set_uri(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Uri)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_uri(&self) -> Result> { + }} + #[inline] pub fn get_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Uri)(self 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 set_bounding_box(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-perception")] #[inline] pub fn set_bounding_box(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BoundingBox)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-perception")] #[inline] pub unsafe fn get_bounding_box(&self) -> Result>> { + }} + #[cfg(feature="windows-perception")] #[inline] pub fn get_bounding_box(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BoundingBox)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class TileMixedRealityModel: ITileMixedRealityModel} RT_ENUM! { enum TileOptions: u32 { @@ -13403,31 +13403,31 @@ RT_ENUM! { enum TileSize: i32 { 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(&self, out: *mut *mut SecondaryTileVisualElements) -> HRESULT, - fn get_AlternateVisualElements(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn get_Deadline(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, + fn get_AlternateVisualElements(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn get_Deadline(&self, out: *mut foundation::DateTime) -> HRESULT, fn GetDeferral(&self, out: *mut *mut VisualElementsRequestDeferral) -> HRESULT }} impl IVisualElementsRequest { - #[inline] pub unsafe fn get_visual_elements(&self) -> Result> { + #[inline] pub fn get_visual_elements(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VisualElements)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_alternate_visual_elements(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_alternate_visual_elements(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AlternateVisualElements)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deadline(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deadline(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Deadline)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class VisualElementsRequest: IVisualElementsRequest} DEFINE_IID!(IID_IVisualElementsRequestDeferral, 2707779248, 294, 17239, 130, 4, 189, 130, 187, 42, 4, 109); @@ -13435,10 +13435,10 @@ RT_INTERFACE!{interface IVisualElementsRequestDeferral(IVisualElementsRequestDef fn Complete(&self) -> HRESULT }} impl IVisualElementsRequestDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class VisualElementsRequestDeferral: IVisualElementsRequestDeferral} DEFINE_IID!(IID_IVisualElementsRequestedEventArgs, 2070923650, 14861, 20174, 175, 150, 205, 23, 225, 176, 11, 45); @@ -13446,11 +13446,11 @@ RT_INTERFACE!{interface IVisualElementsRequestedEventArgs(IVisualElementsRequest fn get_Request(&self, out: *mut *mut VisualElementsRequest) -> HRESULT }} impl IVisualElementsRequestedEventArgs { - #[inline] pub unsafe fn get_request(&self) -> Result> { + #[inline] pub fn get_request(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Request)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class VisualElementsRequestedEventArgs: IVisualElementsRequestedEventArgs} } // Windows.UI.StartScreen @@ -13460,83 +13460,83 @@ DEFINE_IID!(IID_IMessageDialog, 871734017, 21285, 17323, 154, 179, 189, 174, 68, RT_INTERFACE!{interface IMessageDialog(IMessageDialogVtbl): IInspectable(IInspectableVtbl) [IID_IMessageDialog] { fn get_Title(&self, out: *mut HSTRING) -> HRESULT, fn put_Title(&self, value: HSTRING) -> HRESULT, - fn get_Commands(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Commands(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_DefaultCommandIndex(&self, out: *mut u32) -> HRESULT, fn put_DefaultCommandIndex(&self, value: u32) -> HRESULT, fn get_CancelCommandIndex(&self, out: *mut u32) -> HRESULT, fn put_CancelCommandIndex(&self, value: u32) -> HRESULT, fn get_Content(&self, out: *mut HSTRING) -> HRESULT, fn put_Content(&self, value: HSTRING) -> HRESULT, - fn ShowAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn ShowAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn get_Options(&self, out: *mut MessageDialogOptions) -> HRESULT, fn put_Options(&self, value: MessageDialogOptions) -> HRESULT }} impl IMessageDialog { - #[inline] pub unsafe fn get_title(&self) -> Result { + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_title(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_title(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Title)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_commands(&self) -> Result>> { + }} + #[inline] pub fn get_commands(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Commands)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_default_command_index(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_default_command_index(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DefaultCommandIndex)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_default_command_index(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_default_command_index(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DefaultCommandIndex)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_cancel_command_index(&self) -> Result { + }} + #[inline] pub fn get_cancel_command_index(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CancelCommandIndex)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_cancel_command_index(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_cancel_command_index(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CancelCommandIndex)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_content(&self) -> Result { + }} + #[inline] pub fn get_content(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Content)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_content(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_content(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Content)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn show_async(&self) -> Result>> { + }} + #[inline] pub fn show_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_options(&self) -> Result { + }} + #[inline] pub fn get_options(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Options)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_options(&self, value: MessageDialogOptions) -> Result<()> { + }} + #[inline] pub fn set_options(&self, value: MessageDialogOptions) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Options)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class MessageDialog: IMessageDialog} impl RtActivatable for MessageDialog {} impl MessageDialog { - #[inline] pub fn create(content: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(content: &HStringArg) -> Result> { >::get_activation_factory().create(content) - }} - #[inline] pub fn create_with_title(content: &HStringArg, title: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_with_title(content: &HStringArg, title: &HStringArg) -> Result> { >::get_activation_factory().create_with_title(content, title) - }} + } } DEFINE_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]) [CLSID_MessageDialog]); DEFINE_IID!(IID_IMessageDialogFactory, 756422519, 42607, 20133, 187, 135, 121, 63, 250, 73, 65, 242); @@ -13545,16 +13545,16 @@ RT_INTERFACE!{static interface IMessageDialogFactory(IMessageDialogFactoryVtbl): fn CreateWithTitle(&self, content: HSTRING, title: HSTRING, out: *mut *mut MessageDialog) -> HRESULT }} impl IMessageDialogFactory { - #[inline] pub unsafe fn create(&self, content: &HStringArg) -> Result> { + #[inline] pub fn create(&self, content: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, content.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_title(&self, content: &HStringArg, title: &HStringArg) -> Result> { + }} + #[inline] pub fn create_with_title(&self, content: &HStringArg, title: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithTitle)(self as *const _ as *mut _, content.get(), title.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum MessageDialogOptions: u32 { None (MessageDialogOptions_None) = 0, AcceptUserInputAfterDelay (MessageDialogOptions_AcceptUserInputAfterDelay) = 1, @@ -13564,32 +13564,32 @@ RT_ENUM! { enum Placement: i32 { }} 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(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn ShowAsync(&self, invocationPoint: super::super::foundation::Point, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn ShowAsyncWithRect(&self, selection: super::super::foundation::Rect, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn ShowAsyncWithRectAndPlacement(&self, selection: super::super::foundation::Rect, preferredPlacement: Placement, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn get_Commands(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn ShowAsync(&self, invocationPoint: foundation::Point, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ShowAsyncWithRect(&self, selection: foundation::Rect, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn ShowAsyncWithRectAndPlacement(&self, selection: foundation::Rect, preferredPlacement: Placement, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IPopupMenu { - #[inline] pub unsafe fn get_commands(&self) -> Result>> { + #[inline] pub fn get_commands(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Commands)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn show_async(&self, invocationPoint: super::super::foundation::Point) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn show_async(&self, invocationPoint: foundation::Point) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowAsync)(self as *const _ as *mut _, invocationPoint, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn show_async_with_rect(&self, selection: super::super::foundation::Rect) -> Result>> { + }} + #[inline] pub fn show_async_with_rect(&self, selection: foundation::Rect) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowAsyncWithRect)(self as *const _ as *mut _, selection, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn show_async_with_rect_and_placement(&self, selection: super::super::foundation::Rect, preferredPlacement: Placement) -> Result>> { + }} + #[inline] pub fn show_async_with_rect_and_placement(&self, selection: foundation::Rect, preferredPlacement: Placement) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ShowAsyncWithRectAndPlacement)(self as *const _ as *mut _, selection, preferredPlacement, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PopupMenu: IPopupMenu} impl RtActivatable for PopupMenu {} @@ -13604,47 +13604,47 @@ RT_INTERFACE!{interface IUICommand(IUICommandVtbl): IInspectable(IInspectableVtb fn put_Id(&self, value: *mut IInspectable) -> HRESULT }} impl IUICommand { - #[inline] pub unsafe fn get_label(&self) -> Result { + #[inline] pub fn get_label(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Label)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_label(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_label(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Label)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_invoked(&self) -> Result> { + }} + #[inline] pub fn get_invoked(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Invoked)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_invoked(&self, value: &UICommandInvokedHandler) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_invoked(&self, value: &UICommandInvokedHandler) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Invoked)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&self) -> Result> { + }} + #[inline] pub fn get_id(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_id(&self, value: &IInspectable) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_id(&self, value: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Id)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class UICommand: IUICommand} impl RtActivatable for UICommand {} impl RtActivatable for UICommand {} impl UICommand { - #[inline] pub fn create(label: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(label: &HStringArg) -> Result> { >::get_activation_factory().create(label) - }} - #[inline] pub fn create_with_handler(label: &HStringArg, action: &UICommandInvokedHandler) -> Result> { unsafe { + } + #[inline] pub fn create_with_handler(label: &HStringArg, action: &UICommandInvokedHandler) -> Result> { >::get_activation_factory().create_with_handler(label, action) - }} - #[inline] pub fn create_with_handler_and_id(label: &HStringArg, action: &UICommandInvokedHandler, commandId: &IInspectable) -> Result> { unsafe { + } + #[inline] pub fn create_with_handler_and_id(label: &HStringArg, action: &UICommandInvokedHandler, commandId: &IInspectable) -> Result> { >::get_activation_factory().create_with_handler_and_id(label, action, commandId) - }} + } } DEFINE_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]) [CLSID_UICommand]); DEFINE_IID!(IID_IUICommandFactory, 2719646089, 9904, 18038, 174, 148, 84, 4, 27, 193, 37, 232); @@ -13654,31 +13654,31 @@ RT_INTERFACE!{static interface IUICommandFactory(IUICommandFactoryVtbl): IInspec fn CreateWithHandlerAndId(&self, label: HSTRING, action: *mut UICommandInvokedHandler, commandId: *mut IInspectable, out: *mut *mut UICommand) -> HRESULT }} impl IUICommandFactory { - #[inline] pub unsafe fn create(&self, label: &HStringArg) -> Result> { + #[inline] pub fn create(&self, label: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, label.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_with_handler(&self, label: &HStringArg, action: &UICommandInvokedHandler) -> Result> { + }} + #[inline] pub fn create_with_handler(&self, label: &HStringArg, action: &UICommandInvokedHandler) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithHandler)(self as *const _ as *mut _, 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(&self, label: &HStringArg, action: &UICommandInvokedHandler, commandId: &IInspectable) -> Result> { + }} + #[inline] pub fn create_with_handler_and_id(&self, label: &HStringArg, action: &UICommandInvokedHandler, commandId: &IInspectable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithHandlerAndId)(self as *const _ as *mut _, 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) } - } + }} } 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(&self, command: *mut IUICommand) -> HRESULT }} impl UICommandInvokedHandler { - #[inline] pub unsafe fn invoke(&self, command: &IUICommand) -> Result<()> { + #[inline] pub fn invoke(&self, command: &IUICommand) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, command as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class UICommandSeparator: IUICommand} impl RtActivatable for UICommandSeparator {} @@ -13689,19 +13689,19 @@ use ::prelude::*; 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(&self, out: *mut AdaptiveNotificationContentKind) -> HRESULT, - fn get_Hints(&self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT + fn get_Hints(&self, out: *mut *mut foundation::collections::IMap) -> HRESULT }} impl IAdaptiveNotificationContent { - #[inline] pub unsafe fn get_kind(&self) -> Result { + #[inline] pub fn get_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Kind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_hints(&self) -> Result>> { + }} + #[inline] pub fn get_hints(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Hints)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum AdaptiveNotificationContentKind: i32 { Text (AdaptiveNotificationContentKind_Text) = 0, @@ -13714,24 +13714,24 @@ RT_INTERFACE!{interface IAdaptiveNotificationText(IAdaptiveNotificationTextVtbl) fn put_Language(&self, value: HSTRING) -> HRESULT }} impl IAdaptiveNotificationText { - #[inline] pub unsafe fn get_text(&self) -> Result { + #[inline] pub fn get_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Text)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_text(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_text(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Text)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_language(&self) -> Result { + }} + #[inline] pub fn get_language(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Language)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_language(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_language(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Language)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AdaptiveNotificationText: IAdaptiveNotificationText} impl RtActivatable for AdaptiveNotificationText {} @@ -13740,31 +13740,31 @@ DEFINE_IID!(IID_IBadgeNotification, 123516106, 53386, 20015, 146, 51, 126, 40, 1 RT_INTERFACE!{interface IBadgeNotification(IBadgeNotificationVtbl): IInspectable(IInspectableVtbl) [IID_IBadgeNotification] { #[cfg(not(feature="windows-data"))] fn __Dummy0(&self) -> (), #[cfg(feature="windows-data")] fn get_Content(&self, out: *mut *mut super::super::data::xml::dom::XmlDocument) -> HRESULT, - fn put_ExpirationTime(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_ExpirationTime(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn put_ExpirationTime(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_ExpirationTime(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl IBadgeNotification { - #[cfg(feature="windows-data")] #[inline] pub unsafe fn get_content(&self) -> Result> { + #[cfg(feature="windows-data")] #[inline] pub fn get_content(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Content)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_expiration_time(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_expiration_time(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ExpirationTime)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_expiration_time(&self) -> Result>> { + }} + #[inline] pub fn get_expiration_time(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExpirationTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class BadgeNotification: IBadgeNotification} impl RtActivatable for BadgeNotification {} impl BadgeNotification { - #[cfg(feature="windows-data")] #[inline] pub fn create_badge_notification(content: &super::super::data::xml::dom::XmlDocument) -> Result> { unsafe { + #[cfg(feature="windows-data")] #[inline] pub fn create_badge_notification(content: &super::super::data::xml::dom::XmlDocument) -> Result> { >::get_activation_factory().create_badge_notification(content) - }} + } } DEFINE_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]) [CLSID_BadgeNotification]); DEFINE_IID!(IID_IBadgeNotificationFactory, 3992081870, 1560, 19801, 148, 138, 90, 97, 4, 12, 82, 249); @@ -13772,11 +13772,11 @@ RT_INTERFACE!{static interface IBadgeNotificationFactory(IBadgeNotificationFacto #[cfg(feature="windows-data")] fn CreateBadgeNotification(&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(&self, content: &super::super::data::xml::dom::XmlDocument) -> Result> { + #[cfg(feature="windows-data")] #[inline] pub fn create_badge_notification(&self, content: &super::super::data::xml::dom::XmlDocument) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateBadgeNotification)(self as *const _ as *mut _, content as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum BadgeTemplateType: i32 { BadgeGlyph (BadgeTemplateType_BadgeGlyph) = 0, BadgeNumber (BadgeTemplateType_BadgeNumber) = 1, @@ -13785,21 +13785,21 @@ RT_CLASS!{static class BadgeUpdateManager} impl RtActivatable for BadgeUpdateManager {} impl RtActivatable for BadgeUpdateManager {} impl BadgeUpdateManager { - #[inline] pub fn create_badge_updater_for_application() -> Result> { unsafe { + #[inline] pub fn create_badge_updater_for_application() -> Result>> { >::get_activation_factory().create_badge_updater_for_application() - }} - #[inline] pub fn create_badge_updater_for_application_with_id(applicationId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_badge_updater_for_application_with_id(applicationId: &HStringArg) -> Result>> { >::get_activation_factory().create_badge_updater_for_application_with_id(applicationId) - }} - #[inline] pub fn create_badge_updater_for_secondary_tile(tileId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_badge_updater_for_secondary_tile(tileId: &HStringArg) -> Result>> { >::get_activation_factory().create_badge_updater_for_secondary_tile(tileId) - }} - #[cfg(feature="windows-data")] #[inline] pub fn get_template_content(type_: BadgeTemplateType) -> Result> { unsafe { + } + #[cfg(feature="windows-data")] #[inline] pub fn get_template_content(type_: BadgeTemplateType) -> Result>> { >::get_activation_factory().get_template_content(type_) - }} - #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::super::system::User) -> Result> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::super::system::User) -> Result>> { >::get_activation_factory().get_for_user(user) - }} + } } DEFINE_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]) [CLSID_BadgeUpdateManager]); DEFINE_IID!(IID_IBadgeUpdateManagerForUser, 2573935036, 902, 17637, 186, 141, 12, 16, 119, 166, 46, 146); @@ -13810,26 +13810,26 @@ RT_INTERFACE!{interface IBadgeUpdateManagerForUser(IBadgeUpdateManagerForUserVtb #[cfg(feature="windows-system")] fn get_User(&self, out: *mut *mut super::super::system::User) -> HRESULT }} impl IBadgeUpdateManagerForUser { - #[inline] pub unsafe fn create_badge_updater_for_application(&self) -> Result> { + #[inline] pub fn create_badge_updater_for_application(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateBadgeUpdaterForApplication)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_badge_updater_for_application_with_id(&self, applicationId: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_badge_updater_for_application_with_id(&self, applicationId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateBadgeUpdaterForApplicationWithId)(self as *const _ as *mut _, 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(&self, tileId: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_badge_updater_for_secondary_tile(&self, tileId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateBadgeUpdaterForSecondaryTile)(self as *const _ as *mut _, 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(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_User)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class BadgeUpdateManagerForUser: IBadgeUpdateManagerForUser} DEFINE_IID!(IID_IBadgeUpdateManagerStatics, 859836330, 28117, 16645, 174, 188, 155, 80, 252, 164, 146, 218); @@ -13840,90 +13840,90 @@ RT_INTERFACE!{static interface IBadgeUpdateManagerStatics(IBadgeUpdateManagerSta #[cfg(feature="windows-data")] fn GetTemplateContent(&self, type_: BadgeTemplateType, out: *mut *mut super::super::data::xml::dom::XmlDocument) -> HRESULT }} impl IBadgeUpdateManagerStatics { - #[inline] pub unsafe fn create_badge_updater_for_application(&self) -> Result> { + #[inline] pub fn create_badge_updater_for_application(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateBadgeUpdaterForApplication)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_badge_updater_for_application_with_id(&self, applicationId: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_badge_updater_for_application_with_id(&self, applicationId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateBadgeUpdaterForApplicationWithId)(self as *const _ as *mut _, 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(&self, tileId: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_badge_updater_for_secondary_tile(&self, tileId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateBadgeUpdaterForSecondaryTile)(self as *const _ as *mut _, 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(&self, type_: BadgeTemplateType) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-data")] #[inline] pub fn get_template_content(&self, type_: BadgeTemplateType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetTemplateContent)(self as *const _ as *mut _, type_, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&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(&self, user: &super::super::system::User) -> Result> { + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(&self, user: &super::super::system::User) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForUser)(self as *const _ as *mut _, user as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, notification: *mut BadgeNotification) -> HRESULT, fn Clear(&self) -> HRESULT, - fn StartPeriodicUpdate(&self, badgeContent: *mut super::super::foundation::Uri, requestedInterval: PeriodicUpdateRecurrence) -> HRESULT, - fn StartPeriodicUpdateAtTime(&self, badgeContent: *mut super::super::foundation::Uri, startTime: super::super::foundation::DateTime, requestedInterval: PeriodicUpdateRecurrence) -> HRESULT, + fn StartPeriodicUpdate(&self, badgeContent: *mut foundation::Uri, requestedInterval: PeriodicUpdateRecurrence) -> HRESULT, + fn StartPeriodicUpdateAtTime(&self, badgeContent: *mut foundation::Uri, startTime: foundation::DateTime, requestedInterval: PeriodicUpdateRecurrence) -> HRESULT, fn StopPeriodicUpdate(&self) -> HRESULT }} impl IBadgeUpdater { - #[inline] pub unsafe fn update(&self, notification: &BadgeNotification) -> Result<()> { + #[inline] pub fn update(&self, notification: &BadgeNotification) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Update)(self as *const _ as *mut _, notification as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn clear(&self) -> Result<()> { + }} + #[inline] pub fn clear(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Clear)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start_periodic_update(&self, badgeContent: &super::super::foundation::Uri, requestedInterval: PeriodicUpdateRecurrence) -> Result<()> { + }} + #[inline] pub fn start_periodic_update(&self, badgeContent: &foundation::Uri, requestedInterval: PeriodicUpdateRecurrence) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StartPeriodicUpdate)(self as *const _ as *mut _, badgeContent as *const _ as *mut _, requestedInterval); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start_periodic_update_at_time(&self, badgeContent: &super::super::foundation::Uri, startTime: super::super::foundation::DateTime, requestedInterval: PeriodicUpdateRecurrence) -> Result<()> { + }} + #[inline] pub fn start_periodic_update_at_time(&self, badgeContent: &foundation::Uri, startTime: foundation::DateTime, requestedInterval: PeriodicUpdateRecurrence) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StartPeriodicUpdateAtTime)(self as *const _ as *mut _, badgeContent as *const _ as *mut _, startTime, requestedInterval); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop_periodic_update(&self) -> Result<()> { + }} + #[inline] pub fn stop_periodic_update(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StopPeriodicUpdate)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class BadgeUpdater: IBadgeUpdater} RT_CLASS!{static class KnownAdaptiveNotificationHints} impl RtActivatable for KnownAdaptiveNotificationHints {} impl KnownAdaptiveNotificationHints { - #[inline] pub fn get_style() -> Result { unsafe { + #[inline] pub fn get_style() -> Result { >::get_activation_factory().get_style() - }} - #[inline] pub fn get_wrap() -> Result { unsafe { + } + #[inline] pub fn get_wrap() -> Result { >::get_activation_factory().get_wrap() - }} - #[inline] pub fn get_max_lines() -> Result { unsafe { + } + #[inline] pub fn get_max_lines() -> Result { >::get_activation_factory().get_max_lines() - }} - #[inline] pub fn get_min_lines() -> Result { unsafe { + } + #[inline] pub fn get_min_lines() -> Result { >::get_activation_factory().get_min_lines() - }} - #[inline] pub fn get_text_stacking() -> Result { unsafe { + } + #[inline] pub fn get_text_stacking() -> Result { >::get_activation_factory().get_text_stacking() - }} - #[inline] pub fn get_align() -> Result { unsafe { + } + #[inline] pub fn get_align() -> Result { >::get_activation_factory().get_align() - }} + } } DEFINE_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]) [CLSID_KnownAdaptiveNotificationHints]); DEFINE_IID!(IID_IKnownAdaptiveNotificationHintsStatics, 102786456, 54422, 18813, 134, 146, 79, 125, 124, 39, 112, 223); @@ -13936,97 +13936,97 @@ RT_INTERFACE!{static interface IKnownAdaptiveNotificationHintsStatics(IKnownAdap fn get_Align(&self, out: *mut HSTRING) -> HRESULT }} impl IKnownAdaptiveNotificationHintsStatics { - #[inline] pub unsafe fn get_style(&self) -> Result { + #[inline] pub fn get_style(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Style)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_wrap(&self) -> Result { + }} + #[inline] pub fn get_wrap(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Wrap)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_lines(&self) -> Result { + }} + #[inline] pub fn get_max_lines(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxLines)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_lines(&self) -> Result { + }} + #[inline] pub fn get_min_lines(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MinLines)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_text_stacking(&self) -> Result { + }} + #[inline] pub fn get_text_stacking(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TextStacking)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_align(&self) -> Result { + }} + #[inline] pub fn get_align(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Align)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class KnownAdaptiveNotificationTextStyles} impl RtActivatable for KnownAdaptiveNotificationTextStyles {} impl KnownAdaptiveNotificationTextStyles { - #[inline] pub fn get_caption() -> Result { unsafe { + #[inline] pub fn get_caption() -> Result { >::get_activation_factory().get_caption() - }} - #[inline] pub fn get_body() -> Result { unsafe { + } + #[inline] pub fn get_body() -> Result { >::get_activation_factory().get_body() - }} - #[inline] pub fn get_base() -> Result { unsafe { + } + #[inline] pub fn get_base() -> Result { >::get_activation_factory().get_base() - }} - #[inline] pub fn get_subtitle() -> Result { unsafe { + } + #[inline] pub fn get_subtitle() -> Result { >::get_activation_factory().get_subtitle() - }} - #[inline] pub fn get_title() -> Result { unsafe { + } + #[inline] pub fn get_title() -> Result { >::get_activation_factory().get_title() - }} - #[inline] pub fn get_subheader() -> Result { unsafe { + } + #[inline] pub fn get_subheader() -> Result { >::get_activation_factory().get_subheader() - }} - #[inline] pub fn get_header() -> Result { unsafe { + } + #[inline] pub fn get_header() -> Result { >::get_activation_factory().get_header() - }} - #[inline] pub fn get_title_numeral() -> Result { unsafe { + } + #[inline] pub fn get_title_numeral() -> Result { >::get_activation_factory().get_title_numeral() - }} - #[inline] pub fn get_subheader_numeral() -> Result { unsafe { + } + #[inline] pub fn get_subheader_numeral() -> Result { >::get_activation_factory().get_subheader_numeral() - }} - #[inline] pub fn get_header_numeral() -> Result { unsafe { + } + #[inline] pub fn get_header_numeral() -> Result { >::get_activation_factory().get_header_numeral() - }} - #[inline] pub fn get_caption_subtle() -> Result { unsafe { + } + #[inline] pub fn get_caption_subtle() -> Result { >::get_activation_factory().get_caption_subtle() - }} - #[inline] pub fn get_body_subtle() -> Result { unsafe { + } + #[inline] pub fn get_body_subtle() -> Result { >::get_activation_factory().get_body_subtle() - }} - #[inline] pub fn get_base_subtle() -> Result { unsafe { + } + #[inline] pub fn get_base_subtle() -> Result { >::get_activation_factory().get_base_subtle() - }} - #[inline] pub fn get_subtitle_subtle() -> Result { unsafe { + } + #[inline] pub fn get_subtitle_subtle() -> Result { >::get_activation_factory().get_subtitle_subtle() - }} - #[inline] pub fn get_title_subtle() -> Result { unsafe { + } + #[inline] pub fn get_title_subtle() -> Result { >::get_activation_factory().get_title_subtle() - }} - #[inline] pub fn get_subheader_subtle() -> Result { unsafe { + } + #[inline] pub fn get_subheader_subtle() -> Result { >::get_activation_factory().get_subheader_subtle() - }} - #[inline] pub fn get_subheader_numeral_subtle() -> Result { unsafe { + } + #[inline] pub fn get_subheader_numeral_subtle() -> Result { >::get_activation_factory().get_subheader_numeral_subtle() - }} - #[inline] pub fn get_header_subtle() -> Result { unsafe { + } + #[inline] pub fn get_header_subtle() -> Result { >::get_activation_factory().get_header_subtle() - }} - #[inline] pub fn get_header_numeral_subtle() -> Result { unsafe { + } + #[inline] pub fn get_header_numeral_subtle() -> Result { >::get_activation_factory().get_header_numeral_subtle() - }} + } } DEFINE_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]) [CLSID_KnownAdaptiveNotificationTextStyles]); DEFINE_IID!(IID_IKnownAdaptiveNotificationTextStylesStatics, 539071191, 35222, 17834, 139, 161, 212, 97, 215, 44, 42, 27); @@ -14052,108 +14052,108 @@ RT_INTERFACE!{static interface IKnownAdaptiveNotificationTextStylesStatics(IKnow fn get_HeaderNumeralSubtle(&self, out: *mut HSTRING) -> HRESULT }} impl IKnownAdaptiveNotificationTextStylesStatics { - #[inline] pub unsafe fn get_caption(&self) -> Result { + #[inline] pub fn get_caption(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Caption)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_body(&self) -> Result { + }} + #[inline] pub fn get_body(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Body)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_base(&self) -> Result { + }} + #[inline] pub fn get_base(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Base)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_subtitle(&self) -> Result { + }} + #[inline] pub fn get_subtitle(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Subtitle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_title(&self) -> Result { + }} + #[inline] pub fn get_title(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Title)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_subheader(&self) -> Result { + }} + #[inline] pub fn get_subheader(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Subheader)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_header(&self) -> Result { + }} + #[inline] pub fn get_header(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Header)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_title_numeral(&self) -> Result { + }} + #[inline] pub fn get_title_numeral(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TitleNumeral)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_subheader_numeral(&self) -> Result { + }} + #[inline] pub fn get_subheader_numeral(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SubheaderNumeral)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_header_numeral(&self) -> Result { + }} + #[inline] pub fn get_header_numeral(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HeaderNumeral)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_caption_subtle(&self) -> Result { + }} + #[inline] pub fn get_caption_subtle(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CaptionSubtle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_body_subtle(&self) -> Result { + }} + #[inline] pub fn get_body_subtle(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BodySubtle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_base_subtle(&self) -> Result { + }} + #[inline] pub fn get_base_subtle(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BaseSubtle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_subtitle_subtle(&self) -> Result { + }} + #[inline] pub fn get_subtitle_subtle(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SubtitleSubtle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_title_subtle(&self) -> Result { + }} + #[inline] pub fn get_title_subtle(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TitleSubtle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_subheader_subtle(&self) -> Result { + }} + #[inline] pub fn get_subheader_subtle(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SubheaderSubtle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_subheader_numeral_subtle(&self) -> Result { + }} + #[inline] pub fn get_subheader_numeral_subtle(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SubheaderNumeralSubtle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_header_subtle(&self) -> Result { + }} + #[inline] pub fn get_header_subtle(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HeaderSubtle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_header_numeral_subtle(&self) -> Result { + }} + #[inline] pub fn get_header_numeral_subtle(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HeaderNumeralSubtle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class KnownNotificationBindings} impl RtActivatable for KnownNotificationBindings {} impl KnownNotificationBindings { - #[inline] pub fn get_toast_generic() -> Result { unsafe { + #[inline] pub fn get_toast_generic() -> Result { >::get_activation_factory().get_toast_generic() - }} + } } DEFINE_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]) [CLSID_KnownNotificationBindings]); DEFINE_IID!(IID_IKnownNotificationBindingsStatics, 2034400174, 43191, 19800, 137, 234, 118, 167, 183, 188, 205, 237); @@ -14161,38 +14161,38 @@ RT_INTERFACE!{static interface IKnownNotificationBindingsStatics(IKnownNotificat fn get_ToastGeneric(&self, out: *mut HSTRING) -> HRESULT }} impl IKnownNotificationBindingsStatics { - #[inline] pub unsafe fn get_toast_generic(&self) -> Result { + #[inline] pub fn get_toast_generic(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ToastGeneric)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(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(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_ExpirationTime(&self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_ExpirationTime(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_ExpirationTime(&self, value: *mut foundation::IReference) -> HRESULT, fn get_Visual(&self, out: *mut *mut NotificationVisual) -> HRESULT, fn put_Visual(&self, value: *mut NotificationVisual) -> HRESULT }} impl INotification { - #[inline] pub unsafe fn get_expiration_time(&self) -> Result>> { + #[inline] pub fn get_expiration_time(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExpirationTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_expiration_time(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_expiration_time(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ExpirationTime)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_visual(&self) -> Result> { + }} + #[inline] pub fn get_visual(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Visual)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_visual(&self, value: &NotificationVisual) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_visual(&self, value: &NotificationVisual) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Visual)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Notification: INotification} impl RtActivatable for Notification {} @@ -14203,90 +14203,90 @@ RT_INTERFACE!{interface INotificationBinding(INotificationBindingVtbl): IInspect fn put_Template(&self, value: HSTRING) -> HRESULT, fn get_Language(&self, out: *mut HSTRING) -> HRESULT, fn put_Language(&self, value: HSTRING) -> HRESULT, - fn get_Hints(&self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, - fn GetTextElements(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn get_Hints(&self, out: *mut *mut foundation::collections::IMap) -> HRESULT, + fn GetTextElements(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl INotificationBinding { - #[inline] pub unsafe fn get_template(&self) -> Result { + #[inline] pub fn get_template(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Template)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_template(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_template(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Template)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_language(&self) -> Result { + }} + #[inline] pub fn get_language(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Language)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_language(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_language(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Language)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_hints(&self) -> Result>> { + }} + #[inline] pub fn get_hints(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Hints)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_text_elements(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_text_elements(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetTextElements)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class NotificationBinding: INotificationBinding} DEFINE_IID!(IID_INotificationData, 2684166930, 40298, 19119, 182, 172, 255, 23, 240, 193, 242, 128); RT_INTERFACE!{interface INotificationData(INotificationDataVtbl): IInspectable(IInspectableVtbl) [IID_INotificationData] { - fn get_Values(&self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT, + fn get_Values(&self, out: *mut *mut foundation::collections::IMap) -> HRESULT, fn get_SequenceNumber(&self, out: *mut u32) -> HRESULT, fn put_SequenceNumber(&self, value: u32) -> HRESULT }} impl INotificationData { - #[inline] pub unsafe fn get_values(&self) -> Result>> { + #[inline] pub fn get_values(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Values)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_sequence_number(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_sequence_number(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SequenceNumber)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_sequence_number(&self, value: u32) -> Result<()> { + }} + #[inline] pub fn set_sequence_number(&self, value: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SequenceNumber)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class NotificationData: INotificationData} impl RtActivatable for NotificationData {} impl RtActivatable for NotificationData {} impl NotificationData { - #[inline] pub fn create_notification_data_with_values_and_sequence_number(initialValues: &super::super::foundation::collections::IIterable>, sequenceNumber: u32) -> Result> { unsafe { + #[inline] pub fn create_notification_data_with_values_and_sequence_number(initialValues: &foundation::collections::IIterable>, sequenceNumber: u32) -> Result> { >::get_activation_factory().create_notification_data_with_values_and_sequence_number(initialValues, sequenceNumber) - }} - #[inline] pub fn create_notification_data_with_values(initialValues: &super::super::foundation::collections::IIterable>) -> Result> { unsafe { + } + #[inline] pub fn create_notification_data_with_values(initialValues: &foundation::collections::IIterable>) -> Result> { >::get_activation_factory().create_notification_data_with_values(initialValues) - }} + } } DEFINE_CLSID!(NotificationData(&[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,78,111,116,105,102,105,99,97,116,105,111,110,68,97,116,97,0]) [CLSID_NotificationData]); DEFINE_IID!(IID_INotificationDataFactory, 599909178, 7184, 18171, 128, 64, 222, 195, 132, 98, 28, 248); RT_INTERFACE!{static interface INotificationDataFactory(INotificationDataFactoryVtbl): IInspectable(IInspectableVtbl) [IID_INotificationDataFactory] { - fn CreateNotificationDataWithValuesAndSequenceNumber(&self, initialValues: *mut super::super::foundation::collections::IIterable>, sequenceNumber: u32, out: *mut *mut NotificationData) -> HRESULT, - fn CreateNotificationDataWithValues(&self, initialValues: *mut super::super::foundation::collections::IIterable>, out: *mut *mut NotificationData) -> HRESULT + fn CreateNotificationDataWithValuesAndSequenceNumber(&self, initialValues: *mut foundation::collections::IIterable>, sequenceNumber: u32, out: *mut *mut NotificationData) -> HRESULT, + fn CreateNotificationDataWithValues(&self, initialValues: *mut foundation::collections::IIterable>, out: *mut *mut NotificationData) -> HRESULT }} impl INotificationDataFactory { - #[inline] pub unsafe fn create_notification_data_with_values_and_sequence_number(&self, initialValues: &super::super::foundation::collections::IIterable>, sequenceNumber: u32) -> Result> { + #[inline] pub fn create_notification_data_with_values_and_sequence_number(&self, initialValues: &foundation::collections::IIterable>, sequenceNumber: u32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateNotificationDataWithValuesAndSequenceNumber)(self as *const _ as *mut _, initialValues as *const _ as *mut _, sequenceNumber, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_notification_data_with_values(&self, initialValues: &super::super::foundation::collections::IIterable>) -> Result> { + }} + #[inline] pub fn create_notification_data_with_values(&self, initialValues: &foundation::collections::IIterable>) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateNotificationDataWithValues)(self as *const _ as *mut _, initialValues as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum NotificationKinds: u32 { Unknown (NotificationKinds_Unknown) = 0, Toast (NotificationKinds_Toast) = 1, @@ -14304,29 +14304,29 @@ DEFINE_IID!(IID_INotificationVisual, 1753439118, 43606, 19985, 134, 211, 95, 154 RT_INTERFACE!{interface INotificationVisual(INotificationVisualVtbl): IInspectable(IInspectableVtbl) [IID_INotificationVisual] { fn get_Language(&self, out: *mut HSTRING) -> HRESULT, fn put_Language(&self, value: HSTRING) -> HRESULT, - fn get_Bindings(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Bindings(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn GetBinding(&self, templateName: HSTRING, out: *mut *mut NotificationBinding) -> HRESULT }} impl INotificationVisual { - #[inline] pub unsafe fn get_language(&self) -> Result { + #[inline] pub fn get_language(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Language)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_language(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_language(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Language)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_bindings(&self) -> Result>> { + }} + #[inline] pub fn get_bindings(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Bindings)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_binding(&self, templateName: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_binding(&self, templateName: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetBinding)(self as *const _ as *mut _, templateName.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class NotificationVisual: INotificationVisual} RT_ENUM! { enum PeriodicUpdateRecurrence: i32 { @@ -14336,122 +14336,122 @@ DEFINE_IID!(IID_IScheduledTileNotification, 180135637, 39388, 19576, 161, 28, 20 RT_INTERFACE!{interface IScheduledTileNotification(IScheduledTileNotificationVtbl): IInspectable(IInspectableVtbl) [IID_IScheduledTileNotification] { #[cfg(not(feature="windows-data"))] fn __Dummy0(&self) -> (), #[cfg(feature="windows-data")] fn get_Content(&self, out: *mut *mut super::super::data::xml::dom::XmlDocument) -> HRESULT, - fn get_DeliveryTime(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn put_ExpirationTime(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_ExpirationTime(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_DeliveryTime(&self, out: *mut foundation::DateTime) -> HRESULT, + fn put_ExpirationTime(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_ExpirationTime(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn put_Tag(&self, value: HSTRING) -> HRESULT, fn get_Tag(&self, out: *mut HSTRING) -> HRESULT, fn put_Id(&self, value: HSTRING) -> HRESULT, fn get_Id(&self, out: *mut HSTRING) -> HRESULT }} impl IScheduledTileNotification { - #[cfg(feature="windows-data")] #[inline] pub unsafe fn get_content(&self) -> Result> { + #[cfg(feature="windows-data")] #[inline] pub fn get_content(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Content)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_delivery_time(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_delivery_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DeliveryTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_expiration_time(&self, value: &super::super::foundation::IReference) -> Result<()> { + }} + #[inline] pub fn set_expiration_time(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ExpirationTime)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_expiration_time(&self) -> Result>> { + }} + #[inline] pub fn get_expiration_time(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExpirationTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_tag(&self, value: &HStringArg) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_tag(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Tag)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_tag(&self) -> Result { + }} + #[inline] pub fn get_tag(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Tag)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Id)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&self) -> Result { + }} + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ScheduledTileNotification: IScheduledTileNotification} impl RtActivatable for ScheduledTileNotification {} impl ScheduledTileNotification { - #[cfg(feature="windows-data")] #[inline] pub fn create_scheduled_tile_notification(content: &super::super::data::xml::dom::XmlDocument, deliveryTime: super::super::foundation::DateTime) -> Result> { unsafe { + #[cfg(feature="windows-data")] #[inline] pub fn create_scheduled_tile_notification(content: &super::super::data::xml::dom::XmlDocument, deliveryTime: foundation::DateTime) -> Result> { >::get_activation_factory().create_scheduled_tile_notification(content, deliveryTime) - }} + } } DEFINE_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]) [CLSID_ScheduledTileNotification]); 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(&self, content: *mut super::super::data::xml::dom::XmlDocument, deliveryTime: super::super::foundation::DateTime, out: *mut *mut ScheduledTileNotification) -> HRESULT + #[cfg(feature="windows-data")] fn CreateScheduledTileNotification(&self, content: *mut super::super::data::xml::dom::XmlDocument, deliveryTime: foundation::DateTime, out: *mut *mut ScheduledTileNotification) -> HRESULT }} impl IScheduledTileNotificationFactory { - #[cfg(feature="windows-data")] #[inline] pub unsafe fn create_scheduled_tile_notification(&self, content: &super::super::data::xml::dom::XmlDocument, deliveryTime: super::super::foundation::DateTime) -> Result> { + #[cfg(feature="windows-data")] #[inline] pub fn create_scheduled_tile_notification(&self, content: &super::super::data::xml::dom::XmlDocument, deliveryTime: foundation::DateTime) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateScheduledTileNotification)(self as *const _ as *mut _, content as *const _ as *mut _, deliveryTime, &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(&self) -> (), #[cfg(feature="windows-data")] fn get_Content(&self, out: *mut *mut super::super::data::xml::dom::XmlDocument) -> HRESULT, - fn get_DeliveryTime(&self, out: *mut super::super::foundation::DateTime) -> HRESULT, - fn get_SnoozeInterval(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn get_DeliveryTime(&self, out: *mut foundation::DateTime) -> HRESULT, + fn get_SnoozeInterval(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn get_MaximumSnoozeCount(&self, out: *mut u32) -> HRESULT, fn put_Id(&self, value: HSTRING) -> HRESULT, fn get_Id(&self, out: *mut HSTRING) -> HRESULT }} impl IScheduledToastNotification { - #[cfg(feature="windows-data")] #[inline] pub unsafe fn get_content(&self) -> Result> { + #[cfg(feature="windows-data")] #[inline] pub fn get_content(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Content)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_delivery_time(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_delivery_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DeliveryTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_snooze_interval(&self) -> Result>> { + }} + #[inline] pub fn get_snooze_interval(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SnoozeInterval)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_maximum_snooze_count(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_maximum_snooze_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaximumSnoozeCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Id)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&self) -> Result { + }} + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ScheduledToastNotification: IScheduledToastNotification} impl RtActivatable for ScheduledToastNotification {} impl ScheduledToastNotification { - #[cfg(feature="windows-data")] #[inline] pub fn create_scheduled_toast_notification(content: &super::super::data::xml::dom::XmlDocument, deliveryTime: super::super::foundation::DateTime) -> Result> { unsafe { + #[cfg(feature="windows-data")] #[inline] pub fn create_scheduled_toast_notification(content: &super::super::data::xml::dom::XmlDocument, deliveryTime: foundation::DateTime) -> Result> { >::get_activation_factory().create_scheduled_toast_notification(content, deliveryTime) - }} - #[cfg(feature="windows-data")] #[inline] pub fn create_scheduled_toast_notification_recurring(content: &super::super::data::xml::dom::XmlDocument, deliveryTime: super::super::foundation::DateTime, snoozeInterval: super::super::foundation::TimeSpan, maximumSnoozeCount: u32) -> Result> { unsafe { + } + #[cfg(feature="windows-data")] #[inline] pub fn create_scheduled_toast_notification_recurring(content: &super::super::data::xml::dom::XmlDocument, deliveryTime: foundation::DateTime, snoozeInterval: foundation::TimeSpan, maximumSnoozeCount: u32) -> Result> { >::get_activation_factory().create_scheduled_toast_notification_recurring(content, deliveryTime, snoozeInterval, maximumSnoozeCount) - }} + } } DEFINE_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]) [CLSID_ScheduledToastNotification]); DEFINE_IID!(IID_IScheduledToastNotification2, 2792267932, 12724, 17328, 181, 221, 122, 64, 232, 83, 99, 177); @@ -14464,33 +14464,33 @@ RT_INTERFACE!{interface IScheduledToastNotification2(IScheduledToastNotification fn get_SuppressPopup(&self, out: *mut bool) -> HRESULT }} impl IScheduledToastNotification2 { - #[inline] pub unsafe fn set_tag(&self, value: &HStringArg) -> Result<()> { + #[inline] pub fn set_tag(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Tag)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_tag(&self) -> Result { + }} + #[inline] pub fn get_tag(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Tag)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_group(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_group(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Group)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_group(&self) -> Result { + }} + #[inline] pub fn get_group(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Group)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_suppress_popup(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_suppress_popup(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SuppressPopup)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_suppress_popup(&self) -> Result { + }} + #[inline] pub fn get_suppress_popup(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SuppressPopup)(self as *const _ as *mut _, &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] { @@ -14500,83 +14500,83 @@ RT_INTERFACE!{interface IScheduledToastNotification3(IScheduledToastNotification fn put_RemoteId(&self, value: HSTRING) -> HRESULT }} impl IScheduledToastNotification3 { - #[inline] pub unsafe fn get_notification_mirroring(&self) -> Result { + #[inline] pub fn get_notification_mirroring(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NotificationMirroring)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_notification_mirroring(&self, value: NotificationMirroring) -> Result<()> { + }} + #[inline] pub fn set_notification_mirroring(&self, value: NotificationMirroring) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_NotificationMirroring)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_id(&self) -> Result { + }} + #[inline] pub fn get_remote_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_remote_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_remote_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RemoteId)(self as *const _ as *mut _, 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(&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(&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 + #[cfg(feature="windows-data")] fn CreateScheduledToastNotification(&self, content: *mut super::super::data::xml::dom::XmlDocument, deliveryTime: foundation::DateTime, out: *mut *mut ScheduledToastNotification) -> HRESULT, + #[cfg(feature="windows-data")] fn CreateScheduledToastNotificationRecurring(&self, content: *mut super::super::data::xml::dom::XmlDocument, deliveryTime: foundation::DateTime, snoozeInterval: foundation::TimeSpan, maximumSnoozeCount: u32, out: *mut *mut ScheduledToastNotification) -> HRESULT }} impl IScheduledToastNotificationFactory { - #[cfg(feature="windows-data")] #[inline] pub unsafe fn create_scheduled_toast_notification(&self, content: &super::super::data::xml::dom::XmlDocument, deliveryTime: super::super::foundation::DateTime) -> Result> { + #[cfg(feature="windows-data")] #[inline] pub fn create_scheduled_toast_notification(&self, content: &super::super::data::xml::dom::XmlDocument, deliveryTime: foundation::DateTime) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateScheduledToastNotification)(self as *const _ as *mut _, 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(&self, content: &super::super::data::xml::dom::XmlDocument, deliveryTime: super::super::foundation::DateTime, snoozeInterval: super::super::foundation::TimeSpan, maximumSnoozeCount: u32) -> Result> { + }} + #[cfg(feature="windows-data")] #[inline] pub fn create_scheduled_toast_notification_recurring(&self, content: &super::super::data::xml::dom::XmlDocument, deliveryTime: foundation::DateTime, snoozeInterval: foundation::TimeSpan, maximumSnoozeCount: u32) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateScheduledToastNotificationRecurring)(self as *const _ as *mut _, content as *const _ as *mut _, deliveryTime, snoozeInterval, maximumSnoozeCount, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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(&self, out: *mut HSTRING) -> HRESULT }} impl IShownTileNotification { - #[inline] pub unsafe fn get_arguments(&self) -> Result { + #[inline] pub fn get_arguments(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Arguments)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ShownTileNotification: IShownTileNotification} 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(&self) -> (), #[cfg(feature="windows-data")] fn get_Content(&self, out: *mut *mut super::super::data::xml::dom::XmlDocument) -> HRESULT, - fn put_ExpirationTime(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_ExpirationTime(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT + fn put_ExpirationTime(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_ExpirationTime(&self, out: *mut *mut foundation::IReference) -> HRESULT }} impl ITileFlyoutNotification { - #[cfg(feature="windows-data")] #[inline] pub unsafe fn get_content(&self) -> Result> { + #[cfg(feature="windows-data")] #[inline] pub fn get_content(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Content)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_expiration_time(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_expiration_time(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ExpirationTime)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_expiration_time(&self) -> Result>> { + }} + #[inline] pub fn get_expiration_time(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExpirationTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class TileFlyoutNotification: ITileFlyoutNotification} impl RtActivatable for TileFlyoutNotification {} impl TileFlyoutNotification { - #[cfg(feature="windows-data")] #[inline] pub fn create_tile_flyout_notification(content: &super::super::data::xml::dom::XmlDocument) -> Result> { unsafe { + #[cfg(feature="windows-data")] #[inline] pub fn create_tile_flyout_notification(content: &super::super::data::xml::dom::XmlDocument) -> Result> { >::get_activation_factory().create_tile_flyout_notification(content) - }} + } } DEFINE_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]) [CLSID_TileFlyoutNotification]); DEFINE_IID!(IID_ITileFlyoutNotificationFactory, 4015353845, 21030, 20267, 178, 120, 136, 163, 93, 254, 86, 159); @@ -14584,11 +14584,11 @@ RT_INTERFACE!{static interface ITileFlyoutNotificationFactory(ITileFlyoutNotific #[cfg(feature="windows-data")] fn CreateTileFlyoutNotification(&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(&self, content: &super::super::data::xml::dom::XmlDocument) -> Result> { + #[cfg(feature="windows-data")] #[inline] pub fn create_tile_flyout_notification(&self, content: &super::super::data::xml::dom::XmlDocument) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateTileFlyoutNotification)(self as *const _ as *mut _, content as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum TileFlyoutTemplateType: i32 { TileFlyoutTemplate01 (TileFlyoutTemplateType_TileFlyoutTemplate01) = 0, @@ -14596,18 +14596,18 @@ RT_ENUM! { enum TileFlyoutTemplateType: i32 { RT_CLASS!{static class TileFlyoutUpdateManager} impl RtActivatable for TileFlyoutUpdateManager {} impl TileFlyoutUpdateManager { - #[inline] pub fn create_tile_flyout_updater_for_application() -> Result> { unsafe { + #[inline] pub fn create_tile_flyout_updater_for_application() -> Result>> { >::get_activation_factory().create_tile_flyout_updater_for_application() - }} - #[inline] pub fn create_tile_flyout_updater_for_application_with_id(applicationId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_tile_flyout_updater_for_application_with_id(applicationId: &HStringArg) -> Result>> { >::get_activation_factory().create_tile_flyout_updater_for_application_with_id(applicationId) - }} - #[inline] pub fn create_tile_flyout_updater_for_secondary_tile(tileId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_tile_flyout_updater_for_secondary_tile(tileId: &HStringArg) -> Result>> { >::get_activation_factory().create_tile_flyout_updater_for_secondary_tile(tileId) - }} - #[cfg(feature="windows-data")] #[inline] pub fn get_template_content(type_: TileFlyoutTemplateType) -> Result> { unsafe { + } + #[cfg(feature="windows-data")] #[inline] pub fn get_template_content(type_: TileFlyoutTemplateType) -> Result>> { >::get_activation_factory().get_template_content(type_) - }} + } } DEFINE_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]) [CLSID_TileFlyoutUpdateManager]); DEFINE_IID!(IID_ITileFlyoutUpdateManagerStatics, 70662923, 6848, 19353, 136, 231, 173, 168, 62, 149, 61, 72); @@ -14618,104 +14618,104 @@ RT_INTERFACE!{static interface ITileFlyoutUpdateManagerStatics(ITileFlyoutUpdate #[cfg(feature="windows-data")] fn GetTemplateContent(&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(&self) -> Result> { + #[inline] pub fn create_tile_flyout_updater_for_application(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateTileFlyoutUpdaterForApplication)(self as *const _ as *mut _, &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(&self, applicationId: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_tile_flyout_updater_for_application_with_id(&self, applicationId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateTileFlyoutUpdaterForApplicationWithId)(self as *const _ as *mut _, 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(&self, tileId: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_tile_flyout_updater_for_secondary_tile(&self, tileId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateTileFlyoutUpdaterForSecondaryTile)(self as *const _ as *mut _, 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(&self, type_: TileFlyoutTemplateType) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-data")] #[inline] pub fn get_template_content(&self, type_: TileFlyoutTemplateType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetTemplateContent)(self as *const _ as *mut _, type_, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, notification: *mut TileFlyoutNotification) -> HRESULT, fn Clear(&self) -> HRESULT, - fn StartPeriodicUpdate(&self, tileFlyoutContent: *mut super::super::foundation::Uri, requestedInterval: PeriodicUpdateRecurrence) -> HRESULT, - fn StartPeriodicUpdateAtTime(&self, tileFlyoutContent: *mut super::super::foundation::Uri, startTime: super::super::foundation::DateTime, requestedInterval: PeriodicUpdateRecurrence) -> HRESULT, + fn StartPeriodicUpdate(&self, tileFlyoutContent: *mut foundation::Uri, requestedInterval: PeriodicUpdateRecurrence) -> HRESULT, + fn StartPeriodicUpdateAtTime(&self, tileFlyoutContent: *mut foundation::Uri, startTime: foundation::DateTime, requestedInterval: PeriodicUpdateRecurrence) -> HRESULT, fn StopPeriodicUpdate(&self) -> HRESULT, fn get_Setting(&self, out: *mut NotificationSetting) -> HRESULT }} impl ITileFlyoutUpdater { - #[inline] pub unsafe fn update(&self, notification: &TileFlyoutNotification) -> Result<()> { + #[inline] pub fn update(&self, notification: &TileFlyoutNotification) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Update)(self as *const _ as *mut _, notification as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn clear(&self) -> Result<()> { + }} + #[inline] pub fn clear(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Clear)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start_periodic_update(&self, tileFlyoutContent: &super::super::foundation::Uri, requestedInterval: PeriodicUpdateRecurrence) -> Result<()> { + }} + #[inline] pub fn start_periodic_update(&self, tileFlyoutContent: &foundation::Uri, requestedInterval: PeriodicUpdateRecurrence) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StartPeriodicUpdate)(self as *const _ as *mut _, tileFlyoutContent as *const _ as *mut _, requestedInterval); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start_periodic_update_at_time(&self, tileFlyoutContent: &super::super::foundation::Uri, startTime: super::super::foundation::DateTime, requestedInterval: PeriodicUpdateRecurrence) -> Result<()> { + }} + #[inline] pub fn start_periodic_update_at_time(&self, tileFlyoutContent: &foundation::Uri, startTime: foundation::DateTime, requestedInterval: PeriodicUpdateRecurrence) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StartPeriodicUpdateAtTime)(self as *const _ as *mut _, tileFlyoutContent as *const _ as *mut _, startTime, requestedInterval); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop_periodic_update(&self) -> Result<()> { + }} + #[inline] pub fn stop_periodic_update(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StopPeriodicUpdate)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_setting(&self) -> Result { + }} + #[inline] pub fn get_setting(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Setting)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class TileFlyoutUpdater: ITileFlyoutUpdater} 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(&self) -> (), #[cfg(feature="windows-data")] fn get_Content(&self, out: *mut *mut super::super::data::xml::dom::XmlDocument) -> HRESULT, - fn put_ExpirationTime(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_ExpirationTime(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, + fn put_ExpirationTime(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_ExpirationTime(&self, out: *mut *mut foundation::IReference) -> HRESULT, fn put_Tag(&self, value: HSTRING) -> HRESULT, fn get_Tag(&self, out: *mut HSTRING) -> HRESULT }} impl ITileNotification { - #[cfg(feature="windows-data")] #[inline] pub unsafe fn get_content(&self) -> Result> { + #[cfg(feature="windows-data")] #[inline] pub fn get_content(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Content)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_expiration_time(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_expiration_time(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ExpirationTime)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_expiration_time(&self) -> Result>> { + }} + #[inline] pub fn get_expiration_time(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExpirationTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_tag(&self, value: &HStringArg) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_tag(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Tag)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_tag(&self) -> Result { + }} + #[inline] pub fn get_tag(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Tag)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class TileNotification: ITileNotification} impl RtActivatable for TileNotification {} impl TileNotification { - #[cfg(feature="windows-data")] #[inline] pub fn create_tile_notification(content: &super::super::data::xml::dom::XmlDocument) -> Result> { unsafe { + #[cfg(feature="windows-data")] #[inline] pub fn create_tile_notification(content: &super::super::data::xml::dom::XmlDocument) -> Result> { >::get_activation_factory().create_tile_notification(content) - }} + } } DEFINE_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]) [CLSID_TileNotification]); DEFINE_IID!(IID_ITileNotificationFactory, 3333152110, 18728, 18120, 189, 191, 129, 160, 71, 222, 160, 212); @@ -14723,11 +14723,11 @@ RT_INTERFACE!{static interface ITileNotificationFactory(ITileNotificationFactory #[cfg(feature="windows-data")] fn CreateTileNotification(&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(&self, content: &super::super::data::xml::dom::XmlDocument) -> Result> { + #[cfg(feature="windows-data")] #[inline] pub fn create_tile_notification(&self, content: &super::super::data::xml::dom::XmlDocument) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateTileNotification)(self as *const _ as *mut _, content as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } 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, @@ -14736,21 +14736,21 @@ RT_CLASS!{static class TileUpdateManager} impl RtActivatable for TileUpdateManager {} impl RtActivatable for TileUpdateManager {} impl TileUpdateManager { - #[inline] pub fn create_tile_updater_for_application() -> Result> { unsafe { + #[inline] pub fn create_tile_updater_for_application() -> Result>> { >::get_activation_factory().create_tile_updater_for_application() - }} - #[inline] pub fn create_tile_updater_for_application_with_id(applicationId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_tile_updater_for_application_with_id(applicationId: &HStringArg) -> Result>> { >::get_activation_factory().create_tile_updater_for_application_with_id(applicationId) - }} - #[inline] pub fn create_tile_updater_for_secondary_tile(tileId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_tile_updater_for_secondary_tile(tileId: &HStringArg) -> Result>> { >::get_activation_factory().create_tile_updater_for_secondary_tile(tileId) - }} - #[cfg(feature="windows-data")] #[inline] pub fn get_template_content(type_: TileTemplateType) -> Result> { unsafe { + } + #[cfg(feature="windows-data")] #[inline] pub fn get_template_content(type_: TileTemplateType) -> Result>> { >::get_activation_factory().get_template_content(type_) - }} - #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::super::system::User) -> Result> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::super::system::User) -> Result>> { >::get_activation_factory().get_for_user(user) - }} + } } DEFINE_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]) [CLSID_TileUpdateManager]); DEFINE_IID!(IID_ITileUpdateManagerForUser, 1427379016, 12002, 20013, 156, 193, 33, 106, 32, 222, 204, 159); @@ -14761,26 +14761,26 @@ RT_INTERFACE!{interface ITileUpdateManagerForUser(ITileUpdateManagerForUserVtbl) #[cfg(feature="windows-system")] fn get_User(&self, out: *mut *mut super::super::system::User) -> HRESULT }} impl ITileUpdateManagerForUser { - #[inline] pub unsafe fn create_tile_updater_for_application(&self) -> Result> { + #[inline] pub fn create_tile_updater_for_application(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateTileUpdaterForApplication)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_tile_updater_for_application_with_id(&self, applicationId: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_tile_updater_for_application_with_id(&self, applicationId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateTileUpdaterForApplicationWithId)(self as *const _ as *mut _, 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(&self, tileId: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_tile_updater_for_secondary_tile(&self, tileId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateTileUpdaterForSecondaryTile)(self as *const _ as *mut _, 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(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_User)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class TileUpdateManagerForUser: ITileUpdateManagerForUser} DEFINE_IID!(IID_ITileUpdateManagerStatics, 3658849885, 16041, 18822, 141, 132, 176, 157, 94, 18, 39, 109); @@ -14791,37 +14791,37 @@ RT_INTERFACE!{static interface ITileUpdateManagerStatics(ITileUpdateManagerStati #[cfg(feature="windows-data")] fn GetTemplateContent(&self, type_: TileTemplateType, out: *mut *mut super::super::data::xml::dom::XmlDocument) -> HRESULT }} impl ITileUpdateManagerStatics { - #[inline] pub unsafe fn create_tile_updater_for_application(&self) -> Result> { + #[inline] pub fn create_tile_updater_for_application(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateTileUpdaterForApplication)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_tile_updater_for_application_with_id(&self, applicationId: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_tile_updater_for_application_with_id(&self, applicationId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateTileUpdaterForApplicationWithId)(self as *const _ as *mut _, 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(&self, tileId: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_tile_updater_for_secondary_tile(&self, tileId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateTileUpdaterForSecondaryTile)(self as *const _ as *mut _, 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(&self, type_: TileTemplateType) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-data")] #[inline] pub fn get_template_content(&self, type_: TileTemplateType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetTemplateContent)(self as *const _ as *mut _, type_, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&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(&self, user: &super::super::system::User) -> Result> { + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(&self, user: &super::super::system::User) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForUser)(self as *const _ as *mut _, user as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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] { @@ -14831,64 +14831,64 @@ RT_INTERFACE!{interface ITileUpdater(ITileUpdaterVtbl): IInspectable(IInspectabl fn get_Setting(&self, out: *mut NotificationSetting) -> HRESULT, fn AddToSchedule(&self, scheduledTile: *mut ScheduledTileNotification) -> HRESULT, fn RemoveFromSchedule(&self, scheduledTile: *mut ScheduledTileNotification) -> HRESULT, - fn GetScheduledTileNotifications(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn StartPeriodicUpdate(&self, tileContent: *mut super::super::foundation::Uri, requestedInterval: PeriodicUpdateRecurrence) -> HRESULT, - fn StartPeriodicUpdateAtTime(&self, tileContent: *mut super::super::foundation::Uri, startTime: super::super::foundation::DateTime, requestedInterval: PeriodicUpdateRecurrence) -> HRESULT, + fn GetScheduledTileNotifications(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn StartPeriodicUpdate(&self, tileContent: *mut foundation::Uri, requestedInterval: PeriodicUpdateRecurrence) -> HRESULT, + fn StartPeriodicUpdateAtTime(&self, tileContent: *mut foundation::Uri, startTime: foundation::DateTime, requestedInterval: PeriodicUpdateRecurrence) -> HRESULT, fn StopPeriodicUpdate(&self) -> HRESULT, - fn StartPeriodicUpdateBatch(&self, tileContents: *mut super::super::foundation::collections::IIterable, requestedInterval: PeriodicUpdateRecurrence) -> HRESULT, - fn StartPeriodicUpdateBatchAtTime(&self, tileContents: *mut super::super::foundation::collections::IIterable, startTime: super::super::foundation::DateTime, requestedInterval: PeriodicUpdateRecurrence) -> HRESULT + fn StartPeriodicUpdateBatch(&self, tileContents: *mut foundation::collections::IIterable, requestedInterval: PeriodicUpdateRecurrence) -> HRESULT, + fn StartPeriodicUpdateBatchAtTime(&self, tileContents: *mut foundation::collections::IIterable, startTime: foundation::DateTime, requestedInterval: PeriodicUpdateRecurrence) -> HRESULT }} impl ITileUpdater { - #[inline] pub unsafe fn update(&self, notification: &TileNotification) -> Result<()> { + #[inline] pub fn update(&self, notification: &TileNotification) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Update)(self as *const _ as *mut _, notification as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn clear(&self) -> Result<()> { + }} + #[inline] pub fn clear(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Clear)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn enable_notification_queue(&self, enable: bool) -> Result<()> { + }} + #[inline] pub fn enable_notification_queue(&self, enable: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).EnableNotificationQueue)(self as *const _ as *mut _, enable); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_setting(&self) -> Result { + }} + #[inline] pub fn get_setting(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Setting)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_to_schedule(&self, scheduledTile: &ScheduledTileNotification) -> Result<()> { + }} + #[inline] pub fn add_to_schedule(&self, scheduledTile: &ScheduledTileNotification) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddToSchedule)(self as *const _ as *mut _, scheduledTile as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove_from_schedule(&self, scheduledTile: &ScheduledTileNotification) -> Result<()> { + }} + #[inline] pub fn remove_from_schedule(&self, scheduledTile: &ScheduledTileNotification) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveFromSchedule)(self as *const _ as *mut _, scheduledTile as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_scheduled_tile_notifications(&self) -> Result>> { + }} + #[inline] pub fn get_scheduled_tile_notifications(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetScheduledTileNotifications)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn start_periodic_update(&self, tileContent: &super::super::foundation::Uri, requestedInterval: PeriodicUpdateRecurrence) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn start_periodic_update(&self, tileContent: &foundation::Uri, requestedInterval: PeriodicUpdateRecurrence) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StartPeriodicUpdate)(self as *const _ as *mut _, tileContent as *const _ as *mut _, requestedInterval); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start_periodic_update_at_time(&self, tileContent: &super::super::foundation::Uri, startTime: super::super::foundation::DateTime, requestedInterval: PeriodicUpdateRecurrence) -> Result<()> { + }} + #[inline] pub fn start_periodic_update_at_time(&self, tileContent: &foundation::Uri, startTime: foundation::DateTime, requestedInterval: PeriodicUpdateRecurrence) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StartPeriodicUpdateAtTime)(self as *const _ as *mut _, tileContent as *const _ as *mut _, startTime, requestedInterval); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop_periodic_update(&self) -> Result<()> { + }} + #[inline] pub fn stop_periodic_update(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StopPeriodicUpdate)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start_periodic_update_batch(&self, tileContents: &super::super::foundation::collections::IIterable, requestedInterval: PeriodicUpdateRecurrence) -> Result<()> { + }} + #[inline] pub fn start_periodic_update_batch(&self, tileContents: &foundation::collections::IIterable, requestedInterval: PeriodicUpdateRecurrence) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StartPeriodicUpdateBatch)(self as *const _ as *mut _, tileContents as *const _ as *mut _, requestedInterval); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start_periodic_update_batch_at_time(&self, tileContents: &super::super::foundation::collections::IIterable, startTime: super::super::foundation::DateTime, requestedInterval: PeriodicUpdateRecurrence) -> Result<()> { + }} + #[inline] pub fn start_periodic_update_batch_at_time(&self, tileContents: &foundation::collections::IIterable, startTime: foundation::DateTime, requestedInterval: PeriodicUpdateRecurrence) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StartPeriodicUpdateBatchAtTime)(self as *const _ as *mut _, tileContents as *const _ as *mut _, startTime, requestedInterval); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class TileUpdater: ITileUpdater} DEFINE_IID!(IID_ITileUpdater2, 2720427538, 5614, 17389, 131, 245, 101, 179, 82, 187, 26, 132); @@ -14898,29 +14898,29 @@ RT_INTERFACE!{interface ITileUpdater2(ITileUpdater2Vtbl): IInspectable(IInspecta fn EnableNotificationQueueForSquare310x310(&self, enable: bool) -> HRESULT }} impl ITileUpdater2 { - #[inline] pub unsafe fn enable_notification_queue_for_square150x150(&self, enable: bool) -> Result<()> { + #[inline] pub fn enable_notification_queue_for_square150x150(&self, enable: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).EnableNotificationQueueForSquare150x150)(self as *const _ as *mut _, enable); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn enable_notification_queue_for_wide310x150(&self, enable: bool) -> Result<()> { + }} + #[inline] pub fn enable_notification_queue_for_wide310x150(&self, enable: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).EnableNotificationQueueForWide310x150)(self as *const _ as *mut _, enable); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn enable_notification_queue_for_square310x310(&self, enable: bool) -> Result<()> { + }} + #[inline] pub fn enable_notification_queue_for_square310x310(&self, enable: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).EnableNotificationQueueForSquare310x310)(self as *const _ as *mut _, enable); if hr == S_OK { Ok(()) } 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(&self, out: *mut HSTRING) -> HRESULT }} impl IToastActivatedEventArgs { - #[inline] pub unsafe fn get_arguments(&self) -> Result { + #[inline] pub fn get_arguments(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Arguments)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ToastActivatedEventArgs: IToastActivatedEventArgs} DEFINE_IID!(IID_IToastCollection, 176931760, 57534, 18520, 188, 42, 137, 223, 224, 179, 40, 99); @@ -14930,109 +14930,109 @@ RT_INTERFACE!{interface IToastCollection(IToastCollectionVtbl): IInspectable(IIn fn put_DisplayName(&self, value: HSTRING) -> HRESULT, fn get_LaunchArgs(&self, out: *mut HSTRING) -> HRESULT, fn put_LaunchArgs(&self, value: HSTRING) -> HRESULT, - fn get_Icon(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_Icon(&self, value: *mut super::super::foundation::Uri) -> HRESULT + fn get_Icon(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_Icon(&self, value: *mut foundation::Uri) -> HRESULT }} impl IToastCollection { - #[inline] pub unsafe fn get_id(&self) -> Result { + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_display_name(&self) -> Result { + }} + #[inline] pub fn get_display_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DisplayName)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_display_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_display_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DisplayName)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_launch_args(&self) -> Result { + }} + #[inline] pub fn get_launch_args(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LaunchArgs)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_launch_args(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_launch_args(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LaunchArgs)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_icon(&self) -> Result> { + }} + #[inline] pub fn get_icon(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Icon)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_icon(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_icon(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Icon)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ToastCollection: IToastCollection} impl RtActivatable for ToastCollection {} impl ToastCollection { - #[inline] pub fn create_instance(collectionId: &HStringArg, displayName: &HStringArg, launchArgs: &HStringArg, iconUri: &super::super::foundation::Uri) -> Result> { unsafe { + #[inline] pub fn create_instance(collectionId: &HStringArg, displayName: &HStringArg, launchArgs: &HStringArg, iconUri: &foundation::Uri) -> Result> { >::get_activation_factory().create_instance(collectionId, displayName, launchArgs, iconUri) - }} + } } DEFINE_CLSID!(ToastCollection(&[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,67,111,108,108,101,99,116,105,111,110,0]) [CLSID_ToastCollection]); DEFINE_IID!(IID_IToastCollectionFactory, 374199255, 29636, 17655, 180, 255, 251, 109, 75, 241, 244, 198); RT_INTERFACE!{static interface IToastCollectionFactory(IToastCollectionFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IToastCollectionFactory] { - fn CreateInstance(&self, collectionId: HSTRING, displayName: HSTRING, launchArgs: HSTRING, iconUri: *mut super::super::foundation::Uri, out: *mut *mut ToastCollection) -> HRESULT + fn CreateInstance(&self, collectionId: HSTRING, displayName: HSTRING, launchArgs: HSTRING, iconUri: *mut foundation::Uri, out: *mut *mut ToastCollection) -> HRESULT }} impl IToastCollectionFactory { - #[inline] pub unsafe fn create_instance(&self, collectionId: &HStringArg, displayName: &HStringArg, launchArgs: &HStringArg, iconUri: &super::super::foundation::Uri) -> Result> { + #[inline] pub fn create_instance(&self, collectionId: &HStringArg, displayName: &HStringArg, launchArgs: &HStringArg, iconUri: &foundation::Uri) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self as *const _ as *mut _, collectionId.get(), displayName.get(), launchArgs.get(), iconUri as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IToastCollectionManager, 706224638, 6045, 18876, 183, 157, 165, 39, 146, 13, 54, 101); RT_INTERFACE!{interface IToastCollectionManager(IToastCollectionManagerVtbl): IInspectable(IInspectableVtbl) [IID_IToastCollectionManager] { - fn SaveToastCollectionAsync(&self, collection: *mut ToastCollection, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn FindAllToastCollectionsAsync(&self, out: *mut *mut super::super::foundation::IAsyncOperation>) -> HRESULT, - fn GetToastCollectionAsync(&self, collectionId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn RemoveToastCollectionAsync(&self, collectionId: HSTRING, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, - fn RemoveAllToastCollectionsAsync(&self, out: *mut *mut super::super::foundation::IAsyncAction) -> HRESULT, + fn SaveToastCollectionAsync(&self, collection: *mut ToastCollection, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn FindAllToastCollectionsAsync(&self, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, + fn GetToastCollectionAsync(&self, collectionId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn RemoveToastCollectionAsync(&self, collectionId: HSTRING, out: *mut *mut foundation::IAsyncAction) -> HRESULT, + fn RemoveAllToastCollectionsAsync(&self, out: *mut *mut foundation::IAsyncAction) -> HRESULT, #[cfg(not(feature="windows-system"))] fn __Dummy5(&self) -> (), #[cfg(feature="windows-system")] fn get_User(&self, out: *mut *mut super::super::system::User) -> HRESULT, fn get_AppId(&self, out: *mut HSTRING) -> HRESULT }} impl IToastCollectionManager { - #[inline] pub unsafe fn save_toast_collection_async(&self, collection: &ToastCollection) -> Result> { + #[inline] pub fn save_toast_collection_async(&self, collection: &ToastCollection) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).SaveToastCollectionAsync)(self as *const _ as *mut _, collection as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn find_all_toast_collections_async(&self) -> Result>>> { + }} + #[inline] pub fn find_all_toast_collections_async(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindAllToastCollectionsAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_toast_collection_async(&self, collectionId: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_toast_collection_async(&self, collectionId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetToastCollectionAsync)(self as *const _ as *mut _, collectionId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn remove_toast_collection_async(&self, collectionId: &HStringArg) -> Result> { + }} + #[inline] pub fn remove_toast_collection_async(&self, collectionId: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RemoveToastCollectionAsync)(self as *const _ as *mut _, collectionId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn remove_all_toast_collections_async(&self) -> Result> { + }} + #[inline] pub fn remove_all_toast_collections_async(&self) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RemoveAllToastCollectionsAsync)(self 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 get_user(&self) -> Result> { + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_User)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_app_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_app_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class ToastCollectionManager: IToastCollectionManager} RT_ENUM! { enum ToastDismissalReason: i32 { @@ -15043,23 +15043,23 @@ RT_INTERFACE!{interface IToastDismissedEventArgs(IToastDismissedEventArgsVtbl): fn get_Reason(&self, out: *mut ToastDismissalReason) -> HRESULT }} impl IToastDismissedEventArgs { - #[inline] pub unsafe fn get_reason(&self) -> Result { + #[inline] pub fn get_reason(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Reason)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ToastDismissedEventArgs: IToastDismissedEventArgs} 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(&self, out: *mut super::super::foundation::HResult) -> HRESULT + fn get_ErrorCode(&self, out: *mut foundation::HResult) -> HRESULT }} impl IToastFailedEventArgs { - #[inline] pub unsafe fn get_error_code(&self) -> Result { + #[inline] pub fn get_error_code(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ErrorCode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ToastFailedEventArgs: IToastFailedEventArgs} RT_ENUM! { enum ToastHistoryChangedType: i32 { @@ -15069,64 +15069,64 @@ DEFINE_IID!(IID_IToastNotification, 2575181429, 1438, 20064, 139, 6, 23, 96, 145 RT_INTERFACE!{interface IToastNotification(IToastNotificationVtbl): IInspectable(IInspectableVtbl) [IID_IToastNotification] { #[cfg(not(feature="windows-data"))] fn __Dummy0(&self) -> (), #[cfg(feature="windows-data")] fn get_Content(&self, out: *mut *mut super::super::data::xml::dom::XmlDocument) -> HRESULT, - fn put_ExpirationTime(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_ExpirationTime(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn add_Dismissed(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Dismissed(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Activated(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Activated(&self, cookie: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Failed(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Failed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn put_ExpirationTime(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_ExpirationTime(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn add_Dismissed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Dismissed(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_Activated(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Activated(&self, cookie: foundation::EventRegistrationToken) -> HRESULT, + fn add_Failed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Failed(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IToastNotification { - #[cfg(feature="windows-data")] #[inline] pub unsafe fn get_content(&self) -> Result> { + #[cfg(feature="windows-data")] #[inline] pub fn get_content(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Content)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_expiration_time(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_expiration_time(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ExpirationTime)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_expiration_time(&self) -> Result>> { + }} + #[inline] pub fn get_expiration_time(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExpirationTime)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_dismissed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_dismissed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Dismissed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_dismissed(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_dismissed(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Dismissed)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_activated(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_activated(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Activated)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_activated(&self, cookie: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_activated(&self, cookie: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Activated)(self as *const _ as *mut _, cookie); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_failed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_failed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Failed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_failed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_failed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Failed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ToastNotification: IToastNotification} impl RtActivatable for ToastNotification {} impl ToastNotification { - #[cfg(feature="windows-data")] #[inline] pub fn create_toast_notification(content: &super::super::data::xml::dom::XmlDocument) -> Result> { unsafe { + #[cfg(feature="windows-data")] #[inline] pub fn create_toast_notification(content: &super::super::data::xml::dom::XmlDocument) -> Result> { >::get_activation_factory().create_toast_notification(content) - }} + } } DEFINE_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]) [CLSID_ToastNotification]); DEFINE_IID!(IID_IToastNotification2, 2650513361, 5178, 18702, 144, 191, 185, 251, 167, 19, 45, 231); @@ -15139,33 +15139,33 @@ RT_INTERFACE!{interface IToastNotification2(IToastNotification2Vtbl): IInspectab fn get_SuppressPopup(&self, out: *mut bool) -> HRESULT }} impl IToastNotification2 { - #[inline] pub unsafe fn set_tag(&self, value: &HStringArg) -> Result<()> { + #[inline] pub fn set_tag(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Tag)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_tag(&self) -> Result { + }} + #[inline] pub fn get_tag(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Tag)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_group(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_group(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Group)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_group(&self) -> Result { + }} + #[inline] pub fn get_group(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Group)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_suppress_popup(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_suppress_popup(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SuppressPopup)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_suppress_popup(&self) -> Result { + }} + #[inline] pub fn get_suppress_popup(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SuppressPopup)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IToastNotification3, 837332696, 33089, 20377, 188, 10, 196, 237, 33, 41, 125, 119); RT_INTERFACE!{interface IToastNotification3(IToastNotification3Vtbl): IInspectable(IInspectableVtbl) [IID_IToastNotification3] { @@ -15175,24 +15175,24 @@ RT_INTERFACE!{interface IToastNotification3(IToastNotification3Vtbl): IInspectab fn put_RemoteId(&self, value: HSTRING) -> HRESULT }} impl IToastNotification3 { - #[inline] pub unsafe fn get_notification_mirroring(&self) -> Result { + #[inline] pub fn get_notification_mirroring(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NotificationMirroring)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_notification_mirroring(&self, value: NotificationMirroring) -> Result<()> { + }} + #[inline] pub fn set_notification_mirroring(&self, value: NotificationMirroring) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_NotificationMirroring)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_remote_id(&self) -> Result { + }} + #[inline] pub fn get_remote_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RemoteId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_remote_id(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_remote_id(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RemoteId)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IToastNotification4, 353716533, 10474, 18215, 136, 233, 197, 134, 128, 226, 209, 24); RT_INTERFACE!{interface IToastNotification4(IToastNotification4Vtbl): IInspectable(IInspectableVtbl) [IID_IToastNotification4] { @@ -15202,41 +15202,41 @@ RT_INTERFACE!{interface IToastNotification4(IToastNotification4Vtbl): IInspectab fn put_Priority(&self, value: ToastNotificationPriority) -> HRESULT }} impl IToastNotification4 { - #[inline] pub unsafe fn get_data(&self) -> Result> { + #[inline] pub fn get_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Data)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_data(&self, value: &NotificationData) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_data(&self, value: &NotificationData) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Data)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_priority(&self) -> Result { + }} + #[inline] pub fn get_priority(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Priority)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_priority(&self, value: ToastNotificationPriority) -> Result<()> { + }} + #[inline] pub fn set_priority(&self, value: ToastNotificationPriority) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Priority)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } 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(&self, out: *mut HSTRING) -> HRESULT, - fn get_UserInput(&self, out: *mut *mut super::super::foundation::collections::ValueSet) -> HRESULT + fn get_UserInput(&self, out: *mut *mut foundation::collections::ValueSet) -> HRESULT }} impl IToastNotificationActionTriggerDetail { - #[inline] pub unsafe fn get_argument(&self) -> Result { + #[inline] pub fn get_argument(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Argument)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_user_input(&self) -> Result> { + }} + #[inline] pub fn get_user_input(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UserInput)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ToastNotificationActionTriggerDetail: IToastNotificationActionTriggerDetail} DEFINE_IID!(IID_IToastNotificationFactory, 68307744, 33478, 16937, 177, 9, 253, 158, 212, 102, 43, 83); @@ -15244,11 +15244,11 @@ RT_INTERFACE!{static interface IToastNotificationFactory(IToastNotificationFacto #[cfg(feature="windows-data")] fn CreateToastNotification(&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(&self, content: &super::super::data::xml::dom::XmlDocument) -> Result> { + #[cfg(feature="windows-data")] #[inline] pub fn create_toast_notification(&self, content: &super::super::data::xml::dom::XmlDocument) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateToastNotification)(self as *const _ as *mut _, content as *const _ as *mut _, &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] { @@ -15261,63 +15261,63 @@ RT_INTERFACE!{interface IToastNotificationHistory(IToastNotificationHistoryVtbl) fn ClearWithId(&self, applicationId: HSTRING) -> HRESULT }} impl IToastNotificationHistory { - #[inline] pub unsafe fn remove_group(&self, group: &HStringArg) -> Result<()> { + #[inline] pub fn remove_group(&self, group: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveGroup)(self as *const _ as *mut _, group.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove_group_with_id(&self, group: &HStringArg, applicationId: &HStringArg) -> Result<()> { + }} + #[inline] pub fn remove_group_with_id(&self, group: &HStringArg, applicationId: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveGroupWithId)(self as *const _ as *mut _, group.get(), applicationId.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove_grouped_tag_with_id(&self, tag: &HStringArg, group: &HStringArg, applicationId: &HStringArg) -> Result<()> { + }} + #[inline] pub fn remove_grouped_tag_with_id(&self, tag: &HStringArg, group: &HStringArg, applicationId: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveGroupedTagWithId)(self as *const _ as *mut _, tag.get(), group.get(), applicationId.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove_grouped_tag(&self, tag: &HStringArg, group: &HStringArg) -> Result<()> { + }} + #[inline] pub fn remove_grouped_tag(&self, tag: &HStringArg, group: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveGroupedTag)(self as *const _ as *mut _, tag.get(), group.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove(&self, tag: &HStringArg) -> Result<()> { + }} + #[inline] pub fn remove(&self, tag: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Remove)(self as *const _ as *mut _, tag.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn clear(&self) -> Result<()> { + }} + #[inline] pub fn clear(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Clear)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn clear_with_id(&self, applicationId: &HStringArg) -> Result<()> { + }} + #[inline] pub fn clear_with_id(&self, applicationId: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ClearWithId)(self as *const _ as *mut _, applicationId.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ToastNotificationHistory: IToastNotificationHistory} 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(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn GetHistoryWithId(&self, applicationId: HSTRING, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn GetHistory(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn GetHistoryWithId(&self, applicationId: HSTRING, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IToastNotificationHistory2 { - #[inline] pub unsafe fn get_history(&self) -> Result>> { + #[inline] pub fn get_history(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetHistory)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_history_with_id(&self, applicationId: &HStringArg) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_history_with_id(&self, applicationId: &HStringArg) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetHistoryWithId)(self as *const _ as *mut _, applicationId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut ToastHistoryChangedType) -> HRESULT }} impl IToastNotificationHistoryChangedTriggerDetail { - #[inline] pub unsafe fn get_change_type(&self) -> Result { + #[inline] pub fn get_change_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ChangeType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class ToastNotificationHistoryChangedTriggerDetail: IToastNotificationHistoryChangedTriggerDetail} DEFINE_IID!(IID_IToastNotificationHistoryChangedTriggerDetail2, 188148098, 51313, 18939, 186, 187, 37, 189, 188, 76, 196, 91); @@ -15325,11 +15325,11 @@ RT_INTERFACE!{interface IToastNotificationHistoryChangedTriggerDetail2(IToastNot fn get_CollectionId(&self, out: *mut HSTRING) -> HRESULT }} impl IToastNotificationHistoryChangedTriggerDetail2 { - #[inline] pub unsafe fn get_collection_id(&self) -> Result { + #[inline] pub fn get_collection_id(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CollectionId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{static class ToastNotificationManager} impl RtActivatable for ToastNotificationManager {} @@ -15337,27 +15337,27 @@ impl RtActivatable for ToastNotificationManag impl RtActivatable for ToastNotificationManager {} impl RtActivatable for ToastNotificationManager {} impl ToastNotificationManager { - #[inline] pub fn create_toast_notifier() -> Result> { unsafe { + #[inline] pub fn create_toast_notifier() -> Result>> { >::get_activation_factory().create_toast_notifier() - }} - #[inline] pub fn create_toast_notifier_with_id(applicationId: &HStringArg) -> Result> { unsafe { + } + #[inline] pub fn create_toast_notifier_with_id(applicationId: &HStringArg) -> Result>> { >::get_activation_factory().create_toast_notifier_with_id(applicationId) - }} - #[cfg(feature="windows-data")] #[inline] pub fn get_template_content(type_: ToastTemplateType) -> Result> { unsafe { + } + #[cfg(feature="windows-data")] #[inline] pub fn get_template_content(type_: ToastTemplateType) -> Result>> { >::get_activation_factory().get_template_content(type_) - }} - #[inline] pub fn get_history() -> Result> { unsafe { + } + #[inline] pub fn get_history() -> Result>> { >::get_activation_factory().get_history() - }} - #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::super::system::User) -> Result> { unsafe { + } + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(user: &super::super::system::User) -> Result>> { >::get_activation_factory().get_for_user(user) - }} - #[inline] pub fn configure_notification_mirroring(value: NotificationMirroring) -> Result<()> { unsafe { + } + #[inline] pub fn configure_notification_mirroring(value: NotificationMirroring) -> Result<()> { >::get_activation_factory().configure_notification_mirroring(value) - }} - #[inline] pub fn get_default() -> Result> { unsafe { + } + #[inline] pub fn get_default() -> Result>> { >::get_activation_factory().get_default() - }} + } } DEFINE_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]) [CLSID_ToastNotificationManager]); DEFINE_IID!(IID_IToastNotificationManagerForUser, 2041272310, 17406, 18555, 138, 127, 153, 86, 114, 0, 174, 148); @@ -15368,56 +15368,56 @@ RT_INTERFACE!{interface IToastNotificationManagerForUser(IToastNotificationManag #[cfg(feature="windows-system")] fn get_User(&self, out: *mut *mut super::super::system::User) -> HRESULT }} impl IToastNotificationManagerForUser { - #[inline] pub unsafe fn create_toast_notifier(&self) -> Result> { + #[inline] pub fn create_toast_notifier(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateToastNotifier)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_toast_notifier_with_id(&self, applicationId: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_toast_notifier_with_id(&self, applicationId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateToastNotifierWithId)(self as *const _ as *mut _, applicationId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_history(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_history(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_History)(self 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 get_user(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-system")] #[inline] pub fn get_user(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_User)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ToastNotificationManagerForUser: IToastNotificationManagerForUser} DEFINE_IID!(IID_IToastNotificationManagerForUser2, 1738302647, 33195, 17090, 136, 25, 201, 88, 118, 119, 83, 244); RT_INTERFACE!{interface IToastNotificationManagerForUser2(IToastNotificationManagerForUser2Vtbl): IInspectable(IInspectableVtbl) [IID_IToastNotificationManagerForUser2] { - fn GetToastNotifierForToastCollectionIdAsync(&self, collectionId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, - fn GetHistoryForToastCollectionIdAsync(&self, collectionId: HSTRING, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT, + fn GetToastNotifierForToastCollectionIdAsync(&self, collectionId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, + fn GetHistoryForToastCollectionIdAsync(&self, collectionId: HSTRING, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetToastCollectionManager(&self, out: *mut *mut ToastCollectionManager) -> HRESULT, fn GetToastCollectionManagerWithAppId(&self, appId: HSTRING, out: *mut *mut ToastCollectionManager) -> HRESULT }} impl IToastNotificationManagerForUser2 { - #[inline] pub unsafe fn get_toast_notifier_for_toast_collection_id_async(&self, collectionId: &HStringArg) -> Result>> { + #[inline] pub fn get_toast_notifier_for_toast_collection_id_async(&self, collectionId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetToastNotifierForToastCollectionIdAsync)(self as *const _ as *mut _, collectionId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_history_for_toast_collection_id_async(&self, collectionId: &HStringArg) -> Result>> { + }} + #[inline] pub fn get_history_for_toast_collection_id_async(&self, collectionId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetHistoryForToastCollectionIdAsync)(self as *const _ as *mut _, collectionId.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_toast_collection_manager(&self) -> Result> { + }} + #[inline] pub fn get_toast_collection_manager(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetToastCollectionManager)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_toast_collection_manager_with_app_id(&self, appId: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_toast_collection_manager_with_app_id(&self, appId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetToastCollectionManagerWithAppId)(self as *const _ as *mut _, appId.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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] { @@ -15426,32 +15426,32 @@ RT_INTERFACE!{static interface IToastNotificationManagerStatics(IToastNotificati #[cfg(feature="windows-data")] fn GetTemplateContent(&self, type_: ToastTemplateType, out: *mut *mut super::super::data::xml::dom::XmlDocument) -> HRESULT }} impl IToastNotificationManagerStatics { - #[inline] pub unsafe fn create_toast_notifier(&self) -> Result> { + #[inline] pub fn create_toast_notifier(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateToastNotifier)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_toast_notifier_with_id(&self, applicationId: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_toast_notifier_with_id(&self, applicationId: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateToastNotifierWithId)(self as *const _ as *mut _, 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(&self, type_: ToastTemplateType) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-data")] #[inline] pub fn get_template_content(&self, type_: ToastTemplateType) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetTemplateContent)(self as *const _ as *mut _, type_, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut ToastNotificationHistory) -> HRESULT }} impl IToastNotificationManagerStatics2 { - #[inline] pub unsafe fn get_history(&self) -> Result> { + #[inline] pub fn get_history(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_History)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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] { @@ -15460,26 +15460,26 @@ RT_INTERFACE!{static interface IToastNotificationManagerStatics4(IToastNotificat fn ConfigureNotificationMirroring(&self, value: NotificationMirroring) -> HRESULT }} impl IToastNotificationManagerStatics4 { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_for_user(&self, user: &super::super::system::User) -> Result> { + #[cfg(feature="windows-system")] #[inline] pub fn get_for_user(&self, user: &super::super::system::User) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForUser)(self as *const _ as *mut _, 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(&self, value: NotificationMirroring) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn configure_notification_mirroring(&self, value: NotificationMirroring) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ConfigureNotificationMirroring)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IToastNotificationManagerStatics5, 3606443369, 54285, 16508, 137, 137, 136, 202, 180, 44, 253, 20); RT_INTERFACE!{static interface IToastNotificationManagerStatics5(IToastNotificationManagerStatics5Vtbl): IInspectable(IInspectableVtbl) [IID_IToastNotificationManagerStatics5] { fn GetDefault(&self, out: *mut *mut ToastNotificationManagerForUser) -> HRESULT }} impl IToastNotificationManagerStatics5 { - #[inline] pub unsafe fn get_default(&self) -> Result> { + #[inline] pub fn get_default(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDefault)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum ToastNotificationPriority: i32 { Default (ToastNotificationPriority_Default) = 0, High (ToastNotificationPriority_High) = 1, @@ -15491,35 +15491,35 @@ RT_INTERFACE!{interface IToastNotifier(IToastNotifierVtbl): IInspectable(IInspec fn get_Setting(&self, out: *mut NotificationSetting) -> HRESULT, fn AddToSchedule(&self, scheduledToast: *mut ScheduledToastNotification) -> HRESULT, fn RemoveFromSchedule(&self, scheduledToast: *mut ScheduledToastNotification) -> HRESULT, - fn GetScheduledToastNotifications(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT + fn GetScheduledToastNotifications(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT }} impl IToastNotifier { - #[inline] pub unsafe fn show(&self, notification: &ToastNotification) -> Result<()> { + #[inline] pub fn show(&self, notification: &ToastNotification) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Show)(self as *const _ as *mut _, notification as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn hide(&self, notification: &ToastNotification) -> Result<()> { + }} + #[inline] pub fn hide(&self, notification: &ToastNotification) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Hide)(self as *const _ as *mut _, notification as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_setting(&self) -> Result { + }} + #[inline] pub fn get_setting(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Setting)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_to_schedule(&self, scheduledToast: &ScheduledToastNotification) -> Result<()> { + }} + #[inline] pub fn add_to_schedule(&self, scheduledToast: &ScheduledToastNotification) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddToSchedule)(self as *const _ as *mut _, scheduledToast as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove_from_schedule(&self, scheduledToast: &ScheduledToastNotification) -> Result<()> { + }} + #[inline] pub fn remove_from_schedule(&self, scheduledToast: &ScheduledToastNotification) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveFromSchedule)(self as *const _ as *mut _, scheduledToast as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_scheduled_toast_notifications(&self) -> Result>> { + }} + #[inline] pub fn get_scheduled_toast_notifications(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetScheduledToastNotifications)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ToastNotifier: IToastNotifier} DEFINE_IID!(IID_IToastNotifier2, 893618630, 31745, 19413, 156, 32, 96, 67, 64, 205, 43, 116); @@ -15528,16 +15528,16 @@ RT_INTERFACE!{interface IToastNotifier2(IToastNotifier2Vtbl): IInspectable(IInsp fn UpdateWithTag(&self, data: *mut NotificationData, tag: HSTRING, out: *mut NotificationUpdateResult) -> HRESULT }} impl IToastNotifier2 { - #[inline] pub unsafe fn update_with_tag_and_group(&self, data: &NotificationData, tag: &HStringArg, group: &HStringArg) -> Result { + #[inline] pub fn update_with_tag_and_group(&self, data: &NotificationData, tag: &HStringArg, group: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).UpdateWithTagAndGroup)(self as *const _ as *mut _, data as *const _ as *mut _, tag.get(), group.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn update_with_tag(&self, data: &NotificationData, tag: &HStringArg) -> Result { + }} + #[inline] pub fn update_with_tag(&self, data: &NotificationData, tag: &HStringArg) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).UpdateWithTag)(self as *const _ as *mut _, data as *const _ as *mut _, tag.get(), &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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, @@ -15548,29 +15548,29 @@ RT_INTERFACE!{interface IUserNotification(IUserNotificationVtbl): IInspectable(I #[cfg(not(feature="windows-applicationmodel"))] fn __Dummy1(&self) -> (), #[cfg(feature="windows-applicationmodel")] fn get_AppInfo(&self, out: *mut *mut super::super::applicationmodel::AppInfo) -> HRESULT, fn get_Id(&self, out: *mut u32) -> HRESULT, - fn get_CreationTime(&self, out: *mut super::super::foundation::DateTime) -> HRESULT + fn get_CreationTime(&self, out: *mut foundation::DateTime) -> HRESULT }} impl IUserNotification { - #[inline] pub unsafe fn get_notification(&self) -> Result> { + #[inline] pub fn get_notification(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Notification)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn get_app_info(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn get_app_info(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AppInfo)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_id(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Id)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_creation_time(&self) -> Result { + }} + #[inline] pub fn get_creation_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CreationTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class UserNotification: IUserNotification} DEFINE_IID!(IID_IUserNotificationChangedEventArgs, 3065866297, 31183, 19237, 130, 192, 12, 225, 238, 248, 31, 140); @@ -15579,16 +15579,16 @@ RT_INTERFACE!{interface IUserNotificationChangedEventArgs(IUserNotificationChang fn get_UserNotificationId(&self, out: *mut u32) -> HRESULT }} impl IUserNotificationChangedEventArgs { - #[inline] pub unsafe fn get_change_kind(&self) -> Result { + #[inline] pub fn get_change_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ChangeKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_user_notification_id(&self) -> Result { + }} + #[inline] pub fn get_user_notification_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UserNotificationId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class UserNotificationChangedEventArgs: IUserNotificationChangedEventArgs} RT_ENUM! { enum UserNotificationChangedKind: i32 { @@ -15598,60 +15598,60 @@ pub mod management { // Windows.UI.Notifications.Management use ::prelude::*; 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(&self, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation) -> HRESULT, + fn RequestAccessAsync(&self, out: *mut *mut foundation::IAsyncOperation) -> HRESULT, fn GetAccessStatus(&self, out: *mut UserNotificationListenerAccessStatus) -> HRESULT, - fn add_NotificationChanged(&self, handler: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_NotificationChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn GetNotificationsAsync(&self, kinds: super::NotificationKinds, out: *mut *mut ::rt::gen::windows::foundation::IAsyncOperation<::rt::gen::windows::foundation::collections::IVectorView>) -> HRESULT, + fn add_NotificationChanged(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_NotificationChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn GetNotificationsAsync(&self, kinds: super::NotificationKinds, out: *mut *mut foundation::IAsyncOperation>) -> HRESULT, fn GetNotification(&self, notificationId: u32, out: *mut *mut super::UserNotification) -> HRESULT, fn ClearNotifications(&self) -> HRESULT, fn RemoveNotification(&self, notificationId: u32) -> HRESULT }} impl IUserNotificationListener { - #[inline] pub unsafe fn request_access_async(&self) -> Result>> { + #[inline] pub fn request_access_async(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RequestAccessAsync)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_access_status(&self) -> Result { + }} + #[inline] pub fn get_access_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetAccessStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_notification_changed(&self, handler: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_notification_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_NotificationChanged)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_notification_changed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_notification_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_NotificationChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_notifications_async(&self, kinds: super::NotificationKinds) -> Result>>> { + }} + #[inline] pub fn get_notifications_async(&self, kinds: super::NotificationKinds) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetNotificationsAsync)(self as *const _ as *mut _, kinds, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_notification(&self, notificationId: u32) -> Result> { + }} + #[inline] pub fn get_notification(&self, notificationId: u32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetNotification)(self as *const _ as *mut _, notificationId, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn clear_notifications(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn clear_notifications(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ClearNotifications)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove_notification(&self, notificationId: u32) -> Result<()> { + }} + #[inline] pub fn remove_notification(&self, notificationId: u32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveNotification)(self as *const _ as *mut _, notificationId); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class UserNotificationListener: IUserNotificationListener} impl RtActivatable for UserNotificationListener {} impl UserNotificationListener { - #[inline] pub fn get_current() -> Result> { unsafe { + #[inline] pub fn get_current() -> Result>> { >::get_activation_factory().get_current() - }} + } } DEFINE_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]) [CLSID_UserNotificationListener]); RT_ENUM! { enum UserNotificationListenerAccessStatus: i32 { @@ -15662,11 +15662,11 @@ RT_INTERFACE!{static interface IUserNotificationListenerStatics(IUserNotificatio fn get_Current(&self, out: *mut *mut UserNotificationListener) -> HRESULT }} impl IUserNotificationListenerStatics { - #[inline] pub unsafe fn get_current(&self) -> Result> { + #[inline] pub fn get_current(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Current)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } } // Windows.UI.Notifications.Management } // Windows.UI.Notifications @@ -15678,15 +15678,15 @@ RT_INTERFACE!{interface IAmbientLight(IAmbientLightVtbl): IInspectable(IInspecta fn put_Color(&self, value: super::Color) -> HRESULT }} impl IAmbientLight { - #[inline] pub unsafe fn get_color(&self) -> Result { + #[inline] pub fn get_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Color)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_color(&self, value: super::Color) -> Result<()> { + }} + #[inline] pub fn set_color(&self, value: super::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Color)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AmbientLight: IAmbientLight} DEFINE_IID!(IID_IAmbientLight2, 996452031, 24471, 19604, 134, 229, 4, 45, 211, 134, 178, 125); @@ -15695,15 +15695,15 @@ RT_INTERFACE!{interface IAmbientLight2(IAmbientLight2Vtbl): IInspectable(IInspec fn put_Intensity(&self, value: f32) -> HRESULT }} impl IAmbientLight2 { - #[inline] pub unsafe fn get_intensity(&self) -> Result { + #[inline] pub fn get_intensity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Intensity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_intensity(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_intensity(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Intensity)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum AnimationDelayBehavior: i32 { SetInitialValueAfterDelay (AnimationDelayBehavior_SetInitialValueAfterDelay) = 0, SetInitialValueBeforeDelay (AnimationDelayBehavior_SetInitialValueBeforeDelay) = 1, @@ -15725,23 +15725,23 @@ RT_INTERFACE!{interface IColorKeyFrameAnimation(IColorKeyFrameAnimationVtbl): II fn InsertKeyFrameWithEasingFunction(&self, normalizedProgressKey: f32, value: super::Color, easingFunction: *mut CompositionEasingFunction) -> HRESULT }} impl IColorKeyFrameAnimation { - #[inline] pub unsafe fn get_interpolation_color_space(&self) -> Result { + #[inline] pub fn get_interpolation_color_space(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InterpolationColorSpace)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_interpolation_color_space(&self, value: CompositionColorSpace) -> Result<()> { + }} + #[inline] pub fn set_interpolation_color_space(&self, value: CompositionColorSpace) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InterpolationColorSpace)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn insert_key_frame(&self, normalizedProgressKey: f32, value: super::Color) -> Result<()> { + }} + #[inline] pub fn insert_key_frame(&self, normalizedProgressKey: f32, value: super::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InsertKeyFrame)(self as *const _ as *mut _, normalizedProgressKey, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn insert_key_frame_with_easing_function(&self, normalizedProgressKey: f32, value: super::Color, easingFunction: &CompositionEasingFunction) -> Result<()> { + }} + #[inline] pub fn insert_key_frame_with_easing_function(&self, normalizedProgressKey: f32, value: super::Color, easingFunction: &CompositionEasingFunction) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InsertKeyFrameWithEasingFunction)(self as *const _ as *mut _, normalizedProgressKey, value, easingFunction as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ColorKeyFrameAnimation: IColorKeyFrameAnimation} DEFINE_IID!(IID_ICompositionAnimation, 1179405356, 7338, 16481, 155, 64, 225, 63, 222, 21, 3, 202); @@ -15749,60 +15749,60 @@ RT_INTERFACE!{interface ICompositionAnimation(ICompositionAnimationVtbl): IInspe fn ClearAllParameters(&self) -> HRESULT, fn ClearParameter(&self, key: HSTRING) -> HRESULT, fn SetColorParameter(&self, key: HSTRING, value: super::Color) -> HRESULT, - fn SetMatrix3x2Parameter(&self, key: HSTRING, value: super::super::foundation::numerics::Matrix3x2) -> HRESULT, - fn SetMatrix4x4Parameter(&self, key: HSTRING, value: super::super::foundation::numerics::Matrix4x4) -> HRESULT, - fn SetQuaternionParameter(&self, key: HSTRING, value: super::super::foundation::numerics::Quaternion) -> HRESULT, + fn SetMatrix3x2Parameter(&self, key: HSTRING, value: foundation::numerics::Matrix3x2) -> HRESULT, + fn SetMatrix4x4Parameter(&self, key: HSTRING, value: foundation::numerics::Matrix4x4) -> HRESULT, + fn SetQuaternionParameter(&self, key: HSTRING, value: foundation::numerics::Quaternion) -> HRESULT, fn SetReferenceParameter(&self, key: HSTRING, compositionObject: *mut CompositionObject) -> HRESULT, fn SetScalarParameter(&self, key: HSTRING, value: f32) -> HRESULT, - fn SetVector2Parameter(&self, key: HSTRING, value: super::super::foundation::numerics::Vector2) -> HRESULT, - fn SetVector3Parameter(&self, key: HSTRING, value: super::super::foundation::numerics::Vector3) -> HRESULT, - fn SetVector4Parameter(&self, key: HSTRING, value: super::super::foundation::numerics::Vector4) -> HRESULT + fn SetVector2Parameter(&self, key: HSTRING, value: foundation::numerics::Vector2) -> HRESULT, + fn SetVector3Parameter(&self, key: HSTRING, value: foundation::numerics::Vector3) -> HRESULT, + fn SetVector4Parameter(&self, key: HSTRING, value: foundation::numerics::Vector4) -> HRESULT }} impl ICompositionAnimation { - #[inline] pub unsafe fn clear_all_parameters(&self) -> Result<()> { + #[inline] pub fn clear_all_parameters(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ClearAllParameters)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn clear_parameter(&self, key: &HStringArg) -> Result<()> { + }} + #[inline] pub fn clear_parameter(&self, key: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ClearParameter)(self as *const _ as *mut _, key.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_color_parameter(&self, key: &HStringArg, value: super::Color) -> Result<()> { + }} + #[inline] pub fn set_color_parameter(&self, key: &HStringArg, value: super::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetColorParameter)(self as *const _ as *mut _, key.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_matrix3x2_parameter(&self, key: &HStringArg, value: super::super::foundation::numerics::Matrix3x2) -> Result<()> { + }} + #[inline] pub fn set_matrix3x2_parameter(&self, key: &HStringArg, value: foundation::numerics::Matrix3x2) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetMatrix3x2Parameter)(self as *const _ as *mut _, key.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_matrix4x4_parameter(&self, key: &HStringArg, value: super::super::foundation::numerics::Matrix4x4) -> Result<()> { + }} + #[inline] pub fn set_matrix4x4_parameter(&self, key: &HStringArg, value: foundation::numerics::Matrix4x4) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetMatrix4x4Parameter)(self as *const _ as *mut _, key.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_quaternion_parameter(&self, key: &HStringArg, value: super::super::foundation::numerics::Quaternion) -> Result<()> { + }} + #[inline] pub fn set_quaternion_parameter(&self, key: &HStringArg, value: foundation::numerics::Quaternion) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetQuaternionParameter)(self as *const _ as *mut _, key.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_reference_parameter(&self, key: &HStringArg, compositionObject: &CompositionObject) -> Result<()> { + }} + #[inline] pub fn set_reference_parameter(&self, key: &HStringArg, compositionObject: &CompositionObject) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetReferenceParameter)(self as *const _ as *mut _, key.get(), compositionObject as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_scalar_parameter(&self, key: &HStringArg, value: f32) -> Result<()> { + }} + #[inline] pub fn set_scalar_parameter(&self, key: &HStringArg, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetScalarParameter)(self as *const _ as *mut _, key.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_vector2_parameter(&self, key: &HStringArg, value: super::super::foundation::numerics::Vector2) -> Result<()> { + }} + #[inline] pub fn set_vector2_parameter(&self, key: &HStringArg, value: foundation::numerics::Vector2) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetVector2Parameter)(self as *const _ as *mut _, key.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_vector3_parameter(&self, key: &HStringArg, value: super::super::foundation::numerics::Vector3) -> Result<()> { + }} + #[inline] pub fn set_vector3_parameter(&self, key: &HStringArg, value: foundation::numerics::Vector3) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetVector3Parameter)(self as *const _ as *mut _, key.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_vector4_parameter(&self, key: &HStringArg, value: super::super::foundation::numerics::Vector4) -> Result<()> { + }} + #[inline] pub fn set_vector4_parameter(&self, key: &HStringArg, value: foundation::numerics::Vector4) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetVector4Parameter)(self as *const _ as *mut _, key.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CompositionAnimation: ICompositionAnimation} DEFINE_IID!(IID_ICompositionAnimation2, 916152382, 43023, 18760, 147, 227, 237, 35, 251, 56, 198, 203); @@ -15812,30 +15812,30 @@ RT_INTERFACE!{interface ICompositionAnimation2(ICompositionAnimation2Vtbl): IIns fn put_Target(&self, value: HSTRING) -> HRESULT }} impl ICompositionAnimation2 { - #[inline] pub unsafe fn set_boolean_parameter(&self, key: &HStringArg, value: bool) -> Result<()> { + #[inline] pub fn set_boolean_parameter(&self, key: &HStringArg, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetBooleanParameter)(self as *const _ as *mut _, key.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_target(&self) -> Result { + }} + #[inline] pub fn get_target(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Target)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_target(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_target(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Target)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ICompositionAnimation3, 3575513869, 32164, 19415, 188, 45, 244, 81, 117, 41, 244, 58); RT_INTERFACE!{interface ICompositionAnimation3(ICompositionAnimation3Vtbl): IInspectable(IInspectableVtbl) [IID_ICompositionAnimation3] { fn get_InitialValueExpressions(&self, out: *mut *mut InitialValueExpressionCollection) -> HRESULT }} impl ICompositionAnimation3 { - #[inline] pub unsafe fn get_initial_value_expressions(&self) -> Result> { + #[inline] pub fn get_initial_value_expressions(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InitialValueExpressions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } 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] { @@ -15853,23 +15853,23 @@ RT_INTERFACE!{interface ICompositionAnimationGroup(ICompositionAnimationGroupVtb fn RemoveAll(&self) -> HRESULT }} impl ICompositionAnimationGroup { - #[inline] pub unsafe fn get_count(&self) -> Result { + #[inline] pub fn get_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Count)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add(&self, value: &CompositionAnimation) -> Result<()> { + }} + #[inline] pub fn add(&self, value: &CompositionAnimation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Add)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove(&self, value: &CompositionAnimation) -> Result<()> { + }} + #[inline] pub fn remove(&self, value: &CompositionAnimation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Remove)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove_all(&self) -> Result<()> { + }} + #[inline] pub fn remove_all(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveAll)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CompositionAnimationGroup: ICompositionAnimationGroup} DEFINE_IID!(IID_ICompositionBackdropBrush, 3316428376, 14488, 18846, 141, 127, 34, 78, 145, 40, 106, 93); @@ -15907,36 +15907,36 @@ DEFINE_IID!(IID_ICompositionCapabilities, 2186491198, 46359, 18620, 177, 232, 75 RT_INTERFACE!{interface ICompositionCapabilities(ICompositionCapabilitiesVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionCapabilities] { fn AreEffectsSupported(&self, out: *mut bool) -> HRESULT, fn AreEffectsFast(&self, out: *mut bool) -> HRESULT, - fn add_Changed(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Changed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_Changed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Changed(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl ICompositionCapabilities { - #[inline] pub unsafe fn are_effects_supported(&self) -> Result { + #[inline] pub fn are_effects_supported(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).AreEffectsSupported)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn are_effects_fast(&self) -> Result { + }} + #[inline] pub fn are_effects_fast(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).AreEffectsFast)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_changed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_changed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Changed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Changed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CompositionCapabilities: ICompositionCapabilities} impl RtActivatable for CompositionCapabilities {} impl CompositionCapabilities { - #[inline] pub fn get_for_current_view() -> Result> { unsafe { + #[inline] pub fn get_for_current_view() -> Result>> { >::get_activation_factory().get_for_current_view() - }} + } } DEFINE_CLSID!(CompositionCapabilities(&[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,67,97,112,97,98,105,108,105,116,105,101,115,0]) [CLSID_CompositionCapabilities]); DEFINE_IID!(IID_ICompositionCapabilitiesStatics, 4156008558, 25622, 18917, 141, 223, 175, 233, 73, 226, 5, 98); @@ -15944,11 +15944,11 @@ RT_INTERFACE!{static interface ICompositionCapabilitiesStatics(ICompositionCapab fn GetForCurrentView(&self, out: *mut *mut CompositionCapabilities) -> HRESULT }} impl ICompositionCapabilitiesStatics { - #[inline] pub unsafe fn get_for_current_view(&self) -> Result> { + #[inline] pub fn get_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_ICompositionClip, 483207762, 53191, 19150, 153, 131, 20, 107, 184, 235, 106, 60); RT_INTERFACE!{interface ICompositionClip(ICompositionClipVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionClip] { @@ -15957,85 +15957,85 @@ RT_INTERFACE!{interface ICompositionClip(ICompositionClipVtbl): IInspectable(IIn RT_CLASS!{class CompositionClip: 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(&self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT, - fn put_AnchorPoint(&self, value: super::super::foundation::numerics::Vector2) -> HRESULT, - fn get_CenterPoint(&self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT, - fn put_CenterPoint(&self, value: super::super::foundation::numerics::Vector2) -> HRESULT, - fn get_Offset(&self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT, - fn put_Offset(&self, value: super::super::foundation::numerics::Vector2) -> HRESULT, + fn get_AnchorPoint(&self, out: *mut foundation::numerics::Vector2) -> HRESULT, + fn put_AnchorPoint(&self, value: foundation::numerics::Vector2) -> HRESULT, + fn get_CenterPoint(&self, out: *mut foundation::numerics::Vector2) -> HRESULT, + fn put_CenterPoint(&self, value: foundation::numerics::Vector2) -> HRESULT, + fn get_Offset(&self, out: *mut foundation::numerics::Vector2) -> HRESULT, + fn put_Offset(&self, value: foundation::numerics::Vector2) -> HRESULT, fn get_RotationAngle(&self, out: *mut f32) -> HRESULT, fn put_RotationAngle(&self, value: f32) -> HRESULT, fn get_RotationAngleInDegrees(&self, out: *mut f32) -> HRESULT, fn put_RotationAngleInDegrees(&self, value: f32) -> HRESULT, - fn get_Scale(&self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT, - fn put_Scale(&self, value: super::super::foundation::numerics::Vector2) -> HRESULT, - fn get_TransformMatrix(&self, out: *mut super::super::foundation::numerics::Matrix3x2) -> HRESULT, - fn put_TransformMatrix(&self, value: super::super::foundation::numerics::Matrix3x2) -> HRESULT + fn get_Scale(&self, out: *mut foundation::numerics::Vector2) -> HRESULT, + fn put_Scale(&self, value: foundation::numerics::Vector2) -> HRESULT, + fn get_TransformMatrix(&self, out: *mut foundation::numerics::Matrix3x2) -> HRESULT, + fn put_TransformMatrix(&self, value: foundation::numerics::Matrix3x2) -> HRESULT }} impl ICompositionClip2 { - #[inline] pub unsafe fn get_anchor_point(&self) -> Result { + #[inline] pub fn get_anchor_point(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AnchorPoint)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_anchor_point(&self, value: super::super::foundation::numerics::Vector2) -> Result<()> { + }} + #[inline] pub fn set_anchor_point(&self, value: foundation::numerics::Vector2) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AnchorPoint)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_center_point(&self) -> Result { + }} + #[inline] pub fn get_center_point(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CenterPoint)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_center_point(&self, value: super::super::foundation::numerics::Vector2) -> Result<()> { + }} + #[inline] pub fn set_center_point(&self, value: foundation::numerics::Vector2) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CenterPoint)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_offset(&self) -> Result { + }} + #[inline] pub fn get_offset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Offset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_offset(&self, value: super::super::foundation::numerics::Vector2) -> Result<()> { + }} + #[inline] pub fn set_offset(&self, value: foundation::numerics::Vector2) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Offset)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_rotation_angle(&self) -> Result { + }} + #[inline] pub fn get_rotation_angle(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RotationAngle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_rotation_angle(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_rotation_angle(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RotationAngle)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_rotation_angle_in_degrees(&self) -> Result { + }} + #[inline] pub fn get_rotation_angle_in_degrees(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RotationAngleInDegrees)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_rotation_angle_in_degrees(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_rotation_angle_in_degrees(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RotationAngleInDegrees)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_scale(&self) -> Result { + }} + #[inline] pub fn get_scale(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Scale)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_scale(&self, value: super::super::foundation::numerics::Vector2) -> Result<()> { + }} + #[inline] pub fn set_scale(&self, value: foundation::numerics::Vector2) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Scale)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_transform_matrix(&self) -> Result { + }} + #[inline] pub fn get_transform_matrix(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TransformMatrix)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_transform_matrix(&self, value: super::super::foundation::numerics::Matrix3x2) -> Result<()> { + }} + #[inline] pub fn set_transform_matrix(&self, value: foundation::numerics::Matrix3x2) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TransformMatrix)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ICompositionClipFactory, 3108523183, 8391, 19181, 172, 74, 156, 120, 186, 19, 2, 207); RT_INTERFACE!{interface ICompositionClipFactory(ICompositionClipFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionClipFactory] { @@ -16047,15 +16047,15 @@ RT_INTERFACE!{interface ICompositionColorBrush(ICompositionColorBrushVtbl): IIns fn put_Color(&self, value: super::Color) -> HRESULT }} impl ICompositionColorBrush { - #[inline] pub unsafe fn get_color(&self) -> Result { + #[inline] pub fn get_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Color)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_color(&self, value: super::Color) -> Result<()> { + }} + #[inline] pub fn set_color(&self, value: super::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Color)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CompositionColorBrush: ICompositionColorBrush} DEFINE_IID!(IID_ICompositionColorGradientStop, 1862322834, 51201, 20033, 154, 143, 165, 62, 32, 245, 119, 120); @@ -16066,24 +16066,24 @@ RT_INTERFACE!{interface ICompositionColorGradientStop(ICompositionColorGradientS fn put_Offset(&self, value: f32) -> HRESULT }} impl ICompositionColorGradientStop { - #[inline] pub unsafe fn get_color(&self) -> Result { + #[inline] pub fn get_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Color)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_color(&self, value: super::Color) -> Result<()> { + }} + #[inline] pub fn set_color(&self, value: super::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Color)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_offset(&self) -> Result { + }} + #[inline] pub fn get_offset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Offset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_offset(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_offset(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Offset)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CompositionColorGradientStop: ICompositionColorGradientStop} DEFINE_IID!(IID_ICompositionColorGradientStopCollection, 2669486316, 31492, 19229, 144, 188, 159, 163, 44, 12, 253, 38); @@ -16098,29 +16098,29 @@ DEFINE_IID!(IID_ICompositionCommitBatch, 218159824, 51719, 17408, 140, 142, 203, RT_INTERFACE!{interface ICompositionCommitBatch(ICompositionCommitBatchVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionCommitBatch] { fn get_IsActive(&self, out: *mut bool) -> HRESULT, fn get_IsEnded(&self, out: *mut bool) -> HRESULT, - fn add_Completed(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Completed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_Completed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Completed(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl ICompositionCommitBatch { - #[inline] pub unsafe fn get_is_active(&self) -> Result { + #[inline] pub fn get_is_active(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsActive)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_ended(&self) -> Result { + }} + #[inline] pub fn get_is_ended(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsEnded)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_completed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Completed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_completed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Completed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CompositionCommitBatch: ICompositionCommitBatch} RT_ENUM! { enum CompositionCompositeMode: i32 { @@ -16132,24 +16132,24 @@ RT_INTERFACE!{interface ICompositionDrawingSurface(ICompositionDrawingSurfaceVtb #[cfg(feature="windows-graphics")] fn get_AlphaMode(&self, out: *mut super::super::graphics::directx::DirectXAlphaMode) -> HRESULT, #[cfg(not(feature="windows-graphics"))] fn __Dummy1(&self) -> (), #[cfg(feature="windows-graphics")] fn get_PixelFormat(&self, out: *mut super::super::graphics::directx::DirectXPixelFormat) -> HRESULT, - fn get_Size(&self, out: *mut super::super::foundation::Size) -> HRESULT + fn get_Size(&self, out: *mut foundation::Size) -> HRESULT }} impl ICompositionDrawingSurface { - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn get_alpha_mode(&self) -> Result { + #[cfg(feature="windows-graphics")] #[inline] pub fn get_alpha_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AlphaMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn get_pixel_format(&self) -> Result { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_pixel_format(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PixelFormat)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_size(&self) -> Result { + }} + #[inline] pub fn get_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Size)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class CompositionDrawingSurface: ICompositionDrawingSurface} DEFINE_IID!(IID_ICompositionDrawingSurface2, 4207995019, 58196, 17640, 142, 61, 196, 136, 13, 90, 33, 63); @@ -16162,31 +16162,31 @@ RT_INTERFACE!{interface ICompositionDrawingSurface2(ICompositionDrawingSurface2V #[cfg(feature="windows-graphics")] fn ScrollRectWithClip(&self, offset: super::super::graphics::PointInt32, clipRect: super::super::graphics::RectInt32, scrollRect: super::super::graphics::RectInt32) -> HRESULT }} impl ICompositionDrawingSurface2 { - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn get_size_int32(&self) -> Result { + #[cfg(feature="windows-graphics")] #[inline] pub fn get_size_int32(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SizeInt32)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn resize(&self, sizePixels: super::super::graphics::SizeInt32) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn resize(&self, sizePixels: super::super::graphics::SizeInt32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Resize)(self as *const _ as *mut _, sizePixels); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn scroll(&self, offset: super::super::graphics::PointInt32) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn scroll(&self, offset: super::super::graphics::PointInt32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Scroll)(self as *const _ as *mut _, offset); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn scroll_rect(&self, offset: super::super::graphics::PointInt32, scrollRect: super::super::graphics::RectInt32) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn scroll_rect(&self, offset: super::super::graphics::PointInt32, scrollRect: super::super::graphics::RectInt32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ScrollRect)(self as *const _ as *mut _, offset, scrollRect); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn scroll_with_clip(&self, offset: super::super::graphics::PointInt32, clipRect: super::super::graphics::RectInt32) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn scroll_with_clip(&self, offset: super::super::graphics::PointInt32, clipRect: super::super::graphics::RectInt32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ScrollWithClip)(self as *const _ as *mut _, offset, clipRect); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn scroll_rect_with_clip(&self, offset: super::super::graphics::PointInt32, clipRect: super::super::graphics::RectInt32, scrollRect: super::super::graphics::RectInt32) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn scroll_rect_with_clip(&self, offset: super::super::graphics::PointInt32, clipRect: super::super::graphics::RectInt32, scrollRect: super::super::graphics::RectInt32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ScrollRectWithClip)(self as *const _ as *mut _, offset, clipRect, scrollRect); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ICompositionDrawingSurfaceFactory, 2492968970, 12589, 18105, 157, 179, 65, 47, 215, 148, 100, 200); RT_INTERFACE!{interface ICompositionDrawingSurfaceFactory(ICompositionDrawingSurfaceFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionDrawingSurfaceFactory] { @@ -16210,39 +16210,39 @@ RT_INTERFACE!{interface ICompositionEffectBrush(ICompositionEffectBrushVtbl): II fn SetSourceParameter(&self, name: HSTRING, source: *mut CompositionBrush) -> HRESULT }} impl ICompositionEffectBrush { - #[inline] pub unsafe fn get_source_parameter(&self, name: &HStringArg) -> Result> { + #[inline] pub fn get_source_parameter(&self, name: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetSourceParameter)(self as *const _ as *mut _, name.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_source_parameter(&self, name: &HStringArg, source: &CompositionBrush) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_source_parameter(&self, name: &HStringArg, source: &CompositionBrush) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetSourceParameter)(self as *const _ as *mut _, name.get(), source as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CompositionEffectBrush: ICompositionEffectBrush} 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(&self, out: *mut *mut CompositionEffectBrush) -> HRESULT, - fn get_ExtendedError(&self, out: *mut super::super::foundation::HResult) -> HRESULT, + fn get_ExtendedError(&self, out: *mut foundation::HResult) -> HRESULT, fn get_LoadStatus(&self, out: *mut CompositionEffectFactoryLoadStatus) -> HRESULT }} impl ICompositionEffectFactory { - #[inline] pub unsafe fn create_brush(&self) -> Result> { + #[inline] pub fn create_brush(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateBrush)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_extended_error(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_extended_error(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendedError)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_load_status(&self) -> Result { + }} + #[inline] pub fn get_load_status(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LoadStatus)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class CompositionEffectFactory: ICompositionEffectFactory} RT_ENUM! { enum CompositionEffectFactoryLoadStatus: i32 { @@ -16253,18 +16253,18 @@ RT_INTERFACE!{interface ICompositionEffectSourceParameter(ICompositionEffectSour fn get_Name(&self, out: *mut HSTRING) -> HRESULT }} impl ICompositionEffectSourceParameter { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class CompositionEffectSourceParameter: ICompositionEffectSourceParameter} impl RtActivatable for CompositionEffectSourceParameter {} impl CompositionEffectSourceParameter { - #[inline] pub fn create(name: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create(name: &HStringArg) -> Result> { >::get_activation_factory().create(name) - }} + } } DEFINE_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]) [CLSID_CompositionEffectSourceParameter]); DEFINE_IID!(IID_ICompositionEffectSourceParameterFactory, 3017405046, 43939, 18212, 172, 243, 208, 57, 116, 100, 219, 28); @@ -16272,124 +16272,124 @@ RT_INTERFACE!{static interface ICompositionEffectSourceParameterFactory(IComposi fn Create(&self, name: HSTRING, out: *mut *mut CompositionEffectSourceParameter) -> HRESULT }} impl ICompositionEffectSourceParameterFactory { - #[inline] pub unsafe fn create(&self, name: &HStringArg) -> Result> { + #[inline] pub fn create(&self, name: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, name.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum CompositionGetValueStatus: i32 { Succeeded (CompositionGetValueStatus_Succeeded) = 0, TypeMismatch (CompositionGetValueStatus_TypeMismatch) = 1, NotFound (CompositionGetValueStatus_NotFound) = 2, }} DEFINE_IID!(IID_ICompositionGradientBrush, 496437728, 65478, 19470, 169, 171, 52, 20, 77, 76, 144, 152); RT_INTERFACE!{interface ICompositionGradientBrush(ICompositionGradientBrushVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionGradientBrush] { - fn get_AnchorPoint(&self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT, - fn put_AnchorPoint(&self, value: super::super::foundation::numerics::Vector2) -> HRESULT, - fn get_CenterPoint(&self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT, - fn put_CenterPoint(&self, value: super::super::foundation::numerics::Vector2) -> HRESULT, + fn get_AnchorPoint(&self, out: *mut foundation::numerics::Vector2) -> HRESULT, + fn put_AnchorPoint(&self, value: foundation::numerics::Vector2) -> HRESULT, + fn get_CenterPoint(&self, out: *mut foundation::numerics::Vector2) -> HRESULT, + fn put_CenterPoint(&self, value: foundation::numerics::Vector2) -> HRESULT, fn get_ColorStops(&self, out: *mut *mut CompositionColorGradientStopCollection) -> HRESULT, fn get_ExtendMode(&self, out: *mut CompositionGradientExtendMode) -> HRESULT, fn put_ExtendMode(&self, value: CompositionGradientExtendMode) -> HRESULT, fn get_InterpolationSpace(&self, out: *mut CompositionColorSpace) -> HRESULT, fn put_InterpolationSpace(&self, value: CompositionColorSpace) -> HRESULT, - fn get_Offset(&self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT, - fn put_Offset(&self, value: super::super::foundation::numerics::Vector2) -> HRESULT, + fn get_Offset(&self, out: *mut foundation::numerics::Vector2) -> HRESULT, + fn put_Offset(&self, value: foundation::numerics::Vector2) -> HRESULT, fn get_RotationAngle(&self, out: *mut f32) -> HRESULT, fn put_RotationAngle(&self, value: f32) -> HRESULT, fn get_RotationAngleInDegrees(&self, out: *mut f32) -> HRESULT, fn put_RotationAngleInDegrees(&self, value: f32) -> HRESULT, - fn get_Scale(&self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT, - fn put_Scale(&self, value: super::super::foundation::numerics::Vector2) -> HRESULT, - fn get_TransformMatrix(&self, out: *mut super::super::foundation::numerics::Matrix3x2) -> HRESULT, - fn put_TransformMatrix(&self, value: super::super::foundation::numerics::Matrix3x2) -> HRESULT + fn get_Scale(&self, out: *mut foundation::numerics::Vector2) -> HRESULT, + fn put_Scale(&self, value: foundation::numerics::Vector2) -> HRESULT, + fn get_TransformMatrix(&self, out: *mut foundation::numerics::Matrix3x2) -> HRESULT, + fn put_TransformMatrix(&self, value: foundation::numerics::Matrix3x2) -> HRESULT }} impl ICompositionGradientBrush { - #[inline] pub unsafe fn get_anchor_point(&self) -> Result { + #[inline] pub fn get_anchor_point(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AnchorPoint)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_anchor_point(&self, value: super::super::foundation::numerics::Vector2) -> Result<()> { + }} + #[inline] pub fn set_anchor_point(&self, value: foundation::numerics::Vector2) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AnchorPoint)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_center_point(&self) -> Result { + }} + #[inline] pub fn get_center_point(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CenterPoint)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_center_point(&self, value: super::super::foundation::numerics::Vector2) -> Result<()> { + }} + #[inline] pub fn set_center_point(&self, value: foundation::numerics::Vector2) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CenterPoint)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_color_stops(&self) -> Result> { + }} + #[inline] pub fn get_color_stops(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ColorStops)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_extend_mode(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_extend_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExtendMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_extend_mode(&self, value: CompositionGradientExtendMode) -> Result<()> { + }} + #[inline] pub fn set_extend_mode(&self, value: CompositionGradientExtendMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ExtendMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_interpolation_space(&self) -> Result { + }} + #[inline] pub fn get_interpolation_space(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InterpolationSpace)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_interpolation_space(&self, value: CompositionColorSpace) -> Result<()> { + }} + #[inline] pub fn set_interpolation_space(&self, value: CompositionColorSpace) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InterpolationSpace)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_offset(&self) -> Result { + }} + #[inline] pub fn get_offset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Offset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_offset(&self, value: super::super::foundation::numerics::Vector2) -> Result<()> { + }} + #[inline] pub fn set_offset(&self, value: foundation::numerics::Vector2) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Offset)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_rotation_angle(&self) -> Result { + }} + #[inline] pub fn get_rotation_angle(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RotationAngle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_rotation_angle(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_rotation_angle(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RotationAngle)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_rotation_angle_in_degrees(&self) -> Result { + }} + #[inline] pub fn get_rotation_angle_in_degrees(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RotationAngleInDegrees)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_rotation_angle_in_degrees(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_rotation_angle_in_degrees(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RotationAngleInDegrees)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_scale(&self) -> Result { + }} + #[inline] pub fn get_scale(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Scale)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_scale(&self, value: super::super::foundation::numerics::Vector2) -> Result<()> { + }} + #[inline] pub fn set_scale(&self, value: foundation::numerics::Vector2) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Scale)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_transform_matrix(&self) -> Result { + }} + #[inline] pub fn get_transform_matrix(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TransformMatrix)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_transform_matrix(&self, value: super::super::foundation::numerics::Matrix3x2) -> Result<()> { + }} + #[inline] pub fn set_transform_matrix(&self, value: foundation::numerics::Matrix3x2) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TransformMatrix)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CompositionGradientBrush: ICompositionGradientBrush} DEFINE_IID!(IID_ICompositionGradientBrushFactory, 1456956887, 61833, 18633, 156, 141, 148, 218, 241, 190, 192, 16); @@ -16402,25 +16402,25 @@ RT_ENUM! { enum CompositionGradientExtendMode: i32 { 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(&self) -> (), - #[cfg(feature="windows-graphics")] fn CreateDrawingSurface(&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(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RenderingDeviceReplaced(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + #[cfg(feature="windows-graphics")] fn CreateDrawingSurface(&self, sizePixels: foundation::Size, pixelFormat: super::super::graphics::directx::DirectXPixelFormat, alphaMode: super::super::graphics::directx::DirectXAlphaMode, out: *mut *mut CompositionDrawingSurface) -> HRESULT, + fn add_RenderingDeviceReplaced(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RenderingDeviceReplaced(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl ICompositionGraphicsDevice { - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn create_drawing_surface(&self, sizePixels: super::super::foundation::Size, pixelFormat: super::super::graphics::directx::DirectXPixelFormat, alphaMode: super::super::graphics::directx::DirectXAlphaMode) -> Result> { + #[cfg(feature="windows-graphics")] #[inline] pub fn create_drawing_surface(&self, sizePixels: foundation::Size, pixelFormat: super::super::graphics::directx::DirectXPixelFormat, alphaMode: super::super::graphics::directx::DirectXAlphaMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDrawingSurface)(self as *const _ as *mut _, sizePixels, pixelFormat, alphaMode, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_rendering_device_replaced(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_rendering_device_replaced(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RenderingDeviceReplaced)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_rendering_device_replaced(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_rendering_device_replaced(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RenderingDeviceReplaced)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CompositionGraphicsDevice: ICompositionGraphicsDevice} DEFINE_IID!(IID_ICompositionGraphicsDevice2, 263765494, 49392, 19404, 159, 184, 8, 73, 130, 73, 13, 125); @@ -16429,27 +16429,27 @@ RT_INTERFACE!{interface ICompositionGraphicsDevice2(ICompositionGraphicsDevice2V #[cfg(feature="windows-graphics")] fn CreateVirtualDrawingSurface(&self, sizePixels: super::super::graphics::SizeInt32, pixelFormat: super::super::graphics::directx::DirectXPixelFormat, alphaMode: super::super::graphics::directx::DirectXAlphaMode, out: *mut *mut CompositionVirtualDrawingSurface) -> HRESULT }} impl ICompositionGraphicsDevice2 { - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn create_drawing_surface2(&self, sizePixels: super::super::graphics::SizeInt32, pixelFormat: super::super::graphics::directx::DirectXPixelFormat, alphaMode: super::super::graphics::directx::DirectXAlphaMode) -> Result> { + #[cfg(feature="windows-graphics")] #[inline] pub fn create_drawing_surface2(&self, sizePixels: super::super::graphics::SizeInt32, pixelFormat: super::super::graphics::directx::DirectXPixelFormat, alphaMode: super::super::graphics::directx::DirectXAlphaMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDrawingSurface2)(self as *const _ as *mut _, sizePixels, pixelFormat, alphaMode, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn create_virtual_drawing_surface(&self, sizePixels: super::super::graphics::SizeInt32, pixelFormat: super::super::graphics::directx::DirectXPixelFormat, alphaMode: super::super::graphics::directx::DirectXAlphaMode) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn create_virtual_drawing_surface(&self, sizePixels: super::super::graphics::SizeInt32, pixelFormat: super::super::graphics::directx::DirectXPixelFormat, alphaMode: super::super::graphics::directx::DirectXAlphaMode) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateVirtualDrawingSurface)(self as *const _ as *mut _, sizePixels, pixelFormat, alphaMode, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut *mut VisualUnorderedCollection) -> HRESULT }} impl ICompositionLight { - #[inline] pub unsafe fn get_targets(&self) -> Result> { + #[inline] pub fn get_targets(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Targets)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class CompositionLight: ICompositionLight} DEFINE_IID!(IID_ICompositionLight2, 2814171762, 62301, 16989, 155, 152, 35, 244, 32, 95, 102, 105); @@ -16457,11 +16457,11 @@ RT_INTERFACE!{interface ICompositionLight2(ICompositionLight2Vtbl): IInspectable fn get_ExclusionsFromTargets(&self, out: *mut *mut VisualUnorderedCollection) -> HRESULT }} impl ICompositionLight2 { - #[inline] pub unsafe fn get_exclusions_from_targets(&self) -> Result> { + #[inline] pub fn get_exclusions_from_targets(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExclusionsFromTargets)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_ICompositionLightFactory, 110949126, 55868, 19268, 131, 138, 94, 3, 213, 26, 206, 85); RT_INTERFACE!{interface ICompositionLightFactory(ICompositionLightFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionLightFactory] { @@ -16469,30 +16469,30 @@ RT_INTERFACE!{interface ICompositionLightFactory(ICompositionLightFactoryVtbl): }} DEFINE_IID!(IID_ICompositionLinearGradientBrush, 2554053913, 43483, 16700, 162, 216, 42, 144, 86, 252, 82, 94); RT_INTERFACE!{interface ICompositionLinearGradientBrush(ICompositionLinearGradientBrushVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionLinearGradientBrush] { - fn get_EndPoint(&self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT, - fn put_EndPoint(&self, value: super::super::foundation::numerics::Vector2) -> HRESULT, - fn get_StartPoint(&self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT, - fn put_StartPoint(&self, value: super::super::foundation::numerics::Vector2) -> HRESULT + fn get_EndPoint(&self, out: *mut foundation::numerics::Vector2) -> HRESULT, + fn put_EndPoint(&self, value: foundation::numerics::Vector2) -> HRESULT, + fn get_StartPoint(&self, out: *mut foundation::numerics::Vector2) -> HRESULT, + fn put_StartPoint(&self, value: foundation::numerics::Vector2) -> HRESULT }} impl ICompositionLinearGradientBrush { - #[inline] pub unsafe fn get_end_point(&self) -> Result { + #[inline] pub fn get_end_point(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EndPoint)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_end_point(&self, value: super::super::foundation::numerics::Vector2) -> Result<()> { + }} + #[inline] pub fn set_end_point(&self, value: foundation::numerics::Vector2) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_EndPoint)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_start_point(&self) -> Result { + }} + #[inline] pub fn get_start_point(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StartPoint)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_start_point(&self, value: super::super::foundation::numerics::Vector2) -> Result<()> { + }} + #[inline] pub fn set_start_point(&self, value: foundation::numerics::Vector2) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StartPoint)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CompositionLinearGradientBrush: ICompositionLinearGradientBrush} DEFINE_IID!(IID_ICompositionMaskBrush, 1378676894, 48747, 20289, 190, 73, 249, 34, 109, 71, 27, 74); @@ -16503,24 +16503,24 @@ RT_INTERFACE!{interface ICompositionMaskBrush(ICompositionMaskBrushVtbl): IInspe fn put_Source(&self, value: *mut CompositionBrush) -> HRESULT }} impl ICompositionMaskBrush { - #[inline] pub unsafe fn get_mask(&self) -> Result> { + #[inline] pub fn get_mask(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Mask)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_mask(&self, value: &CompositionBrush) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_mask(&self, value: &CompositionBrush) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Mask)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_source(&self) -> Result> { + }} + #[inline] pub fn get_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Source)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_source(&self, value: &CompositionBrush) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_source(&self, value: &CompositionBrush) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Source)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CompositionMaskBrush: ICompositionMaskBrush} DEFINE_IID!(IID_ICompositionNineGridBrush, 4065416420, 48268, 19431, 184, 15, 134, 133, 184, 60, 1, 134); @@ -16551,112 +16551,112 @@ RT_INTERFACE!{interface ICompositionNineGridBrush(ICompositionNineGridBrushVtbl) fn SetInsetScalesWithValues(&self, left: f32, top: f32, right: f32, bottom: f32) -> HRESULT }} impl ICompositionNineGridBrush { - #[inline] pub unsafe fn get_bottom_inset(&self) -> Result { + #[inline] pub fn get_bottom_inset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BottomInset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_bottom_inset(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_bottom_inset(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BottomInset)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_bottom_inset_scale(&self) -> Result { + }} + #[inline] pub fn get_bottom_inset_scale(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BottomInsetScale)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_bottom_inset_scale(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_bottom_inset_scale(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BottomInsetScale)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_center_hollow(&self) -> Result { + }} + #[inline] pub fn get_is_center_hollow(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCenterHollow)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_center_hollow(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_center_hollow(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsCenterHollow)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_left_inset(&self) -> Result { + }} + #[inline] pub fn get_left_inset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LeftInset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_left_inset(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_left_inset(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LeftInset)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_left_inset_scale(&self) -> Result { + }} + #[inline] pub fn get_left_inset_scale(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LeftInsetScale)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_left_inset_scale(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_left_inset_scale(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LeftInsetScale)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_right_inset(&self) -> Result { + }} + #[inline] pub fn get_right_inset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RightInset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_right_inset(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_right_inset(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RightInset)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_right_inset_scale(&self) -> Result { + }} + #[inline] pub fn get_right_inset_scale(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RightInsetScale)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_right_inset_scale(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_right_inset_scale(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RightInsetScale)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_source(&self) -> Result> { + }} + #[inline] pub fn get_source(&self) -> Result>> { unsafe { let mut out = null_mut(); - let hr = ((*self.lpVtbl).get_Source)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_source(&self, value: &CompositionBrush) -> Result<()> { + let hr = ((*self.lpVtbl).get_Source)(self as *const _ as *mut _, &mut out); + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_source(&self, value: &CompositionBrush) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Source)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_top_inset(&self) -> Result { + }} + #[inline] pub fn get_top_inset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TopInset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_top_inset(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_top_inset(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TopInset)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_top_inset_scale(&self) -> Result { + }} + #[inline] pub fn get_top_inset_scale(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TopInsetScale)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_top_inset_scale(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_top_inset_scale(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TopInsetScale)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_insets(&self, inset: f32) -> Result<()> { + }} + #[inline] pub fn set_insets(&self, inset: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetInsets)(self as *const _ as *mut _, inset); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_insets_with_values(&self, left: f32, top: f32, right: f32, bottom: f32) -> Result<()> { + }} + #[inline] pub fn set_insets_with_values(&self, left: f32, top: f32, right: f32, bottom: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetInsetsWithValues)(self as *const _ as *mut _, left, top, right, bottom); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_inset_scales(&self, scale: f32) -> Result<()> { + }} + #[inline] pub fn set_inset_scales(&self, scale: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetInsetScales)(self as *const _ as *mut _, scale); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_inset_scales_with_values(&self, left: f32, top: f32, right: f32, bottom: f32) -> Result<()> { + }} + #[inline] pub fn set_inset_scales_with_values(&self, left: f32, top: f32, right: f32, bottom: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetInsetScalesWithValues)(self as *const _ as *mut _, left, top, right, bottom); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CompositionNineGridBrush: ICompositionNineGridBrush} DEFINE_IID!(IID_ICompositionObject, 3165957445, 30217, 17744, 147, 79, 22, 0, 42, 104, 253, 237); @@ -16668,29 +16668,29 @@ RT_INTERFACE!{interface ICompositionObject(ICompositionObjectVtbl): IInspectable fn StopAnimation(&self, propertyName: HSTRING) -> HRESULT }} impl ICompositionObject { - #[inline] pub unsafe fn get_compositor(&self) -> Result> { + #[inline] pub fn get_compositor(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Compositor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_dispatcher(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_dispatcher(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Dispatcher)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_properties(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_properties(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Properties)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn start_animation(&self, propertyName: &HStringArg, animation: &CompositionAnimation) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn start_animation(&self, propertyName: &HStringArg, animation: &CompositionAnimation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StartAnimation)(self as *const _ as *mut _, propertyName.get(), animation as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop_animation(&self, propertyName: &HStringArg) -> Result<()> { + }} + #[inline] pub fn stop_animation(&self, propertyName: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StopAnimation)(self as *const _ as *mut _, propertyName.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CompositionObject: ICompositionObject} DEFINE_IID!(IID_ICompositionObject2, 4018622113, 23807, 19304, 158, 48, 161, 81, 157, 8, 186, 3); @@ -16703,43 +16703,43 @@ RT_INTERFACE!{interface ICompositionObject2(ICompositionObject2Vtbl): IInspectab fn StopAnimationGroup(&self, value: *mut ICompositionAnimationBase) -> HRESULT }} impl ICompositionObject2 { - #[inline] pub unsafe fn get_comment(&self) -> Result { + #[inline] pub fn get_comment(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Comment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_comment(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_comment(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Comment)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_implicit_animations(&self) -> Result> { + }} + #[inline] pub fn get_implicit_animations(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ImplicitAnimations)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_implicit_animations(&self, value: &ImplicitAnimationCollection) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_implicit_animations(&self, value: &ImplicitAnimationCollection) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ImplicitAnimations)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start_animation_group(&self, value: &ICompositionAnimationBase) -> Result<()> { + }} + #[inline] pub fn start_animation_group(&self, value: &ICompositionAnimationBase) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StartAnimationGroup)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop_animation_group(&self, value: &ICompositionAnimationBase) -> Result<()> { + }} + #[inline] pub fn stop_animation_group(&self, value: &ICompositionAnimationBase) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StopAnimationGroup)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ICompositionObject3, 1271036197, 56013, 19698, 152, 177, 152, 107, 118, 231, 235, 230); RT_INTERFACE!{interface ICompositionObject3(ICompositionObject3Vtbl): IInspectable(IInspectableVtbl) [IID_ICompositionObject3] { #[cfg(feature="windows-system")] fn get_DispatcherQueue(&self, out: *mut *mut super::super::system::DispatcherQueue) -> HRESULT }} impl ICompositionObject3 { - #[cfg(feature="windows-system")] #[inline] pub unsafe fn get_dispatcher_queue(&self) -> Result> { + #[cfg(feature="windows-system")] #[inline] pub fn get_dispatcher_queue(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DispatcherQueue)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_ICompositionObjectFactory, 1361075294, 21898, 20266, 141, 57, 55, 191, 225, 226, 13, 221); RT_INTERFACE!{interface ICompositionObjectFactory(ICompositionObjectFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionObjectFactory] { @@ -16748,95 +16748,95 @@ RT_INTERFACE!{interface ICompositionObjectFactory(ICompositionObjectFactoryVtbl) 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(&self, propertyName: HSTRING, value: super::Color) -> HRESULT, - fn InsertMatrix3x2(&self, propertyName: HSTRING, value: super::super::foundation::numerics::Matrix3x2) -> HRESULT, - fn InsertMatrix4x4(&self, propertyName: HSTRING, value: super::super::foundation::numerics::Matrix4x4) -> HRESULT, - fn InsertQuaternion(&self, propertyName: HSTRING, value: super::super::foundation::numerics::Quaternion) -> HRESULT, + fn InsertMatrix3x2(&self, propertyName: HSTRING, value: foundation::numerics::Matrix3x2) -> HRESULT, + fn InsertMatrix4x4(&self, propertyName: HSTRING, value: foundation::numerics::Matrix4x4) -> HRESULT, + fn InsertQuaternion(&self, propertyName: HSTRING, value: foundation::numerics::Quaternion) -> HRESULT, fn InsertScalar(&self, propertyName: HSTRING, value: f32) -> HRESULT, - fn InsertVector2(&self, propertyName: HSTRING, value: super::super::foundation::numerics::Vector2) -> HRESULT, - fn InsertVector3(&self, propertyName: HSTRING, value: super::super::foundation::numerics::Vector3) -> HRESULT, - fn InsertVector4(&self, propertyName: HSTRING, value: super::super::foundation::numerics::Vector4) -> HRESULT, + fn InsertVector2(&self, propertyName: HSTRING, value: foundation::numerics::Vector2) -> HRESULT, + fn InsertVector3(&self, propertyName: HSTRING, value: foundation::numerics::Vector3) -> HRESULT, + fn InsertVector4(&self, propertyName: HSTRING, value: foundation::numerics::Vector4) -> HRESULT, fn TryGetColor(&self, propertyName: HSTRING, value: *mut super::Color, out: *mut CompositionGetValueStatus) -> HRESULT, - fn TryGetMatrix3x2(&self, propertyName: HSTRING, value: *mut super::super::foundation::numerics::Matrix3x2, out: *mut CompositionGetValueStatus) -> HRESULT, - fn TryGetMatrix4x4(&self, propertyName: HSTRING, value: *mut super::super::foundation::numerics::Matrix4x4, out: *mut CompositionGetValueStatus) -> HRESULT, - fn TryGetQuaternion(&self, propertyName: HSTRING, value: *mut super::super::foundation::numerics::Quaternion, out: *mut CompositionGetValueStatus) -> HRESULT, + fn TryGetMatrix3x2(&self, propertyName: HSTRING, value: *mut foundation::numerics::Matrix3x2, out: *mut CompositionGetValueStatus) -> HRESULT, + fn TryGetMatrix4x4(&self, propertyName: HSTRING, value: *mut foundation::numerics::Matrix4x4, out: *mut CompositionGetValueStatus) -> HRESULT, + fn TryGetQuaternion(&self, propertyName: HSTRING, value: *mut foundation::numerics::Quaternion, out: *mut CompositionGetValueStatus) -> HRESULT, fn TryGetScalar(&self, propertyName: HSTRING, value: *mut f32, out: *mut CompositionGetValueStatus) -> HRESULT, - fn TryGetVector2(&self, propertyName: HSTRING, value: *mut super::super::foundation::numerics::Vector2, out: *mut CompositionGetValueStatus) -> HRESULT, - fn TryGetVector3(&self, propertyName: HSTRING, value: *mut super::super::foundation::numerics::Vector3, out: *mut CompositionGetValueStatus) -> HRESULT, - fn TryGetVector4(&self, propertyName: HSTRING, value: *mut super::super::foundation::numerics::Vector4, out: *mut CompositionGetValueStatus) -> HRESULT + fn TryGetVector2(&self, propertyName: HSTRING, value: *mut foundation::numerics::Vector2, out: *mut CompositionGetValueStatus) -> HRESULT, + fn TryGetVector3(&self, propertyName: HSTRING, value: *mut foundation::numerics::Vector3, out: *mut CompositionGetValueStatus) -> HRESULT, + fn TryGetVector4(&self, propertyName: HSTRING, value: *mut foundation::numerics::Vector4, out: *mut CompositionGetValueStatus) -> HRESULT }} impl ICompositionPropertySet { - #[inline] pub unsafe fn insert_color(&self, propertyName: &HStringArg, value: super::Color) -> Result<()> { + #[inline] pub fn insert_color(&self, propertyName: &HStringArg, value: super::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InsertColor)(self as *const _ as *mut _, propertyName.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn insert_matrix3x2(&self, propertyName: &HStringArg, value: super::super::foundation::numerics::Matrix3x2) -> Result<()> { + }} + #[inline] pub fn insert_matrix3x2(&self, propertyName: &HStringArg, value: foundation::numerics::Matrix3x2) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InsertMatrix3x2)(self as *const _ as *mut _, propertyName.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn insert_matrix4x4(&self, propertyName: &HStringArg, value: super::super::foundation::numerics::Matrix4x4) -> Result<()> { + }} + #[inline] pub fn insert_matrix4x4(&self, propertyName: &HStringArg, value: foundation::numerics::Matrix4x4) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InsertMatrix4x4)(self as *const _ as *mut _, propertyName.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn insert_quaternion(&self, propertyName: &HStringArg, value: super::super::foundation::numerics::Quaternion) -> Result<()> { + }} + #[inline] pub fn insert_quaternion(&self, propertyName: &HStringArg, value: foundation::numerics::Quaternion) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InsertQuaternion)(self as *const _ as *mut _, propertyName.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn insert_scalar(&self, propertyName: &HStringArg, value: f32) -> Result<()> { + }} + #[inline] pub fn insert_scalar(&self, propertyName: &HStringArg, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InsertScalar)(self as *const _ as *mut _, propertyName.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn insert_vector2(&self, propertyName: &HStringArg, value: super::super::foundation::numerics::Vector2) -> Result<()> { + }} + #[inline] pub fn insert_vector2(&self, propertyName: &HStringArg, value: foundation::numerics::Vector2) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InsertVector2)(self as *const _ as *mut _, propertyName.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn insert_vector3(&self, propertyName: &HStringArg, value: super::super::foundation::numerics::Vector3) -> Result<()> { + }} + #[inline] pub fn insert_vector3(&self, propertyName: &HStringArg, value: foundation::numerics::Vector3) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InsertVector3)(self as *const _ as *mut _, propertyName.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn insert_vector4(&self, propertyName: &HStringArg, value: super::super::foundation::numerics::Vector4) -> Result<()> { + }} + #[inline] pub fn insert_vector4(&self, propertyName: &HStringArg, value: foundation::numerics::Vector4) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InsertVector4)(self as *const _ as *mut _, propertyName.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn try_get_color(&self, propertyName: &HStringArg) -> Result<(super::Color, CompositionGetValueStatus)> { + }} + #[inline] pub fn try_get_color(&self, propertyName: &HStringArg) -> Result<(super::Color, CompositionGetValueStatus)> { unsafe { let mut value = zeroed(); let mut out = zeroed(); let hr = ((*self.lpVtbl).TryGetColor)(self as *const _ as *mut _, propertyName.get(), &mut value, &mut out); if hr == S_OK { Ok((value, out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_get_matrix3x2(&self, propertyName: &HStringArg) -> Result<(super::super::foundation::numerics::Matrix3x2, CompositionGetValueStatus)> { + }} + #[inline] pub fn try_get_matrix3x2(&self, propertyName: &HStringArg) -> Result<(foundation::numerics::Matrix3x2, CompositionGetValueStatus)> { unsafe { let mut value = zeroed(); let mut out = zeroed(); let hr = ((*self.lpVtbl).TryGetMatrix3x2)(self as *const _ as *mut _, propertyName.get(), &mut value, &mut out); if hr == S_OK { Ok((value, out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_get_matrix4x4(&self, propertyName: &HStringArg) -> Result<(super::super::foundation::numerics::Matrix4x4, CompositionGetValueStatus)> { + }} + #[inline] pub fn try_get_matrix4x4(&self, propertyName: &HStringArg) -> Result<(foundation::numerics::Matrix4x4, CompositionGetValueStatus)> { unsafe { let mut value = zeroed(); let mut out = zeroed(); let hr = ((*self.lpVtbl).TryGetMatrix4x4)(self as *const _ as *mut _, propertyName.get(), &mut value, &mut out); if hr == S_OK { Ok((value, out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_get_quaternion(&self, propertyName: &HStringArg) -> Result<(super::super::foundation::numerics::Quaternion, CompositionGetValueStatus)> { + }} + #[inline] pub fn try_get_quaternion(&self, propertyName: &HStringArg) -> Result<(foundation::numerics::Quaternion, CompositionGetValueStatus)> { unsafe { let mut value = zeroed(); let mut out = zeroed(); let hr = ((*self.lpVtbl).TryGetQuaternion)(self as *const _ as *mut _, propertyName.get(), &mut value, &mut out); if hr == S_OK { Ok((value, out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_get_scalar(&self, propertyName: &HStringArg) -> Result<(f32, CompositionGetValueStatus)> { + }} + #[inline] pub fn try_get_scalar(&self, propertyName: &HStringArg) -> Result<(f32, CompositionGetValueStatus)> { unsafe { let mut value = zeroed(); let mut out = zeroed(); let hr = ((*self.lpVtbl).TryGetScalar)(self as *const _ as *mut _, propertyName.get(), &mut value, &mut out); if hr == S_OK { Ok((value, out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_get_vector2(&self, propertyName: &HStringArg) -> Result<(super::super::foundation::numerics::Vector2, CompositionGetValueStatus)> { + }} + #[inline] pub fn try_get_vector2(&self, propertyName: &HStringArg) -> Result<(foundation::numerics::Vector2, CompositionGetValueStatus)> { unsafe { let mut value = zeroed(); let mut out = zeroed(); let hr = ((*self.lpVtbl).TryGetVector2)(self as *const _ as *mut _, propertyName.get(), &mut value, &mut out); if hr == S_OK { Ok((value, out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_get_vector3(&self, propertyName: &HStringArg) -> Result<(super::super::foundation::numerics::Vector3, CompositionGetValueStatus)> { + }} + #[inline] pub fn try_get_vector3(&self, propertyName: &HStringArg) -> Result<(foundation::numerics::Vector3, CompositionGetValueStatus)> { unsafe { let mut value = zeroed(); let mut out = zeroed(); let hr = ((*self.lpVtbl).TryGetVector3)(self as *const _ as *mut _, propertyName.get(), &mut value, &mut out); if hr == S_OK { Ok((value, out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_get_vector4(&self, propertyName: &HStringArg) -> Result<(super::super::foundation::numerics::Vector4, CompositionGetValueStatus)> { + }} + #[inline] pub fn try_get_vector4(&self, propertyName: &HStringArg) -> Result<(foundation::numerics::Vector4, CompositionGetValueStatus)> { unsafe { let mut value = zeroed(); let mut out = zeroed(); let hr = ((*self.lpVtbl).TryGetVector4)(self as *const _ as *mut _, propertyName.get(), &mut value, &mut out); if hr == S_OK { Ok((value, out)) } else { err(hr) } - } + }} } RT_CLASS!{class CompositionPropertySet: ICompositionPropertySet} DEFINE_IID!(IID_ICompositionPropertySet2, 3732960030, 41489, 17493, 136, 128, 125, 15, 63, 106, 68, 253); @@ -16845,15 +16845,15 @@ RT_INTERFACE!{interface ICompositionPropertySet2(ICompositionPropertySet2Vtbl): fn TryGetBoolean(&self, propertyName: HSTRING, value: *mut bool, out: *mut CompositionGetValueStatus) -> HRESULT }} impl ICompositionPropertySet2 { - #[inline] pub unsafe fn insert_boolean(&self, propertyName: &HStringArg, value: bool) -> Result<()> { + #[inline] pub fn insert_boolean(&self, propertyName: &HStringArg, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InsertBoolean)(self as *const _ as *mut _, propertyName.get(), value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn try_get_boolean(&self, propertyName: &HStringArg) -> Result<(bool, CompositionGetValueStatus)> { + }} + #[inline] pub fn try_get_boolean(&self, propertyName: &HStringArg) -> Result<(bool, CompositionGetValueStatus)> { unsafe { let mut value = zeroed(); let mut out = zeroed(); let hr = ((*self.lpVtbl).TryGetBoolean)(self as *const _ as *mut _, propertyName.get(), &mut value, &mut out); if hr == S_OK { Ok((value, out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ICompositionScopedBatch, 218159824, 64263, 18173, 140, 114, 98, 128, 209, 163, 209, 221); RT_INTERFACE!{interface ICompositionScopedBatch(ICompositionScopedBatchVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionScopedBatch] { @@ -16862,41 +16862,41 @@ RT_INTERFACE!{interface ICompositionScopedBatch(ICompositionScopedBatchVtbl): II fn End(&self) -> HRESULT, fn Resume(&self) -> HRESULT, fn Suspend(&self) -> HRESULT, - fn add_Completed(&self, handler: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Completed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_Completed(&self, handler: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Completed(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl ICompositionScopedBatch { - #[inline] pub unsafe fn get_is_active(&self) -> Result { + #[inline] pub fn get_is_active(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsActive)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_ended(&self) -> Result { + }} + #[inline] pub fn get_is_ended(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsEnded)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn end(&self) -> Result<()> { + }} + #[inline] pub fn end(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).End)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn resume(&self) -> Result<()> { + }} + #[inline] pub fn resume(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Resume)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn suspend(&self) -> Result<()> { + }} + #[inline] pub fn suspend(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Suspend)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_completed(&self, handler: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_completed(&self, handler: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Completed)(self as *const _ as *mut _, handler as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_completed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Completed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CompositionScopedBatch: ICompositionScopedBatch} DEFINE_IID!(IID_ICompositionShadow, 849236706, 17205, 18892, 177, 74, 55, 120, 45, 16, 240, 196); @@ -16929,134 +16929,134 @@ RT_INTERFACE!{interface ICompositionSurfaceBrush(ICompositionSurfaceBrushVtbl): fn put_VerticalAlignmentRatio(&self, value: f32) -> HRESULT }} impl ICompositionSurfaceBrush { - #[inline] pub unsafe fn get_bitmap_interpolation_mode(&self) -> Result { + #[inline] pub fn get_bitmap_interpolation_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BitmapInterpolationMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_bitmap_interpolation_mode(&self, value: CompositionBitmapInterpolationMode) -> Result<()> { + }} + #[inline] pub fn set_bitmap_interpolation_mode(&self, value: CompositionBitmapInterpolationMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BitmapInterpolationMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_horizontal_alignment_ratio(&self) -> Result { + }} + #[inline] pub fn get_horizontal_alignment_ratio(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HorizontalAlignmentRatio)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_horizontal_alignment_ratio(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_horizontal_alignment_ratio(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_HorizontalAlignmentRatio)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_stretch(&self) -> Result { + }} + #[inline] pub fn get_stretch(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Stretch)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_stretch(&self, value: CompositionStretch) -> Result<()> { + }} + #[inline] pub fn set_stretch(&self, value: CompositionStretch) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Stretch)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_surface(&self) -> Result> { + }} + #[inline] pub fn get_surface(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Surface)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_surface(&self, value: &ICompositionSurface) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_surface(&self, value: &ICompositionSurface) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Surface)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_vertical_alignment_ratio(&self) -> Result { + }} + #[inline] pub fn get_vertical_alignment_ratio(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VerticalAlignmentRatio)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_vertical_alignment_ratio(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_vertical_alignment_ratio(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_VerticalAlignmentRatio)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CompositionSurfaceBrush: ICompositionSurfaceBrush} 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(&self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT, - fn put_AnchorPoint(&self, value: super::super::foundation::numerics::Vector2) -> HRESULT, - fn get_CenterPoint(&self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT, - fn put_CenterPoint(&self, value: super::super::foundation::numerics::Vector2) -> HRESULT, - fn get_Offset(&self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT, - fn put_Offset(&self, value: super::super::foundation::numerics::Vector2) -> HRESULT, + fn get_AnchorPoint(&self, out: *mut foundation::numerics::Vector2) -> HRESULT, + fn put_AnchorPoint(&self, value: foundation::numerics::Vector2) -> HRESULT, + fn get_CenterPoint(&self, out: *mut foundation::numerics::Vector2) -> HRESULT, + fn put_CenterPoint(&self, value: foundation::numerics::Vector2) -> HRESULT, + fn get_Offset(&self, out: *mut foundation::numerics::Vector2) -> HRESULT, + fn put_Offset(&self, value: foundation::numerics::Vector2) -> HRESULT, fn get_RotationAngle(&self, out: *mut f32) -> HRESULT, fn put_RotationAngle(&self, value: f32) -> HRESULT, fn get_RotationAngleInDegrees(&self, out: *mut f32) -> HRESULT, fn put_RotationAngleInDegrees(&self, value: f32) -> HRESULT, - fn get_Scale(&self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT, - fn put_Scale(&self, value: super::super::foundation::numerics::Vector2) -> HRESULT, - fn get_TransformMatrix(&self, out: *mut super::super::foundation::numerics::Matrix3x2) -> HRESULT, - fn put_TransformMatrix(&self, value: super::super::foundation::numerics::Matrix3x2) -> HRESULT + fn get_Scale(&self, out: *mut foundation::numerics::Vector2) -> HRESULT, + fn put_Scale(&self, value: foundation::numerics::Vector2) -> HRESULT, + fn get_TransformMatrix(&self, out: *mut foundation::numerics::Matrix3x2) -> HRESULT, + fn put_TransformMatrix(&self, value: foundation::numerics::Matrix3x2) -> HRESULT }} impl ICompositionSurfaceBrush2 { - #[inline] pub unsafe fn get_anchor_point(&self) -> Result { + #[inline] pub fn get_anchor_point(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AnchorPoint)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_anchor_point(&self, value: super::super::foundation::numerics::Vector2) -> Result<()> { + }} + #[inline] pub fn set_anchor_point(&self, value: foundation::numerics::Vector2) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AnchorPoint)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_center_point(&self) -> Result { + }} + #[inline] pub fn get_center_point(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CenterPoint)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_center_point(&self, value: super::super::foundation::numerics::Vector2) -> Result<()> { + }} + #[inline] pub fn set_center_point(&self, value: foundation::numerics::Vector2) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CenterPoint)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_offset(&self) -> Result { + }} + #[inline] pub fn get_offset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Offset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_offset(&self, value: super::super::foundation::numerics::Vector2) -> Result<()> { + }} + #[inline] pub fn set_offset(&self, value: foundation::numerics::Vector2) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Offset)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_rotation_angle(&self) -> Result { + }} + #[inline] pub fn get_rotation_angle(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RotationAngle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_rotation_angle(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_rotation_angle(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RotationAngle)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_rotation_angle_in_degrees(&self) -> Result { + }} + #[inline] pub fn get_rotation_angle_in_degrees(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RotationAngleInDegrees)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_rotation_angle_in_degrees(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_rotation_angle_in_degrees(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RotationAngleInDegrees)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_scale(&self) -> Result { + }} + #[inline] pub fn get_scale(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Scale)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_scale(&self, value: super::super::foundation::numerics::Vector2) -> Result<()> { + }} + #[inline] pub fn set_scale(&self, value: foundation::numerics::Vector2) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Scale)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_transform_matrix(&self) -> Result { + }} + #[inline] pub fn get_transform_matrix(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TransformMatrix)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_transform_matrix(&self, value: super::super::foundation::numerics::Matrix3x2) -> Result<()> { + }} + #[inline] pub fn set_transform_matrix(&self, value: foundation::numerics::Matrix3x2) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TransformMatrix)(self as *const _ as *mut _, 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] { @@ -17064,15 +17064,15 @@ RT_INTERFACE!{interface ICompositionTarget(ICompositionTargetVtbl): IInspectable fn put_Root(&self, value: *mut Visual) -> HRESULT }} impl ICompositionTarget { - #[inline] pub unsafe fn get_root(&self) -> Result> { + #[inline] pub fn get_root(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Root)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_root(&self, value: &Visual) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_root(&self, value: &Visual) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Root)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CompositionTarget: ICompositionTarget} DEFINE_IID!(IID_ICompositionTargetFactory, 2479725867, 34070, 19220, 168, 206, 244, 158, 33, 25, 236, 66); @@ -17084,10 +17084,10 @@ RT_INTERFACE!{interface ICompositionVirtualDrawingSurface(ICompositionVirtualDra #[cfg(feature="windows-graphics")] fn Trim(&self, rectsSize: u32, rects: *mut super::super::graphics::RectInt32) -> HRESULT }} impl ICompositionVirtualDrawingSurface { - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn trim(&self, rects: &[super::super::graphics::RectInt32]) -> Result<()> { + #[cfg(feature="windows-graphics")] #[inline] pub fn trim(&self, rects: &[super::super::graphics::RectInt32]) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Trim)(self as *const _ as *mut _, rects.len() as u32, rects.as_ptr() as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CompositionVirtualDrawingSurface: ICompositionVirtualDrawingSurface} DEFINE_IID!(IID_ICompositionVirtualDrawingSurfaceFactory, 1734742124, 54635, 19017, 177, 223, 80, 118, 160, 98, 7, 104); @@ -17100,11 +17100,11 @@ RT_INTERFACE!{interface ICompositor(ICompositorVtbl): IInspectable(IInspectableV fn CreateColorBrush(&self, out: *mut *mut CompositionColorBrush) -> HRESULT, fn CreateColorBrushWithColor(&self, color: super::Color, out: *mut *mut CompositionColorBrush) -> HRESULT, fn CreateContainerVisual(&self, out: *mut *mut ContainerVisual) -> HRESULT, - fn CreateCubicBezierEasingFunction(&self, controlPoint1: super::super::foundation::numerics::Vector2, controlPoint2: super::super::foundation::numerics::Vector2, out: *mut *mut CubicBezierEasingFunction) -> HRESULT, + fn CreateCubicBezierEasingFunction(&self, controlPoint1: foundation::numerics::Vector2, controlPoint2: foundation::numerics::Vector2, out: *mut *mut CubicBezierEasingFunction) -> HRESULT, #[cfg(not(feature="windows-graphics"))] fn __Dummy5(&self) -> (), #[cfg(feature="windows-graphics")] fn CreateEffectFactory(&self, graphicsEffect: *mut super::super::graphics::effects::IGraphicsEffect, out: *mut *mut CompositionEffectFactory) -> HRESULT, #[cfg(not(feature="windows-graphics"))] fn __Dummy6(&self) -> (), - #[cfg(feature="windows-graphics")] fn CreateEffectFactoryWithProperties(&self, graphicsEffect: *mut super::super::graphics::effects::IGraphicsEffect, animatableProperties: *mut super::super::foundation::collections::IIterable, out: *mut *mut CompositionEffectFactory) -> HRESULT, + #[cfg(feature="windows-graphics")] fn CreateEffectFactoryWithProperties(&self, graphicsEffect: *mut super::super::graphics::effects::IGraphicsEffect, animatableProperties: *mut foundation::collections::IIterable, out: *mut *mut CompositionEffectFactory) -> HRESULT, fn CreateExpressionAnimation(&self, out: *mut *mut ExpressionAnimation) -> HRESULT, fn CreateExpressionAnimationWithExpression(&self, expression: HSTRING, out: *mut *mut ExpressionAnimation) -> HRESULT, fn CreateInsetClip(&self, out: *mut *mut InsetClip) -> HRESULT, @@ -17124,126 +17124,126 @@ RT_INTERFACE!{interface ICompositor(ICompositorVtbl): IInspectable(IInspectableV fn GetCommitBatch(&self, batchType: CompositionBatchTypes, out: *mut *mut CompositionCommitBatch) -> HRESULT }} impl ICompositor { - #[inline] pub unsafe fn create_color_key_frame_animation(&self) -> Result> { + #[inline] pub fn create_color_key_frame_animation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateColorKeyFrameAnimation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_color_brush(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_color_brush(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateColorBrush)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_color_brush_with_color(&self, color: super::Color) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_color_brush_with_color(&self, color: super::Color) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateColorBrushWithColor)(self as *const _ as *mut _, color, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_container_visual(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_container_visual(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateContainerVisual)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_cubic_bezier_easing_function(&self, controlPoint1: super::super::foundation::numerics::Vector2, controlPoint2: super::super::foundation::numerics::Vector2) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_cubic_bezier_easing_function(&self, controlPoint1: foundation::numerics::Vector2, controlPoint2: foundation::numerics::Vector2) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateCubicBezierEasingFunction)(self as *const _ as *mut _, 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(&self, graphicsEffect: &super::super::graphics::effects::IGraphicsEffect) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn create_effect_factory(&self, graphicsEffect: &super::super::graphics::effects::IGraphicsEffect) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateEffectFactory)(self as *const _ as *mut _, 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(&self, graphicsEffect: &super::super::graphics::effects::IGraphicsEffect, animatableProperties: &super::super::foundation::collections::IIterable) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn create_effect_factory_with_properties(&self, graphicsEffect: &super::super::graphics::effects::IGraphicsEffect, animatableProperties: &foundation::collections::IIterable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateEffectFactoryWithProperties)(self as *const _ as *mut _, 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(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_expression_animation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateExpressionAnimation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_expression_animation_with_expression(&self, expression: &HStringArg) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_expression_animation_with_expression(&self, expression: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateExpressionAnimationWithExpression)(self as *const _ as *mut _, expression.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_inset_clip(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_inset_clip(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInsetClip)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_inset_clip_with_insets(&self, leftInset: f32, topInset: f32, rightInset: f32, bottomInset: f32) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_inset_clip_with_insets(&self, leftInset: f32, topInset: f32, rightInset: f32, bottomInset: f32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInsetClipWithInsets)(self as *const _ as *mut _, 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(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_linear_easing_function(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateLinearEasingFunction)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_property_set(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_property_set(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreatePropertySet)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_quaternion_key_frame_animation(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_quaternion_key_frame_animation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateQuaternionKeyFrameAnimation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_scalar_key_frame_animation(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_scalar_key_frame_animation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateScalarKeyFrameAnimation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_scoped_batch(&self, batchType: CompositionBatchTypes) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_scoped_batch(&self, batchType: CompositionBatchTypes) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateScopedBatch)(self as *const _ as *mut _, batchType, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_sprite_visual(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_sprite_visual(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateSpriteVisual)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_surface_brush(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_surface_brush(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateSurfaceBrush)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_surface_brush_with_surface(&self, surface: &ICompositionSurface) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_surface_brush_with_surface(&self, surface: &ICompositionSurface) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateSurfaceBrushWithSurface)(self as *const _ as *mut _, 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(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_target_for_current_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateTargetForCurrentView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_vector2_key_frame_animation(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_vector2_key_frame_animation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateVector2KeyFrameAnimation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_vector3_key_frame_animation(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_vector3_key_frame_animation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateVector3KeyFrameAnimation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_vector4_key_frame_animation(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_vector4_key_frame_animation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateVector4KeyFrameAnimation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_commit_batch(&self, batchType: CompositionBatchTypes) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_commit_batch(&self, batchType: CompositionBatchTypes) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCommitBatch)(self as *const _ as *mut _, batchType, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class Compositor: ICompositor} impl RtActivatable for Compositor {} @@ -17265,82 +17265,82 @@ RT_INTERFACE!{interface ICompositor2(ICompositor2Vtbl): IInspectable(IInspectabl fn CreateStepEasingFunctionWithStepCount(&self, stepCount: i32, out: *mut *mut StepEasingFunction) -> HRESULT }} impl ICompositor2 { - #[inline] pub unsafe fn create_ambient_light(&self) -> Result> { + #[inline] pub fn create_ambient_light(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAmbientLight)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_animation_group(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_animation_group(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateAnimationGroup)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_backdrop_brush(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_backdrop_brush(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateBackdropBrush)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_distant_light(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_distant_light(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDistantLight)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_drop_shadow(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_drop_shadow(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateDropShadow)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_implicit_animation_collection(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_implicit_animation_collection(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateImplicitAnimationCollection)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_layer_visual(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_layer_visual(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateLayerVisual)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_mask_brush(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_mask_brush(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateMaskBrush)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_nine_grid_brush(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_nine_grid_brush(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateNineGridBrush)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_point_light(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_point_light(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreatePointLight)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_spot_light(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_spot_light(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateSpotLight)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_step_easing_function(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_step_easing_function(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateStepEasingFunction)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_step_easing_function_with_step_count(&self, stepCount: i32) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_step_easing_function_with_step_count(&self, stepCount: i32) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateStepEasingFunctionWithStepCount)(self as *const _ as *mut _, stepCount, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_ICompositor3, 3386740464, 28337, 20028, 166, 88, 103, 93, 156, 100, 212, 171); RT_INTERFACE!{interface ICompositor3(ICompositor3Vtbl): IInspectable(IInspectableVtbl) [IID_ICompositor3] { fn CreateHostBackdropBrush(&self, out: *mut *mut CompositionBackdropBrush) -> HRESULT }} impl ICompositor3 { - #[inline] pub unsafe fn create_host_backdrop_brush(&self) -> Result> { + #[inline] pub fn create_host_backdrop_brush(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateHostBackdropBrush)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_ICompositor4, 2923947914, 30992, 17445, 164, 130, 160, 91, 117, 138, 220, 233); RT_INTERFACE!{interface ICompositor4(ICompositor4Vtbl): IInspectable(IInspectableVtbl) [IID_ICompositor4] { @@ -17352,47 +17352,47 @@ RT_INTERFACE!{interface ICompositor4(ICompositor4Vtbl): IInspectable(IInspectabl fn CreateSpringVector3Animation(&self, out: *mut *mut SpringVector3NaturalMotionAnimation) -> HRESULT }} impl ICompositor4 { - #[inline] pub unsafe fn create_color_gradient_stop(&self) -> Result> { + #[inline] pub fn create_color_gradient_stop(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateColorGradientStop)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_color_gradient_stop_with_offset_and_color(&self, offset: f32, color: super::Color) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_color_gradient_stop_with_offset_and_color(&self, offset: f32, color: super::Color) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateColorGradientStopWithOffsetAndColor)(self as *const _ as *mut _, offset, color, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_linear_gradient_brush(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_linear_gradient_brush(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateLinearGradientBrush)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_spring_scalar_animation(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_spring_scalar_animation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateSpringScalarAnimation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_spring_vector2_animation(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_spring_vector2_animation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateSpringVector2Animation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn create_spring_vector3_animation(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_spring_vector3_animation(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateSpringVector3Animation)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut *mut VisualCollection) -> HRESULT }} impl IContainerVisual { - #[inline] pub unsafe fn get_children(&self) -> Result> { + #[inline] pub fn get_children(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Children)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ContainerVisual: IContainerVisual} DEFINE_IID!(IID_IContainerVisualFactory, 56862299, 51162, 19866, 149, 244, 105, 181, 200, 223, 103, 11); @@ -17401,20 +17401,20 @@ RT_INTERFACE!{interface IContainerVisualFactory(IContainerVisualFactoryVtbl): II }} 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(&self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT, - fn get_ControlPoint2(&self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT + fn get_ControlPoint1(&self, out: *mut foundation::numerics::Vector2) -> HRESULT, + fn get_ControlPoint2(&self, out: *mut foundation::numerics::Vector2) -> HRESULT }} impl ICubicBezierEasingFunction { - #[inline] pub unsafe fn get_control_point1(&self) -> Result { + #[inline] pub fn get_control_point1(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ControlPoint1)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_control_point2(&self) -> Result { + }} + #[inline] pub fn get_control_point2(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ControlPoint2)(self as *const _ as *mut _, &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); @@ -17423,37 +17423,37 @@ RT_INTERFACE!{interface IDistantLight(IDistantLightVtbl): IInspectable(IInspecta fn put_Color(&self, value: super::Color) -> HRESULT, fn get_CoordinateSpace(&self, out: *mut *mut Visual) -> HRESULT, fn put_CoordinateSpace(&self, value: *mut Visual) -> HRESULT, - fn get_Direction(&self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, - fn put_Direction(&self, value: super::super::foundation::numerics::Vector3) -> HRESULT + fn get_Direction(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, + fn put_Direction(&self, value: foundation::numerics::Vector3) -> HRESULT }} impl IDistantLight { - #[inline] pub unsafe fn get_color(&self) -> Result { + #[inline] pub fn get_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Color)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_color(&self, value: super::Color) -> Result<()> { + }} + #[inline] pub fn set_color(&self, value: super::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Color)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_coordinate_space(&self) -> Result> { + }} + #[inline] pub fn get_coordinate_space(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CoordinateSpace)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_coordinate_space(&self, value: &Visual) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_coordinate_space(&self, value: &Visual) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CoordinateSpace)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_direction(&self) -> Result { + }} + #[inline] pub fn get_direction(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Direction)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_direction(&self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + }} + #[inline] pub fn set_direction(&self, value: foundation::numerics::Vector3) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Direction)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DistantLight: IDistantLight} DEFINE_IID!(IID_IDistantLight2, 3687688732, 10571, 18647, 182, 14, 118, 223, 100, 170, 57, 43); @@ -17462,15 +17462,15 @@ RT_INTERFACE!{interface IDistantLight2(IDistantLight2Vtbl): IInspectable(IInspec fn put_Intensity(&self, value: f32) -> HRESULT }} impl IDistantLight2 { - #[inline] pub unsafe fn get_intensity(&self) -> Result { + #[inline] pub fn get_intensity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Intensity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_intensity(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_intensity(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Intensity)(self as *const _ as *mut _, 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] { @@ -17480,57 +17480,57 @@ RT_INTERFACE!{interface IDropShadow(IDropShadowVtbl): IInspectable(IInspectableV fn put_Color(&self, value: super::Color) -> HRESULT, fn get_Mask(&self, out: *mut *mut CompositionBrush) -> HRESULT, fn put_Mask(&self, value: *mut CompositionBrush) -> HRESULT, - fn get_Offset(&self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, - fn put_Offset(&self, value: super::super::foundation::numerics::Vector3) -> HRESULT, + fn get_Offset(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, + fn put_Offset(&self, value: foundation::numerics::Vector3) -> HRESULT, fn get_Opacity(&self, out: *mut f32) -> HRESULT, fn put_Opacity(&self, value: f32) -> HRESULT }} impl IDropShadow { - #[inline] pub unsafe fn get_blur_radius(&self) -> Result { + #[inline] pub fn get_blur_radius(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BlurRadius)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_blur_radius(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_blur_radius(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BlurRadius)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_color(&self) -> Result { + }} + #[inline] pub fn get_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Color)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_color(&self, value: super::Color) -> Result<()> { + }} + #[inline] pub fn set_color(&self, value: super::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Color)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_mask(&self) -> Result> { + }} + #[inline] pub fn get_mask(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Mask)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_mask(&self, value: &CompositionBrush) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_mask(&self, value: &CompositionBrush) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Mask)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_offset(&self) -> Result { + }} + #[inline] pub fn get_offset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Offset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_offset(&self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + }} + #[inline] pub fn set_offset(&self, value: foundation::numerics::Vector3) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Offset)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_opacity(&self) -> Result { + }} + #[inline] pub fn get_opacity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Opacity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_opacity(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_opacity(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Opacity)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DropShadow: IDropShadow} DEFINE_IID!(IID_IDropShadow2, 1816271036, 5561, 19501, 141, 74, 7, 103, 223, 17, 151, 122); @@ -17539,15 +17539,15 @@ RT_INTERFACE!{interface IDropShadow2(IDropShadow2Vtbl): IInspectable(IInspectabl fn put_SourcePolicy(&self, value: CompositionDropShadowSourcePolicy) -> HRESULT }} impl IDropShadow2 { - #[inline] pub unsafe fn get_source_policy(&self) -> Result { + #[inline] pub fn get_source_policy(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SourcePolicy)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_source_policy(&self, value: CompositionDropShadowSourcePolicy) -> Result<()> { + }} + #[inline] pub fn set_source_policy(&self, value: CompositionDropShadowSourcePolicy) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SourcePolicy)(self as *const _ as *mut _, 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] { @@ -17555,15 +17555,15 @@ RT_INTERFACE!{interface IExpressionAnimation(IExpressionAnimationVtbl): IInspect fn put_Expression(&self, value: HSTRING) -> HRESULT }} impl IExpressionAnimation { - #[inline] pub unsafe fn get_expression(&self) -> Result { + #[inline] pub fn get_expression(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Expression)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_expression(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_expression(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Expression)(self as *const _ as *mut _, 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); @@ -17571,7 +17571,7 @@ RT_INTERFACE!{interface IImplicitAnimationCollection(IImplicitAnimationCollectio }} RT_CLASS!{class ImplicitAnimationCollection: IImplicitAnimationCollection} -RT_CLASS!{class InitialValueExpressionCollection: super::super::foundation::collections::IMap} +RT_CLASS!{class InitialValueExpressionCollection: foundation::collections::IMap} 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(&self, out: *mut f32) -> HRESULT, @@ -17584,50 +17584,50 @@ RT_INTERFACE!{interface IInsetClip(IInsetClipVtbl): IInspectable(IInspectableVtb fn put_TopInset(&self, value: f32) -> HRESULT }} impl IInsetClip { - #[inline] pub unsafe fn get_bottom_inset(&self) -> Result { + #[inline] pub fn get_bottom_inset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BottomInset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_bottom_inset(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_bottom_inset(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BottomInset)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_left_inset(&self) -> Result { + }} + #[inline] pub fn get_left_inset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LeftInset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_left_inset(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_left_inset(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LeftInset)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_right_inset(&self) -> Result { + }} + #[inline] pub fn get_right_inset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RightInset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_right_inset(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_right_inset(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RightInset)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_top_inset(&self) -> Result { + }} + #[inline] pub fn get_top_inset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TopInset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_top_inset(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_top_inset(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TopInset)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class InsetClip: IInsetClip} 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(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_DelayTime(&self, value: super::super::foundation::TimeSpan) -> HRESULT, - fn get_Duration(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_Duration(&self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_DelayTime(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_DelayTime(&self, value: foundation::TimeSpan) -> HRESULT, + fn get_Duration(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_Duration(&self, value: foundation::TimeSpan) -> HRESULT, fn get_IterationBehavior(&self, out: *mut AnimationIterationBehavior) -> HRESULT, fn put_IterationBehavior(&self, value: AnimationIterationBehavior) -> HRESULT, fn get_IterationCount(&self, out: *mut i32) -> HRESULT, @@ -17639,64 +17639,64 @@ RT_INTERFACE!{interface IKeyFrameAnimation(IKeyFrameAnimationVtbl): IInspectable fn InsertExpressionKeyFrameWithEasingFunction(&self, normalizedProgressKey: f32, value: HSTRING, easingFunction: *mut CompositionEasingFunction) -> HRESULT }} impl IKeyFrameAnimation { - #[inline] pub unsafe fn get_delay_time(&self) -> Result { + #[inline] pub fn get_delay_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DelayTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_delay_time(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_delay_time(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DelayTime)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_duration(&self) -> Result { + }} + #[inline] pub fn get_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Duration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_duration(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_duration(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Duration)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_iteration_behavior(&self) -> Result { + }} + #[inline] pub fn get_iteration_behavior(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IterationBehavior)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_iteration_behavior(&self, value: AnimationIterationBehavior) -> Result<()> { + }} + #[inline] pub fn set_iteration_behavior(&self, value: AnimationIterationBehavior) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IterationBehavior)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_iteration_count(&self) -> Result { + }} + #[inline] pub fn get_iteration_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IterationCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_iteration_count(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_iteration_count(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IterationCount)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_key_frame_count(&self) -> Result { + }} + #[inline] pub fn get_key_frame_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_KeyFrameCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_stop_behavior(&self) -> Result { + }} + #[inline] pub fn get_stop_behavior(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StopBehavior)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_stop_behavior(&self, value: AnimationStopBehavior) -> Result<()> { + }} + #[inline] pub fn set_stop_behavior(&self, value: AnimationStopBehavior) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StopBehavior)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn insert_expression_key_frame(&self, normalizedProgressKey: f32, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn insert_expression_key_frame(&self, normalizedProgressKey: f32, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InsertExpressionKeyFrame)(self as *const _ as *mut _, normalizedProgressKey, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn insert_expression_key_frame_with_easing_function(&self, normalizedProgressKey: f32, value: &HStringArg, easingFunction: &CompositionEasingFunction) -> Result<()> { + }} + #[inline] pub fn insert_expression_key_frame_with_easing_function(&self, normalizedProgressKey: f32, value: &HStringArg, easingFunction: &CompositionEasingFunction) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InsertExpressionKeyFrameWithEasingFunction)(self as *const _ as *mut _, normalizedProgressKey, value.get(), easingFunction as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class KeyFrameAnimation: IKeyFrameAnimation} DEFINE_IID!(IID_IKeyFrameAnimation2, 4105472187, 10560, 20160, 164, 26, 235, 109, 128, 26, 47, 24); @@ -17705,15 +17705,15 @@ RT_INTERFACE!{interface IKeyFrameAnimation2(IKeyFrameAnimation2Vtbl): IInspectab fn put_Direction(&self, value: AnimationDirection) -> HRESULT }} impl IKeyFrameAnimation2 { - #[inline] pub unsafe fn get_direction(&self) -> Result { + #[inline] pub fn get_direction(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Direction)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_direction(&self, value: AnimationDirection) -> Result<()> { + }} + #[inline] pub fn set_direction(&self, value: AnimationDirection) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Direction)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IKeyFrameAnimation3, 2220617908, 55518, 17967, 135, 83, 200, 13, 67, 198, 255, 90); RT_INTERFACE!{interface IKeyFrameAnimation3(IKeyFrameAnimation3Vtbl): IInspectable(IInspectableVtbl) [IID_IKeyFrameAnimation3] { @@ -17721,15 +17721,15 @@ RT_INTERFACE!{interface IKeyFrameAnimation3(IKeyFrameAnimation3Vtbl): IInspectab fn put_DelayBehavior(&self, value: AnimationDelayBehavior) -> HRESULT }} impl IKeyFrameAnimation3 { - #[inline] pub unsafe fn get_delay_behavior(&self) -> Result { + #[inline] pub fn get_delay_behavior(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DelayBehavior)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_delay_behavior(&self, value: AnimationDelayBehavior) -> Result<()> { + }} + #[inline] pub fn set_delay_behavior(&self, value: AnimationDelayBehavior) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DelayBehavior)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IKeyFrameAnimationFactory, 3204973560, 28970, 20417, 140, 135, 151, 8, 89, 237, 141, 46); RT_INTERFACE!{interface IKeyFrameAnimationFactory(IKeyFrameAnimationFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IKeyFrameAnimationFactory] { @@ -17741,15 +17741,15 @@ RT_INTERFACE!{interface ILayerVisual(ILayerVisualVtbl): IInspectable(IInspectabl fn put_Effect(&self, value: *mut CompositionEffectBrush) -> HRESULT }} impl ILayerVisual { - #[inline] pub unsafe fn get_effect(&self) -> Result> { + #[inline] pub fn get_effect(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Effect)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_effect(&self, value: &CompositionEffectBrush) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_effect(&self, value: &CompositionEffectBrush) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Effect)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class LayerVisual: ILayerVisual} DEFINE_IID!(IID_ILayerVisual2, 2566500075, 28451, 18929, 144, 177, 31, 89, 161, 79, 188, 227); @@ -17758,15 +17758,15 @@ RT_INTERFACE!{interface ILayerVisual2(ILayerVisual2Vtbl): IInspectable(IInspecta fn put_Shadow(&self, value: *mut CompositionShadow) -> HRESULT }} impl ILayerVisual2 { - #[inline] pub unsafe fn get_shadow(&self) -> Result> { + #[inline] pub fn get_shadow(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Shadow)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_shadow(&self, value: &CompositionShadow) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_shadow(&self, value: &CompositionShadow) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Shadow)(self as *const _ as *mut _, 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] { @@ -17777,39 +17777,39 @@ DEFINE_IID!(IID_INaturalMotionAnimation, 1133371693, 30363, 18465, 169, 73, 40, RT_INTERFACE!{interface INaturalMotionAnimation(INaturalMotionAnimationVtbl): IInspectable(IInspectableVtbl) [IID_INaturalMotionAnimation] { fn get_DelayBehavior(&self, out: *mut AnimationDelayBehavior) -> HRESULT, fn put_DelayBehavior(&self, value: AnimationDelayBehavior) -> HRESULT, - fn get_DelayTime(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_DelayTime(&self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_DelayTime(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_DelayTime(&self, value: foundation::TimeSpan) -> HRESULT, fn get_StopBehavior(&self, out: *mut AnimationStopBehavior) -> HRESULT, fn put_StopBehavior(&self, value: AnimationStopBehavior) -> HRESULT }} impl INaturalMotionAnimation { - #[inline] pub unsafe fn get_delay_behavior(&self) -> Result { + #[inline] pub fn get_delay_behavior(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DelayBehavior)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_delay_behavior(&self, value: AnimationDelayBehavior) -> Result<()> { + }} + #[inline] pub fn set_delay_behavior(&self, value: AnimationDelayBehavior) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DelayBehavior)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_delay_time(&self) -> Result { + }} + #[inline] pub fn get_delay_time(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DelayTime)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_delay_time(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_delay_time(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DelayTime)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_stop_behavior(&self) -> Result { + }} + #[inline] pub fn get_stop_behavior(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StopBehavior)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_stop_behavior(&self, value: AnimationStopBehavior) -> Result<()> { + }} + #[inline] pub fn set_stop_behavior(&self, value: AnimationStopBehavior) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StopBehavior)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class NaturalMotionAnimation: INaturalMotionAnimation} DEFINE_IID!(IID_INaturalMotionAnimationFactory, 4114270982, 53098, 17287, 163, 254, 82, 33, 243, 231, 224, 224); @@ -17826,66 +17826,66 @@ RT_INTERFACE!{interface IPointLight(IPointLightVtbl): IInspectable(IInspectableV fn put_CoordinateSpace(&self, value: *mut Visual) -> HRESULT, fn get_LinearAttenuation(&self, out: *mut f32) -> HRESULT, fn put_LinearAttenuation(&self, value: f32) -> HRESULT, - fn get_Offset(&self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, - fn put_Offset(&self, value: super::super::foundation::numerics::Vector3) -> HRESULT, + fn get_Offset(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, + fn put_Offset(&self, value: foundation::numerics::Vector3) -> HRESULT, fn get_QuadraticAttenuation(&self, out: *mut f32) -> HRESULT, fn put_QuadraticAttenuation(&self, value: f32) -> HRESULT }} impl IPointLight { - #[inline] pub unsafe fn get_color(&self) -> Result { + #[inline] pub fn get_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Color)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_color(&self, value: super::Color) -> Result<()> { + }} + #[inline] pub fn set_color(&self, value: super::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Color)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_constant_attenuation(&self) -> Result { + }} + #[inline] pub fn get_constant_attenuation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ConstantAttenuation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_constant_attenuation(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_constant_attenuation(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ConstantAttenuation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_coordinate_space(&self) -> Result> { + }} + #[inline] pub fn get_coordinate_space(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CoordinateSpace)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_coordinate_space(&self, value: &Visual) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_coordinate_space(&self, value: &Visual) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CoordinateSpace)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_linear_attenuation(&self) -> Result { + }} + #[inline] pub fn get_linear_attenuation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LinearAttenuation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_linear_attenuation(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_linear_attenuation(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LinearAttenuation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_offset(&self) -> Result { + }} + #[inline] pub fn get_offset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Offset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_offset(&self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + }} + #[inline] pub fn set_offset(&self, value: foundation::numerics::Vector3) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Offset)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_quadratic_attenuation(&self) -> Result { + }} + #[inline] pub fn get_quadratic_attenuation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_QuadraticAttenuation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_quadratic_attenuation(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_quadratic_attenuation(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_QuadraticAttenuation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class PointLight: IPointLight} DEFINE_IID!(IID_IPointLight2, 4025061164, 1656, 20329, 177, 100, 168, 16, 217, 149, 188, 183); @@ -17894,30 +17894,30 @@ RT_INTERFACE!{interface IPointLight2(IPointLight2Vtbl): IInspectable(IInspectabl fn put_Intensity(&self, value: f32) -> HRESULT }} impl IPointLight2 { - #[inline] pub unsafe fn get_intensity(&self) -> Result { + #[inline] pub fn get_intensity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Intensity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_intensity(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_intensity(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Intensity)(self as *const _ as *mut _, 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(&self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Quaternion) -> HRESULT, - fn InsertKeyFrameWithEasingFunction(&self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Quaternion, easingFunction: *mut CompositionEasingFunction) -> HRESULT + fn InsertKeyFrame(&self, normalizedProgressKey: f32, value: foundation::numerics::Quaternion) -> HRESULT, + fn InsertKeyFrameWithEasingFunction(&self, normalizedProgressKey: f32, value: foundation::numerics::Quaternion, easingFunction: *mut CompositionEasingFunction) -> HRESULT }} impl IQuaternionKeyFrameAnimation { - #[inline] pub unsafe fn insert_key_frame(&self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Quaternion) -> Result<()> { + #[inline] pub fn insert_key_frame(&self, normalizedProgressKey: f32, value: foundation::numerics::Quaternion) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InsertKeyFrame)(self as *const _ as *mut _, normalizedProgressKey, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn insert_key_frame_with_easing_function(&self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Quaternion, easingFunction: &CompositionEasingFunction) -> Result<()> { + }} + #[inline] pub fn insert_key_frame_with_easing_function(&self, normalizedProgressKey: f32, value: foundation::numerics::Quaternion, easingFunction: &CompositionEasingFunction) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InsertKeyFrameWithEasingFunction)(self as *const _ as *mut _, normalizedProgressKey, value, easingFunction as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class QuaternionKeyFrameAnimation: IQuaternionKeyFrameAnimation} DEFINE_IID!(IID_IRenderingDeviceReplacedEventArgs, 976333949, 10431, 20090, 133, 36, 113, 103, 157, 72, 15, 56); @@ -17925,11 +17925,11 @@ RT_INTERFACE!{interface IRenderingDeviceReplacedEventArgs(IRenderingDeviceReplac fn get_GraphicsDevice(&self, out: *mut *mut CompositionGraphicsDevice) -> HRESULT }} impl IRenderingDeviceReplacedEventArgs { - #[inline] pub unsafe fn get_graphics_device(&self) -> Result> { + #[inline] pub fn get_graphics_device(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_GraphicsDevice)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RenderingDeviceReplacedEventArgs: IRenderingDeviceReplacedEventArgs} DEFINE_IID!(IID_IScalarKeyFrameAnimation, 2921893801, 9516, 19349, 167, 37, 191, 133, 227, 128, 0, 161); @@ -17938,53 +17938,53 @@ RT_INTERFACE!{interface IScalarKeyFrameAnimation(IScalarKeyFrameAnimationVtbl): fn InsertKeyFrameWithEasingFunction(&self, normalizedProgressKey: f32, value: f32, easingFunction: *mut CompositionEasingFunction) -> HRESULT }} impl IScalarKeyFrameAnimation { - #[inline] pub unsafe fn insert_key_frame(&self, normalizedProgressKey: f32, value: f32) -> Result<()> { + #[inline] pub fn insert_key_frame(&self, normalizedProgressKey: f32, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InsertKeyFrame)(self as *const _ as *mut _, normalizedProgressKey, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn insert_key_frame_with_easing_function(&self, normalizedProgressKey: f32, value: f32, easingFunction: &CompositionEasingFunction) -> Result<()> { + }} + #[inline] pub fn insert_key_frame_with_easing_function(&self, normalizedProgressKey: f32, value: f32, easingFunction: &CompositionEasingFunction) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InsertKeyFrameWithEasingFunction)(self as *const _ as *mut _, normalizedProgressKey, value, easingFunction as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ScalarKeyFrameAnimation: IScalarKeyFrameAnimation} DEFINE_IID!(IID_IScalarNaturalMotionAnimation, 2494121345, 49042, 18779, 181, 189, 210, 198, 89, 67, 7, 55); RT_INTERFACE!{interface IScalarNaturalMotionAnimation(IScalarNaturalMotionAnimationVtbl): IInspectable(IInspectableVtbl) [IID_IScalarNaturalMotionAnimation] { - fn get_FinalValue(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_FinalValue(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_InitialValue(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_InitialValue(&self, value: *mut super::super::foundation::IReference) -> HRESULT, + fn get_FinalValue(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_FinalValue(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_InitialValue(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_InitialValue(&self, value: *mut foundation::IReference) -> HRESULT, fn get_InitialVelocity(&self, out: *mut f32) -> HRESULT, fn put_InitialVelocity(&self, value: f32) -> HRESULT }} impl IScalarNaturalMotionAnimation { - #[inline] pub unsafe fn get_final_value(&self) -> Result>> { + #[inline] pub fn get_final_value(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FinalValue)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_final_value(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_final_value(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FinalValue)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_initial_value(&self) -> Result>> { + }} + #[inline] pub fn get_initial_value(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InitialValue)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_initial_value(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_initial_value(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InitialValue)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_initial_velocity(&self) -> Result { + }} + #[inline] pub fn get_initial_velocity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InitialVelocity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_initial_velocity(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_initial_velocity(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InitialVelocity)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class ScalarNaturalMotionAnimation: IScalarNaturalMotionAnimation} DEFINE_IID!(IID_IScalarNaturalMotionAnimationFactory, 2203755772, 26396, 16861, 175, 72, 174, 141, 239, 139, 21, 41); @@ -17997,8 +17997,8 @@ RT_INTERFACE!{interface ISpotLight(ISpotLightVtbl): IInspectable(IInspectableVtb fn put_ConstantAttenuation(&self, value: f32) -> HRESULT, fn get_CoordinateSpace(&self, out: *mut *mut Visual) -> HRESULT, fn put_CoordinateSpace(&self, value: *mut Visual) -> HRESULT, - fn get_Direction(&self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, - fn put_Direction(&self, value: super::super::foundation::numerics::Vector3) -> HRESULT, + fn get_Direction(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, + fn put_Direction(&self, value: foundation::numerics::Vector3) -> HRESULT, fn get_InnerConeAngle(&self, out: *mut f32) -> HRESULT, fn put_InnerConeAngle(&self, value: f32) -> HRESULT, fn get_InnerConeAngleInDegrees(&self, out: *mut f32) -> HRESULT, @@ -18007,8 +18007,8 @@ RT_INTERFACE!{interface ISpotLight(ISpotLightVtbl): IInspectable(IInspectableVtb fn put_InnerConeColor(&self, value: super::Color) -> HRESULT, fn get_LinearAttenuation(&self, out: *mut f32) -> HRESULT, fn put_LinearAttenuation(&self, value: f32) -> HRESULT, - fn get_Offset(&self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, - fn put_Offset(&self, value: super::super::foundation::numerics::Vector3) -> HRESULT, + fn get_Offset(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, + fn put_Offset(&self, value: foundation::numerics::Vector3) -> HRESULT, fn get_OuterConeAngle(&self, out: *mut f32) -> HRESULT, fn put_OuterConeAngle(&self, value: f32) -> HRESULT, fn get_OuterConeAngleInDegrees(&self, out: *mut f32) -> HRESULT, @@ -18019,114 +18019,114 @@ RT_INTERFACE!{interface ISpotLight(ISpotLightVtbl): IInspectable(IInspectableVtb fn put_QuadraticAttenuation(&self, value: f32) -> HRESULT }} impl ISpotLight { - #[inline] pub unsafe fn get_constant_attenuation(&self) -> Result { + #[inline] pub fn get_constant_attenuation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ConstantAttenuation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_constant_attenuation(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_constant_attenuation(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ConstantAttenuation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_coordinate_space(&self) -> Result> { + }} + #[inline] pub fn get_coordinate_space(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CoordinateSpace)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_coordinate_space(&self, value: &Visual) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_coordinate_space(&self, value: &Visual) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CoordinateSpace)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_direction(&self) -> Result { + }} + #[inline] pub fn get_direction(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Direction)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_direction(&self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + }} + #[inline] pub fn set_direction(&self, value: foundation::numerics::Vector3) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Direction)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_inner_cone_angle(&self) -> Result { + }} + #[inline] pub fn get_inner_cone_angle(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InnerConeAngle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_inner_cone_angle(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_inner_cone_angle(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InnerConeAngle)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_inner_cone_angle_in_degrees(&self) -> Result { + }} + #[inline] pub fn get_inner_cone_angle_in_degrees(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InnerConeAngleInDegrees)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_inner_cone_angle_in_degrees(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_inner_cone_angle_in_degrees(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InnerConeAngleInDegrees)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_inner_cone_color(&self) -> Result { + }} + #[inline] pub fn get_inner_cone_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InnerConeColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_inner_cone_color(&self, value: super::Color) -> Result<()> { + }} + #[inline] pub fn set_inner_cone_color(&self, value: super::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InnerConeColor)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_linear_attenuation(&self) -> Result { + }} + #[inline] pub fn get_linear_attenuation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LinearAttenuation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_linear_attenuation(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_linear_attenuation(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LinearAttenuation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_offset(&self) -> Result { + }} + #[inline] pub fn get_offset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Offset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_offset(&self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + }} + #[inline] pub fn set_offset(&self, value: foundation::numerics::Vector3) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Offset)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_outer_cone_angle(&self) -> Result { + }} + #[inline] pub fn get_outer_cone_angle(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OuterConeAngle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_outer_cone_angle(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_outer_cone_angle(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OuterConeAngle)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_outer_cone_angle_in_degrees(&self) -> Result { + }} + #[inline] pub fn get_outer_cone_angle_in_degrees(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OuterConeAngleInDegrees)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_outer_cone_angle_in_degrees(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_outer_cone_angle_in_degrees(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OuterConeAngleInDegrees)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_outer_cone_color(&self) -> Result { + }} + #[inline] pub fn get_outer_cone_color(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OuterConeColor)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_outer_cone_color(&self, value: super::Color) -> Result<()> { + }} + #[inline] pub fn set_outer_cone_color(&self, value: super::Color) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OuterConeColor)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_quadratic_attenuation(&self) -> Result { + }} + #[inline] pub fn get_quadratic_attenuation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_QuadraticAttenuation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_quadratic_attenuation(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_quadratic_attenuation(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_QuadraticAttenuation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SpotLight: ISpotLight} DEFINE_IID!(IID_ISpotLight2, 1693344094, 1670, 19946, 169, 232, 188, 58, 140, 112, 20, 89); @@ -18137,107 +18137,107 @@ RT_INTERFACE!{interface ISpotLight2(ISpotLight2Vtbl): IInspectable(IInspectableV fn put_OuterConeIntensity(&self, value: f32) -> HRESULT }} impl ISpotLight2 { - #[inline] pub unsafe fn get_inner_cone_intensity(&self) -> Result { + #[inline] pub fn get_inner_cone_intensity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InnerConeIntensity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_inner_cone_intensity(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_inner_cone_intensity(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InnerConeIntensity)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_outer_cone_intensity(&self) -> Result { + }} + #[inline] pub fn get_outer_cone_intensity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_OuterConeIntensity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_outer_cone_intensity(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_outer_cone_intensity(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OuterConeIntensity)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ISpringScalarNaturalMotionAnimation, 91400543, 14329, 20414, 184, 123, 92, 208, 58, 137, 80, 28); RT_INTERFACE!{interface ISpringScalarNaturalMotionAnimation(ISpringScalarNaturalMotionAnimationVtbl): IInspectable(IInspectableVtbl) [IID_ISpringScalarNaturalMotionAnimation] { fn get_DampingRatio(&self, out: *mut f32) -> HRESULT, fn put_DampingRatio(&self, value: f32) -> HRESULT, - fn get_Period(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_Period(&self, value: super::super::foundation::TimeSpan) -> HRESULT + fn get_Period(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_Period(&self, value: foundation::TimeSpan) -> HRESULT }} impl ISpringScalarNaturalMotionAnimation { - #[inline] pub unsafe fn get_damping_ratio(&self) -> Result { + #[inline] pub fn get_damping_ratio(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DampingRatio)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_damping_ratio(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_damping_ratio(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DampingRatio)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_period(&self) -> Result { + }} + #[inline] pub fn get_period(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Period)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_period(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_period(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Period)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SpringScalarNaturalMotionAnimation: ISpringScalarNaturalMotionAnimation} DEFINE_IID!(IID_ISpringVector2NaturalMotionAnimation, 603231413, 61043, 20239, 164, 35, 64, 43, 148, 109, 244, 179); RT_INTERFACE!{interface ISpringVector2NaturalMotionAnimation(ISpringVector2NaturalMotionAnimationVtbl): IInspectable(IInspectableVtbl) [IID_ISpringVector2NaturalMotionAnimation] { fn get_DampingRatio(&self, out: *mut f32) -> HRESULT, fn put_DampingRatio(&self, value: f32) -> HRESULT, - fn get_Period(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_Period(&self, value: super::super::foundation::TimeSpan) -> HRESULT + fn get_Period(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_Period(&self, value: foundation::TimeSpan) -> HRESULT }} impl ISpringVector2NaturalMotionAnimation { - #[inline] pub unsafe fn get_damping_ratio(&self) -> Result { + #[inline] pub fn get_damping_ratio(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DampingRatio)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_damping_ratio(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_damping_ratio(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DampingRatio)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_period(&self) -> Result { + }} + #[inline] pub fn get_period(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Period)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_period(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_period(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Period)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SpringVector2NaturalMotionAnimation: ISpringVector2NaturalMotionAnimation} DEFINE_IID!(IID_ISpringVector3NaturalMotionAnimation, 1820805599, 54651, 18324, 142, 45, 206, 203, 17, 225, 148, 229); RT_INTERFACE!{interface ISpringVector3NaturalMotionAnimation(ISpringVector3NaturalMotionAnimationVtbl): IInspectable(IInspectableVtbl) [IID_ISpringVector3NaturalMotionAnimation] { fn get_DampingRatio(&self, out: *mut f32) -> HRESULT, fn put_DampingRatio(&self, value: f32) -> HRESULT, - fn get_Period(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_Period(&self, value: super::super::foundation::TimeSpan) -> HRESULT + fn get_Period(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_Period(&self, value: foundation::TimeSpan) -> HRESULT }} impl ISpringVector3NaturalMotionAnimation { - #[inline] pub unsafe fn get_damping_ratio(&self) -> Result { + #[inline] pub fn get_damping_ratio(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DampingRatio)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_damping_ratio(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_damping_ratio(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DampingRatio)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_period(&self) -> Result { + }} + #[inline] pub fn get_period(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Period)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_period(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_period(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Period)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SpringVector3NaturalMotionAnimation: ISpringVector3NaturalMotionAnimation} DEFINE_IID!(IID_ISpriteVisual, 148919681, 6865, 20375, 151, 87, 64, 45, 118, 228, 35, 59); @@ -18246,15 +18246,15 @@ RT_INTERFACE!{interface ISpriteVisual(ISpriteVisualVtbl): IInspectable(IInspecta fn put_Brush(&self, value: *mut CompositionBrush) -> HRESULT }} impl ISpriteVisual { - #[inline] pub unsafe fn get_brush(&self) -> Result> { + #[inline] pub fn get_brush(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Brush)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_brush(&self, value: &CompositionBrush) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_brush(&self, value: &CompositionBrush) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Brush)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SpriteVisual: ISpriteVisual} DEFINE_IID!(IID_ISpriteVisual2, 1485608548, 39290, 18512, 145, 254, 83, 203, 88, 248, 28, 233); @@ -18263,15 +18263,15 @@ RT_INTERFACE!{interface ISpriteVisual2(ISpriteVisual2Vtbl): IInspectable(IInspec fn put_Shadow(&self, value: *mut CompositionShadow) -> HRESULT }} impl ISpriteVisual2 { - #[inline] pub unsafe fn get_shadow(&self) -> Result> { + #[inline] pub fn get_shadow(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Shadow)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_shadow(&self, value: &CompositionShadow) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_shadow(&self, value: &CompositionShadow) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Shadow)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IStepEasingFunction, 3502942027, 22028, 18955, 165, 246, 32, 108, 168, 195, 236, 214); RT_INTERFACE!{interface IStepEasingFunction(IStepEasingFunctionVtbl): IInspectable(IInspectableVtbl) [IID_IStepEasingFunction] { @@ -18287,106 +18287,106 @@ RT_INTERFACE!{interface IStepEasingFunction(IStepEasingFunctionVtbl): IInspectab fn put_StepCount(&self, value: i32) -> HRESULT }} impl IStepEasingFunction { - #[inline] pub unsafe fn get_final_step(&self) -> Result { + #[inline] pub fn get_final_step(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FinalStep)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_final_step(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_final_step(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FinalStep)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_initial_step(&self) -> Result { + }} + #[inline] pub fn get_initial_step(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InitialStep)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_initial_step(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_initial_step(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InitialStep)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_final_step_single_frame(&self) -> Result { + }} + #[inline] pub fn get_is_final_step_single_frame(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsFinalStepSingleFrame)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_final_step_single_frame(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_final_step_single_frame(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsFinalStepSingleFrame)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_initial_step_single_frame(&self) -> Result { + }} + #[inline] pub fn get_is_initial_step_single_frame(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsInitialStepSingleFrame)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_initial_step_single_frame(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_initial_step_single_frame(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsInitialStepSingleFrame)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_step_count(&self) -> Result { + }} + #[inline] pub fn get_step_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_StepCount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_step_count(&self, value: i32) -> Result<()> { + }} + #[inline] pub fn set_step_count(&self, value: i32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_StepCount)(self as *const _ as *mut _, 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(&self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Vector2) -> HRESULT, - fn InsertKeyFrameWithEasingFunction(&self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Vector2, easingFunction: *mut CompositionEasingFunction) -> HRESULT + fn InsertKeyFrame(&self, normalizedProgressKey: f32, value: foundation::numerics::Vector2) -> HRESULT, + fn InsertKeyFrameWithEasingFunction(&self, normalizedProgressKey: f32, value: foundation::numerics::Vector2, easingFunction: *mut CompositionEasingFunction) -> HRESULT }} impl IVector2KeyFrameAnimation { - #[inline] pub unsafe fn insert_key_frame(&self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Vector2) -> Result<()> { + #[inline] pub fn insert_key_frame(&self, normalizedProgressKey: f32, value: foundation::numerics::Vector2) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InsertKeyFrame)(self as *const _ as *mut _, normalizedProgressKey, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn insert_key_frame_with_easing_function(&self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Vector2, easingFunction: &CompositionEasingFunction) -> Result<()> { + }} + #[inline] pub fn insert_key_frame_with_easing_function(&self, normalizedProgressKey: f32, value: foundation::numerics::Vector2, easingFunction: &CompositionEasingFunction) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InsertKeyFrameWithEasingFunction)(self as *const _ as *mut _, normalizedProgressKey, value, easingFunction as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Vector2KeyFrameAnimation: IVector2KeyFrameAnimation} DEFINE_IID!(IID_IVector2NaturalMotionAnimation, 255724413, 58642, 18333, 160, 12, 119, 201, 58, 48, 163, 149); RT_INTERFACE!{interface IVector2NaturalMotionAnimation(IVector2NaturalMotionAnimationVtbl): IInspectable(IInspectableVtbl) [IID_IVector2NaturalMotionAnimation] { - fn get_FinalValue(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_FinalValue(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_InitialValue(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_InitialValue(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_InitialVelocity(&self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT, - fn put_InitialVelocity(&self, value: super::super::foundation::numerics::Vector2) -> HRESULT + fn get_FinalValue(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_FinalValue(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_InitialValue(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_InitialValue(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_InitialVelocity(&self, out: *mut foundation::numerics::Vector2) -> HRESULT, + fn put_InitialVelocity(&self, value: foundation::numerics::Vector2) -> HRESULT }} impl IVector2NaturalMotionAnimation { - #[inline] pub unsafe fn get_final_value(&self) -> Result>> { + #[inline] pub fn get_final_value(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FinalValue)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_final_value(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_final_value(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FinalValue)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_initial_value(&self) -> Result>> { + }} + #[inline] pub fn get_initial_value(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InitialValue)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_initial_value(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_initial_value(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InitialValue)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_initial_velocity(&self) -> Result { + }} + #[inline] pub fn get_initial_velocity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InitialVelocity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_initial_velocity(&self, value: super::super::foundation::numerics::Vector2) -> Result<()> { + }} + #[inline] pub fn set_initial_velocity(&self, value: foundation::numerics::Vector2) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InitialVelocity)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Vector2NaturalMotionAnimation: IVector2NaturalMotionAnimation} DEFINE_IID!(IID_IVector2NaturalMotionAnimationFactory, 2356477793, 1889, 18594, 189, 219, 106, 252, 197, 43, 137, 216); @@ -18395,57 +18395,57 @@ RT_INTERFACE!{interface IVector2NaturalMotionAnimationFactory(IVector2NaturalMot }} 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(&self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Vector3) -> HRESULT, - fn InsertKeyFrameWithEasingFunction(&self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Vector3, easingFunction: *mut CompositionEasingFunction) -> HRESULT + fn InsertKeyFrame(&self, normalizedProgressKey: f32, value: foundation::numerics::Vector3) -> HRESULT, + fn InsertKeyFrameWithEasingFunction(&self, normalizedProgressKey: f32, value: foundation::numerics::Vector3, easingFunction: *mut CompositionEasingFunction) -> HRESULT }} impl IVector3KeyFrameAnimation { - #[inline] pub unsafe fn insert_key_frame(&self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Vector3) -> Result<()> { + #[inline] pub fn insert_key_frame(&self, normalizedProgressKey: f32, value: foundation::numerics::Vector3) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InsertKeyFrame)(self as *const _ as *mut _, normalizedProgressKey, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn insert_key_frame_with_easing_function(&self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Vector3, easingFunction: &CompositionEasingFunction) -> Result<()> { + }} + #[inline] pub fn insert_key_frame_with_easing_function(&self, normalizedProgressKey: f32, value: foundation::numerics::Vector3, easingFunction: &CompositionEasingFunction) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InsertKeyFrameWithEasingFunction)(self as *const _ as *mut _, normalizedProgressKey, value, easingFunction as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Vector3KeyFrameAnimation: IVector3KeyFrameAnimation} DEFINE_IID!(IID_IVector3NaturalMotionAnimation, 2618754092, 58058, 17837, 150, 158, 78, 120, 183, 185, 173, 65); RT_INTERFACE!{interface IVector3NaturalMotionAnimation(IVector3NaturalMotionAnimationVtbl): IInspectable(IInspectableVtbl) [IID_IVector3NaturalMotionAnimation] { - fn get_FinalValue(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_FinalValue(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_InitialValue(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_InitialValue(&self, value: *mut super::super::foundation::IReference) -> HRESULT, - fn get_InitialVelocity(&self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, - fn put_InitialVelocity(&self, value: super::super::foundation::numerics::Vector3) -> HRESULT + fn get_FinalValue(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_FinalValue(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_InitialValue(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_InitialValue(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_InitialVelocity(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, + fn put_InitialVelocity(&self, value: foundation::numerics::Vector3) -> HRESULT }} impl IVector3NaturalMotionAnimation { - #[inline] pub unsafe fn get_final_value(&self) -> Result>> { + #[inline] pub fn get_final_value(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FinalValue)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_final_value(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_final_value(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FinalValue)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_initial_value(&self) -> Result>> { + }} + #[inline] pub fn get_initial_value(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InitialValue)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_initial_value(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_initial_value(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InitialValue)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_initial_velocity(&self) -> Result { + }} + #[inline] pub fn get_initial_velocity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_InitialVelocity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_initial_velocity(&self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + }} + #[inline] pub fn set_initial_velocity(&self, value: foundation::numerics::Vector3) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_InitialVelocity)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Vector3NaturalMotionAnimation: IVector3NaturalMotionAnimation} DEFINE_IID!(IID_IVector3NaturalMotionAnimationFactory, 564665647, 2176, 17787, 172, 135, 182, 9, 1, 140, 135, 109); @@ -18454,245 +18454,245 @@ RT_INTERFACE!{interface IVector3NaturalMotionAnimationFactory(IVector3NaturalMot }} 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(&self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Vector4) -> HRESULT, - fn InsertKeyFrameWithEasingFunction(&self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Vector4, easingFunction: *mut CompositionEasingFunction) -> HRESULT + fn InsertKeyFrame(&self, normalizedProgressKey: f32, value: foundation::numerics::Vector4) -> HRESULT, + fn InsertKeyFrameWithEasingFunction(&self, normalizedProgressKey: f32, value: foundation::numerics::Vector4, easingFunction: *mut CompositionEasingFunction) -> HRESULT }} impl IVector4KeyFrameAnimation { - #[inline] pub unsafe fn insert_key_frame(&self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Vector4) -> Result<()> { + #[inline] pub fn insert_key_frame(&self, normalizedProgressKey: f32, value: foundation::numerics::Vector4) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InsertKeyFrame)(self as *const _ as *mut _, normalizedProgressKey, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn insert_key_frame_with_easing_function(&self, normalizedProgressKey: f32, value: super::super::foundation::numerics::Vector4, easingFunction: &CompositionEasingFunction) -> Result<()> { + }} + #[inline] pub fn insert_key_frame_with_easing_function(&self, normalizedProgressKey: f32, value: foundation::numerics::Vector4, easingFunction: &CompositionEasingFunction) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InsertKeyFrameWithEasingFunction)(self as *const _ as *mut _, normalizedProgressKey, value, easingFunction as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Vector4KeyFrameAnimation: IVector4KeyFrameAnimation} 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(&self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT, - fn put_AnchorPoint(&self, value: super::super::foundation::numerics::Vector2) -> HRESULT, + fn get_AnchorPoint(&self, out: *mut foundation::numerics::Vector2) -> HRESULT, + fn put_AnchorPoint(&self, value: foundation::numerics::Vector2) -> HRESULT, fn get_BackfaceVisibility(&self, out: *mut CompositionBackfaceVisibility) -> HRESULT, fn put_BackfaceVisibility(&self, value: CompositionBackfaceVisibility) -> HRESULT, fn get_BorderMode(&self, out: *mut CompositionBorderMode) -> HRESULT, fn put_BorderMode(&self, value: CompositionBorderMode) -> HRESULT, - fn get_CenterPoint(&self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, - fn put_CenterPoint(&self, value: super::super::foundation::numerics::Vector3) -> HRESULT, + fn get_CenterPoint(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, + fn put_CenterPoint(&self, value: foundation::numerics::Vector3) -> HRESULT, fn get_Clip(&self, out: *mut *mut CompositionClip) -> HRESULT, fn put_Clip(&self, value: *mut CompositionClip) -> HRESULT, fn get_CompositeMode(&self, out: *mut CompositionCompositeMode) -> HRESULT, fn put_CompositeMode(&self, value: CompositionCompositeMode) -> HRESULT, fn get_IsVisible(&self, out: *mut bool) -> HRESULT, fn put_IsVisible(&self, value: bool) -> HRESULT, - fn get_Offset(&self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, - fn put_Offset(&self, value: super::super::foundation::numerics::Vector3) -> HRESULT, + fn get_Offset(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, + fn put_Offset(&self, value: foundation::numerics::Vector3) -> HRESULT, fn get_Opacity(&self, out: *mut f32) -> HRESULT, fn put_Opacity(&self, value: f32) -> HRESULT, - fn get_Orientation(&self, out: *mut super::super::foundation::numerics::Quaternion) -> HRESULT, - fn put_Orientation(&self, value: super::super::foundation::numerics::Quaternion) -> HRESULT, + fn get_Orientation(&self, out: *mut foundation::numerics::Quaternion) -> HRESULT, + fn put_Orientation(&self, value: foundation::numerics::Quaternion) -> HRESULT, fn get_Parent(&self, out: *mut *mut ContainerVisual) -> HRESULT, fn get_RotationAngle(&self, out: *mut f32) -> HRESULT, fn put_RotationAngle(&self, value: f32) -> HRESULT, fn get_RotationAngleInDegrees(&self, out: *mut f32) -> HRESULT, fn put_RotationAngleInDegrees(&self, value: f32) -> HRESULT, - fn get_RotationAxis(&self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, - fn put_RotationAxis(&self, value: super::super::foundation::numerics::Vector3) -> HRESULT, - fn get_Scale(&self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, - fn put_Scale(&self, value: super::super::foundation::numerics::Vector3) -> HRESULT, - fn get_Size(&self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT, - fn put_Size(&self, value: super::super::foundation::numerics::Vector2) -> HRESULT, - fn get_TransformMatrix(&self, out: *mut super::super::foundation::numerics::Matrix4x4) -> HRESULT, - fn put_TransformMatrix(&self, value: super::super::foundation::numerics::Matrix4x4) -> HRESULT + fn get_RotationAxis(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, + fn put_RotationAxis(&self, value: foundation::numerics::Vector3) -> HRESULT, + fn get_Scale(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, + fn put_Scale(&self, value: foundation::numerics::Vector3) -> HRESULT, + fn get_Size(&self, out: *mut foundation::numerics::Vector2) -> HRESULT, + fn put_Size(&self, value: foundation::numerics::Vector2) -> HRESULT, + fn get_TransformMatrix(&self, out: *mut foundation::numerics::Matrix4x4) -> HRESULT, + fn put_TransformMatrix(&self, value: foundation::numerics::Matrix4x4) -> HRESULT }} impl IVisual { - #[inline] pub unsafe fn get_anchor_point(&self) -> Result { + #[inline] pub fn get_anchor_point(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AnchorPoint)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_anchor_point(&self, value: super::super::foundation::numerics::Vector2) -> Result<()> { + }} + #[inline] pub fn set_anchor_point(&self, value: foundation::numerics::Vector2) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AnchorPoint)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_backface_visibility(&self) -> Result { + }} + #[inline] pub fn get_backface_visibility(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BackfaceVisibility)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_backface_visibility(&self, value: CompositionBackfaceVisibility) -> Result<()> { + }} + #[inline] pub fn set_backface_visibility(&self, value: CompositionBackfaceVisibility) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BackfaceVisibility)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_border_mode(&self) -> Result { + }} + #[inline] pub fn get_border_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BorderMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_border_mode(&self, value: CompositionBorderMode) -> Result<()> { + }} + #[inline] pub fn set_border_mode(&self, value: CompositionBorderMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BorderMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_center_point(&self) -> Result { + }} + #[inline] pub fn get_center_point(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CenterPoint)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_center_point(&self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + }} + #[inline] pub fn set_center_point(&self, value: foundation::numerics::Vector3) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CenterPoint)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_clip(&self) -> Result> { + }} + #[inline] pub fn get_clip(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Clip)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_clip(&self, value: &CompositionClip) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_clip(&self, value: &CompositionClip) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Clip)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_composite_mode(&self) -> Result { + }} + #[inline] pub fn get_composite_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CompositeMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_composite_mode(&self, value: CompositionCompositeMode) -> Result<()> { + }} + #[inline] pub fn set_composite_mode(&self, value: CompositionCompositeMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CompositeMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_visible(&self) -> Result { + }} + #[inline] pub fn get_is_visible(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsVisible)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_visible(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_visible(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsVisible)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_offset(&self) -> Result { + }} + #[inline] pub fn get_offset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Offset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_offset(&self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + }} + #[inline] pub fn set_offset(&self, value: foundation::numerics::Vector3) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Offset)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_opacity(&self) -> Result { + }} + #[inline] pub fn get_opacity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Opacity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_opacity(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_opacity(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Opacity)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_orientation(&self) -> Result { + }} + #[inline] pub fn get_orientation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Orientation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_orientation(&self, value: super::super::foundation::numerics::Quaternion) -> Result<()> { + }} + #[inline] pub fn set_orientation(&self, value: foundation::numerics::Quaternion) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Orientation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_parent(&self) -> Result> { + }} + #[inline] pub fn get_parent(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Parent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_rotation_angle(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_rotation_angle(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RotationAngle)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_rotation_angle(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_rotation_angle(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RotationAngle)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_rotation_angle_in_degrees(&self) -> Result { + }} + #[inline] pub fn get_rotation_angle_in_degrees(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RotationAngleInDegrees)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_rotation_angle_in_degrees(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_rotation_angle_in_degrees(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RotationAngleInDegrees)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_rotation_axis(&self) -> Result { + }} + #[inline] pub fn get_rotation_axis(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RotationAxis)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_rotation_axis(&self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + }} + #[inline] pub fn set_rotation_axis(&self, value: foundation::numerics::Vector3) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RotationAxis)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_scale(&self) -> Result { + }} + #[inline] pub fn get_scale(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Scale)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_scale(&self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + }} + #[inline] pub fn set_scale(&self, value: foundation::numerics::Vector3) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Scale)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_size(&self) -> Result { + }} + #[inline] pub fn get_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Size)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_size(&self, value: super::super::foundation::numerics::Vector2) -> Result<()> { + }} + #[inline] pub fn set_size(&self, value: foundation::numerics::Vector2) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Size)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_transform_matrix(&self) -> Result { + }} + #[inline] pub fn get_transform_matrix(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TransformMatrix)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_transform_matrix(&self, value: super::super::foundation::numerics::Matrix4x4) -> Result<()> { + }} + #[inline] pub fn set_transform_matrix(&self, value: foundation::numerics::Matrix4x4) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TransformMatrix)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Visual: IVisual} DEFINE_IID!(IID_IVisual2, 810726929, 22211, 19518, 139, 243, 246, 225, 173, 71, 63, 6); RT_INTERFACE!{interface IVisual2(IVisual2Vtbl): IInspectable(IInspectableVtbl) [IID_IVisual2] { fn get_ParentForTransform(&self, out: *mut *mut Visual) -> HRESULT, fn put_ParentForTransform(&self, value: *mut Visual) -> HRESULT, - fn get_RelativeOffsetAdjustment(&self, out: *mut super::super::foundation::numerics::Vector3) -> HRESULT, - fn put_RelativeOffsetAdjustment(&self, value: super::super::foundation::numerics::Vector3) -> HRESULT, - fn get_RelativeSizeAdjustment(&self, out: *mut super::super::foundation::numerics::Vector2) -> HRESULT, - fn put_RelativeSizeAdjustment(&self, value: super::super::foundation::numerics::Vector2) -> HRESULT + fn get_RelativeOffsetAdjustment(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, + fn put_RelativeOffsetAdjustment(&self, value: foundation::numerics::Vector3) -> HRESULT, + fn get_RelativeSizeAdjustment(&self, out: *mut foundation::numerics::Vector2) -> HRESULT, + fn put_RelativeSizeAdjustment(&self, value: foundation::numerics::Vector2) -> HRESULT }} impl IVisual2 { - #[inline] pub unsafe fn get_parent_for_transform(&self) -> Result> { + #[inline] pub fn get_parent_for_transform(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ParentForTransform)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_parent_for_transform(&self, value: &Visual) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_parent_for_transform(&self, value: &Visual) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ParentForTransform)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_relative_offset_adjustment(&self) -> Result { + }} + #[inline] pub fn get_relative_offset_adjustment(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RelativeOffsetAdjustment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_relative_offset_adjustment(&self, value: super::super::foundation::numerics::Vector3) -> Result<()> { + }} + #[inline] pub fn set_relative_offset_adjustment(&self, value: foundation::numerics::Vector3) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RelativeOffsetAdjustment)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_relative_size_adjustment(&self) -> Result { + }} + #[inline] pub fn get_relative_size_adjustment(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RelativeSizeAdjustment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_relative_size_adjustment(&self, value: super::super::foundation::numerics::Vector2) -> Result<()> { + }} + #[inline] pub fn set_relative_size_adjustment(&self, value: foundation::numerics::Vector2) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RelativeSizeAdjustment)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IVisualCollection, 2339656965, 64830, 19096, 132, 168, 233, 73, 70, 140, 107, 203); RT_INTERFACE!{interface IVisualCollection(IVisualCollectionVtbl): IInspectable(IInspectableVtbl) [IID_IVisualCollection] { @@ -18705,35 +18705,35 @@ RT_INTERFACE!{interface IVisualCollection(IVisualCollectionVtbl): IInspectable(I fn RemoveAll(&self) -> HRESULT }} impl IVisualCollection { - #[inline] pub unsafe fn get_count(&self) -> Result { + #[inline] pub fn get_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Count)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn insert_above(&self, newChild: &Visual, sibling: &Visual) -> Result<()> { + }} + #[inline] pub fn insert_above(&self, newChild: &Visual, sibling: &Visual) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InsertAbove)(self as *const _ as *mut _, 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(&self, newChild: &Visual) -> Result<()> { + }} + #[inline] pub fn insert_at_bottom(&self, newChild: &Visual) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InsertAtBottom)(self as *const _ as *mut _, newChild as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn insert_at_top(&self, newChild: &Visual) -> Result<()> { + }} + #[inline] pub fn insert_at_top(&self, newChild: &Visual) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InsertAtTop)(self as *const _ as *mut _, newChild as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn insert_below(&self, newChild: &Visual, sibling: &Visual) -> Result<()> { + }} + #[inline] pub fn insert_below(&self, newChild: &Visual, sibling: &Visual) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InsertBelow)(self as *const _ as *mut _, newChild as *const _ as *mut _, sibling as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove(&self, child: &Visual) -> Result<()> { + }} + #[inline] pub fn remove(&self, child: &Visual) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Remove)(self as *const _ as *mut _, child as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove_all(&self) -> Result<()> { + }} + #[inline] pub fn remove_all(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveAll)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class VisualCollection: IVisualCollection} DEFINE_IID!(IID_IVisualFactory, 2903505214, 46338, 20149, 135, 180, 154, 56, 167, 29, 1, 55); @@ -18748,23 +18748,23 @@ RT_INTERFACE!{interface IVisualUnorderedCollection(IVisualUnorderedCollectionVtb fn RemoveAll(&self) -> HRESULT }} impl IVisualUnorderedCollection { - #[inline] pub unsafe fn get_count(&self) -> Result { + #[inline] pub fn get_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Count)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add(&self, newVisual: &Visual) -> Result<()> { + }} + #[inline] pub fn add(&self, newVisual: &Visual) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Add)(self as *const _ as *mut _, newVisual as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove(&self, visual: &Visual) -> Result<()> { + }} + #[inline] pub fn remove(&self, visual: &Visual) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Remove)(self as *const _ as *mut _, visual as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove_all(&self) -> Result<()> { + }} + #[inline] pub fn remove_all(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveAll)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class VisualUnorderedCollection: IVisualUnorderedCollection} pub mod effects { // Windows.UI.Composition.Effects @@ -18785,51 +18785,51 @@ RT_INTERFACE!{interface ISceneLightingEffect(ISceneLightingEffectVtbl): IInspect fn put_SpecularShine(&self, value: f32) -> HRESULT }} impl ISceneLightingEffect { - #[inline] pub unsafe fn get_ambient_amount(&self) -> Result { + #[inline] pub fn get_ambient_amount(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AmbientAmount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_ambient_amount(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_ambient_amount(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AmbientAmount)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_diffuse_amount(&self) -> Result { + }} + #[inline] pub fn get_diffuse_amount(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DiffuseAmount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_diffuse_amount(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_diffuse_amount(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DiffuseAmount)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-graphics")] #[inline] pub unsafe fn get_normal_map_source(&self) -> Result> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn get_normal_map_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NormalMapSource)(self 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_normal_map_source(&self, value: &::rt::gen::windows::graphics::effects::IGraphicsEffectSource) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn set_normal_map_source(&self, value: &::rt::gen::windows::graphics::effects::IGraphicsEffectSource) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_NormalMapSource)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_specular_amount(&self) -> Result { + }} + #[inline] pub fn get_specular_amount(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SpecularAmount)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_specular_amount(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_specular_amount(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SpecularAmount)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_specular_shine(&self) -> Result { + }} + #[inline] pub fn get_specular_shine(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_SpecularShine)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_specular_shine(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_specular_shine(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_SpecularShine)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class SceneLightingEffect: ISceneLightingEffect} impl RtActivatable for SceneLightingEffect {} @@ -18840,15 +18840,15 @@ RT_INTERFACE!{interface ISceneLightingEffect2(ISceneLightingEffect2Vtbl): IInspe fn put_ReflectanceModel(&self, value: SceneLightingEffectReflectanceModel) -> HRESULT }} impl ISceneLightingEffect2 { - #[inline] pub unsafe fn get_reflectance_model(&self) -> Result { + #[inline] pub fn get_reflectance_model(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ReflectanceModel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_reflectance_model(&self, value: SceneLightingEffectReflectanceModel) -> Result<()> { + }} + #[inline] pub fn set_reflectance_model(&self, value: SceneLightingEffectReflectanceModel) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ReflectanceModel)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum SceneLightingEffectReflectanceModel: i32 { BlinnPhong (SceneLightingEffectReflectanceModel_BlinnPhong) = 0, PhysicallyBasedBlinnPhong (SceneLightingEffectReflectanceModel_PhysicallyBasedBlinnPhong) = 1, @@ -18864,31 +18864,31 @@ RT_INTERFACE!{interface ICompositionConditionalValue(ICompositionConditionalValu fn put_Value(&self, value: *mut super::ExpressionAnimation) -> HRESULT }} impl ICompositionConditionalValue { - #[inline] pub unsafe fn get_condition(&self) -> Result> { + #[inline] pub fn get_condition(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Condition)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_condition(&self, value: &super::ExpressionAnimation) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_condition(&self, value: &super::ExpressionAnimation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Condition)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result> { + }} + #[inline] pub fn get_value(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_value(&self, value: &super::ExpressionAnimation) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_value(&self, value: &super::ExpressionAnimation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Value)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CompositionConditionalValue: ICompositionConditionalValue} impl RtActivatable for CompositionConditionalValue {} impl CompositionConditionalValue { - #[inline] pub fn create(compositor: &super::Compositor) -> Result> { unsafe { + #[inline] pub fn create(compositor: &super::Compositor) -> Result>> { >::get_activation_factory().create(compositor) - }} + } } DEFINE_CLSID!(CompositionConditionalValue(&[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,67,111,109,112,111,115,105,116,105,111,110,67,111,110,100,105,116,105,111,110,97,108,86,97,108,117,101,0]) [CLSID_CompositionConditionalValue]); DEFINE_IID!(IID_ICompositionConditionalValueStatics, 151800690, 33895, 19722, 144, 101, 172, 70, 184, 10, 85, 34); @@ -18896,11 +18896,11 @@ RT_INTERFACE!{static interface ICompositionConditionalValueStatics(ICompositionC fn Create(&self, compositor: *mut super::Compositor, out: *mut *mut CompositionConditionalValue) -> HRESULT }} impl ICompositionConditionalValueStatics { - #[inline] pub unsafe fn create(&self, compositor: &super::Compositor) -> Result> { + #[inline] pub fn create(&self, compositor: &super::Compositor) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, compositor as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_ICompositionInteractionSource, 70984753, 1763, 18778, 186, 84, 64, 159, 0, 23, 250, 192); RT_INTERFACE!{interface ICompositionInteractionSource(ICompositionInteractionSourceVtbl): IInspectable(IInspectableVtbl) [IID_ICompositionInteractionSource] { @@ -18914,23 +18914,23 @@ RT_INTERFACE!{interface ICompositionInteractionSourceCollection(ICompositionInte fn RemoveAll(&self) -> HRESULT }} impl ICompositionInteractionSourceCollection { - #[inline] pub unsafe fn get_count(&self) -> Result { + #[inline] pub fn get_count(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Count)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add(&self, value: &ICompositionInteractionSource) -> Result<()> { + }} + #[inline] pub fn add(&self, value: &ICompositionInteractionSource) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Add)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove(&self, value: &ICompositionInteractionSource) -> Result<()> { + }} + #[inline] pub fn remove(&self, value: &ICompositionInteractionSource) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Remove)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn remove_all(&self) -> Result<()> { + }} + #[inline] pub fn remove_all(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveAll)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class CompositionInteractionSourceCollection: ICompositionInteractionSourceCollection} RT_ENUM! { enum InteractionChainingMode: i32 { @@ -18943,240 +18943,240 @@ DEFINE_IID!(IID_IInteractionTracker, 713985201, 4096, 17430, 131, 99, 204, 39, 2 RT_INTERFACE!{interface IInteractionTracker(IInteractionTrackerVtbl): IInspectable(IInspectableVtbl) [IID_IInteractionTracker] { fn get_InteractionSources(&self, out: *mut *mut CompositionInteractionSourceCollection) -> HRESULT, fn get_IsPositionRoundingSuggested(&self, out: *mut bool) -> HRESULT, - fn get_MaxPosition(&self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, - fn put_MaxPosition(&self, value: ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, + fn get_MaxPosition(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, + fn put_MaxPosition(&self, value: foundation::numerics::Vector3) -> HRESULT, fn get_MaxScale(&self, out: *mut f32) -> HRESULT, fn put_MaxScale(&self, value: f32) -> HRESULT, - fn get_MinPosition(&self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, - fn put_MinPosition(&self, value: ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, + fn get_MinPosition(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, + fn put_MinPosition(&self, value: foundation::numerics::Vector3) -> HRESULT, fn get_MinScale(&self, out: *mut f32) -> HRESULT, fn put_MinScale(&self, value: f32) -> HRESULT, - fn get_NaturalRestingPosition(&self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, + fn get_NaturalRestingPosition(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, fn get_NaturalRestingScale(&self, out: *mut f32) -> HRESULT, fn get_Owner(&self, out: *mut *mut IInteractionTrackerOwner) -> HRESULT, - fn get_Position(&self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, - fn get_PositionInertiaDecayRate(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::numerics::Vector3>) -> HRESULT, - fn put_PositionInertiaDecayRate(&self, value: *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::numerics::Vector3>) -> HRESULT, - fn get_PositionVelocityInPixelsPerSecond(&self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, + fn get_Position(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, + fn get_PositionInertiaDecayRate(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_PositionInertiaDecayRate(&self, value: *mut foundation::IReference) -> HRESULT, + fn get_PositionVelocityInPixelsPerSecond(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, fn get_Scale(&self, out: *mut f32) -> HRESULT, - fn get_ScaleInertiaDecayRate(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn put_ScaleInertiaDecayRate(&self, value: *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, + fn get_ScaleInertiaDecayRate(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_ScaleInertiaDecayRate(&self, value: *mut foundation::IReference) -> HRESULT, fn get_ScaleVelocityInPercentPerSecond(&self, out: *mut f32) -> HRESULT, fn AdjustPositionXIfGreaterThanThreshold(&self, adjustment: f32, positionThreshold: f32) -> HRESULT, fn AdjustPositionYIfGreaterThanThreshold(&self, adjustment: f32, positionThreshold: f32) -> HRESULT, - fn ConfigurePositionXInertiaModifiers(&self, modifiers: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT, - fn ConfigurePositionYInertiaModifiers(&self, modifiers: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT, - fn ConfigureScaleInertiaModifiers(&self, modifiers: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT, - fn TryUpdatePosition(&self, value: ::rt::gen::windows::foundation::numerics::Vector3, out: *mut i32) -> HRESULT, - fn TryUpdatePositionBy(&self, amount: ::rt::gen::windows::foundation::numerics::Vector3, out: *mut i32) -> HRESULT, + fn ConfigurePositionXInertiaModifiers(&self, modifiers: *mut foundation::collections::IIterable) -> HRESULT, + fn ConfigurePositionYInertiaModifiers(&self, modifiers: *mut foundation::collections::IIterable) -> HRESULT, + fn ConfigureScaleInertiaModifiers(&self, modifiers: *mut foundation::collections::IIterable) -> HRESULT, + fn TryUpdatePosition(&self, value: foundation::numerics::Vector3, out: *mut i32) -> HRESULT, + fn TryUpdatePositionBy(&self, amount: foundation::numerics::Vector3, out: *mut i32) -> HRESULT, fn TryUpdatePositionWithAnimation(&self, animation: *mut super::CompositionAnimation, out: *mut i32) -> HRESULT, - fn TryUpdatePositionWithAdditionalVelocity(&self, velocityInPixelsPerSecond: ::rt::gen::windows::foundation::numerics::Vector3, out: *mut i32) -> HRESULT, - fn TryUpdateScale(&self, value: f32, centerPoint: ::rt::gen::windows::foundation::numerics::Vector3, out: *mut i32) -> HRESULT, - fn TryUpdateScaleWithAnimation(&self, animation: *mut super::CompositionAnimation, centerPoint: ::rt::gen::windows::foundation::numerics::Vector3, out: *mut i32) -> HRESULT, - fn TryUpdateScaleWithAdditionalVelocity(&self, velocityInPercentPerSecond: f32, centerPoint: ::rt::gen::windows::foundation::numerics::Vector3, out: *mut i32) -> HRESULT + fn TryUpdatePositionWithAdditionalVelocity(&self, velocityInPixelsPerSecond: foundation::numerics::Vector3, out: *mut i32) -> HRESULT, + fn TryUpdateScale(&self, value: f32, centerPoint: foundation::numerics::Vector3, out: *mut i32) -> HRESULT, + fn TryUpdateScaleWithAnimation(&self, animation: *mut super::CompositionAnimation, centerPoint: foundation::numerics::Vector3, out: *mut i32) -> HRESULT, + fn TryUpdateScaleWithAdditionalVelocity(&self, velocityInPercentPerSecond: f32, centerPoint: foundation::numerics::Vector3, out: *mut i32) -> HRESULT }} impl IInteractionTracker { - #[inline] pub unsafe fn get_interaction_sources(&self) -> Result> { + #[inline] pub fn get_interaction_sources(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_InteractionSources)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_position_rounding_suggested(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_position_rounding_suggested(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPositionRoundingSuggested)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_position(&self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + }} + #[inline] pub fn get_max_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxPosition)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_position(&self, value: ::rt::gen::windows::foundation::numerics::Vector3) -> Result<()> { + }} + #[inline] pub fn set_max_position(&self, value: foundation::numerics::Vector3) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxPosition)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_scale(&self) -> Result { + }} + #[inline] pub fn get_max_scale(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxScale)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_scale(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_max_scale(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxScale)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_position(&self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + }} + #[inline] pub fn get_min_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinPosition)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_min_position(&self, value: ::rt::gen::windows::foundation::numerics::Vector3) -> Result<()> { + }} + #[inline] pub fn set_min_position(&self, value: foundation::numerics::Vector3) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MinPosition)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_scale(&self) -> Result { + }} + #[inline] pub fn get_min_scale(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinScale)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_min_scale(&self, value: f32) -> Result<()> { + }} + #[inline] pub fn set_min_scale(&self, value: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MinScale)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_natural_resting_position(&self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + }} + #[inline] pub fn get_natural_resting_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NaturalRestingPosition)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_natural_resting_scale(&self) -> Result { + }} + #[inline] pub fn get_natural_resting_scale(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NaturalRestingScale)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_owner(&self) -> Result> { + }} + #[inline] pub fn get_owner(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Owner)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_position(&self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_position_inertia_decay_rate(&self) -> Result>> { + }} + #[inline] pub fn get_position_inertia_decay_rate(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PositionInertiaDecayRate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_position_inertia_decay_rate(&self, value: &::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::numerics::Vector3>) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_position_inertia_decay_rate(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PositionInertiaDecayRate)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_position_velocity_in_pixels_per_second(&self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + }} + #[inline] pub fn get_position_velocity_in_pixels_per_second(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PositionVelocityInPixelsPerSecond)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_scale(&self) -> Result { + }} + #[inline] pub fn get_scale(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Scale)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_scale_inertia_decay_rate(&self) -> Result>> { + }} + #[inline] pub fn get_scale_inertia_decay_rate(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ScaleInertiaDecayRate)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_scale_inertia_decay_rate(&self, value: &::rt::gen::windows::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_scale_inertia_decay_rate(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ScaleInertiaDecayRate)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_scale_velocity_in_percent_per_second(&self) -> Result { + }} + #[inline] pub fn get_scale_velocity_in_percent_per_second(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ScaleVelocityInPercentPerSecond)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn adjust_position_xif_greater_than_threshold(&self, adjustment: f32, positionThreshold: f32) -> Result<()> { + }} + #[inline] pub fn adjust_position_xif_greater_than_threshold(&self, adjustment: f32, positionThreshold: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AdjustPositionXIfGreaterThanThreshold)(self as *const _ as *mut _, adjustment, positionThreshold); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn adjust_position_yif_greater_than_threshold(&self, adjustment: f32, positionThreshold: f32) -> Result<()> { + }} + #[inline] pub fn adjust_position_yif_greater_than_threshold(&self, adjustment: f32, positionThreshold: f32) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AdjustPositionYIfGreaterThanThreshold)(self as *const _ as *mut _, adjustment, positionThreshold); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn configure_position_xinertia_modifiers(&self, modifiers: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + }} + #[inline] pub fn configure_position_xinertia_modifiers(&self, modifiers: &foundation::collections::IIterable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ConfigurePositionXInertiaModifiers)(self as *const _ as *mut _, modifiers as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn configure_position_yinertia_modifiers(&self, modifiers: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + }} + #[inline] pub fn configure_position_yinertia_modifiers(&self, modifiers: &foundation::collections::IIterable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ConfigurePositionYInertiaModifiers)(self as *const _ as *mut _, modifiers as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn configure_scale_inertia_modifiers(&self, modifiers: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + }} + #[inline] pub fn configure_scale_inertia_modifiers(&self, modifiers: &foundation::collections::IIterable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ConfigureScaleInertiaModifiers)(self as *const _ as *mut _, modifiers as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn try_update_position(&self, value: ::rt::gen::windows::foundation::numerics::Vector3) -> Result { + }} + #[inline] pub fn try_update_position(&self, value: foundation::numerics::Vector3) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TryUpdatePosition)(self as *const _ as *mut _, value, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn try_update_position_by(&self, amount: ::rt::gen::windows::foundation::numerics::Vector3) -> Result { + }} + #[inline] pub fn try_update_position_by(&self, amount: foundation::numerics::Vector3) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TryUpdatePositionBy)(self as *const _ as *mut _, amount, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn try_update_position_with_animation(&self, animation: &super::CompositionAnimation) -> Result { + }} + #[inline] pub fn try_update_position_with_animation(&self, animation: &super::CompositionAnimation) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TryUpdatePositionWithAnimation)(self as *const _ as *mut _, 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(&self, velocityInPixelsPerSecond: ::rt::gen::windows::foundation::numerics::Vector3) -> Result { + }} + #[inline] pub fn try_update_position_with_additional_velocity(&self, velocityInPixelsPerSecond: foundation::numerics::Vector3) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TryUpdatePositionWithAdditionalVelocity)(self as *const _ as *mut _, velocityInPixelsPerSecond, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn try_update_scale(&self, value: f32, centerPoint: ::rt::gen::windows::foundation::numerics::Vector3) -> Result { + }} + #[inline] pub fn try_update_scale(&self, value: f32, centerPoint: foundation::numerics::Vector3) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TryUpdateScale)(self as *const _ as *mut _, value, centerPoint, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn try_update_scale_with_animation(&self, animation: &super::CompositionAnimation, centerPoint: ::rt::gen::windows::foundation::numerics::Vector3) -> Result { + }} + #[inline] pub fn try_update_scale_with_animation(&self, animation: &super::CompositionAnimation, centerPoint: foundation::numerics::Vector3) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TryUpdateScaleWithAnimation)(self as *const _ as *mut _, 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(&self, velocityInPercentPerSecond: f32, centerPoint: ::rt::gen::windows::foundation::numerics::Vector3) -> Result { + }} + #[inline] pub fn try_update_scale_with_additional_velocity(&self, velocityInPercentPerSecond: f32, centerPoint: foundation::numerics::Vector3) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TryUpdateScaleWithAdditionalVelocity)(self as *const _ as *mut _, velocityInPercentPerSecond, centerPoint, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class InteractionTracker: IInteractionTracker} impl RtActivatable for InteractionTracker {} impl InteractionTracker { - #[inline] pub fn create(compositor: &super::Compositor) -> Result> { unsafe { + #[inline] pub fn create(compositor: &super::Compositor) -> Result>> { >::get_activation_factory().create(compositor) - }} - #[inline] pub fn create_with_owner(compositor: &super::Compositor, owner: &IInteractionTrackerOwner) -> Result> { unsafe { + } + #[inline] pub fn create_with_owner(compositor: &super::Compositor, owner: &IInteractionTrackerOwner) -> Result>> { >::get_activation_factory().create_with_owner(compositor, owner) - }} + } } DEFINE_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]) [CLSID_InteractionTracker]); DEFINE_IID!(IID_IInteractionTracker2, 628529726, 52845, 17548, 131, 134, 146, 98, 13, 36, 7, 86); RT_INTERFACE!{interface IInteractionTracker2(IInteractionTracker2Vtbl): IInspectable(IInspectableVtbl) [IID_IInteractionTracker2] { - fn ConfigureCenterPointXInertiaModifiers(&self, conditionalValues: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT, - fn ConfigureCenterPointYInertiaModifiers(&self, conditionalValues: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT + fn ConfigureCenterPointXInertiaModifiers(&self, conditionalValues: *mut foundation::collections::IIterable) -> HRESULT, + fn ConfigureCenterPointYInertiaModifiers(&self, conditionalValues: *mut foundation::collections::IIterable) -> HRESULT }} impl IInteractionTracker2 { - #[inline] pub unsafe fn configure_center_point_xinertia_modifiers(&self, conditionalValues: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + #[inline] pub fn configure_center_point_xinertia_modifiers(&self, conditionalValues: &foundation::collections::IIterable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ConfigureCenterPointXInertiaModifiers)(self as *const _ as *mut _, conditionalValues as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn configure_center_point_yinertia_modifiers(&self, conditionalValues: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + }} + #[inline] pub fn configure_center_point_yinertia_modifiers(&self, conditionalValues: &foundation::collections::IIterable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ConfigureCenterPointYInertiaModifiers)(self as *const _ as *mut _, conditionalValues as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IInteractionTracker3, 3871725474, 23627, 17094, 132, 183, 246, 148, 65, 177, 128, 145); RT_INTERFACE!{interface IInteractionTracker3(IInteractionTracker3Vtbl): IInspectable(IInspectableVtbl) [IID_IInteractionTracker3] { - fn ConfigureVector2PositionInertiaModifiers(&self, modifiers: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT + fn ConfigureVector2PositionInertiaModifiers(&self, modifiers: *mut foundation::collections::IIterable) -> HRESULT }} impl IInteractionTracker3 { - #[inline] pub unsafe fn configure_vector2_position_inertia_modifiers(&self, modifiers: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + #[inline] pub fn configure_vector2_position_inertia_modifiers(&self, modifiers: &foundation::collections::IIterable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ConfigureVector2PositionInertiaModifiers)(self as *const _ as *mut _, modifiers as *const _ as *mut _); if hr == S_OK { Ok(()) } 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(&self, out: *mut i32) -> HRESULT }} impl IInteractionTrackerCustomAnimationStateEnteredArgs { - #[inline] pub unsafe fn get_request_id(&self) -> Result { + #[inline] pub fn get_request_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RequestId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class InteractionTrackerCustomAnimationStateEnteredArgs: IInteractionTrackerCustomAnimationStateEnteredArgs} DEFINE_IID!(IID_IInteractionTrackerIdleStateEnteredArgs, 1342255018, 5392, 16706, 161, 165, 1, 155, 9, 248, 133, 123); @@ -19184,11 +19184,11 @@ RT_INTERFACE!{interface IInteractionTrackerIdleStateEnteredArgs(IInteractionTrac fn get_RequestId(&self, out: *mut i32) -> HRESULT }} impl IInteractionTrackerIdleStateEnteredArgs { - #[inline] pub unsafe fn get_request_id(&self) -> Result { + #[inline] pub fn get_request_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RequestId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class InteractionTrackerIdleStateEnteredArgs: IInteractionTrackerIdleStateEnteredArgs} DEFINE_IID!(IID_IInteractionTrackerInertiaModifier, 2699217184, 9908, 19874, 139, 97, 94, 104, 57, 121, 187, 226); @@ -19208,31 +19208,31 @@ RT_INTERFACE!{interface IInteractionTrackerInertiaMotion(IInteractionTrackerIner fn put_Motion(&self, value: *mut super::ExpressionAnimation) -> HRESULT }} impl IInteractionTrackerInertiaMotion { - #[inline] pub unsafe fn get_condition(&self) -> Result> { + #[inline] pub fn get_condition(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Condition)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_condition(&self, value: &super::ExpressionAnimation) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_condition(&self, value: &super::ExpressionAnimation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Condition)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_motion(&self) -> Result> { + }} + #[inline] pub fn get_motion(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Motion)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_motion(&self, value: &super::ExpressionAnimation) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_motion(&self, value: &super::ExpressionAnimation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Motion)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class InteractionTrackerInertiaMotion: IInteractionTrackerInertiaMotion} impl RtActivatable for InteractionTrackerInertiaMotion {} impl InteractionTrackerInertiaMotion { - #[inline] pub fn create(compositor: &super::Compositor) -> Result> { unsafe { + #[inline] pub fn create(compositor: &super::Compositor) -> Result>> { >::get_activation_factory().create(compositor) - }} + } } DEFINE_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]) [CLSID_InteractionTrackerInertiaMotion]); DEFINE_IID!(IID_IInteractionTrackerInertiaMotionStatics, 2361933270, 47739, 17178, 132, 75, 110, 172, 145, 48, 249, 154); @@ -19240,11 +19240,11 @@ RT_INTERFACE!{static interface IInteractionTrackerInertiaMotionStatics(IInteract fn Create(&self, compositor: *mut super::Compositor, out: *mut *mut InteractionTrackerInertiaMotion) -> HRESULT }} impl IInteractionTrackerInertiaMotionStatics { - #[inline] pub unsafe fn create(&self, compositor: &super::Compositor) -> Result> { + #[inline] pub fn create(&self, compositor: &super::Compositor) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, compositor as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IInteractionTrackerInertiaNaturalMotion, 1890376366, 10204, 18669, 163, 195, 109, 97, 201, 160, 41, 210); RT_INTERFACE!{interface IInteractionTrackerInertiaNaturalMotion(IInteractionTrackerInertiaNaturalMotionVtbl): IInspectable(IInspectableVtbl) [IID_IInteractionTrackerInertiaNaturalMotion] { @@ -19254,31 +19254,31 @@ RT_INTERFACE!{interface IInteractionTrackerInertiaNaturalMotion(IInteractionTrac fn put_NaturalMotion(&self, value: *mut super::ScalarNaturalMotionAnimation) -> HRESULT }} impl IInteractionTrackerInertiaNaturalMotion { - #[inline] pub unsafe fn get_condition(&self) -> Result> { + #[inline] pub fn get_condition(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Condition)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_condition(&self, value: &super::ExpressionAnimation) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_condition(&self, value: &super::ExpressionAnimation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Condition)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_natural_motion(&self) -> Result> { + }} + #[inline] pub fn get_natural_motion(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NaturalMotion)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_natural_motion(&self, value: &super::ScalarNaturalMotionAnimation) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_natural_motion(&self, value: &super::ScalarNaturalMotionAnimation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_NaturalMotion)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class InteractionTrackerInertiaNaturalMotion: IInteractionTrackerInertiaNaturalMotion} impl RtActivatable for InteractionTrackerInertiaNaturalMotion {} impl InteractionTrackerInertiaNaturalMotion { - #[inline] pub fn create(compositor: &super::Compositor) -> Result> { unsafe { + #[inline] pub fn create(compositor: &super::Compositor) -> Result>> { >::get_activation_factory().create(compositor) - }} + } } DEFINE_CLSID!(InteractionTrackerInertiaNaturalMotion(&[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,78,97,116,117,114,97,108,77,111,116,105,111,110,0]) [CLSID_InteractionTrackerInertiaNaturalMotion]); DEFINE_IID!(IID_IInteractionTrackerInertiaNaturalMotionStatics, 3487192496, 24126, 17033, 147, 45, 238, 95, 80, 231, 66, 131); @@ -19286,11 +19286,11 @@ RT_INTERFACE!{static interface IInteractionTrackerInertiaNaturalMotionStatics(II fn Create(&self, compositor: *mut super::Compositor, out: *mut *mut InteractionTrackerInertiaNaturalMotion) -> HRESULT }} impl IInteractionTrackerInertiaNaturalMotionStatics { - #[inline] pub unsafe fn create(&self, compositor: &super::Compositor) -> Result> { + #[inline] pub fn create(&self, compositor: &super::Compositor) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, compositor as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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] { @@ -19300,31 +19300,31 @@ RT_INTERFACE!{interface IInteractionTrackerInertiaRestingValue(IInteractionTrack fn put_RestingValue(&self, value: *mut super::ExpressionAnimation) -> HRESULT }} impl IInteractionTrackerInertiaRestingValue { - #[inline] pub unsafe fn get_condition(&self) -> Result> { + #[inline] pub fn get_condition(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Condition)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_condition(&self, value: &super::ExpressionAnimation) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_condition(&self, value: &super::ExpressionAnimation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Condition)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_resting_value(&self) -> Result> { + }} + #[inline] pub fn get_resting_value(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RestingValue)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_resting_value(&self, value: &super::ExpressionAnimation) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_resting_value(&self, value: &super::ExpressionAnimation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RestingValue)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class InteractionTrackerInertiaRestingValue: IInteractionTrackerInertiaRestingValue} impl RtActivatable for InteractionTrackerInertiaRestingValue {} impl InteractionTrackerInertiaRestingValue { - #[inline] pub fn create(compositor: &super::Compositor) -> Result> { unsafe { + #[inline] pub fn create(compositor: &super::Compositor) -> Result>> { >::get_activation_factory().create(compositor) - }} + } } DEFINE_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]) [CLSID_InteractionTrackerInertiaRestingValue]); DEFINE_IID!(IID_IInteractionTrackerInertiaRestingValueStatics, 418203289, 1861, 16534, 188, 171, 58, 78, 153, 86, 155, 207); @@ -19332,58 +19332,58 @@ RT_INTERFACE!{static interface IInteractionTrackerInertiaRestingValueStatics(IIn fn Create(&self, compositor: *mut super::Compositor, out: *mut *mut InteractionTrackerInertiaRestingValue) -> HRESULT }} impl IInteractionTrackerInertiaRestingValueStatics { - #[inline] pub unsafe fn create(&self, compositor: &super::Compositor) -> Result> { + #[inline] pub fn create(&self, compositor: &super::Compositor) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, compositor as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } 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(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference<::rt::gen::windows::foundation::numerics::Vector3>) -> HRESULT, - fn get_ModifiedRestingScale(&self, out: *mut *mut ::rt::gen::windows::foundation::IReference) -> HRESULT, - fn get_NaturalRestingPosition(&self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, + fn get_ModifiedRestingPosition(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_ModifiedRestingScale(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn get_NaturalRestingPosition(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, fn get_NaturalRestingScale(&self, out: *mut f32) -> HRESULT, - fn get_PositionVelocityInPixelsPerSecond(&self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, + fn get_PositionVelocityInPixelsPerSecond(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, fn get_RequestId(&self, out: *mut i32) -> HRESULT, fn get_ScaleVelocityInPercentPerSecond(&self, out: *mut f32) -> HRESULT }} impl IInteractionTrackerInertiaStateEnteredArgs { - #[inline] pub unsafe fn get_modified_resting_position(&self) -> Result>> { + #[inline] pub fn get_modified_resting_position(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ModifiedRestingPosition)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_modified_resting_scale(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_modified_resting_scale(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ModifiedRestingScale)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_natural_resting_position(&self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_natural_resting_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NaturalRestingPosition)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_natural_resting_scale(&self) -> Result { + }} + #[inline] pub fn get_natural_resting_scale(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NaturalRestingScale)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_position_velocity_in_pixels_per_second(&self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + }} + #[inline] pub fn get_position_velocity_in_pixels_per_second(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PositionVelocityInPixelsPerSecond)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_request_id(&self) -> Result { + }} + #[inline] pub fn get_request_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RequestId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_scale_velocity_in_percent_per_second(&self) -> Result { + }} + #[inline] pub fn get_scale_velocity_in_percent_per_second(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ScaleVelocityInPercentPerSecond)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class InteractionTrackerInertiaStateEnteredArgs: IInteractionTrackerInertiaStateEnteredArgs} DEFINE_IID!(IID_IInteractionTrackerInteractingStateEnteredArgs, 2804300089, 41339, 16401, 153, 253, 181, 194, 79, 20, 55, 72); @@ -19391,11 +19391,11 @@ RT_INTERFACE!{interface IInteractionTrackerInteractingStateEnteredArgs(IInteract fn get_RequestId(&self, out: *mut i32) -> HRESULT }} impl IInteractionTrackerInteractingStateEnteredArgs { - #[inline] pub unsafe fn get_request_id(&self) -> Result { + #[inline] pub fn get_request_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RequestId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class InteractionTrackerInteractingStateEnteredArgs: IInteractionTrackerInteractingStateEnteredArgs} DEFINE_IID!(IID_IInteractionTrackerOwner, 3677260531, 19947, 20051, 178, 156, 176, 108, 159, 150, 214, 81); @@ -19408,41 +19408,41 @@ RT_INTERFACE!{interface IInteractionTrackerOwner(IInteractionTrackerOwnerVtbl): fn ValuesChanged(&self, sender: *mut InteractionTracker, args: *mut InteractionTrackerValuesChangedArgs) -> HRESULT }} impl IInteractionTrackerOwner { - #[inline] pub unsafe fn custom_animation_state_entered(&self, sender: &InteractionTracker, args: &InteractionTrackerCustomAnimationStateEnteredArgs) -> Result<()> { + #[inline] pub fn custom_animation_state_entered(&self, sender: &InteractionTracker, args: &InteractionTrackerCustomAnimationStateEnteredArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).CustomAnimationStateEntered)(self as *const _ as *mut _, 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(&self, sender: &InteractionTracker, args: &InteractionTrackerIdleStateEnteredArgs) -> Result<()> { + }} + #[inline] pub fn idle_state_entered(&self, sender: &InteractionTracker, args: &InteractionTrackerIdleStateEnteredArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).IdleStateEntered)(self as *const _ as *mut _, 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(&self, sender: &InteractionTracker, args: &InteractionTrackerInertiaStateEnteredArgs) -> Result<()> { + }} + #[inline] pub fn inertia_state_entered(&self, sender: &InteractionTracker, args: &InteractionTrackerInertiaStateEnteredArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InertiaStateEntered)(self as *const _ as *mut _, 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(&self, sender: &InteractionTracker, args: &InteractionTrackerInteractingStateEnteredArgs) -> Result<()> { + }} + #[inline] pub fn interacting_state_entered(&self, sender: &InteractionTracker, args: &InteractionTrackerInteractingStateEnteredArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InteractingStateEntered)(self as *const _ as *mut _, sender as *const _ as *mut _, args as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn request_ignored(&self, sender: &InteractionTracker, args: &InteractionTrackerRequestIgnoredArgs) -> Result<()> { + }} + #[inline] pub fn request_ignored(&self, sender: &InteractionTracker, args: &InteractionTrackerRequestIgnoredArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RequestIgnored)(self as *const _ as *mut _, sender as *const _ as *mut _, args as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn values_changed(&self, sender: &InteractionTracker, args: &InteractionTrackerValuesChangedArgs) -> Result<()> { + }} + #[inline] pub fn values_changed(&self, sender: &InteractionTracker, args: &InteractionTrackerValuesChangedArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ValuesChanged)(self as *const _ as *mut _, sender as *const _ as *mut _, args as *const _ as *mut _); if hr == S_OK { Ok(()) } 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(&self, out: *mut i32) -> HRESULT }} impl IInteractionTrackerRequestIgnoredArgs { - #[inline] pub unsafe fn get_request_id(&self) -> Result { + #[inline] pub fn get_request_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RequestId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class InteractionTrackerRequestIgnoredArgs: IInteractionTrackerRequestIgnoredArgs} DEFINE_IID!(IID_IInteractionTrackerStatics, 3148208055, 26000, 17560, 141, 108, 235, 98, 181, 20, 201, 42); @@ -19451,39 +19451,39 @@ RT_INTERFACE!{static interface IInteractionTrackerStatics(IInteractionTrackerSta fn CreateWithOwner(&self, compositor: *mut super::Compositor, owner: *mut IInteractionTrackerOwner, out: *mut *mut InteractionTracker) -> HRESULT }} impl IInteractionTrackerStatics { - #[inline] pub unsafe fn create(&self, compositor: &super::Compositor) -> Result> { + #[inline] pub fn create(&self, compositor: &super::Compositor) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, 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(&self, compositor: &super::Compositor, owner: &IInteractionTrackerOwner) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_with_owner(&self, compositor: &super::Compositor, owner: &IInteractionTrackerOwner) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithOwner)(self as *const _ as *mut _, compositor as *const _ as *mut _, owner as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, + fn get_Position(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, fn get_RequestId(&self, out: *mut i32) -> HRESULT, fn get_Scale(&self, out: *mut f32) -> HRESULT }} impl IInteractionTrackerValuesChangedArgs { - #[inline] pub unsafe fn get_position(&self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_request_id(&self) -> Result { + }} + #[inline] pub fn get_request_id(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RequestId)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_scale(&self) -> Result { + }} + #[inline] pub fn get_scale(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Scale)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class InteractionTrackerValuesChangedArgs: IInteractionTrackerValuesChangedArgs} DEFINE_IID!(IID_IInteractionTrackerVector2InertiaModifier, 2279639728, 12422, 18515, 164, 183, 119, 136, 42, 213, 215, 227); @@ -19503,31 +19503,31 @@ RT_INTERFACE!{interface IInteractionTrackerVector2InertiaNaturalMotion(IInteract fn put_NaturalMotion(&self, value: *mut super::Vector2NaturalMotionAnimation) -> HRESULT }} impl IInteractionTrackerVector2InertiaNaturalMotion { - #[inline] pub unsafe fn get_condition(&self) -> Result> { + #[inline] pub fn get_condition(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Condition)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_condition(&self, value: &super::ExpressionAnimation) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_condition(&self, value: &super::ExpressionAnimation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Condition)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_natural_motion(&self) -> Result> { + }} + #[inline] pub fn get_natural_motion(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NaturalMotion)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_natural_motion(&self, value: &super::Vector2NaturalMotionAnimation) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_natural_motion(&self, value: &super::Vector2NaturalMotionAnimation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_NaturalMotion)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class InteractionTrackerVector2InertiaNaturalMotion: IInteractionTrackerVector2InertiaNaturalMotion} impl RtActivatable for InteractionTrackerVector2InertiaNaturalMotion {} impl InteractionTrackerVector2InertiaNaturalMotion { - #[inline] pub fn create(compositor: &super::Compositor) -> Result> { unsafe { + #[inline] pub fn create(compositor: &super::Compositor) -> Result>> { >::get_activation_factory().create(compositor) - }} + } } DEFINE_CLSID!(InteractionTrackerVector2InertiaNaturalMotion(&[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,86,101,99,116,111,114,50,73,110,101,114,116,105,97,78,97,116,117,114,97,108,77,111,116,105,111,110,0]) [CLSID_InteractionTrackerVector2InertiaNaturalMotion]); DEFINE_IID!(IID_IInteractionTrackerVector2InertiaNaturalMotionStatics, 2181044808, 2496, 17231, 129, 137, 20, 28, 102, 223, 54, 47); @@ -19535,11 +19535,11 @@ RT_INTERFACE!{static interface IInteractionTrackerVector2InertiaNaturalMotionSta fn Create(&self, compositor: *mut super::Compositor, out: *mut *mut InteractionTrackerVector2InertiaNaturalMotion) -> HRESULT }} impl IInteractionTrackerVector2InertiaNaturalMotionStatics { - #[inline] pub unsafe fn create(&self, compositor: &super::Compositor) -> Result> { + #[inline] pub fn create(&self, compositor: &super::Compositor) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, compositor as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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] { @@ -19565,170 +19565,170 @@ RT_INTERFACE!{interface IVisualInteractionSource(IVisualInteractionSourceVtbl): fn TryRedirectForManipulation(&self, pointerPoint: *mut super::super::input::PointerPoint) -> HRESULT }} impl IVisualInteractionSource { - #[inline] pub unsafe fn get_is_position_xrails_enabled(&self) -> Result { + #[inline] pub fn get_is_position_xrails_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPositionXRailsEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_position_xrails_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_position_xrails_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsPositionXRailsEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_position_yrails_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_position_yrails_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsPositionYRailsEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_position_yrails_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_position_yrails_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsPositionYRailsEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_manipulation_redirection_mode(&self) -> Result { + }} + #[inline] pub fn get_manipulation_redirection_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ManipulationRedirectionMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_manipulation_redirection_mode(&self, value: VisualInteractionSourceRedirectionMode) -> Result<()> { + }} + #[inline] pub fn set_manipulation_redirection_mode(&self, value: VisualInteractionSourceRedirectionMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ManipulationRedirectionMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_position_xchaining_mode(&self) -> Result { + }} + #[inline] pub fn get_position_xchaining_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PositionXChainingMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_position_xchaining_mode(&self, value: InteractionChainingMode) -> Result<()> { + }} + #[inline] pub fn set_position_xchaining_mode(&self, value: InteractionChainingMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PositionXChainingMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_position_xsource_mode(&self) -> Result { + }} + #[inline] pub fn get_position_xsource_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PositionXSourceMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_position_xsource_mode(&self, value: InteractionSourceMode) -> Result<()> { + }} + #[inline] pub fn set_position_xsource_mode(&self, value: InteractionSourceMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PositionXSourceMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_position_ychaining_mode(&self) -> Result { + }} + #[inline] pub fn get_position_ychaining_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PositionYChainingMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_position_ychaining_mode(&self, value: InteractionChainingMode) -> Result<()> { + }} + #[inline] pub fn set_position_ychaining_mode(&self, value: InteractionChainingMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PositionYChainingMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_position_ysource_mode(&self) -> Result { + }} + #[inline] pub fn get_position_ysource_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PositionYSourceMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_position_ysource_mode(&self, value: InteractionSourceMode) -> Result<()> { + }} + #[inline] pub fn set_position_ysource_mode(&self, value: InteractionSourceMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PositionYSourceMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_scale_chaining_mode(&self) -> Result { + }} + #[inline] pub fn get_scale_chaining_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ScaleChainingMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_scale_chaining_mode(&self, value: InteractionChainingMode) -> Result<()> { + }} + #[inline] pub fn set_scale_chaining_mode(&self, value: InteractionChainingMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ScaleChainingMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_scale_source_mode(&self) -> Result { + }} + #[inline] pub fn get_scale_source_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ScaleSourceMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_scale_source_mode(&self, value: InteractionSourceMode) -> Result<()> { + }} + #[inline] pub fn set_scale_source_mode(&self, value: InteractionSourceMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ScaleSourceMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_source(&self) -> Result> { + }} + #[inline] pub fn get_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Source)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_redirect_for_manipulation(&self, pointerPoint: &super::super::input::PointerPoint) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn try_redirect_for_manipulation(&self, pointerPoint: &super::super::input::PointerPoint) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).TryRedirectForManipulation)(self as *const _ as *mut _, pointerPoint as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class VisualInteractionSource: IVisualInteractionSource} impl RtActivatable for VisualInteractionSource {} impl VisualInteractionSource { - #[inline] pub fn create(source: &super::Visual) -> Result> { unsafe { + #[inline] pub fn create(source: &super::Visual) -> Result>> { >::get_activation_factory().create(source) - }} + } } DEFINE_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]) [CLSID_VisualInteractionSource]); DEFINE_IID!(IID_IVisualInteractionSource2, 2861648019, 42812, 16717, 128, 208, 36, 155, 173, 47, 189, 147); RT_INTERFACE!{interface IVisualInteractionSource2(IVisualInteractionSource2Vtbl): IInspectable(IInspectableVtbl) [IID_IVisualInteractionSource2] { - fn get_DeltaPosition(&self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, + fn get_DeltaPosition(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, fn get_DeltaScale(&self, out: *mut f32) -> HRESULT, - fn get_Position(&self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, - fn get_PositionVelocity(&self, out: *mut ::rt::gen::windows::foundation::numerics::Vector3) -> HRESULT, + fn get_Position(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, + fn get_PositionVelocity(&self, out: *mut foundation::numerics::Vector3) -> HRESULT, fn get_Scale(&self, out: *mut f32) -> HRESULT, fn get_ScaleVelocity(&self, out: *mut f32) -> HRESULT, - fn ConfigureCenterPointXModifiers(&self, conditionalValues: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT, - fn ConfigureCenterPointYModifiers(&self, conditionalValues: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT, - fn ConfigureDeltaPositionXModifiers(&self, conditionalValues: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT, - fn ConfigureDeltaPositionYModifiers(&self, conditionalValues: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT, - fn ConfigureDeltaScaleModifiers(&self, conditionalValues: *mut ::rt::gen::windows::foundation::collections::IIterable) -> HRESULT + fn ConfigureCenterPointXModifiers(&self, conditionalValues: *mut foundation::collections::IIterable) -> HRESULT, + fn ConfigureCenterPointYModifiers(&self, conditionalValues: *mut foundation::collections::IIterable) -> HRESULT, + fn ConfigureDeltaPositionXModifiers(&self, conditionalValues: *mut foundation::collections::IIterable) -> HRESULT, + fn ConfigureDeltaPositionYModifiers(&self, conditionalValues: *mut foundation::collections::IIterable) -> HRESULT, + fn ConfigureDeltaScaleModifiers(&self, conditionalValues: *mut foundation::collections::IIterable) -> HRESULT }} impl IVisualInteractionSource2 { - #[inline] pub unsafe fn get_delta_position(&self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + #[inline] pub fn get_delta_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DeltaPosition)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_delta_scale(&self) -> Result { + }} + #[inline] pub fn get_delta_scale(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DeltaScale)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_position(&self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + }} + #[inline] pub fn get_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Position)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_position_velocity(&self) -> Result<::rt::gen::windows::foundation::numerics::Vector3> { + }} + #[inline] pub fn get_position_velocity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PositionVelocity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_scale(&self) -> Result { + }} + #[inline] pub fn get_scale(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Scale)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_scale_velocity(&self) -> Result { + }} + #[inline] pub fn get_scale_velocity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ScaleVelocity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn configure_center_point_xmodifiers(&self, conditionalValues: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + }} + #[inline] pub fn configure_center_point_xmodifiers(&self, conditionalValues: &foundation::collections::IIterable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ConfigureCenterPointXModifiers)(self as *const _ as *mut _, conditionalValues as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn configure_center_point_ymodifiers(&self, conditionalValues: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + }} + #[inline] pub fn configure_center_point_ymodifiers(&self, conditionalValues: &foundation::collections::IIterable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ConfigureCenterPointYModifiers)(self as *const _ as *mut _, conditionalValues as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn configure_delta_position_xmodifiers(&self, conditionalValues: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + }} + #[inline] pub fn configure_delta_position_xmodifiers(&self, conditionalValues: &foundation::collections::IIterable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ConfigureDeltaPositionXModifiers)(self as *const _ as *mut _, conditionalValues as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn configure_delta_position_ymodifiers(&self, conditionalValues: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + }} + #[inline] pub fn configure_delta_position_ymodifiers(&self, conditionalValues: &foundation::collections::IIterable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ConfigureDeltaPositionYModifiers)(self as *const _ as *mut _, conditionalValues as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn configure_delta_scale_modifiers(&self, conditionalValues: &::rt::gen::windows::foundation::collections::IIterable) -> Result<()> { + }} + #[inline] pub fn configure_delta_scale_modifiers(&self, conditionalValues: &foundation::collections::IIterable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ConfigureDeltaScaleModifiers)(self as *const _ as *mut _, conditionalValues as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IVisualInteractionSourceObjectFactory, 2999619964, 59786, 16882, 179, 201, 137, 28, 146, 102, 200, 246); RT_INTERFACE!{interface IVisualInteractionSourceObjectFactory(IVisualInteractionSourceObjectFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IVisualInteractionSourceObjectFactory] { @@ -19742,11 +19742,11 @@ RT_INTERFACE!{static interface IVisualInteractionSourceStatics(IVisualInteractio fn Create(&self, source: *mut super::Visual, out: *mut *mut VisualInteractionSource) -> HRESULT }} impl IVisualInteractionSourceStatics { - #[inline] pub unsafe fn create(&self, source: &super::Visual) -> Result> { + #[inline] pub fn create(&self, source: &super::Visual) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Create)(self as *const _ as *mut _, source as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } } // Windows.UI.Composition.Interactions } // Windows.UI.Composition diff --git a/src/rt/gen/windows/ui/xaml.rs b/src/rt/gen/windows/ui/xaml.rs index b45ae23..08a9f2b 100644 --- a/src/rt/gen/windows/ui/xaml.rs +++ b/src/rt/gen/windows/ui/xaml.rs @@ -7,34 +7,34 @@ RT_INTERFACE!{interface IAdaptiveTrigger(IAdaptiveTriggerVtbl): IInspectable(IIn fn put_MinWindowHeight(&self, value: f64) -> HRESULT }} impl IAdaptiveTrigger { - #[inline] pub unsafe fn get_min_window_width(&self) -> Result { + #[inline] pub fn get_min_window_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinWindowWidth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_min_window_width(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_min_window_width(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MinWindowWidth)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_window_height(&self) -> Result { + }} + #[inline] pub fn get_min_window_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinWindowHeight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_min_window_height(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_min_window_height(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MinWindowHeight)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AdaptiveTrigger: IAdaptiveTrigger} impl RtActivatable for AdaptiveTrigger {} impl AdaptiveTrigger { - #[inline] pub fn get_min_window_width_property() -> Result> { unsafe { + #[inline] pub fn get_min_window_width_property() -> Result>> { >::get_activation_factory().get_min_window_width_property() - }} - #[inline] pub fn get_min_window_height_property() -> Result> { unsafe { + } + #[inline] pub fn get_min_window_height_property() -> Result>> { >::get_activation_factory().get_min_window_height_property() - }} + } } DEFINE_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]) [CLSID_AdaptiveTrigger]); DEFINE_IID!(IID_IAdaptiveTriggerFactory, 3378959490, 23275, 18497, 146, 71, 193, 160, 189, 214, 245, 159); @@ -42,11 +42,11 @@ RT_INTERFACE!{interface IAdaptiveTriggerFactory(IAdaptiveTriggerFactoryVtbl): II fn CreateInstance(&self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut AdaptiveTrigger) -> HRESULT }} impl IAdaptiveTriggerFactory { - #[inline] pub unsafe fn create_instance(&self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + #[inline] pub fn create_instance(&self, outer: &IInspectable) -> Result<(Option>, Option>)> { unsafe { let mut inner = null_mut(); let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self 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) } - } + if hr == S_OK { Ok((ComPtr::wrap_optional(inner), ComPtr::wrap_optional(out))) } 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] { @@ -54,16 +54,16 @@ RT_INTERFACE!{static interface IAdaptiveTriggerStatics(IAdaptiveTriggerStaticsVt fn get_MinWindowHeightProperty(&self, out: *mut *mut DependencyProperty) -> HRESULT }} impl IAdaptiveTriggerStatics { - #[inline] pub unsafe fn get_min_window_width_property(&self) -> Result> { + #[inline] pub fn get_min_window_width_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MinWindowWidthProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_window_height_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_min_window_height_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MinWindowHeightProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IApplication, 1958240673, 29831, 18089, 154, 110, 199, 139, 81, 39, 38, 197); RT_INTERFACE!{interface IApplication(IApplicationVtbl): IInspectable(IInspectableVtbl) [IID_IApplication] { @@ -72,85 +72,85 @@ RT_INTERFACE!{interface IApplication(IApplicationVtbl): IInspectable(IInspectabl fn get_DebugSettings(&self, out: *mut *mut DebugSettings) -> HRESULT, fn get_RequestedTheme(&self, out: *mut ApplicationTheme) -> HRESULT, fn put_RequestedTheme(&self, value: ApplicationTheme) -> HRESULT, - fn add_UnhandledException(&self, value: *mut UnhandledExceptionEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_UnhandledException(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Suspending(&self, value: *mut SuspendingEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Suspending(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Resuming(&self, value: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Resuming(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_UnhandledException(&self, value: *mut UnhandledExceptionEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_UnhandledException(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Suspending(&self, value: *mut SuspendingEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Suspending(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Resuming(&self, value: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Resuming(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn Exit(&self) -> HRESULT }} impl IApplication { - #[inline] pub unsafe fn get_resources(&self) -> Result> { + #[inline] pub fn get_resources(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Resources)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_resources(&self, value: &ResourceDictionary) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_resources(&self, value: &ResourceDictionary) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Resources)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_debug_settings(&self) -> Result> { + }} + #[inline] pub fn get_debug_settings(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DebugSettings)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_requested_theme(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_requested_theme(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RequestedTheme)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_requested_theme(&self, value: ApplicationTheme) -> Result<()> { + }} + #[inline] pub fn set_requested_theme(&self, value: ApplicationTheme) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RequestedTheme)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_unhandled_exception(&self, value: &UnhandledExceptionEventHandler) -> Result { + }} + #[inline] pub fn add_unhandled_exception(&self, value: &UnhandledExceptionEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_UnhandledException)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_unhandled_exception(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_unhandled_exception(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_UnhandledException)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_suspending(&self, value: &SuspendingEventHandler) -> Result { + }} + #[inline] pub fn add_suspending(&self, value: &SuspendingEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Suspending)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_suspending(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_suspending(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Suspending)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_resuming(&self, value: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_resuming(&self, value: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Resuming)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_resuming(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_resuming(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Resuming)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn exit(&self) -> Result<()> { + }} + #[inline] pub fn exit(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Exit)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Application: IApplication} impl RtActivatable for Application {} impl Application { - #[inline] pub fn get_current() -> Result> { unsafe { + #[inline] pub fn get_current() -> Result>> { >::get_activation_factory().get_current() - }} - #[inline] pub fn start(callback: &ApplicationInitializationCallback) -> Result<()> { unsafe { + } + #[inline] pub fn start(callback: &ApplicationInitializationCallback) -> Result<()> { >::get_activation_factory().start(callback) - }} - #[inline] pub fn load_component(component: &IInspectable, resourceLocator: &super::super::foundation::Uri) -> Result<()> { unsafe { + } + #[inline] pub fn load_component(component: &IInspectable, resourceLocator: &foundation::Uri) -> Result<()> { >::get_activation_factory().load_component(component, resourceLocator) - }} - #[inline] pub fn load_component_with_resource_location(component: &IInspectable, resourceLocator: &super::super::foundation::Uri, componentResourceLocation: controls::primitives::ComponentResourceLocation) -> Result<()> { unsafe { + } + #[inline] pub fn load_component_with_resource_location(component: &IInspectable, resourceLocator: &foundation::Uri, componentResourceLocation: controls::primitives::ComponentResourceLocation) -> Result<()> { >::get_activation_factory().load_component_with_resource_location(component, resourceLocator, componentResourceLocation) - }} + } } DEFINE_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]) [CLSID_Application]); DEFINE_IID!(IID_IApplication2, 26281150, 21034, 22788, 245, 47, 222, 114, 1, 4, 41, 224); @@ -159,48 +159,48 @@ RT_INTERFACE!{interface IApplication2(IApplication2Vtbl): IInspectable(IInspecta fn put_FocusVisualKind(&self, value: FocusVisualKind) -> HRESULT, fn get_RequiresPointerMode(&self, out: *mut ApplicationRequiresPointerMode) -> HRESULT, fn put_RequiresPointerMode(&self, value: ApplicationRequiresPointerMode) -> HRESULT, - fn add_LeavingBackground(&self, value: *mut LeavingBackgroundEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_LeavingBackground(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_EnteredBackground(&self, value: *mut EnteredBackgroundEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_EnteredBackground(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_LeavingBackground(&self, value: *mut LeavingBackgroundEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_LeavingBackground(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_EnteredBackground(&self, value: *mut EnteredBackgroundEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_EnteredBackground(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IApplication2 { - #[inline] pub unsafe fn get_focus_visual_kind(&self) -> Result { + #[inline] pub fn get_focus_visual_kind(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FocusVisualKind)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_focus_visual_kind(&self, value: FocusVisualKind) -> Result<()> { + }} + #[inline] pub fn set_focus_visual_kind(&self, value: FocusVisualKind) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FocusVisualKind)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_requires_pointer_mode(&self) -> Result { + }} + #[inline] pub fn get_requires_pointer_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RequiresPointerMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_requires_pointer_mode(&self, value: ApplicationRequiresPointerMode) -> Result<()> { + }} + #[inline] pub fn set_requires_pointer_mode(&self, value: ApplicationRequiresPointerMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RequiresPointerMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_leaving_background(&self, value: &LeavingBackgroundEventHandler) -> Result { + }} + #[inline] pub fn add_leaving_background(&self, value: &LeavingBackgroundEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_LeavingBackground)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_leaving_background(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_leaving_background(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_LeavingBackground)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_entered_background(&self, value: &EnteredBackgroundEventHandler) -> Result { + }} + #[inline] pub fn add_entered_background(&self, value: &EnteredBackgroundEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_EnteredBackground)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_entered_background(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_entered_background(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_EnteredBackground)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IApplication3, 3077942652, 6328, 17866, 161, 176, 220, 72, 62, 75, 16, 40); RT_INTERFACE!{interface IApplication3(IApplication3Vtbl): IInspectable(IInspectableVtbl) [IID_IApplication3] { @@ -208,26 +208,26 @@ RT_INTERFACE!{interface IApplication3(IApplication3Vtbl): IInspectable(IInspecta fn put_HighContrastAdjustment(&self, value: ApplicationHighContrastAdjustment) -> HRESULT }} impl IApplication3 { - #[inline] pub unsafe fn get_high_contrast_adjustment(&self) -> Result { + #[inline] pub fn get_high_contrast_adjustment(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HighContrastAdjustment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_high_contrast_adjustment(&self, value: ApplicationHighContrastAdjustment) -> Result<()> { + }} + #[inline] pub fn set_high_contrast_adjustment(&self, value: ApplicationHighContrastAdjustment) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_HighContrastAdjustment)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut Application) -> HRESULT }} impl IApplicationFactory { - #[inline] pub unsafe fn create_instance(&self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + #[inline] pub fn create_instance(&self, outer: &IInspectable) -> Result<(Option>, Option>)> { unsafe { let mut inner = null_mut(); let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self 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) } - } + if hr == S_OK { Ok((ComPtr::wrap_optional(inner), ComPtr::wrap_optional(out))) } else { err(hr) } + }} } RT_ENUM! { enum ApplicationHighContrastAdjustment: u32 { None (ApplicationHighContrastAdjustment_None) = 0, Auto (ApplicationHighContrastAdjustment_Auto) = 4294967295, @@ -237,10 +237,10 @@ RT_DELEGATE!{delegate ApplicationInitializationCallback(ApplicationInitializatio fn Invoke(&self, p: *mut ApplicationInitializationCallbackParams) -> HRESULT }} impl ApplicationInitializationCallback { - #[inline] pub unsafe fn invoke(&self, p: &ApplicationInitializationCallbackParams) -> Result<()> { + #[inline] pub fn invoke(&self, p: &ApplicationInitializationCallbackParams) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, p 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] { @@ -268,52 +268,52 @@ RT_INTERFACE!{interface IApplicationOverrides(IApplicationOverridesVtbl): IInspe fn OnWindowCreated(&self, args: *mut WindowCreatedEventArgs) -> HRESULT }} impl IApplicationOverrides { - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn on_activated(&self, args: &super::super::applicationmodel::activation::IActivatedEventArgs) -> Result<()> { + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn on_activated(&self, args: &super::super::applicationmodel::activation::IActivatedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnActivated)(self as *const _ as *mut _, args as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn on_launched(&self, args: &super::super::applicationmodel::activation::LaunchActivatedEventArgs) -> Result<()> { + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn on_launched(&self, args: &super::super::applicationmodel::activation::LaunchActivatedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnLaunched)(self as *const _ as *mut _, args as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn on_file_activated(&self, args: &super::super::applicationmodel::activation::FileActivatedEventArgs) -> Result<()> { + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn on_file_activated(&self, args: &super::super::applicationmodel::activation::FileActivatedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnFileActivated)(self as *const _ as *mut _, args as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn on_search_activated(&self, args: &super::super::applicationmodel::activation::SearchActivatedEventArgs) -> Result<()> { + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn on_search_activated(&self, args: &super::super::applicationmodel::activation::SearchActivatedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnSearchActivated)(self as *const _ as *mut _, 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(&self, args: &super::super::applicationmodel::activation::ShareTargetActivatedEventArgs) -> Result<()> { + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn on_share_target_activated(&self, args: &super::super::applicationmodel::activation::ShareTargetActivatedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnShareTargetActivated)(self as *const _ as *mut _, 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(&self, args: &super::super::applicationmodel::activation::FileOpenPickerActivatedEventArgs) -> Result<()> { + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn on_file_open_picker_activated(&self, args: &super::super::applicationmodel::activation::FileOpenPickerActivatedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnFileOpenPickerActivated)(self as *const _ as *mut _, 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(&self, args: &super::super::applicationmodel::activation::FileSavePickerActivatedEventArgs) -> Result<()> { + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn on_file_save_picker_activated(&self, args: &super::super::applicationmodel::activation::FileSavePickerActivatedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnFileSavePickerActivated)(self as *const _ as *mut _, 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(&self, args: &super::super::applicationmodel::activation::CachedFileUpdaterActivatedEventArgs) -> Result<()> { + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn on_cached_file_updater_activated(&self, args: &super::super::applicationmodel::activation::CachedFileUpdaterActivatedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnCachedFileUpdaterActivated)(self as *const _ as *mut _, args as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn on_window_created(&self, args: &WindowCreatedEventArgs) -> Result<()> { + }} + #[inline] pub fn on_window_created(&self, args: &WindowCreatedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnWindowCreated)(self as *const _ as *mut _, args as *const _ as *mut _); 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(&self, args: *mut super::super::applicationmodel::activation::BackgroundActivatedEventArgs) -> HRESULT }} impl IApplicationOverrides2 { - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn on_background_activated(&self, args: &super::super::applicationmodel::activation::BackgroundActivatedEventArgs) -> Result<()> { + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn on_background_activated(&self, args: &super::super::applicationmodel::activation::BackgroundActivatedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnBackgroundActivated)(self as *const _ as *mut _, args as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum ApplicationRequiresPointerMode: i32 { Auto (ApplicationRequiresPointerMode_Auto) = 0, WhenRequested (ApplicationRequiresPointerMode_WhenRequested) = 1, @@ -322,27 +322,27 @@ DEFINE_IID!(IID_IApplicationStatics, 105486743, 63412, 17918, 183, 99, 117, 119, RT_INTERFACE!{static interface IApplicationStatics(IApplicationStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IApplicationStatics] { fn get_Current(&self, out: *mut *mut Application) -> HRESULT, fn Start(&self, callback: *mut ApplicationInitializationCallback) -> HRESULT, - fn LoadComponent(&self, component: *mut IInspectable, resourceLocator: *mut super::super::foundation::Uri) -> HRESULT, - fn LoadComponentWithResourceLocation(&self, component: *mut IInspectable, resourceLocator: *mut super::super::foundation::Uri, componentResourceLocation: controls::primitives::ComponentResourceLocation) -> HRESULT + fn LoadComponent(&self, component: *mut IInspectable, resourceLocator: *mut foundation::Uri) -> HRESULT, + fn LoadComponentWithResourceLocation(&self, component: *mut IInspectable, resourceLocator: *mut foundation::Uri, componentResourceLocation: controls::primitives::ComponentResourceLocation) -> HRESULT }} impl IApplicationStatics { - #[inline] pub unsafe fn get_current(&self) -> Result> { + #[inline] pub fn get_current(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Current)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self, callback: &ApplicationInitializationCallback) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn start(&self, callback: &ApplicationInitializationCallback) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _, callback as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn load_component(&self, component: &IInspectable, resourceLocator: &super::super::foundation::Uri) -> Result<()> { + }} + #[inline] pub fn load_component(&self, component: &IInspectable, resourceLocator: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).LoadComponent)(self as *const _ as *mut _, 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(&self, component: &IInspectable, resourceLocator: &super::super::foundation::Uri, componentResourceLocation: controls::primitives::ComponentResourceLocation) -> Result<()> { + }} + #[inline] pub fn load_component_with_resource_location(&self, component: &IInspectable, resourceLocator: &foundation::Uri, componentResourceLocation: controls::primitives::ComponentResourceLocation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).LoadComponentWithResourceLocation)(self as *const _ as *mut _, component as *const _ as *mut _, resourceLocator as *const _ as *mut _, componentResourceLocation); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum ApplicationTheme: i32 { Light (ApplicationTheme_Light) = 0, Dark (ApplicationTheme_Dark) = 1, @@ -355,11 +355,11 @@ RT_INTERFACE!{interface IBindingFailedEventArgs(IBindingFailedEventArgsVtbl): II fn get_Message(&self, out: *mut HSTRING) -> HRESULT }} impl IBindingFailedEventArgs { - #[inline] pub unsafe fn get_message(&self) -> Result { + #[inline] pub fn get_message(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Message)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class BindingFailedEventArgs: IBindingFailedEventArgs} DEFINE_IID!(IID_BindingFailedEventHandler, 325785474, 21690, 16909, 161, 170, 130, 130, 135, 33, 205, 230); @@ -367,37 +367,37 @@ RT_DELEGATE!{delegate BindingFailedEventHandler(BindingFailedEventHandlerVtbl, B fn Invoke(&self, sender: *mut IInspectable, e: *mut BindingFailedEventArgs) -> HRESULT }} impl BindingFailedEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &IInspectable, e: &BindingFailedEventArgs) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &IInspectable, e: &BindingFailedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, e as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IBringIntoViewOptions, 431870389, 51147, 18137, 164, 221, 161, 187, 232, 62, 242, 251); RT_INTERFACE!{interface IBringIntoViewOptions(IBringIntoViewOptionsVtbl): IInspectable(IInspectableVtbl) [IID_IBringIntoViewOptions] { fn get_AnimationDesired(&self, out: *mut bool) -> HRESULT, fn put_AnimationDesired(&self, value: bool) -> HRESULT, - fn get_TargetRect(&self, out: *mut *mut super::super::foundation::IReference) -> HRESULT, - fn put_TargetRect(&self, value: *mut super::super::foundation::IReference) -> HRESULT + fn get_TargetRect(&self, out: *mut *mut foundation::IReference) -> HRESULT, + fn put_TargetRect(&self, value: *mut foundation::IReference) -> HRESULT }} impl IBringIntoViewOptions { - #[inline] pub unsafe fn get_animation_desired(&self) -> Result { + #[inline] pub fn get_animation_desired(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AnimationDesired)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_animation_desired(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_animation_desired(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AnimationDesired)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_target_rect(&self) -> Result>> { + }} + #[inline] pub fn get_target_rect(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TargetRect)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_target_rect(&self, value: &super::super::foundation::IReference) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_target_rect(&self, value: &foundation::IReference) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TargetRect)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class BringIntoViewOptions: IBringIntoViewOptions} impl RtActivatable for BringIntoViewOptions {} @@ -412,12 +412,12 @@ RT_INTERFACE!{interface ICornerRadiusHelper(ICornerRadiusHelperVtbl): IInspectab RT_CLASS!{class CornerRadiusHelper: ICornerRadiusHelper} impl RtActivatable for CornerRadiusHelper {} impl CornerRadiusHelper { - #[inline] pub fn from_radii(topLeft: f64, topRight: f64, bottomRight: f64, bottomLeft: f64) -> Result { unsafe { + #[inline] pub fn from_radii(topLeft: f64, topRight: f64, bottomRight: f64, bottomLeft: f64) -> Result { >::get_activation_factory().from_radii(topLeft, topRight, bottomRight, bottomLeft) - }} - #[inline] pub fn from_uniform_radius(uniformRadius: f64) -> Result { unsafe { + } + #[inline] pub fn from_uniform_radius(uniformRadius: f64) -> Result { >::get_activation_factory().from_uniform_radius(uniformRadius) - }} + } } DEFINE_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]) [CLSID_CornerRadiusHelper]); DEFINE_IID!(IID_ICornerRadiusHelperStatics, 4104255065, 54484, 17695, 163, 135, 214, 191, 75, 36, 81, 212); @@ -426,27 +426,27 @@ RT_INTERFACE!{static interface ICornerRadiusHelperStatics(ICornerRadiusHelperSta fn FromUniformRadius(&self, uniformRadius: f64, out: *mut CornerRadius) -> HRESULT }} impl ICornerRadiusHelperStatics { - #[inline] pub unsafe fn from_radii(&self, topLeft: f64, topRight: f64, bottomRight: f64, bottomLeft: f64) -> Result { + #[inline] pub fn from_radii(&self, topLeft: f64, topRight: f64, bottomRight: f64, bottomLeft: f64) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).FromRadii)(self as *const _ as *mut _, topLeft, topRight, bottomRight, bottomLeft, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn from_uniform_radius(&self, uniformRadius: f64) -> Result { + }} + #[inline] pub fn from_uniform_radius(&self, uniformRadius: f64) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).FromUniformRadius)(self as *const _ as *mut _, uniformRadius, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, out: *mut *mut IInspectable) -> HRESULT }} impl CreateDefaultValueCallback { - #[inline] pub unsafe fn invoke(&self) -> Result> { + #[inline] pub fn invoke(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IDataContextChangedEventArgs, 2108067361, 2959, 20383, 161, 67, 248, 231, 120, 1, 54, 162); RT_INTERFACE!{interface IDataContextChangedEventArgs(IDataContextChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IDataContextChangedEventArgs] { @@ -455,20 +455,20 @@ RT_INTERFACE!{interface IDataContextChangedEventArgs(IDataContextChangedEventArg fn put_Handled(&self, value: bool) -> HRESULT }} impl IDataContextChangedEventArgs { - #[inline] pub unsafe fn get_new_value(&self) -> Result> { + #[inline] pub fn get_new_value(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NewValue)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_handled(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_handled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Handled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_handled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_handled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Handled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DataContextChangedEventArgs: IDataContextChangedEventArgs} DEFINE_IID!(IID_IDataTemplate, 2568007367, 35509, 16664, 155, 198, 9, 244, 90, 53, 7, 61); @@ -476,24 +476,24 @@ RT_INTERFACE!{interface IDataTemplate(IDataTemplateVtbl): IInspectable(IInspecta fn LoadContent(&self, out: *mut *mut DependencyObject) -> HRESULT }} impl IDataTemplate { - #[inline] pub unsafe fn load_content(&self) -> Result> { + #[inline] pub fn load_content(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).LoadContent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DataTemplate: IDataTemplate} impl RtActivatable for DataTemplate {} impl DataTemplate { - #[inline] pub fn get_extension_instance_property() -> Result> { unsafe { + #[inline] pub fn get_extension_instance_property() -> Result>> { >::get_activation_factory().get_extension_instance_property() - }} - #[inline] pub fn get_extension_instance(element: &FrameworkElement) -> Result> { unsafe { + } + #[inline] pub fn get_extension_instance(element: &FrameworkElement) -> Result>> { >::get_activation_factory().get_extension_instance(element) - }} - #[inline] pub fn set_extension_instance(element: &FrameworkElement, value: &IDataTemplateExtension) -> Result<()> { unsafe { + } + #[inline] pub fn set_extension_instance(element: &FrameworkElement, value: &IDataTemplateExtension) -> Result<()> { >::get_activation_factory().set_extension_instance(element, value) - }} + } } DEFINE_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]) [CLSID_DataTemplate]); DEFINE_IID!(IID_IDataTemplateExtension, 1499370823, 52735, 19346, 183, 115, 171, 57, 104, 120, 243, 83); @@ -503,31 +503,31 @@ RT_INTERFACE!{interface IDataTemplateExtension(IDataTemplateExtensionVtbl): IIns fn ProcessBindings(&self, arg: *mut controls::ContainerContentChangingEventArgs, out: *mut i32) -> HRESULT }} impl IDataTemplateExtension { - #[inline] pub unsafe fn reset_template(&self) -> Result<()> { + #[inline] pub fn reset_template(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ResetTemplate)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn process_binding(&self, phase: u32) -> Result { + }} + #[inline] pub fn process_binding(&self, phase: u32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ProcessBinding)(self as *const _ as *mut _, phase, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn process_bindings(&self, arg: &controls::ContainerContentChangingEventArgs) -> Result { + }} + #[inline] pub fn process_bindings(&self, arg: &controls::ContainerContentChangingEventArgs) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ProcessBindings)(self as *const _ as *mut _, arg as *const _ as *mut _, &mut out); if hr == S_OK { Ok(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(&self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut DataTemplate) -> HRESULT }} impl IDataTemplateFactory { - #[inline] pub unsafe fn create_instance(&self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + #[inline] pub fn create_instance(&self, outer: &IInspectable) -> Result<(Option>, Option>)> { unsafe { let mut inner = null_mut(); let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self 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) } - } + if hr == S_OK { Ok((ComPtr::wrap_optional(inner), ComPtr::wrap_optional(out))) } else { err(hr) } + }} } DEFINE_IID!(IID_IDataTemplateKey, 2268818472, 52459, 19297, 134, 250, 178, 206, 195, 156, 194, 250); RT_INTERFACE!{interface IDataTemplateKey(IDataTemplateKeyVtbl): IInspectable(IInspectableVtbl) [IID_IDataTemplateKey] { @@ -535,15 +535,15 @@ RT_INTERFACE!{interface IDataTemplateKey(IDataTemplateKeyVtbl): IInspectable(IIn fn put_DataType(&self, value: *mut IInspectable) -> HRESULT }} impl IDataTemplateKey { - #[inline] pub unsafe fn get_data_type(&self) -> Result> { + #[inline] pub fn get_data_type(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DataType)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_data_type(&self, value: &IInspectable) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_data_type(&self, value: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DataType)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DataTemplateKey: IDataTemplateKey} DEFINE_IID!(IID_IDataTemplateKeyFactory, 3916114265, 55682, 16722, 145, 203, 222, 14, 77, 253, 118, 147); @@ -552,16 +552,16 @@ RT_INTERFACE!{interface IDataTemplateKeyFactory(IDataTemplateKeyFactoryVtbl): II fn CreateInstanceWithType(&self, dataType: *mut IInspectable, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut DataTemplateKey) -> HRESULT }} impl IDataTemplateKeyFactory { - #[inline] pub unsafe fn create_instance(&self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + #[inline] pub fn create_instance(&self, outer: &IInspectable) -> Result<(Option>, Option>)> { unsafe { let mut inner = null_mut(); let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self 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_type(&self, dataType: &IInspectable, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + if hr == S_OK { Ok((ComPtr::wrap_optional(inner), ComPtr::wrap_optional(out))) } else { err(hr) } + }} + #[inline] pub fn create_instance_with_type(&self, dataType: &IInspectable, outer: &IInspectable) -> Result<(Option>, Option>)> { unsafe { let mut inner = null_mut(); let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstanceWithType)(self as *const _ as *mut _, 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) } - } + if hr == S_OK { Ok((ComPtr::wrap_optional(inner), ComPtr::wrap_optional(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] { @@ -570,20 +570,20 @@ RT_INTERFACE!{static interface IDataTemplateStatics2(IDataTemplateStatics2Vtbl): fn SetExtensionInstance(&self, element: *mut FrameworkElement, value: *mut IDataTemplateExtension) -> HRESULT }} impl IDataTemplateStatics2 { - #[inline] pub unsafe fn get_extension_instance_property(&self) -> Result> { + #[inline] pub fn get_extension_instance_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExtensionInstanceProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_extension_instance(&self, element: &FrameworkElement) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_extension_instance(&self, element: &FrameworkElement) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetExtensionInstance)(self as *const _ as *mut _, 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(&self, element: &FrameworkElement, value: &IDataTemplateExtension) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_extension_instance(&self, element: &FrameworkElement, value: &IDataTemplateExtension) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetExtensionInstance)(self as *const _ as *mut _, element as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } 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] { @@ -593,46 +593,46 @@ RT_INTERFACE!{interface IDebugSettings(IDebugSettingsVtbl): IInspectable(IInspec fn put_IsBindingTracingEnabled(&self, value: bool) -> HRESULT, fn get_IsOverdrawHeatMapEnabled(&self, out: *mut bool) -> HRESULT, fn put_IsOverdrawHeatMapEnabled(&self, value: bool) -> HRESULT, - fn add_BindingFailed(&self, value: *mut BindingFailedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_BindingFailed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_BindingFailed(&self, value: *mut BindingFailedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_BindingFailed(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IDebugSettings { - #[inline] pub unsafe fn get_enable_frame_rate_counter(&self) -> Result { + #[inline] pub fn get_enable_frame_rate_counter(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EnableFrameRateCounter)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_enable_frame_rate_counter(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_enable_frame_rate_counter(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_EnableFrameRateCounter)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_binding_tracing_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_binding_tracing_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsBindingTracingEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_binding_tracing_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_binding_tracing_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsBindingTracingEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_overdraw_heat_map_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_overdraw_heat_map_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsOverdrawHeatMapEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_overdraw_heat_map_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_overdraw_heat_map_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsOverdrawHeatMapEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_binding_failed(&self, value: &BindingFailedEventHandler) -> Result { + }} + #[inline] pub fn add_binding_failed(&self, value: &BindingFailedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_BindingFailed)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_binding_failed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_binding_failed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_BindingFailed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DebugSettings: IDebugSettings} DEFINE_IID!(IID_IDebugSettings2, 1221817733, 57766, 18075, 131, 200, 48, 130, 80, 55, 17, 158); @@ -641,15 +641,15 @@ RT_INTERFACE!{interface IDebugSettings2(IDebugSettings2Vtbl): IInspectable(IInsp fn put_EnableRedrawRegions(&self, value: bool) -> HRESULT }} impl IDebugSettings2 { - #[inline] pub unsafe fn get_enable_redraw_regions(&self) -> Result { + #[inline] pub fn get_enable_redraw_regions(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_EnableRedrawRegions)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_enable_redraw_regions(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_enable_redraw_regions(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_EnableRedrawRegions)(self as *const _ as *mut _, 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] { @@ -657,15 +657,15 @@ RT_INTERFACE!{interface IDebugSettings3(IDebugSettings3Vtbl): IInspectable(IInsp fn put_IsTextPerformanceVisualizationEnabled(&self, value: bool) -> HRESULT }} impl IDebugSettings3 { - #[inline] pub unsafe fn get_is_text_performance_visualization_enabled(&self) -> Result { + #[inline] pub fn get_is_text_performance_visualization_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsTextPerformanceVisualizationEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_text_performance_visualization_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_text_performance_visualization_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsTextPerformanceVisualizationEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IDependencyObject, 1548904037, 62990, 18706, 175, 89, 95, 224, 104, 15, 8, 157); RT_INTERFACE!{interface IDependencyObject(IDependencyObjectVtbl): IInspectable(IInspectableVtbl) [IID_IDependencyObject] { @@ -677,34 +677,34 @@ RT_INTERFACE!{interface IDependencyObject(IDependencyObjectVtbl): IInspectable(I #[cfg(feature="windows-ui")] fn get_Dispatcher(&self, out: *mut *mut super::core::CoreDispatcher) -> HRESULT }} impl IDependencyObject { - #[inline] pub unsafe fn get_value(&self, dp: &DependencyProperty) -> Result> { + #[inline] pub fn get_value(&self, dp: &DependencyProperty) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetValue)(self as *const _ as *mut _, dp as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_value(&self, dp: &DependencyProperty, value: &IInspectable) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_value(&self, dp: &DependencyProperty, value: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetValue)(self as *const _ as *mut _, dp as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn clear_value(&self, dp: &DependencyProperty) -> Result<()> { + }} + #[inline] pub fn clear_value(&self, dp: &DependencyProperty) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ClearValue)(self as *const _ as *mut _, dp as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn read_local_value(&self, dp: &DependencyProperty) -> Result> { + }} + #[inline] pub fn read_local_value(&self, dp: &DependencyProperty) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).ReadLocalValue)(self as *const _ as *mut _, 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(&self, dp: &DependencyProperty) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_animation_base_value(&self, dp: &DependencyProperty) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetAnimationBaseValue)(self as *const _ as *mut _, 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(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_dispatcher(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Dispatcher)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DependencyObject: IDependencyObject} DEFINE_IID!(IID_IDependencyObject2, 704567389, 15650, 17313, 173, 208, 23, 2, 124, 8, 178, 18); @@ -713,62 +713,62 @@ RT_INTERFACE!{interface IDependencyObject2(IDependencyObject2Vtbl): IInspectable fn UnregisterPropertyChangedCallback(&self, dp: *mut DependencyProperty, token: i64) -> HRESULT }} impl IDependencyObject2 { - #[inline] pub unsafe fn register_property_changed_callback(&self, dp: &DependencyProperty, callback: &DependencyPropertyChangedCallback) -> Result { + #[inline] pub fn register_property_changed_callback(&self, dp: &DependencyProperty, callback: &DependencyPropertyChangedCallback) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).RegisterPropertyChangedCallback)(self as *const _ as *mut _, 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(&self, dp: &DependencyProperty, token: i64) -> Result<()> { + }} + #[inline] pub fn unregister_property_changed_callback(&self, dp: &DependencyProperty, token: i64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).UnregisterPropertyChangedCallback)(self as *const _ as *mut _, dp as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } -RT_CLASS!{class DependencyObjectCollection: super::super::foundation::collections::IObservableVector} +RT_CLASS!{class DependencyObjectCollection: foundation::collections::IObservableVector} 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(&self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut DependencyObjectCollection) -> HRESULT }} impl IDependencyObjectCollectionFactory { - #[inline] pub unsafe fn create_instance(&self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + #[inline] pub fn create_instance(&self, outer: &IInspectable) -> Result<(Option>, Option>)> { unsafe { let mut inner = null_mut(); let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self 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) } - } + if hr == S_OK { Ok((ComPtr::wrap_optional(inner), ComPtr::wrap_optional(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(&self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut DependencyObject) -> HRESULT }} impl IDependencyObjectFactory { - #[inline] pub unsafe fn create_instance(&self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + #[inline] pub fn create_instance(&self, outer: &IInspectable) -> Result<(Option>, Option>)> { unsafe { let mut inner = null_mut(); let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self 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) } - } + if hr == S_OK { Ok((ComPtr::wrap_optional(inner), ComPtr::wrap_optional(out))) } 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(&self, forType: interop::TypeName, out: *mut *mut PropertyMetadata) -> HRESULT }} impl IDependencyProperty { - #[inline] pub unsafe fn get_metadata(&self, forType: interop::TypeName) -> Result> { + #[inline] pub fn get_metadata(&self, forType: interop::TypeName) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetMetadata)(self as *const _ as *mut _, forType, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DependencyProperty: IDependencyProperty} impl RtActivatable for DependencyProperty {} impl DependencyProperty { - #[inline] pub fn get_unset_value() -> Result> { unsafe { + #[inline] pub fn get_unset_value() -> Result>> { >::get_activation_factory().get_unset_value() - }} - #[inline] pub fn register(name: &HStringArg, propertyType: interop::TypeName, ownerType: interop::TypeName, typeMetadata: &PropertyMetadata) -> Result> { unsafe { + } + #[inline] pub fn register(name: &HStringArg, propertyType: interop::TypeName, ownerType: interop::TypeName, typeMetadata: &PropertyMetadata) -> Result>> { >::get_activation_factory().register(name, propertyType, ownerType, typeMetadata) - }} - #[inline] pub fn register_attached(name: &HStringArg, propertyType: interop::TypeName, ownerType: interop::TypeName, defaultMetadata: &PropertyMetadata) -> Result> { unsafe { + } + #[inline] pub fn register_attached(name: &HStringArg, propertyType: interop::TypeName, ownerType: interop::TypeName, defaultMetadata: &PropertyMetadata) -> Result>> { >::get_activation_factory().register_attached(name, propertyType, ownerType, defaultMetadata) - }} + } } DEFINE_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]) [CLSID_DependencyProperty]); DEFINE_IID!(IID_DependencyPropertyChangedCallback, 1166556438, 10175, 19393, 172, 38, 148, 193, 96, 31, 58, 73); @@ -776,10 +776,10 @@ RT_DELEGATE!{delegate DependencyPropertyChangedCallback(DependencyPropertyChange fn Invoke(&self, sender: *mut DependencyObject, dp: *mut DependencyProperty) -> HRESULT }} impl DependencyPropertyChangedCallback { - #[inline] pub unsafe fn invoke(&self, sender: &DependencyObject, dp: &DependencyProperty) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &DependencyObject, dp: &DependencyProperty) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, dp as *const _ as *mut _); if hr == S_OK { Ok(()) } 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] { @@ -788,21 +788,21 @@ RT_INTERFACE!{interface IDependencyPropertyChangedEventArgs(IDependencyPropertyC fn get_NewValue(&self, out: *mut *mut IInspectable) -> HRESULT }} impl IDependencyPropertyChangedEventArgs { - #[inline] pub unsafe fn get_property(&self) -> Result> { + #[inline] pub fn get_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Property)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_old_value(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_old_value(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OldValue)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_new_value(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_new_value(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NewValue)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class DependencyPropertyChangedEventArgs: IDependencyPropertyChangedEventArgs} DEFINE_IID!(IID_DependencyPropertyChangedEventHandler, 153239130, 30142, 17561, 129, 128, 29, 220, 0, 84, 33, 192); @@ -810,10 +810,10 @@ RT_DELEGATE!{delegate DependencyPropertyChangedEventHandler(DependencyPropertyCh fn Invoke(&self, sender: *mut IInspectable, e: *mut DependencyPropertyChangedEventArgs) -> HRESULT }} impl DependencyPropertyChangedEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &IInspectable, e: &DependencyPropertyChangedEventArgs) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &IInspectable, e: &DependencyPropertyChangedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, e as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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] { @@ -822,64 +822,64 @@ RT_INTERFACE!{static interface IDependencyPropertyStatics(IDependencyPropertySta fn RegisterAttached(&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(&self) -> Result> { + #[inline] pub fn get_unset_value(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UnsetValue)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn register(&self, name: &HStringArg, propertyType: interop::TypeName, ownerType: interop::TypeName, typeMetadata: &PropertyMetadata) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn register(&self, name: &HStringArg, propertyType: interop::TypeName, ownerType: interop::TypeName, typeMetadata: &PropertyMetadata) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).Register)(self as *const _ as *mut _, 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(&self, name: &HStringArg, propertyType: interop::TypeName, ownerType: interop::TypeName, defaultMetadata: &PropertyMetadata) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn register_attached(&self, name: &HStringArg, propertyType: interop::TypeName, ownerType: interop::TypeName, defaultMetadata: &PropertyMetadata) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).RegisterAttached)(self as *const _ as *mut _, name.get(), propertyType, ownerType, defaultMetadata as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } 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(&self, out: *mut super::super::foundation::TimeSpan) -> HRESULT, - fn put_Interval(&self, value: super::super::foundation::TimeSpan) -> HRESULT, + fn get_Interval(&self, out: *mut foundation::TimeSpan) -> HRESULT, + fn put_Interval(&self, value: foundation::TimeSpan) -> HRESULT, fn get_IsEnabled(&self, out: *mut bool) -> HRESULT, - fn add_Tick(&self, value: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Tick(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Tick(&self, value: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Tick(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn Start(&self) -> HRESULT, fn Stop(&self) -> HRESULT }} impl IDispatcherTimer { - #[inline] pub unsafe fn get_interval(&self) -> Result { + #[inline] pub fn get_interval(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Interval)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_interval(&self, value: super::super::foundation::TimeSpan) -> Result<()> { + }} + #[inline] pub fn set_interval(&self, value: foundation::TimeSpan) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Interval)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_tick(&self, value: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_tick(&self, value: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Tick)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_tick(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_tick(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Tick)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start(&self) -> Result<()> { + }} + #[inline] pub fn start(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Start)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn stop(&self) -> Result<()> { + }} + #[inline] pub fn stop(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Stop)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DispatcherTimer: IDispatcherTimer} DEFINE_IID!(IID_IDispatcherTimerFactory, 3918929518, 13862, 16442, 175, 224, 4, 13, 88, 22, 86, 50); @@ -887,11 +887,11 @@ RT_INTERFACE!{interface IDispatcherTimerFactory(IDispatcherTimerFactoryVtbl): II fn CreateInstance(&self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut DispatcherTimer) -> HRESULT }} impl IDispatcherTimerFactory { - #[inline] pub unsafe fn create_instance(&self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + #[inline] pub fn create_instance(&self, outer: &IInspectable) -> Result<(Option>, Option>)> { unsafe { let mut inner = null_mut(); let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self 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) } - } + if hr == S_OK { Ok((ComPtr::wrap_optional(inner), ComPtr::wrap_optional(out))) } else { err(hr) } + }} } DEFINE_IID!(IID_IDragEventArgs, 3024144323, 692, 18816, 147, 66, 37, 218, 225, 192, 241, 136); RT_INTERFACE!{interface IDragEventArgs(IDragEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IDragEventArgs] { @@ -901,32 +901,32 @@ RT_INTERFACE!{interface IDragEventArgs(IDragEventArgsVtbl): IInspectable(IInspec #[cfg(feature="windows-applicationmodel")] fn get_Data(&self, out: *mut *mut super::super::applicationmodel::datatransfer::DataPackage) -> HRESULT, #[cfg(not(feature="windows-applicationmodel"))] fn __Dummy3(&self) -> (), #[cfg(feature="windows-applicationmodel")] fn put_Data(&self, value: *mut super::super::applicationmodel::datatransfer::DataPackage) -> HRESULT, - fn GetPosition(&self, relativeTo: *mut UIElement, out: *mut super::super::foundation::Point) -> HRESULT + fn GetPosition(&self, relativeTo: *mut UIElement, out: *mut foundation::Point) -> HRESULT }} impl IDragEventArgs { - #[inline] pub unsafe fn get_handled(&self) -> Result { + #[inline] pub fn get_handled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Handled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_handled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_handled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Handled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn get_data(&self) -> Result> { + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn get_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Data)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn set_data(&self, value: &super::super::applicationmodel::datatransfer::DataPackage) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn set_data(&self, value: &super::super::applicationmodel::datatransfer::DataPackage) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Data)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_position(&self, relativeTo: &UIElement) -> Result { + }} + #[inline] pub fn get_position(&self, relativeTo: &UIElement) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetPosition)(self as *const _ as *mut _, relativeTo as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class DragEventArgs: IDragEventArgs} DEFINE_IID!(IID_IDragEventArgs2, 640902744, 10519, 16669, 191, 195, 47, 34, 71, 28, 187, 231); @@ -943,66 +943,66 @@ RT_INTERFACE!{interface IDragEventArgs2(IDragEventArgs2Vtbl): IInspectable(IInsp fn GetDeferral(&self, out: *mut *mut DragOperationDeferral) -> HRESULT }} impl IDragEventArgs2 { - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn get_data_view(&self) -> Result> { + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn get_data_view(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DataView)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_drag_uioverride(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_drag_uioverride(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DragUIOverride)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn get_modifiers(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn get_modifiers(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Modifiers)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn get_accepted_operation(&self) -> Result { + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn get_accepted_operation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AcceptedOperation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn set_accepted_operation(&self, value: super::super::applicationmodel::datatransfer::DataPackageOperation) -> Result<()> { + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn set_accepted_operation(&self, value: super::super::applicationmodel::datatransfer::DataPackageOperation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AcceptedOperation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut super::super::applicationmodel::datatransfer::DataPackageOperation) -> HRESULT }} impl IDragEventArgs3 { - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn get_allowed_operations(&self) -> Result { + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn get_allowed_operations(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AllowedOperations)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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(&self, sender: *mut IInspectable, e: *mut DragEventArgs) -> HRESULT }} impl DragEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &IInspectable, e: &DragEventArgs) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &IInspectable, e: &DragEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, e as *const _ as *mut _); if hr == S_OK { Ok(()) } 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(&self) -> HRESULT }} impl IDragOperationDeferral { - #[inline] pub unsafe fn complete(&self) -> Result<()> { + #[inline] pub fn complete(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Complete)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DragOperationDeferral: IDragOperationDeferral} DEFINE_IID!(IID_IDragStartingEventArgs, 1744884730, 37048, 18169, 142, 48, 90, 194, 95, 115, 240, 249); @@ -1013,38 +1013,38 @@ RT_INTERFACE!{interface IDragStartingEventArgs(IDragStartingEventArgsVtbl): IIns #[cfg(feature="windows-applicationmodel")] fn get_Data(&self, out: *mut *mut super::super::applicationmodel::datatransfer::DataPackage) -> HRESULT, fn get_DragUI(&self, out: *mut *mut DragUI) -> HRESULT, fn GetDeferral(&self, out: *mut *mut DragOperationDeferral) -> HRESULT, - fn GetPosition(&self, relativeTo: *mut UIElement, out: *mut super::super::foundation::Point) -> HRESULT + fn GetPosition(&self, relativeTo: *mut UIElement, out: *mut foundation::Point) -> HRESULT }} impl IDragStartingEventArgs { - #[inline] pub unsafe fn get_cancel(&self) -> Result { + #[inline] pub fn get_cancel(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Cancel)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_cancel(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_cancel(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Cancel)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn get_data(&self) -> Result> { + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn get_data(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Data)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_drag_ui(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_drag_ui(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DragUI)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_deferral(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_deferral(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetDeferral)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_position(&self, relativeTo: &UIElement) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_position(&self, relativeTo: &UIElement) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetPosition)(self as *const _ as *mut _, relativeTo as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class DragStartingEventArgs: IDragStartingEventArgs} DEFINE_IID!(IID_IDragStartingEventArgs2, 3629506702, 17590, 16913, 189, 11, 127, 221, 187, 110, 130, 49); @@ -1053,47 +1053,47 @@ RT_INTERFACE!{interface IDragStartingEventArgs2(IDragStartingEventArgs2Vtbl): II #[cfg(feature="windows-applicationmodel")] fn put_AllowedOperations(&self, value: super::super::applicationmodel::datatransfer::DataPackageOperation) -> HRESULT }} impl IDragStartingEventArgs2 { - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn get_allowed_operations(&self) -> Result { + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn get_allowed_operations(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AllowedOperations)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn set_allowed_operations(&self, value: super::super::applicationmodel::datatransfer::DataPackageOperation) -> Result<()> { + }} + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn set_allowed_operations(&self, value: super::super::applicationmodel::datatransfer::DataPackageOperation) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AllowedOperations)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, bitmapImage: *mut media::imaging::BitmapImage) -> HRESULT, - fn SetContentFromBitmapImageWithAnchorPoint(&self, bitmapImage: *mut media::imaging::BitmapImage, anchorPoint: super::super::foundation::Point) -> HRESULT, + fn SetContentFromBitmapImageWithAnchorPoint(&self, bitmapImage: *mut media::imaging::BitmapImage, anchorPoint: foundation::Point) -> HRESULT, #[cfg(not(feature="windows-graphics"))] fn __Dummy2(&self) -> (), #[cfg(feature="windows-graphics")] fn SetContentFromSoftwareBitmap(&self, softwareBitmap: *mut super::super::graphics::imaging::SoftwareBitmap) -> HRESULT, #[cfg(not(feature="windows-graphics"))] fn __Dummy3(&self) -> (), - #[cfg(feature="windows-graphics")] fn SetContentFromSoftwareBitmapWithAnchorPoint(&self, softwareBitmap: *mut super::super::graphics::imaging::SoftwareBitmap, anchorPoint: super::super::foundation::Point) -> HRESULT, + #[cfg(feature="windows-graphics")] fn SetContentFromSoftwareBitmapWithAnchorPoint(&self, softwareBitmap: *mut super::super::graphics::imaging::SoftwareBitmap, anchorPoint: foundation::Point) -> HRESULT, fn SetContentFromDataPackage(&self) -> HRESULT }} impl IDragUI { - #[inline] pub unsafe fn set_content_from_bitmap_image(&self, bitmapImage: &media::imaging::BitmapImage) -> Result<()> { + #[inline] pub fn set_content_from_bitmap_image(&self, bitmapImage: &media::imaging::BitmapImage) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetContentFromBitmapImage)(self as *const _ as *mut _, 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(&self, bitmapImage: &media::imaging::BitmapImage, anchorPoint: super::super::foundation::Point) -> Result<()> { + }} + #[inline] pub fn set_content_from_bitmap_image_with_anchor_point(&self, bitmapImage: &media::imaging::BitmapImage, anchorPoint: foundation::Point) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetContentFromBitmapImageWithAnchorPoint)(self as *const _ as *mut _, 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(&self, softwareBitmap: &super::super::graphics::imaging::SoftwareBitmap) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn set_content_from_software_bitmap(&self, softwareBitmap: &super::super::graphics::imaging::SoftwareBitmap) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetContentFromSoftwareBitmap)(self as *const _ as *mut _, 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(&self, softwareBitmap: &super::super::graphics::imaging::SoftwareBitmap, anchorPoint: super::super::foundation::Point) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn set_content_from_software_bitmap_with_anchor_point(&self, softwareBitmap: &super::super::graphics::imaging::SoftwareBitmap, anchorPoint: foundation::Point) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetContentFromSoftwareBitmapWithAnchorPoint)(self as *const _ as *mut _, softwareBitmap as *const _ as *mut _, anchorPoint); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_content_from_data_package(&self) -> Result<()> { + }} + #[inline] pub fn set_content_from_data_package(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetContentFromDataPackage)(self as *const _ as *mut _); 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); @@ -1108,67 +1108,67 @@ RT_INTERFACE!{interface IDragUIOverride(IDragUIOverrideVtbl): IInspectable(IInsp fn put_IsGlyphVisible(&self, value: bool) -> HRESULT, fn Clear(&self) -> HRESULT, fn SetContentFromBitmapImage(&self, bitmapImage: *mut media::imaging::BitmapImage) -> HRESULT, - fn SetContentFromBitmapImageWithAnchorPoint(&self, bitmapImage: *mut media::imaging::BitmapImage, anchorPoint: super::super::foundation::Point) -> HRESULT, + fn SetContentFromBitmapImageWithAnchorPoint(&self, bitmapImage: *mut media::imaging::BitmapImage, anchorPoint: foundation::Point) -> HRESULT, #[cfg(feature="windows-graphics")] fn SetContentFromSoftwareBitmap(&self, softwareBitmap: *mut super::super::graphics::imaging::SoftwareBitmap) -> HRESULT, - #[cfg(feature="windows-graphics")] fn SetContentFromSoftwareBitmapWithAnchorPoint(&self, softwareBitmap: *mut super::super::graphics::imaging::SoftwareBitmap, anchorPoint: super::super::foundation::Point) -> HRESULT + #[cfg(feature="windows-graphics")] fn SetContentFromSoftwareBitmapWithAnchorPoint(&self, softwareBitmap: *mut super::super::graphics::imaging::SoftwareBitmap, anchorPoint: foundation::Point) -> HRESULT }} impl IDragUIOverride { - #[inline] pub unsafe fn get_caption(&self) -> Result { + #[inline] pub fn get_caption(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Caption)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_caption(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_caption(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Caption)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_content_visible(&self) -> Result { + }} + #[inline] pub fn get_is_content_visible(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsContentVisible)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_content_visible(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_content_visible(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsContentVisible)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_caption_visible(&self) -> Result { + }} + #[inline] pub fn get_is_caption_visible(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsCaptionVisible)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_caption_visible(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_caption_visible(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsCaptionVisible)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_glyph_visible(&self) -> Result { + }} + #[inline] pub fn get_is_glyph_visible(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsGlyphVisible)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_glyph_visible(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_glyph_visible(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsGlyphVisible)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn clear(&self) -> Result<()> { + }} + #[inline] pub fn clear(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Clear)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn set_content_from_bitmap_image(&self, bitmapImage: &media::imaging::BitmapImage) -> Result<()> { + }} + #[inline] pub fn set_content_from_bitmap_image(&self, bitmapImage: &media::imaging::BitmapImage) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetContentFromBitmapImage)(self as *const _ as *mut _, 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(&self, bitmapImage: &media::imaging::BitmapImage, anchorPoint: super::super::foundation::Point) -> Result<()> { + }} + #[inline] pub fn set_content_from_bitmap_image_with_anchor_point(&self, bitmapImage: &media::imaging::BitmapImage, anchorPoint: foundation::Point) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetContentFromBitmapImageWithAnchorPoint)(self as *const _ as *mut _, 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(&self, softwareBitmap: &super::super::graphics::imaging::SoftwareBitmap) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn set_content_from_software_bitmap(&self, softwareBitmap: &super::super::graphics::imaging::SoftwareBitmap) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetContentFromSoftwareBitmap)(self as *const _ as *mut _, 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(&self, softwareBitmap: &super::super::graphics::imaging::SoftwareBitmap, anchorPoint: super::super::foundation::Point) -> Result<()> { + }} + #[cfg(feature="windows-graphics")] #[inline] pub fn set_content_from_software_bitmap_with_anchor_point(&self, softwareBitmap: &super::super::graphics::imaging::SoftwareBitmap, anchorPoint: foundation::Point) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetContentFromSoftwareBitmapWithAnchorPoint)(self as *const _ as *mut _, softwareBitmap as *const _ as *mut _, anchorPoint); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class DragUIOverride: IDragUIOverride} DEFINE_IID!(IID_IDropCompletedEventArgs, 1817166216, 38332, 16993, 158, 197, 33, 202, 182, 119, 183, 52); @@ -1176,15 +1176,15 @@ RT_INTERFACE!{interface IDropCompletedEventArgs(IDropCompletedEventArgsVtbl): II #[cfg(feature="windows-applicationmodel")] fn get_DropResult(&self, out: *mut super::super::applicationmodel::datatransfer::DataPackageOperation) -> HRESULT }} impl IDropCompletedEventArgs { - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn get_drop_result(&self) -> Result { + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn get_drop_result(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DropResult)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class DropCompletedEventArgs: IDropCompletedEventArgs} RT_STRUCT! { struct Duration { - TimeSpan: super::super::foundation::TimeSpan, Type: DurationType, + TimeSpan: 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] { @@ -1193,30 +1193,30 @@ RT_INTERFACE!{interface IDurationHelper(IDurationHelperVtbl): IInspectable(IInsp RT_CLASS!{class DurationHelper: IDurationHelper} impl RtActivatable for DurationHelper {} impl DurationHelper { - #[inline] pub fn get_automatic() -> Result { unsafe { + #[inline] pub fn get_automatic() -> Result { >::get_activation_factory().get_automatic() - }} - #[inline] pub fn get_forever() -> Result { unsafe { + } + #[inline] pub fn get_forever() -> Result { >::get_activation_factory().get_forever() - }} - #[inline] pub fn compare(duration1: Duration, duration2: Duration) -> Result { unsafe { + } + #[inline] pub fn compare(duration1: Duration, duration2: Duration) -> Result { >::get_activation_factory().compare(duration1, duration2) - }} - #[inline] pub fn from_time_span(timeSpan: super::super::foundation::TimeSpan) -> Result { unsafe { + } + #[inline] pub fn from_time_span(timeSpan: foundation::TimeSpan) -> Result { >::get_activation_factory().from_time_span(timeSpan) - }} - #[inline] pub fn get_has_time_span(target: Duration) -> Result { unsafe { + } + #[inline] pub fn get_has_time_span(target: Duration) -> Result { >::get_activation_factory().get_has_time_span(target) - }} - #[inline] pub fn add(target: Duration, duration: Duration) -> Result { unsafe { + } + #[inline] pub fn add(target: Duration, duration: Duration) -> Result { >::get_activation_factory().add(target, duration) - }} - #[inline] pub fn equals(target: Duration, value: Duration) -> Result { unsafe { + } + #[inline] pub fn equals(target: Duration, value: Duration) -> Result { >::get_activation_factory().equals(target, value) - }} - #[inline] pub fn subtract(target: Duration, duration: Duration) -> Result { unsafe { + } + #[inline] pub fn subtract(target: Duration, duration: Duration) -> Result { >::get_activation_factory().subtract(target, duration) - }} + } } DEFINE_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]) [CLSID_DurationHelper]); DEFINE_IID!(IID_IDurationHelperStatics, 3163031870, 13639, 20160, 181, 25, 255, 168, 249, 196, 131, 140); @@ -1224,53 +1224,53 @@ RT_INTERFACE!{static interface IDurationHelperStatics(IDurationHelperStaticsVtbl fn get_Automatic(&self, out: *mut Duration) -> HRESULT, fn get_Forever(&self, out: *mut Duration) -> HRESULT, fn Compare(&self, duration1: Duration, duration2: Duration, out: *mut i32) -> HRESULT, - fn FromTimeSpan(&self, timeSpan: super::super::foundation::TimeSpan, out: *mut Duration) -> HRESULT, + fn FromTimeSpan(&self, timeSpan: foundation::TimeSpan, out: *mut Duration) -> HRESULT, fn GetHasTimeSpan(&self, target: Duration, out: *mut bool) -> HRESULT, fn Add(&self, target: Duration, duration: Duration, out: *mut Duration) -> HRESULT, fn Equals(&self, target: Duration, value: Duration, out: *mut bool) -> HRESULT, fn Subtract(&self, target: Duration, duration: Duration, out: *mut Duration) -> HRESULT }} impl IDurationHelperStatics { - #[inline] pub unsafe fn get_automatic(&self) -> Result { + #[inline] pub fn get_automatic(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Automatic)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_forever(&self) -> Result { + }} + #[inline] pub fn get_forever(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Forever)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn compare(&self, duration1: Duration, duration2: Duration) -> Result { + }} + #[inline] pub fn compare(&self, duration1: Duration, duration2: Duration) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).Compare)(self as *const _ as *mut _, duration1, duration2, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn from_time_span(&self, timeSpan: super::super::foundation::TimeSpan) -> Result { + }} + #[inline] pub fn from_time_span(&self, timeSpan: foundation::TimeSpan) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).FromTimeSpan)(self as *const _ as *mut _, timeSpan, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_has_time_span(&self, target: Duration) -> Result { + }} + #[inline] pub fn get_has_time_span(&self, target: Duration) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetHasTimeSpan)(self as *const _ as *mut _, target, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add(&self, target: Duration, duration: Duration) -> Result { + }} + #[inline] pub fn add(&self, target: Duration, duration: Duration) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).Add)(self as *const _ as *mut _, target, duration, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn equals(&self, target: Duration, value: Duration) -> Result { + }} + #[inline] pub fn equals(&self, target: Duration, value: Duration) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).Equals)(self as *const _ as *mut _, target, value, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn subtract(&self, target: Duration, duration: Duration) -> Result { + }} + #[inline] pub fn subtract(&self, target: Duration, duration: Duration) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).Subtract)(self as *const _ as *mut _, target, duration, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum DurationType: i32 { Automatic (DurationType_Automatic) = 0, TimeSpan (DurationType_TimeSpan) = 1, Forever (DurationType_Forever) = 2, @@ -1291,21 +1291,21 @@ RT_INTERFACE!{interface IElementSoundPlayer(IElementSoundPlayerVtbl): IInspectab RT_CLASS!{class ElementSoundPlayer: IElementSoundPlayer} impl RtActivatable for ElementSoundPlayer {} impl ElementSoundPlayer { - #[inline] pub fn get_volume() -> Result { unsafe { + #[inline] pub fn get_volume() -> Result { >::get_activation_factory().get_volume() - }} - #[inline] pub fn set_volume(value: f64) -> Result<()> { unsafe { + } + #[inline] pub fn set_volume(value: f64) -> Result<()> { >::get_activation_factory().set_volume(value) - }} - #[inline] pub fn get_state() -> Result { unsafe { + } + #[inline] pub fn get_state() -> Result { >::get_activation_factory().get_state() - }} - #[inline] pub fn set_state(value: ElementSoundPlayerState) -> Result<()> { unsafe { + } + #[inline] pub fn set_state(value: ElementSoundPlayerState) -> Result<()> { >::get_activation_factory().set_state(value) - }} - #[inline] pub fn play(sound: ElementSoundKind) -> Result<()> { unsafe { + } + #[inline] pub fn play(sound: ElementSoundKind) -> Result<()> { >::get_activation_factory().play(sound) - }} + } } DEFINE_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]) [CLSID_ElementSoundPlayer]); RT_ENUM! { enum ElementSoundPlayerState: i32 { @@ -1320,28 +1320,28 @@ RT_INTERFACE!{static interface IElementSoundPlayerStatics(IElementSoundPlayerSta fn Play(&self, sound: ElementSoundKind) -> HRESULT }} impl IElementSoundPlayerStatics { - #[inline] pub unsafe fn get_volume(&self) -> Result { + #[inline] pub fn get_volume(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Volume)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_volume(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_volume(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Volume)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_state(&self) -> Result { + }} + #[inline] pub fn get_state(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_State)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_state(&self, value: ElementSoundPlayerState) -> Result<()> { + }} + #[inline] pub fn set_state(&self, value: ElementSoundPlayerState) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_State)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn play(&self, sound: ElementSoundKind) -> Result<()> { + }} + #[inline] pub fn play(&self, sound: ElementSoundKind) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Play)(self as *const _ as *mut _, sound); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum ElementTheme: i32 { Default (ElementTheme_Default) = 0, Light (ElementTheme_Light) = 1, Dark (ElementTheme_Dark) = 2, @@ -1351,10 +1351,10 @@ RT_DELEGATE!{delegate EnteredBackgroundEventHandler(EnteredBackgroundEventHandle #[cfg(feature="windows-applicationmodel")] fn Invoke(&self, sender: *mut IInspectable, e: *mut super::super::applicationmodel::EnteredBackgroundEventArgs) -> HRESULT }} impl EnteredBackgroundEventHandler { - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn invoke(&self, sender: &IInspectable, e: &super::super::applicationmodel::EnteredBackgroundEventArgs) -> Result<()> { + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn invoke(&self, sender: &IInspectable, e: &super::super::applicationmodel::EnteredBackgroundEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, e as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IEventTrigger, 3740858453, 2889, 16519, 177, 169, 184, 179, 132, 136, 247, 134); RT_INTERFACE!{interface IEventTrigger(IEventTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IEventTrigger] { @@ -1363,20 +1363,20 @@ RT_INTERFACE!{interface IEventTrigger(IEventTriggerVtbl): IInspectable(IInspecta fn get_Actions(&self, out: *mut *mut TriggerActionCollection) -> HRESULT }} impl IEventTrigger { - #[inline] pub unsafe fn get_routed_event(&self) -> Result> { + #[inline] pub fn get_routed_event(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RoutedEvent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_routed_event(&self, value: &RoutedEvent) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_routed_event(&self, value: &RoutedEvent) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RoutedEvent)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_actions(&self) -> Result> { + }} + #[inline] pub fn get_actions(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Actions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class EventTrigger: IEventTrigger} impl RtActivatable for EventTrigger {} @@ -1386,11 +1386,11 @@ RT_INTERFACE!{interface IExceptionRoutedEventArgs(IExceptionRoutedEventArgsVtbl) fn get_ErrorMessage(&self, out: *mut HSTRING) -> HRESULT }} impl IExceptionRoutedEventArgs { - #[inline] pub unsafe fn get_error_message(&self) -> Result { + #[inline] pub fn get_error_message(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ErrorMessage)(self as *const _ as *mut _, &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); @@ -1402,10 +1402,10 @@ RT_DELEGATE!{delegate ExceptionRoutedEventHandler(ExceptionRoutedEventHandlerVtb fn Invoke(&self, sender: *mut IInspectable, e: *mut ExceptionRoutedEventArgs) -> HRESULT }} impl ExceptionRoutedEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &IInspectable, e: &ExceptionRoutedEventArgs) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &IInspectable, e: &ExceptionRoutedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, e as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum FlowDirection: i32 { LeftToRight (FlowDirection_LeftToRight) = 0, RightToLeft (FlowDirection_RightToLeft) = 1, @@ -1468,7 +1468,7 @@ RT_INTERFACE!{interface IFrameworkElement(IFrameworkElementVtbl): IInspectable(I fn put_Margin(&self, value: Thickness) -> HRESULT, fn get_Name(&self, out: *mut HSTRING) -> HRESULT, fn put_Name(&self, value: HSTRING) -> HRESULT, - fn get_BaseUri(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, + fn get_BaseUri(&self, out: *mut *mut foundation::Uri) -> HRESULT, fn get_DataContext(&self, out: *mut *mut IInspectable) -> HRESULT, fn put_DataContext(&self, value: *mut IInspectable) -> HRESULT, fn get_Style(&self, out: *mut *mut Style) -> HRESULT, @@ -1476,232 +1476,232 @@ RT_INTERFACE!{interface IFrameworkElement(IFrameworkElementVtbl): IInspectable(I fn get_Parent(&self, out: *mut *mut DependencyObject) -> HRESULT, fn get_FlowDirection(&self, out: *mut FlowDirection) -> HRESULT, fn put_FlowDirection(&self, value: FlowDirection) -> HRESULT, - fn add_Loaded(&self, value: *mut RoutedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Loaded(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Unloaded(&self, value: *mut RoutedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Unloaded(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_SizeChanged(&self, value: *mut SizeChangedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SizeChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_LayoutUpdated(&self, value: *mut super::super::foundation::EventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_LayoutUpdated(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Loaded(&self, value: *mut RoutedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Loaded(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Unloaded(&self, value: *mut RoutedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Unloaded(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_SizeChanged(&self, value: *mut SizeChangedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SizeChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_LayoutUpdated(&self, value: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_LayoutUpdated(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn FindName(&self, name: HSTRING, out: *mut *mut IInspectable) -> HRESULT, fn SetBinding(&self, dp: *mut DependencyProperty, binding: *mut data::BindingBase) -> HRESULT }} impl IFrameworkElement { - #[inline] pub unsafe fn get_triggers(&self) -> Result> { + #[inline] pub fn get_triggers(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Triggers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_resources(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_resources(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Resources)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_resources(&self, value: &ResourceDictionary) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_resources(&self, value: &ResourceDictionary) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Resources)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_tag(&self) -> Result> { + }} + #[inline] pub fn get_tag(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Tag)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_tag(&self, value: &IInspectable) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_tag(&self, value: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Tag)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_language(&self) -> Result { + }} + #[inline] pub fn get_language(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Language)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_language(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_language(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Language)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_actual_width(&self) -> Result { + }} + #[inline] pub fn get_actual_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ActualWidth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_actual_height(&self) -> Result { + }} + #[inline] pub fn get_actual_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ActualHeight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_width(&self) -> Result { + }} + #[inline] pub fn get_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Width)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_width(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_width(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Width)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_height(&self) -> Result { + }} + #[inline] pub fn get_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Height)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_height(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_height(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Height)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_width(&self) -> Result { + }} + #[inline] pub fn get_min_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinWidth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_min_width(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_min_width(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MinWidth)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_width(&self) -> Result { + }} + #[inline] pub fn get_max_width(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxWidth)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_width(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_max_width(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxWidth)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_height(&self) -> Result { + }} + #[inline] pub fn get_min_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MinHeight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_min_height(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_min_height(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MinHeight)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_height(&self) -> Result { + }} + #[inline] pub fn get_max_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxHeight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_height(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_max_height(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxHeight)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_horizontal_alignment(&self) -> Result { + }} + #[inline] pub fn get_horizontal_alignment(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HorizontalAlignment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_horizontal_alignment(&self, value: HorizontalAlignment) -> Result<()> { + }} + #[inline] pub fn set_horizontal_alignment(&self, value: HorizontalAlignment) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_HorizontalAlignment)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_vertical_alignment(&self) -> Result { + }} + #[inline] pub fn get_vertical_alignment(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_VerticalAlignment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_vertical_alignment(&self, value: VerticalAlignment) -> Result<()> { + }} + #[inline] pub fn set_vertical_alignment(&self, value: VerticalAlignment) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_VerticalAlignment)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_margin(&self) -> Result { + }} + #[inline] pub fn get_margin(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Margin)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_margin(&self, value: Thickness) -> Result<()> { + }} + #[inline] pub fn set_margin(&self, value: Thickness) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Margin)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_name(&self) -> Result { + }} + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_name(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_name(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Name)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_base_uri(&self) -> Result> { + }} + #[inline] pub fn get_base_uri(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BaseUri)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_data_context(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_data_context(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DataContext)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_data_context(&self, value: &IInspectable) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_data_context(&self, value: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_DataContext)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_style(&self) -> Result> { + }} + #[inline] pub fn get_style(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Style)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_style(&self, value: &Style) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_style(&self, value: &Style) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Style)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_parent(&self) -> Result> { + }} + #[inline] pub fn get_parent(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Parent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_flow_direction(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_flow_direction(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FlowDirection)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_flow_direction(&self, value: FlowDirection) -> Result<()> { + }} + #[inline] pub fn set_flow_direction(&self, value: FlowDirection) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FlowDirection)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_loaded(&self, value: &RoutedEventHandler) -> Result { + }} + #[inline] pub fn add_loaded(&self, value: &RoutedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Loaded)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_loaded(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_loaded(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Loaded)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_unloaded(&self, value: &RoutedEventHandler) -> Result { + }} + #[inline] pub fn add_unloaded(&self, value: &RoutedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Unloaded)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_unloaded(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_unloaded(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Unloaded)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_size_changed(&self, value: &SizeChangedEventHandler) -> Result { + }} + #[inline] pub fn add_size_changed(&self, value: &SizeChangedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SizeChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_size_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_size_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SizeChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_layout_updated(&self, value: &super::super::foundation::EventHandler) -> Result { + }} + #[inline] pub fn add_layout_updated(&self, value: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_LayoutUpdated)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_layout_updated(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_layout_updated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_LayoutUpdated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn find_name(&self, name: &HStringArg) -> Result> { + }} + #[inline] pub fn find_name(&self, name: &HStringArg) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindName)(self as *const _ as *mut _, name.get(), &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_binding(&self, dp: &DependencyProperty, binding: &data::BindingBase) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_binding(&self, dp: &DependencyProperty, binding: &data::BindingBase) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetBinding)(self as *const _ as *mut _, dp as *const _ as *mut _, binding as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class FrameworkElement: IFrameworkElement} impl RtActivatable for FrameworkElement {} @@ -1710,137 +1710,137 @@ impl RtActivatable for FrameworkElement {} impl RtActivatable for FrameworkElement {} impl RtActivatable for FrameworkElement {} impl FrameworkElement { - #[inline] pub fn get_tag_property() -> Result> { unsafe { + #[inline] pub fn get_tag_property() -> Result>> { >::get_activation_factory().get_tag_property() - }} - #[inline] pub fn get_language_property() -> Result> { unsafe { + } + #[inline] pub fn get_language_property() -> Result>> { >::get_activation_factory().get_language_property() - }} - #[inline] pub fn get_actual_width_property() -> Result> { unsafe { + } + #[inline] pub fn get_actual_width_property() -> Result>> { >::get_activation_factory().get_actual_width_property() - }} - #[inline] pub fn get_actual_height_property() -> Result> { unsafe { + } + #[inline] pub fn get_actual_height_property() -> Result>> { >::get_activation_factory().get_actual_height_property() - }} - #[inline] pub fn get_width_property() -> Result> { unsafe { + } + #[inline] pub fn get_width_property() -> Result>> { >::get_activation_factory().get_width_property() - }} - #[inline] pub fn get_height_property() -> Result> { unsafe { + } + #[inline] pub fn get_height_property() -> Result>> { >::get_activation_factory().get_height_property() - }} - #[inline] pub fn get_min_width_property() -> Result> { unsafe { + } + #[inline] pub fn get_min_width_property() -> Result>> { >::get_activation_factory().get_min_width_property() - }} - #[inline] pub fn get_max_width_property() -> Result> { unsafe { + } + #[inline] pub fn get_max_width_property() -> Result>> { >::get_activation_factory().get_max_width_property() - }} - #[inline] pub fn get_min_height_property() -> Result> { unsafe { + } + #[inline] pub fn get_min_height_property() -> Result>> { >::get_activation_factory().get_min_height_property() - }} - #[inline] pub fn get_max_height_property() -> Result> { unsafe { + } + #[inline] pub fn get_max_height_property() -> Result>> { >::get_activation_factory().get_max_height_property() - }} - #[inline] pub fn get_horizontal_alignment_property() -> Result> { unsafe { + } + #[inline] pub fn get_horizontal_alignment_property() -> Result>> { >::get_activation_factory().get_horizontal_alignment_property() - }} - #[inline] pub fn get_vertical_alignment_property() -> Result> { unsafe { + } + #[inline] pub fn get_vertical_alignment_property() -> Result>> { >::get_activation_factory().get_vertical_alignment_property() - }} - #[inline] pub fn get_margin_property() -> Result> { unsafe { + } + #[inline] pub fn get_margin_property() -> Result>> { >::get_activation_factory().get_margin_property() - }} - #[inline] pub fn get_name_property() -> Result> { unsafe { + } + #[inline] pub fn get_name_property() -> Result>> { >::get_activation_factory().get_name_property() - }} - #[inline] pub fn get_data_context_property() -> Result> { unsafe { + } + #[inline] pub fn get_data_context_property() -> Result>> { >::get_activation_factory().get_data_context_property() - }} - #[inline] pub fn get_style_property() -> Result> { unsafe { + } + #[inline] pub fn get_style_property() -> Result>> { >::get_activation_factory().get_style_property() - }} - #[inline] pub fn get_flow_direction_property() -> Result> { unsafe { + } + #[inline] pub fn get_flow_direction_property() -> Result>> { >::get_activation_factory().get_flow_direction_property() - }} - #[inline] pub fn get_requested_theme_property() -> Result> { unsafe { + } + #[inline] pub fn get_requested_theme_property() -> Result>> { >::get_activation_factory().get_requested_theme_property() - }} - #[inline] pub fn get_allow_focus_on_interaction_property() -> Result> { unsafe { + } + #[inline] pub fn get_allow_focus_on_interaction_property() -> Result>> { >::get_activation_factory().get_allow_focus_on_interaction_property() - }} - #[inline] pub fn get_focus_visual_margin_property() -> Result> { unsafe { + } + #[inline] pub fn get_focus_visual_margin_property() -> Result>> { >::get_activation_factory().get_focus_visual_margin_property() - }} - #[inline] pub fn get_focus_visual_secondary_thickness_property() -> Result> { unsafe { + } + #[inline] pub fn get_focus_visual_secondary_thickness_property() -> Result>> { >::get_activation_factory().get_focus_visual_secondary_thickness_property() - }} - #[inline] pub fn get_focus_visual_primary_thickness_property() -> Result> { unsafe { + } + #[inline] pub fn get_focus_visual_primary_thickness_property() -> Result>> { >::get_activation_factory().get_focus_visual_primary_thickness_property() - }} - #[inline] pub fn get_focus_visual_secondary_brush_property() -> Result> { unsafe { + } + #[inline] pub fn get_focus_visual_secondary_brush_property() -> Result>> { >::get_activation_factory().get_focus_visual_secondary_brush_property() - }} - #[inline] pub fn get_focus_visual_primary_brush_property() -> Result> { unsafe { + } + #[inline] pub fn get_focus_visual_primary_brush_property() -> Result>> { >::get_activation_factory().get_focus_visual_primary_brush_property() - }} - #[inline] pub fn get_allow_focus_when_disabled_property() -> Result> { unsafe { + } + #[inline] pub fn get_allow_focus_when_disabled_property() -> Result>> { >::get_activation_factory().get_allow_focus_when_disabled_property() - }} - #[inline] pub fn defer_tree(element: &DependencyObject) -> Result<()> { unsafe { + } + #[inline] pub fn defer_tree(element: &DependencyObject) -> Result<()> { >::get_activation_factory().defer_tree(element) - }} - #[inline] pub fn get_actual_theme_property() -> Result> { unsafe { + } + #[inline] pub fn get_actual_theme_property() -> Result>> { >::get_activation_factory().get_actual_theme_property() - }} + } } DEFINE_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]) [CLSID_FrameworkElement]); 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(&self, out: *mut ElementTheme) -> HRESULT, fn put_RequestedTheme(&self, value: ElementTheme) -> HRESULT, - fn add_DataContextChanged(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DataContextChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_DataContextChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DataContextChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn GetBindingExpression(&self, dp: *mut DependencyProperty, out: *mut *mut data::BindingExpression) -> HRESULT }} impl IFrameworkElement2 { - #[inline] pub unsafe fn get_requested_theme(&self) -> Result { + #[inline] pub fn get_requested_theme(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RequestedTheme)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_requested_theme(&self, value: ElementTheme) -> Result<()> { + }} + #[inline] pub fn set_requested_theme(&self, value: ElementTheme) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RequestedTheme)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_data_context_changed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_data_context_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DataContextChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_data_context_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_data_context_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DataContextChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_binding_expression(&self, dp: &DependencyProperty) -> Result> { + }} + #[inline] pub fn get_binding_expression(&self, dp: &DependencyProperty) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetBindingExpression)(self as *const _ as *mut _, dp as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Loading(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_Loading(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Loading(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IFrameworkElement3 { - #[inline] pub unsafe fn add_loading(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + #[inline] pub fn add_loading(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Loading)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_loading(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_loading(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Loading)(self as *const _ as *mut _, 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] { @@ -1860,135 +1860,135 @@ RT_INTERFACE!{interface IFrameworkElement4(IFrameworkElement4Vtbl): IInspectable fn put_AllowFocusWhenDisabled(&self, value: bool) -> HRESULT }} impl IFrameworkElement4 { - #[inline] pub unsafe fn get_allow_focus_on_interaction(&self) -> Result { + #[inline] pub fn get_allow_focus_on_interaction(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AllowFocusOnInteraction)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_allow_focus_on_interaction(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_allow_focus_on_interaction(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AllowFocusOnInteraction)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_focus_visual_margin(&self) -> Result { + }} + #[inline] pub fn get_focus_visual_margin(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FocusVisualMargin)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_focus_visual_margin(&self, value: Thickness) -> Result<()> { + }} + #[inline] pub fn set_focus_visual_margin(&self, value: Thickness) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FocusVisualMargin)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_focus_visual_secondary_thickness(&self) -> Result { + }} + #[inline] pub fn get_focus_visual_secondary_thickness(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FocusVisualSecondaryThickness)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_focus_visual_secondary_thickness(&self, value: Thickness) -> Result<()> { + }} + #[inline] pub fn set_focus_visual_secondary_thickness(&self, value: Thickness) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FocusVisualSecondaryThickness)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_focus_visual_primary_thickness(&self) -> Result { + }} + #[inline] pub fn get_focus_visual_primary_thickness(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_FocusVisualPrimaryThickness)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_focus_visual_primary_thickness(&self, value: Thickness) -> Result<()> { + }} + #[inline] pub fn set_focus_visual_primary_thickness(&self, value: Thickness) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FocusVisualPrimaryThickness)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_focus_visual_secondary_brush(&self) -> Result> { + }} + #[inline] pub fn get_focus_visual_secondary_brush(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FocusVisualSecondaryBrush)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_focus_visual_secondary_brush(&self, value: &media::Brush) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_focus_visual_secondary_brush(&self, value: &media::Brush) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FocusVisualSecondaryBrush)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_focus_visual_primary_brush(&self) -> Result> { + }} + #[inline] pub fn get_focus_visual_primary_brush(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FocusVisualPrimaryBrush)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_focus_visual_primary_brush(&self, value: &media::Brush) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_focus_visual_primary_brush(&self, value: &media::Brush) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_FocusVisualPrimaryBrush)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_allow_focus_when_disabled(&self) -> Result { + }} + #[inline] pub fn get_allow_focus_when_disabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AllowFocusWhenDisabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_allow_focus_when_disabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_allow_focus_when_disabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AllowFocusWhenDisabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IFrameworkElement6, 2032819601, 25249, 16575, 160, 206, 249, 193, 49, 252, 183, 167); RT_INTERFACE!{interface IFrameworkElement6(IFrameworkElement6Vtbl): IInspectable(IInspectableVtbl) [IID_IFrameworkElement6] { fn get_ActualTheme(&self, out: *mut ElementTheme) -> HRESULT, - fn add_ActualThemeChanged(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ActualThemeChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ActualThemeChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ActualThemeChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IFrameworkElement6 { - #[inline] pub unsafe fn get_actual_theme(&self) -> Result { + #[inline] pub fn get_actual_theme(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ActualTheme)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn add_actual_theme_changed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_actual_theme_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ActualThemeChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_actual_theme_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_actual_theme_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ActualThemeChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } 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(&self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut FrameworkElement) -> HRESULT }} impl IFrameworkElementFactory { - #[inline] pub unsafe fn create_instance(&self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + #[inline] pub fn create_instance(&self, outer: &IInspectable) -> Result<(Option>, Option>)> { unsafe { let mut inner = null_mut(); let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self 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) } - } + if hr == S_OK { Ok((ComPtr::wrap_optional(inner), ComPtr::wrap_optional(out))) } 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(&self, availableSize: super::super::foundation::Size, out: *mut super::super::foundation::Size) -> HRESULT, - fn ArrangeOverride(&self, finalSize: super::super::foundation::Size, out: *mut super::super::foundation::Size) -> HRESULT, + fn MeasureOverride(&self, availableSize: foundation::Size, out: *mut foundation::Size) -> HRESULT, + fn ArrangeOverride(&self, finalSize: foundation::Size, out: *mut foundation::Size) -> HRESULT, fn OnApplyTemplate(&self) -> HRESULT }} impl IFrameworkElementOverrides { - #[inline] pub unsafe fn measure_override(&self, availableSize: super::super::foundation::Size) -> Result { + #[inline] pub fn measure_override(&self, availableSize: foundation::Size) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).MeasureOverride)(self as *const _ as *mut _, availableSize, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn arrange_override(&self, finalSize: super::super::foundation::Size) -> Result { + }} + #[inline] pub fn arrange_override(&self, finalSize: foundation::Size) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).ArrangeOverride)(self as *const _ as *mut _, finalSize, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn on_apply_template(&self) -> Result<()> { + }} + #[inline] pub fn on_apply_template(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnApplyTemplate)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } 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(&self, stateName: HSTRING, useTransitions: bool, out: *mut bool) -> HRESULT }} impl IFrameworkElementOverrides2 { - #[inline] pub unsafe fn go_to_element_state_core(&self, stateName: &HStringArg, useTransitions: bool) -> Result { + #[inline] pub fn go_to_element_state_core(&self, stateName: &HStringArg, useTransitions: bool) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GoToElementStateCore)(self as *const _ as *mut _, stateName.get(), useTransitions, &mut out); if hr == S_OK { Ok(out) } 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] { @@ -2011,102 +2011,102 @@ RT_INTERFACE!{static interface IFrameworkElementStatics(IFrameworkElementStatics fn get_FlowDirectionProperty(&self, out: *mut *mut DependencyProperty) -> HRESULT }} impl IFrameworkElementStatics { - #[inline] pub unsafe fn get_tag_property(&self) -> Result> { + #[inline] pub fn get_tag_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TagProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_language_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_language_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LanguageProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_actual_width_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_actual_width_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ActualWidthProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_actual_height_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_actual_height_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ActualHeightProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_width_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_width_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_WidthProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_height_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_height_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HeightProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_width_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_min_width_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MinWidthProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_width_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_max_width_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxWidthProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_min_height_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_min_height_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MinHeightProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_max_height_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_max_height_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxHeightProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_horizontal_alignment_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_horizontal_alignment_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HorizontalAlignmentProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_vertical_alignment_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_vertical_alignment_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VerticalAlignmentProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_margin_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_margin_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MarginProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_name_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_name_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NameProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_data_context_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_data_context_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DataContextProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_style_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_style_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StyleProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_flow_direction_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_flow_direction_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FlowDirectionProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut DependencyProperty) -> HRESULT }} impl IFrameworkElementStatics2 { - #[inline] pub unsafe fn get_requested_theme_property(&self) -> Result> { + #[inline] pub fn get_requested_theme_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RequestedThemeProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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] { @@ -2119,62 +2119,62 @@ RT_INTERFACE!{static interface IFrameworkElementStatics4(IFrameworkElementStatic fn get_AllowFocusWhenDisabledProperty(&self, out: *mut *mut DependencyProperty) -> HRESULT }} impl IFrameworkElementStatics4 { - #[inline] pub unsafe fn get_allow_focus_on_interaction_property(&self) -> Result> { + #[inline] pub fn get_allow_focus_on_interaction_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AllowFocusOnInteractionProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_focus_visual_margin_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_focus_visual_margin_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FocusVisualMarginProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_focus_visual_secondary_thickness_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_focus_visual_secondary_thickness_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FocusVisualSecondaryThicknessProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_focus_visual_primary_thickness_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_focus_visual_primary_thickness_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FocusVisualPrimaryThicknessProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_focus_visual_secondary_brush_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_focus_visual_secondary_brush_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FocusVisualSecondaryBrushProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_focus_visual_primary_brush_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_focus_visual_primary_brush_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_FocusVisualPrimaryBrushProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_allow_focus_when_disabled_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_allow_focus_when_disabled_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AllowFocusWhenDisabledProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IFrameworkElementStatics5, 1381841217, 2876, 19430, 153, 120, 25, 168, 2, 92, 9, 216); RT_INTERFACE!{static interface IFrameworkElementStatics5(IFrameworkElementStatics5Vtbl): IInspectable(IInspectableVtbl) [IID_IFrameworkElementStatics5] { fn DeferTree(&self, element: *mut DependencyObject) -> HRESULT }} impl IFrameworkElementStatics5 { - #[inline] pub unsafe fn defer_tree(&self, element: &DependencyObject) -> Result<()> { + #[inline] pub fn defer_tree(&self, element: &DependencyObject) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).DeferTree)(self as *const _ as *mut _, element as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IFrameworkElementStatics6, 4240528026, 27099, 17794, 167, 190, 207, 106, 28, 253, 172, 208); RT_INTERFACE!{static interface IFrameworkElementStatics6(IFrameworkElementStatics6Vtbl): IInspectable(IInspectableVtbl) [IID_IFrameworkElementStatics6] { fn get_ActualThemeProperty(&self, out: *mut *mut DependencyProperty) -> HRESULT }} impl IFrameworkElementStatics6 { - #[inline] pub unsafe fn get_actual_theme_property(&self) -> Result> { + #[inline] pub fn get_actual_theme_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ActualThemeProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IFrameworkTemplate, 2715964632, 42054, 18983, 154, 157, 160, 245, 158, 18, 88, 165); RT_INTERFACE!{interface IFrameworkTemplate(IFrameworkTemplateVtbl): IInspectable(IInspectableVtbl) [IID_IFrameworkTemplate] { @@ -2186,11 +2186,11 @@ RT_INTERFACE!{interface IFrameworkTemplateFactory(IFrameworkTemplateFactoryVtbl) fn CreateInstance(&self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut FrameworkTemplate) -> HRESULT }} impl IFrameworkTemplateFactory { - #[inline] pub unsafe fn create_instance(&self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + #[inline] pub fn create_instance(&self, outer: &IInspectable) -> Result<(Option>, Option>)> { unsafe { let mut inner = null_mut(); let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self 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) } - } + if hr == S_OK { Ok((ComPtr::wrap_optional(inner), ComPtr::wrap_optional(out))) } else { err(hr) } + }} } DEFINE_IID!(IID_IFrameworkView, 3719980619, 46595, 18346, 148, 45, 56, 51, 23, 79, 13, 128); RT_INTERFACE!{interface IFrameworkView(IFrameworkViewVtbl): IInspectable(IInspectableVtbl) [IID_IFrameworkView] { @@ -2216,27 +2216,27 @@ RT_INTERFACE!{interface IGridLengthHelper(IGridLengthHelperVtbl): IInspectable(I RT_CLASS!{class GridLengthHelper: IGridLengthHelper} impl RtActivatable for GridLengthHelper {} impl GridLengthHelper { - #[inline] pub fn get_auto() -> Result { unsafe { + #[inline] pub fn get_auto() -> Result { >::get_activation_factory().get_auto() - }} - #[inline] pub fn from_pixels(pixels: f64) -> Result { unsafe { + } + #[inline] pub fn from_pixels(pixels: f64) -> Result { >::get_activation_factory().from_pixels(pixels) - }} - #[inline] pub fn from_value_and_type(value: f64, type_: GridUnitType) -> Result { unsafe { + } + #[inline] pub fn from_value_and_type(value: f64, type_: GridUnitType) -> Result { >::get_activation_factory().from_value_and_type(value, type_) - }} - #[inline] pub fn get_is_absolute(target: GridLength) -> Result { unsafe { + } + #[inline] pub fn get_is_absolute(target: GridLength) -> Result { >::get_activation_factory().get_is_absolute(target) - }} - #[inline] pub fn get_is_auto(target: GridLength) -> Result { unsafe { + } + #[inline] pub fn get_is_auto(target: GridLength) -> Result { >::get_activation_factory().get_is_auto(target) - }} - #[inline] pub fn get_is_star(target: GridLength) -> Result { unsafe { + } + #[inline] pub fn get_is_star(target: GridLength) -> Result { >::get_activation_factory().get_is_star(target) - }} - #[inline] pub fn equals(target: GridLength, value: GridLength) -> Result { unsafe { + } + #[inline] pub fn equals(target: GridLength, value: GridLength) -> Result { >::get_activation_factory().equals(target, value) - }} + } } DEFINE_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]) [CLSID_GridLengthHelper]); DEFINE_IID!(IID_IGridLengthHelperStatics, 2638576539, 415, 16998, 136, 114, 33, 95, 25, 143, 106, 157); @@ -2250,41 +2250,41 @@ RT_INTERFACE!{static interface IGridLengthHelperStatics(IGridLengthHelperStatics fn Equals(&self, target: GridLength, value: GridLength, out: *mut bool) -> HRESULT }} impl IGridLengthHelperStatics { - #[inline] pub unsafe fn get_auto(&self) -> Result { + #[inline] pub fn get_auto(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Auto)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn from_pixels(&self, pixels: f64) -> Result { + }} + #[inline] pub fn from_pixels(&self, pixels: f64) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).FromPixels)(self as *const _ as *mut _, pixels, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn from_value_and_type(&self, value: f64, type_: GridUnitType) -> Result { + }} + #[inline] pub fn from_value_and_type(&self, value: f64, type_: GridUnitType) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).FromValueAndType)(self as *const _ as *mut _, value, type_, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_absolute(&self, target: GridLength) -> Result { + }} + #[inline] pub fn get_is_absolute(&self, target: GridLength) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetIsAbsolute)(self as *const _ as *mut _, target, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_auto(&self, target: GridLength) -> Result { + }} + #[inline] pub fn get_is_auto(&self, target: GridLength) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetIsAuto)(self as *const _ as *mut _, target, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_star(&self, target: GridLength) -> Result { + }} + #[inline] pub fn get_is_star(&self, target: GridLength) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetIsStar)(self as *const _ as *mut _, target, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn equals(&self, target: GridLength, value: GridLength) -> Result { + }} + #[inline] pub fn equals(&self, target: GridLength, value: GridLength) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).Equals)(self as *const _ as *mut _, target, value, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_ENUM! { enum GridUnitType: i32 { Auto (GridUnitType_Auto) = 0, Pixel (GridUnitType_Pixel) = 1, Star (GridUnitType_Star) = 2, @@ -2297,10 +2297,10 @@ RT_DELEGATE!{delegate LeavingBackgroundEventHandler(LeavingBackgroundEventHandle #[cfg(feature="windows-applicationmodel")] fn Invoke(&self, sender: *mut IInspectable, e: *mut super::super::applicationmodel::LeavingBackgroundEventArgs) -> HRESULT }} impl LeavingBackgroundEventHandler { - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn invoke(&self, sender: &IInspectable, e: &super::super::applicationmodel::LeavingBackgroundEventArgs) -> Result<()> { + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn invoke(&self, sender: &IInspectable, e: &super::super::applicationmodel::LeavingBackgroundEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, e as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum LineStackingStrategy: i32 { MaxHeight (LineStackingStrategy_MaxHeight) = 0, BlockLineHeight (LineStackingStrategy_BlockLineHeight) = 1, BaselineToBaseline (LineStackingStrategy_BaselineToBaseline) = 2, @@ -2310,11 +2310,11 @@ RT_INTERFACE!{interface IMediaFailedRoutedEventArgs(IMediaFailedRoutedEventArgsV fn get_ErrorTrace(&self, out: *mut HSTRING) -> HRESULT }} impl IMediaFailedRoutedEventArgs { - #[inline] pub unsafe fn get_error_trace(&self) -> Result { + #[inline] pub fn get_error_trace(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ErrorTrace)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class MediaFailedRoutedEventArgs: IMediaFailedRoutedEventArgs} RT_ENUM! { enum OpticalMarginAlignment: i32 { @@ -2327,31 +2327,31 @@ RT_INTERFACE!{interface IPointHelper(IPointHelperVtbl): IInspectable(IInspectabl RT_CLASS!{class PointHelper: IPointHelper} impl RtActivatable for PointHelper {} impl PointHelper { - #[inline] pub fn from_coordinates(x: f32, y: f32) -> Result { unsafe { + #[inline] pub fn from_coordinates(x: f32, y: f32) -> Result { >::get_activation_factory().from_coordinates(x, y) - }} + } } DEFINE_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]) [CLSID_PointHelper]); 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(&self, x: f32, y: f32, out: *mut super::super::foundation::Point) -> HRESULT + fn FromCoordinates(&self, x: f32, y: f32, out: *mut foundation::Point) -> HRESULT }} impl IPointHelperStatics { - #[inline] pub unsafe fn from_coordinates(&self, x: f32, y: f32) -> Result { + #[inline] pub fn from_coordinates(&self, x: f32, y: f32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).FromCoordinates)(self as *const _ as *mut _, x, y, &mut out); if hr == S_OK { Ok(out) } 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(&self, d: *mut DependencyObject, e: *mut DependencyPropertyChangedEventArgs) -> HRESULT }} impl PropertyChangedCallback { - #[inline] pub unsafe fn invoke(&self, d: &DependencyObject, e: &DependencyPropertyChangedEventArgs) -> Result<()> { + #[inline] pub fn invoke(&self, d: &DependencyObject, e: &DependencyPropertyChangedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, d as *const _ as *mut _, e as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IPropertyMetadata, 2169434893, 36120, 17546, 134, 68, 242, 203, 81, 231, 3, 128); RT_INTERFACE!{interface IPropertyMetadata(IPropertyMetadataVtbl): IInspectable(IInspectableVtbl) [IID_IPropertyMetadata] { @@ -2359,32 +2359,32 @@ RT_INTERFACE!{interface IPropertyMetadata(IPropertyMetadataVtbl): IInspectable(I fn get_CreateDefaultValueCallback(&self, out: *mut *mut CreateDefaultValueCallback) -> HRESULT }} impl IPropertyMetadata { - #[inline] pub unsafe fn get_default_value(&self) -> Result> { + #[inline] pub fn get_default_value(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DefaultValue)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_create_default_value_callback(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_create_default_value_callback(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CreateDefaultValueCallback)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class PropertyMetadata: IPropertyMetadata} impl RtActivatable for PropertyMetadata {} impl PropertyMetadata { - #[inline] pub fn create_with_default_value(defaultValue: &IInspectable) -> Result> { unsafe { + #[inline] pub fn create_with_default_value(defaultValue: &IInspectable) -> Result>> { >::get_activation_factory().create_with_default_value(defaultValue) - }} - #[inline] pub fn create_with_default_value_and_callback(defaultValue: &IInspectable, propertyChangedCallback: &PropertyChangedCallback) -> Result> { unsafe { + } + #[inline] pub fn create_with_default_value_and_callback(defaultValue: &IInspectable, propertyChangedCallback: &PropertyChangedCallback) -> Result>> { >::get_activation_factory().create_with_default_value_and_callback(defaultValue, propertyChangedCallback) - }} - #[inline] pub fn create_with_factory(createDefaultValueCallback: &CreateDefaultValueCallback) -> Result> { unsafe { + } + #[inline] pub fn create_with_factory(createDefaultValueCallback: &CreateDefaultValueCallback) -> Result>> { >::get_activation_factory().create_with_factory(createDefaultValueCallback) - }} - #[inline] pub fn create_with_factory_and_callback(createDefaultValueCallback: &CreateDefaultValueCallback, propertyChangedCallback: &PropertyChangedCallback) -> Result> { unsafe { + } + #[inline] pub fn create_with_factory_and_callback(createDefaultValueCallback: &CreateDefaultValueCallback, propertyChangedCallback: &PropertyChangedCallback) -> Result>> { >::get_activation_factory().create_with_factory_and_callback(createDefaultValueCallback, propertyChangedCallback) - }} + } } DEFINE_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]) [CLSID_PropertyMetadata]); DEFINE_IID!(IID_IPropertyMetadataFactory, 3250068672, 22477, 20271, 176, 169, 225, 128, 27, 40, 247, 107); @@ -2393,16 +2393,16 @@ RT_INTERFACE!{interface IPropertyMetadataFactory(IPropertyMetadataFactoryVtbl): fn CreateInstanceWithDefaultValueAndCallback(&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(&self, defaultValue: &IInspectable, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + #[inline] pub fn create_instance_with_default_value(&self, defaultValue: &IInspectable, outer: &IInspectable) -> Result<(Option>, Option>)> { unsafe { let mut inner = null_mut(); let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstanceWithDefaultValue)(self as *const _ as *mut _, 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(&self, defaultValue: &IInspectable, propertyChangedCallback: &PropertyChangedCallback, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + if hr == S_OK { Ok((ComPtr::wrap_optional(inner), ComPtr::wrap_optional(out))) } else { err(hr) } + }} + #[inline] pub fn create_instance_with_default_value_and_callback(&self, defaultValue: &IInspectable, propertyChangedCallback: &PropertyChangedCallback, outer: &IInspectable) -> Result<(Option>, Option>)> { unsafe { let mut inner = null_mut(); let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstanceWithDefaultValueAndCallback)(self as *const _ as *mut _, 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) } - } + if hr == S_OK { Ok((ComPtr::wrap_optional(inner), ComPtr::wrap_optional(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] { @@ -2412,44 +2412,44 @@ RT_INTERFACE!{static interface IPropertyMetadataStatics(IPropertyMetadataStatics fn CreateWithFactoryAndCallback(&self, createDefaultValueCallback: *mut CreateDefaultValueCallback, propertyChangedCallback: *mut PropertyChangedCallback, out: *mut *mut PropertyMetadata) -> HRESULT }} impl IPropertyMetadataStatics { - #[inline] pub unsafe fn create_with_default_value(&self, defaultValue: &IInspectable) -> Result> { + #[inline] pub fn create_with_default_value(&self, defaultValue: &IInspectable) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithDefaultValue)(self as *const _ as *mut _, 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(&self, defaultValue: &IInspectable, propertyChangedCallback: &PropertyChangedCallback) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_with_default_value_and_callback(&self, defaultValue: &IInspectable, propertyChangedCallback: &PropertyChangedCallback) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithDefaultValueAndCallback)(self as *const _ as *mut _, 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(&self, createDefaultValueCallback: &CreateDefaultValueCallback) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_with_factory(&self, createDefaultValueCallback: &CreateDefaultValueCallback) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithFactory)(self as *const _ as *mut _, 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(&self, createDefaultValueCallback: &CreateDefaultValueCallback, propertyChangedCallback: &PropertyChangedCallback) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn create_with_factory_and_callback(&self, createDefaultValueCallback: &CreateDefaultValueCallback, propertyChangedCallback: &PropertyChangedCallback) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateWithFactoryAndCallback)(self as *const _ as *mut _, createDefaultValueCallback as *const _ as *mut _, propertyChangedCallback as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut HSTRING) -> HRESULT }} impl IPropertyPath { - #[inline] pub unsafe fn get_path(&self) -> Result { + #[inline] pub fn get_path(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Path)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } + }} } RT_CLASS!{class PropertyPath: IPropertyPath} impl RtActivatable for PropertyPath {} impl PropertyPath { - #[inline] pub fn create_instance(path: &HStringArg) -> Result> { unsafe { + #[inline] pub fn create_instance(path: &HStringArg) -> Result> { >::get_activation_factory().create_instance(path) - }} + } } DEFINE_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]) [CLSID_PropertyPath]); DEFINE_IID!(IID_IPropertyPathFactory, 1313660825, 38950, 20054, 132, 124, 202, 5, 95, 22, 41, 5); @@ -2457,11 +2457,11 @@ RT_INTERFACE!{static interface IPropertyPathFactory(IPropertyPathFactoryVtbl): I fn CreateInstance(&self, path: HSTRING, out: *mut *mut PropertyPath) -> HRESULT }} impl IPropertyPathFactory { - #[inline] pub unsafe fn create_instance(&self, path: &HStringArg) -> Result> { + #[inline] pub fn create_instance(&self, path: &HStringArg) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self as *const _ as *mut _, path.get(), &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IRectHelper, 2743566818, 19451, 20194, 175, 229, 137, 243, 27, 55, 71, 141); RT_INTERFACE!{interface IRectHelper(IRectHelperVtbl): IInspectable(IInspectableVtbl) [IID_IRectHelper] { @@ -2470,166 +2470,166 @@ RT_INTERFACE!{interface IRectHelper(IRectHelperVtbl): IInspectable(IInspectableV RT_CLASS!{class RectHelper: IRectHelper} impl RtActivatable for RectHelper {} impl RectHelper { - #[inline] pub fn get_empty() -> Result { unsafe { + #[inline] pub fn get_empty() -> Result { >::get_activation_factory().get_empty() - }} - #[inline] pub fn from_coordinates_and_dimensions(x: f32, y: f32, width: f32, height: f32) -> Result { unsafe { + } + #[inline] pub fn from_coordinates_and_dimensions(x: f32, y: f32, width: f32, height: f32) -> Result { >::get_activation_factory().from_coordinates_and_dimensions(x, y, width, height) - }} - #[inline] pub fn from_points(point1: super::super::foundation::Point, point2: super::super::foundation::Point) -> Result { unsafe { + } + #[inline] pub fn from_points(point1: foundation::Point, point2: foundation::Point) -> Result { >::get_activation_factory().from_points(point1, point2) - }} - #[inline] pub fn from_location_and_size(location: super::super::foundation::Point, size: super::super::foundation::Size) -> Result { unsafe { + } + #[inline] pub fn from_location_and_size(location: foundation::Point, size: foundation::Size) -> Result { >::get_activation_factory().from_location_and_size(location, size) - }} - #[inline] pub fn get_is_empty(target: super::super::foundation::Rect) -> Result { unsafe { + } + #[inline] pub fn get_is_empty(target: foundation::Rect) -> Result { >::get_activation_factory().get_is_empty(target) - }} - #[inline] pub fn get_bottom(target: super::super::foundation::Rect) -> Result { unsafe { + } + #[inline] pub fn get_bottom(target: foundation::Rect) -> Result { >::get_activation_factory().get_bottom(target) - }} - #[inline] pub fn get_left(target: super::super::foundation::Rect) -> Result { unsafe { + } + #[inline] pub fn get_left(target: foundation::Rect) -> Result { >::get_activation_factory().get_left(target) - }} - #[inline] pub fn get_right(target: super::super::foundation::Rect) -> Result { unsafe { + } + #[inline] pub fn get_right(target: foundation::Rect) -> Result { >::get_activation_factory().get_right(target) - }} - #[inline] pub fn get_top(target: super::super::foundation::Rect) -> Result { unsafe { + } + #[inline] pub fn get_top(target: foundation::Rect) -> Result { >::get_activation_factory().get_top(target) - }} - #[inline] pub fn contains(target: super::super::foundation::Rect, point: super::super::foundation::Point) -> Result { unsafe { + } + #[inline] pub fn contains(target: foundation::Rect, point: foundation::Point) -> Result { >::get_activation_factory().contains(target, point) - }} - #[inline] pub fn equals(target: super::super::foundation::Rect, value: super::super::foundation::Rect) -> Result { unsafe { + } + #[inline] pub fn equals(target: foundation::Rect, value: foundation::Rect) -> Result { >::get_activation_factory().equals(target, value) - }} - #[inline] pub fn intersect(target: super::super::foundation::Rect, rect: super::super::foundation::Rect) -> Result { unsafe { + } + #[inline] pub fn intersect(target: foundation::Rect, rect: foundation::Rect) -> Result { >::get_activation_factory().intersect(target, rect) - }} - #[inline] pub fn union_with_point(target: super::super::foundation::Rect, point: super::super::foundation::Point) -> Result { unsafe { + } + #[inline] pub fn union_with_point(target: foundation::Rect, point: foundation::Point) -> Result { >::get_activation_factory().union_with_point(target, point) - }} - #[inline] pub fn union_with_rect(target: super::super::foundation::Rect, rect: super::super::foundation::Rect) -> Result { unsafe { + } + #[inline] pub fn union_with_rect(target: foundation::Rect, rect: foundation::Rect) -> Result { >::get_activation_factory().union_with_rect(target, rect) - }} + } } DEFINE_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]) [CLSID_RectHelper]); 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(&self, out: *mut super::super::foundation::Rect) -> HRESULT, - fn FromCoordinatesAndDimensions(&self, x: f32, y: f32, width: f32, height: f32, out: *mut super::super::foundation::Rect) -> HRESULT, - fn FromPoints(&self, point1: super::super::foundation::Point, point2: super::super::foundation::Point, out: *mut super::super::foundation::Rect) -> HRESULT, - fn FromLocationAndSize(&self, location: super::super::foundation::Point, size: super::super::foundation::Size, out: *mut super::super::foundation::Rect) -> HRESULT, - fn GetIsEmpty(&self, target: super::super::foundation::Rect, out: *mut bool) -> HRESULT, - fn GetBottom(&self, target: super::super::foundation::Rect, out: *mut f32) -> HRESULT, - fn GetLeft(&self, target: super::super::foundation::Rect, out: *mut f32) -> HRESULT, - fn GetRight(&self, target: super::super::foundation::Rect, out: *mut f32) -> HRESULT, - fn GetTop(&self, target: super::super::foundation::Rect, out: *mut f32) -> HRESULT, - fn Contains(&self, target: super::super::foundation::Rect, point: super::super::foundation::Point, out: *mut bool) -> HRESULT, - fn Equals(&self, target: super::super::foundation::Rect, value: super::super::foundation::Rect, out: *mut bool) -> HRESULT, - fn Intersect(&self, target: super::super::foundation::Rect, rect: super::super::foundation::Rect, out: *mut super::super::foundation::Rect) -> HRESULT, - fn UnionWithPoint(&self, target: super::super::foundation::Rect, point: super::super::foundation::Point, out: *mut super::super::foundation::Rect) -> HRESULT, - fn UnionWithRect(&self, target: super::super::foundation::Rect, rect: super::super::foundation::Rect, out: *mut super::super::foundation::Rect) -> HRESULT + fn get_Empty(&self, out: *mut foundation::Rect) -> HRESULT, + fn FromCoordinatesAndDimensions(&self, x: f32, y: f32, width: f32, height: f32, out: *mut foundation::Rect) -> HRESULT, + fn FromPoints(&self, point1: foundation::Point, point2: foundation::Point, out: *mut foundation::Rect) -> HRESULT, + fn FromLocationAndSize(&self, location: foundation::Point, size: foundation::Size, out: *mut foundation::Rect) -> HRESULT, + fn GetIsEmpty(&self, target: foundation::Rect, out: *mut bool) -> HRESULT, + fn GetBottom(&self, target: foundation::Rect, out: *mut f32) -> HRESULT, + fn GetLeft(&self, target: foundation::Rect, out: *mut f32) -> HRESULT, + fn GetRight(&self, target: foundation::Rect, out: *mut f32) -> HRESULT, + fn GetTop(&self, target: foundation::Rect, out: *mut f32) -> HRESULT, + fn Contains(&self, target: foundation::Rect, point: foundation::Point, out: *mut bool) -> HRESULT, + fn Equals(&self, target: foundation::Rect, value: foundation::Rect, out: *mut bool) -> HRESULT, + fn Intersect(&self, target: foundation::Rect, rect: foundation::Rect, out: *mut foundation::Rect) -> HRESULT, + fn UnionWithPoint(&self, target: foundation::Rect, point: foundation::Point, out: *mut foundation::Rect) -> HRESULT, + fn UnionWithRect(&self, target: foundation::Rect, rect: foundation::Rect, out: *mut foundation::Rect) -> HRESULT }} impl IRectHelperStatics { - #[inline] pub unsafe fn get_empty(&self) -> Result { + #[inline] pub fn get_empty(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Empty)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn from_coordinates_and_dimensions(&self, x: f32, y: f32, width: f32, height: f32) -> Result { + }} + #[inline] pub fn from_coordinates_and_dimensions(&self, x: f32, y: f32, width: f32, height: f32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).FromCoordinatesAndDimensions)(self as *const _ as *mut _, x, y, width, height, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn from_points(&self, point1: super::super::foundation::Point, point2: super::super::foundation::Point) -> Result { + }} + #[inline] pub fn from_points(&self, point1: foundation::Point, point2: foundation::Point) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).FromPoints)(self as *const _ as *mut _, point1, point2, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn from_location_and_size(&self, location: super::super::foundation::Point, size: super::super::foundation::Size) -> Result { + }} + #[inline] pub fn from_location_and_size(&self, location: foundation::Point, size: foundation::Size) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).FromLocationAndSize)(self as *const _ as *mut _, location, size, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_empty(&self, target: super::super::foundation::Rect) -> Result { + }} + #[inline] pub fn get_is_empty(&self, target: foundation::Rect) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetIsEmpty)(self as *const _ as *mut _, target, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_bottom(&self, target: super::super::foundation::Rect) -> Result { + }} + #[inline] pub fn get_bottom(&self, target: foundation::Rect) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetBottom)(self as *const _ as *mut _, target, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_left(&self, target: super::super::foundation::Rect) -> Result { + }} + #[inline] pub fn get_left(&self, target: foundation::Rect) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetLeft)(self as *const _ as *mut _, target, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_right(&self, target: super::super::foundation::Rect) -> Result { + }} + #[inline] pub fn get_right(&self, target: foundation::Rect) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetRight)(self as *const _ as *mut _, target, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_top(&self, target: super::super::foundation::Rect) -> Result { + }} + #[inline] pub fn get_top(&self, target: foundation::Rect) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetTop)(self as *const _ as *mut _, target, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn contains(&self, target: super::super::foundation::Rect, point: super::super::foundation::Point) -> Result { + }} + #[inline] pub fn contains(&self, target: foundation::Rect, point: foundation::Point) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).Contains)(self as *const _ as *mut _, target, point, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn equals(&self, target: super::super::foundation::Rect, value: super::super::foundation::Rect) -> Result { + }} + #[inline] pub fn equals(&self, target: foundation::Rect, value: foundation::Rect) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).Equals)(self as *const _ as *mut _, target, value, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn intersect(&self, target: super::super::foundation::Rect, rect: super::super::foundation::Rect) -> Result { + }} + #[inline] pub fn intersect(&self, target: foundation::Rect, rect: foundation::Rect) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).Intersect)(self as *const _ as *mut _, target, rect, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn union_with_point(&self, target: super::super::foundation::Rect, point: super::super::foundation::Point) -> Result { + }} + #[inline] pub fn union_with_point(&self, target: foundation::Rect, point: foundation::Point) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).UnionWithPoint)(self as *const _ as *mut _, target, point, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn union_with_rect(&self, target: super::super::foundation::Rect, rect: super::super::foundation::Rect) -> Result { + }} + #[inline] pub fn union_with_rect(&self, target: foundation::Rect, rect: foundation::Rect) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).UnionWithRect)(self as *const _ as *mut _, target, rect, &mut out); if hr == S_OK { Ok(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(&self, out: *mut *mut super::super::foundation::Uri) -> HRESULT, - fn put_Source(&self, value: *mut super::super::foundation::Uri) -> HRESULT, - fn get_MergedDictionaries(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_ThemeDictionaries(&self, out: *mut *mut super::super::foundation::collections::IMap) -> HRESULT + fn get_Source(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_Source(&self, value: *mut foundation::Uri) -> HRESULT, + fn get_MergedDictionaries(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_ThemeDictionaries(&self, out: *mut *mut foundation::collections::IMap) -> HRESULT }} impl IResourceDictionary { - #[inline] pub unsafe fn get_source(&self) -> Result> { + #[inline] pub fn get_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Source)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_source(&self, value: &super::super::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_source(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Source)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_merged_dictionaries(&self) -> Result>> { + }} + #[inline] pub fn get_merged_dictionaries(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MergedDictionaries)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_theme_dictionaries(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_theme_dictionaries(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ThemeDictionaries)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class ResourceDictionary: IResourceDictionary} DEFINE_IID!(IID_IResourceDictionaryFactory, 3929422261, 12727, 17009, 146, 201, 124, 149, 132, 169, 28, 34); @@ -2637,11 +2637,11 @@ RT_INTERFACE!{interface IResourceDictionaryFactory(IResourceDictionaryFactoryVtb fn CreateInstance(&self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut ResourceDictionary) -> HRESULT }} impl IResourceDictionaryFactory { - #[inline] pub unsafe fn create_instance(&self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + #[inline] pub fn create_instance(&self, outer: &IInspectable) -> Result<(Option>, Option>)> { unsafe { let mut inner = null_mut(); let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self 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) } - } + if hr == S_OK { Ok((ComPtr::wrap_optional(inner), ComPtr::wrap_optional(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] { @@ -2653,11 +2653,11 @@ RT_INTERFACE!{interface IRoutedEventArgs(IRoutedEventArgsVtbl): IInspectable(IIn fn get_OriginalSource(&self, out: *mut *mut IInspectable) -> HRESULT }} impl IRoutedEventArgs { - #[inline] pub unsafe fn get_original_source(&self) -> Result> { + #[inline] pub fn get_original_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OriginalSource)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class RoutedEventArgs: IRoutedEventArgs} DEFINE_IID!(IID_IRoutedEventArgsFactory, 3055308167, 28901, 16686, 181, 32, 26, 65, 238, 118, 187, 244); @@ -2665,21 +2665,21 @@ RT_INTERFACE!{interface IRoutedEventArgsFactory(IRoutedEventArgsFactoryVtbl): II fn CreateInstance(&self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut RoutedEventArgs) -> HRESULT }} impl IRoutedEventArgsFactory { - #[inline] pub unsafe fn create_instance(&self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + #[inline] pub fn create_instance(&self, outer: &IInspectable) -> Result<(Option>, Option>)> { unsafe { let mut inner = null_mut(); let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self 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) } - } + if hr == S_OK { Ok((ComPtr::wrap_optional(inner), ComPtr::wrap_optional(out))) } 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(&self, sender: *mut IInspectable, e: *mut RoutedEventArgs) -> HRESULT }} impl RoutedEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &IInspectable, e: &RoutedEventArgs) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &IInspectable, e: &RoutedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, e as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ISetter, 2805853481, 46254, 19073, 190, 133, 230, 144, 186, 13, 59, 110); RT_INTERFACE!{interface ISetter(ISetterVtbl): IInspectable(IInspectableVtbl) [IID_ISetter] { @@ -2689,32 +2689,32 @@ RT_INTERFACE!{interface ISetter(ISetterVtbl): IInspectable(IInspectableVtbl) [II fn put_Value(&self, value: *mut IInspectable) -> HRESULT }} impl ISetter { - #[inline] pub unsafe fn get_property(&self) -> Result> { + #[inline] pub fn get_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Property)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_property(&self, value: &DependencyProperty) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_property(&self, value: &DependencyProperty) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Property)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_value(&self) -> Result> { + }} + #[inline] pub fn get_value(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Value)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_value(&self, value: &IInspectable) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_value(&self, value: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Value)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Setter: ISetter} impl RtActivatable for Setter {} impl RtActivatable for Setter {} impl Setter { - #[inline] pub fn create_instance(targetProperty: &DependencyProperty, value: &IInspectable) -> Result> { unsafe { + #[inline] pub fn create_instance(targetProperty: &DependencyProperty, value: &IInspectable) -> Result> { >::get_activation_factory().create_instance(targetProperty, value) - }} + } } DEFINE_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]) [CLSID_Setter]); DEFINE_IID!(IID_ISetter2, 1880528225, 1457, 20387, 157, 83, 142, 12, 140, 116, 122, 252); @@ -2723,26 +2723,26 @@ RT_INTERFACE!{interface ISetter2(ISetter2Vtbl): IInspectable(IInspectableVtbl) [ fn put_Target(&self, value: *mut TargetPropertyPath) -> HRESULT }} impl ISetter2 { - #[inline] pub unsafe fn get_target(&self) -> Result> { + #[inline] pub fn get_target(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Target)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_target(&self, value: &TargetPropertyPath) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_target(&self, value: &TargetPropertyPath) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Target)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } 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(&self, out: *mut bool) -> HRESULT }} impl ISetterBase { - #[inline] pub unsafe fn get_is_sealed(&self) -> Result { + #[inline] pub fn get_is_sealed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSealed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SetterBase: ISetterBase} DEFINE_IID!(IID_ISetterBaseCollection, 63179944, 37022, 16663, 129, 28, 164, 82, 148, 150, 189, 241); @@ -2750,11 +2750,11 @@ RT_INTERFACE!{interface ISetterBaseCollection(ISetterBaseCollectionVtbl): IInspe fn get_IsSealed(&self, out: *mut bool) -> HRESULT }} impl ISetterBaseCollection { - #[inline] pub unsafe fn get_is_sealed(&self) -> Result { + #[inline] pub fn get_is_sealed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSealed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SetterBaseCollection: ISetterBaseCollection} impl RtActivatable for SetterBaseCollection {} @@ -2768,28 +2768,28 @@ RT_INTERFACE!{static interface ISetterFactory(ISetterFactoryVtbl): IInspectable( fn CreateInstance(&self, targetProperty: *mut DependencyProperty, value: *mut IInspectable, out: *mut *mut Setter) -> HRESULT }} impl ISetterFactory { - #[inline] pub unsafe fn create_instance(&self, targetProperty: &DependencyProperty, value: &IInspectable) -> Result> { + #[inline] pub fn create_instance(&self, targetProperty: &DependencyProperty, value: &IInspectable) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self as *const _ as *mut _, 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_ISizeChangedEventArgs, 3576770144, 23745, 17057, 146, 12, 26, 244, 107, 226, 249, 134); RT_INTERFACE!{interface ISizeChangedEventArgs(ISizeChangedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_ISizeChangedEventArgs] { - fn get_PreviousSize(&self, out: *mut super::super::foundation::Size) -> HRESULT, - fn get_NewSize(&self, out: *mut super::super::foundation::Size) -> HRESULT + fn get_PreviousSize(&self, out: *mut foundation::Size) -> HRESULT, + fn get_NewSize(&self, out: *mut foundation::Size) -> HRESULT }} impl ISizeChangedEventArgs { - #[inline] pub unsafe fn get_previous_size(&self) -> Result { + #[inline] pub fn get_previous_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_PreviousSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_new_size(&self) -> Result { + }} + #[inline] pub fn get_new_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_NewSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class SizeChangedEventArgs: ISizeChangedEventArgs} DEFINE_IID!(IID_SizeChangedEventHandler, 286634300, 9682, 18443, 137, 220, 235, 61, 203, 214, 183, 250); @@ -2797,10 +2797,10 @@ RT_DELEGATE!{delegate SizeChangedEventHandler(SizeChangedEventHandlerVtbl, SizeC fn Invoke(&self, sender: *mut IInspectable, e: *mut SizeChangedEventArgs) -> HRESULT }} impl SizeChangedEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &IInspectable, e: &SizeChangedEventArgs) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &IInspectable, e: &SizeChangedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, e as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ISizeHelper, 3877788308, 23811, 18947, 186, 148, 150, 127, 198, 143, 206, 254); RT_INTERFACE!{interface ISizeHelper(ISizeHelperVtbl): IInspectable(IInspectableVtbl) [IID_ISizeHelper] { @@ -2809,48 +2809,48 @@ RT_INTERFACE!{interface ISizeHelper(ISizeHelperVtbl): IInspectable(IInspectableV RT_CLASS!{class SizeHelper: ISizeHelper} impl RtActivatable for SizeHelper {} impl SizeHelper { - #[inline] pub fn get_empty() -> Result { unsafe { + #[inline] pub fn get_empty() -> Result { >::get_activation_factory().get_empty() - }} - #[inline] pub fn from_dimensions(width: f32, height: f32) -> Result { unsafe { + } + #[inline] pub fn from_dimensions(width: f32, height: f32) -> Result { >::get_activation_factory().from_dimensions(width, height) - }} - #[inline] pub fn get_is_empty(target: super::super::foundation::Size) -> Result { unsafe { + } + #[inline] pub fn get_is_empty(target: foundation::Size) -> Result { >::get_activation_factory().get_is_empty(target) - }} - #[inline] pub fn equals(target: super::super::foundation::Size, value: super::super::foundation::Size) -> Result { unsafe { + } + #[inline] pub fn equals(target: foundation::Size, value: foundation::Size) -> Result { >::get_activation_factory().equals(target, value) - }} + } } DEFINE_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]) [CLSID_SizeHelper]); 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(&self, out: *mut super::super::foundation::Size) -> HRESULT, - fn FromDimensions(&self, width: f32, height: f32, out: *mut super::super::foundation::Size) -> HRESULT, - fn GetIsEmpty(&self, target: super::super::foundation::Size, out: *mut bool) -> HRESULT, - fn Equals(&self, target: super::super::foundation::Size, value: super::super::foundation::Size, out: *mut bool) -> HRESULT + fn get_Empty(&self, out: *mut foundation::Size) -> HRESULT, + fn FromDimensions(&self, width: f32, height: f32, out: *mut foundation::Size) -> HRESULT, + fn GetIsEmpty(&self, target: foundation::Size, out: *mut bool) -> HRESULT, + fn Equals(&self, target: foundation::Size, value: foundation::Size, out: *mut bool) -> HRESULT }} impl ISizeHelperStatics { - #[inline] pub unsafe fn get_empty(&self) -> Result { + #[inline] pub fn get_empty(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Empty)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn from_dimensions(&self, width: f32, height: f32) -> Result { + }} + #[inline] pub fn from_dimensions(&self, width: f32, height: f32) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).FromDimensions)(self as *const _ as *mut _, width, height, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_empty(&self, target: super::super::foundation::Size) -> Result { + }} + #[inline] pub fn get_is_empty(&self, target: foundation::Size) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GetIsEmpty)(self as *const _ as *mut _, target, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn equals(&self, target: super::super::foundation::Size, value: super::super::foundation::Size) -> Result { + }} + #[inline] pub fn equals(&self, target: foundation::Size, value: foundation::Size) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).Equals)(self as *const _ as *mut _, target, value, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IStateTrigger, 1739452206, 55513, 18935, 161, 253, 46, 53, 238, 221, 35, 205); RT_INTERFACE!{interface IStateTrigger(IStateTriggerVtbl): IInspectable(IInspectableVtbl) [IID_IStateTrigger] { @@ -2858,23 +2858,23 @@ RT_INTERFACE!{interface IStateTrigger(IStateTriggerVtbl): IInspectable(IInspecta fn put_IsActive(&self, value: bool) -> HRESULT }} impl IStateTrigger { - #[inline] pub unsafe fn get_is_active(&self) -> Result { + #[inline] pub fn get_is_active(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsActive)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_active(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_active(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsActive)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class StateTrigger: IStateTrigger} impl RtActivatable for StateTrigger {} impl RtActivatable for StateTrigger {} impl StateTrigger { - #[inline] pub fn get_is_active_property() -> Result> { unsafe { + #[inline] pub fn get_is_active_property() -> Result>> { >::get_activation_factory().get_is_active_property() - }} + } } DEFINE_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]) [CLSID_StateTrigger]); DEFINE_IID!(IID_IStateTriggerBase, 1219626648, 44806, 18028, 128, 82, 147, 102, 109, 222, 14, 73); @@ -2887,32 +2887,32 @@ RT_INTERFACE!{interface IStateTriggerBaseFactory(IStateTriggerBaseFactoryVtbl): fn CreateInstance(&self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut StateTriggerBase) -> HRESULT }} impl IStateTriggerBaseFactory { - #[inline] pub unsafe fn create_instance(&self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + #[inline] pub fn create_instance(&self, outer: &IInspectable) -> Result<(Option>, Option>)> { unsafe { let mut inner = null_mut(); let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self 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) } - } + if hr == S_OK { Ok((ComPtr::wrap_optional(inner), ComPtr::wrap_optional(out))) } else { err(hr) } + }} } 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(&self, isActive: bool) -> HRESULT }} impl IStateTriggerBaseProtected { - #[inline] pub unsafe fn set_active(&self, isActive: bool) -> Result<()> { + #[inline] pub fn set_active(&self, isActive: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetActive)(self as *const _ as *mut _, isActive); 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(&self, out: *mut *mut DependencyProperty) -> HRESULT }} impl IStateTriggerStatics { - #[inline] pub unsafe fn get_is_active_property(&self) -> Result> { + #[inline] pub fn get_is_active_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsActiveProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IStyle, 3299471909, 40375, 19069, 182, 209, 247, 78, 219, 146, 147, 194); RT_INTERFACE!{interface IStyle(IStyleVtbl): IInspectable(IInspectableVtbl) [IID_IStyle] { @@ -2925,46 +2925,46 @@ RT_INTERFACE!{interface IStyle(IStyleVtbl): IInspectable(IInspectableVtbl) [IID_ fn Seal(&self) -> HRESULT }} impl IStyle { - #[inline] pub unsafe fn get_is_sealed(&self) -> Result { + #[inline] pub fn get_is_sealed(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSealed)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_setters(&self) -> Result> { + }} + #[inline] pub fn get_setters(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Setters)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_target_type(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_target_type(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TargetType)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_target_type(&self, value: interop::TypeName) -> Result<()> { + }} + #[inline] pub fn set_target_type(&self, value: interop::TypeName) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TargetType)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_based_on(&self) -> Result> { + }} + #[inline] pub fn get_based_on(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BasedOn)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_based_on(&self, value: &Style) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_based_on(&self, value: &Style) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BasedOn)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn seal(&self) -> Result<()> { + }} + #[inline] pub fn seal(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Seal)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Style: IStyle} impl RtActivatable for Style {} impl RtActivatable for Style {} impl Style { - #[inline] pub fn create_instance(targetType: interop::TypeName) -> Result> { unsafe { + #[inline] pub fn create_instance(targetType: interop::TypeName) -> Result> { >::get_activation_factory().create_instance(targetType) - }} + } } DEFINE_CLSID!(Style(&[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,83,116,121,108,101,0]) [CLSID_Style]); DEFINE_IID!(IID_IStyleFactory, 2741511395, 15745, 19685, 170, 81, 139, 65, 15, 96, 47, 205); @@ -2972,21 +2972,21 @@ RT_INTERFACE!{static interface IStyleFactory(IStyleFactoryVtbl): IInspectable(II fn CreateInstance(&self, targetType: interop::TypeName, out: *mut *mut Style) -> HRESULT }} impl IStyleFactory { - #[inline] pub unsafe fn create_instance(&self, targetType: interop::TypeName) -> Result> { + #[inline] pub fn create_instance(&self, targetType: interop::TypeName) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self as *const _ as *mut _, targetType, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } 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(&self, sender: *mut IInspectable, e: *mut super::super::applicationmodel::SuspendingEventArgs) -> HRESULT }} impl SuspendingEventHandler { - #[cfg(feature="windows-applicationmodel")] #[inline] pub unsafe fn invoke(&self, sender: &IInspectable, e: &super::super::applicationmodel::SuspendingEventArgs) -> Result<()> { + #[cfg(feature="windows-applicationmodel")] #[inline] pub fn invoke(&self, sender: &IInspectable, e: &super::super::applicationmodel::SuspendingEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, e as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_ITargetPropertyPath, 1081347982, 2143, 19693, 190, 112, 111, 71, 172, 241, 90, 208); RT_INTERFACE!{interface ITargetPropertyPath(ITargetPropertyPathVtbl): IInspectable(IInspectableVtbl) [IID_ITargetPropertyPath] { @@ -2996,32 +2996,32 @@ RT_INTERFACE!{interface ITargetPropertyPath(ITargetPropertyPathVtbl): IInspectab fn put_Target(&self, value: *mut IInspectable) -> HRESULT }} impl ITargetPropertyPath { - #[inline] pub unsafe fn get_path(&self) -> Result> { + #[inline] pub fn get_path(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Path)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_path(&self, value: &PropertyPath) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_path(&self, value: &PropertyPath) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Path)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_target(&self) -> Result> { + }} + #[inline] pub fn get_target(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Target)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_target(&self, value: &IInspectable) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_target(&self, value: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Target)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class TargetPropertyPath: ITargetPropertyPath} impl RtActivatable for TargetPropertyPath {} impl RtActivatable for TargetPropertyPath {} impl TargetPropertyPath { - #[inline] pub fn create_instance(targetProperty: &DependencyProperty) -> Result> { unsafe { + #[inline] pub fn create_instance(targetProperty: &DependencyProperty) -> Result> { >::get_activation_factory().create_instance(targetProperty) - }} + } } DEFINE_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]) [CLSID_TargetPropertyPath]); DEFINE_IID!(IID_ITargetPropertyPathFactory, 2297351368, 39394, 19012, 153, 7, 180, 75, 200, 110, 43, 190); @@ -3029,11 +3029,11 @@ RT_INTERFACE!{static interface ITargetPropertyPathFactory(ITargetPropertyPathFac fn CreateInstance(&self, targetProperty: *mut DependencyProperty, out: *mut *mut TargetPropertyPath) -> HRESULT }} impl ITargetPropertyPathFactory { - #[inline] pub unsafe fn create_instance(&self, targetProperty: &DependencyProperty) -> Result> { + #[inline] pub fn create_instance(&self, targetProperty: &DependencyProperty) -> Result> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self as *const _ as *mut _, targetProperty as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + }} } RT_ENUM! { enum TextAlignment: i32 { Center (TextAlignment_Center) = 0, Left (TextAlignment_Left) = 1, Start (TextAlignment_Start) = 1, Right (TextAlignment_Right) = 2, End (TextAlignment_End) = 2, Justify (TextAlignment_Justify) = 3, DetectFromContent (TextAlignment_DetectFromContent) = 4, @@ -3060,12 +3060,12 @@ RT_INTERFACE!{interface IThicknessHelper(IThicknessHelperVtbl): IInspectable(IIn RT_CLASS!{class ThicknessHelper: IThicknessHelper} impl RtActivatable for ThicknessHelper {} impl ThicknessHelper { - #[inline] pub fn from_lengths(left: f64, top: f64, right: f64, bottom: f64) -> Result { unsafe { + #[inline] pub fn from_lengths(left: f64, top: f64, right: f64, bottom: f64) -> Result { >::get_activation_factory().from_lengths(left, top, right, bottom) - }} - #[inline] pub fn from_uniform_length(uniformLength: f64) -> Result { unsafe { + } + #[inline] pub fn from_uniform_length(uniformLength: f64) -> Result { >::get_activation_factory().from_uniform_length(uniformLength) - }} + } } DEFINE_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]) [CLSID_ThicknessHelper]); DEFINE_IID!(IID_IThicknessHelperStatics, 3231259260, 1804, 19878, 135, 132, 1, 202, 128, 14, 183, 58); @@ -3074,23 +3074,23 @@ RT_INTERFACE!{static interface IThicknessHelperStatics(IThicknessHelperStaticsVt fn FromUniformLength(&self, uniformLength: f64, out: *mut Thickness) -> HRESULT }} impl IThicknessHelperStatics { - #[inline] pub unsafe fn from_lengths(&self, left: f64, top: f64, right: f64, bottom: f64) -> Result { + #[inline] pub fn from_lengths(&self, left: f64, top: f64, right: f64, bottom: f64) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).FromLengths)(self as *const _ as *mut _, left, top, right, bottom, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn from_uniform_length(&self, uniformLength: f64) -> Result { + }} + #[inline] pub fn from_uniform_length(&self, uniformLength: f64) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).FromUniformLength)(self as *const _ as *mut _, uniformLength, &mut out); if hr == S_OK { Ok(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] { }} RT_CLASS!{class TriggerAction: ITriggerAction} -RT_CLASS!{class TriggerActionCollection: super::super::foundation::collections::IVector} +RT_CLASS!{class TriggerActionCollection: foundation::collections::IVector} impl RtActivatable for TriggerActionCollection {} DEFINE_CLSID!(TriggerActionCollection(&[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108,46,84,114,105,103,103,101,114,65,99,116,105,111,110,67,111,108,108,101,99,116,105,111,110,0]) [CLSID_TriggerActionCollection]); DEFINE_IID!(IID_ITriggerActionFactory, 1758642361, 12937, 16719, 143, 110, 198, 185, 122, 237, 218, 3); @@ -3106,10 +3106,10 @@ DEFINE_IID!(IID_ITriggerBaseFactory, 1782292055, 64605, 17104, 140, 185, 202, 80 RT_INTERFACE!{interface ITriggerBaseFactory(ITriggerBaseFactoryVtbl): IInspectable(IInspectableVtbl) [IID_ITriggerBaseFactory] { }} -RT_CLASS!{class TriggerCollection: super::super::foundation::collections::IVector} +RT_CLASS!{class TriggerCollection: foundation::collections::IVector} 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(&self, out: *mut super::super::foundation::Size) -> HRESULT, + fn get_DesiredSize(&self, out: *mut foundation::Size) -> HRESULT, fn get_AllowDrop(&self, out: *mut bool) -> HRESULT, fn put_AllowDrop(&self, value: bool) -> HRESULT, fn get_Opacity(&self, out: *mut f64) -> HRESULT, @@ -3120,13 +3120,13 @@ RT_INTERFACE!{interface IUIElement(IUIElementVtbl): IInspectable(IInspectableVtb fn put_RenderTransform(&self, value: *mut media::Transform) -> HRESULT, fn get_Projection(&self, out: *mut *mut media::Projection) -> HRESULT, fn put_Projection(&self, value: *mut media::Projection) -> HRESULT, - fn get_RenderTransformOrigin(&self, out: *mut super::super::foundation::Point) -> HRESULT, - fn put_RenderTransformOrigin(&self, value: super::super::foundation::Point) -> HRESULT, + fn get_RenderTransformOrigin(&self, out: *mut foundation::Point) -> HRESULT, + fn put_RenderTransformOrigin(&self, value: foundation::Point) -> HRESULT, fn get_IsHitTestVisible(&self, out: *mut bool) -> HRESULT, fn put_IsHitTestVisible(&self, value: bool) -> HRESULT, fn get_Visibility(&self, out: *mut Visibility) -> HRESULT, fn put_Visibility(&self, value: Visibility) -> HRESULT, - fn get_RenderSize(&self, out: *mut super::super::foundation::Size) -> HRESULT, + fn get_RenderSize(&self, out: *mut foundation::Size) -> HRESULT, fn get_UseLayoutRounding(&self, out: *mut bool) -> HRESULT, fn put_UseLayoutRounding(&self, value: bool) -> HRESULT, fn get_Transitions(&self, out: *mut *mut media::animation::TransitionCollection) -> HRESULT, @@ -3143,59 +3143,59 @@ RT_INTERFACE!{interface IUIElement(IUIElementVtbl): IInspectable(IInspectableVtb fn put_IsHoldingEnabled(&self, value: bool) -> HRESULT, fn get_ManipulationMode(&self, out: *mut input::ManipulationModes) -> HRESULT, fn put_ManipulationMode(&self, value: input::ManipulationModes) -> HRESULT, - fn get_PointerCaptures(&self, out: *mut *mut super::super::foundation::collections::IVectorView) -> HRESULT, - fn add_KeyUp(&self, value: *mut input::KeyEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_KeyUp(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_KeyDown(&self, value: *mut input::KeyEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_KeyDown(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_GotFocus(&self, value: *mut RoutedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_GotFocus(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_LostFocus(&self, value: *mut RoutedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_LostFocus(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_DragEnter(&self, value: *mut DragEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DragEnter(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_DragLeave(&self, value: *mut DragEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DragLeave(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_DragOver(&self, value: *mut DragEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DragOver(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Drop(&self, value: *mut DragEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Drop(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerPressed(&self, value: *mut input::PointerEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerPressed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerMoved(&self, value: *mut input::PointerEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerMoved(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerReleased(&self, value: *mut input::PointerEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerReleased(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerEntered(&self, value: *mut input::PointerEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerEntered(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerExited(&self, value: *mut input::PointerEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerExited(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerCaptureLost(&self, value: *mut input::PointerEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerCaptureLost(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerCanceled(&self, value: *mut input::PointerEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerCanceled(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PointerWheelChanged(&self, value: *mut input::PointerEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PointerWheelChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Tapped(&self, value: *mut input::TappedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Tapped(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_DoubleTapped(&self, value: *mut input::DoubleTappedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DoubleTapped(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Holding(&self, value: *mut input::HoldingEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Holding(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_RightTapped(&self, value: *mut input::RightTappedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_RightTapped(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ManipulationStarting(&self, value: *mut input::ManipulationStartingEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ManipulationStarting(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ManipulationInertiaStarting(&self, value: *mut input::ManipulationInertiaStartingEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ManipulationInertiaStarting(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ManipulationStarted(&self, value: *mut input::ManipulationStartedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ManipulationStarted(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ManipulationDelta(&self, value: *mut input::ManipulationDeltaEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ManipulationDelta(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ManipulationCompleted(&self, value: *mut input::ManipulationCompletedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ManipulationCompleted(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn Measure(&self, availableSize: super::super::foundation::Size) -> HRESULT, - fn Arrange(&self, finalRect: super::super::foundation::Rect) -> HRESULT, + fn get_PointerCaptures(&self, out: *mut *mut foundation::collections::IVectorView) -> HRESULT, + fn add_KeyUp(&self, value: *mut input::KeyEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_KeyUp(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_KeyDown(&self, value: *mut input::KeyEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_KeyDown(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_GotFocus(&self, value: *mut RoutedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_GotFocus(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_LostFocus(&self, value: *mut RoutedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_LostFocus(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_DragEnter(&self, value: *mut DragEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DragEnter(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_DragLeave(&self, value: *mut DragEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DragLeave(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_DragOver(&self, value: *mut DragEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DragOver(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Drop(&self, value: *mut DragEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Drop(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerPressed(&self, value: *mut input::PointerEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerPressed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerMoved(&self, value: *mut input::PointerEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerMoved(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerReleased(&self, value: *mut input::PointerEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerReleased(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerEntered(&self, value: *mut input::PointerEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerEntered(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerExited(&self, value: *mut input::PointerEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerExited(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerCaptureLost(&self, value: *mut input::PointerEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerCaptureLost(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerCanceled(&self, value: *mut input::PointerEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerCanceled(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PointerWheelChanged(&self, value: *mut input::PointerEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PointerWheelChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Tapped(&self, value: *mut input::TappedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Tapped(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_DoubleTapped(&self, value: *mut input::DoubleTappedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DoubleTapped(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Holding(&self, value: *mut input::HoldingEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Holding(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_RightTapped(&self, value: *mut input::RightTappedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_RightTapped(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ManipulationStarting(&self, value: *mut input::ManipulationStartingEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ManipulationStarting(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ManipulationInertiaStarting(&self, value: *mut input::ManipulationInertiaStartingEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ManipulationInertiaStarting(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ManipulationStarted(&self, value: *mut input::ManipulationStartedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ManipulationStarted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ManipulationDelta(&self, value: *mut input::ManipulationDeltaEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ManipulationDelta(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ManipulationCompleted(&self, value: *mut input::ManipulationCompletedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ManipulationCompleted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn Measure(&self, availableSize: foundation::Size) -> HRESULT, + fn Arrange(&self, finalRect: foundation::Rect) -> HRESULT, fn CapturePointer(&self, value: *mut input::Pointer, out: *mut bool) -> HRESULT, fn ReleasePointerCapture(&self, value: *mut input::Pointer) -> HRESULT, fn ReleasePointerCaptures(&self) -> HRESULT, @@ -3207,436 +3207,436 @@ RT_INTERFACE!{interface IUIElement(IUIElementVtbl): IInspectable(IInspectableVtb fn UpdateLayout(&self) -> HRESULT }} impl IUIElement { - #[inline] pub unsafe fn get_desired_size(&self) -> Result { + #[inline] pub fn get_desired_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_DesiredSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_allow_drop(&self) -> Result { + }} + #[inline] pub fn get_allow_drop(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AllowDrop)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_allow_drop(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_allow_drop(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AllowDrop)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_opacity(&self) -> Result { + }} + #[inline] pub fn get_opacity(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Opacity)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_opacity(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_opacity(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Opacity)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_clip(&self) -> Result> { + }} + #[inline] pub fn get_clip(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Clip)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_clip(&self, value: &media::RectangleGeometry) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_clip(&self, value: &media::RectangleGeometry) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Clip)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_render_transform(&self) -> Result> { + }} + #[inline] pub fn get_render_transform(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RenderTransform)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_render_transform(&self, value: &media::Transform) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_render_transform(&self, value: &media::Transform) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RenderTransform)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_projection(&self) -> Result> { + }} + #[inline] pub fn get_projection(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Projection)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_projection(&self, value: &media::Projection) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_projection(&self, value: &media::Projection) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Projection)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_render_transform_origin(&self) -> Result { + }} + #[inline] pub fn get_render_transform_origin(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RenderTransformOrigin)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_render_transform_origin(&self, value: super::super::foundation::Point) -> Result<()> { + }} + #[inline] pub fn set_render_transform_origin(&self, value: foundation::Point) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_RenderTransformOrigin)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_hit_test_visible(&self) -> Result { + }} + #[inline] pub fn get_is_hit_test_visible(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsHitTestVisible)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_hit_test_visible(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_hit_test_visible(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsHitTestVisible)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_visibility(&self) -> Result { + }} + #[inline] pub fn get_visibility(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Visibility)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_visibility(&self, value: Visibility) -> Result<()> { + }} + #[inline] pub fn set_visibility(&self, value: Visibility) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Visibility)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_render_size(&self) -> Result { + }} + #[inline] pub fn get_render_size(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_RenderSize)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_use_layout_rounding(&self) -> Result { + }} + #[inline] pub fn get_use_layout_rounding(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UseLayoutRounding)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_use_layout_rounding(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_use_layout_rounding(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_UseLayoutRounding)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_transitions(&self) -> Result> { + }} + #[inline] pub fn get_transitions(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Transitions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_transitions(&self, value: &media::animation::TransitionCollection) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_transitions(&self, value: &media::animation::TransitionCollection) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Transitions)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_cache_mode(&self) -> Result> { + }} + #[inline] pub fn get_cache_mode(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CacheMode)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_cache_mode(&self, value: &media::CacheMode) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_cache_mode(&self, value: &media::CacheMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CacheMode)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_tap_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_tap_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsTapEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_tap_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_tap_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsTapEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_double_tap_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_double_tap_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsDoubleTapEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_double_tap_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_double_tap_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsDoubleTapEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_right_tap_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_right_tap_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsRightTapEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_right_tap_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_right_tap_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsRightTapEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_holding_enabled(&self) -> Result { + }} + #[inline] pub fn get_is_holding_enabled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsHoldingEnabled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_holding_enabled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_holding_enabled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsHoldingEnabled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_manipulation_mode(&self) -> Result { + }} + #[inline] pub fn get_manipulation_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ManipulationMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_manipulation_mode(&self, value: input::ManipulationModes) -> Result<()> { + }} + #[inline] pub fn set_manipulation_mode(&self, value: input::ManipulationModes) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ManipulationMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_pointer_captures(&self) -> Result>> { + }} + #[inline] pub fn get_pointer_captures(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PointerCaptures)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_key_up(&self, value: &input::KeyEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_key_up(&self, value: &input::KeyEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_KeyUp)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_key_up(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_key_up(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_KeyUp)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_key_down(&self, value: &input::KeyEventHandler) -> Result { + }} + #[inline] pub fn add_key_down(&self, value: &input::KeyEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_KeyDown)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_key_down(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_key_down(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_KeyDown)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_got_focus(&self, value: &RoutedEventHandler) -> Result { + }} + #[inline] pub fn add_got_focus(&self, value: &RoutedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_GotFocus)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_got_focus(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_got_focus(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_GotFocus)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_lost_focus(&self, value: &RoutedEventHandler) -> Result { + }} + #[inline] pub fn add_lost_focus(&self, value: &RoutedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_LostFocus)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_lost_focus(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_lost_focus(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_LostFocus)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_drag_enter(&self, value: &DragEventHandler) -> Result { + }} + #[inline] pub fn add_drag_enter(&self, value: &DragEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DragEnter)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_drag_enter(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_drag_enter(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DragEnter)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_drag_leave(&self, value: &DragEventHandler) -> Result { + }} + #[inline] pub fn add_drag_leave(&self, value: &DragEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DragLeave)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_drag_leave(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_drag_leave(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DragLeave)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_drag_over(&self, value: &DragEventHandler) -> Result { + }} + #[inline] pub fn add_drag_over(&self, value: &DragEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DragOver)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_drag_over(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_drag_over(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DragOver)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_drop(&self, value: &DragEventHandler) -> Result { + }} + #[inline] pub fn add_drop(&self, value: &DragEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Drop)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_drop(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_drop(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Drop)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_pressed(&self, value: &input::PointerEventHandler) -> Result { + }} + #[inline] pub fn add_pointer_pressed(&self, value: &input::PointerEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerPressed)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_pressed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_pressed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerPressed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_moved(&self, value: &input::PointerEventHandler) -> Result { + }} + #[inline] pub fn add_pointer_moved(&self, value: &input::PointerEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerMoved)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_moved(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_moved(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerMoved)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_released(&self, value: &input::PointerEventHandler) -> Result { + }} + #[inline] pub fn add_pointer_released(&self, value: &input::PointerEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerReleased)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_released(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_released(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerReleased)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_entered(&self, value: &input::PointerEventHandler) -> Result { + }} + #[inline] pub fn add_pointer_entered(&self, value: &input::PointerEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerEntered)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_entered(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_entered(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerEntered)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_exited(&self, value: &input::PointerEventHandler) -> Result { + }} + #[inline] pub fn add_pointer_exited(&self, value: &input::PointerEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerExited)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_exited(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_exited(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerExited)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_capture_lost(&self, value: &input::PointerEventHandler) -> Result { + }} + #[inline] pub fn add_pointer_capture_lost(&self, value: &input::PointerEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerCaptureLost)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_capture_lost(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_capture_lost(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerCaptureLost)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_canceled(&self, value: &input::PointerEventHandler) -> Result { + }} + #[inline] pub fn add_pointer_canceled(&self, value: &input::PointerEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerCanceled)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_canceled(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_canceled(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerCanceled)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_pointer_wheel_changed(&self, value: &input::PointerEventHandler) -> Result { + }} + #[inline] pub fn add_pointer_wheel_changed(&self, value: &input::PointerEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PointerWheelChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_pointer_wheel_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_pointer_wheel_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PointerWheelChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_tapped(&self, value: &input::TappedEventHandler) -> Result { + }} + #[inline] pub fn add_tapped(&self, value: &input::TappedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Tapped)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_tapped(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_tapped(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Tapped)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_double_tapped(&self, value: &input::DoubleTappedEventHandler) -> Result { + }} + #[inline] pub fn add_double_tapped(&self, value: &input::DoubleTappedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DoubleTapped)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_double_tapped(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_double_tapped(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DoubleTapped)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_holding(&self, value: &input::HoldingEventHandler) -> Result { + }} + #[inline] pub fn add_holding(&self, value: &input::HoldingEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Holding)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_holding(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_holding(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Holding)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_right_tapped(&self, value: &input::RightTappedEventHandler) -> Result { + }} + #[inline] pub fn add_right_tapped(&self, value: &input::RightTappedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_RightTapped)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_right_tapped(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_right_tapped(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_RightTapped)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_manipulation_starting(&self, value: &input::ManipulationStartingEventHandler) -> Result { + }} + #[inline] pub fn add_manipulation_starting(&self, value: &input::ManipulationStartingEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ManipulationStarting)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_manipulation_starting(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_manipulation_starting(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ManipulationStarting)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_manipulation_inertia_starting(&self, value: &input::ManipulationInertiaStartingEventHandler) -> Result { + }} + #[inline] pub fn add_manipulation_inertia_starting(&self, value: &input::ManipulationInertiaStartingEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ManipulationInertiaStarting)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_manipulation_inertia_starting(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_manipulation_inertia_starting(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ManipulationInertiaStarting)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_manipulation_started(&self, value: &input::ManipulationStartedEventHandler) -> Result { + }} + #[inline] pub fn add_manipulation_started(&self, value: &input::ManipulationStartedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ManipulationStarted)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_manipulation_started(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_manipulation_started(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ManipulationStarted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_manipulation_delta(&self, value: &input::ManipulationDeltaEventHandler) -> Result { + }} + #[inline] pub fn add_manipulation_delta(&self, value: &input::ManipulationDeltaEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ManipulationDelta)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_manipulation_delta(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_manipulation_delta(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ManipulationDelta)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_manipulation_completed(&self, value: &input::ManipulationCompletedEventHandler) -> Result { + }} + #[inline] pub fn add_manipulation_completed(&self, value: &input::ManipulationCompletedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ManipulationCompleted)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_manipulation_completed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_manipulation_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ManipulationCompleted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn measure(&self, availableSize: super::super::foundation::Size) -> Result<()> { + }} + #[inline] pub fn measure(&self, availableSize: foundation::Size) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Measure)(self as *const _ as *mut _, availableSize); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn arrange(&self, finalRect: super::super::foundation::Rect) -> Result<()> { + }} + #[inline] pub fn arrange(&self, finalRect: foundation::Rect) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Arrange)(self as *const _ as *mut _, finalRect); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn capture_pointer(&self, value: &input::Pointer) -> Result { + }} + #[inline] pub fn capture_pointer(&self, value: &input::Pointer) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).CapturePointer)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn release_pointer_capture(&self, value: &input::Pointer) -> Result<()> { + }} + #[inline] pub fn release_pointer_capture(&self, value: &input::Pointer) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReleasePointerCapture)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn release_pointer_captures(&self) -> Result<()> { + }} + #[inline] pub fn release_pointer_captures(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).ReleasePointerCaptures)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_handler(&self, routedEvent: &RoutedEvent, handler: &IInspectable, handledEventsToo: bool) -> Result<()> { + }} + #[inline] pub fn add_handler(&self, routedEvent: &RoutedEvent, handler: &IInspectable, handledEventsToo: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).AddHandler)(self as *const _ as *mut _, 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(&self, routedEvent: &RoutedEvent, handler: &IInspectable) -> Result<()> { + }} + #[inline] pub fn remove_handler(&self, routedEvent: &RoutedEvent, handler: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RemoveHandler)(self as *const _ as *mut _, 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(&self, visual: &UIElement) -> Result> { + }} + #[inline] pub fn transform_to_visual(&self, visual: &UIElement) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).TransformToVisual)(self as *const _ as *mut _, visual as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn invalidate_measure(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn invalidate_measure(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InvalidateMeasure)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn invalidate_arrange(&self) -> Result<()> { + }} + #[inline] pub fn invalidate_arrange(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).InvalidateArrange)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn update_layout(&self) -> Result<()> { + }} + #[inline] pub fn update_layout(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).UpdateLayout)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class UIElement: IUIElement} impl RtActivatable for UIElement {} @@ -3647,204 +3647,204 @@ impl RtActivatable for UIElement {} impl RtActivatable for UIElement {} impl RtActivatable for UIElement {} impl UIElement { - #[inline] pub fn get_key_down_event() -> Result> { unsafe { + #[inline] pub fn get_key_down_event() -> Result>> { >::get_activation_factory().get_key_down_event() - }} - #[inline] pub fn get_key_up_event() -> Result> { unsafe { + } + #[inline] pub fn get_key_up_event() -> Result>> { >::get_activation_factory().get_key_up_event() - }} - #[inline] pub fn get_pointer_entered_event() -> Result> { unsafe { + } + #[inline] pub fn get_pointer_entered_event() -> Result>> { >::get_activation_factory().get_pointer_entered_event() - }} - #[inline] pub fn get_pointer_pressed_event() -> Result> { unsafe { + } + #[inline] pub fn get_pointer_pressed_event() -> Result>> { >::get_activation_factory().get_pointer_pressed_event() - }} - #[inline] pub fn get_pointer_moved_event() -> Result> { unsafe { + } + #[inline] pub fn get_pointer_moved_event() -> Result>> { >::get_activation_factory().get_pointer_moved_event() - }} - #[inline] pub fn get_pointer_released_event() -> Result> { unsafe { + } + #[inline] pub fn get_pointer_released_event() -> Result>> { >::get_activation_factory().get_pointer_released_event() - }} - #[inline] pub fn get_pointer_exited_event() -> Result> { unsafe { + } + #[inline] pub fn get_pointer_exited_event() -> Result>> { >::get_activation_factory().get_pointer_exited_event() - }} - #[inline] pub fn get_pointer_capture_lost_event() -> Result> { unsafe { + } + #[inline] pub fn get_pointer_capture_lost_event() -> Result>> { >::get_activation_factory().get_pointer_capture_lost_event() - }} - #[inline] pub fn get_pointer_canceled_event() -> Result> { unsafe { + } + #[inline] pub fn get_pointer_canceled_event() -> Result>> { >::get_activation_factory().get_pointer_canceled_event() - }} - #[inline] pub fn get_pointer_wheel_changed_event() -> Result> { unsafe { + } + #[inline] pub fn get_pointer_wheel_changed_event() -> Result>> { >::get_activation_factory().get_pointer_wheel_changed_event() - }} - #[inline] pub fn get_tapped_event() -> Result> { unsafe { + } + #[inline] pub fn get_tapped_event() -> Result>> { >::get_activation_factory().get_tapped_event() - }} - #[inline] pub fn get_double_tapped_event() -> Result> { unsafe { + } + #[inline] pub fn get_double_tapped_event() -> Result>> { >::get_activation_factory().get_double_tapped_event() - }} - #[inline] pub fn get_holding_event() -> Result> { unsafe { + } + #[inline] pub fn get_holding_event() -> Result>> { >::get_activation_factory().get_holding_event() - }} - #[inline] pub fn get_right_tapped_event() -> Result> { unsafe { + } + #[inline] pub fn get_right_tapped_event() -> Result>> { >::get_activation_factory().get_right_tapped_event() - }} - #[inline] pub fn get_manipulation_starting_event() -> Result> { unsafe { + } + #[inline] pub fn get_manipulation_starting_event() -> Result>> { >::get_activation_factory().get_manipulation_starting_event() - }} - #[inline] pub fn get_manipulation_inertia_starting_event() -> Result> { unsafe { + } + #[inline] pub fn get_manipulation_inertia_starting_event() -> Result>> { >::get_activation_factory().get_manipulation_inertia_starting_event() - }} - #[inline] pub fn get_manipulation_started_event() -> Result> { unsafe { + } + #[inline] pub fn get_manipulation_started_event() -> Result>> { >::get_activation_factory().get_manipulation_started_event() - }} - #[inline] pub fn get_manipulation_delta_event() -> Result> { unsafe { + } + #[inline] pub fn get_manipulation_delta_event() -> Result>> { >::get_activation_factory().get_manipulation_delta_event() - }} - #[inline] pub fn get_manipulation_completed_event() -> Result> { unsafe { + } + #[inline] pub fn get_manipulation_completed_event() -> Result>> { >::get_activation_factory().get_manipulation_completed_event() - }} - #[inline] pub fn get_drag_enter_event() -> Result> { unsafe { + } + #[inline] pub fn get_drag_enter_event() -> Result>> { >::get_activation_factory().get_drag_enter_event() - }} - #[inline] pub fn get_drag_leave_event() -> Result> { unsafe { + } + #[inline] pub fn get_drag_leave_event() -> Result>> { >::get_activation_factory().get_drag_leave_event() - }} - #[inline] pub fn get_drag_over_event() -> Result> { unsafe { + } + #[inline] pub fn get_drag_over_event() -> Result>> { >::get_activation_factory().get_drag_over_event() - }} - #[inline] pub fn get_drop_event() -> Result> { unsafe { + } + #[inline] pub fn get_drop_event() -> Result>> { >::get_activation_factory().get_drop_event() - }} - #[inline] pub fn get_allow_drop_property() -> Result> { unsafe { + } + #[inline] pub fn get_allow_drop_property() -> Result>> { >::get_activation_factory().get_allow_drop_property() - }} - #[inline] pub fn get_opacity_property() -> Result> { unsafe { + } + #[inline] pub fn get_opacity_property() -> Result>> { >::get_activation_factory().get_opacity_property() - }} - #[inline] pub fn get_clip_property() -> Result> { unsafe { + } + #[inline] pub fn get_clip_property() -> Result>> { >::get_activation_factory().get_clip_property() - }} - #[inline] pub fn get_render_transform_property() -> Result> { unsafe { + } + #[inline] pub fn get_render_transform_property() -> Result>> { >::get_activation_factory().get_render_transform_property() - }} - #[inline] pub fn get_projection_property() -> Result> { unsafe { + } + #[inline] pub fn get_projection_property() -> Result>> { >::get_activation_factory().get_projection_property() - }} - #[inline] pub fn get_render_transform_origin_property() -> Result> { unsafe { + } + #[inline] pub fn get_render_transform_origin_property() -> Result>> { >::get_activation_factory().get_render_transform_origin_property() - }} - #[inline] pub fn get_is_hit_test_visible_property() -> Result> { unsafe { + } + #[inline] pub fn get_is_hit_test_visible_property() -> Result>> { >::get_activation_factory().get_is_hit_test_visible_property() - }} - #[inline] pub fn get_visibility_property() -> Result> { unsafe { + } + #[inline] pub fn get_visibility_property() -> Result>> { >::get_activation_factory().get_visibility_property() - }} - #[inline] pub fn get_use_layout_rounding_property() -> Result> { unsafe { + } + #[inline] pub fn get_use_layout_rounding_property() -> Result>> { >::get_activation_factory().get_use_layout_rounding_property() - }} - #[inline] pub fn get_transitions_property() -> Result> { unsafe { + } + #[inline] pub fn get_transitions_property() -> Result>> { >::get_activation_factory().get_transitions_property() - }} - #[inline] pub fn get_cache_mode_property() -> Result> { unsafe { + } + #[inline] pub fn get_cache_mode_property() -> Result>> { >::get_activation_factory().get_cache_mode_property() - }} - #[inline] pub fn get_is_tap_enabled_property() -> Result> { unsafe { + } + #[inline] pub fn get_is_tap_enabled_property() -> Result>> { >::get_activation_factory().get_is_tap_enabled_property() - }} - #[inline] pub fn get_is_double_tap_enabled_property() -> Result> { unsafe { + } + #[inline] pub fn get_is_double_tap_enabled_property() -> Result>> { >::get_activation_factory().get_is_double_tap_enabled_property() - }} - #[inline] pub fn get_is_right_tap_enabled_property() -> Result> { unsafe { + } + #[inline] pub fn get_is_right_tap_enabled_property() -> Result>> { >::get_activation_factory().get_is_right_tap_enabled_property() - }} - #[inline] pub fn get_is_holding_enabled_property() -> Result> { unsafe { + } + #[inline] pub fn get_is_holding_enabled_property() -> Result>> { >::get_activation_factory().get_is_holding_enabled_property() - }} - #[inline] pub fn get_manipulation_mode_property() -> Result> { unsafe { + } + #[inline] pub fn get_manipulation_mode_property() -> Result>> { >::get_activation_factory().get_manipulation_mode_property() - }} - #[inline] pub fn get_pointer_captures_property() -> Result> { unsafe { + } + #[inline] pub fn get_pointer_captures_property() -> Result>> { >::get_activation_factory().get_pointer_captures_property() - }} - #[inline] pub fn get_composite_mode_property() -> Result> { unsafe { + } + #[inline] pub fn get_composite_mode_property() -> Result>> { >::get_activation_factory().get_composite_mode_property() - }} - #[inline] pub fn get_transform3_dproperty() -> Result> { unsafe { + } + #[inline] pub fn get_transform3_dproperty() -> Result>> { >::get_activation_factory().get_transform3_dproperty() - }} - #[inline] pub fn get_can_drag_property() -> Result> { unsafe { + } + #[inline] pub fn get_can_drag_property() -> Result>> { >::get_activation_factory().get_can_drag_property() - }} - #[inline] pub fn try_start_direct_manipulation(value: &input::Pointer) -> Result { unsafe { + } + #[inline] pub fn try_start_direct_manipulation(value: &input::Pointer) -> Result { >::get_activation_factory().try_start_direct_manipulation(value) - }} - #[inline] pub fn get_context_flyout_property() -> Result> { unsafe { + } + #[inline] pub fn get_context_flyout_property() -> Result>> { >::get_activation_factory().get_context_flyout_property() - }} - #[inline] pub fn get_exit_display_mode_on_access_key_invoked_property() -> Result> { unsafe { + } + #[inline] pub fn get_exit_display_mode_on_access_key_invoked_property() -> Result>> { >::get_activation_factory().get_exit_display_mode_on_access_key_invoked_property() - }} - #[inline] pub fn get_is_access_key_scope_property() -> Result> { unsafe { + } + #[inline] pub fn get_is_access_key_scope_property() -> Result>> { >::get_activation_factory().get_is_access_key_scope_property() - }} - #[inline] pub fn get_access_key_scope_owner_property() -> Result> { unsafe { + } + #[inline] pub fn get_access_key_scope_owner_property() -> Result>> { >::get_activation_factory().get_access_key_scope_owner_property() - }} - #[inline] pub fn get_access_key_property() -> Result> { unsafe { + } + #[inline] pub fn get_access_key_property() -> Result>> { >::get_activation_factory().get_access_key_property() - }} - #[inline] pub fn get_lights_property() -> Result> { unsafe { + } + #[inline] pub fn get_lights_property() -> Result>> { >::get_activation_factory().get_lights_property() - }} - #[inline] pub fn get_key_tip_placement_mode_property() -> Result> { unsafe { + } + #[inline] pub fn get_key_tip_placement_mode_property() -> Result>> { >::get_activation_factory().get_key_tip_placement_mode_property() - }} - #[inline] pub fn get_key_tip_horizontal_offset_property() -> Result> { unsafe { + } + #[inline] pub fn get_key_tip_horizontal_offset_property() -> Result>> { >::get_activation_factory().get_key_tip_horizontal_offset_property() - }} - #[inline] pub fn get_key_tip_vertical_offset_property() -> Result> { unsafe { + } + #[inline] pub fn get_key_tip_vertical_offset_property() -> Result>> { >::get_activation_factory().get_key_tip_vertical_offset_property() - }} - #[inline] pub fn get_xyfocus_keyboard_navigation_property() -> Result> { unsafe { + } + #[inline] pub fn get_xyfocus_keyboard_navigation_property() -> Result>> { >::get_activation_factory().get_xyfocus_keyboard_navigation_property() - }} - #[inline] pub fn get_xyfocus_up_navigation_strategy_property() -> Result> { unsafe { + } + #[inline] pub fn get_xyfocus_up_navigation_strategy_property() -> Result>> { >::get_activation_factory().get_xyfocus_up_navigation_strategy_property() - }} - #[inline] pub fn get_xyfocus_down_navigation_strategy_property() -> Result> { unsafe { + } + #[inline] pub fn get_xyfocus_down_navigation_strategy_property() -> Result>> { >::get_activation_factory().get_xyfocus_down_navigation_strategy_property() - }} - #[inline] pub fn get_xyfocus_left_navigation_strategy_property() -> Result> { unsafe { + } + #[inline] pub fn get_xyfocus_left_navigation_strategy_property() -> Result>> { >::get_activation_factory().get_xyfocus_left_navigation_strategy_property() - }} - #[inline] pub fn get_xyfocus_right_navigation_strategy_property() -> Result> { unsafe { + } + #[inline] pub fn get_xyfocus_right_navigation_strategy_property() -> Result>> { >::get_activation_factory().get_xyfocus_right_navigation_strategy_property() - }} - #[inline] pub fn get_high_contrast_adjustment_property() -> Result> { unsafe { + } + #[inline] pub fn get_high_contrast_adjustment_property() -> Result>> { >::get_activation_factory().get_high_contrast_adjustment_property() - }} - #[inline] pub fn get_tab_focus_navigation_property() -> Result> { unsafe { + } + #[inline] pub fn get_tab_focus_navigation_property() -> Result>> { >::get_activation_factory().get_tab_focus_navigation_property() - }} - #[inline] pub fn get_getting_focus_event() -> Result> { unsafe { + } + #[inline] pub fn get_getting_focus_event() -> Result>> { >::get_activation_factory().get_getting_focus_event() - }} - #[inline] pub fn get_losing_focus_event() -> Result> { unsafe { + } + #[inline] pub fn get_losing_focus_event() -> Result>> { >::get_activation_factory().get_losing_focus_event() - }} - #[inline] pub fn get_no_focus_candidate_found_event() -> Result> { unsafe { + } + #[inline] pub fn get_no_focus_candidate_found_event() -> Result>> { >::get_activation_factory().get_no_focus_candidate_found_event() - }} - #[inline] pub fn get_preview_key_down_event() -> Result> { unsafe { + } + #[inline] pub fn get_preview_key_down_event() -> Result>> { >::get_activation_factory().get_preview_key_down_event() - }} - #[inline] pub fn get_character_received_event() -> Result> { unsafe { + } + #[inline] pub fn get_character_received_event() -> Result>> { >::get_activation_factory().get_character_received_event() - }} - #[inline] pub fn get_preview_key_up_event() -> Result> { unsafe { + } + #[inline] pub fn get_preview_key_up_event() -> Result>> { >::get_activation_factory().get_preview_key_up_event() - }} + } } DEFINE_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]) [CLSID_UIElement]); DEFINE_IID!(IID_IUIElement2, 1735199737, 46700, 16854, 186, 80, 88, 207, 135, 242, 1, 209); @@ -3854,20 +3854,20 @@ RT_INTERFACE!{interface IUIElement2(IUIElement2Vtbl): IInspectable(IInspectableV fn CancelDirectManipulations(&self, out: *mut bool) -> HRESULT }} impl IUIElement2 { - #[inline] pub unsafe fn get_composite_mode(&self) -> Result { + #[inline] pub fn get_composite_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CompositeMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_composite_mode(&self, value: media::ElementCompositeMode) -> Result<()> { + }} + #[inline] pub fn set_composite_mode(&self, value: media::ElementCompositeMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CompositeMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn cancel_direct_manipulations(&self) -> Result { + }} + #[inline] pub fn cancel_direct_manipulations(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).CancelDirectManipulations)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(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] { @@ -3875,54 +3875,54 @@ RT_INTERFACE!{interface IUIElement3(IUIElement3Vtbl): IInspectable(IInspectableV fn put_Transform3D(&self, value: *mut media::media3d::Transform3D) -> HRESULT, fn get_CanDrag(&self, out: *mut bool) -> HRESULT, fn put_CanDrag(&self, value: bool) -> HRESULT, - fn add_DragStarting(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DragStarting(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_DropCompleted(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_DropCompleted(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - #[cfg(all(feature="windows-applicationmodel",feature="windows-ui"))] fn StartDragAsync(&self, pointerPoint: *mut super::input::PointerPoint, out: *mut *mut super::super::foundation::IAsyncOperation) -> HRESULT + fn add_DragStarting(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DragStarting(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_DropCompleted(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_DropCompleted(&self, token: foundation::EventRegistrationToken) -> HRESULT, + #[cfg(all(feature="windows-applicationmodel",feature="windows-ui"))] fn StartDragAsync(&self, pointerPoint: *mut super::input::PointerPoint, out: *mut *mut foundation::IAsyncOperation) -> HRESULT }} impl IUIElement3 { - #[inline] pub unsafe fn get_transform3_d(&self) -> Result> { + #[inline] pub fn get_transform3_d(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Transform3D)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_transform3_d(&self, value: &media::media3d::Transform3D) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_transform3_d(&self, value: &media::media3d::Transform3D) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Transform3D)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_drag(&self) -> Result { + }} + #[inline] pub fn get_can_drag(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CanDrag)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_can_drag(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_can_drag(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CanDrag)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_drag_starting(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_drag_starting(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DragStarting)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_drag_starting(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_drag_starting(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DragStarting)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_drop_completed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_drop_completed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_DropCompleted)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_drop_completed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_drop_completed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_DropCompleted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(all(feature="windows-applicationmodel",feature="windows-ui"))] #[inline] pub unsafe fn start_drag_async(&self, pointerPoint: &super::input::PointerPoint) -> Result>> { + }} + #[cfg(all(feature="windows-applicationmodel",feature="windows-ui"))] #[inline] pub fn start_drag_async(&self, pointerPoint: &super::input::PointerPoint) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).StartDragAsync)(self as *const _ as *mut _, pointerPoint as *const _ as *mut _, &mut out); if hr == S_OK { Ok(ComPtr::wrap(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] { @@ -3936,112 +3936,112 @@ RT_INTERFACE!{interface IUIElement4(IUIElement4Vtbl): IInspectable(IInspectableV fn put_AccessKeyScopeOwner(&self, value: *mut DependencyObject) -> HRESULT, fn get_AccessKey(&self, out: *mut HSTRING) -> HRESULT, fn put_AccessKey(&self, value: HSTRING) -> HRESULT, - fn add_ContextRequested(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ContextRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ContextCanceled(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ContextCanceled(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_AccessKeyDisplayRequested(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AccessKeyDisplayRequested(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_AccessKeyDisplayDismissed(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AccessKeyDisplayDismissed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_AccessKeyInvoked(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_AccessKeyInvoked(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_ContextRequested(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ContextRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ContextCanceled(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ContextCanceled(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_AccessKeyDisplayRequested(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AccessKeyDisplayRequested(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_AccessKeyDisplayDismissed(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AccessKeyDisplayDismissed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_AccessKeyInvoked(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_AccessKeyInvoked(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IUIElement4 { - #[inline] pub unsafe fn get_context_flyout(&self) -> Result> { + #[inline] pub fn get_context_flyout(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContextFlyout)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_context_flyout(&self, value: &controls::primitives::FlyoutBase) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_context_flyout(&self, value: &controls::primitives::FlyoutBase) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ContextFlyout)(self as *const _ as *mut _, 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(&self) -> Result { + }} + #[inline] pub fn get_exit_display_mode_on_access_key_invoked(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ExitDisplayModeOnAccessKeyInvoked)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_exit_display_mode_on_access_key_invoked(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_exit_display_mode_on_access_key_invoked(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ExitDisplayModeOnAccessKeyInvoked)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_access_key_scope(&self) -> Result { + }} + #[inline] pub fn get_is_access_key_scope(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsAccessKeyScope)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_access_key_scope(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_access_key_scope(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsAccessKeyScope)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_access_key_scope_owner(&self) -> Result> { + }} + #[inline] pub fn get_access_key_scope_owner(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AccessKeyScopeOwner)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_access_key_scope_owner(&self, value: &DependencyObject) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_access_key_scope_owner(&self, value: &DependencyObject) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AccessKeyScopeOwner)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_access_key(&self) -> Result { + }} + #[inline] pub fn get_access_key(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AccessKey)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_access_key(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_access_key(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AccessKey)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_context_requested(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_context_requested(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ContextRequested)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_context_requested(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_context_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ContextRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_context_canceled(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_context_canceled(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ContextCanceled)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_context_canceled(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_context_canceled(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ContextCanceled)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_access_key_display_requested(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_access_key_display_requested(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AccessKeyDisplayRequested)(self as *const _ as *mut _, 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(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_access_key_display_requested(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AccessKeyDisplayRequested)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_access_key_display_dismissed(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_access_key_display_dismissed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AccessKeyDisplayDismissed)(self as *const _ as *mut _, 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(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_access_key_display_dismissed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AccessKeyDisplayDismissed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_access_key_invoked(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_access_key_invoked(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_AccessKeyInvoked)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_access_key_invoked(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_access_key_invoked(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_AccessKeyInvoked)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IUIElement5, 2397936578, 42380, 17491, 175, 15, 169, 46, 224, 109, 3, 23); RT_INTERFACE!{interface IUIElement5(IUIElement5Vtbl): IInspectable(IInspectableVtbl) [IID_IUIElement5] { - fn get_Lights(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Lights(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_KeyTipPlacementMode(&self, out: *mut input::KeyTipPlacementMode) -> HRESULT, fn put_KeyTipPlacementMode(&self, value: input::KeyTipPlacementMode) -> HRESULT, fn get_KeyTipHorizontalOffset(&self, out: *mut f64) -> HRESULT, @@ -4062,206 +4062,206 @@ RT_INTERFACE!{interface IUIElement5(IUIElement5Vtbl): IInspectable(IInspectableV fn put_HighContrastAdjustment(&self, value: ElementHighContrastAdjustment) -> HRESULT, fn get_TabFocusNavigation(&self, out: *mut input::KeyboardNavigationMode) -> HRESULT, fn put_TabFocusNavigation(&self, value: input::KeyboardNavigationMode) -> HRESULT, - fn add_GettingFocus(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_GettingFocus(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_LosingFocus(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_LosingFocus(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_NoFocusCandidateFound(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_NoFocusCandidateFound(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_GettingFocus(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_GettingFocus(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_LosingFocus(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_LosingFocus(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_NoFocusCandidateFound(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_NoFocusCandidateFound(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn StartBringIntoView(&self) -> HRESULT, fn StartBringIntoViewWithOptions(&self, options: *mut BringIntoViewOptions) -> HRESULT }} impl IUIElement5 { - #[inline] pub unsafe fn get_lights(&self) -> Result>> { + #[inline] pub fn get_lights(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Lights)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_key_tip_placement_mode(&self) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_key_tip_placement_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_KeyTipPlacementMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_key_tip_placement_mode(&self, value: input::KeyTipPlacementMode) -> Result<()> { + }} + #[inline] pub fn set_key_tip_placement_mode(&self, value: input::KeyTipPlacementMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_KeyTipPlacementMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_key_tip_horizontal_offset(&self) -> Result { + }} + #[inline] pub fn get_key_tip_horizontal_offset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_KeyTipHorizontalOffset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_key_tip_horizontal_offset(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_key_tip_horizontal_offset(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_KeyTipHorizontalOffset)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_key_tip_vertical_offset(&self) -> Result { + }} + #[inline] pub fn get_key_tip_vertical_offset(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_KeyTipVerticalOffset)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_key_tip_vertical_offset(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_key_tip_vertical_offset(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_KeyTipVerticalOffset)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_xyfocus_keyboard_navigation(&self) -> Result { + }} + #[inline] pub fn get_xyfocus_keyboard_navigation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_XYFocusKeyboardNavigation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_xyfocus_keyboard_navigation(&self, value: input::XYFocusKeyboardNavigationMode) -> Result<()> { + }} + #[inline] pub fn set_xyfocus_keyboard_navigation(&self, value: input::XYFocusKeyboardNavigationMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_XYFocusKeyboardNavigation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_xyfocus_up_navigation_strategy(&self) -> Result { + }} + #[inline] pub fn get_xyfocus_up_navigation_strategy(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_XYFocusUpNavigationStrategy)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_xyfocus_up_navigation_strategy(&self, value: input::XYFocusNavigationStrategy) -> Result<()> { + }} + #[inline] pub fn set_xyfocus_up_navigation_strategy(&self, value: input::XYFocusNavigationStrategy) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_XYFocusUpNavigationStrategy)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_xyfocus_down_navigation_strategy(&self) -> Result { + }} + #[inline] pub fn get_xyfocus_down_navigation_strategy(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_XYFocusDownNavigationStrategy)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_xyfocus_down_navigation_strategy(&self, value: input::XYFocusNavigationStrategy) -> Result<()> { + }} + #[inline] pub fn set_xyfocus_down_navigation_strategy(&self, value: input::XYFocusNavigationStrategy) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_XYFocusDownNavigationStrategy)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_xyfocus_left_navigation_strategy(&self) -> Result { + }} + #[inline] pub fn get_xyfocus_left_navigation_strategy(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_XYFocusLeftNavigationStrategy)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_xyfocus_left_navigation_strategy(&self, value: input::XYFocusNavigationStrategy) -> Result<()> { + }} + #[inline] pub fn set_xyfocus_left_navigation_strategy(&self, value: input::XYFocusNavigationStrategy) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_XYFocusLeftNavigationStrategy)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_xyfocus_right_navigation_strategy(&self) -> Result { + }} + #[inline] pub fn get_xyfocus_right_navigation_strategy(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_XYFocusRightNavigationStrategy)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_xyfocus_right_navigation_strategy(&self, value: input::XYFocusNavigationStrategy) -> Result<()> { + }} + #[inline] pub fn set_xyfocus_right_navigation_strategy(&self, value: input::XYFocusNavigationStrategy) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_XYFocusRightNavigationStrategy)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_high_contrast_adjustment(&self) -> Result { + }} + #[inline] pub fn get_high_contrast_adjustment(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_HighContrastAdjustment)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_high_contrast_adjustment(&self, value: ElementHighContrastAdjustment) -> Result<()> { + }} + #[inline] pub fn set_high_contrast_adjustment(&self, value: ElementHighContrastAdjustment) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_HighContrastAdjustment)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_tab_focus_navigation(&self) -> Result { + }} + #[inline] pub fn get_tab_focus_navigation(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_TabFocusNavigation)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_tab_focus_navigation(&self, value: input::KeyboardNavigationMode) -> Result<()> { + }} + #[inline] pub fn set_tab_focus_navigation(&self, value: input::KeyboardNavigationMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TabFocusNavigation)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_getting_focus(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_getting_focus(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_GettingFocus)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_getting_focus(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_getting_focus(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_GettingFocus)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_losing_focus(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_losing_focus(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_LosingFocus)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_losing_focus(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_losing_focus(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_LosingFocus)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_no_focus_candidate_found(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_no_focus_candidate_found(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_NoFocusCandidateFound)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_no_focus_candidate_found(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_no_focus_candidate_found(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_NoFocusCandidateFound)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start_bring_into_view(&self) -> Result<()> { + }} + #[inline] pub fn start_bring_into_view(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StartBringIntoView)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn start_bring_into_view_with_options(&self, options: &BringIntoViewOptions) -> Result<()> { + }} + #[inline] pub fn start_bring_into_view_with_options(&self, options: &BringIntoViewOptions) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).StartBringIntoViewWithOptions)(self as *const _ as *mut _, options as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IUIElement7, 3405531496, 25449, 16969, 128, 249, 61, 101, 99, 25, 232, 17); RT_INTERFACE!{interface IUIElement7(IUIElement7Vtbl): IInspectable(IInspectableVtbl) [IID_IUIElement7] { - fn get_KeyboardAccelerators(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn add_CharacterReceived(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CharacterReceived(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_ProcessKeyboardAccelerators(&self, value: *mut super::super::foundation::TypedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_ProcessKeyboardAccelerators(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PreviewKeyDown(&self, value: *mut input::KeyEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PreviewKeyDown(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_PreviewKeyUp(&self, value: *mut input::KeyEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_PreviewKeyUp(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn get_KeyboardAccelerators(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn add_CharacterReceived(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CharacterReceived(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_ProcessKeyboardAccelerators(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_ProcessKeyboardAccelerators(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PreviewKeyDown(&self, value: *mut input::KeyEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PreviewKeyDown(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_PreviewKeyUp(&self, value: *mut input::KeyEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_PreviewKeyUp(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn TryInvokeKeyboardAccelerator(&self, args: *mut input::ProcessKeyboardAcceleratorEventArgs) -> HRESULT }} impl IUIElement7 { - #[inline] pub unsafe fn get_keyboard_accelerators(&self) -> Result>> { + #[inline] pub fn get_keyboard_accelerators(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_KeyboardAccelerators)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_character_received(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_character_received(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CharacterReceived)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_character_received(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_character_received(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CharacterReceived)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_process_keyboard_accelerators(&self, value: &super::super::foundation::TypedEventHandler) -> Result { + }} + #[inline] pub fn add_process_keyboard_accelerators(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_ProcessKeyboardAccelerators)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_process_keyboard_accelerators(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_process_keyboard_accelerators(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_ProcessKeyboardAccelerators)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_preview_key_down(&self, value: &input::KeyEventHandler) -> Result { + }} + #[inline] pub fn add_preview_key_down(&self, value: &input::KeyEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PreviewKeyDown)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_preview_key_down(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_preview_key_down(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PreviewKeyDown)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_preview_key_up(&self, value: &input::KeyEventHandler) -> Result { + }} + #[inline] pub fn add_preview_key_up(&self, value: &input::KeyEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_PreviewKeyUp)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_preview_key_up(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_preview_key_up(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_PreviewKeyUp)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn try_invoke_keyboard_accelerator(&self, args: &input::ProcessKeyboardAcceleratorEventArgs) -> Result<()> { + }} + #[inline] pub fn try_invoke_keyboard_accelerator(&self, args: &input::ProcessKeyboardAcceleratorEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).TryInvokeKeyboardAccelerator)(self as *const _ as *mut _, args as *const _ as *mut _); if hr == S_OK { Ok(()) } 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] { @@ -4271,39 +4271,39 @@ DEFINE_IID!(IID_IUIElementOverrides, 1619865373, 30808, 19179, 137, 228, 181, 78 RT_INTERFACE!{interface IUIElementOverrides(IUIElementOverridesVtbl): IInspectable(IInspectableVtbl) [IID_IUIElementOverrides] { fn OnCreateAutomationPeer(&self, out: *mut *mut automation::peers::AutomationPeer) -> HRESULT, fn OnDisconnectVisualChildren(&self) -> HRESULT, - fn FindSubElementsForTouchTargeting(&self, point: super::super::foundation::Point, boundingRect: super::super::foundation::Rect, out: *mut *mut super::super::foundation::collections::IIterable>) -> HRESULT + fn FindSubElementsForTouchTargeting(&self, point: foundation::Point, boundingRect: foundation::Rect, out: *mut *mut foundation::collections::IIterable>) -> HRESULT }} impl IUIElementOverrides { - #[inline] pub unsafe fn on_create_automation_peer(&self) -> Result> { + #[inline] pub fn on_create_automation_peer(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).OnCreateAutomationPeer)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn on_disconnect_visual_children(&self) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn on_disconnect_visual_children(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnDisconnectVisualChildren)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn find_sub_elements_for_touch_targeting(&self, point: super::super::foundation::Point, boundingRect: super::super::foundation::Rect) -> Result>>> { + }} + #[inline] pub fn find_sub_elements_for_touch_targeting(&self, point: foundation::Point, boundingRect: foundation::Rect) -> Result>>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).FindSubElementsForTouchTargeting)(self as *const _ as *mut _, point, boundingRect, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IUIElementOverrides7, 3112140648, 49819, 19609, 161, 195, 149, 38, 25, 214, 231, 32); RT_INTERFACE!{interface IUIElementOverrides7(IUIElementOverrides7Vtbl): IInspectable(IInspectableVtbl) [IID_IUIElementOverrides7] { - fn GetChildrenInTabFocusOrder(&self, out: *mut *mut super::super::foundation::collections::IIterable) -> HRESULT, + fn GetChildrenInTabFocusOrder(&self, out: *mut *mut foundation::collections::IIterable) -> HRESULT, fn OnProcessKeyboardAccelerators(&self, args: *mut input::ProcessKeyboardAcceleratorEventArgs) -> HRESULT }} impl IUIElementOverrides7 { - #[inline] pub unsafe fn get_children_in_tab_focus_order(&self) -> Result>> { + #[inline] pub fn get_children_in_tab_focus_order(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetChildrenInTabFocusOrder)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn on_process_keyboard_accelerators(&self, args: &input::ProcessKeyboardAcceleratorEventArgs) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn on_process_keyboard_accelerators(&self, args: &input::ProcessKeyboardAcceleratorEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnProcessKeyboardAccelerators)(self as *const _ as *mut _, args as *const _ as *mut _); if hr == S_OK { Ok(()) } 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] { @@ -4349,217 +4349,217 @@ RT_INTERFACE!{static interface IUIElementStatics(IUIElementStaticsVtbl): IInspec fn get_PointerCapturesProperty(&self, out: *mut *mut DependencyProperty) -> HRESULT }} impl IUIElementStatics { - #[inline] pub unsafe fn get_key_down_event(&self) -> Result> { + #[inline] pub fn get_key_down_event(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_KeyDownEvent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_key_up_event(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_key_up_event(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_KeyUpEvent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pointer_entered_event(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_pointer_entered_event(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PointerEnteredEvent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pointer_pressed_event(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_pointer_pressed_event(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PointerPressedEvent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pointer_moved_event(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_pointer_moved_event(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PointerMovedEvent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pointer_released_event(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_pointer_released_event(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PointerReleasedEvent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pointer_exited_event(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_pointer_exited_event(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PointerExitedEvent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pointer_capture_lost_event(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_pointer_capture_lost_event(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PointerCaptureLostEvent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pointer_canceled_event(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_pointer_canceled_event(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PointerCanceledEvent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pointer_wheel_changed_event(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_pointer_wheel_changed_event(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PointerWheelChangedEvent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_tapped_event(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_tapped_event(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TappedEvent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_double_tapped_event(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_double_tapped_event(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DoubleTappedEvent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_holding_event(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_holding_event(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HoldingEvent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_right_tapped_event(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_right_tapped_event(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RightTappedEvent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_manipulation_starting_event(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_manipulation_starting_event(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ManipulationStartingEvent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_manipulation_inertia_starting_event(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_manipulation_inertia_starting_event(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ManipulationInertiaStartingEvent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_manipulation_started_event(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_manipulation_started_event(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ManipulationStartedEvent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_manipulation_delta_event(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_manipulation_delta_event(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ManipulationDeltaEvent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_manipulation_completed_event(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_manipulation_completed_event(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ManipulationCompletedEvent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_drag_enter_event(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_drag_enter_event(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DragEnterEvent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_drag_leave_event(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_drag_leave_event(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DragLeaveEvent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_drag_over_event(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_drag_over_event(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DragOverEvent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_drop_event(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_drop_event(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DropEvent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_allow_drop_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_allow_drop_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AllowDropProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_opacity_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_opacity_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OpacityProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_clip_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_clip_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ClipProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_render_transform_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_render_transform_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RenderTransformProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_projection_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_projection_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ProjectionProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_render_transform_origin_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_render_transform_origin_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_RenderTransformOriginProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_hit_test_visible_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_hit_test_visible_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsHitTestVisibleProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_visibility_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_visibility_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_VisibilityProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_use_layout_rounding_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_use_layout_rounding_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UseLayoutRoundingProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_transitions_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_transitions_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TransitionsProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_cache_mode_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_cache_mode_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CacheModeProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_tap_enabled_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_tap_enabled_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsTapEnabledProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_double_tap_enabled_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_double_tap_enabled_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsDoubleTapEnabledProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_right_tap_enabled_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_right_tap_enabled_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsRightTapEnabledProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_holding_enabled_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_holding_enabled_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsHoldingEnabledProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_manipulation_mode_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_manipulation_mode_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ManipulationModeProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_pointer_captures_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_pointer_captures_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PointerCapturesProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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(&self, out: *mut *mut DependencyProperty) -> HRESULT }} impl IUIElementStatics2 { - #[inline] pub unsafe fn get_composite_mode_property(&self) -> Result> { + #[inline] pub fn get_composite_mode_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CompositeModeProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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] { @@ -4568,21 +4568,21 @@ RT_INTERFACE!{static interface IUIElementStatics3(IUIElementStatics3Vtbl): IInsp fn TryStartDirectManipulation(&self, value: *mut input::Pointer, out: *mut bool) -> HRESULT }} impl IUIElementStatics3 { - #[inline] pub unsafe fn get_transform3_dproperty(&self) -> Result> { + #[inline] pub fn get_transform3_dproperty(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Transform3DProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_can_drag_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_can_drag_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CanDragProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn try_start_direct_manipulation(&self, value: &input::Pointer) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn try_start_direct_manipulation(&self, value: &input::Pointer) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).TryStartDirectManipulation)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } 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] { @@ -4593,31 +4593,31 @@ RT_INTERFACE!{static interface IUIElementStatics4(IUIElementStatics4Vtbl): IInsp fn get_AccessKeyProperty(&self, out: *mut *mut DependencyProperty) -> HRESULT }} impl IUIElementStatics4 { - #[inline] pub unsafe fn get_context_flyout_property(&self) -> Result> { + #[inline] pub fn get_context_flyout_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ContextFlyoutProperty)(self as *const _ as *mut _, &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(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_exit_display_mode_on_access_key_invoked_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ExitDisplayModeOnAccessKeyInvokedProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_access_key_scope_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_access_key_scope_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsAccessKeyScopeProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_access_key_scope_owner_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_access_key_scope_owner_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AccessKeyScopeOwnerProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_access_key_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_access_key_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AccessKeyProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IUIElementStatics5, 1505590673, 36771, 19557, 186, 27, 64, 223, 56, 85, 108, 187); RT_INTERFACE!{static interface IUIElementStatics5(IUIElementStatics5Vtbl): IInspectable(IInspectableVtbl) [IID_IUIElementStatics5] { @@ -4634,61 +4634,61 @@ RT_INTERFACE!{static interface IUIElementStatics5(IUIElementStatics5Vtbl): IInsp fn get_TabFocusNavigationProperty(&self, out: *mut *mut DependencyProperty) -> HRESULT }} impl IUIElementStatics5 { - #[inline] pub unsafe fn get_lights_property(&self) -> Result> { + #[inline] pub fn get_lights_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LightsProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_key_tip_placement_mode_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_key_tip_placement_mode_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_KeyTipPlacementModeProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_key_tip_horizontal_offset_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_key_tip_horizontal_offset_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_KeyTipHorizontalOffsetProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_key_tip_vertical_offset_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_key_tip_vertical_offset_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_KeyTipVerticalOffsetProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_xyfocus_keyboard_navigation_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_xyfocus_keyboard_navigation_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_XYFocusKeyboardNavigationProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_xyfocus_up_navigation_strategy_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_xyfocus_up_navigation_strategy_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_XYFocusUpNavigationStrategyProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_xyfocus_down_navigation_strategy_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_xyfocus_down_navigation_strategy_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_XYFocusDownNavigationStrategyProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_xyfocus_left_navigation_strategy_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_xyfocus_left_navigation_strategy_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_XYFocusLeftNavigationStrategyProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_xyfocus_right_navigation_strategy_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_xyfocus_right_navigation_strategy_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_XYFocusRightNavigationStrategyProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_high_contrast_adjustment_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_high_contrast_adjustment_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HighContrastAdjustmentProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_tab_focus_navigation_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_tab_focus_navigation_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TabFocusNavigationProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IUIElementStatics6, 1685980087, 874, 19946, 149, 64, 29, 215, 253, 18, 102, 241); RT_INTERFACE!{static interface IUIElementStatics6(IUIElementStatics6Vtbl): IInspectable(IInspectableVtbl) [IID_IUIElementStatics6] { @@ -4697,21 +4697,21 @@ RT_INTERFACE!{static interface IUIElementStatics6(IUIElementStatics6Vtbl): IInsp fn get_NoFocusCandidateFoundEvent(&self, out: *mut *mut RoutedEvent) -> HRESULT }} impl IUIElementStatics6 { - #[inline] pub unsafe fn get_getting_focus_event(&self) -> Result> { + #[inline] pub fn get_getting_focus_event(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_GettingFocusEvent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_losing_focus_event(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_losing_focus_event(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LosingFocusEvent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_no_focus_candidate_found_event(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_no_focus_candidate_found_event(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NoFocusCandidateFoundEvent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IUIElementStatics7, 3667608723, 42645, 16709, 174, 147, 136, 128, 36, 57, 106, 15); RT_INTERFACE!{static interface IUIElementStatics7(IUIElementStatics7Vtbl): IInspectable(IInspectableVtbl) [IID_IUIElementStatics7] { @@ -4720,49 +4720,49 @@ RT_INTERFACE!{static interface IUIElementStatics7(IUIElementStatics7Vtbl): IInsp fn get_PreviewKeyUpEvent(&self, out: *mut *mut RoutedEvent) -> HRESULT }} impl IUIElementStatics7 { - #[inline] pub unsafe fn get_preview_key_down_event(&self) -> Result> { + #[inline] pub fn get_preview_key_down_event(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PreviewKeyDownEvent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_character_received_event(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_character_received_event(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CharacterReceivedEvent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_preview_key_up_event(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_preview_key_up_event(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PreviewKeyUpEvent)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, out: *mut super::super::foundation::HResult) -> HRESULT, + fn get_Exception(&self, out: *mut foundation::HResult) -> HRESULT, fn get_Message(&self, out: *mut HSTRING) -> HRESULT, fn get_Handled(&self, out: *mut bool) -> HRESULT, fn put_Handled(&self, value: bool) -> HRESULT }} impl IUnhandledExceptionEventArgs { - #[inline] pub unsafe fn get_exception(&self) -> Result { + #[inline] pub fn get_exception(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Exception)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_message(&self) -> Result { + }} + #[inline] pub fn get_message(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Message)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_handled(&self) -> Result { + }} + #[inline] pub fn get_handled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Handled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_handled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_handled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Handled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class UnhandledExceptionEventArgs: IUnhandledExceptionEventArgs} DEFINE_IID!(IID_UnhandledExceptionEventHandler, 2457134781, 18849, 18776, 190, 238, 208, 225, 149, 135, 182, 227); @@ -4770,10 +4770,10 @@ RT_DELEGATE!{delegate UnhandledExceptionEventHandler(UnhandledExceptionEventHand fn Invoke(&self, sender: *mut IInspectable, e: *mut UnhandledExceptionEventArgs) -> HRESULT }} impl UnhandledExceptionEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &IInspectable, e: &UnhandledExceptionEventArgs) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &IInspectable, e: &UnhandledExceptionEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, e as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_ENUM! { enum VerticalAlignment: i32 { Top (VerticalAlignment_Top) = 0, Center (VerticalAlignment_Center) = 1, Bottom (VerticalAlignment_Bottom) = 2, Stretch (VerticalAlignment_Stretch) = 3, @@ -4788,20 +4788,20 @@ RT_INTERFACE!{interface IVisualState(IVisualStateVtbl): IInspectable(IInspectabl fn put_Storyboard(&self, value: *mut media::animation::Storyboard) -> HRESULT }} impl IVisualState { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_storyboard(&self) -> Result> { + }} + #[inline] pub fn get_storyboard(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Storyboard)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_storyboard(&self, value: &media::animation::Storyboard) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_storyboard(&self, value: &media::animation::Storyboard) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Storyboard)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class VisualState: IVisualState} impl RtActivatable for VisualState {} @@ -4809,19 +4809,19 @@ DEFINE_CLSID!(VisualState(&[87,105,110,100,111,119,115,46,85,73,46,88,97,109,108 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(&self, out: *mut *mut SetterBaseCollection) -> HRESULT, - fn get_StateTriggers(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT + fn get_StateTriggers(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT }} impl IVisualState2 { - #[inline] pub unsafe fn get_setters(&self) -> Result> { + #[inline] pub fn get_setters(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Setters)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_state_triggers(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_state_triggers(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_StateTriggers)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } 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] { @@ -4833,33 +4833,33 @@ RT_INTERFACE!{interface IVisualStateChangedEventArgs(IVisualStateChangedEventArg fn put_Control(&self, value: *mut controls::Control) -> HRESULT }} impl IVisualStateChangedEventArgs { - #[inline] pub unsafe fn get_old_state(&self) -> Result> { + #[inline] pub fn get_old_state(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_OldState)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_old_state(&self, value: &VisualState) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_old_state(&self, value: &VisualState) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_OldState)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_new_state(&self) -> Result> { + }} + #[inline] pub fn get_new_state(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_NewState)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_new_state(&self, value: &VisualState) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_new_state(&self, value: &VisualState) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_NewState)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_control(&self) -> Result> { + }} + #[inline] pub fn get_control(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Control)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_control(&self, value: &controls::Control) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_control(&self, value: &controls::Control) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Control)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class VisualStateChangedEventArgs: IVisualStateChangedEventArgs} impl RtActivatable for VisualStateChangedEventArgs {} @@ -4869,61 +4869,61 @@ RT_DELEGATE!{delegate VisualStateChangedEventHandler(VisualStateChangedEventHand fn Invoke(&self, sender: *mut IInspectable, e: *mut VisualStateChangedEventArgs) -> HRESULT }} impl VisualStateChangedEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &IInspectable, e: &VisualStateChangedEventArgs) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &IInspectable, e: &VisualStateChangedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, e as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } 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(&self, out: *mut HSTRING) -> HRESULT, - fn get_Transitions(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, - fn get_States(&self, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn get_Transitions(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, + fn get_States(&self, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_CurrentState(&self, out: *mut *mut VisualState) -> HRESULT, - fn add_CurrentStateChanged(&self, value: *mut VisualStateChangedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CurrentStateChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_CurrentStateChanging(&self, value: *mut VisualStateChangedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_CurrentStateChanging(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT + fn add_CurrentStateChanged(&self, value: *mut VisualStateChangedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CurrentStateChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_CurrentStateChanging(&self, value: *mut VisualStateChangedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_CurrentStateChanging(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IVisualStateGroup { - #[inline] pub unsafe fn get_name(&self) -> Result { + #[inline] pub fn get_name(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Name)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_transitions(&self) -> Result>> { + }} + #[inline] pub fn get_transitions(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Transitions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_states(&self) -> Result>> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_states(&self) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_States)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_current_state(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_current_state(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CurrentState)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_current_state_changed(&self, value: &VisualStateChangedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_current_state_changed(&self, value: &VisualStateChangedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CurrentStateChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_current_state_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_current_state_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CurrentStateChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_current_state_changing(&self, value: &VisualStateChangedEventHandler) -> Result { + }} + #[inline] pub fn add_current_state_changing(&self, value: &VisualStateChangedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_CurrentStateChanging)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_current_state_changing(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_current_state_changing(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_CurrentStateChanging)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class VisualStateGroup: IVisualStateGroup} impl RtActivatable for VisualStateGroup {} @@ -4935,21 +4935,21 @@ RT_INTERFACE!{interface IVisualStateManager(IVisualStateManagerVtbl): IInspectab RT_CLASS!{class VisualStateManager: IVisualStateManager} impl RtActivatable for VisualStateManager {} impl VisualStateManager { - #[inline] pub fn get_visual_state_groups(obj: &FrameworkElement) -> Result>> { unsafe { + #[inline] pub fn get_visual_state_groups(obj: &FrameworkElement) -> Result>>> { >::get_activation_factory().get_visual_state_groups(obj) - }} - #[inline] pub fn get_custom_visual_state_manager_property() -> Result> { unsafe { + } + #[inline] pub fn get_custom_visual_state_manager_property() -> Result>> { >::get_activation_factory().get_custom_visual_state_manager_property() - }} - #[inline] pub fn get_custom_visual_state_manager(obj: &FrameworkElement) -> Result> { unsafe { + } + #[inline] pub fn get_custom_visual_state_manager(obj: &FrameworkElement) -> Result>> { >::get_activation_factory().get_custom_visual_state_manager(obj) - }} - #[inline] pub fn set_custom_visual_state_manager(obj: &FrameworkElement, value: &VisualStateManager) -> Result<()> { unsafe { + } + #[inline] pub fn set_custom_visual_state_manager(obj: &FrameworkElement, value: &VisualStateManager) -> Result<()> { >::get_activation_factory().set_custom_visual_state_manager(obj, value) - }} - #[inline] pub fn go_to_state(control: &controls::Control, stateName: &HStringArg, useTransitions: bool) -> Result { unsafe { + } + #[inline] pub fn go_to_state(control: &controls::Control, stateName: &HStringArg, useTransitions: bool) -> Result { >::get_activation_factory().go_to_state(control, stateName, useTransitions) - }} + } } DEFINE_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]) [CLSID_VisualStateManager]); DEFINE_IID!(IID_IVisualStateManagerFactory, 2246416637, 42357, 18358, 158, 48, 56, 60, 208, 133, 133, 242); @@ -4957,22 +4957,22 @@ RT_INTERFACE!{interface IVisualStateManagerFactory(IVisualStateManagerFactoryVtb fn CreateInstance(&self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut VisualStateManager) -> HRESULT }} impl IVisualStateManagerFactory { - #[inline] pub unsafe fn create_instance(&self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + #[inline] pub fn create_instance(&self, outer: &IInspectable) -> Result<(Option>, Option>)> { unsafe { let mut inner = null_mut(); let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self 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) } - } + if hr == S_OK { Ok((ComPtr::wrap_optional(inner), ComPtr::wrap_optional(out))) } else { err(hr) } + }} } 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(&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(&self, control: &controls::Control, templateRoot: &FrameworkElement, stateName: &HStringArg, group: &VisualStateGroup, state: &VisualState, useTransitions: bool) -> Result { + #[inline] pub fn go_to_state_core(&self, control: &controls::Control, templateRoot: &FrameworkElement, stateName: &HStringArg, group: &VisualStateGroup, state: &VisualState, useTransitions: bool) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GoToStateCore)(self as *const _ as *mut _, 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] { @@ -4980,48 +4980,48 @@ RT_INTERFACE!{interface IVisualStateManagerProtected(IVisualStateManagerProtecte fn RaiseCurrentStateChanged(&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(&self, stateGroup: &VisualStateGroup, oldState: &VisualState, newState: &VisualState, control: &controls::Control) -> Result<()> { + #[inline] pub fn raise_current_state_changing(&self, stateGroup: &VisualStateGroup, oldState: &VisualState, newState: &VisualState, control: &controls::Control) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RaiseCurrentStateChanging)(self as *const _ as *mut _, 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(&self, stateGroup: &VisualStateGroup, oldState: &VisualState, newState: &VisualState, control: &controls::Control) -> Result<()> { + }} + #[inline] pub fn raise_current_state_changed(&self, stateGroup: &VisualStateGroup, oldState: &VisualState, newState: &VisualState, control: &controls::Control) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).RaiseCurrentStateChanged)(self as *const _ as *mut _, 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(&self, obj: *mut FrameworkElement, out: *mut *mut super::super::foundation::collections::IVector) -> HRESULT, + fn GetVisualStateGroups(&self, obj: *mut FrameworkElement, out: *mut *mut foundation::collections::IVector) -> HRESULT, fn get_CustomVisualStateManagerProperty(&self, out: *mut *mut DependencyProperty) -> HRESULT, fn GetCustomVisualStateManager(&self, obj: *mut FrameworkElement, out: *mut *mut VisualStateManager) -> HRESULT, fn SetCustomVisualStateManager(&self, obj: *mut FrameworkElement, value: *mut VisualStateManager) -> HRESULT, fn GoToState(&self, control: *mut controls::Control, stateName: HSTRING, useTransitions: bool, out: *mut bool) -> HRESULT }} impl IVisualStateManagerStatics { - #[inline] pub unsafe fn get_visual_state_groups(&self, obj: &FrameworkElement) -> Result>> { + #[inline] pub fn get_visual_state_groups(&self, obj: &FrameworkElement) -> Result>>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetVisualStateGroups)(self as *const _ as *mut _, 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(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_custom_visual_state_manager_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CustomVisualStateManagerProperty)(self 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(&self, obj: &FrameworkElement) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_custom_visual_state_manager(&self, obj: &FrameworkElement) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).GetCustomVisualStateManager)(self as *const _ as *mut _, 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(&self, obj: &FrameworkElement, value: &VisualStateManager) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_custom_visual_state_manager(&self, obj: &FrameworkElement, value: &VisualStateManager) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetCustomVisualStateManager)(self as *const _ as *mut _, 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(&self, control: &controls::Control, stateName: &HStringArg, useTransitions: bool) -> Result { + }} + #[inline] pub fn go_to_state(&self, control: &controls::Control, stateName: &HStringArg, useTransitions: bool) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).GoToState)(self as *const _ as *mut _, control as *const _ as *mut _, stateName.get(), useTransitions, &mut out); if hr == S_OK { Ok(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] { @@ -5037,51 +5037,51 @@ RT_INTERFACE!{interface IVisualTransition(IVisualTransitionVtbl): IInspectable(I fn put_Storyboard(&self, value: *mut media::animation::Storyboard) -> HRESULT }} impl IVisualTransition { - #[inline] pub unsafe fn get_generated_duration(&self) -> Result { + #[inline] pub fn get_generated_duration(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_GeneratedDuration)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_generated_duration(&self, value: Duration) -> Result<()> { + }} + #[inline] pub fn set_generated_duration(&self, value: Duration) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_GeneratedDuration)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_generated_easing_function(&self) -> Result> { + }} + #[inline] pub fn get_generated_easing_function(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_GeneratedEasingFunction)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_generated_easing_function(&self, value: &media::animation::EasingFunctionBase) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_generated_easing_function(&self, value: &media::animation::EasingFunctionBase) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_GeneratedEasingFunction)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_to(&self) -> Result { + }} + #[inline] pub fn get_to(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_To)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_to(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_to(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_To)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_from(&self) -> Result { + }} + #[inline] pub fn get_from(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_From)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_from(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_from(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_From)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_storyboard(&self) -> Result> { + }} + #[inline] pub fn get_storyboard(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Storyboard)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_storyboard(&self, value: &media::animation::Storyboard) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_storyboard(&self, value: &media::animation::Storyboard) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Storyboard)(self as *const _ as *mut _, 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); @@ -5089,15 +5089,15 @@ RT_INTERFACE!{interface IVisualTransitionFactory(IVisualTransitionFactoryVtbl): fn CreateInstance(&self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut VisualTransition) -> HRESULT }} impl IVisualTransitionFactory { - #[inline] pub unsafe fn create_instance(&self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + #[inline] pub fn create_instance(&self, outer: &IInspectable) -> Result<(Option>, Option>)> { unsafe { let mut inner = null_mut(); let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self 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) } - } + if hr == S_OK { Ok((ComPtr::wrap_optional(inner), ComPtr::wrap_optional(out))) } 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(&self, out: *mut super::super::foundation::Rect) -> HRESULT, + fn get_Bounds(&self, out: *mut foundation::Rect) -> HRESULT, fn get_Visible(&self, out: *mut bool) -> HRESULT, fn get_Content(&self, out: *mut *mut UIElement) -> HRESULT, fn put_Content(&self, value: *mut UIElement) -> HRESULT, @@ -5105,98 +5105,98 @@ RT_INTERFACE!{interface IWindow(IWindowVtbl): IInspectable(IInspectableVtbl) [II #[cfg(feature="windows-ui")] fn get_CoreWindow(&self, out: *mut *mut super::core::CoreWindow) -> HRESULT, #[cfg(not(feature="windows-ui"))] fn __Dummy5(&self) -> (), #[cfg(feature="windows-ui")] fn get_Dispatcher(&self, out: *mut *mut super::core::CoreDispatcher) -> HRESULT, - fn add_Activated(&self, value: *mut WindowActivatedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Activated(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_Closed(&self, value: *mut WindowClosedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Closed(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_SizeChanged(&self, value: *mut WindowSizeChangedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SizeChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, - fn add_VisibilityChanged(&self, value: *mut WindowVisibilityChangedEventHandler, out: *mut super::super::foundation::EventRegistrationToken) -> HRESULT, - fn remove_VisibilityChanged(&self, token: super::super::foundation::EventRegistrationToken) -> HRESULT, + fn add_Activated(&self, value: *mut WindowActivatedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Activated(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Closed(&self, value: *mut WindowClosedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Closed(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_SizeChanged(&self, value: *mut WindowSizeChangedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SizeChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_VisibilityChanged(&self, value: *mut WindowVisibilityChangedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_VisibilityChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT, fn Activate(&self) -> HRESULT, fn Close(&self) -> HRESULT }} impl IWindow { - #[inline] pub unsafe fn get_bounds(&self) -> Result { + #[inline] pub fn get_bounds(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Bounds)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_visible(&self) -> Result { + }} + #[inline] pub fn get_visible(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Visible)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn get_content(&self) -> Result> { + }} + #[inline] pub fn get_content(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Content)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_content(&self, value: &UIElement) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_content(&self, value: &UIElement) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Content)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_core_window(&self) -> Result> { + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_core_window(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CoreWindow)(self 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(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[cfg(feature="windows-ui")] #[inline] pub fn get_dispatcher(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Dispatcher)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_activated(&self, value: &WindowActivatedEventHandler) -> Result { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_activated(&self, value: &WindowActivatedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Activated)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_activated(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_activated(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Activated)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_closed(&self, value: &WindowClosedEventHandler) -> Result { + }} + #[inline] pub fn add_closed(&self, value: &WindowClosedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Closed)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_closed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_closed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Closed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_size_changed(&self, value: &WindowSizeChangedEventHandler) -> Result { + }} + #[inline] pub fn add_size_changed(&self, value: &WindowSizeChangedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SizeChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_size_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_size_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SizeChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_visibility_changed(&self, value: &WindowVisibilityChangedEventHandler) -> Result { + }} + #[inline] pub fn add_visibility_changed(&self, value: &WindowVisibilityChangedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_VisibilityChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_visibility_changed(&self, token: super::super::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_visibility_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_VisibilityChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn activate(&self) -> Result<()> { + }} + #[inline] pub fn activate(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Activate)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn close(&self) -> Result<()> { + }} + #[inline] pub fn close(&self) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Close)(self as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Window: IWindow} impl RtActivatable for Window {} impl Window { - #[inline] pub fn get_current() -> Result> { unsafe { + #[inline] pub fn get_current() -> Result>> { >::get_activation_factory().get_current() - }} + } } DEFINE_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]) [CLSID_Window]); DEFINE_IID!(IID_IWindow2, 3548673439, 13558, 17538, 132, 53, 245, 82, 249, 178, 76, 200); @@ -5204,52 +5204,52 @@ RT_INTERFACE!{interface IWindow2(IWindow2Vtbl): IInspectable(IInspectableVtbl) [ fn SetTitleBar(&self, value: *mut UIElement) -> HRESULT }} impl IWindow2 { - #[inline] pub unsafe fn set_title_bar(&self, value: &UIElement) -> Result<()> { + #[inline] pub fn set_title_bar(&self, value: &UIElement) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).SetTitleBar)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IWindow3, 3071007901, 7221, 17962, 155, 151, 128, 141, 90, 249, 242, 142); RT_INTERFACE!{interface IWindow3(IWindow3Vtbl): IInspectable(IInspectableVtbl) [IID_IWindow3] { #[cfg(feature="windows-ui")] fn get_Compositor(&self, out: *mut *mut super::composition::Compositor) -> HRESULT }} impl IWindow3 { - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn get_compositor(&self) -> Result> { + #[cfg(feature="windows-ui")] #[inline] pub fn get_compositor(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Compositor)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } 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(&self, sender: *mut IInspectable, e: *mut super::core::WindowActivatedEventArgs) -> HRESULT }} impl WindowActivatedEventHandler { - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn invoke(&self, sender: &IInspectable, e: &super::core::WindowActivatedEventArgs) -> Result<()> { + #[cfg(feature="windows-ui")] #[inline] pub fn invoke(&self, sender: &IInspectable, e: &super::core::WindowActivatedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, 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(&self, sender: *mut IInspectable, e: *mut super::core::CoreWindowEventArgs) -> HRESULT }} impl WindowClosedEventHandler { - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn invoke(&self, sender: &IInspectable, e: &super::core::CoreWindowEventArgs) -> Result<()> { + #[cfg(feature="windows-ui")] #[inline] pub fn invoke(&self, sender: &IInspectable, e: &super::core::CoreWindowEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, e 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(&self, out: *mut *mut Window) -> HRESULT }} impl IWindowCreatedEventArgs { - #[inline] pub unsafe fn get_window(&self) -> Result> { + #[inline] pub fn get_window(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Window)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class WindowCreatedEventArgs: IWindowCreatedEventArgs} DEFINE_IID!(IID_WindowSizeChangedEventHandler, 1545717570, 11501, 20441, 186, 56, 113, 24, 212, 14, 150, 107); @@ -5257,31 +5257,31 @@ RT_DELEGATE!{delegate WindowSizeChangedEventHandler(WindowSizeChangedEventHandle #[cfg(feature="windows-ui")] fn Invoke(&self, sender: *mut IInspectable, e: *mut super::core::WindowSizeChangedEventArgs) -> HRESULT }} impl WindowSizeChangedEventHandler { - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn invoke(&self, sender: &IInspectable, e: &super::core::WindowSizeChangedEventArgs) -> Result<()> { + #[cfg(feature="windows-ui")] #[inline] pub fn invoke(&self, sender: &IInspectable, e: &super::core::WindowSizeChangedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, e as *const _ as *mut _); 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(&self, out: *mut *mut Window) -> HRESULT }} impl IWindowStatics { - #[inline] pub unsafe fn get_current(&self) -> Result> { + #[inline] pub fn get_current(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Current)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } 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(&self, sender: *mut IInspectable, e: *mut super::core::VisibilityChangedEventArgs) -> HRESULT }} impl WindowVisibilityChangedEventHandler { - #[cfg(feature="windows-ui")] #[inline] pub unsafe fn invoke(&self, sender: &IInspectable, e: &super::core::VisibilityChangedEventArgs) -> Result<()> { + #[cfg(feature="windows-ui")] #[inline] pub fn invoke(&self, sender: &IInspectable, e: &super::core::VisibilityChangedEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, e as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } pub mod controls { // Windows.UI.Xaml.Controls use ::prelude::*; @@ -5291,66 +5291,66 @@ RT_INTERFACE!{interface IAppBar(IAppBarVtbl): IInspectable(IInspectableVtbl) [II fn put_IsOpen(&self, value: bool) -> HRESULT, fn get_IsSticky(&self, out: *mut bool) -> HRESULT, fn put_IsSticky(&self, value: bool) -> HRESULT, - fn add_Opened(&self, value: *mut ::rt::gen::windows::foundation::EventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Opened(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_Closed(&self, value: *mut ::rt::gen::windows::foundation::EventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Closed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn add_Opened(&self, value: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Opened(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Closed(&self, value: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Closed(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IAppBar { - #[inline] pub unsafe fn get_is_open(&self) -> Result { + #[inline] pub fn get_is_open(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsOpen)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_open(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_open(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsOpen)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_sticky(&self) -> Result { + }} + #[inline] pub fn get_is_sticky(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSticky)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_sticky(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_sticky(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsSticky)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_opened(&self, value: &::rt::gen::windows::foundation::EventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_opened(&self, value: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Opened)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_opened(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_opened(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Opened)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_closed(&self, value: &::rt::gen::windows::foundation::EventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_closed(&self, value: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Closed)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_closed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_closed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Closed)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AppBar: IAppBar} impl RtActivatable for AppBar {} impl RtActivatable for AppBar {} impl RtActivatable for AppBar {} impl AppBar { - #[inline] pub fn get_is_open_property() -> Result> { unsafe { + #[inline] pub fn get_is_open_property() -> Result>> { >::get_activation_factory().get_is_open_property() - }} - #[inline] pub fn get_is_sticky_property() -> Result> { unsafe { + } + #[inline] pub fn get_is_sticky_property() -> Result>> { >::get_activation_factory().get_is_sticky_property() - }} - #[inline] pub fn get_closed_display_mode_property() -> Result> { unsafe { + } + #[inline] pub fn get_closed_display_mode_property() -> Result>> { >::get_activation_factory().get_closed_display_mode_property() - }} - #[inline] pub fn get_light_dismiss_overlay_mode_property() -> Result> { unsafe { + } + #[inline] pub fn get_light_dismiss_overlay_mode_property() -> Result>> { >::get_activation_factory().get_light_dismiss_overlay_mode_property() - }} + } } DEFINE_CLSID!(AppBar(&[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,65,112,112,66,97,114,0]) [CLSID_AppBar]); DEFINE_IID!(IID_IAppBar2, 3282769843, 31447, 18038, 153, 16, 127, 227, 240, 232, 233, 147); @@ -5359,48 +5359,48 @@ RT_INTERFACE!{interface IAppBar2(IAppBar2Vtbl): IInspectable(IInspectableVtbl) [ fn put_ClosedDisplayMode(&self, value: AppBarClosedDisplayMode) -> HRESULT }} impl IAppBar2 { - #[inline] pub unsafe fn get_closed_display_mode(&self) -> Result { + #[inline] pub fn get_closed_display_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ClosedDisplayMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_closed_display_mode(&self, value: AppBarClosedDisplayMode) -> Result<()> { + }} + #[inline] pub fn set_closed_display_mode(&self, value: AppBarClosedDisplayMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ClosedDisplayMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IAppBar3, 2552954911, 29998, 20090, 176, 85, 84, 128, 44, 158, 167, 73); RT_INTERFACE!{interface IAppBar3(IAppBar3Vtbl): IInspectable(IInspectableVtbl) [IID_IAppBar3] { fn get_TemplateSettings(&self, out: *mut *mut primitives::AppBarTemplateSettings) -> HRESULT, - fn add_Opening(&self, value: *mut ::rt::gen::windows::foundation::EventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Opening(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_Closing(&self, value: *mut ::rt::gen::windows::foundation::EventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_Closing(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn add_Opening(&self, value: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Opening(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_Closing(&self, value: *mut foundation::EventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_Closing(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IAppBar3 { - #[inline] pub unsafe fn get_template_settings(&self) -> Result> { + #[inline] pub fn get_template_settings(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TemplateSettings)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn add_opening(&self, value: &::rt::gen::windows::foundation::EventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn add_opening(&self, value: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Opening)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_opening(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_opening(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Opening)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_closing(&self, value: &::rt::gen::windows::foundation::EventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_closing(&self, value: &foundation::EventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_Closing)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_closing(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_closing(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_Closing)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IAppBar4, 2498480333, 2660, 19875, 191, 67, 241, 49, 0, 164, 102, 5); RT_INTERFACE!{interface IAppBar4(IAppBar4Vtbl): IInspectable(IInspectableVtbl) [IID_IAppBar4] { @@ -5408,15 +5408,15 @@ RT_INTERFACE!{interface IAppBar4(IAppBar4Vtbl): IInspectable(IInspectableVtbl) [ fn put_LightDismissOverlayMode(&self, value: LightDismissOverlayMode) -> HRESULT }} impl IAppBar4 { - #[inline] pub unsafe fn get_light_dismiss_overlay_mode(&self) -> Result { + #[inline] pub fn get_light_dismiss_overlay_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LightDismissOverlayMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_light_dismiss_overlay_mode(&self, value: LightDismissOverlayMode) -> Result<()> { + }} + #[inline] pub fn set_light_dismiss_overlay_mode(&self, value: LightDismissOverlayMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LightDismissOverlayMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IAppBarButton, 1146725457, 27112, 17420, 152, 150, 75, 180, 245, 246, 66, 209); RT_INTERFACE!{interface IAppBarButton(IAppBarButtonVtbl): IInspectable(IInspectableVtbl) [IID_IAppBarButton] { @@ -5426,47 +5426,47 @@ RT_INTERFACE!{interface IAppBarButton(IAppBarButtonVtbl): IInspectable(IInspecta fn put_Icon(&self, value: *mut IconElement) -> HRESULT }} impl IAppBarButton { - #[inline] pub unsafe fn get_label(&self) -> Result { + #[inline] pub fn get_label(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Label)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_label(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_label(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Label)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_icon(&self) -> Result> { + }} + #[inline] pub fn get_icon(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Icon)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_icon(&self, value: &IconElement) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_icon(&self, value: &IconElement) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Icon)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AppBarButton: IAppBarButton} impl RtActivatable for AppBarButton {} impl RtActivatable for AppBarButton {} impl AppBarButton { - #[inline] pub fn get_label_property() -> Result> { unsafe { + #[inline] pub fn get_label_property() -> Result>> { >::get_activation_factory().get_label_property() - }} - #[inline] pub fn get_icon_property() -> Result> { unsafe { + } + #[inline] pub fn get_icon_property() -> Result>> { >::get_activation_factory().get_icon_property() - }} - #[inline] pub fn get_is_compact_property() -> Result> { unsafe { + } + #[inline] pub fn get_is_compact_property() -> Result>> { >::get_activation_factory().get_is_compact_property() - }} - #[inline] pub fn get_label_position_property() -> Result> { unsafe { + } + #[inline] pub fn get_label_position_property() -> Result>> { >::get_activation_factory().get_label_position_property() - }} - #[inline] pub fn get_is_in_overflow_property() -> Result> { unsafe { + } + #[inline] pub fn get_is_in_overflow_property() -> Result>> { >::get_activation_factory().get_is_in_overflow_property() - }} - #[inline] pub fn get_dynamic_overflow_order_property() -> Result> { unsafe { + } + #[inline] pub fn get_dynamic_overflow_order_property() -> Result>> { >::get_activation_factory().get_dynamic_overflow_order_property() - }} + } } DEFINE_CLSID!(AppBarButton(&[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,65,112,112,66,97,114,66,117,116,116,111,110,0]) [CLSID_AppBarButton]); DEFINE_IID!(IID_IAppBarButton3, 187179344, 6539, 20100, 143, 28, 159, 106, 139, 162, 103, 167); @@ -5475,26 +5475,26 @@ RT_INTERFACE!{interface IAppBarButton3(IAppBarButton3Vtbl): IInspectable(IInspec fn put_LabelPosition(&self, value: CommandBarLabelPosition) -> HRESULT }} impl IAppBarButton3 { - #[inline] pub unsafe fn get_label_position(&self) -> Result { + #[inline] pub fn get_label_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LabelPosition)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_label_position(&self, value: CommandBarLabelPosition) -> Result<()> { + }} + #[inline] pub fn set_label_position(&self, value: CommandBarLabelPosition) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LabelPosition)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IAppBarButtonFactory, 3183156150, 52014, 17014, 171, 214, 121, 53, 19, 5, 16, 224); RT_INTERFACE!{interface IAppBarButtonFactory(IAppBarButtonFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAppBarButtonFactory] { fn CreateInstance(&self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut AppBarButton) -> HRESULT }} impl IAppBarButtonFactory { - #[inline] pub unsafe fn create_instance(&self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + #[inline] pub fn create_instance(&self, outer: &IInspectable) -> Result<(Option>, Option>)> { unsafe { let mut inner = null_mut(); let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self 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) } - } + if hr == S_OK { Ok((ComPtr::wrap_optional(inner), ComPtr::wrap_optional(out))) } else { err(hr) } + }} } DEFINE_IID!(IID_IAppBarButtonStatics, 2093814758, 21249, 16511, 135, 78, 220, 145, 96, 170, 7, 175); RT_INTERFACE!{static interface IAppBarButtonStatics(IAppBarButtonStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAppBarButtonStatics] { @@ -5503,21 +5503,21 @@ RT_INTERFACE!{static interface IAppBarButtonStatics(IAppBarButtonStaticsVtbl): I fn get_IsCompactProperty(&self, out: *mut *mut super::DependencyProperty) -> HRESULT }} impl IAppBarButtonStatics { - #[inline] pub unsafe fn get_label_property(&self) -> Result> { + #[inline] pub fn get_label_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LabelProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_icon_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_icon_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IconProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_compact_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_compact_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsCompactProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IAppBarButtonStatics3, 1299968788, 11998, 17192, 137, 6, 117, 42, 31, 39, 205, 250); RT_INTERFACE!{static interface IAppBarButtonStatics3(IAppBarButtonStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IAppBarButtonStatics3] { @@ -5526,21 +5526,21 @@ RT_INTERFACE!{static interface IAppBarButtonStatics3(IAppBarButtonStatics3Vtbl): fn get_DynamicOverflowOrderProperty(&self, out: *mut *mut super::DependencyProperty) -> HRESULT }} impl IAppBarButtonStatics3 { - #[inline] pub unsafe fn get_label_position_property(&self) -> Result> { + #[inline] pub fn get_label_position_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LabelPositionProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_in_overflow_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_in_overflow_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsInOverflowProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_dynamic_overflow_order_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_dynamic_overflow_order_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DynamicOverflowOrderProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum AppBarClosedDisplayMode: i32 { Compact (AppBarClosedDisplayMode_Compact) = 0, Minimal (AppBarClosedDisplayMode_Minimal) = 1, Hidden (AppBarClosedDisplayMode_Hidden) = 2, @@ -5550,11 +5550,11 @@ RT_INTERFACE!{interface IAppBarFactory(IAppBarFactoryVtbl): IInspectable(IInspec fn CreateInstance(&self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut AppBar) -> HRESULT }} impl IAppBarFactory { - #[inline] pub unsafe fn create_instance(&self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + #[inline] pub fn create_instance(&self, outer: &IInspectable) -> Result<(Option>, Option>)> { unsafe { let mut inner = null_mut(); let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self 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) } - } + if hr == S_OK { Ok((ComPtr::wrap_optional(inner), ComPtr::wrap_optional(out))) } else { err(hr) } + }} } DEFINE_IID!(IID_IAppBarOverrides, 4026787042, 31503, 20298, 151, 13, 174, 138, 14, 170, 155, 112); RT_INTERFACE!{interface IAppBarOverrides(IAppBarOverridesVtbl): IInspectable(IInspectableVtbl) [IID_IAppBarOverrides] { @@ -5562,14 +5562,14 @@ RT_INTERFACE!{interface IAppBarOverrides(IAppBarOverridesVtbl): IInspectable(IIn fn OnOpened(&self, e: *mut IInspectable) -> HRESULT }} impl IAppBarOverrides { - #[inline] pub unsafe fn on_closed(&self, e: &IInspectable) -> Result<()> { + #[inline] pub fn on_closed(&self, e: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnClosed)(self as *const _ as *mut _, e as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn on_opened(&self, e: &IInspectable) -> Result<()> { + }} + #[inline] pub fn on_opened(&self, e: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnOpened)(self as *const _ as *mut _, e as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IAppBarOverrides3, 1093385160, 20944, 19273, 171, 98, 163, 221, 107, 220, 178, 152); RT_INTERFACE!{interface IAppBarOverrides3(IAppBarOverrides3Vtbl): IInspectable(IInspectableVtbl) [IID_IAppBarOverrides3] { @@ -5577,14 +5577,14 @@ RT_INTERFACE!{interface IAppBarOverrides3(IAppBarOverrides3Vtbl): IInspectable(I fn OnOpening(&self, e: *mut IInspectable) -> HRESULT }} impl IAppBarOverrides3 { - #[inline] pub unsafe fn on_closing(&self, e: &IInspectable) -> Result<()> { + #[inline] pub fn on_closing(&self, e: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnClosing)(self as *const _ as *mut _, e as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn on_opening(&self, e: &IInspectable) -> Result<()> { + }} + #[inline] pub fn on_opening(&self, e: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).OnOpening)(self as *const _ as *mut _, e as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IAppBarSeparator, 453481889, 7105, 19795, 149, 234, 251, 10, 44, 204, 201, 5); RT_INTERFACE!{interface IAppBarSeparator(IAppBarSeparatorVtbl): IInspectable(IInspectableVtbl) [IID_IAppBarSeparator] { @@ -5594,15 +5594,15 @@ RT_CLASS!{class AppBarSeparator: IAppBarSeparator} impl RtActivatable for AppBarSeparator {} impl RtActivatable for AppBarSeparator {} impl AppBarSeparator { - #[inline] pub fn get_is_compact_property() -> Result> { unsafe { + #[inline] pub fn get_is_compact_property() -> Result>> { >::get_activation_factory().get_is_compact_property() - }} - #[inline] pub fn get_is_in_overflow_property() -> Result> { unsafe { + } + #[inline] pub fn get_is_in_overflow_property() -> Result>> { >::get_activation_factory().get_is_in_overflow_property() - }} - #[inline] pub fn get_dynamic_overflow_order_property() -> Result> { unsafe { + } + #[inline] pub fn get_dynamic_overflow_order_property() -> Result>> { >::get_activation_factory().get_dynamic_overflow_order_property() - }} + } } DEFINE_CLSID!(AppBarSeparator(&[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,65,112,112,66,97,114,83,101,112,97,114,97,116,111,114,0]) [CLSID_AppBarSeparator]); DEFINE_IID!(IID_IAppBarSeparatorFactory, 98182605, 62471, 18654, 139, 80, 255, 135, 209, 226, 129, 143); @@ -5610,22 +5610,22 @@ RT_INTERFACE!{interface IAppBarSeparatorFactory(IAppBarSeparatorFactoryVtbl): II fn CreateInstance(&self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut AppBarSeparator) -> HRESULT }} impl IAppBarSeparatorFactory { - #[inline] pub unsafe fn create_instance(&self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + #[inline] pub fn create_instance(&self, outer: &IInspectable) -> Result<(Option>, Option>)> { unsafe { let mut inner = null_mut(); let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self 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) } - } + if hr == S_OK { Ok((ComPtr::wrap_optional(inner), ComPtr::wrap_optional(out))) } else { err(hr) } + }} } DEFINE_IID!(IID_IAppBarSeparatorStatics, 938620036, 23349, 18019, 167, 93, 242, 213, 12, 185, 198, 25); RT_INTERFACE!{static interface IAppBarSeparatorStatics(IAppBarSeparatorStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAppBarSeparatorStatics] { fn get_IsCompactProperty(&self, out: *mut *mut super::DependencyProperty) -> HRESULT }} impl IAppBarSeparatorStatics { - #[inline] pub unsafe fn get_is_compact_property(&self) -> Result> { + #[inline] pub fn get_is_compact_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsCompactProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IAppBarSeparatorStatics3, 919032825, 29555, 20062, 155, 164, 195, 98, 42, 0, 60, 78); RT_INTERFACE!{static interface IAppBarSeparatorStatics3(IAppBarSeparatorStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IAppBarSeparatorStatics3] { @@ -5633,16 +5633,16 @@ RT_INTERFACE!{static interface IAppBarSeparatorStatics3(IAppBarSeparatorStatics3 fn get_DynamicOverflowOrderProperty(&self, out: *mut *mut super::DependencyProperty) -> HRESULT }} impl IAppBarSeparatorStatics3 { - #[inline] pub unsafe fn get_is_in_overflow_property(&self) -> Result> { + #[inline] pub fn get_is_in_overflow_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsInOverflowProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_dynamic_overflow_order_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_dynamic_overflow_order_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DynamicOverflowOrderProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IAppBarStatics, 2042330765, 56489, 19295, 164, 72, 55, 177, 50, 56, 237, 118); RT_INTERFACE!{static interface IAppBarStatics(IAppBarStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAppBarStatics] { @@ -5650,38 +5650,38 @@ RT_INTERFACE!{static interface IAppBarStatics(IAppBarStaticsVtbl): IInspectable( fn get_IsStickyProperty(&self, out: *mut *mut super::DependencyProperty) -> HRESULT }} impl IAppBarStatics { - #[inline] pub unsafe fn get_is_open_property(&self) -> Result> { + #[inline] pub fn get_is_open_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsOpenProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_sticky_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_sticky_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsStickyProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IAppBarStatics2, 572741097, 900, 18910, 135, 56, 223, 201, 212, 9, 172, 93); RT_INTERFACE!{static interface IAppBarStatics2(IAppBarStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IAppBarStatics2] { fn get_ClosedDisplayModeProperty(&self, out: *mut *mut super::DependencyProperty) -> HRESULT }} impl IAppBarStatics2 { - #[inline] pub unsafe fn get_closed_display_mode_property(&self) -> Result> { + #[inline] pub fn get_closed_display_mode_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ClosedDisplayModeProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IAppBarStatics4, 3120695342, 4453, 17489, 148, 179, 235, 58, 199, 62, 65, 150); RT_INTERFACE!{static interface IAppBarStatics4(IAppBarStatics4Vtbl): IInspectable(IInspectableVtbl) [IID_IAppBarStatics4] { fn get_LightDismissOverlayModeProperty(&self, out: *mut *mut super::DependencyProperty) -> HRESULT }} impl IAppBarStatics4 { - #[inline] pub unsafe fn get_light_dismiss_overlay_mode_property(&self) -> Result> { + #[inline] pub fn get_light_dismiss_overlay_mode_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LightDismissOverlayModeProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IAppBarToggleButton, 781272120, 64851, 19341, 133, 139, 54, 68, 38, 159, 142, 77); RT_INTERFACE!{interface IAppBarToggleButton(IAppBarToggleButtonVtbl): IInspectable(IInspectableVtbl) [IID_IAppBarToggleButton] { @@ -5691,47 +5691,47 @@ RT_INTERFACE!{interface IAppBarToggleButton(IAppBarToggleButtonVtbl): IInspectab fn put_Icon(&self, value: *mut IconElement) -> HRESULT }} impl IAppBarToggleButton { - #[inline] pub unsafe fn get_label(&self) -> Result { + #[inline] pub fn get_label(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Label)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_label(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_label(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Label)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_icon(&self) -> Result> { + }} + #[inline] pub fn get_icon(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Icon)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_icon(&self, value: &IconElement) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_icon(&self, value: &IconElement) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Icon)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AppBarToggleButton: IAppBarToggleButton} impl RtActivatable for AppBarToggleButton {} impl RtActivatable for AppBarToggleButton {} impl AppBarToggleButton { - #[inline] pub fn get_label_property() -> Result> { unsafe { + #[inline] pub fn get_label_property() -> Result>> { >::get_activation_factory().get_label_property() - }} - #[inline] pub fn get_icon_property() -> Result> { unsafe { + } + #[inline] pub fn get_icon_property() -> Result>> { >::get_activation_factory().get_icon_property() - }} - #[inline] pub fn get_is_compact_property() -> Result> { unsafe { + } + #[inline] pub fn get_is_compact_property() -> Result>> { >::get_activation_factory().get_is_compact_property() - }} - #[inline] pub fn get_label_position_property() -> Result> { unsafe { + } + #[inline] pub fn get_label_position_property() -> Result>> { >::get_activation_factory().get_label_position_property() - }} - #[inline] pub fn get_is_in_overflow_property() -> Result> { unsafe { + } + #[inline] pub fn get_is_in_overflow_property() -> Result>> { >::get_activation_factory().get_is_in_overflow_property() - }} - #[inline] pub fn get_dynamic_overflow_order_property() -> Result> { unsafe { + } + #[inline] pub fn get_dynamic_overflow_order_property() -> Result>> { >::get_activation_factory().get_dynamic_overflow_order_property() - }} + } } DEFINE_CLSID!(AppBarToggleButton(&[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,65,112,112,66,97,114,84,111,103,103,108,101,66,117,116,116,111,110,0]) [CLSID_AppBarToggleButton]); DEFINE_IID!(IID_IAppBarToggleButton3, 4019881445, 5887, 19826, 185, 232, 155, 134, 30, 175, 132, 168); @@ -5740,26 +5740,26 @@ RT_INTERFACE!{interface IAppBarToggleButton3(IAppBarToggleButton3Vtbl): IInspect fn put_LabelPosition(&self, value: CommandBarLabelPosition) -> HRESULT }} impl IAppBarToggleButton3 { - #[inline] pub unsafe fn get_label_position(&self) -> Result { + #[inline] pub fn get_label_position(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LabelPosition)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_label_position(&self, value: CommandBarLabelPosition) -> Result<()> { + }} + #[inline] pub fn set_label_position(&self, value: CommandBarLabelPosition) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LabelPosition)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IAppBarToggleButtonFactory, 42641364, 36692, 17830, 159, 144, 19, 96, 86, 86, 215, 147); RT_INTERFACE!{interface IAppBarToggleButtonFactory(IAppBarToggleButtonFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IAppBarToggleButtonFactory] { fn CreateInstance(&self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut AppBarToggleButton) -> HRESULT }} impl IAppBarToggleButtonFactory { - #[inline] pub unsafe fn create_instance(&self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + #[inline] pub fn create_instance(&self, outer: &IInspectable) -> Result<(Option>, Option>)> { unsafe { let mut inner = null_mut(); let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self 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) } - } + if hr == S_OK { Ok((ComPtr::wrap_optional(inner), ComPtr::wrap_optional(out))) } else { err(hr) } + }} } DEFINE_IID!(IID_IAppBarToggleButtonStatics, 4267356054, 31017, 19873, 170, 103, 205, 223, 115, 163, 228, 181); RT_INTERFACE!{static interface IAppBarToggleButtonStatics(IAppBarToggleButtonStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IAppBarToggleButtonStatics] { @@ -5768,21 +5768,21 @@ RT_INTERFACE!{static interface IAppBarToggleButtonStatics(IAppBarToggleButtonSta fn get_IsCompactProperty(&self, out: *mut *mut super::DependencyProperty) -> HRESULT }} impl IAppBarToggleButtonStatics { - #[inline] pub unsafe fn get_label_property(&self) -> Result> { + #[inline] pub fn get_label_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LabelProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_icon_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_icon_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IconProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_compact_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_compact_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsCompactProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IAppBarToggleButtonStatics3, 3175900607, 11997, 17617, 172, 213, 53, 192, 14, 47, 33, 188); RT_INTERFACE!{static interface IAppBarToggleButtonStatics3(IAppBarToggleButtonStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IAppBarToggleButtonStatics3] { @@ -5791,21 +5791,21 @@ RT_INTERFACE!{static interface IAppBarToggleButtonStatics3(IAppBarToggleButtonSt fn get_DynamicOverflowOrderProperty(&self, out: *mut *mut super::DependencyProperty) -> HRESULT }} impl IAppBarToggleButtonStatics3 { - #[inline] pub unsafe fn get_label_position_property(&self) -> Result> { + #[inline] pub fn get_label_position_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LabelPositionProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_in_overflow_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_in_overflow_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsInOverflowProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_dynamic_overflow_order_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_dynamic_overflow_order_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_DynamicOverflowOrderProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IAutoSuggestBox, 272538387, 13312, 18966, 144, 185, 105, 18, 191, 6, 151, 79); RT_INTERFACE!{interface IAutoSuggestBox(IAutoSuggestBoxVtbl): IInspectable(IInspectableVtbl) [IID_IAutoSuggestBox] { @@ -5827,111 +5827,111 @@ RT_INTERFACE!{interface IAutoSuggestBox(IAutoSuggestBoxVtbl): IInspectable(IInsp fn put_AutoMaximizeSuggestionArea(&self, value: bool) -> HRESULT, fn get_TextBoxStyle(&self, out: *mut *mut super::Style) -> HRESULT, fn put_TextBoxStyle(&self, value: *mut super::Style) -> HRESULT, - fn add_SuggestionChosen(&self, value: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_SuggestionChosen(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn add_TextChanged(&self, value: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_TextChanged(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn add_SuggestionChosen(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_SuggestionChosen(&self, token: foundation::EventRegistrationToken) -> HRESULT, + fn add_TextChanged(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_TextChanged(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IAutoSuggestBox { - #[inline] pub unsafe fn get_max_suggestion_list_height(&self) -> Result { + #[inline] pub fn get_max_suggestion_list_height(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_MaxSuggestionListHeight)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_max_suggestion_list_height(&self, value: f64) -> Result<()> { + }} + #[inline] pub fn set_max_suggestion_list_height(&self, value: f64) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_MaxSuggestionListHeight)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_suggestion_list_open(&self) -> Result { + }} + #[inline] pub fn get_is_suggestion_list_open(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_IsSuggestionListOpen)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_is_suggestion_list_open(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_is_suggestion_list_open(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_IsSuggestionListOpen)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_text_member_path(&self) -> Result { + }} + #[inline] pub fn get_text_member_path(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TextMemberPath)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_text_member_path(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_text_member_path(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TextMemberPath)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_text(&self) -> Result { + }} + #[inline] pub fn get_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Text)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_text(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_text(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Text)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_update_text_on_select(&self) -> Result { + }} + #[inline] pub fn get_update_text_on_select(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_UpdateTextOnSelect)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_update_text_on_select(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_update_text_on_select(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_UpdateTextOnSelect)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_placeholder_text(&self) -> Result { + }} + #[inline] pub fn get_placeholder_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PlaceholderText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_placeholder_text(&self, value: &HStringArg) -> Result<()> { + }} + #[inline] pub fn set_placeholder_text(&self, value: &HStringArg) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_PlaceholderText)(self as *const _ as *mut _, value.get()); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_header(&self) -> Result> { + }} + #[inline] pub fn get_header(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Header)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_header(&self, value: &IInspectable) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_header(&self, value: &IInspectable) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Header)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_auto_maximize_suggestion_area(&self) -> Result { + }} + #[inline] pub fn get_auto_maximize_suggestion_area(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_AutoMaximizeSuggestionArea)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_auto_maximize_suggestion_area(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_auto_maximize_suggestion_area(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_AutoMaximizeSuggestionArea)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_text_box_style(&self) -> Result> { + }} + #[inline] pub fn get_text_box_style(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TextBoxStyle)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_text_box_style(&self, value: &super::Style) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_text_box_style(&self, value: &super::Style) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_TextBoxStyle)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_suggestion_chosen(&self, value: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_suggestion_chosen(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_SuggestionChosen)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_suggestion_chosen(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_suggestion_chosen(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_SuggestionChosen)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_text_changed(&self, value: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_text_changed(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_TextChanged)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_text_changed(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_text_changed(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_TextChanged)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class AutoSuggestBox: IAutoSuggestBox} impl RtActivatable for AutoSuggestBox {} @@ -5939,67 +5939,67 @@ impl RtActivatable for AutoSuggestBox {} impl RtActivatable for AutoSuggestBox {} impl RtActivatable for AutoSuggestBox {} impl AutoSuggestBox { - #[inline] pub fn get_max_suggestion_list_height_property() -> Result> { unsafe { + #[inline] pub fn get_max_suggestion_list_height_property() -> Result>> { >::get_activation_factory().get_max_suggestion_list_height_property() - }} - #[inline] pub fn get_is_suggestion_list_open_property() -> Result> { unsafe { + } + #[inline] pub fn get_is_suggestion_list_open_property() -> Result>> { >::get_activation_factory().get_is_suggestion_list_open_property() - }} - #[inline] pub fn get_text_member_path_property() -> Result> { unsafe { + } + #[inline] pub fn get_text_member_path_property() -> Result>> { >::get_activation_factory().get_text_member_path_property() - }} - #[inline] pub fn get_text_property() -> Result> { unsafe { + } + #[inline] pub fn get_text_property() -> Result>> { >::get_activation_factory().get_text_property() - }} - #[inline] pub fn get_update_text_on_select_property() -> Result> { unsafe { + } + #[inline] pub fn get_update_text_on_select_property() -> Result>> { >::get_activation_factory().get_update_text_on_select_property() - }} - #[inline] pub fn get_placeholder_text_property() -> Result> { unsafe { + } + #[inline] pub fn get_placeholder_text_property() -> Result>> { >::get_activation_factory().get_placeholder_text_property() - }} - #[inline] pub fn get_header_property() -> Result> { unsafe { + } + #[inline] pub fn get_header_property() -> Result>> { >::get_activation_factory().get_header_property() - }} - #[inline] pub fn get_auto_maximize_suggestion_area_property() -> Result> { unsafe { + } + #[inline] pub fn get_auto_maximize_suggestion_area_property() -> Result>> { >::get_activation_factory().get_auto_maximize_suggestion_area_property() - }} - #[inline] pub fn get_text_box_style_property() -> Result> { unsafe { + } + #[inline] pub fn get_text_box_style_property() -> Result>> { >::get_activation_factory().get_text_box_style_property() - }} - #[inline] pub fn get_query_icon_property() -> Result> { unsafe { + } + #[inline] pub fn get_query_icon_property() -> Result>> { >::get_activation_factory().get_query_icon_property() - }} - #[inline] pub fn get_light_dismiss_overlay_mode_property() -> Result> { unsafe { + } + #[inline] pub fn get_light_dismiss_overlay_mode_property() -> Result>> { >::get_activation_factory().get_light_dismiss_overlay_mode_property() - }} + } } DEFINE_CLSID!(AutoSuggestBox(&[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,65,117,116,111,83,117,103,103,101,115,116,66,111,120,0]) [CLSID_AutoSuggestBox]); DEFINE_IID!(IID_IAutoSuggestBox2, 2861030878, 59001, 17842, 167, 201, 154, 237, 195, 157, 184, 134); RT_INTERFACE!{interface IAutoSuggestBox2(IAutoSuggestBox2Vtbl): IInspectable(IInspectableVtbl) [IID_IAutoSuggestBox2] { fn get_QueryIcon(&self, out: *mut *mut IconElement) -> HRESULT, fn put_QueryIcon(&self, value: *mut IconElement) -> HRESULT, - fn add_QuerySubmitted(&self, value: *mut ::rt::gen::windows::foundation::TypedEventHandler, out: *mut ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT, - fn remove_QuerySubmitted(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> HRESULT + fn add_QuerySubmitted(&self, value: *mut foundation::TypedEventHandler, out: *mut foundation::EventRegistrationToken) -> HRESULT, + fn remove_QuerySubmitted(&self, token: foundation::EventRegistrationToken) -> HRESULT }} impl IAutoSuggestBox2 { - #[inline] pub unsafe fn get_query_icon(&self) -> Result> { + #[inline] pub fn get_query_icon(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_QueryIcon)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_query_icon(&self, value: &IconElement) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_query_icon(&self, value: &IconElement) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_QueryIcon)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn add_query_submitted(&self, value: &::rt::gen::windows::foundation::TypedEventHandler) -> Result<::rt::gen::windows::foundation::EventRegistrationToken> { + }} + #[inline] pub fn add_query_submitted(&self, value: &foundation::TypedEventHandler) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).add_QuerySubmitted)(self as *const _ as *mut _, value as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn remove_query_submitted(&self, token: ::rt::gen::windows::foundation::EventRegistrationToken) -> Result<()> { + }} + #[inline] pub fn remove_query_submitted(&self, token: foundation::EventRegistrationToken) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).remove_QuerySubmitted)(self as *const _ as *mut _, token); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IAutoSuggestBox3, 2612788463, 62253, 16430, 144, 9, 5, 189, 186, 246, 51, 110); RT_INTERFACE!{interface IAutoSuggestBox3(IAutoSuggestBox3Vtbl): IInspectable(IInspectableVtbl) [IID_IAutoSuggestBox3] { @@ -6007,15 +6007,15 @@ RT_INTERFACE!{interface IAutoSuggestBox3(IAutoSuggestBox3Vtbl): IInspectable(IIn fn put_LightDismissOverlayMode(&self, value: LightDismissOverlayMode) -> HRESULT }} impl IAutoSuggestBox3 { - #[inline] pub unsafe fn get_light_dismiss_overlay_mode(&self) -> Result { + #[inline] pub fn get_light_dismiss_overlay_mode(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_LightDismissOverlayMode)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_light_dismiss_overlay_mode(&self, value: LightDismissOverlayMode) -> Result<()> { + }} + #[inline] pub fn set_light_dismiss_overlay_mode(&self, value: LightDismissOverlayMode) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_LightDismissOverlayMode)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IAutoSuggestBoxQuerySubmittedEventArgs, 2027729174, 33162, 19637, 188, 167, 56, 44, 230, 221, 201, 13); RT_INTERFACE!{interface IAutoSuggestBoxQuerySubmittedEventArgs(IAutoSuggestBoxQuerySubmittedEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAutoSuggestBoxQuerySubmittedEventArgs] { @@ -6023,16 +6023,16 @@ RT_INTERFACE!{interface IAutoSuggestBoxQuerySubmittedEventArgs(IAutoSuggestBoxQu fn get_ChosenSuggestion(&self, out: *mut *mut IInspectable) -> HRESULT }} impl IAutoSuggestBoxQuerySubmittedEventArgs { - #[inline] pub unsafe fn get_query_text(&self) -> Result { + #[inline] pub fn get_query_text(&self) -> Result { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_QueryText)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(HString::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_chosen_suggestion(&self) -> Result> { + }} + #[inline] pub fn get_chosen_suggestion(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ChosenSuggestion)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AutoSuggestBoxQuerySubmittedEventArgs: IAutoSuggestBoxQuerySubmittedEventArgs} impl RtActivatable for AutoSuggestBoxQuerySubmittedEventArgs {} @@ -6050,84 +6050,84 @@ RT_INTERFACE!{static interface IAutoSuggestBoxStatics(IAutoSuggestBoxStaticsVtbl fn get_TextBoxStyleProperty(&self, out: *mut *mut super::DependencyProperty) -> HRESULT }} impl IAutoSuggestBoxStatics { - #[inline] pub unsafe fn get_max_suggestion_list_height_property(&self) -> Result> { + #[inline] pub fn get_max_suggestion_list_height_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_MaxSuggestionListHeightProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_is_suggestion_list_open_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_is_suggestion_list_open_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_IsSuggestionListOpenProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_text_member_path_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_text_member_path_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TextMemberPathProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_text_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_text_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TextProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_update_text_on_select_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_update_text_on_select_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UpdateTextOnSelectProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_placeholder_text_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_placeholder_text_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PlaceholderTextProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_header_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_header_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_HeaderProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_auto_maximize_suggestion_area_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_auto_maximize_suggestion_area_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_AutoMaximizeSuggestionAreaProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_text_box_style_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_text_box_style_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_TextBoxStyleProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IAutoSuggestBoxStatics2, 483563432, 36458, 16879, 169, 93, 113, 87, 220, 12, 113, 6); RT_INTERFACE!{static interface IAutoSuggestBoxStatics2(IAutoSuggestBoxStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IAutoSuggestBoxStatics2] { fn get_QueryIconProperty(&self, out: *mut *mut super::DependencyProperty) -> HRESULT }} impl IAutoSuggestBoxStatics2 { - #[inline] pub unsafe fn get_query_icon_property(&self) -> Result> { + #[inline] pub fn get_query_icon_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_QueryIconProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IAutoSuggestBoxStatics3, 753586909, 50389, 19122, 138, 19, 175, 221, 207, 6, 124, 134); RT_INTERFACE!{static interface IAutoSuggestBoxStatics3(IAutoSuggestBoxStatics3Vtbl): IInspectable(IInspectableVtbl) [IID_IAutoSuggestBoxStatics3] { fn get_LightDismissOverlayModeProperty(&self, out: *mut *mut super::DependencyProperty) -> HRESULT }} impl IAutoSuggestBoxStatics3 { - #[inline] pub unsafe fn get_light_dismiss_overlay_mode_property(&self) -> Result> { + #[inline] pub fn get_light_dismiss_overlay_mode_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_LightDismissOverlayModeProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IAutoSuggestBoxSuggestionChosenEventArgs, 963605076, 7893, 19397, 160, 96, 101, 85, 48, 188, 166, 186); RT_INTERFACE!{interface IAutoSuggestBoxSuggestionChosenEventArgs(IAutoSuggestBoxSuggestionChosenEventArgsVtbl): IInspectable(IInspectableVtbl) [IID_IAutoSuggestBoxSuggestionChosenEventArgs] { fn get_SelectedItem(&self, out: *mut *mut IInspectable) -> HRESULT }} impl IAutoSuggestBoxSuggestionChosenEventArgs { - #[inline] pub unsafe fn get_selected_item(&self) -> Result> { + #[inline] pub fn get_selected_item(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_SelectedItem)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_CLASS!{class AutoSuggestBoxSuggestionChosenEventArgs: IAutoSuggestBoxSuggestionChosenEventArgs} impl RtActivatable for AutoSuggestBoxSuggestionChosenEventArgs {} @@ -6139,28 +6139,28 @@ RT_INTERFACE!{interface IAutoSuggestBoxTextChangedEventArgs(IAutoSuggestBoxTextC fn CheckCurrent(&self, out: *mut bool) -> HRESULT }} impl IAutoSuggestBoxTextChangedEventArgs { - #[inline] pub unsafe fn get_reason(&self) -> Result { + #[inline] pub fn get_reason(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Reason)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_reason(&self, value: AutoSuggestionBoxTextChangeReason) -> Result<()> { + }} + #[inline] pub fn set_reason(&self, value: AutoSuggestionBoxTextChangeReason) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Reason)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn check_current(&self) -> Result { + }} + #[inline] pub fn check_current(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).CheckCurrent)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } + }} } RT_CLASS!{class AutoSuggestBoxTextChangedEventArgs: IAutoSuggestBoxTextChangedEventArgs} impl RtActivatable for AutoSuggestBoxTextChangedEventArgs {} impl RtActivatable for AutoSuggestBoxTextChangedEventArgs {} impl AutoSuggestBoxTextChangedEventArgs { - #[inline] pub fn get_reason_property() -> Result> { unsafe { + #[inline] pub fn get_reason_property() -> Result>> { >::get_activation_factory().get_reason_property() - }} + } } DEFINE_CLSID!(AutoSuggestBoxTextChangedEventArgs(&[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,65,117,116,111,83,117,103,103,101,115,116,66,111,120,84,101,120,116,67,104,97,110,103,101,100,69,118,101,110,116,65,114,103,115,0]) [CLSID_AutoSuggestBoxTextChangedEventArgs]); DEFINE_IID!(IID_IAutoSuggestBoxTextChangedEventArgsStatics, 4277630763, 40773, 17627, 140, 39, 189, 163, 249, 51, 231, 181); @@ -6168,11 +6168,11 @@ RT_INTERFACE!{static interface IAutoSuggestBoxTextChangedEventArgsStatics(IAutoS fn get_ReasonProperty(&self, out: *mut *mut super::DependencyProperty) -> HRESULT }} impl IAutoSuggestBoxTextChangedEventArgsStatics { - #[inline] pub unsafe fn get_reason_property(&self) -> Result> { + #[inline] pub fn get_reason_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ReasonProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } RT_ENUM! { enum AutoSuggestionBoxTextChangeReason: i32 { UserInput (AutoSuggestionBoxTextChangeReason_UserInput) = 0, ProgrammaticChange (AutoSuggestionBoxTextChangeReason_ProgrammaticChange) = 1, SuggestionChosen (AutoSuggestionBoxTextChangeReason_SuggestionChosen) = 2, @@ -6183,15 +6183,15 @@ RT_INTERFACE!{interface IBackClickEventArgs(IBackClickEventArgsVtbl): IInspectab fn put_Handled(&self, value: bool) -> HRESULT }} impl IBackClickEventArgs { - #[inline] pub unsafe fn get_handled(&self) -> Result { + #[inline] pub fn get_handled(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Handled)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_handled(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_handled(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Handled)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class BackClickEventArgs: IBackClickEventArgs} impl RtActivatable for BackClickEventArgs {} @@ -6201,37 +6201,37 @@ RT_DELEGATE!{delegate BackClickEventHandler(BackClickEventHandlerVtbl, BackClick fn Invoke(&self, sender: *mut IInspectable, e: *mut BackClickEventArgs) -> HRESULT }} impl BackClickEventHandler { - #[inline] pub unsafe fn invoke(&self, sender: &IInspectable, e: &BackClickEventArgs) -> Result<()> { + #[inline] pub fn invoke(&self, sender: &IInspectable, e: &BackClickEventArgs) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).Invoke)(self as *const _ as *mut _, sender as *const _ as *mut _, e as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IBitmapIcon, 3908966347, 13815, 16627, 161, 133, 72, 179, 151, 183, 62, 104); RT_INTERFACE!{interface IBitmapIcon(IBitmapIconVtbl): IInspectable(IInspectableVtbl) [IID_IBitmapIcon] { - fn get_UriSource(&self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, - fn put_UriSource(&self, value: *mut ::rt::gen::windows::foundation::Uri) -> HRESULT + fn get_UriSource(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_UriSource(&self, value: *mut foundation::Uri) -> HRESULT }} impl IBitmapIcon { - #[inline] pub unsafe fn get_uri_source(&self) -> Result> { + #[inline] pub fn get_uri_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UriSource)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_uri_source(&self, value: &::rt::gen::windows::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_uri_source(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_UriSource)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class BitmapIcon: IBitmapIcon} impl RtActivatable for BitmapIcon {} impl RtActivatable for BitmapIcon {} impl BitmapIcon { - #[inline] pub fn get_uri_source_property() -> Result> { unsafe { + #[inline] pub fn get_uri_source_property() -> Result>> { >::get_activation_factory().get_uri_source_property() - }} - #[inline] pub fn get_show_as_monochrome_property() -> Result> { unsafe { + } + #[inline] pub fn get_show_as_monochrome_property() -> Result>> { >::get_activation_factory().get_show_as_monochrome_property() - }} + } } DEFINE_CLSID!(BitmapIcon(&[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,66,105,116,109,97,112,73,99,111,110,0]) [CLSID_BitmapIcon]); DEFINE_IID!(IID_IBitmapIcon2, 103064074, 40401, 16897, 187, 32, 66, 134, 61, 161, 86, 88); @@ -6240,63 +6240,63 @@ RT_INTERFACE!{interface IBitmapIcon2(IBitmapIcon2Vtbl): IInspectable(IInspectabl fn put_ShowAsMonochrome(&self, value: bool) -> HRESULT }} impl IBitmapIcon2 { - #[inline] pub unsafe fn get_show_as_monochrome(&self) -> Result { + #[inline] pub fn get_show_as_monochrome(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ShowAsMonochrome)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_show_as_monochrome(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_show_as_monochrome(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ShowAsMonochrome)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } DEFINE_IID!(IID_IBitmapIconFactory, 1188449053, 31305, 20326, 151, 41, 40, 72, 199, 136, 228, 2); RT_INTERFACE!{interface IBitmapIconFactory(IBitmapIconFactoryVtbl): IInspectable(IInspectableVtbl) [IID_IBitmapIconFactory] { fn CreateInstance(&self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut BitmapIcon) -> HRESULT }} impl IBitmapIconFactory { - #[inline] pub unsafe fn create_instance(&self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + #[inline] pub fn create_instance(&self, outer: &IInspectable) -> Result<(Option>, Option>)> { unsafe { let mut inner = null_mut(); let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self 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) } - } + if hr == S_OK { Ok((ComPtr::wrap_optional(inner), ComPtr::wrap_optional(out))) } else { err(hr) } + }} } DEFINE_IID!(IID_IBitmapIconSource, 3370335687, 54446, 19079, 148, 127, 172, 77, 11, 207, 90, 244); RT_INTERFACE!{interface IBitmapIconSource(IBitmapIconSourceVtbl): IInspectable(IInspectableVtbl) [IID_IBitmapIconSource] { - fn get_UriSource(&self, out: *mut *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, - fn put_UriSource(&self, value: *mut ::rt::gen::windows::foundation::Uri) -> HRESULT, + fn get_UriSource(&self, out: *mut *mut foundation::Uri) -> HRESULT, + fn put_UriSource(&self, value: *mut foundation::Uri) -> HRESULT, fn get_ShowAsMonochrome(&self, out: *mut bool) -> HRESULT, fn put_ShowAsMonochrome(&self, value: bool) -> HRESULT }} impl IBitmapIconSource { - #[inline] pub unsafe fn get_uri_source(&self) -> Result> { + #[inline] pub fn get_uri_source(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UriSource)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_uri_source(&self, value: &::rt::gen::windows::foundation::Uri) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_uri_source(&self, value: &foundation::Uri) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_UriSource)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_show_as_monochrome(&self) -> Result { + }} + #[inline] pub fn get_show_as_monochrome(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_ShowAsMonochrome)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_show_as_monochrome(&self, value: bool) -> Result<()> { + }} + #[inline] pub fn set_show_as_monochrome(&self, value: bool) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ShowAsMonochrome)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class BitmapIconSource: IBitmapIconSource} impl RtActivatable for BitmapIconSource {} impl BitmapIconSource { - #[inline] pub fn get_uri_source_property() -> Result> { unsafe { + #[inline] pub fn get_uri_source_property() -> Result>> { >::get_activation_factory().get_uri_source_property() - }} - #[inline] pub fn get_show_as_monochrome_property() -> Result> { unsafe { + } + #[inline] pub fn get_show_as_monochrome_property() -> Result>> { >::get_activation_factory().get_show_as_monochrome_property() - }} + } } DEFINE_CLSID!(BitmapIconSource(&[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,66,105,116,109,97,112,73,99,111,110,83,111,117,114,99,101,0]) [CLSID_BitmapIconSource]); DEFINE_IID!(IID_IBitmapIconSourceFactory, 1695147462, 17590, 19665, 134, 205, 195, 24, 155, 18, 196, 60); @@ -6304,11 +6304,11 @@ RT_INTERFACE!{interface IBitmapIconSourceFactory(IBitmapIconSourceFactoryVtbl): fn CreateInstance(&self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut BitmapIconSource) -> HRESULT }} impl IBitmapIconSourceFactory { - #[inline] pub unsafe fn create_instance(&self, outer: &IInspectable) -> Result<(ComPtr, ComPtr)> { + #[inline] pub fn create_instance(&self, outer: &IInspectable) -> Result<(Option>, Option>)> { unsafe { let mut inner = null_mut(); let mut out = null_mut(); let hr = ((*self.lpVtbl).CreateInstance)(self 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) } - } + if hr == S_OK { Ok((ComPtr::wrap_optional(inner), ComPtr::wrap_optional(out))) } else { err(hr) } + }} } DEFINE_IID!(IID_IBitmapIconSourceStatics, 1511020679, 58516, 19755, 133, 40, 57, 71, 34, 150, 19, 63); RT_INTERFACE!{static interface IBitmapIconSourceStatics(IBitmapIconSourceStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBitmapIconSourceStatics] { @@ -6316,38 +6316,38 @@ RT_INTERFACE!{static interface IBitmapIconSourceStatics(IBitmapIconSourceStatics fn get_ShowAsMonochromeProperty(&self, out: *mut *mut super::DependencyProperty) -> HRESULT }} impl IBitmapIconSourceStatics { - #[inline] pub unsafe fn get_uri_source_property(&self) -> Result> { + #[inline] pub fn get_uri_source_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UriSourceProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_show_as_monochrome_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_show_as_monochrome_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ShowAsMonochromeProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IBitmapIconStatics, 3765621015, 58599, 19980, 148, 112, 83, 255, 28, 232, 79, 103); RT_INTERFACE!{static interface IBitmapIconStatics(IBitmapIconStaticsVtbl): IInspectable(IInspectableVtbl) [IID_IBitmapIconStatics] { fn get_UriSourceProperty(&self, out: *mut *mut super::DependencyProperty) -> HRESULT }} impl IBitmapIconStatics { - #[inline] pub unsafe fn get_uri_source_property(&self) -> Result> { + #[inline] pub fn get_uri_source_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_UriSourceProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IBitmapIconStatics2, 2537882219, 46914, 19081, 165, 215, 160, 229, 251, 128, 154, 241); RT_INTERFACE!{static interface IBitmapIconStatics2(IBitmapIconStatics2Vtbl): IInspectable(IInspectableVtbl) [IID_IBitmapIconStatics2] { fn get_ShowAsMonochromeProperty(&self, out: *mut *mut super::DependencyProperty) -> HRESULT }} impl IBitmapIconStatics2 { - #[inline] pub unsafe fn get_show_as_monochrome_property(&self) -> Result> { + #[inline] pub fn get_show_as_monochrome_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ShowAsMonochromeProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} } DEFINE_IID!(IID_IBorder, 2038187321, 17853, 17971, 160, 68, 191, 176, 46, 245, 23, 15); RT_INTERFACE!{interface IBorder(IBorderVtbl): IInspectable(IInspectableVtbl) [IID_IBorder] { @@ -6367,92 +6367,92 @@ RT_INTERFACE!{interface IBorder(IBorderVtbl): IInspectable(IInspectableVtbl) [II fn put_ChildTransitions(&self, value: *mut super::media::animation::TransitionCollection) -> HRESULT }} impl IBorder { - #[inline] pub unsafe fn get_border_brush(&self) -> Result> { + #[inline] pub fn get_border_brush(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BorderBrush)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_border_brush(&self, value: &super::media::Brush) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_border_brush(&self, value: &super::media::Brush) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BorderBrush)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_border_thickness(&self) -> Result { + }} + #[inline] pub fn get_border_thickness(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_BorderThickness)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_border_thickness(&self, value: super::Thickness) -> Result<()> { + }} + #[inline] pub fn set_border_thickness(&self, value: super::Thickness) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_BorderThickness)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_background(&self) -> Result> { + }} + #[inline] pub fn get_background(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Background)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_background(&self, value: &super::media::Brush) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_background(&self, value: &super::media::Brush) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Background)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_corner_radius(&self) -> Result { + }} + #[inline] pub fn get_corner_radius(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_CornerRadius)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_corner_radius(&self, value: super::CornerRadius) -> Result<()> { + }} + #[inline] pub fn set_corner_radius(&self, value: super::CornerRadius) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_CornerRadius)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_padding(&self) -> Result { + }} + #[inline] pub fn get_padding(&self) -> Result { unsafe { let mut out = zeroed(); let hr = ((*self.lpVtbl).get_Padding)(self as *const _ as *mut _, &mut out); if hr == S_OK { Ok(out) } else { err(hr) } - } - #[inline] pub unsafe fn set_padding(&self, value: super::Thickness) -> Result<()> { + }} + #[inline] pub fn set_padding(&self, value: super::Thickness) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Padding)(self as *const _ as *mut _, value); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_child(&self) -> Result> { + }} + #[inline] pub fn get_child(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_Child)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_child(&self, value: &super::UIElement) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_child(&self, value: &super::UIElement) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_Child)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } - #[inline] pub unsafe fn get_child_transitions(&self) -> Result> { + }} + #[inline] pub fn get_child_transitions(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ChildTransitions)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn set_child_transitions(&self, value: &super::media::animation::TransitionCollection) -> Result<()> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn set_child_transitions(&self, value: &super::media::animation::TransitionCollection) -> Result<()> { unsafe { let hr = ((*self.lpVtbl).put_ChildTransitions)(self as *const _ as *mut _, value as *const _ as *mut _); if hr == S_OK { Ok(()) } else { err(hr) } - } + }} } RT_CLASS!{class Border: IBorder} impl RtActivatable for Border {} impl RtActivatable for Border {} impl Border { - #[inline] pub fn get_border_brush_property() -> Result> { unsafe { + #[inline] pub fn get_border_brush_property() -> Result>> { >::get_activation_factory().get_border_brush_property() - }} - #[inline] pub fn get_border_thickness_property() -> Result> { unsafe { + } + #[inline] pub fn get_border_thickness_property() -> Result>> { >::get_activation_factory().get_border_thickness_property() - }} - #[inline] pub fn get_background_property() -> Result> { unsafe { + } + #[inline] pub fn get_background_property() -> Result>> { >::get_activation_factory().get_background_property() - }} - #[inline] pub fn get_corner_radius_property() -> Result> { unsafe { + } + #[inline] pub fn get_corner_radius_property() -> Result>> { >::get_activation_factory().get_corner_radius_property() - }} - #[inline] pub fn get_padding_property() -> Result> { unsafe { + } + #[inline] pub fn get_padding_property() -> Result>> { >::get_activation_factory().get_padding_property() - }} - #[inline] pub fn get_child_transitions_property() -> Result> { unsafe { + } + #[inline] pub fn get_child_transitions_property() -> Result>> { >::get_activation_factory().get_child_transitions_property() - }} + } } DEFINE_CLSID!(Border(&[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,66,111,114,100,101,114,0]) [CLSID_Border]); DEFINE_IID!(IID_IBorderStatics, 3088913977, 59665, 20439, 164, 196, 185, 199, 240, 8, 183, 252); @@ -6465,36 +6465,36 @@ RT_INTERFACE!{static interface IBorderStatics(IBorderStaticsVtbl): IInspectable( fn get_ChildTransitionsProperty(&self, out: *mut *mut super::DependencyProperty) -> HRESULT }} impl IBorderStatics { - #[inline] pub unsafe fn get_border_brush_property(&self) -> Result> { + #[inline] pub fn get_border_brush_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BorderBrushProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_border_thickness_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_border_thickness_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BorderThicknessProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_background_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_background_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_BackgroundProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_corner_radius_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_corner_radius_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_CornerRadiusProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_padding_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_padding_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_PaddingProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } - #[inline] pub unsafe fn get_child_transitions_property(&self) -> Result> { + if hr == S_OK { Ok(ComPtr::wrap_optional(out)) } else { err(hr) } + }} + #[inline] pub fn get_child_transitions_property(&self) -> Result>> { unsafe { let mut out = null_mut(); let hr = ((*self.lpVtbl).get_ChildTransitionsProperty)(self as *const _ as *mut _, &mut out); - if hr == S_OK { Ok(ComPtr::wrap(out)) } else { err(hr) } - } + if hr == S_OK { Ok(ComPtr::wrap_optional(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] { @@ -6503,9 +6503,9 @@ RT_INTERFACE!{interface IButton(IButtonVtbl): IInspectable(IInspectableVtbl) [II RT_CLASS!{class Button: IButton} impl RtActivatable for Button {} impl Button { - #[inline] pub fn get_flyout_property() -> Result> { unsafe { + #[inline] pub fn get_flyout_property() -> Result>> { >::get_activation_factory().get_flyout_property() - }} + } } DEFINE_CLSID!(Button(&[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,66,117,116,116,111,110,0]) [CLSID_Button]); DEFINE_IID!(IID_IButtonFactory, 2158050329, 33850, 17692, 140, 245, 68, 199, 1, 176, 226, 22); @@ -6513,22 +6513,22 @@ RT_INTERFACE!{interface IButtonFactory(IButtonFactoryVtbl): IInspectable(IInspec fn CreateInstance(&self, outer: *mut IInspectable, inner: *mut *mut IInspectable, out: *mut *mut Button) -> HRESULT }} impl IButtonFactory { - #[inline] pub unsafe fn create_instance(&self, outer: &IInspectable) -> Result<(ComPtr, ComPtr